diff --git a/gallery/src/pages/components/ha-tooltip.markdown b/gallery/src/pages/components/ha-tooltip.markdown index 69e0e99e60..c51856ba41 100644 --- a/gallery/src/pages/components/ha-tooltip.markdown +++ b/gallery/src/pages/components/ha-tooltip.markdown @@ -6,21 +6,23 @@ A tooltip's target is its _first child element_, so you should only wrap one ele Tooltips use `display: contents` so they won't interfere with how elements are positioned in a flex or grid layout. - - Hover Me +Hover Me + +This is a tooltip ``` - - Hover Me +Hover Me + +This is a tooltip ``` ## Documentation -This element is based on shoelace `sl-tooltip` it only sets some css tokens and has a custom show/hide animation. +This element is based on webawesome `wa-tooltip` it only sets some css tokens and has a custom show/hide animation. -Shoelace documentation +Webawesome documentation ### HA style tokens @@ -28,7 +30,7 @@ In your theme settings use this without the prefixed `--`. - `--ha-tooltip-border-radius` (Default: 4px) - `--ha-tooltip-arrow-size` (Default: 8px) -- `--sl-tooltip-font-family` (Default: `var(--ha-font-family-body)`) +- `--wa-tooltip-font-family` (Default: `var(--ha-font-family-body)`) - `--ha-tooltip-font-size` (Default: `var(--ha-font-size-s)`) -- `--sl-tooltip-font-weight` (Default: `var(--ha-font-weight-normal)`) -- `--sl-tooltip-line-height` (Default: `var(--ha-line-height-condensed)`) +- `--wa-tooltip-font-weight` (Default: `var(--ha-font-weight-normal)`) +- `--wa-tooltip-line-height` (Default: `var(--ha-line-height-condensed)`) diff --git a/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts b/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts index f59aa01b2d..93ad4121d6 100644 --- a/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts +++ b/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts @@ -119,26 +119,27 @@ class HassioRepositoriesDialog extends LitElement {
${repo.url}
+ ${this._dialogParams!.supervisor.localize( usedRepositories.includes(repo.slug) ? "dialog.repositories.used" : "dialog.repositories.remove" )} - > -
- - -
+
+ + +
` ) diff --git a/package.json b/package.json index 7966fdd6ab..7c10faae68 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@fullcalendar/list": "6.1.19", "@fullcalendar/luxon3": "6.1.19", "@fullcalendar/timegrid": "6.1.19", - "@home-assistant/webawesome": "3.0.0-beta.4.ha.2", + "@home-assistant/webawesome": "3.0.0-beta.4.ha.3", "@lezer/highlight": "1.2.1", "@lit-labs/motion": "1.0.9", "@lit-labs/observers": "2.0.6", @@ -84,7 +84,6 @@ "@mdi/js": "7.4.47", "@mdi/svg": "7.4.47", "@replit/codemirror-indentation-markers": "6.5.3", - "@shoelace-style/shoelace": "2.20.1", "@swc/helpers": "0.5.17", "@thomasloven/round-slider": "0.6.0", "@tsparticles/engine": "3.9.1", diff --git a/src/components/data-table/ha-data-table-icon.ts b/src/components/data-table/ha-data-table-icon.ts index a4b797d82f..2dce4e03ae 100644 --- a/src/components/data-table/ha-data-table-icon.ts +++ b/src/components/data-table/ha-data-table-icon.ts @@ -12,9 +12,8 @@ class HaDataTableIcon extends LitElement { protected render(): TemplateResult { return html` - - - + ${this.tooltip} + `; } diff --git a/src/components/entity/state-info.ts b/src/components/entity/state-info.ts index 5fa32ac238..229608fdc1 100644 --- a/src/components/entity/state-info.ts +++ b/src/components/entity/state-info.ts @@ -36,39 +36,38 @@ class StateInfo extends LitElement { ${this.inDialog ? html`
- - -
-
- - ${this.hass.localize( - "ui.dialogs.more_info_control.last_changed" - )}: - - -
-
- - ${this.hass.localize( - "ui.dialogs.more_info_control.last_updated" - )}: - - -
+ +
+ + ${this.hass.localize( + "ui.dialogs.more_info_control.last_changed" + )}: + + +
+
+ + ${this.hass.localize( + "ui.dialogs.more_info_control.last_updated" + )}: + +
+
` : html`
`}
`; diff --git a/src/components/ha-analytics.ts b/src/components/ha-analytics.ts index 74cb5e6e64..dc74af02e0 100644 --- a/src/components/ha-analytics.ts +++ b/src/components/ha-analytics.ts @@ -67,20 +67,19 @@ export class HaAnalytics extends LitElement { )} - - - + + + ${this.localize( + `ui.panel.${this.translationKeyPanel}.analytics.need_base_enabled` + )} diff --git a/src/components/ha-help-tooltip.ts b/src/components/ha-help-tooltip.ts index 1d88cd748d..d63edff5fc 100644 --- a/src/components/ha-help-tooltip.ts +++ b/src/components/ha-help-tooltip.ts @@ -25,8 +25,9 @@ export class HaHelpTooltip extends LitElement { protected render(): TemplateResult { return html` - - + + + ${this.label} `; } diff --git a/src/components/ha-icon-overflow-menu.ts b/src/components/ha-icon-overflow-menu.ts index eed7d557a9..e1169fee22 100644 --- a/src/components/ha-icon-overflow-menu.ts +++ b/src/components/ha-icon-overflow-menu.ts @@ -74,16 +74,16 @@ export class HaIconOverflowMenu extends LitElement { : item.divider ? html`
` : html` - ${item.tooltip ?? ""} -
` + > ` )} `} `; diff --git a/src/components/ha-target-picker.ts b/src/components/ha-target-picker.ts index 250645a5c1..ad292a988f 100644 --- a/src/components/ha-target-picker.ts +++ b/src/components/ha-target-picker.ts @@ -343,40 +343,36 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) { ${type === "entity_id" ? "" : html` - ${this.hass.localize( `ui.components.target-picker.expand_${type}` )} - > - + `} - - + + ${this.hass.localize(`ui.components.target-picker.remove_${type}`)} + `; diff --git a/src/components/ha-tooltip.ts b/src/components/ha-tooltip.ts index 0b6037a5bc..16c2b501ae 100644 --- a/src/components/ha-tooltip.ts +++ b/src/components/ha-tooltip.ts @@ -1,50 +1,47 @@ -import SlTooltip from "@shoelace-style/shoelace/dist/components/tooltip/tooltip.component"; -import styles from "@shoelace-style/shoelace/dist/components/tooltip/tooltip.styles"; +import Tooltip from "@home-assistant/webawesome/dist/components/tooltip/tooltip"; import { css } from "lit"; -import { customElement } from "lit/decorators"; -import { setDefaultAnimation } from "@shoelace-style/shoelace/dist/utilities/animation-registry"; - -setDefaultAnimation("tooltip.show", { - keyframes: [{ opacity: 0 }, { opacity: 1 }], - options: { duration: 150, easing: "ease" }, -}); - -setDefaultAnimation("tooltip.hide", { - keyframes: [{ opacity: 1 }, { opacity: 0 }], - options: { duration: 400, easing: "ease" }, -}); +import type { CSSResultGroup } from "lit"; +import { customElement, property } from "lit/decorators"; @customElement("ha-tooltip") -export class HaTooltip extends SlTooltip { - static override styles = [ - styles, - css` - :host { - --sl-tooltip-background-color: var(--secondary-background-color); - --sl-tooltip-color: var(--primary-text-color); - --sl-tooltip-font-family: var( - --ha-tooltip-font-family, - var(--ha-font-family-body) - ); - --sl-tooltip-font-size: var( - --ha-tooltip-font-size, - var(--ha-font-size-s) - ); - --sl-tooltip-font-weight: var( - --ha-tooltip-font-weight, - var(--ha-font-weight-normal) - ); - --sl-tooltip-line-height: var( - --ha-tooltip-line-height, - var(--ha-line-height-condensed) - ); - --sl-tooltip-padding: 8px; - --sl-tooltip-border-radius: var(--ha-tooltip-border-radius, 4px); - --sl-tooltip-arrow-size: var(--ha-tooltip-arrow-size, 8px); - --sl-z-index-tooltip: var(--ha-tooltip-z-index, 1000); - } - `, - ]; +export class HaTooltip extends Tooltip { + /** The amount of time to wait before showing the tooltip when the user mouses in. */ + @property({ attribute: "show-delay", type: Number }) showDelay = 150; + + /** The amount of time to wait before hiding the tooltip when the user mouses out.. */ + @property({ attribute: "hide-delay", type: Number }) hideDelay = 400; + + static get styles(): CSSResultGroup { + return [ + Tooltip.styles, + css` + :host { + --wa-tooltip-background-color: var(--secondary-background-color); + --wa-tooltip-color: var(--primary-text-color); + --wa-tooltip-font-family: var( + --ha-tooltip-font-family, + var(--ha-font-family-body) + ); + --wa-tooltip-font-size: var( + --ha-tooltip-font-size, + var(--ha-font-size-s) + ); + --wa-tooltip-font-weight: var( + --ha-tooltip-font-weight, + var(--ha-font-weight-normal) + ); + --wa-tooltip-line-height: var( + --ha-tooltip-line-height, + var(--ha-line-height-condensed) + ); + --wa-tooltip-padding: 8px; + --wa-tooltip-border-radius: var(--ha-tooltip-border-radius, 4px); + --wa-tooltip-arrow-size: var(--ha-tooltip-arrow-size, 8px); + --wa-z-index-tooltip: var(--ha-tooltip-z-index, 1000); + } + `, + ]; + } } declare global { diff --git a/src/components/media-player/ha-media-player-browse.ts b/src/components/media-player/ha-media-player-browse.ts index 1d8b81b95e..4c4889dbca 100644 --- a/src/components/media-player/ha-media-player-browse.ts +++ b/src/components/media-player/ha-media-player-browse.ts @@ -642,9 +642,10 @@ export class HaMediaPlayerBrowse extends LitElement { ` : ""} - -
${child.title}
+ + ${child.title} +
${child.title}
`; diff --git a/src/dialogs/more-info/controls/more-info-weather.ts b/src/dialogs/more-info/controls/more-info-weather.ts index 5c27ec16cb..73d9acb8b3 100644 --- a/src/dialogs/more-info/controls/more-info-weather.ts +++ b/src/dialogs/more-info/controls/more-info-weather.ts @@ -166,37 +166,36 @@ class MoreInfoWeather extends LitElement { ${this.hass.formatEntityState(this.stateObj)}
- - -
-
- - ${this.hass.localize( - "ui.dialogs.more_info_control.last_changed" - )}: - - -
-
- - ${this.hass.localize( - "ui.dialogs.more_info_control.last_updated" - )}: - - -
+ + +
+ + ${this.hass.localize( + "ui.dialogs.more_info_control.last_changed" + )}: + + +
+
+ + ${this.hass.localize( + "ui.dialogs.more_info_control.last_updated" + )}: + +
diff --git a/src/dialogs/notifications/persistent-notification-item.ts b/src/dialogs/notifications/persistent-notification-item.ts index 819ec413fd..0dfb944f23 100644 --- a/src/dialogs/notifications/persistent-notification-item.ts +++ b/src/dialogs/notifications/persistent-notification-item.ts @@ -28,15 +28,14 @@ export class HuiPersistentNotificationItem extends LitElement {
- - + + + ${this._computeTooltip(this.hass, this.notification)}
diff --git a/src/panels/config/areas/ha-config-area-page.ts b/src/panels/config/areas/ha-config-area-page.ts index 2b191a6f93..649b3f0777 100644 --- a/src/panels/config/areas/ha-config-area-page.ts +++ b/src/panels/config/areas/ha-config-area-page.ts @@ -51,6 +51,7 @@ import { loadAreaRegistryDetailDialog, showAreaRegistryDetailDialog, } from "./show-dialog-area-registry-detail"; +import { slugify } from "../../../common/string/slugify"; declare interface NameAndEntity { name: string; @@ -549,11 +550,14 @@ class HaConfigAreaPage extends LitElement { private _renderScene(name: string, entityState: SceneEntity) { return html` + .for="scene-${slugify(entityState.entity_id)}" + .distance=${-4} + .disabled=${!!entityState.attributes.id} + > + ${this.hass.localize("ui.panel.config.devices.cant_edit")} + ${name} - -
`; + `; } private _renderAutomation(name: string, entityState: AutomationEntity) { - return html` - - `; + ${this.hass.localize("ui.panel.config.devices.cant_edit")} + `; } private _renderScript(name: string, entityState: ScriptEntity) { diff --git a/src/panels/config/automation/action/ha-automation-action-row.ts b/src/panels/config/automation/action/ha-automation-action-row.ts index 56b344923f..54b8507a67 100644 --- a/src/panels/config/automation/action/ha-automation-action-row.ts +++ b/src/panels/config/automation/action/ha-automation-action-row.ts @@ -258,14 +258,16 @@ export default class HaAutomationActionRow extends LitElement { ${type !== "condition" && (this.action as NonConditionAction).continue_on_error === true - ? html` - - ` + ? html` + + ${this.hass.localize( + "ui.panel.config.automation.editor.actions.continue_on_error" + )} + ` : nothing} ${!this.optionsInSidebar ? html` ` : html` + + ${computeStateName(entityState)} + + + ${this.hass.localize( "ui.panel.config.devices.cant_edit" )} - > - - ${computeStateName(entityState)} - - `; })} diff --git a/src/panels/config/devices/ha-config-devices-dashboard.ts b/src/panels/config/devices/ha-config-devices-dashboard.ts index 1cf4954052..c6e8d96988 100644 --- a/src/panels/config/devices/ha-config-devices-dashboard.ts +++ b/src/panels/config/devices/ha-config-devices-dashboard.ts @@ -671,13 +671,14 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) { tabindex="0" style="display:inline-block; position: relative;" > - + + ${this.hass.localize( "ui.panel.config.entities.picker.status.disabled" )} - > -
` diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts index e47984cd0a..80e308a3f0 100644 --- a/src/panels/config/entities/ha-config-entities.ts +++ b/src/panels/config/entities/ha-config-entities.ts @@ -114,6 +114,7 @@ import { isHelperDomain } from "../helpers/const"; import "../integrations/ha-integration-overflow-menu"; import { showAddIntegrationDialog } from "../integrations/show-add-integration-dialog"; import { showLabelDetailDialog } from "../labels/show-dialog-label-detail"; +import { slugify } from "../../../common/string/slugify"; export interface StateEntity extends Omit { @@ -392,9 +393,27 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) { tabindex="0" style="display:inline-block; position: relative;" > + + + ${entry.restored ? this.hass.localize( "ui.panel.config.entities.picker.status.not_provided" ) @@ -413,21 +432,6 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) { : this.hass.localize( "ui.panel.config.entities.picker.status.unmanageable" )} - > - ` diff --git a/src/panels/config/helpers/dialog-helper-detail.ts b/src/panels/config/helpers/dialog-helper-detail.ts index 679c5328b6..0b33f1e5c3 100644 --- a/src/panels/config/helpers/dialog-helper-detail.ts +++ b/src/panels/config/helpers/dialog-helper-detail.ts @@ -236,17 +236,18 @@ export class DialogHelperDetail extends LitElement { ${label} ${isLoaded ? html`` - : html` - - `} + : html` + + ${this.hass.localize( + "ui.dialogs.helper_settings.platform_not_loaded", + { platform: domain } + )} + `} `; })} diff --git a/src/panels/config/helpers/ha-config-helpers.ts b/src/panels/config/helpers/ha-config-helpers.ts index 2548e0d2aa..eeb1a4b9f6 100644 --- a/src/panels/config/helpers/ha-config-helpers.ts +++ b/src/panels/config/helpers/ha-config-helpers.ts @@ -110,6 +110,7 @@ import { renderConfigEntryError } from "../integrations/ha-config-integration-pa import { showLabelDetailDialog } from "../labels/show-dialog-label-detail"; import { isHelperDomain } from "./const"; import { showHelperDetailDialog } from "./show-dialog-helper-detail"; +import { slugify } from "../../../common/string/slugify"; interface HelperItem { id: string; @@ -361,13 +362,16 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) { tabindex="0" style="display:inline-block; position: relative;" > + ${this.hass.localize( "ui.panel.config.entities.picker.status.unmanageable" )} - > - ` diff --git a/src/panels/config/integrations/ha-integration-card.ts b/src/panels/config/integrations/ha-integration-card.ts index 92363e8100..90e63b045a 100644 --- a/src/panels/config/integrations/ha-integration-card.ts +++ b/src/panels/config/integrations/ha-integration-card.ts @@ -159,29 +159,32 @@ export class HaIntegrationCard extends LitElement { ? "overwrites" : "custom"}" > + + ${this.hass.localize( this.manifest.overwrites_built_in ? "ui.panel.config.integrations.config_entry.custom_overwrites_core" : "ui.panel.config.integrations.config_entry.custom_integration" )} - > - ` : nothing} ${this.manifest && this.manifest.iot_class?.startsWith("cloud_") ? html`
+ + ${this.hass.localize( "ui.panel.config.integrations.config_entry.depends_on_cloud" )} - > -
` : nothing} @@ -189,15 +192,18 @@ export class HaIntegrationCard extends LitElement { !this.manifest?.config_flow && !this.items.every((itm) => itm.source === "system") ? html`
+ + ${this.hass.localize( "ui.panel.config.integrations.config_entry.no_config_flow" )} - > - +
` : nothing} diff --git a/src/panels/config/integrations/ha-integration-list-item.ts b/src/panels/config/integrations/ha-integration-list-item.ts index b7275412c9..4e6458444e 100644 --- a/src/panels/config/integrations/ha-integration-list-item.ts +++ b/src/panels/config/integrations/ha-integration-list-item.ts @@ -74,45 +74,45 @@ export class HaIntegrationListItem extends ListItemBase { } return html` ${this.integration.cloud - ? html`` + ? html` + ${this.hass.localize( + "ui.panel.config.integrations.config_entry.depends_on_cloud" + )} + ` : nothing} ${!this.integration.is_built_in ? html` + + ${this.hass.localize( this.integration.overwrites_built_in ? "ui.panel.config.integrations.config_entry.custom_overwrites_core" : "ui.panel.config.integrations.config_entry.custom_integration" - )} - >` + )}
` : nothing} ${!this.integration.config_flow && !this.integration.integrations && !this.integration.iot_standards - ? html` - - ` + + ${this.hass.localize( + "ui.panel.config.integrations.config_entry.yaml_only" + )} + ` : html``} `; } diff --git a/src/panels/config/integrations/integration-panels/zha/dialog-zha-reconfigure-device.ts b/src/panels/config/integrations/integration-panels/zha/dialog-zha-reconfigure-device.ts index a5c32617d1..8ff08ce5c2 100644 --- a/src/panels/config/integrations/integration-panels/zha/dialog-zha-reconfigure-device.ts +++ b/src/panels/config/integrations/integration-panels/zha/dialog-zha-reconfigure-device.ts @@ -307,14 +307,18 @@ class DialogZHAReconfigureDevice extends LitElement { ` : html` + - + ${attribute.status} `} diff --git a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts index 1098f25570..5199a338c6 100644 --- a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts +++ b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts @@ -156,16 +156,18 @@ export class HaConfigLovelaceDashboards extends LitElement { ${dashboard.title} ${dashboard.default ? html` + - + ${this.hass.localize( + `ui.panel.config.lovelace.dashboards.default_dashboard` + )} ` : nothing} diff --git a/src/panels/config/scene/ha-scene-dashboard.ts b/src/panels/config/scene/ha-scene-dashboard.ts index 8390a2891c..2413337a1c 100644 --- a/src/panels/config/scene/ha-scene-dashboard.ts +++ b/src/panels/config/scene/ha-scene-dashboard.ts @@ -106,6 +106,7 @@ import { showAssignCategoryDialog } from "../category/show-dialog-assign-categor import { showCategoryRegistryDetailDialog } from "../category/show-dialog-category-registry-detail"; import { configSections } from "../ha-panel-config"; import { showLabelDetailDialog } from "../labels/show-dialog-label-detail"; +import { slugify } from "../../../common/string/slugify"; type SceneItem = SceneEntity & { name: string; @@ -318,16 +319,18 @@ class HaSceneDashboard extends SubscribeMixin(LitElement) { template: (scene) => !scene.attributes.id ? html` + + ${this.hass.localize( "ui.panel.config.scene.picker.only_editable" )} - > - ` : nothing, diff --git a/src/panels/config/voice-assistants/expose/expose-assistant-icon.ts b/src/panels/config/voice-assistants/expose/expose-assistant-icon.ts index 4eb905b9ea..a75d24fc9b 100644 --- a/src/panels/config/voice-assistants/expose/expose-assistant-icon.ts +++ b/src/panels/config/voice-assistants/expose/expose-assistant-icon.ts @@ -25,48 +25,47 @@ export class VoiceAssistantExposeAssistantIcon extends LitElement { if (!this.assistant || !voiceAssistants[this.assistant]) return nothing; return html` +
+ + ${this.unsupported + ? html` + + ` + : nothing} +
-
- - ${this.unsupported - ? html` - - ` - : nothing} -
- - ${this.unsupported - ? this.hass.localize( - "ui.panel.config.voice_assistants.expose.not_supported" - ) - : ""} - ${this.unsupported && this.manual ? html`
` : nothing} - ${this.manual - ? this.hass.localize( - "ui.panel.config.voice_assistants.expose.manually_configured" - ) - : nothing} -
+ ${this.unsupported + ? this.hass.localize( + "ui.panel.config.voice_assistants.expose.not_supported" + ) + : ""} + ${this.unsupported && this.manual ? html`
` : nothing} + ${this.manual + ? this.hass.localize( + "ui.panel.config.voice_assistants.expose.manually_configured" + ) + : nothing}
`; } diff --git a/src/panels/config/voice-assistants/ha-config-voice-assistants-expose.ts b/src/panels/config/voice-assistants/ha-config-voice-assistants-expose.ts index 758bdd8cd2..5522fefae0 100644 --- a/src/panels/config/voice-assistants/ha-config-voice-assistants-expose.ts +++ b/src/panels/config/voice-assistants/ha-config-voice-assistants-expose.ts @@ -607,34 +607,32 @@ export class VoiceAssistantsExpose extends LitElement { > ` : html` - + + ${this.hass.localize( "ui.panel.config.voice_assistants.expose.expose" )} - placement="left" - > - - + ${this.hass.localize( "ui.panel.config.voice_assistants.expose.unexpose" )} - placement="left" - > - + `} ` diff --git a/src/panels/config/zone/ha-config-zone.ts b/src/panels/config/zone/ha-config-zone.ts index 0ad2967aa2..3c40c9b42a 100644 --- a/src/panels/config/zone/ha-config-zone.ts +++ b/src/panels/config/zone/ha-config-zone.ts @@ -46,6 +46,7 @@ import "../ha-config-section"; import { configSections } from "../ha-panel-config"; import { showHomeZoneDetailDialog } from "./show-dialog-home-zone-detail"; import { showZoneDetailDialog } from "./show-dialog-zone-detail"; +import { slugify } from "../../../common/string/slugify"; @customElement("ha-config-zone") export class HaConfigZone extends SubscribeMixin(LitElement) { @@ -200,17 +201,8 @@ export class HaConfigZone extends SubscribeMixin(LitElement) { stateObject.entity_id === "zone.home" && !this._canEditCore ? nothing - : html` - - `} + + ${hass.localize( + "ui.panel.config.zone.configured_in_yaml" + )} + `} ` )} diff --git a/src/panels/lovelace/cards/energy/hui-energy-carbon-consumed-gauge-card.ts b/src/panels/lovelace/cards/energy/hui-energy-carbon-consumed-gauge-card.ts index a3aa11576d..a96abf0197 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-carbon-consumed-gauge-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-carbon-consumed-gauge-card.ts @@ -133,14 +133,12 @@ class HuiEnergyCarbonGaugeCard "--gauge-color": this._computeSeverity(value), })} > - + + ${this.hass.localize( "ui.panel.lovelace.cards.energy.carbon_consumed_gauge.card_indicates_energy_used" )} - placement="left" - hoist - > -
${this.hass.localize( diff --git a/src/panels/lovelace/cards/energy/hui-energy-grid-neutrality-gauge-card.ts b/src/panels/lovelace/cards/energy/hui-energy-grid-neutrality-gauge-card.ts index 05e1b1ced5..0feee94348 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-grid-neutrality-gauge-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-grid-neutrality-gauge-card.ts @@ -114,17 +114,15 @@ class HuiEnergyGridGaugeCard label="kWh" needle > - - - ${this.hass.localize( - "ui.panel.lovelace.cards.energy.grid_neutrality_gauge.energy_dependency" - )} -

- ${this.hass.localize( - "ui.panel.lovelace.cards.energy.grid_neutrality_gauge.color_explain" - )} -
- + + + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.grid_neutrality_gauge.energy_dependency" + )} +

+ ${this.hass.localize( + "ui.panel.lovelace.cards.energy.grid_neutrality_gauge.color_explain" + )}
${returnedToGrid! >= consumedFromGrid! diff --git a/src/panels/lovelace/cards/energy/hui-energy-self-sufficiency-gauge-card.ts b/src/panels/lovelace/cards/energy/hui-energy-self-sufficiency-gauge-card.ts index d440d69ed6..4f79cebec2 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-self-sufficiency-gauge-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-self-sufficiency-gauge-card.ts @@ -110,14 +110,11 @@ class HuiEnergySelfSufficiencyGaugeCard "--gauge-color": this._computeSeverity(value), })} > - + + ${this.hass.localize( "ui.panel.lovelace.cards.energy.self_sufficiency_gauge.card_indicates_self_sufficiency_quota" )} - hoist - > -
${this.hass.localize( diff --git a/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts b/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts index 2e97cf33d8..c232ad9d00 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-solar-consumed-gauge-card.ts @@ -102,17 +102,15 @@ class HuiEnergySolarGaugeCard "--gauge-color": this._computeSeverity(value), })} > - - - ${this.hass.localize( - "ui.panel.lovelace.cards.energy.solar_consumed_gauge.card_indicates_solar_energy_used" - )} -

- ${this.hass.localize( - "ui.panel.lovelace.cards.energy.solar_consumed_gauge.card_indicates_solar_energy_used_charge_home_bat" - )} -
- + + + ${this.hass.localize( + "ui.panel.lovelace.cards.energy.solar_consumed_gauge.card_indicates_solar_energy_used" + )} +

+ ${this.hass.localize( + "ui.panel.lovelace.cards.energy.solar_consumed_gauge.card_indicates_solar_energy_used_charge_home_bat" + )}
${this.hass.localize( @@ -176,10 +174,6 @@ class HuiEnergySolarGaugeCard top: 4px; color: var(--secondary-text-color); } - - ha-tooltip::part(base__popup) { - margin-top: 4px; - } `; } diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index 343b5e97de..54462cbd7a 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -47,6 +47,7 @@ import "../../components/ha-menu-button"; import "../../components/ha-svg-icon"; import "../../components/ha-tab-group"; import "../../components/ha-tab-group-tab"; +import "../../components/ha-tooltip"; import { createAreaRegistryEntry } from "../../data/area_registry"; import type { LovelacePanelConfig } from "../../data/lovelace"; import type { LovelaceConfig } from "../../data/lovelace/config/types"; @@ -307,7 +308,7 @@ class HUIRoot extends LitElement { (i) => i.visible && (!i.overflow || overflowCanPromote) ); - buttonItems.forEach((item) => { + buttonItems.forEach((item, index) => { const label = [this.hass!.localize(item.key), item.suffix].join(" "); const button = item.subItems ? html` @@ -341,11 +342,14 @@ class HUIRoot extends LitElement { ` : html` - - + + + ${label} `; result.push(button); diff --git a/yarn.lock b/yarn.lock index 5210feaa39..fb05f3670e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1644,7 +1644,7 @@ __metadata: languageName: node linkType: hard -"@floating-ui/dom@npm:^1.6.12, @floating-ui/dom@npm:^1.6.13": +"@floating-ui/dom@npm:^1.6.13": version: 1.7.3 resolution: "@floating-ui/dom@npm:1.7.3" dependencies: @@ -1905,9 +1905,9 @@ __metadata: languageName: node linkType: hard -"@home-assistant/webawesome@npm:3.0.0-beta.4.ha.2": - version: 3.0.0-beta.4.ha.2 - resolution: "@home-assistant/webawesome@npm:3.0.0-beta.4.ha.2" +"@home-assistant/webawesome@npm:3.0.0-beta.4.ha.3": + version: 3.0.0-beta.4.ha.3 + resolution: "@home-assistant/webawesome@npm:3.0.0-beta.4.ha.3" dependencies: "@ctrl/tinycolor": "npm:^4.1.0" "@floating-ui/dom": "npm:^1.6.13" @@ -1919,7 +1919,7 @@ __metadata: nanoid: "npm:^5.1.5" qr-creator: "npm:^1.0.0" style-observer: "npm:^0.0.7" - checksum: 10/0ac66d43050571e2b86bb7b0181d428aa2a064e25745075b207a8fe96d873398eaead663172130dfe8d9ac0be575028f8f9f6b9f8a9cd12f81c8c82e9f60a0e9 + checksum: 10/b9241821ed471ccbad86b0ea4697a2d41395f05fdc26f46e5edbc7f6b5eeab5d248251ef702326312ded00d5bf850ce0dcdcf7cd5e2e542b9d9cb9a84f3726da languageName: node linkType: hard @@ -2326,7 +2326,7 @@ __metadata: languageName: node linkType: hard -"@lit/react@npm:^1.0.6, @lit/react@npm:^1.0.8": +"@lit/react@npm:^1.0.8": version: 1.0.8 resolution: "@lit/react@npm:1.0.8" peerDependencies: @@ -4170,22 +4170,6 @@ __metadata: languageName: node linkType: hard -"@shoelace-style/shoelace@npm:2.20.1": - version: 2.20.1 - resolution: "@shoelace-style/shoelace@npm:2.20.1" - dependencies: - "@ctrl/tinycolor": "npm:^4.1.0" - "@floating-ui/dom": "npm:^1.6.12" - "@lit/react": "npm:^1.0.6" - "@shoelace-style/animations": "npm:^1.2.0" - "@shoelace-style/localize": "npm:^3.2.1" - composed-offset-position: "npm:^0.0.6" - lit: "npm:^3.2.1" - qr-creator: "npm:^1.0.0" - checksum: 10/c3aabeac03d5fd5bc43799783562ab09c92bae98efbc43a931c7dcec608acc393771b6ed0da3f29e08570bb9d9a9e3bff7637cbf6f79ba7aa439f6641da4eb7c - languageName: node - linkType: hard - "@sindresorhus/merge-streams@npm:^2.1.0": version: 2.3.0 resolution: "@sindresorhus/merge-streams@npm:2.3.0" @@ -9334,7 +9318,7 @@ __metadata: "@fullcalendar/list": "npm:6.1.19" "@fullcalendar/luxon3": "npm:6.1.19" "@fullcalendar/timegrid": "npm:6.1.19" - "@home-assistant/webawesome": "npm:3.0.0-beta.4.ha.2" + "@home-assistant/webawesome": "npm:3.0.0-beta.4.ha.3" "@lezer/highlight": "npm:1.2.1" "@lit-labs/motion": "npm:1.0.9" "@lit-labs/observers": "npm:2.0.6" @@ -9374,7 +9358,6 @@ __metadata: "@rsdoctor/rspack-plugin": "npm:1.2.3" "@rspack/core": "npm:1.5.2" "@rspack/dev-server": "npm:1.1.4" - "@shoelace-style/shoelace": "npm:2.20.1" "@swc/helpers": "npm:0.5.17" "@thomasloven/round-slider": "npm:0.6.0" "@tsparticles/engine": "npm:3.9.1"