Skip to content

Commit

Permalink
rename divider
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Sep 25, 2024
1 parent b394033 commit 0fffb38
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions src/components/ha-color-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { LocalizeKeys } from "../common/translations/localize";
import { HomeAssistant } from "../types";
import "./ha-list-item";
import "./ha-select";
import "./ha-divider";
import "./ha-md-divider";

@customElement("ha-color-picker")
export class HaColorPicker extends LitElement {
Expand Down Expand Up @@ -95,7 +95,7 @@ export class HaColorPicker extends LitElement {
`
: nothing}
${this.includeState || this.includeNone
? html`<ha-divider role="separator" tabindex="-1"></ha-divider>`
? html`<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>`
: nothing}
${Array.from(THEME_COLORS).map(
(color) => html`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { MdDivider } from "@material/web/divider/divider";
import { css } from "lit";
import { customElement } from "lit/decorators";

@customElement("ha-divider")
export class HaDivider extends MdDivider {
@customElement("ha-md-divider")
export class HaMdDivider extends MdDivider {
static override styles = [
...super.styles,
css`
Expand All @@ -16,6 +16,6 @@ export class HaDivider extends MdDivider {

declare global {
interface HTMLElementTagNameMap {
"ha-divider": HaDivider;
"ha-md-divider": HaMdDivider;
}
}
6 changes: 3 additions & 3 deletions src/layouts/hass-tabs-subpage-data-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import type {
} from "../components/data-table/ha-data-table";
import "../components/ha-md-button-menu";
import "../components/ha-dialog";
import "../components/ha-divider";
import "../components/ha-md-divider";
import { HaMenu } from "../components/ha-menu";
import "../components/ha-md-menu-item";
import "../components/search-input-outlined";
Expand Down Expand Up @@ -364,7 +364,7 @@ export class HaTabsSubpageDataTable extends LitElement {
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item
.value=${undefined}
@click=${this._disableSelectMode}
Expand Down Expand Up @@ -501,7 +501,7 @@ export class HaTabsSubpageDataTable extends LitElement {
>
${localize("ui.components.subpage-data-table.dont_group_by")}
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item
@click=${this._collapseAllGroups}
.disabled=${this._groupColumn === undefined}
Expand Down
4 changes: 2 additions & 2 deletions src/panels/config/automation/add-automation-element-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { deepEqual } from "../../../common/util/deep-equal";
import "../../../components/ha-dialog";
import type { HaDialog } from "../../../components/ha-dialog";
import "../../../components/ha-dialog-header";
import "../../../components/ha-divider";
import "../../../components/ha-md-divider";
import "../../../components/ha-domain-icon";
import "../../../components/ha-icon-button";
import "../../../components/ha-icon-button-prev";
Expand Down Expand Up @@ -559,7 +559,7 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
></ha-svg-icon
><ha-svg-icon slot="end" .path=${mdiPlus}></ha-svg-icon>
</ha-md-list-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>`
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>`
: ""}
${repeat(
items,
Expand Down
10 changes: 5 additions & 5 deletions src/panels/config/automation/ha-automation-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import type {
} from "../../../components/data-table/ha-data-table";
import "../../../components/data-table/ha-data-table-labels";
import "../../../components/entity/ha-entity-toggle";
import "../../../components/ha-divider";
import "../../../components/ha-md-divider";
import "../../../components/ha-fab";
import "../../../components/ha-filter-blueprints";
import "../../../components/ha-filter-categories";
Expand Down Expand Up @@ -420,7 +420,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateCategory}>
<div slot="headline">
${this.hass.localize("ui.panel.config.category.editor.add")}
Expand Down Expand Up @@ -457,7 +457,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
</ha-label>
</ha-md-menu-item>`;
})}
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateLabel}>
<div slot="headline">
${this.hass.localize("ui.panel.config.labels.add_label")}
Expand Down Expand Up @@ -486,7 +486,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateArea}>
<div slot="headline">
${this.hass.localize(
Expand Down Expand Up @@ -867,7 +867,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item .clickAction=${this._duplicate}>
<ha-svg-icon .path=${mdiContentDuplicate} slot="start"></ha-svg-icon>
<div slot="headline">
Expand Down
6 changes: 3 additions & 3 deletions src/panels/config/devices/ha-config-devices-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import "../../../components/entity/ha-battery-icon";
import "../../../components/ha-alert";
import "../../../components/ha-button-menu";
import "../../../components/ha-check-list-item";
import "../../../components/ha-divider";
import "../../../components/ha-md-divider";
import "../../../components/ha-fab";
import "../../../components/ha-filter-devices";
import "../../../components/ha-filter-floor-areas";
Expand Down Expand Up @@ -650,7 +650,7 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateArea}>
<div slot="headline">
${this.hass.localize(
Expand Down Expand Up @@ -689,7 +689,7 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
</ha-label>
</ha-md-menu-item>`;
})}
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateLabel}>
<div slot="headline">
${this.hass.localize("ui.panel.config.labels.add_label")}
Expand Down
10 changes: 5 additions & 5 deletions src/panels/config/entities/ha-config-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import "../../../components/data-table/ha-data-table-labels";
import "../../../components/ha-alert";
import "../../../components/ha-button-menu";
import "../../../components/ha-check-list-item";
import "../../../components/ha-divider";
import "../../../components/ha-md-divider";
import "../../../components/ha-filter-devices";
import "../../../components/ha-filter-domains";
import "../../../components/ha-filter-floor-areas";
Expand Down Expand Up @@ -721,7 +721,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
</ha-label>
</ha-md-menu-item>`;
})}
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateLabel}>
<div slot="headline">
${this.hass.localize("ui.panel.config.labels.add_label")}
Expand Down Expand Up @@ -831,7 +831,7 @@ ${
</ha-md-menu-item>
<ha-menu slot="menu">${labelItems}</ha-menu>
</ha-sub-menu>
<ha-divider role="separator" tabindex="-1"></ha-divider>`
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>`
: nothing
}
Expand All @@ -854,7 +854,7 @@ ${
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._unhideSelected}>
<ha-svg-icon
Expand All @@ -878,7 +878,7 @@ ${
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._removeSelected} class="warning">
<ha-svg-icon
Expand Down
6 changes: 3 additions & 3 deletions src/panels/config/helpers/ha-config-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
SortingChangedEvent,
} from "../../../components/data-table/ha-data-table";
import "../../../components/data-table/ha-data-table-labels";
import "../../../components/ha-divider";
import "../../../components/ha-md-divider";
import "../../../components/ha-fab";
import "../../../components/ha-filter-categories";
import "../../../components/ha-filter-devices";
Expand Down Expand Up @@ -497,7 +497,7 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateCategory}>
<div slot="headline">
${this.hass.localize("ui.panel.config.category.editor.add")}
Expand Down Expand Up @@ -532,7 +532,7 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
${label.name}
</ha-label>
</ha-md-menu-item> `;
})}<ha-divider role="separator" tabindex="-1"></ha-divider>
})}<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateLabel}>
<div slot="headline">
${this.hass.localize("ui.panel.config.labels.add_label")}
Expand Down
12 changes: 6 additions & 6 deletions src/panels/config/integrations/ha-config-integration-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { caseInsensitiveStringCompare } from "../../../common/string/compare";
import { nextRender } from "../../../common/util/render-status";
import "../../../components/ha-button";
import "../../../components/ha-card";
import "../../../components/ha-divider";
import "../../../components/ha-md-divider";
import "../../../components/ha-list-item";
import "../../../components/ha-md-button-menu";
import "../../../components/ha-md-list";
Expand Down Expand Up @@ -533,10 +533,10 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
(item, index) =>
html`${this._renderConfigEntry(item)}
${index < attentionEntries.length - 1
? html` <ha-divider
? html` <ha-md-divider
role="separator"
tabindex="-1"
></ha-divider>`
></ha-md-divider>`
: ""} `
)}
</ha-md-list>
Expand Down Expand Up @@ -573,10 +573,10 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
(item, index) =>
html`${this._renderConfigEntry(item)}
${index < normalEntries.length - 1
? html` <ha-divider
? html` <ha-md-divider
role="separator"
tabindex="-1"
></ha-divider>`
></ha-md-divider>`
: ""} `
)}
</ha-md-list>
Expand Down Expand Up @@ -882,7 +882,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
)}
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
${this._diagnosticHandler && item.state === "loaded"
? html`
Expand Down
8 changes: 4 additions & 4 deletions src/panels/config/scene/ha-scene-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import {
} from "../../../components/data-table/ha-data-table";
import "../../../components/data-table/ha-data-table-labels";
import "../../../components/ha-button";
import "../../../components/ha-divider";
import "../../../components/ha-md-divider";
import "../../../components/ha-fab";
import "../../../components/ha-filter-categories";
import "../../../components/ha-filter-devices";
Expand Down Expand Up @@ -441,7 +441,7 @@ class HaSceneDashboard extends SubscribeMixin(LitElement) {
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateCategory}>
<div slot="headline">
${this.hass.localize("ui.panel.config.category.editor.add")}
Expand Down Expand Up @@ -478,7 +478,7 @@ class HaSceneDashboard extends SubscribeMixin(LitElement) {
</ha-label>
</ha-md-menu-item>`;
})}
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateLabel}>
<div slot="headline">
${this.hass.localize("ui.panel.config.labels.add_label")}
Expand Down Expand Up @@ -507,7 +507,7 @@ class HaSceneDashboard extends SubscribeMixin(LitElement) {
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateArea}>
<div slot="headline">
${this.hass.localize(
Expand Down
8 changes: 4 additions & 4 deletions src/panels/config/script/ha-script-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import {
SortingChangedEvent,
} from "../../../components/data-table/ha-data-table";
import "../../../components/data-table/ha-data-table-labels";
import "../../../components/ha-divider";
import "../../../components/ha-md-divider";
import "../../../components/ha-fab";
import "../../../components/ha-filter-blueprints";
import "../../../components/ha-filter-categories";
Expand Down Expand Up @@ -430,7 +430,7 @@ class HaScriptPicker extends SubscribeMixin(LitElement) {
"ui.panel.config.automation.picker.bulk_actions.no_category"
)}
</div> </ha-md-menu-item
><ha-divider role="separator" tabindex="-1"></ha-divider>
><ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateCategory}>
<div slot="headline">
${this.hass.localize("ui.panel.config.category.editor.add")}
Expand Down Expand Up @@ -467,7 +467,7 @@ class HaScriptPicker extends SubscribeMixin(LitElement) {
</ha-label>
</ha-md-menu-item>`;
})}
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateLabel}>
<div slot="headline">
${this.hass.localize("ui.panel.config.labels.add_label")}
Expand Down Expand Up @@ -496,7 +496,7 @@ class HaScriptPicker extends SubscribeMixin(LitElement) {
)}
</div>
</ha-md-menu-item>
<ha-divider role="separator" tabindex="-1"></ha-divider>
<ha-md-divider role="separator" tabindex="-1"></ha-md-divider>
<ha-md-menu-item @click=${this._bulkCreateArea}>
<div slot="headline">
${this.hass.localize(
Expand Down

0 comments on commit 0fffb38

Please sign in to comment.