Remove animation delay from paper tooltip (#6716)

This commit is contained in:
Bram Kragten 2020-08-30 10:03:04 +02:00 committed by GitHub
parent 78a1e45be2
commit 41195dcef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 73 additions and 77 deletions

View File

@ -14,15 +14,14 @@ import {
mdiPound, mdiPound,
mdiShield, mdiShield,
} from "@mdi/js"; } from "@mdi/js";
import "@polymer/paper-tooltip/paper-tooltip";
import { import {
css, css,
CSSResult, CSSResult,
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
import { classMap } from "lit-html/directives/class-map"; import { classMap } from "lit-html/directives/class-map";
@ -34,6 +33,7 @@ import "../../../../src/components/buttons/ha-progress-button";
import "../../../../src/components/ha-card"; import "../../../../src/components/ha-card";
import "../../../../src/components/ha-label-badge"; import "../../../../src/components/ha-label-badge";
import "../../../../src/components/ha-markdown"; import "../../../../src/components/ha-markdown";
import "../../../../src/components/ha-settings-row";
import "../../../../src/components/ha-svg-icon"; import "../../../../src/components/ha-svg-icon";
import "../../../../src/components/ha-switch"; import "../../../../src/components/ha-switch";
import { import {
@ -52,7 +52,6 @@ import { HomeAssistant } from "../../../../src/types";
import "../../components/hassio-card-content"; import "../../components/hassio-card-content";
import { showHassioMarkdownDialog } from "../../dialogs/markdown/show-dialog-hassio-markdown"; import { showHassioMarkdownDialog } from "../../dialogs/markdown/show-dialog-hassio-markdown";
import { hassioStyle } from "../../resources/hassio-style"; import { hassioStyle } from "../../resources/hassio-style";
import "../../../../src/components/ha-settings-row";
const STAGE_ICON = { const STAGE_ICON = {
stable: mdiCheckCircle, stable: mdiCheckCircle,

View File

@ -1,21 +1,22 @@
import "@material/mwc-button"; import "@material/mwc-button";
import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable";
import "../../components/ha-icon-button";
import "../../components/ha-circular-progress";
import "@polymer/paper-tooltip/paper-tooltip";
import type { UnsubscribeFunc } from "home-assistant-js-websocket"; import type { UnsubscribeFunc } from "home-assistant-js-websocket";
import { import {
css, css,
CSSResultArray, CSSResultArray,
customElement, customElement,
html, html,
LitElement,
internalProperty, internalProperty,
LitElement,
PropertyValues, PropertyValues,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
import { fireEvent } from "../../common/dom/fire_event";
import { computeRTL } from "../../common/util/compute_rtl";
import "../../components/ha-circular-progress";
import "../../components/ha-dialog"; import "../../components/ha-dialog";
import "../../components/ha-form/ha-form"; import "../../components/ha-form/ha-form";
import "../../components/ha-icon-button";
import "../../components/ha-markdown"; import "../../components/ha-markdown";
import { import {
AreaRegistryEntry, AreaRegistryEntry,
@ -35,8 +36,6 @@ import "./step-flow-external";
import "./step-flow-form"; import "./step-flow-form";
import "./step-flow-loading"; import "./step-flow-loading";
import "./step-flow-pick-handler"; import "./step-flow-pick-handler";
import { fireEvent } from "../../common/dom/fire_event";
import { computeRTL } from "../../common/util/compute_rtl";
let instance = 0; let instance = 0;

View File

@ -1,5 +1,4 @@
import "@material/mwc-button"; import "@material/mwc-button";
import "../../components/ha-circular-progress";
import "@polymer/paper-tooltip/paper-tooltip"; import "@polymer/paper-tooltip/paper-tooltip";
import { import {
css, css,
@ -12,6 +11,7 @@ import {
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
import { fireEvent } from "../../common/dom/fire_event"; import { fireEvent } from "../../common/dom/fire_event";
import "../../components/ha-circular-progress";
import "../../components/ha-form/ha-form"; import "../../components/ha-form/ha-form";
import type { HaFormSchema } from "../../components/ha-form/ha-form"; import type { HaFormSchema } from "../../components/ha-form/ha-form";
import "../../components/ha-markdown"; import "../../components/ha-markdown";
@ -91,7 +91,7 @@ class StepFlowForm extends LitElement {
${!allRequiredInfoFilledIn ${!allRequiredInfoFilledIn
? html` ? html`
<paper-tooltip position="left" <paper-tooltip animation-delay="0" position="left"
>${this.hass.localize( >${this.hass.localize(
"ui.panel.config.integrations.config_flow.not_all_required_fields" "ui.panel.config.integrations.config_flow.not_all_required_fields"
)} )}

View File

@ -43,12 +43,9 @@ export class HuiPersistentNotificationItem extends LitElement {
.hass=${this.hass} .hass=${this.hass}
.datetime="${this.notification.created_at}" .datetime="${this.notification.created_at}"
></ha-relative-time> ></ha-relative-time>
<paper-tooltip <paper-tooltip animation-delay="0">
>${this._computeTooltip( ${this._computeTooltip(this.hass, this.notification)}
this.hass, </paper-tooltip>
this.notification
)}</paper-tooltip
>
</span> </span>
</div> </div>

View File

@ -11,6 +11,7 @@ import {
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
import { navigate } from "../common/navigate"; import { navigate } from "../common/navigate";
import { computeRTLDirection } from "../common/util/compute_rtl";
import "../components/data-table/ha-data-table"; import "../components/data-table/ha-data-table";
import type { import type {
DataTableColumnContainer, DataTableColumnContainer,
@ -20,7 +21,6 @@ import type {
import type { HomeAssistant, Route } from "../types"; import type { HomeAssistant, Route } from "../types";
import "./hass-tabs-subpage"; import "./hass-tabs-subpage";
import type { PageNavigation } from "./hass-tabs-subpage"; import type { PageNavigation } from "./hass-tabs-subpage";
import { computeRTLDirection } from "../common/util/compute_rtl";
@customElement("hass-tabs-subpage-data-table") @customElement("hass-tabs-subpage-data-table")
export class HaTabsSubpageDataTable extends LitElement { export class HaTabsSubpageDataTable extends LitElement {
@ -136,7 +136,7 @@ export class HaTabsSubpageDataTable extends LitElement {
? html`<div class="active-filters"> ? html`<div class="active-filters">
<div> <div>
<ha-icon icon="hass:filter-variant"></ha-icon> <ha-icon icon="hass:filter-variant"></ha-icon>
<paper-tooltip position="left"> <paper-tooltip animation-delay="0" position="left">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.filtering.filtering_by" "ui.panel.config.filtering.filtering_by"
)} )}

View File

@ -4,9 +4,9 @@ import {
CSSResult, CSSResult,
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
import { ifDefined } from "lit-html/directives/if-defined"; import { ifDefined } from "lit-html/directives/if-defined";
@ -175,8 +175,8 @@ class HaConfigAreaPage extends LitElement {
</a> </a>
${!state.attributes.id ${!state.attributes.id
? html` ? html`
<paper-tooltip <paper-tooltip animation-delay="0">
>${this.hass.localize( ${this.hass.localize(
"ui.panel.config.devices.cant_edit" "ui.panel.config.devices.cant_edit"
)} )}
</paper-tooltip> </paper-tooltip>
@ -228,8 +228,8 @@ class HaConfigAreaPage extends LitElement {
</a> </a>
${!state.attributes.id ${!state.attributes.id
? html` ? html`
<paper-tooltip <paper-tooltip animation-delay="0">
>${this.hass.localize( ${this.hass.localize(
"ui.panel.config.devices.cant_edit" "ui.panel.config.devices.cant_edit"
)} )}
</paper-tooltip> </paper-tooltip>

View File

@ -1,12 +1,13 @@
import "../../../components/ha-icon-button"; import "@material/mwc-fab";
import { mdiPlus } from "@mdi/js";
import "@polymer/paper-tooltip/paper-tooltip"; import "@polymer/paper-tooltip/paper-tooltip";
import { import {
CSSResult,
customElement, customElement,
html, html,
LitElement, LitElement,
property, property,
TemplateResult, TemplateResult,
CSSResult,
} from "lit-element"; } from "lit-element";
import { ifDefined } from "lit-html/directives/if-defined"; import { ifDefined } from "lit-html/directives/if-defined";
import memoizeOne from "memoize-one"; import memoizeOne from "memoize-one";
@ -16,7 +17,8 @@ import { fireEvent } from "../../../common/dom/fire_event";
import { computeStateName } from "../../../common/entity/compute_state_name"; import { computeStateName } from "../../../common/entity/compute_state_name";
import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table";
import "../../../components/entity/ha-entity-toggle"; import "../../../components/entity/ha-entity-toggle";
import "@material/mwc-fab"; import "../../../components/ha-icon-button";
import "../../../components/ha-svg-icon";
import { import {
AutomationConfig, AutomationConfig,
AutomationEntity, AutomationEntity,
@ -28,8 +30,6 @@ import { haStyle } from "../../../resources/styles";
import { HomeAssistant, Route } from "../../../types"; import { HomeAssistant, Route } from "../../../types";
import { configSections } from "../ha-panel-config"; import { configSections } from "../ha-panel-config";
import { showThingtalkDialog } from "./show-dialog-thingtalk"; import { showThingtalkDialog } from "./show-dialog-thingtalk";
import "../../../components/ha-svg-icon";
import { mdiPlus } from "@mdi/js";
@customElement("ha-automation-picker") @customElement("ha-automation-picker")
class HaAutomationPicker extends LitElement { class HaAutomationPicker extends LitElement {
@ -138,7 +138,7 @@ class HaAutomationPicker extends LitElement {
</a> </a>
${!automation.attributes.id ${!automation.attributes.id
? html` ? html`
<paper-tooltip position="left"> <paper-tooltip animation-delay="0" position="left">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.automation.picker.only_editable" "ui.panel.config.automation.picker.only_editable"
)} )}

View File

@ -4,9 +4,9 @@ import {
CSSResult, CSSResult,
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
import { ifDefined } from "lit-html/directives/if-defined"; import { ifDefined } from "lit-html/directives/if-defined";
@ -14,6 +14,7 @@ import memoizeOne from "memoize-one";
import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import { computeStateName } from "../../../common/entity/compute_state_name"; import { computeStateName } from "../../../common/entity/compute_state_name";
import { compare } from "../../../common/string/compare"; import { compare } from "../../../common/string/compare";
import { slugify } from "../../../common/string/slugify";
import "../../../components/entity/ha-battery-icon"; import "../../../components/entity/ha-battery-icon";
import "../../../components/ha-icon-next"; import "../../../components/ha-icon-next";
import { AreaRegistryEntry } from "../../../data/area_registry"; import { AreaRegistryEntry } from "../../../data/area_registry";
@ -25,8 +26,8 @@ import {
} from "../../../data/device_registry"; } from "../../../data/device_registry";
import { import {
EntityRegistryEntry, EntityRegistryEntry,
findBatteryEntity,
findBatteryChargingEntity, findBatteryChargingEntity,
findBatteryEntity,
updateEntityRegistryEntry, updateEntityRegistryEntry,
} from "../../../data/entity_registry"; } from "../../../data/entity_registry";
import { SceneEntities, showSceneEditor } from "../../../data/scene"; import { SceneEntities, showSceneEditor } from "../../../data/scene";
@ -35,6 +36,7 @@ import {
loadDeviceRegistryDetailDialog, loadDeviceRegistryDetailDialog,
showDeviceRegistryDetailDialog, showDeviceRegistryDetailDialog,
} from "../../../dialogs/device-registry-detail/show-dialog-device-registry-detail"; } from "../../../dialogs/device-registry-detail/show-dialog-device-registry-detail";
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
import "../../../layouts/hass-error-screen"; import "../../../layouts/hass-error-screen";
import "../../../layouts/hass-tabs-subpage"; import "../../../layouts/hass-tabs-subpage";
import { HomeAssistant, Route } from "../../../types"; import { HomeAssistant, Route } from "../../../types";
@ -43,8 +45,6 @@ import { configSections } from "../ha-panel-config";
import "./device-detail/ha-device-entities-card"; import "./device-detail/ha-device-entities-card";
import "./device-detail/ha-device-info-card"; import "./device-detail/ha-device-info-card";
import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation"; import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation";
import { slugify } from "../../../common/string/slugify";
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
export interface EntityRegistryStateEntry extends EntityRegistryEntry { export interface EntityRegistryStateEntry extends EntityRegistryEntry {
stateName?: string | null; stateName?: string | null;
@ -296,8 +296,8 @@ export class HaConfigDevicePage extends LitElement {
</a> </a>
${!state.attributes.id ${!state.attributes.id
? html` ? html`
<paper-tooltip <paper-tooltip animation-delay="0">
>${this.hass.localize( ${this.hass.localize(
"ui.panel.config.devices.cant_edit" "ui.panel.config.devices.cant_edit"
)} )}
</paper-tooltip> </paper-tooltip>
@ -369,7 +369,9 @@ export class HaConfigDevicePage extends LitElement {
${!state.attributes.id ${!state.attributes.id
? html` ? html`
<paper-tooltip <paper-tooltip
>${this.hass.localize( animation-delay="0"
>
${this.hass.localize(
"ui.panel.config.devices.cant_edit" "ui.panel.config.devices.cant_edit"
)} )}
</paper-tooltip> </paper-tooltip>

View File

@ -1,4 +1,6 @@
import "@material/mwc-list/mwc-list-item"; import "@material/mwc-list/mwc-list-item";
import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item";
import { mdiFilterVariant } from "@mdi/js";
import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-checkbox/paper-checkbox";
import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu";
import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-icon-item";
@ -10,9 +12,9 @@ import {
CSSResult, CSSResult,
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
query, query,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
@ -56,8 +58,6 @@ import {
loadEntityEditorDialog, loadEntityEditorDialog,
showEntityEditorDialog, showEntityEditorDialog,
} from "./show-dialog-entity-editor"; } from "./show-dialog-entity-editor";
import { mdiFilterVariant } from "@mdi/js";
import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item";
export interface StateEntity extends EntityRegistryEntry { export interface StateEntity extends EntityRegistryEntry {
readonly?: boolean; readonly?: boolean;
@ -192,7 +192,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
? "hass:cancel" ? "hass:cancel"
: "hass:pencil-off"} : "hass:pencil-off"}
></ha-icon> ></ha-icon>
<paper-tooltip position="left"> <paper-tooltip animation-delay="0" position="left">
${entity.restored ${entity.restored
? this.hass.localize( ? this.hass.localize(
"ui.panel.config.entities.picker.status.restored" "ui.panel.config.entities.picker.status.restored"
@ -390,7 +390,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
icon="hass:undo" icon="hass:undo"
@click=${this._enableSelected} @click=${this._enableSelected}
></ha-icon-button> ></ha-icon-button>
<paper-tooltip for="enable-btn"> <paper-tooltip animation-delay="0" for="enable-btn">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.entities.picker.enable_selected.button" "ui.panel.config.entities.picker.enable_selected.button"
)} )}
@ -400,7 +400,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
icon="hass:cancel" icon="hass:cancel"
@click=${this._disableSelected} @click=${this._disableSelected}
></ha-icon-button> ></ha-icon-button>
<paper-tooltip for="disable-btn"> <paper-tooltip animation-delay="0" for="disable-btn">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.entities.picker.disable_selected.button" "ui.panel.config.entities.picker.disable_selected.button"
)} )}
@ -410,7 +410,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
icon="hass:delete" icon="hass:delete"
@click=${this._removeSelected} @click=${this._removeSelected}
></ha-icon-button> ></ha-icon-button>
<paper-tooltip for="remove-btn"> <paper-tooltip animation-delay="0" for="remove-btn">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.entities.picker.remove_selected.button" "ui.panel.config.entities.picker.remove_selected.button"
)} )}
@ -433,7 +433,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
${this.narrow ${this.narrow
? html` <div> ? html` <div>
<ha-icon icon="hass:filter-variant"></ha-icon> <ha-icon icon="hass:filter-variant"></ha-icon>
<paper-tooltip position="left"> <paper-tooltip animation-delay="0" position="left">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.filtering.filtering_by" "ui.panel.config.filtering.filtering_by"
)} )}

View File

@ -6,9 +6,9 @@ import {
CSSResult, CSSResult,
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
query, query,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
@ -136,7 +136,7 @@ export class DialogHelperDetail extends LitElement {
</paper-icon-item> </paper-icon-item>
${!isLoaded ${!isLoaded
? html` ? html`
<paper-tooltip <paper-tooltip animation-delay="0"
>${this.hass.localize( >${this.hass.localize(
"ui.dialogs.helper_settings.platform_not_loaded", "ui.dialogs.helper_settings.platform_not_loaded",
"platform", "platform",

View File

@ -1,3 +1,5 @@
import "@material/mwc-fab";
import { mdiPlus } from "@mdi/js";
import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-checkbox/paper-checkbox";
import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu";
import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-icon-item";
@ -7,9 +9,9 @@ import { HassEntity } from "home-assistant-js-websocket";
import { import {
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
PropertyValues, PropertyValues,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
@ -21,8 +23,8 @@ import {
DataTableColumnContainer, DataTableColumnContainer,
RowClickedEvent, RowClickedEvent,
} from "../../../components/data-table/ha-data-table"; } from "../../../components/data-table/ha-data-table";
import "@material/mwc-fab";
import "../../../components/ha-icon"; import "../../../components/ha-icon";
import "../../../components/ha-svg-icon";
import "../../../layouts/hass-loading-screen"; import "../../../layouts/hass-loading-screen";
import "../../../layouts/hass-tabs-subpage-data-table"; import "../../../layouts/hass-tabs-subpage-data-table";
import { HomeAssistant, Route } from "../../../types"; import { HomeAssistant, Route } from "../../../types";
@ -30,8 +32,6 @@ import { showEntityEditorDialog } from "../entities/show-dialog-entity-editor";
import { configSections } from "../ha-panel-config"; import { configSections } from "../ha-panel-config";
import { HELPER_DOMAINS } from "./const"; import { HELPER_DOMAINS } from "./const";
import { showHelperDetailDialog } from "./show-dialog-helper-detail"; import { showHelperDetailDialog } from "./show-dialog-helper-detail";
import "../../../components/ha-svg-icon";
import { mdiPlus } from "@mdi/js";
@customElement("ha-config-helpers") @customElement("ha-config-helpers")
export class HaConfigHelpers extends LitElement { export class HaConfigHelpers extends LitElement {
@ -110,7 +110,7 @@ export class HaConfigHelpers extends LitElement {
style="display:inline-block; position: relative;" style="display:inline-block; position: relative;"
> >
<ha-icon icon="hass:pencil-off"></ha-icon> <ha-icon icon="hass:pencil-off"></ha-icon>
<paper-tooltip position="left"> <paper-tooltip animation-delay="0" position="left">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.entities.picker.status.readonly" "ui.panel.config.entities.picker.status.readonly"
)} )}

View File

@ -1,11 +1,12 @@
import "@material/mwc-fab"; import "@material/mwc-fab";
import { mdiPlus } from "@mdi/js";
import "@polymer/paper-tooltip/paper-tooltip"; import "@polymer/paper-tooltip/paper-tooltip";
import { import {
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
PropertyValues, PropertyValues,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
@ -18,6 +19,7 @@ import {
} from "../../../../components/data-table/ha-data-table"; } from "../../../../components/data-table/ha-data-table";
import "../../../../components/ha-icon"; import "../../../../components/ha-icon";
import "../../../../components/ha-icon-button"; import "../../../../components/ha-icon-button";
import "../../../../components/ha-svg-icon";
import { import {
createDashboard, createDashboard,
deleteDashboard, deleteDashboard,
@ -33,8 +35,6 @@ import "../../../../layouts/hass-tabs-subpage-data-table";
import { HomeAssistant, Route } from "../../../../types"; import { HomeAssistant, Route } from "../../../../types";
import { lovelaceTabs } from "../ha-config-lovelace"; import { lovelaceTabs } from "../ha-config-lovelace";
import { showDashboardDetailDialog } from "./show-dialog-lovelace-dashboard-detail"; import { showDashboardDetailDialog } from "./show-dialog-lovelace-dashboard-detail";
import "../../../../components/ha-svg-icon";
import { mdiPlus } from "@mdi/js";
@customElement("ha-config-lovelace-dashboards") @customElement("ha-config-lovelace-dashboards")
export class HaConfigLovelaceDashboards extends LitElement { export class HaConfigLovelaceDashboards extends LitElement {
@ -76,7 +76,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
style="padding-left: 10px;" style="padding-left: 10px;"
icon="hass:check-circle-outline" icon="hass:check-circle-outline"
></ha-icon> ></ha-icon>
<paper-tooltip> <paper-tooltip animation-delay="0">
${this.hass.localize( ${this.hass.localize(
`ui.panel.config.lovelace.dashboards.default_dashboard` `ui.panel.config.lovelace.dashboards.default_dashboard`
)} )}

View File

@ -1,15 +1,15 @@
import "@material/mwc-fab";
import { mdiPlus } from "@mdi/js";
import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-checkbox/paper-checkbox";
import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu";
import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-icon-item";
import "@polymer/paper-listbox/paper-listbox"; import "@polymer/paper-listbox/paper-listbox";
import "@polymer/paper-tooltip/paper-tooltip";
import "@material/mwc-fab";
import { import {
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
PropertyValues, PropertyValues,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
@ -20,6 +20,7 @@ import {
RowClickedEvent, RowClickedEvent,
} from "../../../../components/data-table/ha-data-table"; } from "../../../../components/data-table/ha-data-table";
import "../../../../components/ha-icon"; import "../../../../components/ha-icon";
import "../../../../components/ha-svg-icon";
import { import {
createResource, createResource,
deleteResource, deleteResource,
@ -37,8 +38,6 @@ import { HomeAssistant, Route } from "../../../../types";
import { loadLovelaceResources } from "../../../lovelace/common/load-resources"; import { loadLovelaceResources } from "../../../lovelace/common/load-resources";
import { lovelaceTabs } from "../ha-config-lovelace"; import { lovelaceTabs } from "../ha-config-lovelace";
import { showResourceDetailDialog } from "./show-dialog-lovelace-resource-detail"; import { showResourceDetailDialog } from "./show-dialog-lovelace-resource-detail";
import "../../../../components/ha-svg-icon";
import { mdiPlus } from "@mdi/js";
@customElement("ha-config-lovelace-resources") @customElement("ha-config-lovelace-resources")
export class HaConfigLovelaceRescources extends LitElement { export class HaConfigLovelaceRescources extends LitElement {

View File

@ -1,4 +1,5 @@
import "../../../components/ha-icon-button"; import "@material/mwc-fab";
import { mdiPlus } from "@mdi/js";
import "@polymer/paper-tooltip/paper-tooltip"; import "@polymer/paper-tooltip/paper-tooltip";
import { import {
css, css,
@ -13,8 +14,11 @@ import { ifDefined } from "lit-html/directives/if-defined";
import memoizeOne from "memoize-one"; import memoizeOne from "memoize-one";
import { fireEvent } from "../../../common/dom/fire_event"; import { fireEvent } from "../../../common/dom/fire_event";
import { computeStateName } from "../../../common/entity/compute_state_name"; import { computeStateName } from "../../../common/entity/compute_state_name";
import { stateIcon } from "../../../common/entity/state_icon";
import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table";
import "@material/mwc-fab"; import "../../../components/ha-icon";
import "../../../components/ha-icon-button";
import "../../../components/ha-svg-icon";
import { forwardHaptic } from "../../../data/haptics"; import { forwardHaptic } from "../../../data/haptics";
import { activateScene, SceneEntity } from "../../../data/scene"; import { activateScene, SceneEntity } from "../../../data/scene";
import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box";
@ -23,10 +27,6 @@ import { haStyle } from "../../../resources/styles";
import { HomeAssistant, Route } from "../../../types"; import { HomeAssistant, Route } from "../../../types";
import { showToast } from "../../../util/toast"; import { showToast } from "../../../util/toast";
import { configSections } from "../ha-panel-config"; import { configSections } from "../ha-panel-config";
import "../../../components/ha-icon";
import "../../../components/ha-svg-icon";
import { mdiPlus } from "@mdi/js";
import { stateIcon } from "../../../common/entity/state_icon";
@customElement("ha-scene-dashboard") @customElement("ha-scene-dashboard")
class HaSceneDashboard extends LitElement { class HaSceneDashboard extends LitElement {
@ -117,7 +117,7 @@ class HaSceneDashboard extends LitElement {
</a> </a>
${!scene.attributes.id ${!scene.attributes.id
? html` ? html`
<paper-tooltip position="left"> <paper-tooltip animation-delay="0" position="left">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.scene.picker.only_editable" "ui.panel.config.scene.picker.only_editable"
)} )}

View File

@ -139,7 +139,7 @@ class DialogUserDetail extends LitElement {
</mwc-button> </mwc-button>
${user.system_generated ${user.system_generated
? html` ? html`
<paper-tooltip position="right"> <paper-tooltip animation-delay="0" position="right">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.users.editor.system_generated_users_not_removable" "ui.panel.config.users.editor.system_generated_users_not_removable"
)} )}
@ -166,7 +166,7 @@ class DialogUserDetail extends LitElement {
</mwc-button> </mwc-button>
${user.system_generated ${user.system_generated
? html` ? html`
<paper-tooltip position="left"> <paper-tooltip animation-delay="0" position="left">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.users.editor.system_generated_users_not_editable" "ui.panel.config.users.editor.system_generated_users_not_editable"
)} )}

View File

@ -11,9 +11,9 @@ import {
CSSResult, CSSResult,
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
PropertyValues, PropertyValues,
query, query,
TemplateResult, TemplateResult,
@ -198,7 +198,7 @@ export class HaConfigZone extends SubscribeMixin(LitElement) {
: mdiPencilOff} : mdiPencilOff}
></ha-svg-icon> ></ha-svg-icon>
</mwc-icon-button> </mwc-icon-button>
<paper-tooltip position="left"> <paper-tooltip animation-delay="0" position="left">
${state.entity_id === "zone.home" ${state.entity_id === "zone.home"
? this.hass.localize( ? this.hass.localize(
`ui.panel.config.zone.${ `ui.panel.config.zone.${

View File

@ -1,17 +1,17 @@
import "../../components/ha-icon-button";
import "@polymer/paper-tooltip/paper-tooltip"; import "@polymer/paper-tooltip/paper-tooltip";
import { html } from "@polymer/polymer/lib/utils/html-tag"; import { html } from "@polymer/polymer/lib/utils/html-tag";
/* eslint-plugin-disable lit */ /* eslint-plugin-disable lit */
import { PolymerElement } from "@polymer/polymer/polymer-element"; import { PolymerElement } from "@polymer/polymer/polymer-element";
import { formatDateTime } from "../../common/datetime/format_date_time"; import { formatDateTime } from "../../common/datetime/format_date_time";
import "../../components/ha-card"; import "../../components/ha-card";
import { EventsMixin } from "../../mixins/events-mixin"; import "../../components/ha-icon-button";
import LocalizeMixin from "../../mixins/localize-mixin"; import "../../components/ha-settings-row";
import { import {
showAlertDialog, showAlertDialog,
showConfirmationDialog, showConfirmationDialog,
} from "../../dialogs/generic/show-dialog-box"; } from "../../dialogs/generic/show-dialog-box";
import "../../components/ha-settings-row"; import { EventsMixin } from "../../mixins/events-mixin";
import LocalizeMixin from "../../mixins/localize-mixin";
/* /*
* @appliesMixin EventsMixin * @appliesMixin EventsMixin
@ -39,7 +39,7 @@ class HaRefreshTokens extends LocalizeMixin(EventsMixin(PolymerElement)) {
<div slot="description">[[_formatLastUsed(item)]]</div> <div slot="description">[[_formatLastUsed(item)]]</div>
<div> <div>
<template is="dom-if" if="[[item.is_current]]"> <template is="dom-if" if="[[item.is_current]]">
<paper-tooltip position="left" <paper-tooltip animation-delay="0" position="left"
>[[localize('ui.panel.profile.refresh_tokens.current_token_tooltip')]]</paper-tooltip >[[localize('ui.panel.profile.refresh_tokens.current_token_tooltip')]]</paper-tooltip
> >
</template> </template>