Skip to content

Commit

Permalink
fix a lot of attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
MindFreeze committed Dec 6, 2024
1 parent ea07c79 commit 8dedf54
Show file tree
Hide file tree
Showing 55 changed files with 92 additions and 81 deletions.
2 changes: 1 addition & 1 deletion gallery/src/pages/automation/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class DemoAutomationTrace extends LitElement {
.sampleIdx=${idx}
></hat-script-graph>
<hat-trace-timeline
allowPick
allow-pick
.hass=${this.hass}
.trace=${trace.trace}
.logbookEntries=${trace.logbookEntries}
Expand Down
2 changes: 1 addition & 1 deletion hassio/src/backups/hassio-backups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class HassioBackups extends LitElement {
@selection-changed=${this._handleSelectionChanged}
clickable
selectable
hasFab
has-fab
.mainPage=${!atLeastVersion(this.hass.config.version, 2021, 12)}
back-path=${atLeastVersion(this.hass.config.version, 2022, 5)
? "/config/system"
Expand Down
2 changes: 1 addition & 1 deletion hassio/src/dashboard/hassio-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class HassioDashboard extends LitElement {
.mainPage=${!atLeastVersion(this.hass.config.version, 2021, 12)}
back-path="/config"
supervisor
hasFab
has-fab
>
<span slot="header">
${this.supervisor.localize(
Expand Down
4 changes: 2 additions & 2 deletions landing-page/src/ha-landing-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ class HaLandingPage extends LandingPageBaseElement {
<ha-language-picker
.value=${this.language}
.label=${""}
nativeName
native-name
@value-changed=${this._languageChanged}
inlineArrow
inline-arrow
></ha-language-picker>
<a
href="https://www.home-assistant.io/getting-started/onboarding/"
Expand Down
4 changes: 2 additions & 2 deletions src/auth/ha-authorize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ export class HaAuthorize extends litLocalizeLiteMixin(LitElement) {
<ha-language-picker
.value=${this.language}
.label=${""}
nativeName
native-name
@value-changed=${this._languageChanged}
inlineArrow
inline-arrow
></ha-language-picker>
<a
href="https://www.home-assistant.io/docs/authentication/"
Expand Down
2 changes: 1 addition & 1 deletion src/components/ha-code-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class HaCodeEditor extends ReactiveElement {
// eslint-disable-next-line lit/no-native-attributes
@property({ type: Boolean }) public autofocus = false;

@property({ attribute: false, type: Boolean }) public readOnly = false;
@property({ attribute: "read-only", type: Boolean }) public readOnly = false;

@property({ type: Boolean }) public linewrap = false;

Expand Down
2 changes: 1 addition & 1 deletion src/components/ha-date-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class HaDateInput extends LitElement {

@property() public helper?: string;

@property({ attribute: false, type: Boolean }) public canClear = false;
@property({ attribute: "can-clear", type: Boolean }) public canClear = false;

render() {
return html`<ha-textfield
Expand Down
2 changes: 1 addition & 1 deletion src/components/ha-icon-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class HaIconButton extends LitElement {
@property({ type: String, attribute: "aria-haspopup" })
override ariaHasPopup!: IconButton["ariaHasPopup"];

@property({ attribute: false, type: Boolean }) hideTitle = false;
@property({ attribute: "hide-title", type: Boolean }) hideTitle = false;

@query("mwc-icon-button", true) private _button?: IconButton;

Expand Down
8 changes: 5 additions & 3 deletions src/components/ha-language-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ export class HaLanguagePicker extends LitElement {

@property({ type: Boolean }) public required = false;

@property({ attribute: false, type: Boolean }) public nativeName = false;
@property({ attribute: "native-name", type: Boolean })
public nativeName = false;

@property({ attribute: false, type: Boolean }) public noSort = false;
@property({ attribute: "no-sort", type: Boolean }) public noSort = false;

@property({ attribute: false, type: Boolean }) public inlineArrow = false;
@property({ attribute: "inline-arrow", type: Boolean })
public inlineArrow = false;

@state() _defaultLanguages: string[] = [];

Expand Down
3 changes: 2 additions & 1 deletion src/components/ha-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export class HaSelect extends SelectBase {

@property({ type: Boolean, reflect: true }) public clearable = false;

@property({ attribute: false, type: Boolean }) public inlineArrow = false;
@property({ attribute: "inline-arrow", type: Boolean })
public inlineArrow = false;

protected override render() {
return html`
Expand Down
3 changes: 2 additions & 1 deletion src/components/ha-service-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export class HaServiceControl extends LitElement {

@property({ type: Boolean, reflect: true }) public narrow = false;

@property({ attribute: false, type: Boolean }) public showAdvanced = false;
@property({ attribute: "show-advanced", type: Boolean }) public showAdvanced =
false;

@property({ attribute: false, type: Boolean, reflect: true })
public hidePicker = false;
Expand Down
4 changes: 2 additions & 2 deletions src/components/ha-target-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
"ui.components.target-picker.expand"
)}
.path=${mdiUnfoldMoreVertical}
hideTitle
hide-title
.id=${id}
.type=${type}
@click=${this._handleExpand}
Expand All @@ -361,7 +361,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
class="mdc-chip__icon mdc-chip__icon--trailing"
.label=${this.hass.localize("ui.components.target-picker.remove")}
.path=${mdiClose}
hideTitle
hide-title
.id=${id}
.type=${type}
@click=${this._handleRemove}
Expand Down
3 changes: 2 additions & 1 deletion src/components/ha-textfield.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export class HaTextField extends TextFieldBase {
@property({ type: Boolean }) public icon = false;

// @ts-ignore
@property({ attribute: false, type: Boolean }) public iconTrailing = false;
// eslint-disable-next-line lit/attribute-names
@property({ type: Boolean }) public iconTrailing = false;

@property() public autocomplete?: string;

Expand Down
13 changes: 8 additions & 5 deletions src/components/ha-yaml-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,22 @@ export class HaYamlEditor extends LitElement {

@property({ attribute: false }) public defaultValue?: any;

@property({ attribute: false, type: Boolean }) public isValid = true;
@property({ attribute: "is-valid", type: Boolean }) public isValid = true;

@property() public label?: string;

@property({ attribute: false, type: Boolean }) public autoUpdate = false;
@property({ attribute: "auto-update", type: Boolean }) public autoUpdate =
false;

@property({ attribute: false, type: Boolean }) public readOnly = false;
@property({ attribute: "read-only", type: Boolean }) public readOnly = false;

@property({ type: Boolean }) public required = false;

@property({ attribute: false, type: Boolean }) public copyClipboard = false;
@property({ attribute: "copy-clipboard", type: Boolean })
public copyClipboard = false;

@property({ attribute: false, type: Boolean }) public hasExtraActions = false;
@property({ attribute: "has-extra-actions", type: Boolean })
public hasExtraActions = false;

@state() private _yaml = "";

Expand Down
9 changes: 5 additions & 4 deletions src/components/map/ha-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ export class HaMap extends ReactiveElement {

@property({ type: Boolean }) public clickable = false;

@property({ attribute: false, type: Boolean }) public autoFit = false;
@property({ attribute: "auto-fit", type: Boolean }) public autoFit = false;

@property({ attribute: false, type: Boolean }) public renderPassive = false;
@property({ attribute: "render-passive", type: Boolean })
public renderPassive = false;

@property({ attribute: false, type: Boolean }) public interactiveZones =
false;
@property({ attribute: "interactive-zones", type: Boolean })
public interactiveZones = false;

@property({ attribute: false, type: Boolean }) public fitZones = false;

Expand Down
2 changes: 1 addition & 1 deletion src/components/trace/ha-trace-blueprint-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class HaTraceBlueprintConfig extends LitElement {
return html`
<ha-code-editor
.value=${dump(this.trace.blueprint_inputs || "").trimRight()}
readOnly
read-only
dir="ltr"
></ha-code-editor>
`;
Expand Down
2 changes: 1 addition & 1 deletion src/components/trace/ha-trace-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class HaTraceConfig extends LitElement {
return html`
<ha-code-editor
.value=${dump(this.trace.config).trimRight()}
readOnly
read-only
dir="ltr"
></ha-code-editor>
`;
Expand Down
2 changes: 1 addition & 1 deletion src/components/trace/ha-trace-path-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class HaTracePathDetails extends LitElement {
return config
? html`<ha-code-editor
.value=${dump(config).trimEnd()}
readOnly
read-only
dir="ltr"
></ha-code-editor>`
: this.hass!.localize(
Expand Down
2 changes: 1 addition & 1 deletion src/components/trace/ha-trace-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class HaTraceTimeline extends LitElement {
.trace=${this.trace}
.logbookEntries=${this.logbookEntries}
.selectedPath=${this.selected.path}
allowPick
allow-pick
>
</hat-trace-timeline>
<hat-logbook-note
Expand Down
3 changes: 2 additions & 1 deletion src/components/trace/hat-trace-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,8 @@ export class HaAutomationTracer extends LitElement {

@property({ attribute: false }) public selectedPath?: string;

@property({ attribute: false, type: Boolean }) public allowPick = false;
@property({ attribute: "allow-pick", type: Boolean }) public allowPick =
false;

@state()
@consume({ context: fullEntitiesContext, subscribe: true })
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/more-info/controls/more-info-person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MoreInfoPerson extends LitElement {
<ha-map
.hass=${this.hass}
.entities=${this._entityArray(this.stateObj.entity_id)}
autoFit
auto-fit
></ha-map>
`
: ""}
Expand Down
5 changes: 3 additions & 2 deletions src/layouts/hass-tabs-subpage-data-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class HaTabsSubpageDataTable extends LitElement {
* Do we need to add padding for a fab.
* @type {Boolean}
*/
@property({ attribute: false, type: Boolean }) public hasFab = false;
@property({ attribute: "has-fab", type: Boolean }) public hasFab = false;

/**
* Add an extra row at the bottom of the data table
Expand Down Expand Up @@ -156,7 +156,8 @@ export class HaTabsSubpageDataTable extends LitElement {
* Show the filter menu.
* @type {Boolean}
*/
@property({ attribute: false, type: Boolean }) public hasFilters = false;
@property({ attribute: "has-filters", type: Boolean }) public hasFilters =
false;

@property({ attribute: false, type: Boolean }) public showFilters = false;

Expand Down
4 changes: 2 additions & 2 deletions src/onboarding/ha-onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ class HaOnboarding extends litLocalizeLiteMixin(HassElement) {
<ha-language-picker
.value=${this.language}
.label=${""}
nativeName
native-name
@value-changed=${this._languageChanged}
inlineArrow
inline-arrow
></ha-language-picker>
<a
href="https://www.home-assistant.io/getting-started/onboarding/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class HaConfigApplicationCredentials extends LitElement {
this._applicationCredentials,
this.hass.localize
)}
hasFab
has-fab
selectable
.selected=${this._selected.length}
@selection-changed=${this._handleSelectionChanged}
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/automation/ha-automation-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
`
: ""}
<ha-yaml-editor
copyClipboard
copy-clipboard
.hass=${this.hass}
.defaultValue=${this._preprocessYaml()}
.readOnly=${this._readOnly}
Expand Down
4 changes: 2 additions & 2 deletions src/panels/config/automation/ha-automation-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
selectable
.selected=${this._selected.length}
@selection-changed=${this._handleSelectionChanged}
hasFilters
has-filters
.filters=${
Object.values(this._filters).filter((filter) =>
Array.isArray(filter.value)
Expand Down Expand Up @@ -556,7 +556,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
@clear-filter=${this._clearFilter}
.filter=${this._filter}
@search-changed=${this._handleSearchChange}
hasFab
has-fab
clickable
class=${this.narrow ? "narrow" : ""}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ export default class HaAutomationTriggerRow extends LitElement {
),
text: html`
<ha-yaml-editor
readOnly
read-only
.hass=${this.hass}
.defaultValue=${this._triggered}
></ha-yaml-editor>
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/backup/ha-config-backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class HaConfigBackup extends LitElement {

return html`
<hass-tabs-subpage-data-table
hasFab
has-fab
.tabs=${[
{
translationKey: "ui.panel.config.backup.caption",
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/blueprint/ha-blueprint-overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class HaBlueprintOverview extends LitElement {
.noDataText=${this.hass.localize(
"ui.panel.config.blueprint.overview.no_blueprints"
)}
hasFab
has-fab
clickable
@row-click=${this._handleRowClicked}
.appendRow=${html`<div
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/core/ha-config-section-general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class HaConfigSectionGeneral extends LitElement {
></ha-country-picker>
<ha-language-picker
.hass=${this.hass}
nativeName
native-name
.label=${this.hass.localize(
"ui.panel.config.core.section.core.core_config.language"
)}
Expand Down
4 changes: 2 additions & 2 deletions src/panels/config/devices/ha-config-devices-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
.selected=${this._selected.length}
@selection-changed=${this._handleSelectionChanged}
.filter=${this._filter}
hasFilters
has-filters
.filters=${Object.values(this._filters).filter((filter) =>
Array.isArray(filter.value)
? filter.value.length
Expand All @@ -731,7 +731,7 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
@collapsed-changed=${this._handleCollapseChanged}
@row-click=${this._handleRowClicked}
clickable
hasFab
has-fab
class=${this.narrow ? "narrow" : ""}
>
<ha-integration-overflow-menu
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/entities/ha-config-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
"ui.panel.config.entities.picker.search",
{ number: filteredEntities.length }
)}
hasFilters
has-filters
.filters=${
Object.values(this._filters).filter((filter) =>
Array.isArray(filter)
Expand Down
4 changes: 2 additions & 2 deletions src/panels/config/helpers/ha-config-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
selectable
.selected=${this._selected.length}
@selection-changed=${this._handleSelectionChanged}
hasFilters
has-filters
.filters=${Object.values(this._filters).filter((filter) =>
Array.isArray(filter)
? filter.length
Expand All @@ -641,7 +641,7 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
@row-click=${this._openEditDialog}
.filter=${this._filter}
@search-changed=${this._handleSearchChange}
hasFab
has-fab
clickable
.noDataText=${this.hass.localize(
"ui.panel.config.helpers.picker.no_helpers"
Expand Down
Loading

0 comments on commit 8dedf54

Please sign in to comment.