diff --git a/build-scripts/webpack.js b/build-scripts/webpack.js index b7b11cc346..88534d44b1 100644 --- a/build-scripts/webpack.js +++ b/build-scripts/webpack.js @@ -117,7 +117,7 @@ const createWebpackConfig = ({ new webpack.NormalModuleReplacementPlugin( new RegExp( require.resolve( - "lit-virtualizer/lib/uni-virtualizer/lib/polyfillLoaders/EventTarget.js" + "@lit-labs/virtualizer/lib/uni-virtualizer/lib/polyfillLoaders/EventTarget.js" ) ), path.resolve(paths.polymer_dir, "src/resources/EventTarget-ponyfill.js") @@ -126,6 +126,10 @@ const createWebpackConfig = ({ ].filter(Boolean), resolve: { extensions: [".ts", ".js", ".json"], + alias: { + "lit/decorators$": "lit/decorators.js", + "lit/directive$": "lit/directive.js", + }, }, output: { filename: ({ chunk }) => { diff --git a/cast/src/launcher/layout/hc-cast.ts b/cast/src/launcher/layout/hc-cast.ts index fdb2b64432..1f349f6371 100644 --- a/cast/src/launcher/layout/hc-cast.ts +++ b/cast/src/launcher/layout/hc-cast.ts @@ -1,16 +1,9 @@ +import "@material/mwc-button/mwc-button"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; import { Auth, Connection } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { CastManager } from "../../../../src/cast/cast_manager"; import { castSendShowLovelaceView, @@ -32,7 +25,6 @@ import { import "../../../../src/layouts/hass-loading-screen"; import { generateDefaultViewConfig } from "../../../../src/panels/lovelace/common/generate-lovelace-config"; import "./hc-layout"; -import "@material/mwc-button/mwc-button"; @customElement("hc-cast") class HcCast extends LitElement { diff --git a/cast/src/launcher/layout/hc-connect.ts b/cast/src/launcher/layout/hc-connect.ts index c546e5bef5..dd87cbef64 100644 --- a/cast/src/launcher/layout/hc-connect.ts +++ b/cast/src/launcher/layout/hc-connect.ts @@ -11,15 +11,8 @@ import { getAuth, getAuthOptions, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - TemplateResult, - state, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { CastManager, getCastManager } from "../../../../src/cast/cast_manager"; import { castSendShowDemo } from "../../../../src/cast/receiver_messages"; import { diff --git a/cast/src/launcher/layout/hc-layout.ts b/cast/src/launcher/layout/hc-layout.ts index a505d926a2..0d0e8cdb0d 100644 --- a/cast/src/launcher/layout/hc-layout.ts +++ b/cast/src/launcher/layout/hc-layout.ts @@ -4,15 +4,8 @@ import { getUser, HassUser, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../src/components/ha-card"; @customElement("hc-layout") diff --git a/cast/src/receiver/layout/hc-demo.ts b/cast/src/receiver/layout/hc-demo.ts index 1929812157..763d6baa59 100644 --- a/cast/src/receiver/layout/hc-demo.ts +++ b/cast/src/receiver/layout/hc-demo.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - state, - property, - TemplateResult, -} from "lit-element"; +import { html, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { mockHistory } from "../../../../demo/src/stubs/history"; import { LovelaceConfig } from "../../../../src/data/lovelace"; import { diff --git a/cast/src/receiver/layout/hc-launch-screen.ts b/cast/src/receiver/layout/hc-launch-screen.ts index 53fe4476c2..a4d6aa5e4e 100644 --- a/cast/src/receiver/layout/hc-launch-screen.ts +++ b/cast/src/receiver/layout/hc-launch-screen.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { HomeAssistant } from "../../../../src/types"; @customElement("hc-launch-screen") diff --git a/cast/src/receiver/layout/hc-lovelace.ts b/cast/src/receiver/layout/hc-lovelace.ts index 3115b474c6..1b13e18976 100644 --- a/cast/src/receiver/layout/hc-lovelace.ts +++ b/cast/src/receiver/layout/hc-lovelace.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { LovelaceConfig } from "../../../../src/data/lovelace"; import { Lovelace } from "../../../../src/panels/lovelace/types"; import "../../../../src/panels/lovelace/views/hui-view"; diff --git a/cast/src/receiver/layout/hc-main.ts b/cast/src/receiver/layout/hc-main.ts index 567d4de8b5..bc4a9320ea 100644 --- a/cast/src/receiver/layout/hc-main.ts +++ b/cast/src/receiver/layout/hc-main.ts @@ -3,7 +3,8 @@ import { getAuth, UnsubscribeFunc, } from "home-assistant-js-websocket"; -import { customElement, html, state, TemplateResult } from "lit-element"; +import { html, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { CAST_NS } from "../../../../src/cast/const"; import { ConnectMessage, diff --git a/demo/src/custom-cards/card-modder.js b/demo/src/custom-cards/card-modder.js index c915a95668..6ada982486 100644 --- a/demo/src/custom-cards/card-modder.js +++ b/demo/src/custom-cards/card-modder.js @@ -1,5 +1,5 @@ /* eslint-disable */ -import { LitElement } from "lit-element"; +import { LitElement } from "lit"; import "./card-tools"; class CardModder extends LitElement { diff --git a/demo/src/custom-cards/card-tools.js b/demo/src/custom-cards/card-tools.js index 39cf7598fb..27b37cabeb 100644 --- a/demo/src/custom-cards/card-tools.js +++ b/demo/src/custom-cards/card-tools.js @@ -1,5 +1,5 @@ /* eslint-disable */ -import { html, LitElement } from "lit-element"; +import { html, LitElement } from "lit"; if (!window.cardTools) { const version = 0.2; diff --git a/demo/src/custom-cards/cast-demo-row.ts b/demo/src/custom-cards/cast-demo-row.ts index 01f804a8af..8fbecb4eb5 100644 --- a/demo/src/custom-cards/cast-demo-row.ts +++ b/demo/src/custom-cards/cast-demo-row.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { CastManager } from "../../../src/cast/cast_manager"; import { castSendShowDemo } from "../../../src/cast/receiver_messages"; import "../../../src/components/ha-icon"; diff --git a/demo/src/custom-cards/ha-demo-card.ts b/demo/src/custom-cards/ha-demo-card.ts index 0bb27206ca..fcd48a90ab 100644 --- a/demo/src/custom-cards/ha-demo-card.ts +++ b/demo/src/custom-cards/ha-demo-card.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { until } from "lit-html/directives/until"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; +import { until } from "lit/directives/until"; import "../../../src/components/ha-card"; import "../../../src/components/ha-circular-progress"; import { LovelaceCardConfig } from "../../../src/data/lovelace"; diff --git a/gallery/src/demos/demo-automation-describe-action.ts b/gallery/src/demos/demo-automation-describe-action.ts index 642bcfb58c..fa0f26b547 100644 --- a/gallery/src/demos/demo-automation-describe-action.ts +++ b/gallery/src/demos/demo-automation-describe-action.ts @@ -1,12 +1,6 @@ import { safeDump } from "js-yaml"; -import { - customElement, - html, - css, - LitElement, - TemplateResult, - property, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../src/components/ha-card"; import { describeAction } from "../../../src/data/script_i18n"; import { provideHass } from "../../../src/fake_data/provide_hass"; diff --git a/gallery/src/demos/demo-automation-describe-condition.ts b/gallery/src/demos/demo-automation-describe-condition.ts index ef57b9a1e5..2faffde2c0 100644 --- a/gallery/src/demos/demo-automation-describe-condition.ts +++ b/gallery/src/demos/demo-automation-describe-condition.ts @@ -1,11 +1,6 @@ import { safeDump } from "js-yaml"; -import { - customElement, - html, - css, - LitElement, - TemplateResult, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../../../src/components/ha-card"; import { describeCondition } from "../../../src/data/automation_i18n"; diff --git a/gallery/src/demos/demo-automation-describe-trigger.ts b/gallery/src/demos/demo-automation-describe-trigger.ts index f870db44d7..c4b306632e 100644 --- a/gallery/src/demos/demo-automation-describe-trigger.ts +++ b/gallery/src/demos/demo-automation-describe-trigger.ts @@ -1,11 +1,6 @@ import { safeDump } from "js-yaml"; -import { - customElement, - html, - css, - LitElement, - TemplateResult, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../../../src/components/ha-card"; import { describeTrigger } from "../../../src/data/automation_i18n"; diff --git a/gallery/src/demos/demo-automation-trace-timeline.ts b/gallery/src/demos/demo-automation-trace-timeline.ts index 740c589023..50461fca6d 100644 --- a/gallery/src/demos/demo-automation-trace-timeline.ts +++ b/gallery/src/demos/demo-automation-trace-timeline.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - css, - LitElement, - TemplateResult, - property, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../src/components/ha-card"; import "../../../src/components/trace/hat-script-graph"; import "../../../src/components/trace/hat-trace-timeline"; diff --git a/gallery/src/demos/demo-automation-trace.ts b/gallery/src/demos/demo-automation-trace.ts index e6c0fe624a..7b96d81c00 100644 --- a/gallery/src/demos/demo-automation-trace.ts +++ b/gallery/src/demos/demo-automation-trace.ts @@ -1,12 +1,4 @@ -import { - customElement, - html, - css, - LitElement, - TemplateResult, - state, - property, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; import "../../../src/components/ha-card"; import "../../../src/components/trace/hat-script-graph"; import "../../../src/components/trace/hat-trace-timeline"; @@ -15,6 +7,7 @@ import { HomeAssistant } from "../../../src/types"; import { DemoTrace } from "../data/traces/types"; import { basicTrace } from "../data/traces/basic_trace"; import { motionLightTrace } from "../data/traces/motion-light-trace"; +import { customElement, property, state } from "lit/decorators"; const traces: DemoTrace[] = [basicTrace, motionLightTrace]; diff --git a/gallery/src/demos/demo-hui-alarm-panel-card.ts b/gallery/src/demos/demo-hui-alarm-panel-card.ts index 0042b31874..be9a5a22e2 100644 --- a/gallery/src/demos/demo-hui-alarm-panel-card.ts +++ b/gallery/src/demos/demo-hui-alarm-panel-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-conditional-card.ts b/gallery/src/demos/demo-hui-conditional-card.ts index 9d91c76f88..5977ee3c09 100644 --- a/gallery/src/demos/demo-hui-conditional-card.ts +++ b/gallery/src/demos/demo-hui-conditional-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-entities-card.ts b/gallery/src/demos/demo-hui-entities-card.ts index 8f030ec6cb..c6ed878c0f 100644 --- a/gallery/src/demos/demo-hui-entities-card.ts +++ b/gallery/src/demos/demo-hui-entities-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-entity-button-card.ts b/gallery/src/demos/demo-hui-entity-button-card.ts index 56d7018e36..320eb8f8c1 100644 --- a/gallery/src/demos/demo-hui-entity-button-card.ts +++ b/gallery/src/demos/demo-hui-entity-button-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-entity-filter-card.ts b/gallery/src/demos/demo-hui-entity-filter-card.ts index 309e43f7dd..3a0162ae7b 100644 --- a/gallery/src/demos/demo-hui-entity-filter-card.ts +++ b/gallery/src/demos/demo-hui-entity-filter-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-gauge-card.ts b/gallery/src/demos/demo-hui-gauge-card.ts index 659955354b..fdcf07188d 100644 --- a/gallery/src/demos/demo-hui-gauge-card.ts +++ b/gallery/src/demos/demo-hui-gauge-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-glance-card.ts b/gallery/src/demos/demo-hui-glance-card.ts index 9f407307eb..c078ba5f61 100644 --- a/gallery/src/demos/demo-hui-glance-card.ts +++ b/gallery/src/demos/demo-hui-glance-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-grid-and-stack-card.ts b/gallery/src/demos/demo-hui-grid-and-stack-card.ts index 4891d6626e..6b743b243f 100644 --- a/gallery/src/demos/demo-hui-grid-and-stack-card.ts +++ b/gallery/src/demos/demo-hui-grid-and-stack-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { mockHistory } from "../../../demo/src/stubs/history"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; diff --git a/gallery/src/demos/demo-hui-iframe-card.ts b/gallery/src/demos/demo-hui-iframe-card.ts index f4497e9428..811d858e44 100644 --- a/gallery/src/demos/demo-hui-iframe-card.ts +++ b/gallery/src/demos/demo-hui-iframe-card.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, TemplateResult } from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../components/demo-cards"; const CONFIGS = [ diff --git a/gallery/src/demos/demo-hui-light-card.ts b/gallery/src/demos/demo-hui-light-card.ts index 26c419f9e5..8cae0ff9d7 100644 --- a/gallery/src/demos/demo-hui-light-card.ts +++ b/gallery/src/demos/demo-hui-light-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-map-card.ts b/gallery/src/demos/demo-hui-map-card.ts index ccb47deabb..68912a6e77 100644 --- a/gallery/src/demos/demo-hui-map-card.ts +++ b/gallery/src/demos/demo-hui-map-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-markdown-card.ts b/gallery/src/demos/demo-hui-markdown-card.ts index 94f63f404d..6e34a04c6f 100644 --- a/gallery/src/demos/demo-hui-markdown-card.ts +++ b/gallery/src/demos/demo-hui-markdown-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { mockTemplate } from "../../../demo/src/stubs/template"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-media-control-card.ts b/gallery/src/demos/demo-hui-media-control-card.ts index 3b032c409e..0b963f36e8 100644 --- a/gallery/src/demos/demo-hui-media-control-card.ts +++ b/gallery/src/demos/demo-hui-media-control-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; import { createMediaPlayerEntities } from "../data/media_players"; diff --git a/gallery/src/demos/demo-hui-media-player-rows.ts b/gallery/src/demos/demo-hui-media-player-rows.ts index 500bfca693..988d232e49 100644 --- a/gallery/src/demos/demo-hui-media-player-rows.ts +++ b/gallery/src/demos/demo-hui-media-player-rows.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; import { createMediaPlayerEntities } from "../data/media_players"; diff --git a/gallery/src/demos/demo-hui-picture-elements-card.ts b/gallery/src/demos/demo-hui-picture-elements-card.ts index 5ab818911c..c3fcc7d61b 100644 --- a/gallery/src/demos/demo-hui-picture-elements-card.ts +++ b/gallery/src/demos/demo-hui-picture-elements-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-picture-entity-card.ts b/gallery/src/demos/demo-hui-picture-entity-card.ts index 3a1b64f76e..6b8d8418e1 100644 --- a/gallery/src/demos/demo-hui-picture-entity-card.ts +++ b/gallery/src/demos/demo-hui-picture-entity-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-picture-glance-card.ts b/gallery/src/demos/demo-hui-picture-glance-card.ts index f6790efc3d..b82c2a2fa9 100644 --- a/gallery/src/demos/demo-hui-picture-glance-card.ts +++ b/gallery/src/demos/demo-hui-picture-glance-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-plant-card.ts b/gallery/src/demos/demo-hui-plant-card.ts index 9e8aff318e..683d0c6a37 100644 --- a/gallery/src/demos/demo-hui-plant-card.ts +++ b/gallery/src/demos/demo-hui-plant-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; import { createPlantEntities } from "../data/plants"; diff --git a/gallery/src/demos/demo-hui-shopping-list-card.ts b/gallery/src/demos/demo-hui-shopping-list-card.ts index 61f9aa9062..034c150abd 100644 --- a/gallery/src/demos/demo-hui-shopping-list-card.ts +++ b/gallery/src/demos/demo-hui-shopping-list-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-thermostat-card.ts b/gallery/src/demos/demo-hui-thermostat-card.ts index e6cdaae788..86216da564 100644 --- a/gallery/src/demos/demo-hui-thermostat-card.ts +++ b/gallery/src/demos/demo-hui-thermostat-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-integration-card.ts b/gallery/src/demos/demo-integration-card.ts index 8cb51ddd2b..1e23303bc4 100644 --- a/gallery/src/demos/demo-integration-card.ts +++ b/gallery/src/demos/demo-integration-card.ts @@ -1,12 +1,4 @@ -import { - customElement, - html, - css, - state, - LitElement, - TemplateResult, - property, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; import "../../../src/components/ha-formfield"; import "../../../src/components/ha-switch"; @@ -23,7 +15,8 @@ import type { } from "../../../src/panels/config/integrations/ha-config-integrations"; import { DeviceRegistryEntry } from "../../../src/data/device_registry"; import { EntityRegistryEntry } from "../../../src/data/entity_registry"; -import { classMap } from "lit-html/directives/class-map"; +import { classMap } from "lit/directives/class-map"; +import { customElement, property, state } from "lit/decorators"; const createConfigEntry = ( title: string, diff --git a/gallery/src/demos/demo-more-info-light.ts b/gallery/src/demos/demo-more-info-light.ts index 399873aa9c..a3107a5df3 100644 --- a/gallery/src/demos/demo-more-info-light.ts +++ b/gallery/src/demos/demo-more-info-light.ts @@ -1,12 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../../../src/components/ha-card"; import { LightColorModes, diff --git a/gallery/src/demos/demo-util-long-press.ts b/gallery/src/demos/demo-util-long-press.ts index 9fa774918f..f4fddb45ac 100644 --- a/gallery/src/demos/demo-util-long-press.ts +++ b/gallery/src/demos/demo-util-long-press.ts @@ -1,5 +1,6 @@ import "@material/mwc-button"; -import { customElement, html, LitElement, TemplateResult } from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../../../src/components/ha-card"; import { ActionHandlerEvent } from "../../../src/data/lovelace"; import { actionHandler } from "../../../src/panels/lovelace/common/directives/action-handler-directive"; diff --git a/hassio/src/addon-store/hassio-addon-repository.ts b/hassio/src/addon-store/hassio-addon-repository.ts index 4462d03854..6c510374e0 100644 --- a/hassio/src/addon-store/hassio-addon-repository.ts +++ b/hassio/src/addon-store/hassio-addon-repository.ts @@ -1,12 +1,6 @@ import { mdiArrowUpBoldCircle, mdiPuzzle } from "@mdi/js"; -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import { navigate } from "../../../src/common/navigate"; diff --git a/hassio/src/addon-store/hassio-addon-store.ts b/hassio/src/addon-store/hassio-addon-store.ts index 21e67c7d24..13e55215b0 100644 --- a/hassio/src/addon-store/hassio-addon-store.ts +++ b/hassio/src/addon-store/hassio-addon-store.ts @@ -5,12 +5,12 @@ import { mdiDotsVertical } from "@mdi/js"; import { css, CSSResultGroup, - state, + html, LitElement, - property, PropertyValues, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; + TemplateResult, +} from "lit"; +import { property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import { fireEvent } from "../../../src/common/dom/fire_event"; diff --git a/hassio/src/addon-view/config/hassio-addon-audio.ts b/hassio/src/addon-view/config/hassio-addon-audio.ts index a3e4121418..ad6238c429 100644 --- a/hassio/src/addon-view/config/hassio-addon-audio.ts +++ b/hassio/src/addon-view/config/hassio-addon-audio.ts @@ -5,14 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "web-animations-js/web-animations-next-lite.min"; import "../../../../src/components/buttons/ha-progress-button"; import "../../../../src/components/ha-card"; diff --git a/hassio/src/addon-view/config/hassio-addon-config-tab.ts b/hassio/src/addon-view/config/hassio-addon-config-tab.ts index ab57e72d6a..3b3e1961ec 100644 --- a/hassio/src/addon-view/config/hassio-addon-config-tab.ts +++ b/hassio/src/addon-view/config/hassio-addon-config-tab.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../src/components/ha-circular-progress"; import { HassioAddonDetails } from "../../../../src/data/hassio/addon"; import { Supervisor } from "../../../../src/data/supervisor/supervisor"; diff --git a/hassio/src/addon-view/config/hassio-addon-config.ts b/hassio/src/addon-view/config/hassio-addon-config.ts index 936c5d7651..52c3d73930 100644 --- a/hassio/src/addon-view/config/hassio-addon-config.ts +++ b/hassio/src/addon-view/config/hassio-addon-config.ts @@ -6,15 +6,12 @@ import "@polymer/iron-autogrow-textarea/iron-autogrow-textarea"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/buttons/ha-progress-button"; diff --git a/hassio/src/addon-view/config/hassio-addon-network.ts b/hassio/src/addon-view/config/hassio-addon-network.ts index 6a96a88741..9eb8541bdd 100644 --- a/hassio/src/addon-view/config/hassio-addon-network.ts +++ b/hassio/src/addon-view/config/hassio-addon-network.ts @@ -2,14 +2,12 @@ import { PaperInputElement } from "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/buttons/ha-progress-button"; import "../../../../src/components/ha-card"; diff --git a/hassio/src/addon-view/documentation/hassio-addon-documentation-tab.ts b/hassio/src/addon-view/documentation/hassio-addon-documentation-tab.ts index 3ae8b65427..179598f099 100644 --- a/hassio/src/addon-view/documentation/hassio-addon-documentation-tab.ts +++ b/hassio/src/addon-view/documentation/hassio-addon-documentation-tab.ts @@ -1,14 +1,5 @@ import "../../../../src/components/ha-card"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import "../../../../src/components/ha-circular-progress"; import "../../../../src/components/ha-markdown"; import { @@ -21,6 +12,7 @@ import { haStyle } from "../../../../src/resources/styles"; import { HomeAssistant } from "../../../../src/types"; import { hassioStyle } from "../../resources/hassio-style"; import { Supervisor } from "../../../../src/data/supervisor/supervisor"; +import { customElement, property, state } from "lit/decorators"; @customElement("hassio-addon-documentation-tab") class HassioAddonDocumentationDashboard extends LitElement { diff --git a/hassio/src/addon-view/hassio-addon-dashboard.ts b/hassio/src/addon-view/hassio-addon-dashboard.ts index 52f5859f14..8b7fd81e80 100644 --- a/hassio/src/addon-view/hassio-addon-dashboard.ts +++ b/hassio/src/addon-view/hassio-addon-dashboard.ts @@ -4,16 +4,8 @@ import { mdiInformationVariant, mdiMathLog, } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../src/common/dom/fire_event"; import { navigate } from "../../../src/common/navigate"; diff --git a/hassio/src/addon-view/hassio-addon-router.ts b/hassio/src/addon-view/hassio-addon-router.ts index e2d540527d..fe0bad9c00 100644 --- a/hassio/src/addon-view/hassio-addon-router.ts +++ b/hassio/src/addon-view/hassio-addon-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassioAddonDetails } from "../../../src/data/hassio/addon"; import { Supervisor } from "../../../src/data/supervisor/supervisor"; import { diff --git a/hassio/src/addon-view/info/hassio-addon-info-tab.ts b/hassio/src/addon-view/info/hassio-addon-info-tab.ts index a46becbd75..6b31e546b7 100644 --- a/hassio/src/addon-view/info/hassio-addon-info-tab.ts +++ b/hassio/src/addon-view/info/hassio-addon-info-tab.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../src/components/ha-circular-progress"; import { HassioAddonDetails } from "../../../../src/data/hassio/addon"; import { Supervisor } from "../../../../src/data/supervisor/supervisor"; diff --git a/hassio/src/addon-view/info/hassio-addon-info.ts b/hassio/src/addon-view/info/hassio-addon-info.ts index 3873353bba..6c1291b63b 100644 --- a/hassio/src/addon-view/info/hassio-addon-info.ts +++ b/hassio/src/addon-view/info/hassio-addon-info.ts @@ -14,17 +14,9 @@ import { mdiPound, mdiShield, } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../../src/common/config/version"; import { fireEvent } from "../../../../src/common/dom/fire_event"; diff --git a/hassio/src/addon-view/log/hassio-addon-log-tab.ts b/hassio/src/addon-view/log/hassio-addon-log-tab.ts index d9d4cff07d..3690d75c64 100644 --- a/hassio/src/addon-view/log/hassio-addon-log-tab.ts +++ b/hassio/src/addon-view/log/hassio-addon-log-tab.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../src/components/ha-circular-progress"; import { HassioAddonDetails } from "../../../../src/data/hassio/addon"; import { Supervisor } from "../../../../src/data/supervisor/supervisor"; diff --git a/hassio/src/addon-view/log/hassio-addon-logs.ts b/hassio/src/addon-view/log/hassio-addon-logs.ts index 3d2034f1ac..a8ed8f3529 100644 --- a/hassio/src/addon-view/log/hassio-addon-logs.ts +++ b/hassio/src/addon-view/log/hassio-addon-logs.ts @@ -1,14 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../src/components/ha-card"; import { fetchHassioAddonLogs, diff --git a/hassio/src/components/hassio-ansi-to-html.ts b/hassio/src/components/hassio-ansi-to-html.ts index e31b4dba05..416be07388 100644 --- a/hassio/src/components/hassio-ansi-to-html.ts +++ b/hassio/src/components/hassio-ansi-to-html.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; interface State { bold: boolean; diff --git a/hassio/src/components/hassio-card-content.ts b/hassio/src/components/hassio-card-content.ts index 383388bde9..d4b9508009 100644 --- a/hassio/src/components/hassio-card-content.ts +++ b/hassio/src/components/hassio-card-content.ts @@ -1,13 +1,6 @@ import { mdiHelpCircle } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../src/components/ha-relative-time"; import "../../../src/components/ha-svg-icon"; import { HomeAssistant } from "../../../src/types"; diff --git a/hassio/src/components/hassio-upload-snapshot.ts b/hassio/src/components/hassio-upload-snapshot.ts index 5f16b62f8e..5347e9a796 100644 --- a/hassio/src/components/hassio-upload-snapshot.ts +++ b/hassio/src/components/hassio-upload-snapshot.ts @@ -2,13 +2,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiFolderUpload } from "@mdi/js"; import "@polymer/iron-input/iron-input"; import "@polymer/paper-input/paper-input-container"; -import { - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { fireEvent } from "../../../src/common/dom/fire_event"; import "../../../src/components/ha-circular-progress"; import "../../../src/components/ha-file-upload"; diff --git a/hassio/src/components/supervisor-metric.ts b/hassio/src/components/supervisor-metric.ts index 3030c9cf65..e6dc772517 100644 --- a/hassio/src/components/supervisor-metric.ts +++ b/hassio/src/components/supervisor-metric.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../../src/components/ha-bar"; import "../../../src/components/ha-settings-row"; import { roundWithOneDecimal } from "../../../src/util/calculate"; diff --git a/hassio/src/dashboard/hassio-addons.ts b/hassio/src/dashboard/hassio-addons.ts index aa5393313c..eb79281170 100644 --- a/hassio/src/dashboard/hassio-addons.ts +++ b/hassio/src/dashboard/hassio-addons.ts @@ -1,13 +1,6 @@ import { mdiArrowUpBoldCircle, mdiPuzzle } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { atLeastVersion } from "../../../src/common/config/version"; import { navigate } from "../../../src/common/navigate"; import { compare } from "../../../src/common/string/compare"; diff --git a/hassio/src/dashboard/hassio-dashboard.ts b/hassio/src/dashboard/hassio-dashboard.ts index 9c27910641..6b98c759ce 100644 --- a/hassio/src/dashboard/hassio-dashboard.ts +++ b/hassio/src/dashboard/hassio-dashboard.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { Supervisor } from "../../../src/data/supervisor/supervisor"; import "../../../src/layouts/hass-tabs-subpage"; import { haStyle } from "../../../src/resources/styles"; diff --git a/hassio/src/dashboard/hassio-update.ts b/hassio/src/dashboard/hassio-update.ts index 9a4f7487a8..21836b1c1a 100644 --- a/hassio/src/dashboard/hassio-update.ts +++ b/hassio/src/dashboard/hassio-update.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import { mdiHomeAssistant } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import { fireEvent } from "../../../src/common/dom/fire_event"; diff --git a/hassio/src/dialogs/markdown/dialog-hassio-markdown.ts b/hassio/src/dialogs/markdown/dialog-hassio-markdown.ts index 1f6db1677f..b1b2f06226 100644 --- a/hassio/src/dialogs/markdown/dialog-hassio-markdown.ts +++ b/hassio/src/dialogs/markdown/dialog-hassio-markdown.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { createCloseHeading } from "../../../../src/components/ha-dialog"; import "../../../../src/components/ha-markdown"; import { haStyleDialog } from "../../../../src/resources/styles"; diff --git a/hassio/src/dialogs/network/dialog-hassio-network.ts b/hassio/src/dialogs/network/dialog-hassio-network.ts index 91d08c8d57..36adbabf45 100644 --- a/hassio/src/dialogs/network/dialog-hassio-network.ts +++ b/hassio/src/dialogs/network/dialog-hassio-network.ts @@ -6,17 +6,9 @@ import "@material/mwc-tab"; import "@material/mwc-tab-bar"; import { mdiClose } from "@mdi/js"; import { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { cache } from "lit-html/directives/cache"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { cache } from "lit/directives/cache"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-circular-progress"; import "../../../../src/components/ha-dialog"; diff --git a/hassio/src/dialogs/registries/dialog-hassio-registries.ts b/hassio/src/dialogs/registries/dialog-hassio-registries.ts index 7f02cb769b..80b7e32993 100644 --- a/hassio/src/dialogs/registries/dialog-hassio-registries.ts +++ b/hassio/src/dialogs/registries/dialog-hassio-registries.ts @@ -3,16 +3,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import "@material/mwc-list/mwc-list-item"; import { mdiDelete } from "@mdi/js"; import { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../src/components/ha-circular-progress"; import { createCloseHeading } from "../../../../src/components/ha-dialog"; import "../../../../src/components/ha-svg-icon"; diff --git a/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts b/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts index d776b83d27..424b881e34 100644 --- a/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts +++ b/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts @@ -5,17 +5,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-circular-progress"; diff --git a/hassio/src/dialogs/snapshot/dialog-hassio-create-snapshot.ts b/hassio/src/dialogs/snapshot/dialog-hassio-create-snapshot.ts index b97354f9a0..4afbf0acae 100755 --- a/hassio/src/dialogs/snapshot/dialog-hassio-create-snapshot.ts +++ b/hassio/src/dialogs/snapshot/dialog-hassio-create-snapshot.ts @@ -1,16 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResult, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { formatDate } from "../../../../src/common/datetime/format_date"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import { compare } from "../../../../src/common/string/compare"; @@ -334,7 +326,7 @@ class HassioCreateSnapshotDialog extends LitElement { button.progress = false; } - static get styles(): CSSResult[] { + static get styles(): CSSResultGroup { return [ haStyle, haStyleDialog, diff --git a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot-upload.ts b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot-upload.ts index b87b4c7031..d2ffb1f035 100644 --- a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot-upload.ts +++ b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot-upload.ts @@ -1,14 +1,6 @@ import { mdiClose } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-header-bar"; import { HassDialog } from "../../../../src/dialogs/make-dialog-manager"; diff --git a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts index ebe2e9f774..2fa53b66bf 100755 --- a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts +++ b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts @@ -3,16 +3,8 @@ import { mdiClose, mdiDelete, mdiDownload, mdiHistory } from "@mdi/js"; import "@polymer/paper-checkbox/paper-checkbox"; import type { PaperCheckboxElement } from "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { formatDateTime } from "../../../../src/common/datetime/format_date_time"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-header-bar"; diff --git a/hassio/src/dialogs/suggestAddonRestart.ts b/hassio/src/dialogs/suggestAddonRestart.ts index 12b8d383d7..d3bb5b1653 100644 --- a/hassio/src/dialogs/suggestAddonRestart.ts +++ b/hassio/src/dialogs/suggestAddonRestart.ts @@ -1,4 +1,4 @@ -import type { LitElement } from "lit-element"; +import type { LitElement } from "lit"; import { HassioAddonDetails, restartHassioAddon, diff --git a/hassio/src/dialogs/update/dialog-supervisor-update.ts b/hassio/src/dialogs/update/dialog-supervisor-update.ts index e8cb3fb67e..e017c9d2f9 100644 --- a/hassio/src/dialogs/update/dialog-supervisor-update.ts +++ b/hassio/src/dialogs/update/dialog-supervisor-update.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-circular-progress"; import "../../../../src/components/ha-dialog"; diff --git a/hassio/src/hassio-main.ts b/hassio/src/hassio-main.ts index 102513139a..c91a024347 100644 --- a/hassio/src/hassio-main.ts +++ b/hassio/src/hassio-main.ts @@ -1,4 +1,5 @@ -import { customElement, html, property, PropertyValues } from "lit-element"; +import { html, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { atLeastVersion } from "../../src/common/config/version"; import { applyThemesOnElement } from "../../src/common/dom/apply_themes_on_element"; import { fireEvent } from "../../src/common/dom/fire_event"; diff --git a/hassio/src/hassio-my-redirect.ts b/hassio/src/hassio-my-redirect.ts index 76fed4cd68..f24ab95a5b 100644 --- a/hassio/src/hassio-my-redirect.ts +++ b/hassio/src/hassio-my-redirect.ts @@ -1,11 +1,4 @@ -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; import { sanitizeUrl } from "@braintree/sanitize-url"; import { createSearchParam, @@ -20,6 +13,7 @@ import { import { navigate } from "../../src/common/navigate"; import { HomeAssistant, Route } from "../../src/types"; import { Supervisor } from "../../src/data/supervisor/supervisor"; +import { customElement, property, state } from "lit/decorators"; const REDIRECTS: Redirects = { supervisor: { diff --git a/hassio/src/hassio-panel-router.ts b/hassio/src/hassio-panel-router.ts index 7207d70c7b..28d9f24519 100644 --- a/hassio/src/hassio-panel-router.ts +++ b/hassio/src/hassio-panel-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { Supervisor } from "../../src/data/supervisor/supervisor"; import { HassRouterPage, diff --git a/hassio/src/hassio-panel.ts b/hassio/src/hassio-panel.ts index a52de0a6eb..6c6dc54c7c 100644 --- a/hassio/src/hassio-panel.ts +++ b/hassio/src/hassio-panel.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { Supervisor, supervisorCollection, diff --git a/hassio/src/hassio-router.ts b/hassio/src/hassio-router.ts index 2662bfa357..082688399e 100644 --- a/hassio/src/hassio-router.ts +++ b/hassio/src/hassio-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassioPanelInfo } from "../../src/data/hassio/supervisor"; import { Supervisor } from "../../src/data/supervisor/supervisor"; import { diff --git a/hassio/src/ingress-view/hassio-ingress-view.ts b/hassio/src/ingress-view/hassio-ingress-view.ts index 54942ca950..04ef8d250d 100644 --- a/hassio/src/ingress-view/hassio-ingress-view.ts +++ b/hassio/src/ingress-view/hassio-ingress-view.ts @@ -2,14 +2,12 @@ import { mdiMenu } from "@mdi/js"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../src/common/dom/fire_event"; import { navigate } from "../../../src/common/navigate"; import { extractSearchParam } from "../../../src/common/url/search-params"; diff --git a/hassio/src/resources/hassio-style.ts b/hassio/src/resources/hassio-style.ts index 99329ee08f..5d52f618da 100644 --- a/hassio/src/resources/hassio-style.ts +++ b/hassio/src/resources/hassio-style.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const hassioStyle = css` .content { diff --git a/hassio/src/snapshots/hassio-snapshots.ts b/hassio/src/snapshots/hassio-snapshots.ts index b6bb3486f0..a13f37c9d2 100644 --- a/hassio/src/snapshots/hassio-snapshots.ts +++ b/hassio/src/snapshots/hassio-snapshots.ts @@ -4,14 +4,12 @@ import "@material/mwc-list/mwc-list-item"; import { mdiDotsVertical, mdiPlus } from "@mdi/js"; import { CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, - state, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import relativeTime from "../../../src/common/datetime/relative_time"; diff --git a/hassio/src/supervisor-base-element.ts b/hassio/src/supervisor-base-element.ts index a763d16d2b..9811f36266 100644 --- a/hassio/src/supervisor-base-element.ts +++ b/hassio/src/supervisor-base-element.ts @@ -1,5 +1,6 @@ import { Collection, UnsubscribeFunc } from "home-assistant-js-websocket"; -import { state, LitElement, property, PropertyValues } from "lit-element"; +import { LitElement, PropertyValues } from "lit"; +import { property, state } from "lit/decorators"; import { atLeastVersion } from "../../src/common/config/version"; import { computeLocalize } from "../../src/common/translations/localize"; import { fetchHassioAddonsInfo } from "../../src/data/hassio/addon"; diff --git a/hassio/src/system/hassio-core-info.ts b/hassio/src/system/hassio-core-info.ts index 4ee474ff08..e335a1df78 100644 --- a/hassio/src/system/hassio-core-info.ts +++ b/hassio/src/system/hassio-core-info.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import "@material/mwc-list/mwc-list-item"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../src/common/dom/fire_event"; import "../../../src/components/buttons/ha-progress-button"; import "../../../src/components/ha-button-menu"; diff --git a/hassio/src/system/hassio-host-info.ts b/hassio/src/system/hassio-host-info.ts index be5b6910e1..2806b46ad1 100644 --- a/hassio/src/system/hassio-host-info.ts +++ b/hassio/src/system/hassio-host-info.ts @@ -3,15 +3,8 @@ import { ActionDetail } from "@material/mwc-list/mwc-list-foundation"; import "@material/mwc-list/mwc-list-item"; import { mdiDotsVertical } from "@mdi/js"; import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import { fireEvent } from "../../../src/common/dom/fire_event"; diff --git a/hassio/src/system/hassio-supervisor-info.ts b/hassio/src/system/hassio-supervisor-info.ts index dfe04b3a92..62baf5809e 100644 --- a/hassio/src/system/hassio-supervisor-info.ts +++ b/hassio/src/system/hassio-supervisor-info.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { atLeastVersion } from "../../../src/common/config/version"; import { fireEvent } from "../../../src/common/dom/fire_event"; import "../../../src/components/buttons/ha-progress-button"; diff --git a/hassio/src/system/hassio-supervisor-log.ts b/hassio/src/system/hassio-supervisor-log.ts index 8a78153feb..ac0f3e8cdc 100644 --- a/hassio/src/system/hassio-supervisor-log.ts +++ b/hassio/src/system/hassio-supervisor-log.ts @@ -2,16 +2,8 @@ import "@material/mwc-button"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../src/components/buttons/ha-progress-button"; import "../../../src/components/ha-card"; import { extractApiErrorMessage } from "../../../src/data/hassio/common"; diff --git a/hassio/src/system/hassio-system.ts b/hassio/src/system/hassio-system.ts index e7b1d74b0b..22704fcc4a 100644 --- a/hassio/src/system/hassio-system.ts +++ b/hassio/src/system/hassio-system.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { Supervisor } from "../../../src/data/supervisor/supervisor"; import "../../../src/layouts/hass-tabs-subpage"; import { haStyle } from "../../../src/resources/styles"; diff --git a/package.json b/package.json index ecbb9f2e26..a3d3345a33 100644 --- a/package.json +++ b/package.json @@ -42,22 +42,23 @@ "@fullcalendar/daygrid": "5.1.0", "@fullcalendar/interaction": "5.1.0", "@fullcalendar/list": "5.1.0", - "@material/chips": "=9.0.0-canary.1c156d69d.0", - "@material/mwc-button": "^0.20.0", - "@material/mwc-checkbox": "^0.20.0", - "@material/mwc-circular-progress": "^0.20.0", - "@material/mwc-dialog": "^0.20.0", - "@material/mwc-fab": "^0.20.0", - "@material/mwc-formfield": "^0.20.0", - "@material/mwc-icon-button": "^0.20.0", - "@material/mwc-list": "^0.20.0", - "@material/mwc-menu": "^0.20.0", - "@material/mwc-radio": "^0.20.0", - "@material/mwc-ripple": "^0.20.0", - "@material/mwc-switch": "^0.20.0", - "@material/mwc-tab": "^0.20.0", - "@material/mwc-tab-bar": "^0.20.0", - "@material/top-app-bar": "=9.0.0-canary.1c156d69d.0", + "@lit-labs/virtualizer": "^0.6.0", + "@material/chips": "=12.0.0-canary.1a8d06483.0", + "@material/mwc-button": "canary", + "@material/mwc-checkbox": "canary", + "@material/mwc-circular-progress": "canary", + "@material/mwc-dialog": "canary", + "@material/mwc-fab": "canary", + "@material/mwc-formfield": "canary", + "@material/mwc-icon-button": "canary", + "@material/mwc-list": "canary", + "@material/mwc-menu": "canary", + "@material/mwc-radio": "canary", + "@material/mwc-ripple": "canary", + "@material/mwc-switch": "canary", + "@material/mwc-tab": "canary", + "@material/mwc-tab-bar": "canary", + "@material/top-app-bar": "=12.0.0-canary.1a8d06483.0", "@mdi/js": "5.9.55", "@mdi/svg": "5.9.55", "@polymer/app-layout": "^3.0.2", @@ -115,9 +116,7 @@ "js-yaml": "^3.13.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", - "lit-element": "2.5.1", - "lit-html": "1.4.1", - "lit-virtualizer": "^0.4.2", + "lit": "^2.0.0-rc.2", "marked": "2.0.0", "mdn-polyfills": "^5.16.0", "memoize-one": "^5.0.2", @@ -241,8 +240,8 @@ "resolutions": { "@webcomponents/webcomponentsjs": "^2.2.10", "@polymer/polymer": "3.1.0", - "lit-html": "1.4.1", - "lit-element": "2.5.1" + "lit-html": "2.0.0-rc.3", + "lit-element": "3.0.0-rc.2" }, "main": "src/home-assistant.js", "husky": { diff --git a/src/auth/ha-auth-flow.ts b/src/auth/ha-auth-flow.ts index 0602edab15..85dcf053e9 100644 --- a/src/auth/ha-auth-flow.ts +++ b/src/auth/ha-auth-flow.ts @@ -3,12 +3,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import "../components/ha-form/ha-form"; import "../components/ha-markdown"; import { AuthProvider } from "../data/auth"; diff --git a/src/auth/ha-authorize.ts b/src/auth/ha-authorize.ts index 02d1f80cea..9d51431102 100644 --- a/src/auth/ha-authorize.ts +++ b/src/auth/ha-authorize.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { property, state } from "lit/decorators"; import punycode from "punycode"; import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; import { extractSearchParamsObject } from "../common/url/search-params"; diff --git a/src/auth/ha-pick-auth-provider.ts b/src/auth/ha-pick-auth-provider.ts index 63e213e6d1..e471cb6908 100644 --- a/src/auth/ha-pick-auth-provider.ts +++ b/src/auth/ha-pick-auth-provider.ts @@ -1,6 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "../components/ha-icon-next"; import { AuthProvider } from "../data/auth"; diff --git a/src/common/decorators/local-storage.ts b/src/common/decorators/local-storage.ts index 2299705033..8456c5be48 100644 --- a/src/common/decorators/local-storage.ts +++ b/src/common/decorators/local-storage.ts @@ -1,5 +1,5 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { PropertyDeclaration, ReactiveElement } from "lit-element"; +import { PropertyDeclaration, ReactiveElement } from "lit"; import type { ClassElement } from "../../types"; type Callback = (oldValue: any, newValue: any) => void; diff --git a/src/common/decorators/restore-scroll.ts b/src/common/decorators/restore-scroll.ts index 059c83966e..e7353e729f 100644 --- a/src/common/decorators/restore-scroll.ts +++ b/src/common/decorators/restore-scroll.ts @@ -1,4 +1,4 @@ -import type { LitElement } from "lit-element"; +import type { LitElement } from "lit"; import type { ClassElement } from "../../types"; export const restoreScroll = (selector: string): any => ( diff --git a/src/common/dom/dynamic-element-directive.ts b/src/common/dom/dynamic-element-directive.ts index cad1f45137..a1ffb33ff3 100644 --- a/src/common/dom/dynamic-element-directive.ts +++ b/src/common/dom/dynamic-element-directive.ts @@ -1,4 +1,4 @@ -import { noChange } from "lit-html"; +import { noChange } from "lit"; import { ChildPart, Directive, @@ -6,8 +6,7 @@ import { DirectiveParameters, PartInfo, PartType, - // eslint-disable-next-line import/extensions -} from "lit-html/directive.js"; +} from "lit/directive"; export const dynamicElement = directive( class extends Directive { diff --git a/src/common/image/extract_color.ts b/src/common/image/extract_color.ts index d63ed963d8..f37652ce7b 100644 --- a/src/common/image/extract_color.ts +++ b/src/common/image/extract_color.ts @@ -1,7 +1,7 @@ // We import the minified bundle because the unminified bundle // has some quirks that break wds. See #7784 for unminified version. -import Vibrant from "node-vibrant/dist/vibrant"; import type { Swatch, Vec3 } from "@vibrant/color"; +import Vibrant from "node-vibrant/dist/vibrant"; import { getRGBContrastRatio } from "../color/rgb"; const CONTRAST_RATIO = 4.5; diff --git a/src/common/search/search-input.ts b/src/common/search/search-input.ts index d6a76951d4..bde0c9ab5c 100644 --- a/src/common/search/search-input.ts +++ b/src/common/search/search-input.ts @@ -1,15 +1,9 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiClose, mdiMagnify } from "@mdi/js"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../components/ha-svg-icon"; import { fireEvent } from "../dom/fire_event"; diff --git a/src/common/style/icon_color_css.ts b/src/common/style/icon_color_css.ts index 4672d0ca9c..fbc663653a 100644 --- a/src/common/style/icon_color_css.ts +++ b/src/common/style/icon_color_css.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const iconColorCSS = css` ha-icon[data-domain="alert"][data-state="on"], diff --git a/src/components/buttons/ha-call-api-button.ts b/src/components/buttons/ha-call-api-button.ts index b7cec1d738..6bf9e92d4d 100644 --- a/src/components/buttons/ha-call-api-button.ts +++ b/src/components/buttons/ha-call-api-button.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - html, - LitElement, - property, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HomeAssistant } from "../../types"; import "./ha-progress-button"; diff --git a/src/components/buttons/ha-progress-button.ts b/src/components/buttons/ha-progress-button.ts index 68c39559e1..259ee75310 100644 --- a/src/components/buttons/ha-progress-button.ts +++ b/src/components/buttons/ha-progress-button.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import type { Button } from "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../ha-circular-progress"; @customElement("ha-progress-button") diff --git a/src/components/data-table/ha-data-table.ts b/src/components/data-table/ha-data-table.ts index 6a495afa9f..6880012653 100644 --- a/src/components/data-table/ha-data-table.ts +++ b/src/components/data-table/ha-data-table.ts @@ -1,21 +1,23 @@ +import { Layout1d, scroll } from "@lit-labs/virtualizer"; import deepClone from "deep-clone-simple"; import { css, CSSResultGroup, - customElement, - eventOptions, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; -import { scroll } from "lit-virtualizer"; +} from "lit"; +import { + customElement, + property, + state, + query, + eventOptions, +} from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import memoizeOne from "memoize-one"; import { restoreScroll } from "../../common/decorators/restore-scroll"; import { fireEvent } from "../../common/dom/fire_event"; @@ -167,6 +169,10 @@ export class HaDataTable extends LitElement { } } + protected firstUpdated() { + this.updateComplete.then(() => this._calcTableHeight()); + } + protected updated(properties: PropertyValues) { super.updated(properties); @@ -333,6 +339,8 @@ export class HaDataTable extends LitElement { > ${scroll({ items: this._items, + layout: Layout1d, + // @ts-expect-error renderItem: (row: DataTableRowData, index) => { if (row.append) { return html` diff --git a/src/components/date-range-picker.ts b/src/components/date-range-picker.ts index ecb8468d35..7dd6244640 100644 --- a/src/components/date-range-picker.ts +++ b/src/components/date-range-picker.ts @@ -1,6 +1,5 @@ // @ts-nocheck import wrap from "@vue/web-component-wrapper"; -import { customElement } from "lit-element"; import Vue from "vue"; import DateRangePicker from "vue2-daterange-picker"; import dateRangePickerStyles from "vue2-daterange-picker/dist/vue2-daterange-picker.css"; diff --git a/src/components/device/ha-area-devices-picker.ts b/src/components/device/ha-area-devices-picker.ts index 677db126a0..2f70b6ffca 100644 --- a/src/components/device/ha-area-devices-picker.ts +++ b/src/components/device/ha-area-devices-picker.ts @@ -10,14 +10,12 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { computeDomain } from "../../common/entity/compute_domain"; diff --git a/src/components/device/ha-device-action-picker.ts b/src/components/device/ha-device-action-picker.ts index e8e50f5b47..ce053d45cf 100644 --- a/src/components/device/ha-device-action-picker.ts +++ b/src/components/device/ha-device-action-picker.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { DeviceAction, fetchDeviceActions, diff --git a/src/components/device/ha-device-automation-picker.ts b/src/components/device/ha-device-automation-picker.ts index 2743e77d89..e4cc705dce 100644 --- a/src/components/device/ha-device-automation-picker.ts +++ b/src/components/device/ha-device-automation-picker.ts @@ -2,15 +2,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { DeviceAutomation, diff --git a/src/components/device/ha-device-condition-picker.ts b/src/components/device/ha-device-condition-picker.ts index 3ab706e73d..977a4ee05f 100644 --- a/src/components/device/ha-device-condition-picker.ts +++ b/src/components/device/ha-device-condition-picker.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { DeviceCondition, fetchDeviceConditions, diff --git a/src/components/device/ha-device-picker.ts b/src/components/device/ha-device-picker.ts index 3e70ef85e8..cc2052dac4 100644 --- a/src/components/device/ha-device-picker.ts +++ b/src/components/device/ha-device-picker.ts @@ -4,15 +4,12 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { computeDomain } from "../../common/entity/compute_domain"; @@ -34,8 +31,8 @@ import { import { SubscribeMixin } from "../../mixins/subscribe-mixin"; import { PolymerChangedEvent } from "../../polymer-types"; import { HomeAssistant } from "../../types"; -import type { HaComboBox } from "../ha-combo-box"; import "../ha-combo-box"; +import type { HaComboBox } from "../ha-combo-box"; interface Device { name: string; diff --git a/src/components/device/ha-device-trigger-picker.ts b/src/components/device/ha-device-trigger-picker.ts index d1ff66d37e..142955b24a 100644 --- a/src/components/device/ha-device-trigger-picker.ts +++ b/src/components/device/ha-device-trigger-picker.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { DeviceTrigger, fetchDeviceTriggers, diff --git a/src/components/device/ha-devices-picker.ts b/src/components/device/ha-devices-picker.ts index 9106521d1d..1b437da780 100644 --- a/src/components/device/ha-devices-picker.ts +++ b/src/components/device/ha-devices-picker.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { PolymerChangedEvent } from "../../polymer-types"; import { HomeAssistant } from "../../types"; diff --git a/src/components/entity/ha-battery-icon.ts b/src/components/entity/ha-battery-icon.ts index 45f4f7d553..40233ec4a3 100644 --- a/src/components/entity/ha-battery-icon.ts +++ b/src/components/entity/ha-battery-icon.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { batteryIcon } from "../../common/entity/battery_icon"; import "../ha-icon"; diff --git a/src/components/entity/ha-entities-picker.ts b/src/components/entity/ha-entities-picker.ts index 0ac66ed8fa..3f754e464c 100644 --- a/src/components/entity/ha-entities-picker.ts +++ b/src/components/entity/ha-entities-picker.ts @@ -1,11 +1,6 @@ import type { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { isValidEntityId } from "../../common/entity/valid_entity_id"; import type { PolymerChangedEvent } from "../../polymer-types"; diff --git a/src/components/entity/ha-entity-attribute-picker.ts b/src/components/entity/ha-entity-attribute-picker.ts index 10ffef76db..729c94db77 100644 --- a/src/components/entity/ha-entity-attribute-picker.ts +++ b/src/components/entity/ha-entity-attribute-picker.ts @@ -7,14 +7,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { PolymerChangedEvent } from "../../polymer-types"; import { HomeAssistant } from "../../types"; diff --git a/src/components/entity/ha-entity-picker.ts b/src/components/entity/ha-entity-picker.ts index e2307a529b..c5981a01e7 100644 --- a/src/components/entity/ha-entity-picker.ts +++ b/src/components/entity/ha-entity-picker.ts @@ -8,14 +8,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { computeDomain } from "../../common/entity/compute_domain"; diff --git a/src/components/entity/ha-entity-toggle.ts b/src/components/entity/ha-entity-toggle.ts index 19c08a57aa..0318741f0b 100644 --- a/src/components/entity/ha-entity-toggle.ts +++ b/src/components/entity/ha-entity-toggle.ts @@ -3,21 +3,20 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import { STATES_OFF } from "../../common/const"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { computeStateName } from "../../common/entity/compute_state_name"; import { UNAVAILABLE, UNAVAILABLE_STATES } from "../../data/entity"; import { forwardHaptic } from "../../data/haptics"; import { HomeAssistant } from "../../types"; +import "../ha-formfield"; import "../ha-icon-button"; import "../ha-switch"; -import "../ha-formfield"; const isOn = (stateObj?: HassEntity) => stateObj !== undefined && diff --git a/src/components/entity/ha-state-label-badge.ts b/src/components/entity/ha-state-label-badge.ts index e2ce11c133..7bed0b3002 100644 --- a/src/components/entity/ha-state-label-badge.ts +++ b/src/components/entity/ha-state-label-badge.ts @@ -2,15 +2,13 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import secondsToDuration from "../../common/datetime/seconds_to_duration"; import { computeStateDisplay } from "../../common/entity/compute_state_display"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; diff --git a/src/components/entity/state-badge.ts b/src/components/entity/state-badge.ts index 76604f87bd..16043f79dd 100644 --- a/src/components/entity/state-badge.ts +++ b/src/components/entity/state-badge.ts @@ -3,14 +3,13 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import { computeActiveState } from "../../common/entity/compute_active_state"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { stateIcon } from "../../common/entity/state_icon"; diff --git a/src/components/entity/state-info.ts b/src/components/entity/state-info.ts index 8e56ee10f7..a4dbd8b87e 100644 --- a/src/components/entity/state-info.ts +++ b/src/components/entity/state-info.ts @@ -1,14 +1,7 @@ import "@polymer/paper-tooltip/paper-tooltip"; import type { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { computeStateName } from "../../common/entity/compute_state_name"; import { computeRTL } from "../../common/util/compute_rtl"; import type { HomeAssistant } from "../../types"; diff --git a/src/components/ha-addon-picker.ts b/src/components/ha-addon-picker.ts index 05d5f30bbd..421b297750 100644 --- a/src/components/ha-addon-picker.ts +++ b/src/components/ha-addon-picker.ts @@ -1,12 +1,5 @@ -import { - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { isComponentLoaded } from "../common/config/is_component_loaded"; import { fireEvent } from "../common/dom/fire_event"; import { compare } from "../common/string/compare"; diff --git a/src/components/ha-analytics-learn-more.ts b/src/components/ha-analytics-learn-more.ts index 75acdab0b5..e806b2e459 100644 --- a/src/components/ha-analytics-learn-more.ts +++ b/src/components/ha-analytics-learn-more.ts @@ -1,4 +1,4 @@ -import { html } from "lit-element"; +import { html } from "lit"; import { HomeAssistant } from "../types"; import { documentationUrl } from "../util/documentation-url"; diff --git a/src/components/ha-analytics.ts b/src/components/ha-analytics.ts index f357342581..d81cbf379c 100644 --- a/src/components/ha-analytics.ts +++ b/src/components/ha-analytics.ts @@ -1,13 +1,6 @@ import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { Analytics, AnalyticsPreferences } from "../data/analytics"; import { haStyle } from "../resources/styles"; diff --git a/src/components/ha-area-picker.ts b/src/components/ha-area-picker.ts index fc48bac838..1781bcc040 100644 --- a/src/components/ha-area-picker.ts +++ b/src/components/ha-area-picker.ts @@ -9,15 +9,12 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../common/dom/fire_event"; import { computeDomain } from "../common/entity/compute_domain"; diff --git a/src/components/ha-attributes.ts b/src/components/ha-attributes.ts index 24af62f6a6..79de3b3a68 100644 --- a/src/components/ha-attributes.ts +++ b/src/components/ha-attributes.ts @@ -1,18 +1,11 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { until } from "lit-html/directives/until"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { until } from "lit/directives/until"; +import { haStyle } from "../resources/styles"; import hassAttributeUtil, { formatAttributeName, } from "../util/hass-attributes-util"; -import { haStyle } from "../resources/styles"; let jsYamlPromise: Promise; diff --git a/src/components/ha-bar.ts b/src/components/ha-bar.ts index 0c58dd5964..d53abb15c7 100644 --- a/src/components/ha-bar.ts +++ b/src/components/ha-bar.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, - svg, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, LitElement, svg, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { getValueInPercentage, normalize, diff --git a/src/components/ha-blueprint-picker.ts b/src/components/ha-blueprint-picker.ts index 276298c6c3..2f3a302c35 100644 --- a/src/components/ha-blueprint-picker.ts +++ b/src/components/ha-blueprint-picker.ts @@ -1,15 +1,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../common/dom/fire_event"; import { compare } from "../common/string/compare"; diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 27c75b9ac5..52e27af49e 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -1,15 +1,7 @@ import "@material/mwc-menu"; import type { Corner, Menu } from "@material/mwc-menu"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; @customElement("ha-button-menu") export class HaButtonMenu extends LitElement { @property() public corner: Corner = "TOP_START"; diff --git a/src/components/ha-button-related-filter-menu.ts b/src/components/ha-button-related-filter-menu.ts index 1a2eba9209..02db7f1e20 100644 --- a/src/components/ha-button-related-filter-menu.ts +++ b/src/components/ha-button-related-filter-menu.ts @@ -1,26 +1,18 @@ import "@material/mwc-icon-button"; import type { Corner } from "@material/mwc-menu"; -import { mdiFilterVariant } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; import "@material/mwc-menu/mwc-menu-surface"; +import { mdiFilterVariant } from "@mdi/js"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; -import { findRelated, RelatedResult } from "../data/search"; -import type { HomeAssistant } from "../types"; -import "./ha-svg-icon"; -import "./ha-area-picker"; -import "./device/ha-device-picker"; -import "./entity/ha-entity-picker"; import { computeStateName } from "../common/entity/compute_state_name"; import { computeDeviceName } from "../data/device_registry"; +import { findRelated, RelatedResult } from "../data/search"; +import type { HomeAssistant } from "../types"; +import "./device/ha-device-picker"; +import "./entity/ha-entity-picker"; +import "./ha-area-picker"; +import "./ha-svg-icon"; declare global { // for fire event diff --git a/src/components/ha-button-toggle-group.ts b/src/components/ha-button-toggle-group.ts index f6aa48c317..374be87341 100644 --- a/src/components/ha-button-toggle-group.ts +++ b/src/components/ha-button-toggle-group.ts @@ -1,15 +1,8 @@ import "@material/mwc-button/mwc-button"; import "@material/mwc-icon-button/mwc-icon-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import { fireEvent } from "../common/dom/fire_event"; import type { ToggleButton } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-camera-stream.ts b/src/components/ha-camera-stream.ts index acd0c90ff2..9d91e81ffd 100644 --- a/src/components/ha-camera-stream.ts +++ b/src/components/ha-camera-stream.ts @@ -1,18 +1,16 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../common/config/is_component_loaded"; import { fireEvent } from "../common/dom/fire_event"; import { computeStateName } from "../common/entity/compute_state_name"; import { supportsFeature } from "../common/entity/supports-feature"; -import { isComponentLoaded } from "../common/config/is_component_loaded"; import { CameraEntity, CAMERA_SUPPORT_STREAM, diff --git a/src/components/ha-card.ts b/src/components/ha-card.ts index 7ec2045fe7..a5a6702b5b 100644 --- a/src/components/ha-card.ts +++ b/src/components/ha-card.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; @customElement("ha-card") export class HaCard extends LitElement { diff --git a/src/components/ha-checkbox.ts b/src/components/ha-checkbox.ts index 713d62d1d9..b3f5a1a2f4 100644 --- a/src/components/ha-checkbox.ts +++ b/src/components/ha-checkbox.ts @@ -1,12 +1,8 @@ -import "@material/mwc-checkbox"; -import type { Checkbox } from "@material/mwc-checkbox"; -import { customElement } from "lit-element"; -import type { Constructor } from "../types"; - -const MwcCheckbox = customElements.get("mwc-checkbox") as Constructor; +import { Checkbox } from "@material/mwc-checkbox"; +import { customElement } from "lit/decorators"; @customElement("ha-checkbox") -export class HaCheckbox extends MwcCheckbox { +export class HaCheckbox extends Checkbox { public firstUpdated() { super.firstUpdated(); this.style.setProperty("--mdc-theme-secondary", "var(--primary-color)"); diff --git a/src/components/ha-chip-set.ts b/src/components/ha-chip-set.ts index 0d6fed061e..2b2bb6a9e9 100644 --- a/src/components/ha-chip-set.ts +++ b/src/components/ha-chip-set.ts @@ -3,13 +3,12 @@ import chipStyles from "@material/chips/dist/mdc.chips.min.css"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, TemplateResult, unsafeCSS, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-chip"; diff --git a/src/components/ha-chip.ts b/src/components/ha-chip.ts index 3e317bc0b5..0c8dce7edc 100644 --- a/src/components/ha-chip.ts +++ b/src/components/ha-chip.ts @@ -1,17 +1,15 @@ // @ts-ignore import chipStyles from "@material/chips/dist/mdc.chips.min.css"; -import { ripple } from "@material/mwc-ripple/ripple-directive"; -import "./ha-icon"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, TemplateResult, unsafeCSS, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import "./ha-icon"; declare global { // for fire event @@ -34,7 +32,7 @@ export class HaChip extends LitElement { ` : null} -
+
diff --git a/src/components/ha-circular-progress.ts b/src/components/ha-circular-progress.ts index 7b69afa6b8..0e9e2db188 100644 --- a/src/components/ha-circular-progress.ts +++ b/src/components/ha-circular-progress.ts @@ -1,5 +1,5 @@ import { CircularProgress } from "@material/mwc-circular-progress"; -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; @customElement("ha-circular-progress") // @ts-ignore diff --git a/src/components/ha-climate-state.ts b/src/components/ha-climate-state.ts index bc330ff3b1..e9a14f653c 100644 --- a/src/components/ha-climate-state.ts +++ b/src/components/ha-climate-state.ts @@ -1,13 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { formatNumber } from "../common/string/format_number"; import { CLIMATE_PRESET_NONE } from "../data/climate"; import type { HomeAssistant } from "../types"; diff --git a/src/components/ha-code-editor.ts b/src/components/ha-code-editor.ts index 678eef7304..1aae3d649c 100644 --- a/src/components/ha-code-editor.ts +++ b/src/components/ha-code-editor.ts @@ -1,13 +1,6 @@ import type { EditorView, KeyBinding, ViewUpdate } from "@codemirror/view"; -import { - customElement, - state, - property, - PropertyValues, - ReactiveElement, - css, - CSSResultGroup, -} from "lit-element"; +import { css, CSSResultGroup, PropertyValues, ReactiveElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { loadCodeMirror } from "../resources/codemirror.ondemand"; diff --git a/src/components/ha-color-picker.js b/src/components/ha-color-picker.js index e692ef3076..f94018ab71 100644 --- a/src/components/ha-color-picker.js +++ b/src/components/ha-color-picker.js @@ -1,8 +1,8 @@ import { html } from "@polymer/polymer/lib/utils/html-tag"; /* eslint-plugin-disable lit */ import { PolymerElement } from "@polymer/polymer/polymer-element"; -import { EventsMixin } from "../mixins/events-mixin"; import { hs2rgb, rgb2hs } from "../common/color/convert-color"; +import { EventsMixin } from "../mixins/events-mixin"; /** * Color-picker custom element * diff --git a/src/components/ha-combo-box.ts b/src/components/ha-combo-box.ts index be09112404..eb122e1c7e 100644 --- a/src/components/ha-combo-box.ts +++ b/src/components/ha-combo-box.ts @@ -5,17 +5,8 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; import "@polymer/paper-listbox/paper-listbox"; import "@vaadin/vaadin-combo-box/theme/material/vaadin-combo-box-light"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { PolymerChangedEvent } from "../polymer-types"; import { HomeAssistant } from "../types"; diff --git a/src/components/ha-cover-controls.ts b/src/components/ha-cover-controls.ts index bbe03b6af4..446d9e76e7 100644 --- a/src/components/ha-cover-controls.ts +++ b/src/components/ha-cover-controls.ts @@ -2,15 +2,13 @@ import type { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { computeCloseIcon, computeOpenIcon } from "../common/entity/cover_icon"; import { UNAVAILABLE } from "../data/entity"; import type { HomeAssistant } from "../types"; diff --git a/src/components/ha-cover-tilt-controls.ts b/src/components/ha-cover-tilt-controls.ts index 9ae7e1eb8d..6bc444cec5 100644 --- a/src/components/ha-cover-tilt-controls.ts +++ b/src/components/ha-cover-tilt-controls.ts @@ -2,15 +2,13 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { UNAVAILABLE } from "../data/entity"; import { HomeAssistant } from "../types"; import CoverEntity from "../util/cover-model"; diff --git a/src/components/ha-date-input.ts b/src/components/ha-date-input.ts index a7ec481461..d2289c464b 100644 --- a/src/components/ha-date-input.ts +++ b/src/components/ha-date-input.ts @@ -1,17 +1,9 @@ -import "@vaadin/vaadin-date-picker/theme/material/vaadin-date-picker-light"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; -import "@polymer/paper-input/paper-input"; -import { fireEvent } from "../common/dom/fire_event"; import { mdiCalendar } from "@mdi/js"; +import "@polymer/paper-input/paper-input"; +import "@vaadin/vaadin-date-picker/theme/material/vaadin-date-picker-light"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, query } from "lit/decorators"; +import { fireEvent } from "../common/dom/fire_event"; import "./ha-svg-icon"; const i18n = { diff --git a/src/components/ha-date-range-picker.ts b/src/components/ha-date-range-picker.ts index 0b67c7e50a..15d8df0d79 100644 --- a/src/components/ha-date-range-picker.ts +++ b/src/components/ha-date-range-picker.ts @@ -7,13 +7,12 @@ import "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { formatDateTime } from "../common/datetime/format_date_time"; import { computeRTLDirection } from "../common/util/compute_rtl"; import { HomeAssistant } from "../types"; diff --git a/src/components/ha-dialog.ts b/src/components/ha-dialog.ts index a38faff951..b776bdf6cb 100644 --- a/src/components/ha-dialog.ts +++ b/src/components/ha-dialog.ts @@ -1,14 +1,11 @@ -import "@material/mwc-dialog"; -import type { Dialog } from "@material/mwc-dialog"; -import { style } from "@material/mwc-dialog/mwc-dialog-css"; +import { Dialog } from "@material/mwc-dialog"; import { mdiClose } from "@mdi/js"; -import { css, CSSResultGroup, customElement, html } from "lit-element"; +import { css, CSSResultGroup, html } from "lit"; +import { customElement } from "lit/decorators"; import { computeRTLDirection } from "../common/util/compute_rtl"; -import type { Constructor, HomeAssistant } from "../types"; +import type { HomeAssistant } from "../types"; import "./ha-icon-button"; -const MwcDialog = customElements.get("mwc-dialog") as Constructor; - export const createCloseHeading = (hass: HomeAssistant, title: string) => html` ${title} html` `; @customElement("ha-dialog") -export class HaDialog extends MwcDialog { +// @ts-expect-error +export class HaDialog extends Dialog { public scrollToPos(x: number, y: number) { this.contentElement.scrollTo(x, y); } @@ -33,7 +31,7 @@ export class HaDialog extends MwcDialog { protected static get styles(): CSSResultGroup { return [ - style, + Dialog.styles, css` .mdc-dialog { --mdc-dialog-scroll-divider-color: var(--divider-color); diff --git a/src/components/ha-expansion-panel.ts b/src/components/ha-expansion-panel.ts index 0676b6a178..9bed7d4fcf 100644 --- a/src/components/ha-expansion-panel.ts +++ b/src/components/ha-expansion-panel.ts @@ -1,15 +1,7 @@ import { mdiChevronDown } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-svg-icon"; diff --git a/src/components/ha-fab.ts b/src/components/ha-fab.ts index 9725630b6c..c2f58b8f0f 100644 --- a/src/components/ha-fab.ts +++ b/src/components/ha-fab.ts @@ -1,12 +1,8 @@ -import "@material/mwc-fab"; -import type { Fab } from "@material/mwc-fab"; -import { customElement } from "lit-element"; -import { Constructor } from "../types"; - -const MwcFab = customElements.get("mwc-fab") as Constructor; +import { Fab } from "@material/mwc-fab"; +import { customElement } from "lit/decorators"; @customElement("ha-fab") -export class HaFab extends MwcFab { +export class HaFab extends Fab { protected firstUpdated(changedProperties) { super.firstUpdated(changedProperties); this.style.setProperty("--mdc-theme-secondary", "var(--primary-color)"); diff --git a/src/components/ha-file-upload.ts b/src/components/ha-file-upload.ts index d3324d63c4..2eec7319c0 100644 --- a/src/components/ha-file-upload.ts +++ b/src/components/ha-file-upload.ts @@ -2,18 +2,9 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiClose } from "@mdi/js"; import "@polymer/iron-input/iron-input"; import "@polymer/paper-input/paper-input-container"; -import { - css, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-circular-progress"; import "./ha-svg-icon"; diff --git a/src/components/ha-form/ha-form-boolean.ts b/src/components/ha-form/ha-form-boolean.ts index 2eac24c33f..2bf264a498 100644 --- a/src/components/ha-form/ha-form-boolean.ts +++ b/src/components/ha-form/ha-form-boolean.ts @@ -1,15 +1,7 @@ import "@polymer/paper-checkbox/paper-checkbox"; import type { PaperCheckboxElement } from "@polymer/paper-checkbox/paper-checkbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import type { HaFormBooleanData, diff --git a/src/components/ha-form/ha-form-constant.ts b/src/components/ha-form/ha-form-constant.ts index e860191635..d05e9ac5f6 100644 --- a/src/components/ha-form/ha-form-constant.ts +++ b/src/components/ha-form/ha-form-constant.ts @@ -1,13 +1,12 @@ import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HaFormConstantSchema, HaFormElement } from "./ha-form"; diff --git a/src/components/ha-form/ha-form-float.ts b/src/components/ha-form/ha-form-float.ts index 9720f0ffd2..edf3c13576 100644 --- a/src/components/ha-form/ha-form-float.ts +++ b/src/components/ha-form/ha-form-float.ts @@ -1,13 +1,7 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HaFormElement, HaFormFloatData, HaFormFloatSchema } from "./ha-form"; diff --git a/src/components/ha-form/ha-form-integer.ts b/src/components/ha-form/ha-form-integer.ts index cb8fa55d46..6f0ec4cfab 100644 --- a/src/components/ha-form/ha-form-integer.ts +++ b/src/components/ha-form/ha-form-integer.ts @@ -2,16 +2,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-slider/paper-slider"; import type { PaperSliderElement } from "@polymer/paper-slider/paper-slider"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HaCheckbox } from "../ha-checkbox"; import "../ha-slider"; diff --git a/src/components/ha-form/ha-form-multi_select.ts b/src/components/ha-form/ha-form-multi_select.ts index c9424e4ec6..93ad92bd65 100644 --- a/src/components/ha-form/ha-form-multi_select.ts +++ b/src/components/ha-form/ha-form-multi_select.ts @@ -4,17 +4,8 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; import "@polymer/paper-menu-button/paper-menu-button"; import "@polymer/paper-ripple/paper-ripple"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../ha-icon"; import { diff --git a/src/components/ha-form/ha-form-positive_time_period_dict.ts b/src/components/ha-form/ha-form-positive_time_period_dict.ts index 453eaf2a68..04ec575981 100644 --- a/src/components/ha-form/ha-form-positive_time_period_dict.ts +++ b/src/components/ha-form/ha-form-positive_time_period_dict.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../ha-time-input"; import { HaFormElement, HaFormTimeData, HaFormTimeSchema } from "./ha-form"; diff --git a/src/components/ha-form/ha-form-select.ts b/src/components/ha-form/ha-form-select.ts index 05ee346726..5cf9dc013d 100644 --- a/src/components/ha-form/ha-form-select.ts +++ b/src/components/ha-form/ha-form-select.ts @@ -1,15 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../ha-paper-dropdown-menu"; import { HaFormElement, HaFormSelectData, HaFormSelectSchema } from "./ha-form"; diff --git a/src/components/ha-form/ha-form-string.ts b/src/components/ha-form/ha-form-string.ts index d78d793268..82e4520bfa 100644 --- a/src/components/ha-form/ha-form-string.ts +++ b/src/components/ha-form/ha-form-string.ts @@ -1,17 +1,9 @@ +import "@material/mwc-icon-button/mwc-icon-button"; import { mdiEye, mdiEyeOff } from "@mdi/js"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../ha-svg-icon"; import type { @@ -19,7 +11,6 @@ import type { HaFormStringData, HaFormStringSchema, } from "./ha-form"; -import "@material/mwc-icon-button/mwc-icon-button"; @customElement("ha-form-string") export class HaFormString extends LitElement implements HaFormElement { diff --git a/src/components/ha-form/ha-form.ts b/src/components/ha-form/ha-form.ts index 4b7f3ef7d8..1a4c02e319 100644 --- a/src/components/ha-form/ha-form.ts +++ b/src/components/ha-form/ha-form.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { dynamicElement } from "../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../common/dom/fire_event"; import { HaTimeData } from "../ha-time-input"; diff --git a/src/components/ha-formfield.ts b/src/components/ha-formfield.ts index 9b31ed66f5..e7c9232f1d 100644 --- a/src/components/ha-formfield.ts +++ b/src/components/ha-formfield.ts @@ -1,18 +1,12 @@ -import "@material/mwc-formfield"; -import type { Formfield } from "@material/mwc-formfield"; -import { style } from "@material/mwc-formfield/mwc-formfield-css"; -import { css, CSSResultGroup, customElement } from "lit-element"; -import { Constructor } from "../types"; - -const MwcFormfield = customElements.get( - "mwc-formfield" -) as Constructor; - +import { Formfield } from "@material/mwc-formfield"; +import { css, CSSResultGroup } from "lit"; +import { customElement } from "lit/decorators"; @customElement("ha-formfield") -export class HaFormfield extends MwcFormfield { +// @ts-expect-error +export class HaFormfield extends Formfield { protected static get styles(): CSSResultGroup { return [ - style, + Formfield.styles, css` :host(:not([alignEnd])) ::slotted(ha-switch) { margin-right: 10px; diff --git a/src/components/ha-gauge.ts b/src/components/ha-gauge.ts index 11db5a890f..19fb9a4572 100644 --- a/src/components/ha-gauge.ts +++ b/src/components/ha-gauge.ts @@ -1,14 +1,7 @@ -import { - css, - customElement, - state, - LitElement, - property, - PropertyValues, - svg, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, LitElement, PropertyValues, svg } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import { formatNumber } from "../common/string/format_number"; import { afterNextRender } from "../common/util/render-status"; import { FrontendTranslationData } from "../data/translation"; diff --git a/src/components/ha-header-bar.ts b/src/components/ha-header-bar.ts index 0677e96673..68111455af 100644 --- a/src/components/ha-header-bar.ts +++ b/src/components/ha-header-bar.ts @@ -1,6 +1,7 @@ // @ts-ignore import topAppBarStyles from "@material/top-app-bar/dist/mdc.top-app-bar.min.css"; -import { css, customElement, html, LitElement, unsafeCSS } from "lit-element"; +import { css, html, LitElement, unsafeCSS } from "lit"; +import { customElement } from "lit/decorators"; @customElement("ha-header-bar") export class HaHeaderBar extends LitElement { diff --git a/src/components/ha-help-tooltip.ts b/src/components/ha-help-tooltip.ts index 73e60e5799..1194f77b98 100644 --- a/src/components/ha-help-tooltip.ts +++ b/src/components/ha-help-tooltip.ts @@ -1,13 +1,7 @@ import { mdiHelpCircle } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "./ha-svg-icon"; @customElement("ha-help-tooltip") diff --git a/src/components/ha-hls-player.ts b/src/components/ha-hls-player.ts index ee9d20001b..857e2c1874 100644 --- a/src/components/ha-hls-player.ts +++ b/src/components/ha-hls-player.ts @@ -2,15 +2,12 @@ import type HlsType from "hls.js"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, query, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { nextRender } from "../common/util/render-status"; import { getExternalConfig } from "../external_app/external_config"; diff --git a/src/components/ha-icon-button-arrow-next.ts b/src/components/ha-icon-button-arrow-next.ts index d6076d7ffd..a0c58a48ef 100644 --- a/src/components/ha-icon-button-arrow-next.ts +++ b/src/components/ha-icon-button-arrow-next.ts @@ -1,13 +1,7 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiArrowLeft, mdiArrowRight } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-icon-button-arrow-prev.ts b/src/components/ha-icon-button-arrow-prev.ts index 50ef9120ee..dc192b88fe 100644 --- a/src/components/ha-icon-button-arrow-prev.ts +++ b/src/components/ha-icon-button-arrow-prev.ts @@ -1,13 +1,7 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiArrowLeft, mdiArrowRight } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-icon-button-next.ts b/src/components/ha-icon-button-next.ts index 8b4df6eb54..8f3a039ca0 100644 --- a/src/components/ha-icon-button-next.ts +++ b/src/components/ha-icon-button-next.ts @@ -1,13 +1,7 @@ import "@material/mwc-icon-button"; import { mdiChevronLeft, mdiChevronRight } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-icon-button-prev.ts b/src/components/ha-icon-button-prev.ts index 3a962bc23a..9bad876137 100644 --- a/src/components/ha-icon-button-prev.ts +++ b/src/components/ha-icon-button-prev.ts @@ -1,13 +1,7 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiChevronLeft, mdiChevronRight } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-icon-button.ts b/src/components/ha-icon-button.ts index 3e57d5a9b6..1195a8517a 100644 --- a/src/components/ha-icon-button.ts +++ b/src/components/ha-icon-button.ts @@ -1,13 +1,6 @@ import "@material/mwc-icon-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "./ha-icon"; @customElement("ha-icon-button") diff --git a/src/components/ha-icon-input.ts b/src/components/ha-icon-input.ts index 11f310c91f..fb62e3addb 100644 --- a/src/components/ha-icon-input.ts +++ b/src/components/ha-icon-input.ts @@ -1,12 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - css, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-icon"; diff --git a/src/components/ha-icon.ts b/src/components/ha-icon.ts index ba1a4a74da..3d43596f10 100644 --- a/src/components/ha-icon.ts +++ b/src/components/ha-icon.ts @@ -2,14 +2,12 @@ import "@polymer/iron-icon/iron-icon"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { debounce } from "../common/util/debounce"; import { CustomIcon, customIconsets } from "../data/custom_iconsets"; diff --git a/src/components/ha-label-badge.ts b/src/components/ha-label-badge.ts index 66aa2dc0bc..67569aeecb 100644 --- a/src/components/ha-label-badge.ts +++ b/src/components/ha-label-badge.ts @@ -3,11 +3,11 @@ import { CSSResultGroup, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "./ha-icon"; class HaLabelBadge extends LitElement { diff --git a/src/components/ha-markdown-element.ts b/src/components/ha-markdown-element.ts index 840fc97395..e0df4e40b7 100644 --- a/src/components/ha-markdown-element.ts +++ b/src/components/ha-markdown-element.ts @@ -1,4 +1,5 @@ -import { customElement, property, ReactiveElement } from "lit-element"; +import { ReactiveElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { renderMarkdown } from "../resources/render-markdown"; diff --git a/src/components/ha-markdown.ts b/src/components/ha-markdown.ts index b47e96e706..0f192bac32 100644 --- a/src/components/ha-markdown.ts +++ b/src/components/ha-markdown.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "./ha-markdown-element"; @customElement("ha-markdown") diff --git a/src/components/ha-menu-button.ts b/src/components/ha-menu-button.ts index 067bf93324..2249b6fa24 100644 --- a/src/components/ha-menu-button.ts +++ b/src/components/ha-menu-button.ts @@ -1,16 +1,8 @@ import "@material/mwc-icon-button"; import { mdiMenu } from "@mdi/js"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { computeDomain } from "../common/entity/compute_domain"; import { subscribeNotifications } from "../data/persistent_notification"; diff --git a/src/components/ha-picture-upload.ts b/src/components/ha-picture-upload.ts index f63eaedf4a..5111b07644 100644 --- a/src/components/ha-picture-upload.ts +++ b/src/components/ha-picture-upload.ts @@ -2,14 +2,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiImagePlus } from "@mdi/js"; import "@polymer/iron-input/iron-input"; import "@polymer/paper-input/paper-input-container"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { createImage, generateImageThumbnailUrl } from "../data/image"; import { showAlertDialog } from "../dialogs/generic/show-dialog-box"; diff --git a/src/components/ha-radio.ts b/src/components/ha-radio.ts index 8796750a74..f1269e5a9f 100644 --- a/src/components/ha-radio.ts +++ b/src/components/ha-radio.ts @@ -1,12 +1,7 @@ -import "@material/mwc-radio"; -import type { Radio } from "@material/mwc-radio"; -import { customElement } from "lit-element"; -import type { Constructor } from "../types"; - -const MwcRadio = customElements.get("mwc-radio") as Constructor; - +import { Radio } from "@material/mwc-radio"; +import { customElement } from "lit/decorators"; @customElement("ha-radio") -export class HaRadio extends MwcRadio { +export class HaRadio extends Radio { public firstUpdated() { super.firstUpdated(); this.style.setProperty("--mdc-theme-secondary", "var(--primary-color)"); diff --git a/src/components/ha-related-items.ts b/src/components/ha-related-items.ts index 9bee1152b5..4da2605b80 100644 --- a/src/components/ha-related-items.ts +++ b/src/components/ha-related-items.ts @@ -2,14 +2,12 @@ import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { AreaRegistryEntry, diff --git a/src/components/ha-relative-time.ts b/src/components/ha-relative-time.ts index 83ad795ac7..36da1ab190 100644 --- a/src/components/ha-relative-time.ts +++ b/src/components/ha-relative-time.ts @@ -1,9 +1,5 @@ -import { - customElement, - property, - PropertyValues, - ReactiveElement, -} from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { customElement, property } from "lit/decorators"; import relativeTime from "../common/datetime/relative_time"; import type { HomeAssistant } from "../types"; diff --git a/src/components/ha-selector/ha-selector-action.ts b/src/components/ha-selector/ha-selector-action.ts index 321e5f4f00..5a6fd5f6c3 100644 --- a/src/components/ha-selector/ha-selector-action.ts +++ b/src/components/ha-selector/ha-selector-action.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { Action } from "../../data/script"; import { ActionSelector } from "../../data/selector"; import "../../panels/config/automation/action/ha-automation-action"; diff --git a/src/components/ha-selector/ha-selector-addon.ts b/src/components/ha-selector/ha-selector-addon.ts index 923fb4c29e..30214933f1 100644 --- a/src/components/ha-selector/ha-selector-addon.ts +++ b/src/components/ha-selector/ha-selector-addon.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { AddonSelector } from "../../data/selector"; import { HomeAssistant } from "../../types"; import "../ha-addon-picker"; diff --git a/src/components/ha-selector/ha-selector-area.ts b/src/components/ha-selector/ha-selector-area.ts index 5fb5621570..5d619bf0e8 100644 --- a/src/components/ha-selector/ha-selector-area.ts +++ b/src/components/ha-selector/ha-selector-area.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { ConfigEntry, getConfigEntries } from "../../data/config_entries"; import { DeviceRegistryEntry } from "../../data/device_registry"; import { EntityRegistryEntry } from "../../data/entity_registry"; diff --git a/src/components/ha-selector/ha-selector-boolean.ts b/src/components/ha-selector/ha-selector-boolean.ts index 7299316b72..154ecc4c9a 100644 --- a/src/components/ha-selector/ha-selector-boolean.ts +++ b/src/components/ha-selector/ha-selector-boolean.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HomeAssistant } from "../../types"; import "../ha-formfield"; diff --git a/src/components/ha-selector/ha-selector-device.ts b/src/components/ha-selector/ha-selector-device.ts index b528beb784..bdf945899c 100644 --- a/src/components/ha-selector/ha-selector-device.ts +++ b/src/components/ha-selector/ha-selector-device.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { ConfigEntry, getConfigEntries } from "../../data/config_entries"; import { DeviceRegistryEntry } from "../../data/device_registry"; import { DeviceSelector } from "../../data/selector"; diff --git a/src/components/ha-selector/ha-selector-entity.ts b/src/components/ha-selector/ha-selector-entity.ts index 884905f7bb..a2cb042c72 100644 --- a/src/components/ha-selector/ha-selector-entity.ts +++ b/src/components/ha-selector/ha-selector-entity.ts @@ -1,5 +1,6 @@ import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket"; -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { subscribeEntityRegistry } from "../../data/entity_registry"; import { EntitySelector } from "../../data/selector"; diff --git a/src/components/ha-selector/ha-selector-number.ts b/src/components/ha-selector/ha-selector-number.ts index 8f64b386bf..244f97e2ce 100644 --- a/src/components/ha-selector/ha-selector-number.ts +++ b/src/components/ha-selector/ha-selector-number.ts @@ -1,13 +1,7 @@ import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../common/dom/fire_event"; import { NumberSelector } from "../../data/selector"; import { HomeAssistant } from "../../types"; diff --git a/src/components/ha-selector/ha-selector-object.ts b/src/components/ha-selector/ha-selector-object.ts index 208bbaa6d4..e003f28251 100644 --- a/src/components/ha-selector/ha-selector-object.ts +++ b/src/components/ha-selector/ha-selector-object.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HomeAssistant } from "../../types"; import "../ha-yaml-editor"; diff --git a/src/components/ha-selector/ha-selector-select.ts b/src/components/ha-selector/ha-selector-select.ts index ae19d099d5..450a6d7e6a 100644 --- a/src/components/ha-selector/ha-selector-select.ts +++ b/src/components/ha-selector/ha-selector-select.ts @@ -1,14 +1,8 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; -import { HomeAssistant } from "../../types"; import { SelectSelector } from "../../data/selector"; +import { HomeAssistant } from "../../types"; import "../ha-paper-dropdown-menu"; @customElement("ha-selector-select") diff --git a/src/components/ha-selector/ha-selector-target.ts b/src/components/ha-selector/ha-selector-target.ts index 814b69275c..6299f60bf1 100644 --- a/src/components/ha-selector/ha-selector-target.ts +++ b/src/components/ha-selector/ha-selector-target.ts @@ -8,15 +8,8 @@ import { HassServiceTarget, UnsubscribeFunc, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { ConfigEntry, getConfigEntries } from "../../data/config_entries"; import { DeviceRegistryEntry } from "../../data/device_registry"; import { diff --git a/src/components/ha-selector/ha-selector-text.ts b/src/components/ha-selector/ha-selector-text.ts index 9d2fbbd248..25cddf58d8 100644 --- a/src/components/ha-selector/ha-selector-text.ts +++ b/src/components/ha-selector/ha-selector-text.ts @@ -1,9 +1,10 @@ -import { customElement, html, LitElement, property } from "lit-element"; -import { fireEvent } from "../../common/dom/fire_event"; -import { HomeAssistant } from "../../types"; -import "@polymer/paper-input/paper-textarea"; import "@polymer/paper-input/paper-input"; +import "@polymer/paper-input/paper-textarea"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; +import { fireEvent } from "../../common/dom/fire_event"; import { StringSelector } from "../../data/selector"; +import { HomeAssistant } from "../../types"; @customElement("ha-selector-text") export class HaTextSelector extends LitElement { diff --git a/src/components/ha-selector/ha-selector-time.ts b/src/components/ha-selector/ha-selector-time.ts index 8fb0d530c0..48b57def22 100644 --- a/src/components/ha-selector/ha-selector-time.ts +++ b/src/components/ha-selector/ha-selector-time.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { TimeSelector } from "../../data/selector"; diff --git a/src/components/ha-selector/ha-selector.ts b/src/components/ha-selector/ha-selector.ts index 9982e33831..d426ec0b49 100644 --- a/src/components/ha-selector/ha-selector.ts +++ b/src/components/ha-selector/ha-selector.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { dynamicElement } from "../../common/dom/dynamic-element-directive"; import { Selector } from "../../data/selector"; import { HomeAssistant } from "../../types"; @@ -9,11 +10,11 @@ import "./ha-selector-boolean"; import "./ha-selector-device"; import "./ha-selector-entity"; import "./ha-selector-number"; -import "./ha-selector-target"; -import "./ha-selector-time"; import "./ha-selector-object"; -import "./ha-selector-text"; import "./ha-selector-select"; +import "./ha-selector-target"; +import "./ha-selector-text"; +import "./ha-selector-time"; @customElement("ha-selector") export class HaSelector extends LitElement { diff --git a/src/components/ha-service-control.ts b/src/components/ha-service-control.ts index 359183544d..a93b7aba26 100644 --- a/src/components/ha-service-control.ts +++ b/src/components/ha-service-control.ts @@ -4,17 +4,8 @@ import { HassServices, HassServiceTarget, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../common/dom/fire_event"; import { computeDomain } from "../common/entity/compute_domain"; diff --git a/src/components/ha-service-picker.ts b/src/components/ha-service-picker.ts index 1f7d8449d2..2bc92b97c4 100644 --- a/src/components/ha-service-picker.ts +++ b/src/components/ha-service-picker.ts @@ -1,4 +1,5 @@ -import { html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../common/dom/fire_event"; import { LocalizeFunc } from "../common/translations/localize"; diff --git a/src/components/ha-settings-row.ts b/src/components/ha-settings-row.ts index aa6f9d5707..a28738b265 100644 --- a/src/components/ha-settings-row.ts +++ b/src/components/ha-settings-row.ts @@ -1,13 +1,6 @@ import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; @customElement("ha-settings-row") export class HaSettingsRow extends LitElement { diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index a3fe63f50d..9cd8a320bd 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -15,18 +15,15 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import { css, - CSSResultGroup, - customElement, - eventOptions, - html, - state, - LitElement, - property, - PropertyValues, CSSResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { guard } from "lit-html/directives/guard"; + CSSResultGroup, + html, + LitElement, + PropertyValues, +} from "lit"; +import { customElement, eventOptions, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { guard } from "lit/directives/guard"; import memoizeOne from "memoize-one"; import { LocalStorage } from "../common/decorators/local-storage"; import { fireEvent } from "../common/dom/fire_event"; diff --git a/src/components/ha-svg-icon.ts b/src/components/ha-svg-icon.ts index b803d3bc6d..b8f6a3b5c7 100644 --- a/src/components/ha-svg-icon.ts +++ b/src/components/ha-svg-icon.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, - svg, - SVGTemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, LitElement, svg, SVGTemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; @customElement("ha-svg-icon") export class HaSvgIcon extends LitElement { diff --git a/src/components/ha-switch.ts b/src/components/ha-switch.ts index 77ce4b30dd..2ab7106190 100644 --- a/src/components/ha-switch.ts +++ b/src/components/ha-switch.ts @@ -1,14 +1,10 @@ -import "@material/mwc-switch"; -import type { Switch } from "@material/mwc-switch"; -import { style } from "@material/mwc-switch/mwc-switch-css"; -import { css, CSSResultGroup, customElement, property } from "lit-element"; +import { Switch } from "@material/mwc-switch"; +import { css, CSSResultGroup } from "lit"; +import { customElement, property } from "lit/decorators"; import { forwardHaptic } from "../data/haptics"; -import { Constructor } from "../types"; - -const MwcSwitch = customElements.get("mwc-switch") as Constructor; - @customElement("ha-switch") -export class HaSwitch extends MwcSwitch { +// @ts-expect-error +export class HaSwitch extends Switch { // Generate a haptic vibration. // Only set to true if the new value of the switch is applied right away when toggling. // Do not add haptic when a user is required to press save. @@ -27,9 +23,9 @@ export class HaSwitch extends MwcSwitch { }); } - protected static get styles(): CSSResultGroup { + static get styles(): CSSResultGroup { return [ - style, + Switch.styles, css` .mdc-switch.mdc-switch--checked .mdc-switch__thumb { background-color: var(--switch-checked-button-color); diff --git a/src/components/ha-tab.ts b/src/components/ha-tab.ts index 1306c7cb4e..ac0d81d921 100644 --- a/src/components/ha-tab.ts +++ b/src/components/ha-tab.ts @@ -1,19 +1,15 @@ import type { Ripple } from "@material/mwc-ripple"; import "@material/mwc-ripple/mwc-ripple"; import { RippleHandlers } from "@material/mwc-ripple/ripple-handlers"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import { - css, - CSSResultGroup, customElement, eventOptions, - html, - state, - LitElement, property, queryAsync, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; + state, +} from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import "./ha-icon"; import "./ha-svg-icon"; diff --git a/src/components/ha-tabs.ts b/src/components/ha-tabs.ts index 491d36462f..035663190f 100644 --- a/src/components/ha-tabs.ts +++ b/src/components/ha-tabs.ts @@ -2,7 +2,7 @@ import type { PaperIconButtonElement } from "@polymer/paper-icon-button/paper-ic import type { PaperTabElement } from "@polymer/paper-tabs/paper-tab"; import "@polymer/paper-tabs/paper-tabs"; import type { PaperTabsElement } from "@polymer/paper-tabs/paper-tabs"; -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { Constructor } from "../types"; const PaperTabs = customElements.get( diff --git a/src/components/ha-target-picker.ts b/src/components/ha-target-picker.ts index b2ceeb39f1..3e2e40260f 100644 --- a/src/components/ha-target-picker.ts +++ b/src/components/ha-target-picker.ts @@ -14,18 +14,9 @@ import { HassServiceTarget, UnsubscribeFunc, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - unsafeCSS, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, unsafeCSS } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../common/dom/fire_event"; import { ensureArray } from "../common/ensure-array"; import { computeDomain } from "../common/entity/compute_domain"; diff --git a/src/components/ha-time-input.ts b/src/components/ha-time-input.ts index e72e1a09d9..382ea4d569 100644 --- a/src/components/ha-time-input.ts +++ b/src/components/ha-time-input.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "./paper-time-input"; diff --git a/src/components/ha-yaml-editor.ts b/src/components/ha-yaml-editor.ts index f0eabb168d..07a1ac0a04 100644 --- a/src/components/ha-yaml-editor.ts +++ b/src/components/ha-yaml-editor.ts @@ -1,12 +1,6 @@ import { safeDump, safeLoad } from "js-yaml"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-code-editor"; diff --git a/src/components/map/ha-location-editor.ts b/src/components/map/ha-location-editor.ts index 8a7954cba6..b731aaead2 100644 --- a/src/components/map/ha-location-editor.ts +++ b/src/components/map/ha-location-editor.ts @@ -11,13 +11,12 @@ import { import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { LeafletModuleType, diff --git a/src/components/map/ha-locations-editor.ts b/src/components/map/ha-locations-editor.ts index 2dda009670..b0b8008906 100644 --- a/src/components/map/ha-locations-editor.ts +++ b/src/components/map/ha-locations-editor.ts @@ -11,13 +11,12 @@ import { import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { LeafletModuleType, diff --git a/src/components/map/ha-map.ts b/src/components/map/ha-map.ts index 3e4df08b30..fd29d2a268 100644 --- a/src/components/map/ha-map.ts +++ b/src/components/map/ha-map.ts @@ -2,13 +2,12 @@ import { Circle, Layer, Map, Marker, TileLayer } from "leaflet"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { LeafletModuleType, replaceTileLayer, diff --git a/src/components/media-player/dialog-media-player-browse.ts b/src/components/media-player/dialog-media-player-browse.ts index ba885213fa..6e5a54d973 100644 --- a/src/components/media-player/dialog-media-player-browse.ts +++ b/src/components/media-player/dialog-media-player-browse.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent, HASSDomEvent } from "../../common/dom/fire_event"; import type { MediaPickedEvent, diff --git a/src/components/media-player/ha-media-player-browse.ts b/src/components/media-player/ha-media-player-browse.ts index 1c7e093527..db5b8af6b3 100644 --- a/src/components/media-player/ha-media-player-browse.ts +++ b/src/components/media-player/ha-media-player-browse.ts @@ -8,19 +8,21 @@ import "@polymer/paper-tooltip/paper-tooltip"; import { css, CSSResultGroup, - customElement, - eventOptions, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { + customElement, + property, + state, + query, + eventOptions, +} from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import { fireEvent } from "../../common/dom/fire_event"; import { computeRTLDirection } from "../../common/util/compute_rtl"; import { debounce } from "../../common/util/debounce"; diff --git a/src/components/state-history-charts.ts b/src/components/state-history-charts.ts index 20abd72ae2..9be40220da 100644 --- a/src/components/state-history-charts.ts +++ b/src/components/state-history-charts.ts @@ -1,19 +1,18 @@ -import "./ha-circular-progress"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { isComponentLoaded } from "../common/config/is_component_loaded"; +import { HistoryResult } from "../data/history"; +import type { HomeAssistant } from "../types"; +import "./ha-circular-progress"; import "./state-history-chart-line"; import "./state-history-chart-timeline"; -import { isComponentLoaded } from "../common/config/is_component_loaded"; -import type { HomeAssistant } from "../types"; -import { HistoryResult } from "../data/history"; @customElement("state-history-charts") class StateHistoryCharts extends LitElement { diff --git a/src/components/trace/ha-timeline.ts b/src/components/trace/ha-timeline.ts index 4ce8b7b495..3ca99b56d2 100644 --- a/src/components/trace/ha-timeline.ts +++ b/src/components/trace/ha-timeline.ts @@ -1,13 +1,6 @@ import { mdiCircleOutline } from "@mdi/js"; -import { - LitElement, - customElement, - html, - css, - property, - TemplateResult, - state, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { buttonLinkStyle } from "../../resources/styles"; import "../ha-svg-icon"; diff --git a/src/components/trace/hat-graph-node.ts b/src/components/trace/hat-graph-node.ts index ae0b59aa87..5b0ba7ca64 100644 --- a/src/components/trace/hat-graph-node.ts +++ b/src/components/trace/hat-graph-node.ts @@ -1,5 +1,5 @@ -import { css, customElement, LitElement, property, svg } from "lit-element"; - +import { css, LitElement, svg } from "lit"; +import { customElement, property } from "lit/decorators"; import { NODE_SIZE, SPACING } from "./hat-graph"; @customElement("hat-graph-node") diff --git a/src/components/trace/hat-graph-spacer.ts b/src/components/trace/hat-graph-spacer.ts index 22c6770a1b..e30c05bd5a 100644 --- a/src/components/trace/hat-graph-spacer.ts +++ b/src/components/trace/hat-graph-spacer.ts @@ -1,5 +1,5 @@ -import { css, customElement, LitElement, property, svg } from "lit-element"; - +import { css, LitElement, svg } from "lit"; +import { customElement, property } from "lit/decorators"; import { NODE_SIZE, SPACING } from "./hat-graph"; @customElement("hat-graph-spacer") diff --git a/src/components/trace/hat-graph.ts b/src/components/trace/hat-graph.ts index c7e06ae663..93ecdf015e 100644 --- a/src/components/trace/hat-graph.ts +++ b/src/components/trace/hat-graph.ts @@ -1,12 +1,6 @@ -import { - css, - customElement, - html, - LitElement, - property, - svg, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, html, LitElement, svg } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; export const BRANCH_HEIGHT = 20; export const SPACING = 10; diff --git a/src/components/trace/hat-logbook-note.ts b/src/components/trace/hat-logbook-note.ts index 5d5b1f9df7..8df890bbf5 100644 --- a/src/components/trace/hat-logbook-note.ts +++ b/src/components/trace/hat-logbook-note.ts @@ -1,4 +1,5 @@ -import { LitElement, css, html, customElement } from "lit-element"; +import { css, html, LitElement } from "lit"; +import { customElement } from "lit/decorators"; @customElement("hat-logbook-note") class HatLogbookNote extends LitElement { diff --git a/src/components/trace/hat-script-graph.ts b/src/components/trace/hat-script-graph.ts index 7b0755ee4e..aff37a1032 100644 --- a/src/components/trace/hat-script-graph.ts +++ b/src/components/trace/hat-script-graph.ts @@ -1,19 +1,4 @@ -import { - html, - LitElement, - property, - customElement, - PropertyValues, - css, -} from "lit-element"; import "@material/mwc-icon-button/mwc-icon-button"; -import { fireEvent } from "../../common/dom/fire_event"; -import "../ha-svg-icon"; -import { - AutomationTraceExtended, - ChooseActionTraceStep, - ConditionTraceStep, -} from "../../data/trace"; import { mdiAbTesting, mdiArrowUp, @@ -32,9 +17,11 @@ import { mdiTimerOutline, mdiTrafficLight, } from "@mdi/js"; -import "./hat-graph-node"; -import { classMap } from "lit-html/directives/class-map"; -import { NODE_SIZE, SPACING, NodeInfo } from "./hat-graph"; +import { css, html, LitElement, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { fireEvent } from "../../common/dom/fire_event"; +import { ensureArray } from "../../common/ensure-array"; import { Condition, Trigger } from "../../data/automation"; import { Action, @@ -48,7 +35,14 @@ import { WaitAction, WaitForTriggerAction, } from "../../data/script"; -import { ensureArray } from "../../common/ensure-array"; +import { + AutomationTraceExtended, + ChooseActionTraceStep, + ConditionTraceStep, +} from "../../data/trace"; +import "../ha-svg-icon"; +import { NodeInfo, NODE_SIZE, SPACING } from "./hat-graph"; +import "./hat-graph-node"; import "./hat-graph-spacer"; declare global { diff --git a/src/components/trace/hat-trace-timeline.ts b/src/components/trace/hat-trace-timeline.ts index 67c4eb1f04..c56332f30b 100644 --- a/src/components/trace/hat-trace-timeline.ts +++ b/src/components/trace/hat-trace-timeline.ts @@ -1,24 +1,3 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; -import { formatDateTimeWithSeconds } from "../../common/datetime/format_date_time"; -import { - AutomationTraceExtended, - ChooseActionTraceStep, - getDataFromPath, - TriggerTraceStep, - isTriggerPath, -} from "../../data/trace"; -import { HomeAssistant } from "../../types"; -import "./ha-timeline"; -import type { HaTimeline } from "./ha-timeline"; import { mdiAlertCircle, mdiCircle, @@ -27,16 +6,36 @@ import { mdiProgressWrench, mdiRecordCircleOutline, } from "@mdi/js"; +import { + css, + CSSResultGroup, + html, + LitElement, + PropertyValues, + TemplateResult, +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { formatDateTimeWithSeconds } from "../../common/datetime/format_date_time"; +import relativeTime from "../../common/datetime/relative_time"; +import { fireEvent } from "../../common/dom/fire_event"; import { LogbookEntry } from "../../data/logbook"; import { ChooseAction, ChooseActionChoice, getActionType, } from "../../data/script"; -import relativeTime from "../../common/datetime/relative_time"; -import { fireEvent } from "../../common/dom/fire_event"; import { describeAction } from "../../data/script_i18n"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { + AutomationTraceExtended, + ChooseActionTraceStep, + getDataFromPath, + isTriggerPath, + TriggerTraceStep, +} from "../../data/trace"; +import { HomeAssistant } from "../../types"; +import "./ha-timeline"; +import type { HaTimeline } from "./ha-timeline"; const LOGBOOK_ENTRIES_BEFORE_FOLD = 2; diff --git a/src/components/user/ha-person-badge.ts b/src/components/user/ha-person-badge.ts index 07cdd916ac..9074ea7c9f 100644 --- a/src/components/user/ha-person-badge.ts +++ b/src/components/user/ha-person-badge.ts @@ -1,14 +1,7 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import { Person } from "../../data/person"; import { computeInitials } from "./ha-user-badge"; diff --git a/src/components/user/ha-user-badge.ts b/src/components/user/ha-user-badge.ts index 3e5411d8dc..86a7b9ea83 100644 --- a/src/components/user/ha-user-badge.ts +++ b/src/components/user/ha-user-badge.ts @@ -1,15 +1,7 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { User } from "../../data/user"; import { CurrentUser, HomeAssistant } from "../../types"; diff --git a/src/components/user/ha-user-picker.ts b/src/components/user/ha-user-picker.ts index 9a028ad7c6..89e779d3cc 100644 --- a/src/components/user/ha-user-picker.ts +++ b/src/components/user/ha-user-picker.ts @@ -3,14 +3,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { compare } from "../../common/string/compare"; diff --git a/src/components/user/ha-users-picker.ts b/src/components/user/ha-users-picker.ts index 886307f5f1..d0420b82dd 100644 --- a/src/components/user/ha-users-picker.ts +++ b/src/components/user/ha-users-picker.ts @@ -1,14 +1,7 @@ import { mdiClose } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { guard } from "lit-html/directives/guard"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { guard } from "lit/directives/guard"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { fetchUsers, User } from "../../data/user"; diff --git a/src/data/automation_i18n.ts b/src/data/automation_i18n.ts index 8dc2746556..c819ee340e 100644 --- a/src/data/automation_i18n.ts +++ b/src/data/automation_i18n.ts @@ -1,4 +1,4 @@ -import { Trigger, Condition } from "./automation"; +import { Condition, Trigger } from "./automation"; export const describeTrigger = (trigger: Trigger) => `${trigger.platform} trigger`; diff --git a/src/data/script_i18n.ts b/src/data/script_i18n.ts index 3b20e12865..338cb7c234 100644 --- a/src/data/script_i18n.ts +++ b/src/data/script_i18n.ts @@ -7,13 +7,13 @@ import { Condition } from "./automation"; import { describeCondition, describeTrigger } from "./automation_i18n"; import { ActionType, - getActionType, - DelayAction, - SceneAction, - WaitForTriggerAction, ActionTypes, - VariablesAction, + DelayAction, EventAction, + getActionType, + SceneAction, + VariablesAction, + WaitForTriggerAction, } from "./script"; export const describeAction = ( diff --git a/src/data/trace.ts b/src/data/trace.ts index cf5f18e6c2..a8d294454d 100644 --- a/src/data/trace.ts +++ b/src/data/trace.ts @@ -1,5 +1,5 @@ import { strStartsWith } from "../common/string/starts-with"; -import { HomeAssistant, Context } from "../types"; +import { Context, HomeAssistant } from "../types"; import { BlueprintAutomationConfig, ManualAutomationConfig, diff --git a/src/data/weather.ts b/src/data/weather.ts index e15844c9f4..3c27c13418 100644 --- a/src/data/weather.ts +++ b/src/data/weather.ts @@ -9,8 +9,8 @@ import { HassEntityAttributeBase, HassEntityBase, } from "home-assistant-js-websocket"; -import { css, html, svg, SVGTemplateResult, TemplateResult } from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, html, svg, SVGTemplateResult, TemplateResult } from "lit"; +import { styleMap } from "lit/directives/style-map"; import { formatNumber } from "../common/string/format_number"; import "../components/ha-icon"; import "../components/ha-svg-icon"; diff --git a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts index 442be29383..bd1f6bbcd1 100644 --- a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts +++ b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { computeRTLDirection } from "../../common/util/compute_rtl"; import "../../components/ha-circular-progress"; diff --git a/src/dialogs/config-flow/dialog-data-entry-flow.ts b/src/dialogs/config-flow/dialog-data-entry-flow.ts index 86529c24dc..abe31c81be 100644 --- a/src/dialogs/config-flow/dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/dialog-data-entry-flow.ts @@ -4,13 +4,12 @@ import type { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { computeRTL } from "../../common/util/compute_rtl"; import "../../components/ha-circular-progress"; @@ -41,9 +40,9 @@ import "./step-flow-create-entry"; import "./step-flow-external"; import "./step-flow-form"; import "./step-flow-loading"; +import "./step-flow-pick-flow"; import "./step-flow-pick-handler"; import "./step-flow-progress"; -import "./step-flow-pick-flow"; let instance = 0; diff --git a/src/dialogs/config-flow/show-dialog-config-flow.ts b/src/dialogs/config-flow/show-dialog-config-flow.ts index 207429fcfe..fc49d0bf1f 100644 --- a/src/dialogs/config-flow/show-dialog-config-flow.ts +++ b/src/dialogs/config-flow/show-dialog-config-flow.ts @@ -1,4 +1,4 @@ -import { html } from "lit-element"; +import { html } from "lit"; import { caseInsensitiveCompare } from "../../common/string/compare"; import { createConfigFlow, diff --git a/src/dialogs/config-flow/show-dialog-data-entry-flow.ts b/src/dialogs/config-flow/show-dialog-data-entry-flow.ts index 23c3961378..1f48db7e77 100644 --- a/src/dialogs/config-flow/show-dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/show-dialog-data-entry-flow.ts @@ -1,4 +1,4 @@ -import { TemplateResult } from "lit-html"; +import { TemplateResult } from "lit"; import { fireEvent } from "../../common/dom/fire_event"; import { HaFormSchema } from "../../components/ha-form/ha-form"; import { diff --git a/src/dialogs/config-flow/show-dialog-options-flow.ts b/src/dialogs/config-flow/show-dialog-options-flow.ts index e2346c660d..c138272920 100644 --- a/src/dialogs/config-flow/show-dialog-options-flow.ts +++ b/src/dialogs/config-flow/show-dialog-options-flow.ts @@ -1,4 +1,4 @@ -import { html } from "lit-element"; +import { html } from "lit"; import { ConfigEntry } from "../../data/config_entries"; import { createOptionsFlow, diff --git a/src/dialogs/config-flow/step-flow-abort.ts b/src/dialogs/config-flow/step-flow-abort.ts index 041e681e15..b581717f8b 100644 --- a/src/dialogs/config-flow/step-flow-abort.ts +++ b/src/dialogs/config-flow/step-flow-abort.ts @@ -1,12 +1,6 @@ import "@material/mwc-button"; -import { - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { DataEntryFlowStepAbort } from "../../data/data_entry_flow"; import { HomeAssistant } from "../../types"; diff --git a/src/dialogs/config-flow/step-flow-create-entry.ts b/src/dialogs/config-flow/step-flow-create-entry.ts index 8ee662ba66..2d08078c88 100644 --- a/src/dialogs/config-flow/step-flow-create-entry.ts +++ b/src/dialogs/config-flow/step-flow-create-entry.ts @@ -2,15 +2,8 @@ import "@material/mwc-button"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-area-picker"; import { DataEntryFlowStepCreateEntry } from "../../data/data_entry_flow"; diff --git a/src/dialogs/config-flow/step-flow-external.ts b/src/dialogs/config-flow/step-flow-external.ts index 28261e6433..419d9bcde5 100644 --- a/src/dialogs/config-flow/step-flow-external.ts +++ b/src/dialogs/config-flow/step-flow-external.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { DataEntryFlowStepExternal } from "../../data/data_entry_flow"; import { HomeAssistant } from "../../types"; import { FlowConfig } from "./show-dialog-data-entry-flow"; diff --git a/src/dialogs/config-flow/step-flow-form.ts b/src/dialogs/config-flow/step-flow-form.ts index f168cc68e2..403eccb3c8 100644 --- a/src/dialogs/config-flow/step-flow-form.ts +++ b/src/dialogs/config-flow/step-flow-form.ts @@ -3,13 +3,12 @@ import "@polymer/paper-tooltip/paper-tooltip"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-circular-progress"; import "../../components/ha-form/ha-form"; diff --git a/src/dialogs/config-flow/step-flow-loading.ts b/src/dialogs/config-flow/step-flow-loading.ts index c8df08ae34..bc10d71c7a 100644 --- a/src/dialogs/config-flow/step-flow-loading.ts +++ b/src/dialogs/config-flow/step-flow-loading.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../components/ha-circular-progress"; @customElement("step-flow-loading") diff --git a/src/dialogs/config-flow/step-flow-pick-flow.ts b/src/dialogs/config-flow/step-flow-pick-flow.ts index 94f4ae203e..0e407fad89 100644 --- a/src/dialogs/config-flow/step-flow-pick-flow.ts +++ b/src/dialogs/config-flow/step-flow-pick-flow.ts @@ -1,15 +1,8 @@ -import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item"; +import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-icon-next"; import { localizeConfigFlowTitle } from "../../data/config_flow"; diff --git a/src/dialogs/config-flow/step-flow-pick-handler.ts b/src/dialogs/config-flow/step-flow-pick-handler.ts index 4ab3e2eeda..421478857c 100644 --- a/src/dialogs/config-flow/step-flow-pick-handler.ts +++ b/src/dialogs/config-flow/step-flow-pick-handler.ts @@ -1,18 +1,10 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; import Fuse from "fuse.js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import "../../common/search/search-input"; diff --git a/src/dialogs/config-flow/step-flow-progress.ts b/src/dialogs/config-flow/step-flow-progress.ts index 347a178d95..3235ec55cb 100644 --- a/src/dialogs/config-flow/step-flow-progress.ts +++ b/src/dialogs/config-flow/step-flow-progress.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../components/ha-circular-progress"; import { DataEntryFlowStepProgress } from "../../data/data_entry_flow"; import { HomeAssistant } from "../../types"; diff --git a/src/dialogs/config-flow/styles.ts b/src/dialogs/config-flow/styles.ts index b6e2b8d831..008fed7c1b 100644 --- a/src/dialogs/config-flow/styles.ts +++ b/src/dialogs/config-flow/styles.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const configFlowContentStyles = css` h2 { diff --git a/src/dialogs/domain-toggler/dialog-domain-toggler.ts b/src/dialogs/domain-toggler/dialog-domain-toggler.ts index e07d2d9b4a..82307abfe1 100644 --- a/src/dialogs/domain-toggler/dialog-domain-toggler.ts +++ b/src/dialogs/domain-toggler/dialog-domain-toggler.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { createCloseHeading } from "../../components/ha-dialog"; import "../../components/ha-formfield"; diff --git a/src/dialogs/generic/dialog-box.ts b/src/dialogs/generic/dialog-box.ts index 5ccd33d199..e7e4bee7b2 100644 --- a/src/dialogs/generic/dialog-box.ts +++ b/src/dialogs/generic/dialog-box.ts @@ -1,16 +1,8 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-dialog"; import "../../components/ha-switch"; diff --git a/src/dialogs/generic/show-dialog-box.ts b/src/dialogs/generic/show-dialog-box.ts index bd3210c5fd..1350c91d18 100644 --- a/src/dialogs/generic/show-dialog-box.ts +++ b/src/dialogs/generic/show-dialog-box.ts @@ -1,4 +1,4 @@ -import { TemplateResult } from "lit-html"; +import { TemplateResult } from "lit"; import { fireEvent } from "../../common/dom/fire_event"; interface BaseDialogBoxParams { diff --git a/src/dialogs/image-cropper-dialog/image-cropper-dialog.ts b/src/dialogs/image-cropper-dialog/image-cropper-dialog.ts index 2571ae29fe..f8709344e3 100644 --- a/src/dialogs/image-cropper-dialog/image-cropper-dialog.ts +++ b/src/dialogs/image-cropper-dialog/image-cropper-dialog.ts @@ -5,17 +5,14 @@ import cropperCss from "cropperjs/dist/cropper.css"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, unsafeCSS, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../components/ha-dialog"; import { haStyleDialog } from "../../resources/styles"; import type { HomeAssistant } from "../../types"; diff --git a/src/dialogs/more-info/controls/more-info-automation.ts b/src/dialogs/more-info/controls/more-info-automation.ts index cdd9fe7729..0584b977ed 100644 --- a/src/dialogs/more-info/controls/more-info-automation.ts +++ b/src/dialogs/more-info/controls/more-info-automation.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-relative-time"; import { triggerAutomationActions } from "../../../data/automation"; import { UNAVAILABLE_STATES } from "../../../data/entity"; diff --git a/src/dialogs/more-info/controls/more-info-camera.ts b/src/dialogs/more-info/controls/more-info-camera.ts index 1dfcd4157e..bc571b4bc8 100644 --- a/src/dialogs/more-info/controls/more-info-camera.ts +++ b/src/dialogs/more-info/controls/more-info-camera.ts @@ -4,14 +4,13 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { supportsFeature } from "../../../common/entity/supports-feature"; +} from "lit"; +import { property, state } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; +import { supportsFeature } from "../../../common/entity/supports-feature"; import "../../../components/ha-camera-stream"; import { CameraEntity, diff --git a/src/dialogs/more-info/controls/more-info-climate.ts b/src/dialogs/more-info/controls/more-info-climate.ts index bd80dfc223..7d21934698 100644 --- a/src/dialogs/more-info/controls/more-info-climate.ts +++ b/src/dialogs/more-info/controls/more-info-climate.ts @@ -6,11 +6,11 @@ import { CSSResultGroup, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { supportsFeature } from "../../../common/entity/supports-feature"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; diff --git a/src/dialogs/more-info/controls/more-info-counter.ts b/src/dialogs/more-info/controls/more-info-counter.ts index fcdff2f781..3e08b0e522 100644 --- a/src/dialogs/more-info/controls/more-info-counter.ts +++ b/src/dialogs/more-info/controls/more-info-counter.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { UNAVAILABLE_STATES } from "../../../data/entity"; import { HomeAssistant } from "../../../types"; diff --git a/src/dialogs/more-info/controls/more-info-default.ts b/src/dialogs/more-info/controls/more-info-default.ts index 443b39ed43..b30cc74a7c 100644 --- a/src/dialogs/more-info/controls/more-info-default.ts +++ b/src/dialogs/more-info/controls/more-info-default.ts @@ -1,11 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-attributes"; import { HomeAssistant } from "../../../types"; diff --git a/src/dialogs/more-info/controls/more-info-fan.js b/src/dialogs/more-info/controls/more-info-fan.js index 93bbe59396..f7eb73e011 100644 --- a/src/dialogs/more-info/controls/more-info-fan.js +++ b/src/dialogs/more-info/controls/more-info-fan.js @@ -11,9 +11,9 @@ import "../../../components/ha-icon-button"; import "../../../components/ha-labeled-slider"; import "../../../components/ha-paper-dropdown-menu"; import "../../../components/ha-switch"; +import { SUPPORT_SET_SPEED } from "../../../data/fan"; import { EventsMixin } from "../../../mixins/events-mixin"; import LocalizeMixin from "../../../mixins/localize-mixin"; -import { SUPPORT_SET_SPEED } from "../../../data/fan"; /* * @appliesMixin EventsMixin diff --git a/src/dialogs/more-info/controls/more-info-group.ts b/src/dialogs/more-info/controls/more-info-group.ts index 597cf1d5a4..c8b2e7bdbb 100644 --- a/src/dialogs/more-info/controls/more-info-group.ts +++ b/src/dialogs/more-info/controls/more-info-group.ts @@ -2,12 +2,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - state, + html, LitElement, - property, PropertyValues, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; + TemplateResult, +} from "lit"; +import { property, state } from "lit/decorators"; import { dynamicElement } from "../../../common/dom/dynamic-element-directive"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { GroupEntity } from "../../../data/group"; diff --git a/src/dialogs/more-info/controls/more-info-humidifier.ts b/src/dialogs/more-info/controls/more-info-humidifier.ts index 7a118a2521..43da799a16 100644 --- a/src/dialogs/more-info/controls/more-info-humidifier.ts +++ b/src/dialogs/more-info/controls/more-info-humidifier.ts @@ -6,11 +6,11 @@ import { CSSResultGroup, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { supportsFeature } from "../../../common/entity/supports-feature"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; diff --git a/src/dialogs/more-info/controls/more-info-light.ts b/src/dialogs/more-info/controls/more-info-light.ts index 1dffd398a4..f4d963a41a 100644 --- a/src/dialogs/more-info/controls/more-info-light.ts +++ b/src/dialogs/more-info/controls/more-info-light.ts @@ -3,16 +3,15 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { supportsFeature } from "../../../common/entity/supports-feature"; import "../../../components/ha-attributes"; +import "../../../components/ha-button-toggle-group"; import "../../../components/ha-color-picker"; import "../../../components/ha-icon-button"; import "../../../components/ha-labeled-slider"; @@ -28,7 +27,6 @@ import { SUPPORT_EFFECT, } from "../../../data/light"; import type { HomeAssistant } from "../../../types"; -import "../../../components/ha-button-toggle-group"; const toggleButtons = [ { label: "Color", value: "color" }, diff --git a/src/dialogs/more-info/controls/more-info-media_player.ts b/src/dialogs/more-info/controls/more-info-media_player.ts index c617a8f761..89bb143d3f 100644 --- a/src/dialogs/more-info/controls/more-info-media_player.ts +++ b/src/dialogs/more-info/controls/more-info-media_player.ts @@ -4,16 +4,8 @@ import { mdiPlayBoxMultiple } from "@mdi/js"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { supportsFeature } from "../../../common/entity/supports-feature"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; diff --git a/src/dialogs/more-info/controls/more-info-person.ts b/src/dialogs/more-info/controls/more-info-person.ts index 57e8e38470..f1b610d26d 100644 --- a/src/dialogs/more-info/controls/more-info-person.ts +++ b/src/dialogs/more-info/controls/more-info-person.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-attributes"; diff --git a/src/dialogs/more-info/controls/more-info-remote.ts b/src/dialogs/more-info/controls/more-info-remote.ts index e144094c8d..c8e9c8b779 100644 --- a/src/dialogs/more-info/controls/more-info-remote.ts +++ b/src/dialogs/more-info/controls/more-info-remote.ts @@ -1,14 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { supportsFeature } from "../../../common/entity/supports-feature"; import "../../../components/ha-attributes"; import "../../../components/ha-paper-dropdown-menu"; diff --git a/src/dialogs/more-info/controls/more-info-script.ts b/src/dialogs/more-info/controls/more-info-script.ts index 61005dda6a..39ce62214e 100644 --- a/src/dialogs/more-info/controls/more-info-script.ts +++ b/src/dialogs/more-info/controls/more-info-script.ts @@ -1,13 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-relative-time"; import { HomeAssistant } from "../../../types"; diff --git a/src/dialogs/more-info/controls/more-info-sun.ts b/src/dialogs/more-info/controls/more-info-sun.ts index 9f8b49d71e..9de886b619 100644 --- a/src/dialogs/more-info/controls/more-info-sun.ts +++ b/src/dialogs/more-info/controls/more-info-sun.ts @@ -1,13 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { formatTime } from "../../../common/datetime/format_time"; import { formatNumber } from "../../../common/string/format_number"; import "../../../components/ha-relative-time"; diff --git a/src/dialogs/more-info/controls/more-info-timer.ts b/src/dialogs/more-info/controls/more-info-timer.ts index a9b07bfb81..92d06002bb 100644 --- a/src/dialogs/more-info/controls/more-info-timer.ts +++ b/src/dialogs/more-info/controls/more-info-timer.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-attributes"; import { TimerEntity } from "../../../data/timer"; import { HomeAssistant } from "../../../types"; diff --git a/src/dialogs/more-info/controls/more-info-vacuum.ts b/src/dialogs/more-info/controls/more-info-vacuum.ts index 99716e91aa..ca6a5fb73b 100644 --- a/src/dialogs/more-info/controls/more-info-vacuum.ts +++ b/src/dialogs/more-info/controls/more-info-vacuum.ts @@ -1,14 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { supportsFeature } from "../../../common/entity/supports-feature"; import "../../../components/ha-attributes"; import "../../../components/ha-icon"; diff --git a/src/dialogs/more-info/controls/more-info-weather.ts b/src/dialogs/more-info/controls/more-info-weather.ts index dc4a529985..3b69a35a7a 100644 --- a/src/dialogs/more-info/controls/more-info-weather.ts +++ b/src/dialogs/more-info/controls/more-info-weather.ts @@ -23,12 +23,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, + html, LitElement, - property, PropertyValues, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; + TemplateResult, +} from "lit"; +import { customElement, property } from "lit/decorators"; import { formatDateWeekday } from "../../../common/datetime/format_date"; import { formatTimeWeekday } from "../../../common/datetime/format_time"; import { formatNumber } from "../../../common/string/format_number"; diff --git a/src/dialogs/more-info/ha-more-info-dialog.ts b/src/dialogs/more-info/ha-more-info-dialog.ts index 493c04f245..ff89f71c82 100644 --- a/src/dialogs/more-info/ha-more-info-dialog.ts +++ b/src/dialogs/more-info/ha-more-info-dialog.ts @@ -3,15 +3,9 @@ import "@material/mwc-icon-button"; import "@material/mwc-tab"; import "@material/mwc-tab-bar"; import { mdiClose, mdiCog, mdiPencil } from "@mdi/js"; -import { - css, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; -import { cache } from "lit-html/directives/cache"; +import { css, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { cache } from "lit/directives/cache"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { DOMAINS_MORE_INFO_NO_HISTORY, @@ -31,11 +25,11 @@ import { haStyleDialog } from "../../resources/styles"; import "../../state-summary/state-card-content"; import { HomeAssistant } from "../../types"; import { showConfirmationDialog } from "../generic/show-dialog-box"; +import { replaceDialog } from "../make-dialog-manager"; import "./controls/more-info-default"; import "./ha-more-info-history"; import "./ha-more-info-logbook"; import "./more-info-content"; -import { replaceDialog } from "../make-dialog-manager"; const DOMAINS_NO_INFO = ["camera", "configurator"]; /** diff --git a/src/dialogs/more-info/ha-more-info-history.ts b/src/dialogs/more-info/ha-more-info-history.ts index 2374ccd7e4..6dcb3144de 100644 --- a/src/dialogs/more-info/ha-more-info-history.ts +++ b/src/dialogs/more-info/ha-more-info-history.ts @@ -1,12 +1,5 @@ -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { throttle } from "../../common/util/throttle"; import "../../components/state-history-charts"; diff --git a/src/dialogs/more-info/ha-more-info-logbook.ts b/src/dialogs/more-info/ha-more-info-logbook.ts index 2af0eb69f4..16f6097d8b 100644 --- a/src/dialogs/more-info/ha-more-info-logbook.ts +++ b/src/dialogs/more-info/ha-more-info-logbook.ts @@ -1,24 +1,16 @@ -import { - css, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; -import { closeDialog } from "../make-dialog-manager"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { throttle } from "../../common/util/throttle"; import "../../components/ha-circular-progress"; import "../../components/state-history-charts"; -import { TraceContexts, loadTraceContexts } from "../../data/trace"; import { getLogbookData, LogbookEntry } from "../../data/logbook"; +import { loadTraceContexts, TraceContexts } from "../../data/trace"; import "../../panels/logbook/ha-logbook"; import { haStyle, haStyleScrollbar } from "../../resources/styles"; import { HomeAssistant } from "../../types"; +import { closeDialog } from "../make-dialog-manager"; @customElement("ha-more-info-logbook") export class MoreInfoLogbook extends LitElement { diff --git a/src/dialogs/more-info/more-info-content.ts b/src/dialogs/more-info/more-info-content.ts index 0c5ddab96c..2185206433 100644 --- a/src/dialogs/more-info/more-info-content.ts +++ b/src/dialogs/more-info/more-info-content.ts @@ -1,5 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property } from "lit/decorators"; import dynamicContentUpdater from "../../common/dom/dynamic_content_updater"; import { importMoreInfoControl } from "../../panels/lovelace/custom-card-helpers"; import { HomeAssistant } from "../../types"; diff --git a/src/dialogs/notifications/configurator-notification-item.ts b/src/dialogs/notifications/configurator-notification-item.ts index eb998f76be..0ea19c0653 100644 --- a/src/dialogs/notifications/configurator-notification-item.ts +++ b/src/dialogs/notifications/configurator-notification-item.ts @@ -1,11 +1,6 @@ import "@material/mwc-button"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { computeStateDisplay } from "../../common/entity/compute_state_display"; import { domainToName } from "../../data/integration"; diff --git a/src/dialogs/notifications/notification-item-template.ts b/src/dialogs/notifications/notification-item-template.ts index 28fb986784..8f6528550e 100644 --- a/src/dialogs/notifications/notification-item-template.ts +++ b/src/dialogs/notifications/notification-item-template.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../../components/ha-card"; @customElement("notification-item-template") diff --git a/src/dialogs/notifications/notification-item.ts b/src/dialogs/notifications/notification-item.ts index 41207b1db4..dfe95fdc77 100644 --- a/src/dialogs/notifications/notification-item.ts +++ b/src/dialogs/notifications/notification-item.ts @@ -1,12 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - html, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { PersistentNotification } from "../../data/persistent_notification"; import { HomeAssistant } from "../../types"; import "./configurator-notification-item"; diff --git a/src/dialogs/notifications/persistent-notification-item.ts b/src/dialogs/notifications/persistent-notification-item.ts index cb66b0fad8..c7a38d264b 100644 --- a/src/dialogs/notifications/persistent-notification-item.ts +++ b/src/dialogs/notifications/persistent-notification-item.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { formatDateTime } from "../../common/datetime/format_date_time"; import "../../components/ha-markdown"; import "../../components/ha-relative-time"; diff --git a/src/dialogs/quick-bar/ha-quick-bar.ts b/src/dialogs/quick-bar/ha-quick-bar.ts index b398a9759c..ea8c9e2e9d 100644 --- a/src/dialogs/quick-bar/ha-quick-bar.ts +++ b/src/dialogs/quick-bar/ha-quick-bar.ts @@ -1,3 +1,4 @@ +import { Layout1d, scroll } from "@lit-labs/virtualizer"; import "@material/mwc-list/mwc-list"; import type { List } from "@material/mwc-list/mwc-list"; import { SingleSelectedEvent } from "@material/mwc-list/mwc-list-foundation"; @@ -11,18 +12,10 @@ import { mdiReload, mdiServerNetwork, } from "@mdi/js"; -import { - css, - customElement, - html, - state, - LitElement, - property, - query, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; -import { scroll } from "lit-virtualizer"; +import { css, html, LitElement } from "lit"; +import { customElement, property, query, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import memoizeOne from "memoize-one"; import { canShowPage } from "../../common/config/can_show_page"; import { componentsWithService } from "../../common/config/components_with_service"; @@ -38,6 +31,7 @@ import { ScorableTextItem, } from "../../common/string/filter/sequence-matching"; import { debounce } from "../../common/util/debounce"; +import "../../components/ha-chip"; import "../../components/ha-circular-progress"; import "../../components/ha-dialog"; import "../../components/ha-header-bar"; @@ -52,7 +46,6 @@ import { showConfirmationDialog, } from "../generic/show-dialog-box"; import { QuickBarParams } from "./show-dialog-quick-bar"; -import "../../components/ha-chip"; interface QuickBarItem extends ScorableTextItem { primaryText: string; @@ -194,7 +187,9 @@ export class QuickBar extends LitElement { > ${scroll({ items, - renderItem: (item: QuickBarItem, index?: number) => + layout: Layout1d, + // @ts-expect-error + renderItem: (item: QuickBarItem, index) => this._renderItem(item, index), })} `} diff --git a/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts b/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts index 62e9ae5c93..f4cf783ad3 100644 --- a/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts +++ b/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts @@ -5,16 +5,13 @@ import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../common/dom/fire_event"; import { SpeechRecognition } from "../../common/dom/speech-recognition"; import { uid } from "../../common/util/uid"; diff --git a/src/entrypoints/custom-panel.ts b/src/entrypoints/custom-panel.ts index 28b068fadc..856946d33b 100644 --- a/src/entrypoints/custom-panel.ts +++ b/src/entrypoints/custom-panel.ts @@ -1,18 +1,19 @@ // Compat needs to be first import import "../resources/compatibility"; +import "../resources/safari-14-attachshadow-patch"; + import { PolymerElement } from "@polymer/polymer"; +import { CSSResult } from "lit"; import { fireEvent } from "../common/dom/fire_event"; +import { isNavigationClick } from "../common/dom/is-navigation-click"; import { loadJS } from "../common/dom/load_resource"; import { webComponentsSupported } from "../common/feature-detect/support-web-components"; +import { navigate } from "../common/navigate"; import { CustomPanelInfo } from "../data/panel_custom"; -import "../resources/safari-14-attachshadow-patch"; +import { baseEntrypointStyles } from "../resources/styles"; import { createCustomPanelElement } from "../util/custom-panel/create-custom-panel-element"; import { loadCustomPanel } from "../util/custom-panel/load-custom-panel"; import { setCustomPanelProperties } from "../util/custom-panel/set-custom-panel-properties"; -import { baseEntrypointStyles } from "../resources/styles"; -import { CSSResult } from "lit-element"; -import { isNavigationClick } from "../common/dom/is-navigation-click"; -import { navigate } from "../common/navigate"; declare global { interface Window { diff --git a/src/entrypoints/service_worker.ts b/src/entrypoints/service_worker.ts index 0748a15e1f..e3f141fa54 100644 --- a/src/entrypoints/service_worker.ts +++ b/src/entrypoints/service_worker.ts @@ -2,7 +2,9 @@ // eslint-disable-next-line spaced-comment /// /* eslint-env serviceworker */ +import { CacheableResponsePlugin } from "workbox-cacheable-response"; import { cacheNames, RouteHandler } from "workbox-core"; +import { ExpirationPlugin } from "workbox-expiration"; import { cleanupOutdatedCaches, precacheAndRoute } from "workbox-precaching"; import { registerRoute, setCatchHandler } from "workbox-routing"; import { @@ -10,8 +12,6 @@ import { NetworkOnly, StaleWhileRevalidate, } from "workbox-strategies"; -import { CacheableResponsePlugin } from "workbox-cacheable-response"; -import { ExpirationPlugin } from "workbox-expiration"; const noFallBackRegEx = new RegExp( "/(api|static|auth|frontend_latest|frontend_es5|local)/.*" diff --git a/src/fake_data/provide_hass.ts b/src/fake_data/provide_hass.ts index e74cb69152..6249f441f5 100644 --- a/src/fake_data/provide_hass.ts +++ b/src/fake_data/provide_hass.ts @@ -8,7 +8,7 @@ import { DEFAULT_PANEL } from "../data/panel"; import { NumberFormat } from "../data/translation"; import { translationMetadata } from "../resources/translations-metadata"; import { HomeAssistant } from "../types"; -import { getTranslation, getLocalLanguage } from "../util/hass-translation"; +import { getLocalLanguage, getTranslation } from "../util/hass-translation"; import { demoConfig } from "./demo_config"; import { demoPanels } from "./demo_panels"; import { demoServices } from "./demo_services"; diff --git a/src/layouts/ha-init-page.ts b/src/layouts/ha-init-page.ts index 0d657ec304..0a4e730fde 100644 --- a/src/layouts/ha-init-page.ts +++ b/src/layouts/ha-init-page.ts @@ -1,5 +1,6 @@ import "@material/mwc-button"; -import { css, CSSResultGroup, html, LitElement, property } from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { property } from "lit/decorators"; import "../components/ha-circular-progress"; import { removeInitSkeleton } from "../util/init-skeleton"; diff --git a/src/layouts/hass-error-screen.ts b/src/layouts/hass-error-screen.ts index e80a37e0e8..de0b3f1fcf 100644 --- a/src/layouts/hass-error-screen.ts +++ b/src/layouts/hass-error-screen.ts @@ -1,16 +1,9 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { HomeAssistant } from "../types"; -import "../components/ha-menu-button"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/ha-icon-button-arrow-prev"; +import "../components/ha-menu-button"; +import { HomeAssistant } from "../types"; @customElement("hass-error-screen") class HassErrorScreen extends LitElement { diff --git a/src/layouts/hass-loading-screen.ts b/src/layouts/hass-loading-screen.ts index d2f08eb69f..529659ba0a 100644 --- a/src/layouts/hass-loading-screen.ts +++ b/src/layouts/hass-loading-screen.ts @@ -1,13 +1,6 @@ import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/ha-circular-progress"; import "../components/ha-icon-button-arrow-prev"; import "../components/ha-menu-button"; diff --git a/src/layouts/hass-router-page.ts b/src/layouts/hass-router-page.ts index 4c88766031..17ed986ee3 100644 --- a/src/layouts/hass-router-page.ts +++ b/src/layouts/hass-router-page.ts @@ -1,4 +1,5 @@ -import { property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { navigate } from "../common/navigate"; import { Route } from "../types"; diff --git a/src/layouts/hass-subpage.ts b/src/layouts/hass-subpage.ts index 1b100c3892..58c4c376aa 100644 --- a/src/layouts/hass-subpage.ts +++ b/src/layouts/hass-subpage.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - eventOptions, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, eventOptions, property } from "lit/decorators"; import { restoreScroll } from "../common/decorators/restore-scroll"; import "../components/ha-icon-button-arrow-prev"; import "../components/ha-menu-button"; diff --git a/src/layouts/hass-tabs-subpage-data-table.ts b/src/layouts/hass-tabs-subpage-data-table.ts index de56e096cd..5ecfa2b722 100644 --- a/src/layouts/hass-tabs-subpage-data-table.ts +++ b/src/layouts/hass-tabs-subpage-data-table.ts @@ -1,18 +1,10 @@ import "@material/mwc-button/mwc-button"; import { mdiFilterVariant } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { LocalizeFunc } from "../common/translations/localize"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; +import { LocalizeFunc } from "../common/translations/localize"; import { computeRTLDirection } from "../common/util/compute_rtl"; import "../components/data-table/ha-data-table"; import type { diff --git a/src/layouts/hass-tabs-subpage.ts b/src/layouts/hass-tabs-subpage.ts index 9b77850e4d..e7b787a0a2 100644 --- a/src/layouts/hass-tabs-subpage.ts +++ b/src/layouts/hass-tabs-subpage.ts @@ -2,16 +2,13 @@ import "@material/mwc-ripple"; import { css, CSSResultGroup, - customElement, - eventOptions, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, eventOptions, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../common/config/is_component_loaded"; import { restoreScroll } from "../common/decorators/restore-scroll"; diff --git a/src/layouts/home-assistant-main.ts b/src/layouts/home-assistant-main.ts index 78e0630db0..add8b5c4c1 100644 --- a/src/layouts/home-assistant-main.ts +++ b/src/layouts/home-assistant-main.ts @@ -5,14 +5,12 @@ import type { AppDrawerElement } from "@polymer/app-layout/app-drawer/app-drawer import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent, HASSDomEvent } from "../common/dom/fire_event"; import { listenMediaQuery } from "../common/dom/media_query"; import { toggleAttribute } from "../common/dom/toggle_attribute"; diff --git a/src/layouts/home-assistant.ts b/src/layouts/home-assistant.ts index bbe799862c..1499e9a88f 100644 --- a/src/layouts/home-assistant.ts +++ b/src/layouts/home-assistant.ts @@ -1,5 +1,6 @@ -import { customElement, html, state, PropertyValues } from "lit-element"; import { isNavigationClick } from "../common/dom/is-navigation-click"; +import { html, PropertyValues } from "lit"; +import { customElement, state } from "lit/decorators"; import { navigate } from "../common/navigate"; import { getStorageDefaultPanelUrlPath } from "../data/panel"; import "../resources/custom-card-support"; @@ -45,7 +46,7 @@ export class HomeAssistantAppEl extends QuickBarMixin(HassElement) { protected firstUpdated(changedProps) { super.firstUpdated(changedProps); - this._initialize(); + this._initializeHass(); setTimeout(() => registerServiceWorker(this), 1000); /* polyfill for paper-dropdown */ import("web-animations-js/web-animations-next-lite.min"); @@ -145,7 +146,7 @@ export class HomeAssistantAppEl extends QuickBarMixin(HassElement) { } } - protected async _initialize() { + protected async _initializeHass() { try { let result; diff --git a/src/layouts/partial-panel-resolver.ts b/src/layouts/partial-panel-resolver.ts index cbc3cdfefb..454db3336d 100644 --- a/src/layouts/partial-panel-resolver.ts +++ b/src/layouts/partial-panel-resolver.ts @@ -4,7 +4,8 @@ import { STATE_RUNNING, STATE_STARTING, } from "home-assistant-js-websocket"; -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { deepActiveElement } from "../common/dom/deep-active-element"; import { deepEqual } from "../common/util/deep-equal"; import { getDefaultPanel } from "../data/panel"; diff --git a/src/layouts/supervisor-error-screen.ts b/src/layouts/supervisor-error-screen.ts index 7d35f95e73..34ab82fdf9 100644 --- a/src/layouts/supervisor-error-screen.ts +++ b/src/layouts/supervisor-error-screen.ts @@ -1,20 +1,19 @@ -import "../components/ha-card"; import "@material/mwc-button"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { HomeAssistant } from "../types"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { atLeastVersion } from "../common/config/version"; +import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; +import "../components/ha-card"; import "../resources/ha-style"; import { haStyle } from "../resources/styles"; -import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; -import { atLeastVersion } from "../common/config/version"; +import { HomeAssistant } from "../types"; import "./hass-subpage"; @customElement("supervisor-error-screen") diff --git a/src/managers/notification-manager.ts b/src/managers/notification-manager.ts index 8c3de2c802..7eb9b410cd 100644 --- a/src/managers/notification-manager.ts +++ b/src/managers/notification-manager.ts @@ -1,14 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state, query } from "lit/decorators"; import { computeRTL } from "../common/util/compute_rtl"; import "../components/ha-toast"; import type { HaToast } from "../components/ha-toast"; diff --git a/src/mixins/keyboard-shortcut-mixin.ts b/src/mixins/keyboard-shortcut-mixin.ts index 359f386dc8..c319135b94 100644 --- a/src/mixins/keyboard-shortcut-mixin.ts +++ b/src/mixins/keyboard-shortcut-mixin.ts @@ -1,4 +1,4 @@ -import { LitElement } from "lit-element"; +import { LitElement } from "lit"; import { Constructor } from "../types"; export const KeyboardShortcutMixin = >( diff --git a/src/mixins/lit-localize-lite-mixin.ts b/src/mixins/lit-localize-lite-mixin.ts index cc723a36ac..c9751e1837 100644 --- a/src/mixins/lit-localize-lite-mixin.ts +++ b/src/mixins/lit-localize-lite-mixin.ts @@ -1,7 +1,8 @@ -import { LitElement, property, PropertyValues } from "lit-element"; +import { LitElement, PropertyValues } from "lit"; +import { property } from "lit/decorators"; import { computeLocalize, LocalizeFunc } from "../common/translations/localize"; import { Constructor, Resources } from "../types"; -import { getTranslation, getLocalLanguage } from "../util/hass-translation"; +import { getLocalLanguage, getTranslation } from "../util/hass-translation"; const empty = () => ""; diff --git a/src/mixins/provide-hass-lit-mixin.ts b/src/mixins/provide-hass-lit-mixin.ts index 8ebe9ebc11..361d4e281c 100644 --- a/src/mixins/provide-hass-lit-mixin.ts +++ b/src/mixins/provide-hass-lit-mixin.ts @@ -1,4 +1,4 @@ -import { PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; import { Constructor, HomeAssistant } from "../types"; export interface ProvideHassElement { diff --git a/src/mixins/subscribe-mixin.ts b/src/mixins/subscribe-mixin.ts index e104737784..701d524175 100644 --- a/src/mixins/subscribe-mixin.ts +++ b/src/mixins/subscribe-mixin.ts @@ -1,5 +1,6 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property } from "lit/decorators"; import { Constructor, HomeAssistant } from "../types"; export interface HassSubscribeElement { diff --git a/src/onboarding/action-badge.ts b/src/onboarding/action-badge.ts index c9f516084e..e97c9c5bd8 100644 --- a/src/onboarding/action-badge.ts +++ b/src/onboarding/action-badge.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/ha-icon"; @customElement("action-badge") diff --git a/src/onboarding/ha-onboarding.ts b/src/onboarding/ha-onboarding.ts index ea13d7c615..2a7c66bd9f 100644 --- a/src/onboarding/ha-onboarding.ts +++ b/src/onboarding/ha-onboarding.ts @@ -5,14 +5,9 @@ import { getAuth, subscribeConfig, } from "home-assistant-js-websocket"; -import { - customElement, - html, - state, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; import { HASSDomEvent } from "../common/dom/fire_event"; import { extractSearchParamsObject } from "../common/url/search-params"; import { subscribeOne } from "../common/util/subscribe-one"; @@ -29,10 +24,9 @@ import { litLocalizeLiteMixin } from "../mixins/lit-localize-lite-mixin"; import { HassElement } from "../state/hass-element"; import { HomeAssistant } from "../types"; import { registerServiceWorker } from "../util/register-service-worker"; +import "./onboarding-analytics"; import "./onboarding-create-user"; import "./onboarding-loading"; -import "./onboarding-analytics"; -import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; type OnboardingEvent = | { diff --git a/src/onboarding/integration-badge.ts b/src/onboarding/integration-badge.ts index b03acb8b02..7958ca7080 100644 --- a/src/onboarding/integration-badge.ts +++ b/src/onboarding/integration-badge.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/ha-icon"; import { brandsUrl } from "../util/brands-url"; diff --git a/src/onboarding/onboarding-analytics.ts b/src/onboarding/onboarding-analytics.ts index b22173a73c..60783b95f7 100644 --- a/src/onboarding/onboarding-analytics.ts +++ b/src/onboarding/onboarding-analytics.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { LocalizeFunc } from "../common/translations/localize"; import "../components/ha-analytics"; diff --git a/src/onboarding/onboarding-core-config.ts b/src/onboarding/onboarding-core-config.ts index 7a3380229d..f1bc58a83d 100644 --- a/src/onboarding/onboarding-core-config.ts +++ b/src/onboarding/onboarding-core-config.ts @@ -3,16 +3,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import type { LocalizeFunc } from "../common/translations/localize"; import "../components/map/ha-location-editor"; diff --git a/src/onboarding/onboarding-create-user.ts b/src/onboarding/onboarding-create-user.ts index 64250f91ce..c0c23aafdc 100644 --- a/src/onboarding/onboarding-create-user.ts +++ b/src/onboarding/onboarding-create-user.ts @@ -4,14 +4,12 @@ import { genClientId } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { LocalizeFunc } from "../common/translations/localize"; import { onboardUserStep } from "../data/onboarding"; diff --git a/src/onboarding/onboarding-integrations.ts b/src/onboarding/onboarding-integrations.ts index eee62415b3..9426c88ad4 100644 --- a/src/onboarding/onboarding-integrations.ts +++ b/src/onboarding/onboarding-integrations.ts @@ -2,14 +2,12 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, - state, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { compare } from "../common/string/compare"; import { LocalizeFunc } from "../common/translations/localize"; diff --git a/src/onboarding/onboarding-loading.ts b/src/onboarding/onboarding-loading.ts index 29005246dc..e9182332ec 100644 --- a/src/onboarding/onboarding-loading.ts +++ b/src/onboarding/onboarding-loading.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; @customElement("onboarding-loading") class OnboardingLoading extends LitElement { diff --git a/src/onboarding/onboarding-restore-snapshot.ts b/src/onboarding/onboarding-restore-snapshot.ts index 835a31aff4..9d133d3b82 100644 --- a/src/onboarding/onboarding-restore-snapshot.ts +++ b/src/onboarding/onboarding-restore-snapshot.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../hassio/src/components/hassio-ansi-to-html"; import { showHassioSnapshotDialog } from "../../hassio/src/dialogs/snapshot/show-dialog-hassio-snapshot"; import { showSnapshotUploadDialog } from "../../hassio/src/dialogs/snapshot/show-dialog-snapshot-upload"; diff --git a/src/panels/calendar/ha-full-calendar.ts b/src/panels/calendar/ha-full-calendar.ts index 71e5ebbb02..8fa4cf46cc 100644 --- a/src/panels/calendar/ha-full-calendar.ts +++ b/src/panels/calendar/ha-full-calendar.ts @@ -16,13 +16,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, unsafeCSS, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import memoize from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-button-toggle-group"; diff --git a/src/panels/calendar/ha-panel-calendar.ts b/src/panels/calendar/ha-panel-calendar.ts index 1f73721efc..1bbe4b68ed 100644 --- a/src/panels/calendar/ha-panel-calendar.ts +++ b/src/panels/calendar/ha-panel-calendar.ts @@ -5,15 +5,13 @@ import "@polymer/app-layout/app-toolbar/app-toolbar"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import { LocalStorage } from "../../common/decorators/local-storage"; import { HASSDomEvent } from "../../common/dom/fire_event"; import "../../components/ha-card"; diff --git a/src/panels/config/areas/dialog-area-registry-detail.ts b/src/panels/config/areas/dialog-area-registry-detail.ts index dcb29ffdf2..9d192b91ee 100644 --- a/src/panels/config/areas/dialog-area-registry-detail.ts +++ b/src/panels/config/areas/dialog-area-registry-detail.ts @@ -1,15 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { navigate } from "../../../common/navigate"; import "../../../components/ha-dialog"; diff --git a/src/panels/config/areas/ha-config-area-page.ts b/src/panels/config/areas/ha-config-area-page.ts index 29d5269810..6b3e35a783 100644 --- a/src/panels/config/areas/ha-config-area-page.ts +++ b/src/panels/config/areas/ha-config-area-page.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/config/areas/ha-config-areas-dashboard.ts b/src/panels/config/areas/ha-config-areas-dashboard.ts index cee1c49c53..e0888c063f 100644 --- a/src/panels/config/areas/ha-config-areas-dashboard.ts +++ b/src/panels/config/areas/ha-config-areas-dashboard.ts @@ -1,15 +1,8 @@ import { mdiPlus } from "@mdi/js"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../common/dom/fire_event"; import { navigate } from "../../../common/navigate"; diff --git a/src/panels/config/areas/ha-config-areas.ts b/src/panels/config/areas/ha-config-areas.ts index 725bf14cd9..dd9378e321 100644 --- a/src/panels/config/areas/ha-config-areas.ts +++ b/src/panels/config/areas/ha-config-areas.ts @@ -1,5 +1,6 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { customElement, state, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { compare } from "../../../common/string/compare"; import { AreaRegistryEntry, 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 5dfc358a5f..96719a003f 100644 --- a/src/panels/config/automation/action/ha-automation-action-row.ts +++ b/src/panels/config/automation/action/ha-automation-action-row.ts @@ -6,19 +6,11 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { dynamicElement } from "../../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../../common/dom/fire_event"; +import { handleStructError } from "../../../../common/structs/handle-errors"; import "../../../../components/ha-button-menu"; import "../../../../components/ha-card"; import "../../../../components/ha-svg-icon"; @@ -27,7 +19,6 @@ import type { Action } from "../../../../data/script"; import { showConfirmationDialog } from "../../../../dialogs/generic/show-dialog-box"; import { haStyle } from "../../../../resources/styles"; import type { HomeAssistant } from "../../../../types"; -import { handleStructError } from "../../../../common/structs/handle-errors"; import "./types/ha-automation-action-choose"; import "./types/ha-automation-action-condition"; import "./types/ha-automation-action-delay"; diff --git a/src/panels/config/automation/action/ha-automation-action.ts b/src/panels/config/automation/action/ha-automation-action.ts index 9d2c266783..dfdf25b215 100644 --- a/src/panels/config/automation/action/ha-automation-action.ts +++ b/src/panels/config/automation/action/ha-automation-action.ts @@ -1,12 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import { Action } from "../../../../data/script"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-choose.ts b/src/panels/config/automation/action/types/ha-automation-action-choose.ts index 2cc117665b..584d217b90 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-choose.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-choose.ts @@ -1,14 +1,8 @@ import { mdiDelete } from "@mdi/js"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, -} from "lit-element"; -import { html } from "lit-html"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { ensureArray } from "../../../../../common/ensure-array"; import { Condition } from "../../../../../data/automation"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-condition.ts b/src/panels/config/automation/action/types/ha-automation-action-condition.ts index 03eb234832..6509d71c6c 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-condition.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-condition.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { Condition } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-delay.ts b/src/panels/config/automation/action/types/ha-automation-action-delay.ts index b805a68b2d..ab9a3ed8ab 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-delay.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-delay.ts @@ -1,11 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - customElement, - html, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { hasTemplate } from "../../../../../common/string/has-template"; import "../../../../../components/entity/ha-entity-picker"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-device_id.ts b/src/panels/config/automation/action/types/ha-automation-action-device_id.ts index 535be0f254..1a4565f870 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-device_id.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-device_id.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/device/ha-device-action-picker"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-event.ts b/src/panels/config/automation/action/types/ha-automation-action-event.ts index 81fc2c10da..92b64fe634 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-event.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-event.ts @@ -1,12 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - customElement, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/entity/ha-entity-picker"; import "../../../../../components/ha-service-picker"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-repeat.ts b/src/panels/config/automation/action/types/ha-automation-action-repeat.ts index 538fb94767..07249aeaf8 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-repeat.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-repeat.ts @@ -1,13 +1,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperListboxElement } from "@polymer/paper-listbox"; import "@polymer/paper-listbox/paper-listbox"; -import { - CSSResultGroup, - customElement, - LitElement, - property, -} from "lit-element"; -import { html } from "lit-html"; +import { CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { Action, diff --git a/src/panels/config/automation/action/types/ha-automation-action-scene.ts b/src/panels/config/automation/action/types/ha-automation-action-scene.ts index 9b0610b187..6af3f06c40 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-scene.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-scene.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/entity/ha-entity-picker"; import { SceneAction } from "../../../../../data/script"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-service.ts b/src/panels/config/automation/action/types/ha-automation-action-service.ts index 7743800b30..eafbc88b60 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-service.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-service.ts @@ -1,22 +1,14 @@ import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; -import { html } from "lit-html"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { any, assert, object, optional, string } from "superstruct"; import { fireEvent } from "../../../../../common/dom/fire_event"; +import { hasTemplate } from "../../../../../common/string/has-template"; +import { entityIdOrAll } from "../../../../../common/structs/is-entity-id"; +import "../../../../../components/ha-service-control"; import { ServiceAction } from "../../../../../data/script"; import type { HomeAssistant } from "../../../../../types"; -import { entityIdOrAll } from "../../../../../common/structs/is-entity-id"; import { ActionElement } from "../ha-automation-action-row"; -import "../../../../../components/ha-service-control"; -import { hasTemplate } from "../../../../../common/string/has-template"; const actionStruct = object({ service: optional(string()), diff --git a/src/panels/config/automation/action/types/ha-automation-action-wait_for_trigger.ts b/src/panels/config/automation/action/types/ha-automation-action-wait_for_trigger.ts index 0d28d05c77..223eb40d9c 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-wait_for_trigger.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-wait_for_trigger.ts @@ -1,7 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-input/paper-textarea"; -import { customElement, LitElement, property } from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-formfield"; import { WaitForTriggerAction } from "../../../../../data/script"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-wait_template.ts b/src/panels/config/automation/action/types/ha-automation-action-wait_template.ts index ed6326a381..62e7a5bbb9 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-wait_template.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-wait_template.ts @@ -1,7 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-input/paper-textarea"; -import { customElement, LitElement, property } from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { WaitAction } from "../../../../../data/script"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/blueprint-automation-editor.ts b/src/panels/config/automation/blueprint-automation-editor.ts index 14358dec95..a7ccc8c07c 100644 --- a/src/panels/config/automation/blueprint-automation-editor.ts +++ b/src/panels/config/automation/blueprint-automation-editor.ts @@ -2,15 +2,8 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-input/paper-textarea"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - state, - LitElement, - property, -} from "lit-element"; -import { html } from "lit-html"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/entity/ha-entity-toggle"; import "../../../components/ha-blueprint-picker"; diff --git a/src/panels/config/automation/condition/ha-automation-condition-editor.ts b/src/panels/config/automation/condition/ha-automation-condition-editor.ts index 59c2ac55d3..014e40c55b 100644 --- a/src/panels/config/automation/condition/ha-automation-condition-editor.ts +++ b/src/panels/config/automation/condition/ha-automation-condition-editor.ts @@ -2,13 +2,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import { - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { dynamicElement } from "../../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; diff --git a/src/panels/config/automation/condition/ha-automation-condition-row.ts b/src/panels/config/automation/condition/ha-automation-condition-row.ts index d1dbed74fa..8015055358 100644 --- a/src/panels/config/automation/condition/ha-automation-condition-row.ts +++ b/src/panels/config/automation/condition/ha-automation-condition-row.ts @@ -2,24 +2,17 @@ import { ActionDetail } from "@material/mwc-list/mwc-list-foundation"; import "@material/mwc-list/mwc-list-item"; import { mdiDotsVertical } from "@mdi/js"; import "@polymer/paper-item/paper-item"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-button-menu"; import "../../../../components/ha-card"; import "../../../../components/ha-icon-button"; import { Condition } from "../../../../data/automation"; import { showConfirmationDialog } from "../../../../dialogs/generic/show-dialog-box"; +import { haStyle } from "../../../../resources/styles"; import { HomeAssistant } from "../../../../types"; import "./ha-automation-condition-editor"; -import { haStyle } from "../../../../resources/styles"; export interface ConditionElement extends LitElement { condition: Condition; diff --git a/src/panels/config/automation/condition/ha-automation-condition.ts b/src/panels/config/automation/condition/ha-automation-condition.ts index 1105e7be11..513ca4c361 100644 --- a/src/panels/config/automation/condition/ha-automation-condition.ts +++ b/src/panels/config/automation/condition/ha-automation-condition.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import { Condition } from "../../../../data/automation"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-and.ts b/src/panels/config/automation/condition/types/ha-automation-condition-and.ts index 92148e5ffb..482d593d91 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-and.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-and.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HaLogicalCondition } from "./ha-automation-condition-logical"; @customElement("ha-automation-condition-and") diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-device.ts b/src/panels/config/automation/condition/types/ha-automation-condition-device.ts index 2ba0ba91fc..74277a4680 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-device.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-device.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/device/ha-device-condition-picker"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-logical.ts b/src/panels/config/automation/condition/types/ha-automation-condition-logical.ts index 6d6fc40f77..47fbba8de6 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-logical.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-logical.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { LogicalCondition } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-not.ts b/src/panels/config/automation/condition/types/ha-automation-condition-not.ts index 586346765e..82f8a95049 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-not.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-not.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HaLogicalCondition } from "./ha-automation-condition-logical"; @customElement("ha-automation-condition-not") diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts b/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts index 71259efe5d..d953eb7c72 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts @@ -1,6 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-input/paper-textarea"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../../components/entity/ha-entity-picker"; import { NumericStateCondition } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-or.ts b/src/panels/config/automation/condition/types/ha-automation-condition-or.ts index 38152f3bbc..ca770ee816 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-or.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-or.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HaLogicalCondition } from "./ha-automation-condition-logical"; @customElement("ha-automation-condition-or") diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-state.ts b/src/panels/config/automation/condition/types/ha-automation-condition-state.ts index d0f18b1ab7..1b841f0af9 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-state.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-state.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../../components/entity/ha-entity-attribute-picker"; import "../../../../../components/entity/ha-entity-picker"; import { ForDict, StateCondition } from "../../../../../data/automation"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-sun.ts b/src/panels/config/automation/condition/types/ha-automation-condition-sun.ts index becb62bf8c..bda9399539 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-sun.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-sun.ts @@ -2,7 +2,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import type { SunCondition } from "../../../../../data/automation"; import type { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-template.ts b/src/panels/config/automation/condition/types/ha-automation-condition-template.ts index 6f8fe2329e..d83eea64e2 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-template.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-template.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-textarea"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { TemplateCondition } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { handleChangeEvent } from "../ha-automation-condition-row"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-time.ts b/src/panels/config/automation/condition/types/ha-automation-condition-time.ts index fbbf6baa8b..5b0e56b350 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-time.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-time.ts @@ -1,14 +1,7 @@ import { Radio } from "@material/mwc-radio"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { computeRTLDirection } from "../../../../../common/util/compute_rtl"; import "../../../../../components/ha-formfield"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts b/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts index e84bd7766d..7511b1ff0d 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts @@ -1,5 +1,6 @@ import "@polymer/paper-radio-button/paper-radio-button"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { computeStateDomain } from "../../../../../common/entity/compute_state_domain"; import { hasLocation } from "../../../../../common/entity/has_location"; diff --git a/src/panels/config/automation/dialog-new-automation.ts b/src/panels/config/automation/dialog-new-automation.ts index bf854c2bce..3ab6c12b2b 100644 --- a/src/panels/config/automation/dialog-new-automation.ts +++ b/src/panels/config/automation/dialog-new-automation.ts @@ -1,14 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { fireEvent } from "../../../common/dom/fire_event"; import { nextRender } from "../../../common/util/render-status"; diff --git a/src/panels/config/automation/ha-automation-editor.ts b/src/panels/config/automation/ha-automation-editor.ts index b0780ea237..3df134e59b 100644 --- a/src/panels/config/automation/ha-automation-editor.ts +++ b/src/panels/config/automation/ha-automation-editor.ts @@ -15,14 +15,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { navigate } from "../../../common/navigate"; import { copyToClipboard } from "../../../common/util/copy-clipboard"; import "../../../components/ha-button-menu"; diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts index 760069e16b..c7526a58da 100644 --- a/src/panels/config/automation/ha-automation-picker.ts +++ b/src/panels/config/automation/ha-automation-picker.ts @@ -8,16 +8,9 @@ import { mdiPlus, } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { formatDateTime } from "../../../common/datetime/format_date_time"; @@ -26,9 +19,9 @@ import { computeStateName } from "../../../common/entity/compute_state_name"; import { navigate } from "../../../common/navigate"; import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; import "../../../components/entity/ha-entity-toggle"; +import "../../../components/ha-button-related-filter-menu"; import "../../../components/ha-fab"; import "../../../components/ha-svg-icon"; -import "../../../components/ha-button-related-filter-menu"; import { AutomationEntity, triggerAutomationActions, diff --git a/src/panels/config/automation/ha-config-automation.ts b/src/panels/config/automation/ha-config-automation.ts index d9db28fac1..8a61fabf57 100644 --- a/src/panels/config/automation/ha-config-automation.ts +++ b/src/panels/config/automation/ha-config-automation.ts @@ -1,5 +1,6 @@ import { HassEntities } from "home-assistant-js-websocket"; -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { debounce } from "../../../common/util/debounce"; @@ -9,8 +10,8 @@ import { RouterOptions, } from "../../../layouts/hass-router-page"; import { HomeAssistant } from "../../../types"; -import "./ha-automation-picker"; import "./ha-automation-editor"; +import "./ha-automation-picker"; const equal = (a: AutomationEntity[], b: AutomationEntity[]): boolean => { if (a.length !== b.length) { diff --git a/src/panels/config/automation/manual-automation-editor.ts b/src/panels/config/automation/manual-automation-editor.ts index 492621e877..9dfdf01ec4 100644 --- a/src/panels/config/automation/manual-automation-editor.ts +++ b/src/panels/config/automation/manual-automation-editor.ts @@ -3,14 +3,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-input/paper-textarea"; import { PaperListboxElement } from "@polymer/paper-listbox"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, -} from "lit-element"; -import { html } from "lit-html"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/entity/ha-entity-toggle"; import "../../../components/ha-card"; diff --git a/src/panels/config/automation/thingtalk/dialog-thingtalk.ts b/src/panels/config/automation/thingtalk/dialog-thingtalk.ts index 04d43a0b7c..467e293e6d 100644 --- a/src/panels/config/automation/thingtalk/dialog-thingtalk.ts +++ b/src/panels/config/automation/thingtalk/dialog-thingtalk.ts @@ -2,17 +2,8 @@ import "@material/mwc-button"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/dialog/ha-paper-dialog"; import "../../../../components/ha-circular-progress"; diff --git a/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts b/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts index 3a42951f93..af00652e8f 100644 --- a/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts +++ b/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts @@ -2,14 +2,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import { computeDomain } from "../../../../common/entity/compute_domain"; import { applyPatch, getPath } from "../../../../common/util/patch"; diff --git a/src/panels/config/automation/trace/ha-automation-trace-blueprint-config.ts b/src/panels/config/automation/trace/ha-automation-trace-blueprint-config.ts index 4f9d02403e..ca04091e79 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-blueprint-config.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-blueprint-config.ts @@ -1,15 +1,10 @@ import { safeDump } from "js-yaml"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import "../../../../components/ha-icon-button"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../components/ha-code-editor"; -import { HomeAssistant } from "../../../../types"; +import "../../../../components/ha-icon-button"; import { AutomationTraceExtended } from "../../../../data/trace"; +import { HomeAssistant } from "../../../../types"; @customElement("ha-automation-trace-blueprint-config") export class HaAutomationTraceBlueprintConfig extends LitElement { diff --git a/src/panels/config/automation/trace/ha-automation-trace-config.ts b/src/panels/config/automation/trace/ha-automation-trace-config.ts index 73a49f6649..3928656f82 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-config.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-config.ts @@ -1,16 +1,9 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { AutomationTraceExtended } from "../../../../data/trace"; -import "../../../../components/ha-icon-button"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../components/ha-code-editor"; +import "../../../../components/ha-icon-button"; +import { AutomationTraceExtended } from "../../../../data/trace"; import { HomeAssistant } from "../../../../types"; @customElement("ha-automation-trace-config") diff --git a/src/panels/config/automation/trace/ha-automation-trace-logbook.ts b/src/panels/config/automation/trace/ha-automation-trace-logbook.ts index 54c78e201a..675d355662 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-logbook.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-logbook.ts @@ -1,15 +1,8 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import type { HomeAssistant } from "../../../../types"; -import type { LogbookEntry } from "../../../../data/logbook"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../components/trace/hat-logbook-note"; +import type { LogbookEntry } from "../../../../data/logbook"; +import type { HomeAssistant } from "../../../../types"; import "../../../logbook/ha-logbook"; @customElement("ha-automation-trace-logbook") diff --git a/src/panels/config/automation/trace/ha-automation-trace-path-details.ts b/src/panels/config/automation/trace/ha-automation-trace-path-details.ts index 4afaa2abc5..1dab6866bc 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-path-details.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-path-details.ts @@ -1,30 +1,22 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { formatDateTimeWithSeconds } from "../../../../common/datetime/format_date_time"; +import "../../../../components/ha-code-editor"; +import "../../../../components/ha-icon-button"; +import type { NodeInfo } from "../../../../components/trace/hat-graph"; +import "../../../../components/trace/hat-logbook-note"; +import { LogbookEntry } from "../../../../data/logbook"; import { ActionTraceStep, AutomationTraceExtended, ChooseActionTraceStep, getDataFromPath, } from "../../../../data/trace"; -import "../../../../components/ha-icon-button"; -import "../../../../components/ha-code-editor"; -import type { NodeInfo } from "../../../../components/trace/hat-graph"; -import "../../../../components/trace/hat-logbook-note"; import { HomeAssistant } from "../../../../types"; -import { formatDateTimeWithSeconds } from "../../../../common/datetime/format_date_time"; -import { LogbookEntry } from "../../../../data/logbook"; -import { traceTabStyles } from "./styles"; import "../../../logbook/ha-logbook"; +import { traceTabStyles } from "./styles"; @customElement("ha-automation-trace-path-details") export class HaAutomationTracePathDetails extends LitElement { diff --git a/src/panels/config/automation/trace/ha-automation-trace-timeline.ts b/src/panels/config/automation/trace/ha-automation-trace-timeline.ts index e9861f6e7e..d379dc6934 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-timeline.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-timeline.ts @@ -1,18 +1,11 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import type { AutomationTraceExtended } from "../../../../data/trace"; -import type { HomeAssistant } from "../../../../types"; -import type { LogbookEntry } from "../../../../data/logbook"; -import "../../../../components/trace/hat-trace-timeline"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import type { NodeInfo } from "../../../../components/trace/hat-graph"; import "../../../../components/trace/hat-logbook-note"; +import "../../../../components/trace/hat-trace-timeline"; +import type { LogbookEntry } from "../../../../data/logbook"; +import type { AutomationTraceExtended } from "../../../../data/trace"; +import type { HomeAssistant } from "../../../../types"; @customElement("ha-automation-trace-timeline") export class HaAutomationTraceTimeline extends LitElement { diff --git a/src/panels/config/automation/trace/ha-automation-trace.ts b/src/panels/config/automation/trace/ha-automation-trace.ts index 2f0afc5fee..fefffacb80 100644 --- a/src/panels/config/automation/trace/ha-automation-trace.ts +++ b/src/panels/config/automation/trace/ha-automation-trace.ts @@ -1,47 +1,39 @@ import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; + mdiDownload, + mdiPencil, + mdiRayEndArrow, + mdiRayStartArrow, + mdiRefresh, +} from "@mdi/js"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { repeat } from "lit/directives/repeat"; +import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; +import { formatDateTimeWithSeconds } from "../../../../common/datetime/format_date_time"; +import type { NodeInfo } from "../../../../components/trace/hat-graph"; +import "../../../../components/trace/hat-script-graph"; import { AutomationEntity } from "../../../../data/automation"; +import { + getLogbookDataForContext, + LogbookEntry, +} from "../../../../data/logbook"; import { AutomationTrace, AutomationTraceExtended, loadTrace, loadTraces, } from "../../../../data/trace"; -import "../../../../components/trace/hat-script-graph"; -import type { NodeInfo } from "../../../../components/trace/hat-graph"; +import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; import { haStyle } from "../../../../resources/styles"; import { HomeAssistant, Route } from "../../../../types"; import { configSections } from "../../ha-panel-config"; -import { - getLogbookDataForContext, - LogbookEntry, -} from "../../../../data/logbook"; -import { formatDateTimeWithSeconds } from "../../../../common/datetime/format_date_time"; -import { repeat } from "lit-html/directives/repeat"; -import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; -import "./ha-automation-trace-path-details"; -import "./ha-automation-trace-timeline"; +import "./ha-automation-trace-blueprint-config"; import "./ha-automation-trace-config"; import "./ha-automation-trace-logbook"; -import { classMap } from "lit-html/directives/class-map"; +import "./ha-automation-trace-path-details"; +import "./ha-automation-trace-timeline"; import { traceTabStyles } from "./styles"; -import { - mdiRayEndArrow, - mdiRayStartArrow, - mdiPencil, - mdiRefresh, - mdiDownload, -} from "@mdi/js"; -import "./ha-automation-trace-blueprint-config"; -import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; @customElement("ha-automation-trace") export class HaAutomationTrace extends LitElement { diff --git a/src/panels/config/automation/trace/styles.ts b/src/panels/config/automation/trace/styles.ts index 4f236499c1..40878d304f 100644 --- a/src/panels/config/automation/trace/styles.ts +++ b/src/panels/config/automation/trace/styles.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const traceTabStyles = css` .tabs { diff --git a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts index ff84744b92..07b8b7373f 100644 --- a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts +++ b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts @@ -5,15 +5,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { dynamicElement } from "../../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-button-menu"; diff --git a/src/panels/config/automation/trigger/ha-automation-trigger.ts b/src/panels/config/automation/trigger/ha-automation-trigger.ts index e60df5d8a3..612780c9d4 100644 --- a/src/panels/config/automation/trigger/ha-automation-trigger.ts +++ b/src/panels/config/automation/trigger/ha-automation-trigger.ts @@ -1,12 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import { Trigger } from "../../../../data/automation"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts index e7145e58e3..51a579c2c6 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/device/ha-device-picker"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts index 9d53e8ea0e..de11702140 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts @@ -1,6 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, LitElement, property } from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-yaml-editor"; import "../../../../../components/user/ha-users-picker"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-geo_location.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-geo_location.ts index b65fac6d92..55e08598d1 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-geo_location.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-geo_location.ts @@ -1,7 +1,8 @@ import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/entity/ha-entity-picker"; import type { GeoLocationTrigger } from "../../../../../data/automation"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-homeassistant.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-homeassistant.ts index f811e20f0b..1d45e6c5f6 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-homeassistant.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-homeassistant.ts @@ -1,7 +1,8 @@ import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import type { HassTrigger } from "../../../../../data/automation"; import type { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-mqtt.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-mqtt.ts index 0450f37ff2..e3e997771f 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-mqtt.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-mqtt.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { MqttTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts index 0c54205b2b..cf7cf64115 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts @@ -1,6 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-input/paper-textarea"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../../components/entity/ha-entity-picker"; import { ForDict, NumericStateTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts index c128904318..1ad3b18555 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../../components/entity/ha-entity-attribute-picker"; import "../../../../../components/entity/ha-entity-picker"; import { ForDict, StateTrigger } from "../../../../../data/automation"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-sun.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-sun.ts index 3c2bb9cf62..d940a3e1cc 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-sun.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-sun.ts @@ -2,7 +2,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import type { SunTrigger } from "../../../../../data/automation"; import type { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts index 7851562ec8..5accba1a25 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts @@ -1,12 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { TagTrigger } from "../../../../../data/automation"; import { fetchTags, Tag } from "../../../../../data/tag"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-template.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-template.ts index 5e9483e0c8..2a40c2fc9d 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-template.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-template.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-textarea"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { TemplateTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { handleChangeEvent } from "../ha-automation-trigger-row"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-time.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-time.ts index 821ca2ce97..ddb0404907 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-time.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-time.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/entity/ha-entity-picker"; import "../../../../../components/ha-formfield"; import "../../../../../components/ha-radio"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-time_pattern.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-time_pattern.ts index 1f0f081ad9..b1b0a74f4c 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-time_pattern.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-time_pattern.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { TimePatternTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts index 3eb56a805e..4d90ec0219 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { WebhookTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { handleChangeEvent } from "../ha-automation-trigger-row"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts index 4d93d61f6c..a8b4ba457e 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts @@ -1,7 +1,8 @@ import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { computeStateDomain } from "../../../../../common/entity/compute_state_domain"; import { hasLocation } from "../../../../../common/entity/has_location"; diff --git a/src/panels/config/blueprint/dialog-import-blueprint.ts b/src/panels/config/blueprint/dialog-import-blueprint.ts index 5a46f42037..db171c6449 100644 --- a/src/panels/config/blueprint/dialog-import-blueprint.ts +++ b/src/panels/config/blueprint/dialog-import-blueprint.ts @@ -1,21 +1,14 @@ -import "../../../components/ha-markdown"; import "@material/mwc-button"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-circular-progress"; +import { createCloseHeading } from "../../../components/ha-dialog"; import "../../../components/ha-expansion-panel"; +import "../../../components/ha-markdown"; import { BlueprintImportResult, importBlueprint, @@ -23,7 +16,6 @@ import { } from "../../../data/blueprint"; import { haStyleDialog } from "../../../resources/styles"; import type { HomeAssistant } from "../../../types"; -import { createCloseHeading } from "../../../components/ha-dialog"; @customElement("ha-dialog-import-blueprint") class DialogImportBlueprint extends LitElement { diff --git a/src/panels/config/blueprint/ha-blueprint-overview.ts b/src/panels/config/blueprint/ha-blueprint-overview.ts index 299ee0d356..9f0618dc60 100644 --- a/src/panels/config/blueprint/ha-blueprint-overview.ts +++ b/src/panels/config/blueprint/ha-blueprint-overview.ts @@ -9,13 +9,12 @@ import { import "@polymer/paper-tooltip/paper-tooltip"; import { CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import { navigate } from "../../../common/navigate"; diff --git a/src/panels/config/blueprint/ha-config-blueprint.ts b/src/panels/config/blueprint/ha-config-blueprint.ts index efe7e82645..3ea73842da 100644 --- a/src/panels/config/blueprint/ha-config-blueprint.ts +++ b/src/panels/config/blueprint/ha-config-blueprint.ts @@ -1,4 +1,5 @@ -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { Blueprints, fetchBlueprints } from "../../../data/blueprint"; import { HassRouterPage, diff --git a/src/panels/config/cloud/account/cloud-alexa-pref.ts b/src/panels/config/cloud/account/cloud-alexa-pref.ts index 4d66bb7383..9b98f7d560 100644 --- a/src/panels/config/cloud/account/cloud-alexa-pref.ts +++ b/src/panels/config/cloud/account/cloud-alexa-pref.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import "../../../../components/ha-switch"; diff --git a/src/panels/config/cloud/account/cloud-google-pref.ts b/src/panels/config/cloud/account/cloud-google-pref.ts index 8bb77a0413..b572e7a67e 100644 --- a/src/panels/config/cloud/account/cloud-google-pref.ts +++ b/src/panels/config/cloud/account/cloud-google-pref.ts @@ -1,14 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/buttons/ha-call-api-button"; import "../../../../components/ha-card"; diff --git a/src/panels/config/cloud/account/cloud-remote-pref.ts b/src/panels/config/cloud/account/cloud-remote-pref.ts index 5449e7d9f0..a2973d250b 100644 --- a/src/panels/config/cloud/account/cloud-remote-pref.ts +++ b/src/panels/config/cloud/account/cloud-remote-pref.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import "../../../../components/ha-switch"; diff --git a/src/panels/config/cloud/account/cloud-tts-pref.ts b/src/panels/config/cloud/account/cloud-tts-pref.ts index 04811cfe12..1b57e7b113 100644 --- a/src/panels/config/cloud/account/cloud-tts-pref.ts +++ b/src/panels/config/cloud/account/cloud-tts-pref.ts @@ -1,32 +1,24 @@ +import "@material/mwc-button"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import memoizeOne from "memoize-one"; +import { fireEvent } from "../../../../common/dom/fire_event"; +import { caseInsensitiveCompare } from "../../../../common/string/compare"; import "../../../../components/ha-card"; -import "../../../../components/ha-switch"; import "../../../../components/ha-svg-icon"; +import "../../../../components/ha-switch"; import { CloudStatusLoggedIn, CloudTTSInfo, getCloudTTSInfo, updateCloudPref, } from "../../../../data/cloud"; -import type { HomeAssistant } from "../../../../types"; import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; import { translationMetadata } from "../../../../resources/translations-metadata"; -import { caseInsensitiveCompare } from "../../../../common/string/compare"; -import memoizeOne from "memoize-one"; -import { fireEvent } from "../../../../common/dom/fire_event"; +import type { HomeAssistant } from "../../../../types"; import { showTryTtsDialog } from "./show-dialog-cloud-tts-try"; @customElement("cloud-tts-pref") diff --git a/src/panels/config/cloud/account/cloud-webhooks.ts b/src/panels/config/cloud/account/cloud-webhooks.ts index 6ea5063adb..309e78b651 100644 --- a/src/panels/config/cloud/account/cloud-webhooks.ts +++ b/src/panels/config/cloud/account/cloud-webhooks.ts @@ -1,20 +1,12 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; import "../../../../components/ha-card"; import "../../../../components/ha-circular-progress"; import "../../../../components/ha-settings-row"; import "../../../../components/ha-switch"; -import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; import { CloudStatusLoggedIn, CloudWebhook, diff --git a/src/panels/config/cloud/account/dialog-cloud-tts-try.ts b/src/panels/config/cloud/account/dialog-cloud-tts-try.ts index 4fbc535016..9da9b5ca10 100644 --- a/src/panels/config/cloud/account/dialog-cloud-tts-try.ts +++ b/src/panels/config/cloud/account/dialog-cloud-tts-try.ts @@ -1,34 +1,25 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { HomeAssistant } from "../../../../types"; -import { TryTtsDialogParams } from "./show-dialog-cloud-tts-try"; -import { haStyleDialog } from "../../../../resources/styles"; -import { fireEvent } from "../../../../common/dom/fire_event"; -import { convertTextToSpeech } from "../../../../data/tts"; -import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; +import { mdiPlayCircleOutline } from "@mdi/js"; import "@polymer/paper-input/paper-textarea"; -import "../../../../components/ha-paper-dropdown-menu"; -import { computeStateDomain } from "../../../../common/entity/compute_state_domain"; -import { computeStateName } from "../../../../common/entity/compute_state_name"; +import type { PaperTextareaElement } from "@polymer/paper-input/paper-textarea"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { supportsFeature } from "../../../../common/entity/supports-feature"; -import { SUPPORT_PLAY_MEDIA } from "../../../../data/media-player"; -import { createCloseHeading } from "../../../../components/ha-dialog"; -import { mdiPlayCircleOutline } from "@mdi/js"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import type { PaperTextareaElement } from "@polymer/paper-input/paper-textarea"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { LocalStorage } from "../../../../common/decorators/local-storage"; +import { fireEvent } from "../../../../common/dom/fire_event"; +import { computeStateDomain } from "../../../../common/entity/compute_state_domain"; +import { computeStateName } from "../../../../common/entity/compute_state_name"; +import { supportsFeature } from "../../../../common/entity/supports-feature"; +import { createCloseHeading } from "../../../../components/ha-dialog"; +import "../../../../components/ha-paper-dropdown-menu"; +import { SUPPORT_PLAY_MEDIA } from "../../../../data/media-player"; +import { convertTextToSpeech } from "../../../../data/tts"; +import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; +import { haStyleDialog } from "../../../../resources/styles"; +import { HomeAssistant } from "../../../../types"; +import { TryTtsDialogParams } from "./show-dialog-cloud-tts-try"; @customElement("dialog-cloud-try-tts") export class DialogTryTts extends LitElement { diff --git a/src/panels/config/cloud/alexa/cloud-alexa.ts b/src/panels/config/cloud/alexa/cloud-alexa.ts index ab88d5d590..f3cdda6971 100644 --- a/src/panels/config/cloud/alexa/cloud-alexa.ts +++ b/src/panels/config/cloud/alexa/cloud-alexa.ts @@ -6,17 +6,9 @@ import { mdiCloseBox, mdiCloseBoxMultiple, } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../common/dom/fire_event"; import { computeDomain } from "../../../../common/entity/compute_domain"; diff --git a/src/panels/config/cloud/dialog-cloud-certificate/dialog-cloud-certificate.ts b/src/panels/config/cloud/dialog-cloud-certificate/dialog-cloud-certificate.ts index 64ccfb71e0..8351c20cc0 100644 --- a/src/panels/config/cloud/dialog-cloud-certificate/dialog-cloud-certificate.ts +++ b/src/panels/config/cloud/dialog-cloud-certificate/dialog-cloud-certificate.ts @@ -1,12 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { formatDateTime } from "../../../../common/datetime/format_date_time"; import "../../../../components/dialog/ha-paper-dialog"; import type { HaPaperDialog } from "../../../../components/dialog/ha-paper-dialog"; diff --git a/src/panels/config/cloud/dialog-manage-cloudhook/dialog-manage-cloudhook.ts b/src/panels/config/cloud/dialog-manage-cloudhook/dialog-manage-cloudhook.ts index 8325ec4bd8..2fea1ef018 100644 --- a/src/panels/config/cloud/dialog-manage-cloudhook/dialog-manage-cloudhook.ts +++ b/src/panels/config/cloud/dialog-manage-cloudhook/dialog-manage-cloudhook.ts @@ -2,7 +2,8 @@ import "@material/mwc-button"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { css, CSSResultGroup, html, state, LitElement } from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { state } from "lit/decorators"; import "../../../../components/dialog/ha-paper-dialog"; import type { HaPaperDialog } from "../../../../components/dialog/ha-paper-dialog"; import { showConfirmationDialog } from "../../../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts b/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts index 179bd95684..29068eeb71 100644 --- a/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts +++ b/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts @@ -6,17 +6,9 @@ import { mdiCloseBox, mdiCloseBoxMultiple, } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../common/dom/fire_event"; import { computeDomain } from "../../../../common/entity/compute_domain"; diff --git a/src/panels/config/cloud/ha-config-cloud.ts b/src/panels/config/cloud/ha-config-cloud.ts index 7fbe569f82..62db01a437 100644 --- a/src/panels/config/cloud/ha-config-cloud.ts +++ b/src/panels/config/cloud/ha-config-cloud.ts @@ -1,5 +1,5 @@ import { PolymerElement } from "@polymer/polymer"; -import { customElement, state, property } from "lit-element"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../common/navigate"; import { CloudStatus } from "../../../data/cloud"; import { diff --git a/src/panels/config/core/ha-config-analytics.ts b/src/panels/config/core/ha-config-analytics.ts index b533c4c407..1050e7f8ca 100644 --- a/src/panels/config/core/ha-config-analytics.ts +++ b/src/panels/config/core/ha-config-analytics.ts @@ -2,14 +2,12 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import "../../../components/ha-analytics"; import { analyticsLearnMore } from "../../../components/ha-analytics-learn-more"; diff --git a/src/panels/config/core/ha-config-core-form.ts b/src/panels/config/core/ha-config-core-form.ts index 848d89bbdf..322c2697c1 100644 --- a/src/panels/config/core/ha-config-core-form.ts +++ b/src/panels/config/core/ha-config-core-form.ts @@ -3,16 +3,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { UNIT_C } from "../../../common/const"; import "../../../components/ha-card"; diff --git a/src/panels/config/core/ha-config-name-form.ts b/src/panels/config/core/ha-config-name-form.ts index bbb9f16035..f99e073cb8 100644 --- a/src/panels/config/core/ha-config-name-form.ts +++ b/src/panels/config/core/ha-config-name-form.ts @@ -3,15 +3,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../components/ha-card"; import { ConfigUpdateValues, saveCoreConfig } from "../../../data/core"; import type { PolymerChangedEvent } from "../../../polymer-types"; diff --git a/src/panels/config/core/ha-config-url-form.ts b/src/panels/config/core/ha-config-url-form.ts index 9a26b83236..6c7e9f0468 100644 --- a/src/panels/config/core/ha-config-url-form.ts +++ b/src/panels/config/core/ha-config-url-form.ts @@ -1,16 +1,8 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../components/ha-card"; import { saveCoreConfig } from "../../../data/core"; import type { PolymerChangedEvent } from "../../../polymer-types"; diff --git a/src/panels/config/customize/ha-config-customize.ts b/src/panels/config/customize/ha-config-customize.ts index a79d356836..d6109546fc 100644 --- a/src/panels/config/customize/ha-config-customize.ts +++ b/src/panels/config/customize/ha-config-customize.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import "../../../components/ha-card"; import "../../../layouts/hass-loading-screen"; import "../../../layouts/hass-tabs-subpage"; diff --git a/src/panels/config/dashboard/ha-config-dashboard.ts b/src/panels/config/dashboard/ha-config-dashboard.ts index f4844895ea..f81527cce0 100644 --- a/src/panels/config/dashboard/ha-config-dashboard.ts +++ b/src/panels/config/dashboard/ha-config-dashboard.ts @@ -1,15 +1,8 @@ import { mdiCloudLock } from "@mdi/js"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import "../../../components/ha-card"; import "../../../components/ha-icon-next"; diff --git a/src/panels/config/dashboard/ha-config-navigation.ts b/src/panels/config/dashboard/ha-config-navigation.ts index 935cc544f1..ee08290b06 100644 --- a/src/panels/config/dashboard/ha-config-navigation.ts +++ b/src/panels/config/dashboard/ha-config-navigation.ts @@ -1,14 +1,7 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { canShowPage } from "../../../common/config/can_show_page"; import "../../../components/ha-card"; import "../../../components/ha-icon-next"; diff --git a/src/panels/config/devices/device-detail/ha-device-actions-card.ts b/src/panels/config/devices/device-detail/ha-device-actions-card.ts index a5d5e4507f..bec915a9e3 100644 --- a/src/panels/config/devices/device-detail/ha-device-actions-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-actions-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import "../../../../components/ha-card"; import { DeviceAction, diff --git a/src/panels/config/devices/device-detail/ha-device-automation-card.ts b/src/panels/config/devices/device-detail/ha-device-automation-card.ts index ed4a1caa13..b77958e820 100644 --- a/src/panels/config/devices/device-detail/ha-device-automation-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-automation-card.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import "../../../../components/ha-card"; import "../../../../components/ha-chip-set"; import { showAutomationEditor } from "../../../../data/automation"; diff --git a/src/panels/config/devices/device-detail/ha-device-automation-dialog.ts b/src/panels/config/devices/device-detail/ha-device-automation-dialog.ts index 876289e04d..eb18201a25 100644 --- a/src/panels/config/devices/device-detail/ha-device-automation-dialog.ts +++ b/src/panels/config/devices/device-detail/ha-device-automation-dialog.ts @@ -1,12 +1,6 @@ -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import "@material/mwc-button/mwc-button"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-dialog"; import { @@ -23,7 +17,6 @@ import "./ha-device-actions-card"; import "./ha-device-conditions-card"; import "./ha-device-triggers-card"; import { DeviceAutomationDialogParams } from "./show-dialog-device-automation"; -import "@material/mwc-button/mwc-button"; @customElement("dialog-device-automation") export class DialogDeviceAutomation extends LitElement { diff --git a/src/panels/config/devices/device-detail/ha-device-conditions-card.ts b/src/panels/config/devices/device-detail/ha-device-conditions-card.ts index 54f126667a..ffa084bf6c 100644 --- a/src/panels/config/devices/device-detail/ha-device-conditions-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-conditions-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import "../../../../components/ha-card"; import { DeviceCondition, diff --git a/src/panels/config/devices/device-detail/ha-device-entities-card.ts b/src/panels/config/devices/device-detail/ha-device-entities-card.ts index 7a779b6065..5bb169256b 100644 --- a/src/panels/config/devices/device-detail/ha-device-entities-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-entities-card.ts @@ -4,13 +4,12 @@ import "@polymer/paper-item/paper-item-body"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { computeDomain } from "../../../../common/entity/compute_domain"; import { domainIcon } from "../../../../common/entity/domain_icon"; import "../../../../components/entity/state-badge"; diff --git a/src/panels/config/devices/device-detail/ha-device-info-card.ts b/src/panels/config/devices/device-detail/ha-device-info-card.ts index bddb19aecb..f442246d0f 100644 --- a/src/panels/config/devices/device-detail/ha-device-info-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-info-card.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { AreaRegistryEntry } from "../../../../data/area_registry"; import { computeDeviceName, diff --git a/src/panels/config/devices/device-detail/ha-device-triggers-card.ts b/src/panels/config/devices/device-detail/ha-device-triggers-card.ts index ec14f55d35..bdf15ee03b 100644 --- a/src/panels/config/devices/device-detail/ha-device-triggers-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-triggers-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { DeviceTrigger, localizeDeviceAutomationTrigger, diff --git a/src/panels/config/devices/device-detail/integration-elements/mqtt/dialog-mqtt-device-debug-info.ts b/src/panels/config/devices/device-detail/integration-elements/mqtt/dialog-mqtt-device-debug-info.ts index 3f0a740f93..f97427a067 100644 --- a/src/panels/config/devices/device-detail/integration-elements/mqtt/dialog-mqtt-device-debug-info.ts +++ b/src/panels/config/devices/device-detail/integration-elements/mqtt/dialog-mqtt-device-debug-info.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { computeStateName } from "../../../../../../common/entity/compute_state_name"; import { computeRTLDirection } from "../../../../../../common/util/compute_rtl"; import "../../../../../../components/ha-dialog"; diff --git a/src/panels/config/devices/device-detail/integration-elements/mqtt/ha-device-actions-mqtt.ts b/src/panels/config/devices/device-detail/integration-elements/mqtt/ha-device-actions-mqtt.ts index 54ab5b9403..4be0413450 100644 --- a/src/panels/config/devices/device-detail/integration-elements/mqtt/ha-device-actions-mqtt.ts +++ b/src/panels/config/devices/device-detail/integration-elements/mqtt/ha-device-actions-mqtt.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { removeMQTTDeviceEntry } from "../../../../../../data/mqtt"; import { showConfirmationDialog } from "../../../../../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-discovery-payload.ts b/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-discovery-payload.ts index afea8620fa..cc80ae4b6d 100644 --- a/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-discovery-payload.ts +++ b/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-discovery-payload.ts @@ -1,15 +1,7 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; @customElement("mqtt-discovery-payload") class MQTTDiscoveryPayload extends LitElement { diff --git a/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-messages.ts b/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-messages.ts index 9bd2ec167a..734b4ae085 100644 --- a/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-messages.ts +++ b/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-messages.ts @@ -1,15 +1,7 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { formatTimeWithSeconds } from "../../../../../../common/datetime/format_time"; import { MQTTMessage } from "../../../../../../data/mqtt"; import { HomeAssistant } from "../../../../../../types"; diff --git a/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-actions-ozw.ts b/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-actions-ozw.ts index 9fe72d2ff2..d932d2edc4 100644 --- a/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-actions-ozw.ts +++ b/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-actions-ozw.ts @@ -2,13 +2,12 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { navigate } from "../../../../../../common/navigate"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { diff --git a/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-info-ozw.ts b/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-info-ozw.ts index 3fab405b92..bfb4d7bba8 100644 --- a/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-info-ozw.ts +++ b/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-info-ozw.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { fetchOZWNodeStatus, diff --git a/src/panels/config/devices/device-detail/integration-elements/tasmota/ha-device-actions-tasmota.ts b/src/panels/config/devices/device-detail/integration-elements/tasmota/ha-device-actions-tasmota.ts index 6b4009dd0e..33bc22a3a3 100644 --- a/src/panels/config/devices/device-detail/integration-elements/tasmota/ha-device-actions-tasmota.ts +++ b/src/panels/config/devices/device-detail/integration-elements/tasmota/ha-device-actions-tasmota.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { removeTasmotaDeviceEntry } from "../../../../../../data/tasmota"; import { showConfirmationDialog } from "../../../../../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-actions-zha.ts b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-actions-zha.ts index 723b0f4425..cffd1ca1e2 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-actions-zha.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-actions-zha.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../../../../common/navigate"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { fetchZHADevice, ZHADevice } from "../../../../../../data/zha"; @@ -16,9 +14,9 @@ import { showConfirmationDialog } from "../../../../../../dialogs/generic/show-d import { haStyle } from "../../../../../../resources/styles"; import { HomeAssistant } from "../../../../../../types"; import { showZHAClusterDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-cluster"; +import { showZHADeviceChildrenDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-device-children"; import { showZHADeviceZigbeeInfoDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-device-zigbee-info"; import { showZHAReconfigureDeviceDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-reconfigure-device"; -import { showZHADeviceChildrenDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-device-children"; @customElement("ha-device-actions-zha") export class HaDeviceActionsZha extends LitElement { diff --git a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts index 6aa0188b2b..28a3e3e0e6 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { fetchZHADevice, ZHADevice } from "../../../../../../data/zha"; import { haStyle } from "../../../../../../resources/styles"; diff --git a/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-actions-zwave_js.ts b/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-actions-zwave_js.ts index 6620ac62ad..e258e66835 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-actions-zwave_js.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-actions-zwave_js.ts @@ -2,14 +2,12 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { getIdentifiersFromDevice, diff --git a/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts b/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts index c37856a5c2..f8558fc5fb 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts @@ -1,23 +1,20 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { - getIdentifiersFromDevice, fetchNodeStatus, + getIdentifiersFromDevice, + nodeStatus, ZWaveJSNode, ZWaveJSNodeIdentifiers, - nodeStatus, } from "../../../../../../data/zwave_js"; - import { haStyle } from "../../../../../../resources/styles"; import { HomeAssistant } from "../../../../../../types"; diff --git a/src/panels/config/devices/device-registry-detail/dialog-device-registry-detail.ts b/src/panels/config/devices/device-registry-detail/dialog-device-registry-detail.ts index a6536d8c56..5a36906c77 100644 --- a/src/panels/config/devices/device-registry-detail/dialog-device-registry-detail.ts +++ b/src/panels/config/devices/device-registry-detail/dialog-device-registry-detail.ts @@ -3,16 +3,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-area-picker"; import "../../../../components/ha-dialog"; diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index 4162a1a737..8211702ead 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -1,15 +1,7 @@ import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; diff --git a/src/panels/config/devices/ha-config-devices-dashboard.ts b/src/panels/config/devices/ha-config-devices-dashboard.ts index b6b2d2ff0b..683d62f778 100644 --- a/src/panels/config/devices/ha-config-devices-dashboard.ts +++ b/src/panels/config/devices/ha-config-devices-dashboard.ts @@ -2,16 +2,8 @@ import "@material/mwc-list/mwc-list-item"; import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item"; import { mdiCancel, mdiFilterVariant, mdiPlus } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../common/dom/fire_event"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; diff --git a/src/panels/config/devices/ha-config-devices.ts b/src/panels/config/devices/ha-config-devices.ts index 9252c18420..fe5625565c 100644 --- a/src/panels/config/devices/ha-config-devices.ts +++ b/src/panels/config/devices/ha-config-devices.ts @@ -1,5 +1,6 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { customElement, state, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { AreaRegistryEntry, subscribeAreaRegistry, diff --git a/src/panels/config/entities/dialog-entity-editor.ts b/src/panels/config/entities/dialog-entity-editor.ts index 45f5058070..a9f02c9137 100644 --- a/src/panels/config/entities/dialog-entity-editor.ts +++ b/src/panels/config/entities/dialog-entity-editor.ts @@ -3,17 +3,9 @@ import "@material/mwc-tab"; import "@material/mwc-tab-bar"; import { mdiClose, mdiTune } from "@mdi/js"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { cache } from "lit-html/directives/cache"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { cache } from "lit/directives/cache"; import { dynamicElement } from "../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; @@ -26,13 +18,13 @@ import { ExtEntityRegistryEntry, getExtendedEntityRegistryEntry, } from "../../../data/entity_registry"; +import { replaceDialog } from "../../../dialogs/make-dialog-manager"; import { haStyleDialog } from "../../../resources/styles"; import type { HomeAssistant } from "../../../types"; import { documentationUrl } from "../../../util/documentation-url"; import { PLATFORMS_WITH_SETTINGS_TAB } from "./const"; import "./entity-registry-settings"; import type { EntityRegistryDetailDialogParams } from "./show-dialog-entity-editor"; -import { replaceDialog } from "../../../dialogs/make-dialog-manager"; interface Tabs { [key: string]: Tab; @@ -59,15 +51,12 @@ export class DialogEntityEditor extends LitElement { private _curTabIndex = 0; - public async showDialog( - params: EntityRegistryDetailDialogParams - ): Promise { + public showDialog(params: EntityRegistryDetailDialogParams): void { this._params = params; this._entry = undefined; this._settingsElementTag = undefined; this._extraTabs = {}; this._getEntityReg(); - await this.updateComplete; } public closeDialog(): void { diff --git a/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts b/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts index d47479811b..8d48ffd2e6 100644 --- a/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts +++ b/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts @@ -1,15 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { isComponentLoaded } from "../../../../../common/config/is_component_loaded"; import { dynamicElement } from "../../../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../../../common/dom/fire_event"; diff --git a/src/panels/config/entities/entity-registry-basic-editor.ts b/src/panels/config/entities/entity-registry-basic-editor.ts index 027e9334da..af79a115aa 100644 --- a/src/panels/config/entities/entity-registry-basic-editor.ts +++ b/src/panels/config/entities/entity-registry-basic-editor.ts @@ -1,15 +1,7 @@ import "@polymer/paper-input/paper-input"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { computeDomain } from "../../../common/entity/compute_domain"; import "../../../components/ha-area-picker"; import "../../../components/ha-switch"; diff --git a/src/panels/config/entities/entity-registry-settings.ts b/src/panels/config/entities/entity-registry-settings.ts index 4c83b7b795..36bc24b843 100644 --- a/src/panels/config/entities/entity-registry-settings.ts +++ b/src/panels/config/entities/entity-registry-settings.ts @@ -4,14 +4,12 @@ import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeDomain } from "../../../common/entity/compute_domain"; import { domainIcon } from "../../../common/entity/domain_icon"; diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts index 5f6993e13f..59f9a4f548 100644 --- a/src/panels/config/entities/ha-config-entities.ts +++ b/src/panels/config/entities/ha-config-entities.ts @@ -13,19 +13,10 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; import "@polymer/paper-tooltip/paper-tooltip"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import memoize from "memoize-one"; import type { HASSDomEvent } from "../../../common/dom/fire_event"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/config/ha-config-section.ts b/src/panels/config/ha-config-section.ts index f98ef27012..01211a9b7a 100644 --- a/src/panels/config/ha-config-section.ts +++ b/src/panels/config/ha-config-section.ts @@ -1,5 +1,6 @@ -import { css, customElement, html, LitElement, property } from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; @customElement("ha-config-section") export class HaConfigSection extends LitElement { diff --git a/src/panels/config/ha-entity-config.ts b/src/panels/config/ha-entity-config.ts index 838523efc9..87a3fa0687 100644 --- a/src/panels/config/ha-entity-config.ts +++ b/src/panels/config/ha-entity-config.ts @@ -2,14 +2,12 @@ import "@material/mwc-button"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../../components/buttons/ha-progress-button"; import "../../components/entity/ha-entity-picker"; import "../../components/ha-card"; diff --git a/src/panels/config/ha-panel-config.ts b/src/panels/config/ha-panel-config.ts index 34583a8ad8..e31711cf99 100644 --- a/src/panels/config/ha-panel-config.ts +++ b/src/panels/config/ha-panel-config.ts @@ -22,7 +22,8 @@ import { import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; import { PolymerElement } from "@polymer/polymer"; -import { customElement, state, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { listenMediaQuery } from "../../common/dom/media_query"; import { CloudStatus, fetchCloudStatus } from "../../data/cloud"; diff --git a/src/panels/config/helpers/dialog-helper-detail.ts b/src/panels/config/helpers/dialog-helper-detail.ts index 16e85a43f0..459b5524f7 100644 --- a/src/panels/config/helpers/dialog-helper-detail.ts +++ b/src/panels/config/helpers/dialog-helper-detail.ts @@ -1,18 +1,9 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { dynamicElement } from "../../../common/dom/dynamic-element-directive"; import { domainIcon } from "../../../common/entity/domain_icon"; diff --git a/src/panels/config/helpers/forms/ha-counter-form.ts b/src/panels/config/helpers/forms/ha-counter-form.ts index 460bd0b9d2..607fa64af0 100644 --- a/src/panels/config/helpers/forms/ha-counter-form.ts +++ b/src/panels/config/helpers/forms/ha-counter-form.ts @@ -1,14 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import "../../../../components/ha-switch"; diff --git a/src/panels/config/helpers/forms/ha-input_boolean-form.ts b/src/panels/config/helpers/forms/ha-input_boolean-form.ts index 18ca1f4741..419819d4f2 100644 --- a/src/panels/config/helpers/forms/ha-input_boolean-form.ts +++ b/src/panels/config/helpers/forms/ha-input_boolean-form.ts @@ -1,14 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { InputBoolean } from "../../../../data/input_boolean"; diff --git a/src/panels/config/helpers/forms/ha-input_datetime-form.ts b/src/panels/config/helpers/forms/ha-input_datetime-form.ts index 03eb3f08c6..362fe30c90 100644 --- a/src/panels/config/helpers/forms/ha-input_datetime-form.ts +++ b/src/panels/config/helpers/forms/ha-input_datetime-form.ts @@ -1,16 +1,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { InputDateTime } from "../../../../data/input_datetime"; diff --git a/src/panels/config/helpers/forms/ha-input_number-form.ts b/src/panels/config/helpers/forms/ha-input_number-form.ts index c049b5790c..ec3288ebab 100644 --- a/src/panels/config/helpers/forms/ha-input_number-form.ts +++ b/src/panels/config/helpers/forms/ha-input_number-form.ts @@ -1,16 +1,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { InputNumber } from "../../../../data/input_number"; diff --git a/src/panels/config/helpers/forms/ha-input_select-form.ts b/src/panels/config/helpers/forms/ha-input_select-form.ts index 1aba9c2d23..fbb15f7f6e 100644 --- a/src/panels/config/helpers/forms/ha-input_select-form.ts +++ b/src/panels/config/helpers/forms/ha-input_select-form.ts @@ -3,17 +3,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-button"; import "../../../../components/ha-icon-input"; diff --git a/src/panels/config/helpers/forms/ha-input_text-form.ts b/src/panels/config/helpers/forms/ha-input_text-form.ts index a63d8580eb..4de30e62d2 100644 --- a/src/panels/config/helpers/forms/ha-input_text-form.ts +++ b/src/panels/config/helpers/forms/ha-input_text-form.ts @@ -1,16 +1,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { InputText } from "../../../../data/input_text"; diff --git a/src/panels/config/helpers/forms/ha-timer-form.ts b/src/panels/config/helpers/forms/ha-timer-form.ts index e8a83ad32c..2842226ce5 100644 --- a/src/panels/config/helpers/forms/ha-timer-form.ts +++ b/src/panels/config/helpers/forms/ha-timer-form.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { DurationDict, Timer } from "../../../../data/timer"; diff --git a/src/panels/config/helpers/ha-config-helpers.ts b/src/panels/config/helpers/ha-config-helpers.ts index 41535926b2..40371e8607 100644 --- a/src/panels/config/helpers/ha-config-helpers.ts +++ b/src/panels/config/helpers/ha-config-helpers.ts @@ -5,15 +5,8 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; import "@polymer/paper-tooltip/paper-tooltip"; import { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoize from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { domainIcon } from "../../../common/entity/domain_icon"; diff --git a/src/panels/config/info/ha-config-info.ts b/src/panels/config/info/ha-config-info.ts index 7d2911ca45..d849eaeada 100644 --- a/src/panels/config/info/ha-config-info.ts +++ b/src/panels/config/info/ha-config-info.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import "../../../layouts/hass-tabs-subpage"; import { haStyle } from "../../../resources/styles"; import { HomeAssistant, Route } from "../../../types"; diff --git a/src/panels/config/info/integrations-card.ts b/src/panels/config/info/integrations-card.ts index eb0c876148..2c31c9a354 100644 --- a/src/panels/config/info/integrations-card.ts +++ b/src/panels/config/info/integrations-card.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import "../../../components/ha-card"; import { diff --git a/src/panels/config/info/system-health-card.ts b/src/panels/config/info/system-health-card.ts index 85728fec70..28c139609a 100644 --- a/src/panels/config/info/system-health-card.ts +++ b/src/panels/config/info/system-health-card.ts @@ -4,18 +4,11 @@ import { ActionDetail } from "@material/mwc-list/mwc-list-foundation"; import "@material/mwc-list/mwc-list-item"; import { mdiContentCopy } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { formatDateTime } from "../../../common/datetime/format_date_time"; import { copyToClipboard } from "../../../common/util/copy-clipboard"; -import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import "../../../components/ha-button-menu"; import "../../../components/ha-card"; import "../../../components/ha-circular-progress"; diff --git a/src/panels/config/integrations/ha-config-flow-card.ts b/src/panels/config/integrations/ha-config-flow-card.ts index fd6769b22c..369b4dca7a 100644 --- a/src/panels/config/integrations/ha-config-flow-card.ts +++ b/src/panels/config/integrations/ha-config-flow-card.ts @@ -1,12 +1,6 @@ -import { - customElement, - LitElement, - property, - css, - html, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { ATTENTION_SOURCES, diff --git a/src/panels/config/integrations/ha-config-integrations.ts b/src/panels/config/integrations/ha-config-integrations.ts index e2cdcc6187..3446189e09 100644 --- a/src/panels/config/integrations/ha-config-integrations.ts +++ b/src/panels/config/integrations/ha-config-integrations.ts @@ -7,20 +7,25 @@ import type { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; +import type { HASSDomEvent } from "../../../common/dom/fire_event"; import { navigate } from "../../../common/navigate"; +import "../../../common/search/search-input"; import { caseInsensitiveCompare } from "../../../common/string/compare"; +import type { LocalizeFunc } from "../../../common/translations/localize"; import { extractSearchParam } from "../../../common/url/search-params"; import { nextRender } from "../../../common/util/render-status"; +import "../../../components/ha-button-menu"; +import "../../../components/ha-checkbox"; +import "../../../components/ha-fab"; +import "../../../components/ha-svg-icon"; import { ConfigEntry, getConfigEntries } from "../../../data/config_entries"; import { getConfigFlowInProgressCollection, @@ -44,25 +49,16 @@ import { } from "../../../data/integration"; import { showConfigFlowDialog } from "../../../dialogs/config-flow/show-dialog-config-flow"; import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box"; -import { SubscribeMixin } from "../../../mixins/subscribe-mixin"; -import { haStyle } from "../../../resources/styles"; -import { configSections } from "../ha-panel-config"; - -import type { HomeAssistant, Route } from "../../../types"; -import type { HASSDomEvent } from "../../../common/dom/fire_event"; -import type { LocalizeFunc } from "../../../common/translations/localize"; -import type { HaIntegrationCard } from "./ha-integration-card"; - -import "../../../common/search/search-input"; -import "../../../components/ha-button-menu"; -import "../../../components/ha-fab"; -import "../../../components/ha-checkbox"; -import "../../../components/ha-svg-icon"; import "../../../layouts/hass-loading-screen"; import "../../../layouts/hass-tabs-subpage"; -import "./ha-integration-card"; +import { SubscribeMixin } from "../../../mixins/subscribe-mixin"; +import { haStyle } from "../../../resources/styles"; +import type { HomeAssistant, Route } from "../../../types"; +import { configSections } from "../ha-panel-config"; import "./ha-config-flow-card"; import "./ha-ignored-config-entry-card"; +import "./ha-integration-card"; +import type { HaIntegrationCard } from "./ha-integration-card"; export interface ConfigEntryUpdatedEvent { entry: ConfigEntry; diff --git a/src/panels/config/integrations/ha-ignored-config-entry-card.ts b/src/panels/config/integrations/ha-ignored-config-entry-card.ts index cbd6c476b7..34c7c32dc3 100644 --- a/src/panels/config/integrations/ha-ignored-config-entry-card.ts +++ b/src/panels/config/integrations/ha-ignored-config-entry-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - LitElement, - property, - css, - html, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { deleteConfigEntry } from "../../../data/config_entries"; import type { IntegrationManifest } from "../../../data/integration"; diff --git a/src/panels/config/integrations/ha-integration-action-card.ts b/src/panels/config/integrations/ha-integration-action-card.ts index 2470067684..8f24451007 100644 --- a/src/panels/config/integrations/ha-integration-action-card.ts +++ b/src/panels/config/integrations/ha-integration-action-card.ts @@ -1,11 +1,5 @@ -import { - TemplateResult, - html, - customElement, - LitElement, - property, - css, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import type { IntegrationManifest } from "../../../data/integration"; import type { HomeAssistant } from "../../../types"; import "./ha-integration-header"; diff --git a/src/panels/config/integrations/ha-integration-card.ts b/src/panels/config/integrations/ha-integration-card.ts index 615e359862..cbd7de5aab 100644 --- a/src/panels/config/integrations/ha-integration-card.ts +++ b/src/panels/config/integrations/ha-integration-card.ts @@ -1,26 +1,19 @@ -import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item"; -import "@material/mwc-list/mwc-list-item"; -import "@polymer/paper-listbox"; import "@material/mwc-button"; -import "@polymer/paper-item"; -import "@polymer/paper-tooltip/paper-tooltip"; +import "@material/mwc-list/mwc-list-item"; +import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item"; import { mdiAlertCircle, mdiDotsVertical, mdiOpenInNew } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import "@polymer/paper-item"; +import "@polymer/paper-listbox"; +import "@polymer/paper-tooltip/paper-tooltip"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { shouldHandleRequestSelectedEvent } from "../../../common/mwc/handle-request-selected-event"; -import "../../../components/ha-icon-next"; import "../../../components/ha-button-menu"; -import "../../../components/ha-svg-icon"; import "../../../components/ha-card"; +import "../../../components/ha-icon-next"; +import "../../../components/ha-svg-icon"; import { ConfigEntry, deleteConfigEntry, diff --git a/src/panels/config/integrations/ha-integration-header.ts b/src/panels/config/integrations/ha-integration-header.ts index 29cf8d3544..cd189da48b 100644 --- a/src/panels/config/integrations/ha-integration-header.ts +++ b/src/panels/config/integrations/ha-integration-header.ts @@ -1,14 +1,8 @@ -import "../../../components/ha-svg-icon"; -import { mdiPackageVariant, mdiCloud } from "@mdi/js"; +import { mdiCloud, mdiPackageVariant } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - html, - customElement, - property, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import "../../../components/ha-svg-icon"; import { domainToName, IntegrationManifest } from "../../../data/integration"; import { HomeAssistant } from "../../../types"; import { brandsUrl } from "../../../util/brands-url"; diff --git a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts index 827e6aef6b..2edd27c8db 100644 --- a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts +++ b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/ha-card"; import "../../../../../components/ha-code-editor"; import { getConfigEntries } from "../../../../../data/config_entries"; diff --git a/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts b/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts index 22b3ab4a54..c3fd96ce4f 100644 --- a/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts +++ b/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { formatTime } from "../../../../../common/datetime/format_time"; import "../../../../../components/ha-card"; import { MQTTMessage, subscribeMQTTTopic } from "../../../../../data/mqtt"; diff --git a/src/panels/config/integrations/integration-panels/ozw/dialog-ozw-refresh-node.ts b/src/panels/config/integrations/integration-panels/ozw/dialog-ozw-refresh-node.ts index 1f8faf19bb..8a0dd34174 100644 --- a/src/panels/config/integrations/integration-panels/ozw/dialog-ozw-refresh-node.ts +++ b/src/panels/config/integrations/integration-panels/ozw/dialog-ozw-refresh-node.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/ha-circular-progress"; import "../../../../../components/ha-code-editor"; import { createCloseHeading } from "../../../../../components/ha-dialog"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-config-dashboard.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-config-dashboard.ts index 8856c3a24c..5d4f673eff 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-config-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-config-dashboard.ts @@ -2,16 +2,8 @@ import "@material/mwc-button/mwc-button"; import { mdiCheckCircle, mdiCircle, mdiCloseCircle, mdiZWave } from "@mdi/js"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import "../../../../../components/ha-card"; import "../../../../../components/ha-icon-next"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-config-router.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-config-router.ts index ba31c90f06..ad2d2e38fe 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-config-router.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-config-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HassRouterPage, diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-network-dashboard.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-network-dashboard.ts index 10f5e38d97..aa56687d6c 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-network-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-network-dashboard.ts @@ -1,16 +1,8 @@ import "@material/mwc-button/mwc-button"; import { mdiCheckCircle, mdiCircle, mdiCloseCircle } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { navigate } from "../../../../../common/navigate"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-network-nodes.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-network-nodes.ts index da9f5175a3..9de8234c6b 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-network-nodes.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-network-nodes.ts @@ -1,14 +1,7 @@ import "@material/mwc-button/mwc-button"; import { mdiAlert, mdiCheck } from "@mdi/js"; -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../../../common/dom/fire_event"; import { navigate } from "../../../../../common/navigate"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-network-router.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-network-router.ts index e16133ba01..0294ff9b0f 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-network-router.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-network-router.ts @@ -1,5 +1,5 @@ import { mdiNetwork, mdiServerNetwork } from "@mdi/js"; -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassRouterPage, RouterOptions, diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-node-config.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-node-config.ts index ec55e61569..4eeda2d481 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-node-config.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-node-config.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-node-dashboard.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-node-dashboard.ts index b8a6bcf5bd..af7d2089e0 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-node-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-node-dashboard.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-node-router.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-node-router.ts index 45a922f8b7..5168e21138 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-node-router.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-node-router.ts @@ -1,5 +1,5 @@ import { mdiNetwork, mdiWrench } from "@mdi/js"; -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import { HassRouterPage, diff --git a/src/panels/config/integrations/integration-panels/zha/dialog-zha-cluster.ts b/src/panels/config/integrations/integration-panels/zha/dialog-zha-cluster.ts index 8af5413706..1565588e57 100644 --- a/src/panels/config/integrations/integration-panels/zha/dialog-zha-cluster.ts +++ b/src/panels/config/integrations/integration-panels/zha/dialog-zha-cluster.ts @@ -1,13 +1,11 @@ import { CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HASSDomEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-code-editor"; import { createCloseHeading } from "../../../../../components/ha-dialog"; diff --git a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts index b8330b5826..f726df4231 100644 --- a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts +++ b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts @@ -1,12 +1,4 @@ -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import memoizeOne from "memoize-one"; import { computeRTLDirection } from "../../../../../common/util/compute_rtl"; import "../../../../../components/ha-code-editor"; @@ -22,6 +14,7 @@ import type { import "../../../../../components/ha-circular-progress"; import { fetchDevices, ZHADevice } from "../../../../../data/zha"; import { fireEvent } from "../../../../../common/dom/fire_event"; +import { customElement, property, state } from "lit/decorators"; export interface DeviceRowData extends DataTableRowData { id: string; diff --git a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-zigbee-info.ts b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-zigbee-info.ts index 17bb63f3f8..cd24720b6a 100644 --- a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-zigbee-info.ts +++ b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-zigbee-info.ts @@ -1,12 +1,5 @@ -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/ha-code-editor"; import { createCloseHeading } from "../../../../../components/ha-dialog"; import { haStyleDialog } from "../../../../../resources/styles"; 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 1e82acbb8d..bf3ce73ead 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 @@ -1,19 +1,11 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; import "@material/mwc-button/mwc-button"; -import { haStyleDialog } from "../../../../../resources/styles"; -import { HomeAssistant } from "../../../../../types"; -import { ZHAReconfigureDeviceDialogParams } from "./show-dialog-zha-reconfigure-device"; +import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; +import { UnsubscribeFunc } from "home-assistant-js-websocket"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-circular-progress"; +import { createCloseHeading } from "../../../../../components/ha-dialog"; import "../../../../../components/ha-svg-icon"; import { AttributeConfigurationStatus, @@ -26,9 +18,9 @@ import { ZHA_CHANNEL_MSG_BIND, ZHA_CHANNEL_MSG_CFG_RPT, } from "../../../../../data/zha"; -import { fireEvent } from "../../../../../common/dom/fire_event"; -import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { createCloseHeading } from "../../../../../components/ha-dialog"; +import { haStyleDialog } from "../../../../../resources/styles"; +import { HomeAssistant } from "../../../../../types"; +import { ZHAReconfigureDeviceDialogParams } from "./show-dialog-zha-reconfigure-device"; @customElement("dialog-zha-reconfigure-device") class DialogZHAReconfigureDevice extends LitElement { diff --git a/src/panels/config/integrations/integration-panels/zha/zha-add-devices-page.ts b/src/panels/config/integrations/integration-panels/zha/zha-add-devices-page.ts index c68bba9760..654cd3b4be 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-add-devices-page.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-add-devices-page.ts @@ -4,14 +4,12 @@ import "@polymer/paper-input/paper-textarea"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/ha-circular-progress"; import "../../../../../components/ha-icon-button"; import "../../../../../components/ha-service-description"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-add-group-page.ts b/src/panels/config/integrations/integration-panels/zha/zha-add-group-page.ts index 840d2ebea3..b628231d84 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-add-group-page.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-add-group-page.ts @@ -1,17 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import type { HASSDomEvent } from "../../../../../common/dom/fire_event"; import { navigate } from "../../../../../common/navigate"; import type { SelectionChangedEvent } from "../../../../../components/data-table/ha-data-table"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts b/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts index 69e3c2f120..0d7a815256 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts @@ -7,12 +7,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import "../../../../../components/ha-icon-button"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts b/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts index bae849aff9..5ffcf61637 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts @@ -6,12 +6,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import "../../../../../components/ha-icon-button"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-clusters-data-table.ts b/src/panels/config/integrations/integration-panels/zha/zha-clusters-data-table.ts index cfaa1a1717..e29bcbe10d 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-clusters-data-table.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-clusters-data-table.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeRTLDirection } from "../../../../../common/util/compute_rtl"; import "../../../../../components/data-table/ha-data-table"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-clusters.ts b/src/panels/config/integrations/integration-panels/zha/zha-clusters.ts index 46b4c6caea..4559fafe9e 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-clusters.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-clusters.ts @@ -5,12 +5,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard-router.ts b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard-router.ts index 4fcef9343c..87ed324256 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard-router.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import { HassRouterPage, diff --git a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts index d8241f67a9..0b1014d78c 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts @@ -5,13 +5,11 @@ import "@polymer/paper-item/paper-item-body"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; import { computeRTL } from "../../../../../common/util/compute_rtl"; import "../../../../../components/ha-card"; import "../../../../../components/ha-fab"; @@ -27,6 +25,7 @@ import { updateZHAConfiguration, ZHAConfiguration, } from "../../../../../data/zha"; +import { customElement, property } from "lit/decorators"; export const zhaTabs: PageNavigation[] = [ { diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts index 5cbd2a947e..36c71f8536 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts @@ -5,14 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import "../../../../../components/ha-icon-button"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts index eeae2aa242..f1dbb1a254 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts @@ -1,16 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-listbox/paper-listbox"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { computeStateName } from "../../../../../common/entity/compute_state_name"; import "../../../../../components/buttons/ha-call-service-button"; @@ -34,6 +25,7 @@ import { EntityRegistryStateEntry } from "../../../devices/ha-config-device-page import { compare } from "../../../../../common/string/compare"; import { getIeeeTail } from "./functions"; import { slugify } from "../../../../../common/string/slugify"; +import { customElement, property, state } from "lit/decorators"; @customElement("zha-device-card") class ZHADeviceCard extends SubscribeMixin(LitElement) { diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-endpoint-data-table.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-endpoint-data-table.ts index d0d79c8dd3..3a3ce48f09 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-endpoint-data-table.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-endpoint-data-table.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeRTLDirection } from "../../../../../common/util/compute_rtl"; import "../../../../../components/data-table/ha-data-table"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts index 4721363bc6..0fc745cf81 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts @@ -1,16 +1,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/entity/state-badge"; import "../../../../../components/ha-area-picker"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts b/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts index 571d5c7101..201c139c69 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts @@ -5,15 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import type { HASSDomEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/buttons/ha-call-service-button"; import { SelectionChangedEvent } from "../../../../../components/data-table/ha-data-table"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-group-page.ts b/src/panels/config/integrations/integration-panels/zha/zha-group-page.ts index 2a52714a02..d26a92f275 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-group-page.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-group-page.ts @@ -1,15 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { HASSDomEvent } from "../../../../../common/dom/fire_event"; import { navigate } from "../../../../../common/navigate"; import { SelectionChangedEvent } from "../../../../../components/data-table/ha-data-table"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts b/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts index b11428b9fa..3eff559dcc 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts @@ -3,13 +3,12 @@ import { mdiPlus } from "@mdi/js"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../../../common/dom/fire_event"; import { navigate } from "../../../../../common/navigate"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts b/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts index ac195ca760..bd9d3cee82 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts @@ -1,14 +1,4 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; import "@material/mwc-button"; import { navigate } from "../../../../../common/navigate"; @@ -30,6 +20,7 @@ import { DeviceRegistryEntry } from "../../../../../data/device_registry"; import "../../../../../components/ha-checkbox"; import type { HaCheckbox } from "../../../../../components/ha-checkbox"; import { zhaTabs } from "./zha-config-dashboard"; +import { customElement, property, query, state } from "lit/decorators"; @customElement("zha-network-visualization-page") export class ZHANetworkVisualizationPage extends LitElement { diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-config-router.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-config-router.ts index 70d5a07b0b..e5c53c9b53 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-config-router.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-config-router.ts @@ -1,10 +1,10 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; +import { navigate } from "../../../../../common/navigate"; import { HassRouterPage, RouterOptions, } from "../../../../../layouts/hass-router-page"; import { HomeAssistant } from "../../../../../types"; -import { navigate } from "../../../../../common/navigate"; @customElement("zwave-config-router") class ZWaveConfigRouter extends HassRouterPage { diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts index 114c146bdf..fa05774fc2 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts @@ -1,45 +1,37 @@ +import "@material/mwc-button/mwc-button"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import "@material/mwc-button/mwc-button"; -import "../../../../../components/ha-icon-button"; -import "../../../../../components/ha-circular-progress"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../../../../common/config/is_component_loaded"; +import { computeStateName } from "../../../../../common/entity/compute_state_name"; +import { navigate } from "../../../../../common/navigate"; import "../../../../../components/buttons/ha-call-api-button"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; +import "../../../../../components/ha-circular-progress"; import "../../../../../components/ha-icon"; -import { - fetchNetworkStatus, - ZWaveNetworkStatus, - ZWAVE_NETWORK_STATE_STOPPED, - fetchMigrationConfig, - ZWaveMigrationConfig, - startOzwConfigFlow, -} from "../../../../../data/zwave"; -import { haStyle } from "../../../../../resources/styles"; -import type { HomeAssistant, Route } from "../../../../../types"; -import "../../../ha-config-section"; -import "../../../../../layouts/hass-subpage"; -import { showConfigFlowDialog } from "../../../../../dialogs/config-flow/show-dialog-config-flow"; -import { migrateZwave, OZWMigrationData } from "../../../../../data/ozw"; -import { navigate } from "../../../../../common/navigate"; -import { showAlertDialog } from "../../../../../dialogs/generic/show-dialog-box"; -import { computeStateName } from "../../../../../common/entity/compute_state_name"; +import "../../../../../components/ha-icon-button"; import { computeDeviceName, subscribeDeviceRegistry, } from "../../../../../data/device_registry"; -import { isComponentLoaded } from "../../../../../common/config/is_component_loaded"; +import { migrateZwave, OZWMigrationData } from "../../../../../data/ozw"; +import { + fetchMigrationConfig, + fetchNetworkStatus, + startOzwConfigFlow, + ZWaveMigrationConfig, + ZWaveNetworkStatus, + ZWAVE_NETWORK_STATE_STOPPED, +} from "../../../../../data/zwave"; +import { showConfigFlowDialog } from "../../../../../dialogs/config-flow/show-dialog-config-flow"; +import { showAlertDialog } from "../../../../../dialogs/generic/show-dialog-box"; +import "../../../../../layouts/hass-subpage"; +import { haStyle } from "../../../../../resources/styles"; +import type { HomeAssistant, Route } from "../../../../../types"; +import "../../../ha-config-section"; @customElement("zwave-migration") export class ZwaveMigration extends LitElement { diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-network.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-network.ts index e162edacc9..12d0284cc1 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-network.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-network.ts @@ -1,14 +1,6 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-api-button"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-node-config.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-node-config.ts index 4bc1542a51..3a846334b6 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-node-config.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-node-config.ts @@ -5,14 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import { diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-values.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-values.ts index 719a57a493..1e6750c6af 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-values.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-values.ts @@ -1,16 +1,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import { ZWaveValue } from "../../../../../data/zwave"; diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts index 0de86314ba..9e2f4e8874 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts @@ -2,22 +2,14 @@ import "@material/mwc-button/mwc-button"; import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; import "../../../../../components/ha-switch"; import "../../../../../components/ha-formfield"; -import { - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, - css, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult, css } from "lit"; import "../../../../../components/ha-circular-progress"; import { createCloseHeading } from "../../../../../components/ha-dialog"; import { haStyleDialog } from "../../../../../resources/styles"; import { HomeAssistant } from "../../../../../types"; import { ZWaveJSAddNodeDialogParams } from "./show-dialog-zwave_js-add-node"; import { fireEvent } from "../../../../../common/dom/fire_event"; +import { customElement, property, state } from "lit/decorators"; export interface ZWaveJSAddNodeDevice { id: string; diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts index f15acf8846..c3bfd90433 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts @@ -1,23 +1,15 @@ import "@material/mwc-button/mwc-button"; import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; -import { - CSSResult, - customElement, - html, - LitElement, - property, - state, - TemplateResult, - css, -} from "lit-element"; +import { UnsubscribeFunc } from "home-assistant-js-websocket"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-circular-progress"; import { createCloseHeading } from "../../../../../components/ha-dialog"; +import { reinterviewNode } from "../../../../../data/zwave_js"; import { haStyleDialog } from "../../../../../resources/styles"; import { HomeAssistant } from "../../../../../types"; import { ZWaveJSReinterviewNodeDialogParams } from "./show-dialog-zwave_js-reinterview-node"; -import { fireEvent } from "../../../../../common/dom/fire_event"; -import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { reinterviewNode } from "../../../../../data/zwave_js"; @customElement("dialog-zwave_js-reinterview-node") class DialogZWaveJSReinterviewNode extends LitElement { @@ -212,7 +204,7 @@ class DialogZWaveJSReinterviewNode extends LitElement { fireEvent(this, "dialog-closed", { dialog: this.localName }); } - static get styles(): CSSResult[] { + static get styles(): CSSResultGroup { return [ haStyleDialog, css` diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts index 5c575d41e2..a6f7018940 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts @@ -1,21 +1,13 @@ import "@material/mwc-button/mwc-button"; -import { - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, - css, -} from "lit-element"; +import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-circular-progress"; import { createCloseHeading } from "../../../../../components/ha-dialog"; import { haStyleDialog } from "../../../../../resources/styles"; import { HomeAssistant } from "../../../../../types"; import { ZWaveJSRemoveNodeDialogParams } from "./show-dialog-zwave_js-remove-node"; -import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; -import { fireEvent } from "../../../../../common/dom/fire_event"; export interface ZWaveJSRemovedNode { node_id: number; diff --git a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-dashboard.ts b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-dashboard.ts index 5e082e90e7..6a9580cb7f 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-dashboard.ts @@ -1,20 +1,12 @@ import "@material/mwc-button/mwc-button"; import "@material/mwc-icon-button/mwc-icon-button"; import { mdiCheckCircle, mdiCircle, mdiRefresh } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../../../../components/ha-card"; -import "../../../../../components/ha-svg-icon"; import "../../../../../components/ha-icon-next"; +import "../../../../../components/ha-svg-icon"; import { getSignedPath } from "../../../../../data/auth"; import { fetchDataCollectionStatus, diff --git a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-router.ts b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-router.ts index 2973f17c3b..b20a1b0661 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-router.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-router.ts @@ -1,4 +1,3 @@ -import { customElement, property } from "lit-element"; import { HassRouterPage, RouterOptions, @@ -8,6 +7,7 @@ import { navigate } from "../../../../../common/navigate"; import { PageNavigation } from "../../../../../layouts/hass-tabs-subpage"; import { mdiServerNetwork, mdiMathLog } from "@mdi/js"; +import { customElement, property } from "lit/decorators"; export const configTabs: PageNavigation[] = [ { diff --git a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-logs.ts b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-logs.ts index d8efb4ed06..90e0d44edd 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-logs.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-logs.ts @@ -1,27 +1,19 @@ -import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - html, - property, - customElement, - LitElement, - CSSResultArray, - state, - query, -} from "lit-element"; -import "@polymer/paper-listbox/paper-listbox"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; +import "@polymer/paper-listbox/paper-listbox"; +import { UnsubscribeFunc } from "home-assistant-js-websocket"; +import { css, CSSResultArray, html, LitElement } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fetchZWaveJSLogConfig, setZWaveJSLogLevel, subscribeZWaveJSLogs, ZWaveJSLogConfig, } from "../../../../../data/zwave_js"; +import "../../../../../layouts/hass-tabs-subpage"; import { SubscribeMixin } from "../../../../../mixins/subscribe-mixin"; +import { haStyle } from "../../../../../resources/styles"; import { HomeAssistant, Route } from "../../../../../types"; import { configTabs } from "./zwave_js-config-router"; -import "../../../../../layouts/hass-tabs-subpage"; -import { haStyle } from "../../../../../resources/styles"; @customElement("zwave_js-logs") class ZWaveJSLogs extends SubscribeMixin(LitElement) { diff --git a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-node-config.ts b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-node-config.ts index 47a81f57e7..b58c12ec53 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-node-config.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-node-config.ts @@ -1,31 +1,37 @@ -import { - mdiCheckCircle, - mdiCircle, - mdiProgressClock, - mdiCloseCircle, -} from "@mdi/js"; -import "../../../../../components/ha-settings-row"; -import "@polymer/paper-item/paper-item"; -import "@polymer/paper-listbox/paper-listbox"; -import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@material/mwc-button/mwc-button"; import "@material/mwc-icon-button/mwc-icon-button"; +import { + mdiCheckCircle, + mdiCircle, + mdiCloseCircle, + mdiProgressClock, +} from "@mdi/js"; +import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; +import "@polymer/paper-item/paper-item"; +import "@polymer/paper-listbox/paper-listbox"; +import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import memoizeOne from "memoize-one"; import { debounce } from "../../../../../common/util/debounce"; import "../../../../../components/ha-card"; -import "../../../../../components/ha-svg-icon"; import "../../../../../components/ha-icon-next"; +import "../../../../../components/ha-settings-row"; +import "../../../../../components/ha-svg-icon"; import "../../../../../components/ha-switch"; +import { + computeDeviceName, + DeviceRegistryEntry, + subscribeDeviceRegistry, +} from "../../../../../data/device_registry"; import { fetchNodeConfigParameters, setNodeConfigParameter, @@ -33,19 +39,11 @@ import { ZWaveJSSetConfigParamResult, } from "../../../../../data/zwave_js"; import "../../../../../layouts/hass-tabs-subpage"; +import { SubscribeMixin } from "../../../../../mixins/subscribe-mixin"; import { haStyle } from "../../../../../resources/styles"; import type { HomeAssistant, Route } from "../../../../../types"; import "../../../ha-config-section"; import { configTabs } from "./zwave_js-config-router"; -import { - DeviceRegistryEntry, - computeDeviceName, - subscribeDeviceRegistry, -} from "../../../../../data/device_registry"; -import { SubscribeMixin } from "../../../../../mixins/subscribe-mixin"; -import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import memoizeOne from "memoize-one"; -import { classMap } from "lit-html/directives/class-map"; const icons = { accepted: mdiCheckCircle, diff --git a/src/panels/config/logs/dialog-system-log-detail.ts b/src/panels/config/logs/dialog-system-log-detail.ts index 2eed2d9224..51e2483d73 100644 --- a/src/panels/config/logs/dialog-system-log-detail.ts +++ b/src/panels/config/logs/dialog-system-log-detail.ts @@ -1,15 +1,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiClose, mdiContentCopy, mdiPackageVariant } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { copyToClipboard } from "../../../common/util/copy-clipboard"; import "../../../components/ha-dialog"; diff --git a/src/panels/config/logs/error-log-card.ts b/src/panels/config/logs/error-log-card.ts index 1f10e7a5a1..b096fb93ad 100644 --- a/src/panels/config/logs/error-log-card.ts +++ b/src/panels/config/logs/error-log-card.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import "../../../components/ha-icon-button"; import { fetchErrorLog } from "../../../data/error_log"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/config/logs/ha-config-logs.ts b/src/panels/config/logs/ha-config-logs.ts index a2166e3ba4..13ef1137dc 100644 --- a/src/panels/config/logs/ha-config-logs.ts +++ b/src/panels/config/logs/ha-config-logs.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../../../layouts/hass-tabs-subpage"; import { haStyle } from "../../../resources/styles"; import { HomeAssistant, Route } from "../../../types"; diff --git a/src/panels/config/logs/system-log-card.ts b/src/panels/config/logs/system-log-card.ts index 61d03b3da9..bc59a07457 100644 --- a/src/panels/config/logs/system-log-card.ts +++ b/src/panels/config/logs/system-log-card.ts @@ -1,15 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../components/buttons/ha-call-service-button"; import "../../../components/buttons/ha-progress-button"; import "../../../components/ha-card"; diff --git a/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts b/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts index 5748d93f78..423afb32a7 100644 --- a/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts +++ b/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { slugify } from "../../../../common/string/slugify"; import { computeRTLDirection } from "../../../../common/util/compute_rtl"; import { createCloseHeading } from "../../../../components/ha-dialog"; 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 2eef3839fe..ebe0b30dec 100644 --- a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts +++ b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts @@ -1,14 +1,7 @@ import { mdiPlus } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoize from "memoize-one"; import { navigate } from "../../../../common/navigate"; import { compare } from "../../../../common/string/compare"; diff --git a/src/panels/config/lovelace/ha-config-lovelace.ts b/src/panels/config/lovelace/ha-config-lovelace.ts index 1f12645d3b..2c09c81569 100644 --- a/src/panels/config/lovelace/ha-config-lovelace.ts +++ b/src/panels/config/lovelace/ha-config-lovelace.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassRouterPage, RouterOptions, diff --git a/src/panels/config/lovelace/resources/dialog-lovelace-resource-detail.ts b/src/panels/config/lovelace/resources/dialog-lovelace-resource-detail.ts index 48836d8a46..66b45c2394 100644 --- a/src/panels/config/lovelace/resources/dialog-lovelace-resource-detail.ts +++ b/src/panels/config/lovelace/resources/dialog-lovelace-resource-detail.ts @@ -2,16 +2,8 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { createCloseHeading } from "../../../../components/ha-dialog"; import "../../../../components/ha-paper-dropdown-menu"; import { diff --git a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts index 8366b52051..3497bd1a73 100644 --- a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts +++ b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts @@ -3,15 +3,8 @@ import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoize from "memoize-one"; import { compare } from "../../../../common/string/compare"; import { diff --git a/src/panels/config/person/dialog-person-detail.ts b/src/panels/config/person/dialog-person-detail.ts index d9fb7f3dca..88dce3ce2c 100644 --- a/src/panels/config/person/dialog-person-detail.ts +++ b/src/panels/config/person/dialog-person-detail.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; import "../../../components/entity/ha-entities-picker"; diff --git a/src/panels/config/person/ha-config-person.ts b/src/panels/config/person/ha-config-person.ts index 3452320425..e67bb715f6 100644 --- a/src/panels/config/person/ha-config-person.ts +++ b/src/panels/config/person/ha-config-person.ts @@ -1,15 +1,8 @@ import { mdiPlus } from "@mdi/js"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { compare } from "../../../common/string/compare"; import "../../../components/ha-card"; import "../../../components/ha-fab"; diff --git a/src/panels/config/scene/ha-config-scene.ts b/src/panels/config/scene/ha-config-scene.ts index 275a00200f..ae0742e754 100644 --- a/src/panels/config/scene/ha-config-scene.ts +++ b/src/panels/config/scene/ha-config-scene.ts @@ -1,5 +1,6 @@ import { HassEntities } from "home-assistant-js-websocket"; -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { debounce } from "../../../common/util/debounce"; diff --git a/src/panels/config/scene/ha-scene-dashboard.ts b/src/panels/config/scene/ha-scene-dashboard.ts index 846f209485..d887231989 100644 --- a/src/panels/config/scene/ha-scene-dashboard.ts +++ b/src/panels/config/scene/ha-scene-dashboard.ts @@ -8,26 +8,18 @@ import { mdiPlus, } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; 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 "../../../components/ha-button-related-filter-menu"; import "../../../components/ha-fab"; import "../../../components/ha-icon"; import "../../../components/ha-svg-icon"; -import "../../../components/ha-button-related-filter-menu"; import { forwardHaptic } from "../../../data/haptics"; import { activateScene, SceneEntity } from "../../../data/scene"; import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/config/scene/ha-scene-editor.ts b/src/panels/config/scene/ha-scene-editor.ts index 953535dbc8..9fcfffd70e 100644 --- a/src/panels/config/scene/ha-scene-editor.ts +++ b/src/panels/config/scene/ha-scene-editor.ts @@ -13,15 +13,13 @@ import { HassEvent } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/config/script/ha-config-script.ts b/src/panels/config/script/ha-config-script.ts index 6efe063b55..f1c11a2b84 100644 --- a/src/panels/config/script/ha-config-script.ts +++ b/src/panels/config/script/ha-config-script.ts @@ -1,5 +1,6 @@ import { HassEntities } from "home-assistant-js-websocket"; -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { debounce } from "../../../common/util/debounce"; diff --git a/src/panels/config/script/ha-script-editor.ts b/src/panels/config/script/ha-script-editor.ts index fc17217056..4d0cec0df5 100644 --- a/src/panels/config/script/ha-script-editor.ts +++ b/src/panels/config/script/ha-script-editor.ts @@ -15,14 +15,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { computeObjectId } from "../../../common/entity/compute_object_id"; import { navigate } from "../../../common/navigate"; import { slugify } from "../../../common/string/slugify"; diff --git a/src/panels/config/script/ha-script-picker.ts b/src/panels/config/script/ha-script-picker.ts index aa2e527815..c52efb19df 100644 --- a/src/panels/config/script/ha-script-picker.ts +++ b/src/panels/config/script/ha-script-picker.ts @@ -7,16 +7,8 @@ import { mdiPlus, } from "@mdi/js"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { formatDateTime } from "../../../common/datetime/format_date_time"; import { fireEvent } from "../../../common/dom/fire_event"; diff --git a/src/panels/config/server_control/ha-config-server-control.ts b/src/panels/config/server_control/ha-config-server-control.ts index 8eb165aa71..3a5c7ae56e 100644 --- a/src/panels/config/server_control/ha-config-server-control.ts +++ b/src/panels/config/server_control/ha-config-server-control.ts @@ -2,16 +2,8 @@ import "@material/mwc-button"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { componentsWithService } from "../../../common/config/components_with_service"; import "../../../components/buttons/ha-call-service-button"; import "../../../components/ha-card"; diff --git a/src/panels/config/tags/dialog-tag-detail.ts b/src/panels/config/tags/dialog-tag-detail.ts index 0f7f551110..9d7f322336 100644 --- a/src/panels/config/tags/dialog-tag-detail.ts +++ b/src/panels/config/tags/dialog-tag-detail.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { createCloseHeading } from "../../../components/ha-dialog"; import "../../../components/ha-formfield"; diff --git a/src/panels/config/tags/ha-config-tags.ts b/src/panels/config/tags/ha-config-tags.ts index 9c138eabe3..b8745a6117 100644 --- a/src/panels/config/tags/ha-config-tags.ts +++ b/src/panels/config/tags/ha-config-tags.ts @@ -6,14 +6,8 @@ import { mdiPlus, mdiRobot, } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; import "../../../components/ha-card"; diff --git a/src/panels/config/tags/tag-image.ts b/src/panels/config/tags/tag-image.ts index eae822f0b7..ce5a5826c4 100644 --- a/src/panels/config/tags/tag-image.ts +++ b/src/panels/config/tags/tag-image.ts @@ -1,12 +1,6 @@ import { mdiNfcVariant } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-svg-icon"; import { TagRowData } from "./ha-config-tags"; diff --git a/src/panels/config/users/dialog-add-user.ts b/src/panels/config/users/dialog-add-user.ts index 850157a63f..64f9d4723d 100644 --- a/src/panels/config/users/dialog-add-user.ts +++ b/src/panels/config/users/dialog-add-user.ts @@ -3,14 +3,12 @@ import "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; import "../../../components/ha-circular-progress"; import "../../../components/ha-dialog"; diff --git a/src/panels/config/users/dialog-user-detail.ts b/src/panels/config/users/dialog-user-detail.ts index 864aaef4c4..f7f47b0157 100644 --- a/src/panels/config/users/dialog-user-detail.ts +++ b/src/panels/config/users/dialog-user-detail.ts @@ -1,16 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; import { createCloseHeading } from "../../../components/ha-dialog"; import "../../../components/ha-formfield"; diff --git a/src/panels/config/users/ha-config-users.ts b/src/panels/config/users/ha-config-users.ts index 74dde61fc3..13807febd4 100644 --- a/src/panels/config/users/ha-config-users.ts +++ b/src/panels/config/users/ha-config-users.ts @@ -1,11 +1,6 @@ import { mdiPlus } from "@mdi/js"; -import { - customElement, - LitElement, - property, - PropertyValues, -} from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../common/dom/fire_event"; import { diff --git a/src/panels/config/zone/dialog-zone-detail.ts b/src/panels/config/zone/dialog-zone-detail.ts index 380d6ed767..ac4cedc32a 100644 --- a/src/panels/config/zone/dialog-zone-detail.ts +++ b/src/panels/config/zone/dialog-zone-detail.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import { addDistanceToCoord } from "../../../common/location/add_distance_to_coord"; diff --git a/src/panels/config/zone/ha-config-zone.ts b/src/panels/config/zone/ha-config-zone.ts index 328ff27072..3d4082b580 100644 --- a/src/panels/config/zone/ha-config-zone.ts +++ b/src/panels/config/zone/ha-config-zone.ts @@ -1,4 +1,3 @@ -import "../../../components/ha-fab"; import "@material/mwc-icon-button"; import { mdiPencil, mdiPencilOff, mdiPlus } from "@mdi/js"; import "@polymer/paper-item/paper-icon-item"; @@ -9,21 +8,19 @@ import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { navigate } from "../../../common/navigate"; import { compare } from "../../../common/string/compare"; import "../../../components/ha-card"; +import "../../../components/ha-fab"; import "../../../components/ha-svg-icon"; import "../../../components/map/ha-locations-editor"; import type { diff --git a/src/panels/custom/ha-panel-custom.ts b/src/panels/custom/ha-panel-custom.ts index 0956624db4..02eb6f7f5c 100644 --- a/src/panels/custom/ha-panel-custom.ts +++ b/src/panels/custom/ha-panel-custom.ts @@ -1,4 +1,5 @@ -import { property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property } from "lit/decorators"; import { navigate } from "../../common/navigate"; import { CustomPanelInfo } from "../../data/panel_custom"; import { HomeAssistant, Route } from "../../types"; diff --git a/src/panels/developer-tools/developer-tools-router.ts b/src/panels/developer-tools/developer-tools-router.ts index 903948a168..efc0c01ddc 100644 --- a/src/panels/developer-tools/developer-tools-router.ts +++ b/src/panels/developer-tools/developer-tools-router.ts @@ -1,5 +1,5 @@ import { PolymerElement } from "@polymer/polymer"; -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassRouterPage, RouterOptions } from "../../layouts/hass-router-page"; import { HomeAssistant } from "../../types"; diff --git a/src/panels/developer-tools/event/event-subscribe-card.ts b/src/panels/developer-tools/event/event-subscribe-card.ts index 3bdc41acbc..cfa8a67be6 100644 --- a/src/panels/developer-tools/event/event-subscribe-card.ts +++ b/src/panels/developer-tools/event/event-subscribe-card.ts @@ -1,16 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import { HassEvent } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { formatTime } from "../../../common/datetime/format_time"; import "../../../components/ha-card"; import { PolymerChangedEvent } from "../../../polymer-types"; diff --git a/src/panels/developer-tools/ha-panel-developer-tools.ts b/src/panels/developer-tools/ha-panel-developer-tools.ts index 5ff7069cd6..f8504f64c3 100644 --- a/src/panels/developer-tools/ha-panel-developer-tools.ts +++ b/src/panels/developer-tools/ha-panel-developer-tools.ts @@ -1,15 +1,8 @@ import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; import "@polymer/paper-tabs/paper-tab"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { navigate } from "../../common/navigate"; import "../../components/ha-icon-button"; import "../../components/ha-menu-button"; diff --git a/src/panels/developer-tools/service/developer-tools-service.ts b/src/panels/developer-tools/service/developer-tools-service.ts index 882dfab821..0cb879496d 100644 --- a/src/panels/developer-tools/service/developer-tools-service.ts +++ b/src/panels/developer-tools/service/developer-tools-service.ts @@ -1,15 +1,8 @@ import { mdiHelpCircle } from "@mdi/js"; import { ERR_CONNECTION_LOST } from "home-assistant-js-websocket"; import { safeLoad } from "js-yaml"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { property, query, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { LocalStorage } from "../../../common/decorators/local-storage"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/developer-tools/state/developer-tools-state.js b/src/panels/developer-tools/state/developer-tools-state.js index 7bedfd8a42..5d7cd84cc4 100644 --- a/src/panels/developer-tools/state/developer-tools-state.js +++ b/src/panels/developer-tools/state/developer-tools-state.js @@ -1,7 +1,7 @@ import "@material/mwc-button"; import { - mdiInformationOutline, mdiClipboardTextMultipleOutline, + mdiInformationOutline, } from "@mdi/js"; import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-input/paper-input"; @@ -11,6 +11,7 @@ import { PolymerElement } from "@polymer/polymer/polymer-element"; import { safeDump, safeLoad } from "js-yaml"; import { formatDateTimeWithSeconds } from "../../../common/datetime/format_date_time"; import { computeRTL } from "../../../common/util/compute_rtl"; +import { copyToClipboard } from "../../../common/util/copy-clipboard"; import "../../../components/entity/ha-entity-picker"; import "../../../components/ha-code-editor"; import "../../../components/ha-svg-icon"; @@ -18,7 +19,6 @@ import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; import { EventsMixin } from "../../../mixins/events-mixin"; import LocalizeMixin from "../../../mixins/localize-mixin"; import "../../../styles/polymer-ha-style"; -import { copyToClipboard } from "../../../common/util/copy-clipboard"; const ERROR_SENTINEL = {}; /* diff --git a/src/panels/developer-tools/template/developer-tools-template.ts b/src/panels/developer-tools/template/developer-tools-template.ts index 9014942a11..670ae744b2 100644 --- a/src/panels/developer-tools/template/developer-tools-template.ts +++ b/src/panels/developer-tools/template/developer-tools-template.ts @@ -1,15 +1,8 @@ import "@material/mwc-button/mwc-button"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { debounce } from "../../../common/util/debounce"; import "../../../components/ha-circular-progress"; import "../../../components/ha-code-editor"; diff --git a/src/panels/history/ha-panel-history.ts b/src/panels/history/ha-panel-history.ts index 59b89758c4..31737c8874 100644 --- a/src/panels/history/ha-panel-history.ts +++ b/src/panels/history/ha-panel-history.ts @@ -1,7 +1,7 @@ import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { css, state, LitElement, property, PropertyValues } from "lit-element"; -import { html } from "lit-html"; +import { css, html, LitElement, PropertyValues } from "lit"; +import { property, state } from "lit/decorators"; import { computeRTL } from "../../common/util/compute_rtl"; import "../../components/entity/ha-entity-picker"; import "../../components/ha-circular-progress"; diff --git a/src/panels/logbook/ha-logbook.ts b/src/panels/logbook/ha-logbook.ts index f87af09c26..e748085b01 100644 --- a/src/panels/logbook/ha-logbook.ts +++ b/src/panels/logbook/ha-logbook.ts @@ -1,16 +1,14 @@ +import { Layout1d, scroll } from "@lit-labs/virtualizer"; import { css, CSSResultGroup, - customElement, - eventOptions, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { scroll } from "lit-virtualizer"; +} from "lit"; +import { customElement, eventOptions, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { DOMAINS_WITH_DYNAMIC_PICTURE } from "../../common/const"; import { formatDate } from "../../common/datetime/format_date"; import { formatTimeWithSeconds } from "../../common/datetime/format_time"; @@ -22,8 +20,8 @@ import { computeRTL, emitRTLDirection } from "../../common/util/compute_rtl"; import "../../components/entity/state-badge"; import "../../components/ha-circular-progress"; import "../../components/ha-relative-time"; -import { TraceContexts } from "../../data/trace"; import { LogbookEntry } from "../../data/logbook"; +import { TraceContexts } from "../../data/trace"; import { haStyle, haStyleScrollbar } from "../../resources/styles"; import { HomeAssistant } from "../../types"; @@ -101,7 +99,9 @@ class HaLogbook extends LitElement { ${this.virtualize ? scroll({ items: this.entries, - renderItem: (item: LogbookEntry, index?: number) => + layout: Layout1d, + // @ts-expect-error + renderItem: (item: LogbookEntry, index) => this._renderLogbookItem(item, index), }) : this.entries.map((item, index) => @@ -349,7 +349,7 @@ class HaLogbook extends LitElement { color: var(--primary-color); } - .uni-virtualizer-host { + :host([virtualize]) .container { display: block; position: relative; contain: strict; @@ -357,7 +357,7 @@ class HaLogbook extends LitElement { overflow: auto; } - .uni-virtualizer-host > * { + .container > * { box-sizing: border-box; } diff --git a/src/panels/logbook/ha-panel-logbook.ts b/src/panels/logbook/ha-panel-logbook.ts index b08497a2a9..9c93f077ee 100644 --- a/src/panels/logbook/ha-panel-logbook.ts +++ b/src/panels/logbook/ha-panel-logbook.ts @@ -1,15 +1,9 @@ import { mdiRefresh } from "@mdi/js"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { - css, - customElement, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { css, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { computeRTL } from "../../common/util/compute_rtl"; import "../../components/entity/ha-entity-picker"; import "../../components/ha-circular-progress"; @@ -17,19 +11,18 @@ import "../../components/ha-date-range-picker"; import type { DateRangePickerRanges } from "../../components/ha-date-range-picker"; import "../../components/ha-icon-button"; import "../../components/ha-menu-button"; -import { TraceContexts, loadTraceContexts } from "../../data/trace"; import { clearLogbookCache, getLogbookData, LogbookEntry, } from "../../data/logbook"; import { fetchPersons } from "../../data/person"; +import { loadTraceContexts, TraceContexts } from "../../data/trace"; import { fetchUsers } from "../../data/user"; import "../../layouts/ha-app-layout"; import { haStyle } from "../../resources/styles"; import { HomeAssistant } from "../../types"; import "./ha-logbook"; -import { isComponentLoaded } from "../../common/config/is_component_loaded"; @customElement("ha-panel-logbook") export class HaPanelLogbook extends LitElement { diff --git a/src/panels/lovelace/badges/hui-entity-filter-badge.ts b/src/panels/lovelace/badges/hui-entity-filter-badge.ts index b89135e7e1..a45799695a 100644 --- a/src/panels/lovelace/badges/hui-entity-filter-badge.ts +++ b/src/panels/lovelace/badges/hui-entity-filter-badge.ts @@ -1,4 +1,5 @@ -import { state, property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property, state } from "lit/decorators"; import { HomeAssistant } from "../../../types"; import { evaluateFilter } from "../common/evaluate-filter"; import { processConfigEntities } from "../common/process-config-entities"; diff --git a/src/panels/lovelace/badges/hui-error-badge.ts b/src/panels/lovelace/badges/hui-error-badge.ts index e80abd8379..f15a5b0490 100644 --- a/src/panels/lovelace/badges/hui-error-badge.ts +++ b/src/panels/lovelace/badges/hui-error-badge.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import "../../../components/ha-label-badge"; import { HomeAssistant } from "../../../types"; import { LovelaceBadge } from "../types"; diff --git a/src/panels/lovelace/badges/hui-state-label-badge.ts b/src/panels/lovelace/badges/hui-state-label-badge.ts index d94354c3a2..9ccceba1e8 100644 --- a/src/panels/lovelace/badges/hui-state-label-badge.ts +++ b/src/panels/lovelace/badges/hui-state-label-badge.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import "../../../components/entity/ha-state-label-badge"; import { ActionHandlerEvent } from "../../../data/lovelace"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/cards/hui-alarm-panel-card.ts b/src/panels/lovelace/cards/hui-alarm-panel-card.ts index 8d20bf51a2..8b29c7f8a6 100644 --- a/src/panels/lovelace/cards/hui-alarm-panel-card.ts +++ b/src/panels/lovelace/cards/hui-alarm-panel-card.ts @@ -3,16 +3,13 @@ import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-card"; diff --git a/src/panels/lovelace/cards/hui-button-card.ts b/src/panels/lovelace/cards/hui-button-card.ts index 4f6af27840..931147d268 100644 --- a/src/panels/lovelace/cards/hui-button-card.ts +++ b/src/panels/lovelace/cards/hui-button-card.ts @@ -5,18 +5,20 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, + html, + LitElement, + PropertyValues, + TemplateResult, +} from "lit"; +import { customElement, eventOptions, - html, - state, - LitElement, property, - PropertyValues, queryAsync, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; + state, +} from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeActiveState } from "../../../common/entity/compute_active_state"; diff --git a/src/panels/lovelace/cards/hui-calendar-card.ts b/src/panels/lovelace/cards/hui-calendar-card.ts index 48e31d5f8c..13b5bcc8b3 100644 --- a/src/panels/lovelace/cards/hui-calendar-card.ts +++ b/src/panels/lovelace/cards/hui-calendar-card.ts @@ -1,15 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { HA_COLOR_PALETTE } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { HASSDomEvent } from "../../../common/dom/fire_event"; diff --git a/src/panels/lovelace/cards/hui-conditional-card.ts b/src/panels/lovelace/cards/hui-conditional-card.ts index d89e609278..6b0ba014ee 100644 --- a/src/panels/lovelace/cards/hui-conditional-card.ts +++ b/src/panels/lovelace/cards/hui-conditional-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { LovelaceCardConfig } from "../../../data/lovelace"; import { computeCardSize } from "../common/compute-card-size"; import { HuiConditionalBase } from "../components/hui-conditional-base"; diff --git a/src/panels/lovelace/cards/hui-empty-state-card.ts b/src/panels/lovelace/cards/hui-empty-state-card.ts index b56c23201b..333cad59a4 100644 --- a/src/panels/lovelace/cards/hui-empty-state-card.ts +++ b/src/panels/lovelace/cards/hui-empty-state-card.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-card"; import { HomeAssistant } from "../../../types"; import { LovelaceCard } from "../types"; diff --git a/src/panels/lovelace/cards/hui-entities-card.ts b/src/panels/lovelace/cards/hui-entities-card.ts index 92d05914d6..a74f934beb 100644 --- a/src/panels/lovelace/cards/hui-entities-card.ts +++ b/src/panels/lovelace/cards/hui-entities-card.ts @@ -1,13 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, state } from "lit/decorators"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeDomain } from "../../../common/entity/compute_domain"; @@ -69,18 +68,18 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard { set hass(hass: HomeAssistant) { this._hass = hass; - this.shadowRoot!.querySelectorAll("#states > div > *").forEach( - (element: unknown) => { + this.shadowRoot + ?.querySelectorAll("#states > div > *") + .forEach((element: unknown) => { (element as LovelaceRow).hass = hass; - } - ); + }); if (this._headerElement) { this._headerElement.hass = hass; } if (this._footerElement) { this._footerElement.hass = hass; } - const entitiesToggle = this.shadowRoot!.querySelector( + const entitiesToggle = this.shadowRoot?.querySelector( "hui-entities-toggle" ); if (entitiesToggle) { diff --git a/src/panels/lovelace/cards/hui-entity-button-card.ts b/src/panels/lovelace/cards/hui-entity-button-card.ts index 0cb0b7eb43..e6b79249ba 100644 --- a/src/panels/lovelace/cards/hui-entity-button-card.ts +++ b/src/panels/lovelace/cards/hui-entity-button-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HuiButtonCard } from "./hui-button-card"; @customElement("hui-entity-button-card") diff --git a/src/panels/lovelace/cards/hui-entity-card.ts b/src/panels/lovelace/cards/hui-entity-card.ts index 7bb0479984..fa7d14d970 100644 --- a/src/panels/lovelace/cards/hui-entity-card.ts +++ b/src/panels/lovelace/cards/hui-entity-card.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateDisplay } from "../../../common/entity/compute_state_display"; diff --git a/src/panels/lovelace/cards/hui-entity-filter-card.ts b/src/panels/lovelace/cards/hui-entity-filter-card.ts index 517b08a13b..ed1db86230 100644 --- a/src/panels/lovelace/cards/hui-entity-filter-card.ts +++ b/src/panels/lovelace/cards/hui-entity-filter-card.ts @@ -1,4 +1,5 @@ -import { state, property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property, state } from "lit/decorators"; import { LovelaceCardConfig } from "../../../data/lovelace"; import { HomeAssistant } from "../../../types"; import { computeCardSize } from "../common/compute-card-size"; diff --git a/src/panels/lovelace/cards/hui-error-card.ts b/src/panels/lovelace/cards/hui-error-card.ts index 14f1ceabae..747b700166 100644 --- a/src/panels/lovelace/cards/hui-error-card.ts +++ b/src/panels/lovelace/cards/hui-error-card.ts @@ -1,13 +1,6 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { HomeAssistant } from "../../../types"; import { LovelaceCard } from "../types"; import { ErrorCardConfig } from "./types"; diff --git a/src/panels/lovelace/cards/hui-gauge-card.ts b/src/panels/lovelace/cards/hui-gauge-card.ts index 9560e015c3..f87a9081e8 100644 --- a/src/panels/lovelace/cards/hui-gauge-card.ts +++ b/src/panels/lovelace/cards/hui-gauge-card.ts @@ -2,15 +2,13 @@ import { HassEntity } from "home-assistant-js-websocket/dist/types"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/cards/hui-glance-card.ts b/src/panels/lovelace/cards/hui-glance-card.ts index 88ed26415d..87265c6d81 100644 --- a/src/panels/lovelace/cards/hui-glance-card.ts +++ b/src/panels/lovelace/cards/hui-glance-card.ts @@ -1,16 +1,14 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import relativeTime from "../../../common/datetime/relative_time"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/lovelace/cards/hui-grid-card.ts b/src/panels/lovelace/cards/hui-grid-card.ts index b2033890fd..504d8e1a0c 100644 --- a/src/panels/lovelace/cards/hui-grid-card.ts +++ b/src/panels/lovelace/cards/hui-grid-card.ts @@ -1,8 +1,8 @@ -import { css, CSSResultGroup } from "lit-element"; +import { css, CSSResultGroup } from "lit"; import { computeCardSize } from "../common/compute-card-size"; +import { LovelaceCardEditor } from "../types"; import { HuiStackCard } from "./hui-stack-card"; import { GridCardConfig } from "./types"; -import { LovelaceCardEditor } from "../types"; const DEFAULT_COLUMNS = 3; const SQUARE_ROW_HEIGHTS_BY_COLUMNS = { diff --git a/src/panels/lovelace/cards/hui-history-graph-card.ts b/src/panels/lovelace/cards/hui-history-graph-card.ts index 69b230718f..b17a1ad1e0 100644 --- a/src/panels/lovelace/cards/hui-history-graph-card.ts +++ b/src/panels/lovelace/cards/hui-history-graph-card.ts @@ -1,15 +1,13 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { throttle } from "../../../common/util/throttle"; import "../../../components/ha-card"; import "../../../components/state-history-charts"; diff --git a/src/panels/lovelace/cards/hui-horizontal-stack-card.ts b/src/panels/lovelace/cards/hui-horizontal-stack-card.ts index 6f3b18bb82..349f5867b7 100644 --- a/src/panels/lovelace/cards/hui-horizontal-stack-card.ts +++ b/src/panels/lovelace/cards/hui-horizontal-stack-card.ts @@ -1,4 +1,4 @@ -import { css, CSSResultGroup } from "lit-element"; +import { css, CSSResultGroup } from "lit"; import { computeCardSize } from "../common/compute-card-size"; import { HuiStackCard } from "./hui-stack-card"; diff --git a/src/panels/lovelace/cards/hui-humidifier-card.ts b/src/panels/lovelace/cards/hui-humidifier-card.ts index c6c5651f01..8d514aea5c 100644 --- a/src/panels/lovelace/cards/hui-humidifier-card.ts +++ b/src/panels/lovelace/cards/hui-humidifier-card.ts @@ -3,15 +3,13 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, svg, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/cards/hui-iframe-card.ts b/src/panels/lovelace/cards/hui-iframe-card.ts index fe97a15281..6ac89599a3 100644 --- a/src/panels/lovelace/cards/hui-iframe-card.ts +++ b/src/panels/lovelace/cards/hui-iframe-card.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import parseAspectRatio from "../../../common/util/parse-aspect-ratio"; import "../../../components/ha-card"; import { LovelaceCard, LovelaceCardEditor } from "../types"; diff --git a/src/panels/lovelace/cards/hui-light-card.ts b/src/panels/lovelace/cards/hui-light-card.ts index 9f75785bcc..0cdca46706 100644 --- a/src/panels/lovelace/cards/hui-light-card.ts +++ b/src/panels/lovelace/cards/hui-light-card.ts @@ -3,16 +3,14 @@ import "@thomasloven/round-slider"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateDisplay } from "../../../common/entity/compute_state_display"; diff --git a/src/panels/lovelace/cards/hui-logbook-card.ts b/src/panels/lovelace/cards/hui-logbook-card.ts index 077d30bd09..f837b2b694 100644 --- a/src/panels/lovelace/cards/hui-logbook-card.ts +++ b/src/panels/lovelace/cards/hui-logbook-card.ts @@ -1,15 +1,13 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; diff --git a/src/panels/lovelace/cards/hui-map-card.ts b/src/panels/lovelace/cards/hui-map-card.ts index 8f94a5c32a..493ee46823 100644 --- a/src/panels/lovelace/cards/hui-map-card.ts +++ b/src/panels/lovelace/cards/hui-map-card.ts @@ -12,14 +12,13 @@ import { import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { LeafletModuleType, replaceTileLayer, diff --git a/src/panels/lovelace/cards/hui-markdown-card.ts b/src/panels/lovelace/cards/hui-markdown-card.ts index 36b81354ca..242990aa50 100644 --- a/src/panels/lovelace/cards/hui-markdown-card.ts +++ b/src/panels/lovelace/cards/hui-markdown-card.ts @@ -2,15 +2,13 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/ha-card"; import "../../../components/ha-markdown"; diff --git a/src/panels/lovelace/cards/hui-media-control-card.ts b/src/panels/lovelace/cards/hui-media-control-card.ts index ad34cdf56f..571de96287 100644 --- a/src/panels/lovelace/cards/hui-media-control-card.ts +++ b/src/panels/lovelace/cards/hui-media-control-card.ts @@ -5,17 +5,14 @@ import type { PaperProgressElement } from "@polymer/paper-progress/paper-progres import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/cards/hui-picture-card.ts b/src/panels/lovelace/cards/hui-picture-card.ts index 7c7bab7aa7..4983cf736a 100644 --- a/src/panels/lovelace/cards/hui-picture-card.ts +++ b/src/panels/lovelace/cards/hui-picture-card.ts @@ -1,15 +1,14 @@ import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/ha-card"; import { ActionHandlerEvent } from "../../../data/lovelace"; diff --git a/src/panels/lovelace/cards/hui-picture-elements-card.ts b/src/panels/lovelace/cards/hui-picture-elements-card.ts index 3b3cb165df..192569b3a9 100644 --- a/src/panels/lovelace/cards/hui-picture-elements-card.ts +++ b/src/panels/lovelace/cards/hui-picture-elements-card.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/ha-card"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/cards/hui-picture-entity-card.ts b/src/panels/lovelace/cards/hui-picture-entity-card.ts index 92a87b8b6f..2e079a46a9 100644 --- a/src/panels/lovelace/cards/hui-picture-entity-card.ts +++ b/src/panels/lovelace/cards/hui-picture-entity-card.ts @@ -1,16 +1,14 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeDomain } from "../../../common/entity/compute_domain"; import { computeStateDisplay } from "../../../common/entity/compute_state_display"; diff --git a/src/panels/lovelace/cards/hui-picture-glance-card.ts b/src/panels/lovelace/cards/hui-picture-glance-card.ts index d07fc5eebd..e5c7281edd 100644 --- a/src/panels/lovelace/cards/hui-picture-glance-card.ts +++ b/src/panels/lovelace/cards/hui-picture-glance-card.ts @@ -1,16 +1,14 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/lovelace/cards/hui-plant-status-card.ts b/src/panels/lovelace/cards/hui-plant-status-card.ts index 7c4bd05bdb..173ee823c7 100644 --- a/src/panels/lovelace/cards/hui-plant-status-card.ts +++ b/src/panels/lovelace/cards/hui-plant-status-card.ts @@ -2,14 +2,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/cards/hui-safe-mode-card.ts b/src/panels/lovelace/cards/hui-safe-mode-card.ts index fc0b083a08..d9269fce02 100644 --- a/src/panels/lovelace/cards/hui-safe-mode-card.ts +++ b/src/panels/lovelace/cards/hui-safe-mode-card.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-card"; import { HomeAssistant } from "../../../types"; import "../../config/logs/error-log-card"; diff --git a/src/panels/lovelace/cards/hui-sensor-card.ts b/src/panels/lovelace/cards/hui-sensor-card.ts index b0dfaed69c..b7a44a421c 100644 --- a/src/panels/lovelace/cards/hui-sensor-card.ts +++ b/src/panels/lovelace/cards/hui-sensor-card.ts @@ -1,6 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket/dist/types"; import { computeDomain } from "../../../common/entity/compute_domain"; -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HomeAssistant } from "../../../types"; import { findEntities } from "../common/find-entities"; import { GraphHeaderFooterConfig } from "../header-footer/types"; diff --git a/src/panels/lovelace/cards/hui-shopping-list-card.ts b/src/panels/lovelace/cards/hui-shopping-list-card.ts index 9edd46344b..c247a96070 100644 --- a/src/panels/lovelace/cards/hui-shopping-list-card.ts +++ b/src/panels/lovelace/cards/hui-shopping-list-card.ts @@ -5,18 +5,15 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { guard } from "lit-html/directives/guard"; -import { repeat } from "lit-html/directives/repeat"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { guard } from "lit/directives/guard"; +import { repeat } from "lit/directives/repeat"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/ha-card"; import "../../../components/ha-icon"; diff --git a/src/panels/lovelace/cards/hui-stack-card.ts b/src/panels/lovelace/cards/hui-stack-card.ts index 47bbc7933b..615581ef63 100644 --- a/src/panels/lovelace/cards/hui-stack-card.ts +++ b/src/panels/lovelace/cards/hui-stack-card.ts @@ -2,12 +2,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import { LovelaceCardConfig } from "../../../data/lovelace"; import { HomeAssistant } from "../../../types"; import { createCardElement } from "../create-element/create-card-element"; diff --git a/src/panels/lovelace/cards/hui-starting-card.ts b/src/panels/lovelace/cards/hui-starting-card.ts index ad08ee6747..09bdd24079 100644 --- a/src/panels/lovelace/cards/hui-starting-card.ts +++ b/src/panels/lovelace/cards/hui-starting-card.ts @@ -3,13 +3,12 @@ import { STATE_NOT_RUNNING } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-card"; import "../../../components/ha-circular-progress"; diff --git a/src/panels/lovelace/cards/hui-thermostat-card.ts b/src/panels/lovelace/cards/hui-thermostat-card.ts index 30abc46264..d9d09fb32d 100644 --- a/src/panels/lovelace/cards/hui-thermostat-card.ts +++ b/src/panels/lovelace/cards/hui-thermostat-card.ts @@ -4,17 +4,14 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, svg, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { UNIT_F } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; diff --git a/src/panels/lovelace/cards/hui-vertical-stack-card.ts b/src/panels/lovelace/cards/hui-vertical-stack-card.ts index dbd9ea53ac..e4915feea8 100644 --- a/src/panels/lovelace/cards/hui-vertical-stack-card.ts +++ b/src/panels/lovelace/cards/hui-vertical-stack-card.ts @@ -1,4 +1,4 @@ -import { css, CSSResultGroup } from "lit-element"; +import { css, CSSResultGroup } from "lit"; import { computeCardSize } from "../common/compute-card-size"; import { HuiStackCard } from "./hui-stack-card"; diff --git a/src/panels/lovelace/cards/hui-weather-forecast-card.ts b/src/panels/lovelace/cards/hui-weather-forecast-card.ts index 5a1d7865f9..6a0bc765a4 100644 --- a/src/panels/lovelace/cards/hui-weather-forecast-card.ts +++ b/src/panels/lovelace/cards/hui-weather-forecast-card.ts @@ -1,20 +1,13 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; - -import type { HomeAssistant } from "../../../types"; -import type { LovelaceCard, LovelaceCardEditor } from "../types"; -import type { WeatherForecastCardConfig } from "./types"; - +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import { formatTime } from "../../../common/datetime/format_time"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeStateDisplay } from "../../../common/entity/compute_state_display"; @@ -23,6 +16,8 @@ import { stateIcon } from "../../../common/entity/state_icon"; import { isValidEntityId } from "../../../common/entity/valid_entity_id"; import { formatNumber } from "../../../common/string/format_number"; import { debounce } from "../../../common/util/debounce"; +import "../../../components/ha-card"; +import "../../../components/ha-icon"; import { UNAVAILABLE } from "../../../data/entity"; import { ActionHandlerEvent } from "../../../data/lovelace"; import { @@ -34,6 +29,7 @@ import { WeatherEntity, weatherSVGStyles, } from "../../../data/weather"; +import type { HomeAssistant } from "../../../types"; import { actionHandler } from "../common/directives/action-handler-directive"; import { findEntities } from "../common/find-entities"; import { handleAction } from "../common/handle-action"; @@ -41,9 +37,8 @@ import { hasAction } from "../common/has-action"; import { hasConfigOrEntityChanged } from "../common/has-changed"; import { installResizeObserver } from "../common/install-resize-observer"; import { createEntityNotFoundWarning } from "../components/hui-warning"; - -import "../../../components/ha-card"; -import "../../../components/ha-icon"; +import type { LovelaceCard, LovelaceCardEditor } from "../types"; +import type { WeatherForecastCardConfig } from "./types"; const DAY_IN_MILLISECONDS = 86400000; diff --git a/src/panels/lovelace/common/directives/action-handler-directive.ts b/src/panels/lovelace/common/directives/action-handler-directive.ts index 234471d17e..dac0cfd6a0 100644 --- a/src/panels/lovelace/common/directives/action-handler-directive.ts +++ b/src/panels/lovelace/common/directives/action-handler-directive.ts @@ -1,14 +1,13 @@ /* eslint-disable max-classes-per-file */ import "@material/mwc-ripple"; import type { Ripple } from "@material/mwc-ripple"; -import { noChange } from "lit-html"; +import { noChange } from "lit"; import { AttributePart, directive, Directive, DirectiveParameters, - // eslint-disable-next-line import/extensions -} from "lit-html/directive.js"; +} from "lit/directive"; import { fireEvent } from "../../../../common/dom/fire_event"; import { deepEqual } from "../../../../common/util/deep-equal"; import { diff --git a/src/panels/lovelace/common/has-changed.ts b/src/panels/lovelace/common/has-changed.ts index f054ece6ba..1675f49e20 100644 --- a/src/panels/lovelace/common/has-changed.ts +++ b/src/panels/lovelace/common/has-changed.ts @@ -1,4 +1,4 @@ -import { PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; import { HomeAssistant } from "../../../types"; import { processConfigEntities } from "./process-config-entities"; diff --git a/src/panels/lovelace/components/hui-action-editor.ts b/src/panels/lovelace/components/hui-action-editor.ts index 60e5af1cda..3bc6853ed2 100644 --- a/src/panels/lovelace/components/hui-action-editor.ts +++ b/src/panels/lovelace/components/hui-action-editor.ts @@ -4,17 +4,12 @@ import "@polymer/paper-input/paper-textarea"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-help-tooltip"; +import "../../../components/ha-service-control"; import { ActionConfig, CallServiceActionConfig, @@ -24,8 +19,6 @@ import { import { ServiceAction } from "../../../data/script"; import { HomeAssistant } from "../../../types"; import { EditorTarget } from "../editor/types"; -import "../../../components/ha-service-control"; -import memoizeOne from "memoize-one"; @customElement("hui-action-editor") export class HuiActionEditor extends LitElement { diff --git a/src/panels/lovelace/components/hui-buttons-base.ts b/src/panels/lovelace/components/hui-buttons-base.ts index dce093d045..4c7692adef 100644 --- a/src/panels/lovelace/components/hui-buttons-base.ts +++ b/src/panels/lovelace/components/hui-buttons-base.ts @@ -1,16 +1,7 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - queryAll, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state, property } from "lit/decorators"; import { computeStateName } from "../../../common/entity/compute_state_name"; import "../../../components/entity/state-badge"; -import type { StateBadge } from "../../../components/entity/state-badge"; import type { ActionHandlerEvent } from "../../../data/lovelace"; import type { HomeAssistant } from "../../../types"; import type { EntitiesCardEntityConfig } from "../cards/types"; @@ -21,27 +12,14 @@ import { hasAction } from "../common/has-action"; @customElement("hui-buttons-base") export class HuiButtonsBase extends LitElement { + @state() public hass!: HomeAssistant; + @property() public configEntities?: EntitiesCardEntityConfig[]; - @queryAll("state-badge") protected _badges!: StateBadge[]; - - private _hass?: HomeAssistant; - - set hass(hass: HomeAssistant) { - this._hass = hass; - const entitiesShowingIcons = this.configEntities?.filter( - (entity) => entity.show_icon !== false - ); - this._badges.forEach((badge, index: number) => { - badge.hass = hass; - badge.stateObj = hass.states[entitiesShowingIcons![index].entity]; - }); - } - - protected render(): TemplateResult | void { + protected render(): TemplateResult { return html` ${(this.configEntities || []).map((entityConf) => { - const stateObj = this._hass!.states[entityConf.entity]; + const stateObj = this.hass.states[entityConf.entity]; return html`
; + style?: Record; } export interface SectionConfig { type: "section"; diff --git a/src/panels/lovelace/ha-panel-lovelace.ts b/src/panels/lovelace/ha-panel-lovelace.ts index 9b5e0b6769..c6e2fe8107 100644 --- a/src/panels/lovelace/ha-panel-lovelace.ts +++ b/src/panels/lovelace/ha-panel-lovelace.ts @@ -1,6 +1,7 @@ import "@material/mwc-button"; import deepFreeze from "deep-freeze"; -import { html, state, LitElement, property, TemplateResult } from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { constructUrlCurrentPath } from "../../common/url/construct-url"; import { addSearchParam, diff --git a/src/panels/lovelace/header-footer/hui-buttons-header-footer.ts b/src/panels/lovelace/header-footer/hui-buttons-header-footer.ts index 14ca1a81d3..7d47c8645d 100644 --- a/src/panels/lovelace/header-footer/hui-buttons-header-footer.ts +++ b/src/panels/lovelace/header-footer/hui-buttons-header-footer.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../../../types"; import { processConfigEntities } from "../common/process-config-entities"; import "../components/hui-buttons-base"; diff --git a/src/panels/lovelace/header-footer/hui-graph-header-footer.ts b/src/panels/lovelace/header-footer/hui-graph-header-footer.ts index 918ead0d81..c95646ef64 100644 --- a/src/panels/lovelace/header-footer/hui-graph-header-footer.ts +++ b/src/panels/lovelace/header-footer/hui-graph-header-footer.ts @@ -2,14 +2,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../components/ha-circular-progress"; import { fetchRecent } from "../../../data/history"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/lovelace/header-footer/hui-picture-header-footer.ts b/src/panels/lovelace/header-footer/hui-picture-header-footer.ts index 19d01504e4..3dcfd3b0f1 100644 --- a/src/panels/lovelace/header-footer/hui-picture-header-footer.ts +++ b/src/panels/lovelace/header-footer/hui-picture-header-footer.ts @@ -1,15 +1,14 @@ import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import "../../../components/ha-card"; import { ActionHandlerEvent } from "../../../data/lovelace"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/hui-editor.ts b/src/panels/lovelace/hui-editor.ts index 1b62dc23ee..7b86d68e43 100644 --- a/src/panels/lovelace/hui-editor.ts +++ b/src/panels/lovelace/hui-editor.ts @@ -6,15 +6,13 @@ import { safeDump, safeLoad } from "js-yaml"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { array, assert, object, optional, string, type } from "superstruct"; import { computeRTL } from "../../common/util/compute_rtl"; import { deepEqual } from "../../common/util/deep-equal"; diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index 5afeadc87f..915c344322 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -26,14 +26,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { fireEvent } from "../../common/dom/fire_event"; diff --git a/src/panels/lovelace/special-rows/hui-attribute-row.ts b/src/panels/lovelace/special-rows/hui-attribute-row.ts index 2f3a317b58..49a5eb3111 100644 --- a/src/panels/lovelace/special-rows/hui-attribute-row.ts +++ b/src/panels/lovelace/special-rows/hui-attribute-row.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import checkValidDate from "../../../common/datetime/check_valid_date"; import { formatNumber } from "../../../common/string/format_number"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/special-rows/hui-button-row.ts b/src/panels/lovelace/special-rows/hui-button-row.ts index a32c417721..c67887bee2 100644 --- a/src/panels/lovelace/special-rows/hui-button-row.ts +++ b/src/panels/lovelace/special-rows/hui-button-row.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { computeDomain } from "../../../common/entity/compute_domain"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/special-rows/hui-buttons-row.ts b/src/panels/lovelace/special-rows/hui-buttons-row.ts index 23ea52aa56..6dade3a362 100644 --- a/src/panels/lovelace/special-rows/hui-buttons-row.ts +++ b/src/panels/lovelace/special-rows/hui-buttons-row.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { computeDomain } from "../../../common/entity/compute_domain"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/special-rows/hui-call-service-row.ts b/src/panels/lovelace/special-rows/hui-call-service-row.ts index 1bfed88f0f..5f461d5180 100644 --- a/src/panels/lovelace/special-rows/hui-call-service-row.ts +++ b/src/panels/lovelace/special-rows/hui-call-service-row.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { CallServiceConfig } from "../entity-rows/types"; import { HuiButtonRow } from "./hui-button-row"; diff --git a/src/panels/lovelace/special-rows/hui-cast-row.ts b/src/panels/lovelace/special-rows/hui-cast-row.ts index 7021658174..e60e8e74a4 100644 --- a/src/panels/lovelace/special-rows/hui-cast-row.ts +++ b/src/panels/lovelace/special-rows/hui-cast-row.ts @@ -2,15 +2,13 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { CastManager } from "../../../cast/cast_manager"; import { castSendShowLovelaceView, diff --git a/src/panels/lovelace/special-rows/hui-conditional-row.ts b/src/panels/lovelace/special-rows/hui-conditional-row.ts index 65b04afdb3..9251a72bd7 100644 --- a/src/panels/lovelace/special-rows/hui-conditional-row.ts +++ b/src/panels/lovelace/special-rows/hui-conditional-row.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HuiConditionalBase } from "../components/hui-conditional-base"; import { createRowElement } from "../create-element/create-row-element"; import { ConditionalRowConfig, LovelaceRow } from "../entity-rows/types"; diff --git a/src/panels/lovelace/special-rows/hui-divider-row.ts b/src/panels/lovelace/special-rows/hui-divider-row.ts index 3763f21257..7f7bc8f1ba 100644 --- a/src/panels/lovelace/special-rows/hui-divider-row.ts +++ b/src/panels/lovelace/special-rows/hui-divider-row.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import { HomeAssistant } from "../../../types"; import { DividerConfig, LovelaceRow } from "../entity-rows/types"; @@ -30,7 +23,9 @@ class HuiDividerRow extends LitElement implements LovelaceRow { return html``; } - return html`
`; + return html`
`; } static get styles(): CSSResultGroup { diff --git a/src/panels/lovelace/special-rows/hui-section-row.ts b/src/panels/lovelace/special-rows/hui-section-row.ts index 045256a6ab..619d7a070b 100644 --- a/src/panels/lovelace/special-rows/hui-section-row.ts +++ b/src/panels/lovelace/special-rows/hui-section-row.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import "../../../components/ha-icon"; import { HomeAssistant } from "../../../types"; import { LovelaceRow, SectionConfig } from "../entity-rows/types"; diff --git a/src/panels/lovelace/special-rows/hui-text-row.ts b/src/panels/lovelace/special-rows/hui-text-row.ts index 1e43ab303d..a88c68a732 100644 --- a/src/panels/lovelace/special-rows/hui-text-row.ts +++ b/src/panels/lovelace/special-rows/hui-text-row.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import "../../../components/ha-icon"; import { LovelaceRow, TextConfig } from "../entity-rows/types"; diff --git a/src/panels/lovelace/special-rows/hui-weblink-row.ts b/src/panels/lovelace/special-rows/hui-weblink-row.ts index d475d8c4e5..9fe2a9aeed 100644 --- a/src/panels/lovelace/special-rows/hui-weblink-row.ts +++ b/src/panels/lovelace/special-rows/hui-weblink-row.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import "../../../components/ha-icon"; import { HomeAssistant } from "../../../types"; import { LovelaceRow, WeblinkConfig } from "../entity-rows/types"; diff --git a/src/panels/lovelace/strategies/original-states-strategy.ts b/src/panels/lovelace/strategies/original-states-strategy.ts index 8ecdd922d1..0aaef9fcf5 100644 --- a/src/panels/lovelace/strategies/original-states-strategy.ts +++ b/src/panels/lovelace/strategies/original-states-strategy.ts @@ -5,8 +5,8 @@ import { subscribeDeviceRegistry } from "../../../data/device_registry"; import { subscribeEntityRegistry } from "../../../data/entity_registry"; import { generateDefaultViewConfig } from "../common/generate-lovelace-config"; import { - LovelaceViewStrategy, LovelaceDashboardStrategy, + LovelaceViewStrategy, } from "./get-strategy"; let subscribedRegistries = false; diff --git a/src/panels/lovelace/views/hui-masonry-view.ts b/src/panels/lovelace/views/hui-masonry-view.ts index b99f4d9b16..8b260c9aa9 100644 --- a/src/panels/lovelace/views/hui-masonry-view.ts +++ b/src/panels/lovelace/views/hui-masonry-view.ts @@ -3,13 +3,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeRTL } from "../../../common/util/compute_rtl"; import { nextRender } from "../../../common/util/render-status"; diff --git a/src/panels/lovelace/views/hui-panel-view.ts b/src/panels/lovelace/views/hui-panel-view.ts index 450e54c353..1c7d531377 100644 --- a/src/panels/lovelace/views/hui-panel-view.ts +++ b/src/panels/lovelace/views/hui-panel-view.ts @@ -3,13 +3,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { computeRTL } from "../../../common/util/compute_rtl"; import type { LovelaceViewConfig, diff --git a/src/panels/lovelace/views/hui-view.ts b/src/panels/lovelace/views/hui-view.ts index ca81631685..5f815f25a3 100644 --- a/src/panels/lovelace/views/hui-view.ts +++ b/src/panels/lovelace/views/hui-view.ts @@ -1,10 +1,5 @@ -import { - customElement, - state, - property, - PropertyValues, - ReactiveElement, -} from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/entity/ha-state-label-badge"; import "../../../components/ha-svg-icon"; diff --git a/src/panels/media-browser/ha-panel-media-browser.ts b/src/panels/media-browser/ha-panel-media-browser.ts index 10d51ee00b..ebf1bfe90c 100644 --- a/src/panels/media-browser/ha-panel-media-browser.ts +++ b/src/panels/media-browser/ha-panel-media-browser.ts @@ -1,15 +1,8 @@ import "@material/mwc-icon-button"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { LocalStorage } from "../../common/decorators/local-storage"; import { HASSDomEvent } from "../../common/dom/fire_event"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; diff --git a/src/panels/media-browser/hui-dialog-select-media-player.ts b/src/panels/media-browser/hui-dialog-select-media-player.ts index 5d587206d1..42c094c286 100644 --- a/src/panels/media-browser/hui-dialog-select-media-player.ts +++ b/src/panels/media-browser/hui-dialog-select-media-player.ts @@ -2,15 +2,8 @@ import "@material/mwc-list/mwc-list"; import "@material/mwc-list/mwc-list-item"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { computeStateName } from "../../common/entity/compute_state_name"; import { compare } from "../../common/string/compare"; diff --git a/src/panels/media-browser/hui-dialog-web-browser-play-media.ts b/src/panels/media-browser/hui-dialog-web-browser-play-media.ts index df945275ad..18af9e77d7 100644 --- a/src/panels/media-browser/hui-dialog-web-browser-play-media.ts +++ b/src/panels/media-browser/hui-dialog-web-browser-play-media.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { createCloseHeading } from "../../components/ha-dialog"; import "../../components/ha-hls-player"; diff --git a/src/panels/my/ha-panel-my.ts b/src/panels/my/ha-panel-my.ts index f64c58fd7b..f052a10d42 100644 --- a/src/panels/my/ha-panel-my.ts +++ b/src/panels/my/ha-panel-my.ts @@ -1,14 +1,15 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; import { sanitizeUrl } from "@braintree/sanitize-url"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { navigate } from "../../common/navigate"; -import { HomeAssistant, Route } from "../../types"; import { createSearchParam, extractSearchParamsObject, } from "../../common/url/search-params"; -import "../../layouts/hass-error-screen"; -import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { domainToName } from "../../data/integration"; +import "../../layouts/hass-error-screen"; +import { HomeAssistant, Route } from "../../types"; import { documentationUrl } from "../../util/documentation-url"; const REDIRECTS: Redirects = { diff --git a/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts b/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts index cde705949c..1dac65496a 100644 --- a/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts +++ b/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts @@ -1,14 +1,8 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - state, - LitElement, - property, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../components/ha-circular-progress"; +import "../../components/ha-dialog"; import "../../components/ha-form/ha-form"; import "../../components/ha-markdown"; import { @@ -17,7 +11,6 @@ import { } from "../../data/data_entry_flow"; import { haStyleDialog } from "../../resources/styles"; import { HomeAssistant } from "../../types"; -import "../../components/ha-dialog"; let instance = 0; diff --git a/src/panels/profile/ha-advanced-mode-row.ts b/src/panels/profile/ha-advanced-mode-row.ts index 67fabfa082..ce0c9ec50f 100644 --- a/src/panels/profile/ha-advanced-mode-row.ts +++ b/src/panels/profile/ha-advanced-mode-row.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../components/ha-card"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/profile/ha-change-password-card.ts b/src/panels/profile/ha-change-password-card.ts index 775b59f1ba..6b06b70365 100644 --- a/src/panels/profile/ha-change-password-card.ts +++ b/src/panels/profile/ha-change-password-card.ts @@ -4,14 +4,12 @@ import "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../components/ha-card"; import "../../components/ha-circular-progress"; import { haStyle } from "../../resources/styles"; diff --git a/src/panels/profile/ha-enable-shortcuts-row.ts b/src/panels/profile/ha-enable-shortcuts-row.ts index cdec57a03b..429c439c69 100644 --- a/src/panels/profile/ha-enable-shortcuts-row.ts +++ b/src/panels/profile/ha-enable-shortcuts-row.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/profile/ha-force-narrow-row.ts b/src/panels/profile/ha-force-narrow-row.ts index 49d70ef57f..771f49c7d9 100644 --- a/src/panels/profile/ha-force-narrow-row.ts +++ b/src/panels/profile/ha-force-narrow-row.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/profile/ha-long-lived-access-tokens-card.ts b/src/panels/profile/ha-long-lived-access-tokens-card.ts index 2468c84724..789a79b206 100644 --- a/src/panels/profile/ha-long-lived-access-tokens-card.ts +++ b/src/panels/profile/ha-long-lived-access-tokens-card.ts @@ -1,15 +1,8 @@ import "@material/mwc-button/mwc-button"; import "@material/mwc-icon-button/mwc-icon-button"; import { mdiDelete } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import relativeTime from "../../common/datetime/relative_time"; import { fireEvent } from "../../common/dom/fire_event"; diff --git a/src/panels/profile/ha-mfa-modules-card.ts b/src/panels/profile/ha-mfa-modules-card.ts index 5ccef7f050..620f1f5ed1 100644 --- a/src/panels/profile/ha-mfa-modules-card.ts +++ b/src/panels/profile/ha-mfa-modules-card.ts @@ -1,15 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-card"; import { showConfirmationDialog } from "../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/profile/ha-panel-profile.ts b/src/panels/profile/ha-panel-profile.ts index 7890a7bbc9..7484c4ba3b 100644 --- a/src/panels/profile/ha-panel-profile.ts +++ b/src/panels/profile/ha-panel-profile.ts @@ -4,15 +4,8 @@ import "@polymer/app-layout/app-toolbar/app-toolbar"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-card"; import "../../components/ha-menu-button"; diff --git a/src/panels/profile/ha-pick-dashboard-row.ts b/src/panels/profile/ha-pick-dashboard-row.ts index da2c83622d..482ce1969b 100644 --- a/src/panels/profile/ha-pick-dashboard-row.ts +++ b/src/panels/profile/ha-pick-dashboard-row.ts @@ -1,14 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../components/ha-paper-dropdown-menu"; import "../../components/ha-settings-row"; import { fetchDashboards, LovelaceDashboard } from "../../data/lovelace"; diff --git a/src/panels/profile/ha-pick-number-format-row.ts b/src/panels/profile/ha-pick-number-format-row.ts index 07dd738231..fa6b0f8e6f 100644 --- a/src/panels/profile/ha-pick-number-format-row.ts +++ b/src/panels/profile/ha-pick-number-format-row.ts @@ -1,19 +1,14 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { fireEvent } from "../../common/dom/fire_event"; +import { formatNumber } from "../../common/string/format_number"; import "../../components/ha-card"; import "../../components/ha-paper-dropdown-menu"; -import { HomeAssistant } from "../../types"; import "../../components/ha-settings-row"; -import { formatNumber } from "../../common/string/format_number"; import { NumberFormat } from "../../data/translation"; -import { fireEvent } from "../../common/dom/fire_event"; +import { HomeAssistant } from "../../types"; @customElement("ha-pick-number-format-row") class NumberFormatRow extends LitElement { diff --git a/src/panels/profile/ha-pick-theme-row.ts b/src/panels/profile/ha-pick-theme-row.ts index 9ba8ee47d8..57dde1cf9f 100644 --- a/src/panels/profile/ha-pick-theme-row.ts +++ b/src/panels/profile/ha-pick-theme-row.ts @@ -5,13 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, - state, + html, LitElement, - property, PropertyValues, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; + TemplateResult, +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-formfield"; import "../../components/ha-paper-dropdown-menu"; diff --git a/src/panels/profile/ha-refresh-tokens-card.ts b/src/panels/profile/ha-refresh-tokens-card.ts index 738bb5760b..7c75b3f15b 100644 --- a/src/panels/profile/ha-refresh-tokens-card.ts +++ b/src/panels/profile/ha-refresh-tokens-card.ts @@ -1,15 +1,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiDelete } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import relativeTime from "../../common/datetime/relative_time"; import { fireEvent } from "../../common/dom/fire_event"; diff --git a/src/panels/profile/ha-set-suspend-row.ts b/src/panels/profile/ha-set-suspend-row.ts index 9874590295..47a4d7f431 100644 --- a/src/panels/profile/ha-set-suspend-row.ts +++ b/src/panels/profile/ha-set-suspend-row.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent, HASSDomEvent } from "../../common/dom/fire_event"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/profile/ha-set-vibrate-row.ts b/src/panels/profile/ha-set-vibrate-row.ts index d0e7701dfb..184b9b096f 100644 --- a/src/panels/profile/ha-set-vibrate-row.ts +++ b/src/panels/profile/ha-set-vibrate-row.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/shopping-list/ha-panel-shopping-list.ts b/src/panels/shopping-list/ha-panel-shopping-list.ts index 99779d0cba..f46d52dcd2 100644 --- a/src/panels/shopping-list/ha-panel-shopping-list.ts +++ b/src/panels/shopping-list/ha-panel-shopping-list.ts @@ -4,14 +4,12 @@ import "@polymer/app-layout/app-toolbar/app-toolbar"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import "../../components/ha-menu-button"; diff --git a/src/resources/codemirror.ts b/src/resources/codemirror.ts index 0c52dd5446..b487cc5a31 100644 --- a/src/resources/codemirror.ts +++ b/src/resources/codemirror.ts @@ -1,24 +1,24 @@ +import { indentLess, indentMore } from "@codemirror/commands"; import { HighlightStyle, tags } from "@codemirror/highlight"; -import { EditorView, KeyBinding } from "@codemirror/view"; -import { StreamLanguage } from "@codemirror/stream-parser"; import { jinja2 } from "@codemirror/legacy-modes/mode/jinja2"; import { yaml } from "@codemirror/legacy-modes/mode/yaml"; -import { indentLess, indentMore } from "@codemirror/commands"; import { Compartment } from "@codemirror/state"; +import { StreamLanguage } from "@codemirror/stream-parser"; +import { EditorView, KeyBinding } from "@codemirror/view"; -export { - keymap, - highlightActiveLine, - drawSelection, - EditorView, -} from "@codemirror/view"; -export { EditorState, Prec } from "@codemirror/state"; export { defaultKeymap } from "@codemirror/commands"; export { lineNumbers } from "@codemirror/gutter"; -export { searchKeymap, highlightSelectionMatches } from "@codemirror/search"; +export { HighlightStyle, tags } from "@codemirror/highlight"; export { history, historyKeymap } from "@codemirror/history"; export { rectangularSelection } from "@codemirror/rectangular-selection"; -export { HighlightStyle, tags } from "@codemirror/highlight"; +export { highlightSelectionMatches, searchKeymap } from "@codemirror/search"; +export { EditorState, Prec } from "@codemirror/state"; +export { + drawSelection, + EditorView, + highlightActiveLine, + keymap, +} from "@codemirror/view"; export const langs = { jinja2: StreamLanguage.define(jinja2), diff --git a/src/resources/compatibility.ts b/src/resources/compatibility.ts index 8cec919666..85726354bc 100644 --- a/src/resources/compatibility.ts +++ b/src/resources/compatibility.ts @@ -1,5 +1,6 @@ // For localize import "@formatjs/intl-getcanonicallocales/polyfill"; +import "@lit/polyfill-support"; import "core-js"; // To use comlink under ES5 import "proxy-polyfill"; diff --git a/src/resources/custom-card-support.ts b/src/resources/custom-card-support.ts index 2e33e53552..dbf420cd7d 100644 --- a/src/resources/custom-card-support.ts +++ b/src/resources/custom-card-support.ts @@ -1,4 +1,4 @@ -import { css, html, LitElement } from "lit-element"; +import { css, html, LitElement } from "lit"; (LitElement.prototype as any).html = html; (LitElement.prototype as any).css = css; diff --git a/src/resources/ha-sortable-style.ts b/src/resources/ha-sortable-style.ts index 5979f986e2..8c7a5ded7c 100644 --- a/src/resources/ha-sortable-style.ts +++ b/src/resources/ha-sortable-style.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const sortableStyles = css` #sortable a:nth-of-type(2n) paper-icon-item { diff --git a/src/resources/styles.ts b/src/resources/styles.ts index 6be57cf1f2..54e298f1c2 100644 --- a/src/resources/styles.ts +++ b/src/resources/styles.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const darkStyles = { "primary-background-color": "#111111", diff --git a/src/state-summary/state-card-display.ts b/src/state-summary/state-card-display.ts index aec040baf9..4e434fbf8a 100755 --- a/src/state-summary/state-card-display.ts +++ b/src/state-summary/state-card-display.ts @@ -1,15 +1,8 @@ import "@polymer/iron-flex-layout/iron-flex-layout-classes"; import type { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { computeDomain } from "../common/entity/compute_domain"; import { computeStateDisplay } from "../common/entity/compute_state_display"; import { computeRTL } from "../common/util/compute_rtl"; diff --git a/src/state-summary/state-card-input_select.ts b/src/state-summary/state-card-input_select.ts index 1c45e41b57..854b9c1280 100644 --- a/src/state-summary/state-card-input_select.ts +++ b/src/state-summary/state-card-input_select.ts @@ -5,13 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { stopPropagation } from "../common/dom/stop_propagation"; import { computeStateName } from "../common/entity/compute_state_name"; import "../components/entity/state-badge"; diff --git a/src/state-summary/state-card-script.ts b/src/state-summary/state-card-script.ts index 579036e07e..52eed9f297 100644 --- a/src/state-summary/state-card-script.ts +++ b/src/state-summary/state-card-script.ts @@ -1,12 +1,7 @@ import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - LitElement, - property, - CSSResultGroup, -} from "lit-element"; -import { html } from "lit-html"; +import { CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/entity/ha-entity-toggle"; import "../components/entity/state-info"; import { UNAVAILABLE_STATES } from "../data/entity"; diff --git a/src/state/connection-mixin.ts b/src/state/connection-mixin.ts index cda1c797ec..86ea836210 100644 --- a/src/state/connection-mixin.ts +++ b/src/state/connection-mixin.ts @@ -2,8 +2,8 @@ import { Auth, callService, Connection, - ERR_INVALID_AUTH, ERR_CONNECTION_LOST, + ERR_INVALID_AUTH, HassConfig, subscribeConfig, subscribeEntities, diff --git a/src/state/dialog-manager-mixin.ts b/src/state/dialog-manager-mixin.ts index acb0c7c5e3..0575afa493 100644 --- a/src/state/dialog-manager-mixin.ts +++ b/src/state/dialog-manager-mixin.ts @@ -1,4 +1,4 @@ -import { PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; import { HASSDomEvent } from "../common/dom/fire_event"; import { makeDialogManager, showDialog } from "../dialogs/make-dialog-manager"; import { Constructor } from "../types"; diff --git a/src/state/disconnect-toast-mixin.ts b/src/state/disconnect-toast-mixin.ts index 98e36dea7a..9b60b20e39 100644 --- a/src/state/disconnect-toast-mixin.ts +++ b/src/state/disconnect-toast-mixin.ts @@ -4,14 +4,14 @@ import { STATE_STARTING, UnsubscribeFunc, } from "home-assistant-js-websocket"; +import { + BootstrapIntegrationsTimings, + subscribeBootstrapIntegrations, +} from "../data/bootstrap_integrations"; +import { domainToName } from "../data/integration"; import { Constructor } from "../types"; import { showToast } from "../util/toast"; import { HassBaseEl } from "./hass-base-mixin"; -import { domainToName } from "../data/integration"; -import { - subscribeBootstrapIntegrations, - BootstrapIntegrationsTimings, -} from "../data/bootstrap_integrations"; export default >(superClass: T) => class extends superClass { diff --git a/src/state/haptic-mixin.ts b/src/state/haptic-mixin.ts index 6a4483c3bb..a4a46ceb35 100644 --- a/src/state/haptic-mixin.ts +++ b/src/state/haptic-mixin.ts @@ -1,4 +1,4 @@ -import { PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; import { HASSDomEvent } from "../common/dom/fire_event"; import { HapticType } from "../data/haptics"; import { Constructor, HomeAssistant } from "../types"; diff --git a/src/state/hass-base-mixin.ts b/src/state/hass-base-mixin.ts index 1d9b09d4ee..27a19e9865 100644 --- a/src/state/hass-base-mixin.ts +++ b/src/state/hass-base-mixin.ts @@ -1,7 +1,12 @@ import { Auth, Connection } from "home-assistant-js-websocket"; -import { LitElement, property } from "lit-element"; +import { LitElement } from "lit"; +import { property } from "lit/decorators"; import { HomeAssistant } from "../types"; +// Temporary disable warnings so the dev console is not flooded, we should fix these and then re-enable the warning +if (__DEV__) { + LitElement.disableWarning?.("change-in-update"); +} export class HassBaseEl extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; diff --git a/src/state/more-info-mixin.ts b/src/state/more-info-mixin.ts index dd0cf17c0c..620b8b027f 100644 --- a/src/state/more-info-mixin.ts +++ b/src/state/more-info-mixin.ts @@ -1,4 +1,4 @@ -import type { PropertyValues } from "lit-element"; +import type { PropertyValues } from "lit"; import type { HASSDomEvent } from "../common/dom/fire_event"; import { showDialog } from "../dialogs/make-dialog-manager"; import type { MoreInfoDialogParams } from "../dialogs/more-info/ha-more-info-dialog"; diff --git a/src/state/quick-bar-mixin.ts b/src/state/quick-bar-mixin.ts index 7431a1e9f8..445a9e3ee5 100644 --- a/src/state/quick-bar-mixin.ts +++ b/src/state/quick-bar-mixin.ts @@ -1,4 +1,4 @@ -import type { PropertyValues } from "lit-element"; +import type { PropertyValues } from "lit"; import tinykeys from "tinykeys"; import { QuickBarParams, diff --git a/src/state/translations-mixin.ts b/src/state/translations-mixin.ts index 6c5bf64302..f22d4149c1 100644 --- a/src/state/translations-mixin.ts +++ b/src/state/translations-mixin.ts @@ -13,8 +13,8 @@ import { translationMetadata } from "../resources/translations-metadata"; import { Constructor, HomeAssistant } from "../types"; import { storeState } from "../util/ha-pref-storage"; import { - getTranslation, getLocalLanguage, + getTranslation, getUserLocale, } from "../util/hass-translation"; import { HassBaseEl } from "./hass-base-mixin"; diff --git a/src/state/url-sync-mixin.ts b/src/state/url-sync-mixin.ts index b6ae356ac3..7597004b53 100644 --- a/src/state/url-sync-mixin.ts +++ b/src/state/url-sync-mixin.ts @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -import { ReactiveElement } from "lit-element"; +import { ReactiveElement } from "lit"; import { HASSDomEvent } from "../common/dom/fire_event"; import { closeDialog, diff --git a/src/styles/polymer-ha-style-dialog.ts b/src/styles/polymer-ha-style-dialog.ts index 22e239b470..68193fc45a 100644 --- a/src/styles/polymer-ha-style-dialog.ts +++ b/src/styles/polymer-ha-style-dialog.ts @@ -1,5 +1,5 @@ import "@polymer/polymer/lib/elements/dom-module"; -import { CSSResult } from "lit-element"; +import { CSSResult } from "lit"; import { haStyleDialog } from "../resources/styles"; const documentContainer = document.createElement("template"); diff --git a/src/styles/polymer-ha-style.ts b/src/styles/polymer-ha-style.ts index ea6c98d829..e3afebd8fa 100644 --- a/src/styles/polymer-ha-style.ts +++ b/src/styles/polymer-ha-style.ts @@ -1,5 +1,5 @@ import "@polymer/polymer/lib/elements/dom-module"; -import { CSSResult } from "lit-element"; +import { CSSResult } from "lit"; import { haStyle } from "../resources/styles"; const documentContainer = document.createElement("template"); diff --git a/src/types.ts b/src/types.ts index 7c6d699ce1..102cdd31c1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,8 +3,8 @@ import { Connection, HassConfig, HassEntities, - HassServiceTarget, HassServices, + HassServiceTarget, MessageBase, } from "home-assistant-js-websocket"; import { LocalizeFunc } from "./common/translations/localize"; diff --git a/yarn.lock b/yarn.lock index 9dfc4c1569..870d8430ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1347,551 +1347,592 @@ dependencies: vary "^1.1.2" -"@material/animation@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/animation/-/animation-9.0.0-canary.1c156d69d.0.tgz#53acc1253d1286f6d4cfaf3a778229cbd19ab000" - integrity sha512-m3eUpFRwxcP1tEWJlIH5q77YGSYEe5ITRw5OtyDvxU7ZzF0xKJbBeauQEdCmyig9UvK+J7jUUnCgkT/t/ldLtw== +"@lit-labs/virtualizer@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@lit-labs/virtualizer/-/virtualizer-0.6.0.tgz#7b556652d4484f2f28d1d7d9ce6aa0fa882e73bc" + integrity sha512-nuwePG9b0TRXmkeL2WQpMxukw9CwlHi33n+s9xW7wfOIl7xcRE6Q+7ygeA/nScFypm1RhumI+SbZVLVTADY2Zg== dependencies: - tslib "^1.9.3" + event-target-shim "^5.0.1" + lit "^2.0.0-rc.1" + tslib "^1.10.0" -"@material/base@9.0.0-canary.1c156d69d.0", "@material/base@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/base/-/base-9.0.0-canary.1c156d69d.0.tgz#84f365077dfae12a31a32bfc7f9ba673fe56b2db" - integrity sha512-r98qY6EsPx6BlzT0Pj+H+BTI7r76GEX/zZPgajxZjbPAJSeeK+uCh69Dmhf63meLKaFkKgvLwH5udKJLMqqjpQ== +"@lit/reactive-element@^1.0.0-rc.2": + version "1.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.0.0-rc.2.tgz#f24dba16ea571a08dca70f1783bd2ca5ec8de3ee" + integrity sha512-cujeIl5Ei8FC7UHf4/4Q3bRJOtdTe1vpJV/JEBYCggedmQ+2P8A2oz7eE+Vxi6OJ4nc0X+KZxXnBoH4QrEbmEQ== + +"@material/animation@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/animation/-/animation-12.0.0-canary.1a8d06483.0.tgz#a3d5a6ebf8965c0e3a52da1c3bf86ff2677f9c31" + integrity sha512-aUiyCKXnXjq6WWOnc5Jh7jWe5hwnG8uKDScq0BKvNOANmGA5ZJnD4F52fmY1bdZmzbGpmPPu9p6WulaLtYfjIQ== dependencies: - tslib "^1.9.3" + tslib "^2.1.0" -"@material/button@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/button/-/button-9.0.0-canary.1c156d69d.0.tgz#b35540ed085006d65562ed56fe2b5540d6712712" - integrity sha512-ZjBDrGy2kKPmlIYaL99/C1D0t+MCIkP3Pcj9Y1RxxYdayvP+o8evkBUz5IRtg5NpW4o1X89x8RfF/JmLJZrdYw== +"@material/base@12.0.0-canary.1a8d06483.0", "@material/base@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/base/-/base-12.0.0-canary.1a8d06483.0.tgz#7644e4638301b6dd8f70160a5dfdf3339b2d0e4c" + integrity sha512-mqAV6ZlVyLstS6XcaOUBtY36SnHk8x+HPqJsc/EWkowfQfmjbVnjgjQ3Ld5jAS5BdC1kETmqSKxm0hHxlZd5UQ== dependencies: - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" + tslib "^2.1.0" -"@material/checkbox@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-9.0.0-canary.1c156d69d.0.tgz#7534284e59af51217e3653ce8d7105dbd001d55f" - integrity sha512-7Fyjh3avQg+EZx6wVIB3K4b/9rs7rYTZIXVYM4iAVJo/LDtdBrdmLy6sRmk90gnO7+V5eTvSBJy7R+dU3l/xNQ== +"@material/button@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/button/-/button-12.0.0-canary.1a8d06483.0.tgz#8dd20ae410c8f3064511c5ffd2efbd433539ec73" + integrity sha512-AxPbx9PCYX1Lbez1gsS1P6Ucbmc3UgEHgbNB8kxrksK1Y+vRD1nFXqxGQ67bNCY1c9gTKuMVM84b8OTccRZg2w== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/chips@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/chips/-/chips-9.0.0-canary.1c156d69d.0.tgz#8f6819c42743a8f4dd9be5155556f0c9eb2d30f7" - integrity sha512-DuWDauRhrlj/nMI/NNUqVD+SUnVsuuZNSvf9t9AX3H08Uo3ZUHhNfdc7Ust0B+jHCaHsjLjlREyYagp8JxJuXQ== +"@material/checkbox@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-12.0.0-canary.1a8d06483.0.tgz#3b5fbaa01743387fcbd135f2bd322324c0613bd7" + integrity sha512-j6N1dsVIKqNuXliUuDM/06hdqVOF90Kc6W93nERM0gp5FP0Wx66IuOS6RZV4+RiITTy1AtmTR5HmKIYSq4uPhg== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/checkbox" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/circular-progress@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/circular-progress/-/circular-progress-9.0.0-canary.1c156d69d.0.tgz#df6a6b13cbe65e6e90e81ce0149d472a3de2463c" - integrity sha512-DCYOF9ssHb+psiKA98GZFztYFr48dvEhvS8w0Lu/hx+7G4qlG6KJzFZv1mBuiF0pdJCT1tjEDjOcj6t3nU9SRA== +"@material/chips@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/chips/-/chips-12.0.0-canary.1a8d06483.0.tgz#0827604c15a6ef0d49ab7765b9e0c0a1679c160b" + integrity sha512-STRAaLD5OFKOYehb97wWurNMuj9nDyt/kdFjOqeBZk2b7fXYaG7bV1hMydR+LO0W6znOhubX2Zt6inNZvI56XQ== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/progress-indicator" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/checkbox" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/density@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/density/-/density-9.0.0-canary.1c156d69d.0.tgz#ca2a2a5f4ea31520d717a41a6343c104acee3005" - integrity sha512-Y87bUpTsXNDOi1q5NVRBxIyTUAFda1PP1Z9HOvgpV19n7/F6YLrttLGcOFSRFfx9btUKf4EddctBzwzBrF71TQ== - -"@material/dialog@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/dialog/-/dialog-9.0.0-canary.1c156d69d.0.tgz#15a0c38d322679f3fcf372eabd21a9c70061f788" - integrity sha512-JadtYwhCPrvZce/0j+kUuSq5+QaXAbZ1yx2FPT01K6/mzEgM0eDuU7ta7IlGGoJXFzmQI8jy7WsTSuW+IBNC8A== +"@material/circular-progress@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/circular-progress/-/circular-progress-12.0.0-canary.1a8d06483.0.tgz#ff87ecf784cc6ac316c6fb560a34e7cafef32d3a" + integrity sha512-+mfVC9zK5BRbEOIn0qzXF7yZiTBLf7jiXJb6ufyyBJR9RDu5RAzvbj2Dj2GDfq46Y+eM7cO3aHjJ77i4eJ6haQ== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/button" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/progress-indicator" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/dom@9.0.0-canary.1c156d69d.0", "@material/dom@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/dom/-/dom-9.0.0-canary.1c156d69d.0.tgz#ffba86848f77cdce5ac2cfe494a97cb82af5c714" - integrity sha512-AwiQDzquolB7rqy8k4+QMVQ8Njb6k0CT+otJ/UNJbj0qNVXZB4njVaWRWrWCt70hYp1rG0cRNkZ01ZJDqABUFw== +"@material/density@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/density/-/density-12.0.0-canary.1a8d06483.0.tgz#0f6ccaa15b8efcab1c5eef51ab9cc2c304ff2f9c" + integrity sha512-Tq5MX//GECdL2EnqRFJkIVPJjHD7u6XUCPhH5n50GKo3fZAwU+dksZoncqZPdG/4vxZ4aqTTQT9VXmk0QDEo5Q== dependencies: - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + tslib "^2.1.0" -"@material/elevation@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/elevation/-/elevation-9.0.0-canary.1c156d69d.0.tgz#0027434eef691dde7e16e672e1349ee1e9ed7a2b" - integrity sha512-ojX0+nRNkfJssFA/EXhwglDwW48xll1OPCVy8jJrRfvIasRHiIJBeRdnlU5BL4qxDJHaEoOfEMmVQP/Aj504Qw== +"@material/dialog@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/dialog/-/dialog-12.0.0-canary.1a8d06483.0.tgz#ef0fdcaf8909b015971c92181c294caa443cffc6" + integrity sha512-TXUjnOhHeVBsNsavSQDVG9bfNj/wzqfn2WpIljDgyKRQd1JPh75AgnZleiOFeVvvOKsNcV3bB+ESwaqgV9Nd1w== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/button" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/icon-button" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/feature-targeting@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-9.0.0-canary.1c156d69d.0.tgz#feaf37af156811a088958e653e6c08e66f567d2a" - integrity sha512-HWd0+GMnkVB3anmUc9+MeWCNoogAbb4U7ihzwq7lzLCQyC+i/kunppkUVV7DhL3ZVl1O6zIw1eAT+dgQpN8x4Q== - -"@material/form-field@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/form-field/-/form-field-9.0.0-canary.1c156d69d.0.tgz#2f44c9704c8a4aef54376819573f835983686e89" - integrity sha512-v1KWGRj4Qf9SESLswtlrdm/B6TmNkQsh5CZSM2xL2ZXe/k/KNgbLgM4ofHJApwW3QWYVBfA8nT/MlIvJJivd9w== +"@material/dom@12.0.0-canary.1a8d06483.0", "@material/dom@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/dom/-/dom-12.0.0-canary.1a8d06483.0.tgz#6ce068b0bcc20d605256d6316b9ed36e6130f729" + integrity sha512-x1+6b2vwCcJbjLddsGefhZNzdvDoyFmrbjSxljnzk+qdeRrM6gXioLfBjxJKT8/olge+XnZukNH8JfiRCVSCGA== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/list@9.0.0-canary.1c156d69d.0", "@material/list@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/list/-/list-9.0.0-canary.1c156d69d.0.tgz#d4a7b1354e4d00a843de19f3dbde188ca2e1e429" - integrity sha512-cn9zTm38RgriNudHnQAlEyLJOIfE11rTYl5mnBMkLaGz1gRLH+QVN8Q8FBpMwagS0cU0CkMTwrADJaUlmJeuVQ== +"@material/elevation@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/elevation/-/elevation-12.0.0-canary.1a8d06483.0.tgz#f6e24d5573b16160f3f694a1d80ca945e5ee707a" + integrity sha512-0MaBjiEwZsFnVfDVUqdVl3eVRGlJcBJK/Qm495ITwMg4Z8pCM6S+p8km8PidGvSTy0RAUpR/51x1CI2sgl7Fqw== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/menu-surface@9.0.0-canary.1c156d69d.0", "@material/menu-surface@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/menu-surface/-/menu-surface-9.0.0-canary.1c156d69d.0.tgz#6200a17a4895d99f604f96d87b65243ae3b98d5e" - integrity sha512-/ePz8oZm+XLsGypnXJ1ATK4Vtei4KgHh9MFJHhOvmAbd6gPX6I8LnWlUA3cQ2/AX0bDeLNM7mXUkJ1d2flHdNQ== +"@material/feature-targeting@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-12.0.0-canary.1a8d06483.0.tgz#b5191c4c813a87207ffeebca6edb9c50fc71f5b3" + integrity sha512-CXlHPZ+ArtVpFitBMtvpphGHWesL2n3NuE14e6vBW12N+3kj58BYCUZHLF3/tB1qJlezYEvEs/W2/YpOx8qMMA== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + tslib "^2.1.0" -"@material/menu@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/menu/-/menu-9.0.0-canary.1c156d69d.0.tgz#641c020acaa1a92a254f8366e6a5762137483757" - integrity sha512-opUKKT40E3aDY9wMUIKQtUoxB2gD6Ry633vb2sOHHkf7YA7Ad/F8HnByhLqeq7tB2Gg1N0PKfSGOk/OMjJ1l9w== +"@material/form-field@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/form-field/-/form-field-12.0.0-canary.1a8d06483.0.tgz#393d41ae0a3dbe1780c28c7a2af3791317e189fe" + integrity sha512-5OUWpLKAeBK17wsdCN3vAxefXsshuLqXbocvf+FzUwyMWzStRhXyjjR1PxuBLuBBof6JvabLGpQgpuaYFju2EQ== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/list" "9.0.0-canary.1c156d69d.0" - "@material/menu-surface" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/mwc-base@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-base/-/mwc-base-0.20.0.tgz#9753d357ea3fb9010985487a4d582bf273de1aaf" - integrity sha512-q35jN1TGBts3LzKk2RVtgBpLDfBfRrx2hJ4GEVAeJsEGiO5CZrCD0bPlZSRTammzQBbDAh7szvhMiWo0TkRaWw== +"@material/icon-button@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/icon-button/-/icon-button-12.0.0-canary.1a8d06483.0.tgz#bf15f01c994e906bdafb8656c1629b3d71e1c393" + integrity sha512-m7WHl4cZHf/oCoQ+Uwu8rzd/Ni712GN6PXN670SQ/1dOSeoK+1H8/J09bWG/OccsYbBAopGRdWBRcgvf4rkC3Q== dependencies: - "@material/base" "=9.0.0-canary.1c156d69d.0" - "@material/dom" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" + +"@material/list@12.0.0-canary.1a8d06483.0", "@material/list@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/list/-/list-12.0.0-canary.1a8d06483.0.tgz#6ba66e3e0f23dd0b3146090e3ba58a69f835d917" + integrity sha512-gt76+G2+kKpmtuY5lImZESZts65eGPmYkjDQsE7x/GsX/eEd9F5k3VqeDQwsp2HyywMoAi6CD9EHN3Hw+ays+g== + dependencies: + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" + +"@material/menu-surface@12.0.0-canary.1a8d06483.0", "@material/menu-surface@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/menu-surface/-/menu-surface-12.0.0-canary.1a8d06483.0.tgz#fd940d4f1007ceff5b829c1f2fbdf21f8c88de43" + integrity sha512-vWCkbuNRjNE8FfK8wdFUW61PnURCtEnpceMd+XiAKorUJaqaPSG2uU9Uu6Y823dVEotxmhZaW25oFIPGobM4Cw== + dependencies: + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" + +"@material/menu@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/menu/-/menu-12.0.0-canary.1a8d06483.0.tgz#81f6050fa95c138a6454b84d5ff7a5c38d1fe4c3" + integrity sha512-DhUNwiEtPyhvVTW6zpcWsupiLKq/Qi+RDJJP+B79ZY40/p3BoWjDymULOtYGndDYduR5lJ6ScJ5MMT666nelQQ== + dependencies: + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/list" "12.0.0-canary.1a8d06483.0" + "@material/menu-surface" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" + +"@material/mwc-base@0.22.0-canary.cc04657a.0": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-base/-/mwc-base-0.22.0-canary.cc04657a.0.tgz#9d619b66f0f0b91976215249866ea5a880371a33" + integrity sha512-O3BrWp7cfsRgBKIcWt+WRlnG7x4dRP5v+zhiRPdxZV3EHtHfQTO3yiXnhkW+F3BHN4UMOHYeshXHg0CbJ3O6jA== + dependencies: + "@material/base" "=12.0.0-canary.1a8d06483.0" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-button@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-button/-/mwc-button-0.20.0.tgz#2942edb504f4cee4d8f55b667b8538f27084b772" - integrity sha512-kqQpeuLfaqfH4PZbENT9rwx1sgeFPLHuKy5M31ZeKG1deRTxw11FDGeMxSkePfm1QFfY6DNTsIAG5qC56tUNlw== +"@material/mwc-button@0.22.0-canary.cc04657a.0", "@material/mwc-button@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-button/-/mwc-button-0.22.0-canary.cc04657a.0.tgz#9640668b340197325ecc493ddc861bc215c117a3" + integrity sha512-xM6VorfSUgYDFFHYr5GfzHFbqcgz0j3TE6xR6dXkJQTqQPFameOYFBKn7TKu2j5674+OY4QHeyhw8/fYaWeP0A== dependencies: - "@material/mwc-icon" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-icon" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-checkbox@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-checkbox/-/mwc-checkbox-0.20.0.tgz#fff9d41cd8a72b39a3c883d1b01230e1a3e462fd" - integrity sha512-e7qRFpoTZPeBTU05M/FvGnAalY9fJXtzTIfFXWevpm5xm21zr+5lw4QqJOzN8l8Sj8CwciTZ86GMfKGViBbyuw== +"@material/mwc-checkbox@0.22.0-canary.cc04657a.0", "@material/mwc-checkbox@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-checkbox/-/mwc-checkbox-0.22.0-canary.cc04657a.0.tgz#ebfd10c06120de3fbdcf05751757ca621ce9035c" + integrity sha512-m/BSKMecOmZ8xG2g7P0bHZ5mlMBNkXxcmw68FOv3qZZufEkLMEic07zxbHNePcmDhjildwMWzTLfWHgCdTQ0hQ== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-circular-progress@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-circular-progress/-/mwc-circular-progress-0.20.0.tgz#db27d4862be4afa3b68f4d9bd06533171869ce37" - integrity sha512-6GyI97rZOGajjFB9L8R+44myv3YMo3zEHrlco5j1WnMPIPNHUcYww8EJgtkcl1E/q04Xpwvt6fFPv9X4vmLBnQ== +"@material/mwc-circular-progress@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-circular-progress/-/mwc-circular-progress-0.22.0-canary.cc04657a.0.tgz#d5873e347979b2279f66826cca167ed3ac147f96" + integrity sha512-hBD2EZhiolkD3m7xaSK7ml+qomX+FCg78RbV1BArrEnLk21ui46NsmtvBBJ1UiZUGs1FvRUcVNyMjSRTByxeDA== dependencies: - "@material/circular-progress" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/theme" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/circular-progress" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/theme" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-dialog@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-dialog/-/mwc-dialog-0.20.0.tgz#3169f71a049c61cfd53d16b761b8313645bdba01" - integrity sha512-7VG8M0p2xaqs+gFDQLNQiVSKJNe+j8jemYX94wxRMZaMRryX09uPrOkn1CGUAuAy0fivxVLhlFG6KINbGR/Avg== +"@material/mwc-dialog@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-dialog/-/mwc-dialog-0.22.0-canary.cc04657a.0.tgz#d817a733149893cb4c0d1d1ea563e7c65d360af1" + integrity sha512-qcMVcrJxEzgswiP34WPPtR484d2G7YfViVxVUrmAupsIlKqCLn7jYf6OlE/NmX0d65XIdo+WQEt1Qprui6wQiA== dependencies: - "@material/dialog" "=9.0.0-canary.1c156d69d.0" - "@material/dom" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/mwc-button" "^0.20.0" + "@material/dialog" "=12.0.0-canary.1a8d06483.0" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-button" "0.22.0-canary.cc04657a.0" blocking-elements "^0.1.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" wicg-inert "^3.0.0" -"@material/mwc-fab@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-fab/-/mwc-fab-0.20.0.tgz#bcd77bd9a6e06855b174944f0267e2b5512fab45" - integrity sha512-lxPlber5SxRAzH063IFTQhUj7YRuoi5juvYsSWHDLZUqj7wBTV+m6wX9a14wltcCumMNL80k2lXs9FLUOnZz9Q== +"@material/mwc-fab@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-fab/-/mwc-fab-0.22.0-canary.cc04657a.0.tgz#a3307c19a5c432c20da1029451a4dc97a219aa46" + integrity sha512-VR1xGp+VaIcysklG6jXP2rky3iTTbI06AvWa3KYevlpwm/sfnY5N4onUpeckAzIVvKUKM9JO/Yx+snJCUCAY5w== dependencies: - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-formfield@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-formfield/-/mwc-formfield-0.20.0.tgz#dd3e25778aad624a0d13f5b8a33c95bf1aa3883f" - integrity sha512-Rrk2ah5gNHD4O/yYWdwHvH3kGddaZXbdiZPCTpYDlTHG63CMUsAENJy8Fu8ZCC23nxbWfBeejtbB/Da+0VZWig== +"@material/mwc-formfield@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-formfield/-/mwc-formfield-0.22.0-canary.cc04657a.0.tgz#3e5803793e19c047ac0ec71061069c1f4b593dd0" + integrity sha512-eVajWwlwSC0ySDYU3btu41agtDQlotuaa6LYR0ZamNa1CMcu8QFq3ZyLaQqqS66/FsJJ4W+72+MpkUnAthj55A== dependencies: - "@material/form-field" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/form-field" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-icon-button@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-icon-button/-/mwc-icon-button-0.20.0.tgz#1a2d22f5d351b6a61f0dd41cb516a6fe21b6bcc5" - integrity sha512-Bwm399++ZAo4HKmvLwRqSQ8Prhq6fxKwBcNFcqRIYMwwOf/iuuq4/hSX8+Wm8XtdX+mxSQfS7GePqn8XOTTKvw== +"@material/mwc-icon-button@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-icon-button/-/mwc-icon-button-0.22.0-canary.cc04657a.0.tgz#79171babfbfde7fd98e2d9fbe66af40fdeeadf80" + integrity sha512-GzWXtjTterfWKAjs+qRyPP0RIWHt34FJkMoMjD0YuoVzbKeTFURwo9QBduVUU36ERe73sssnxtBk+5pQ7GWGjA== dependencies: - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-icon@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-icon/-/mwc-icon-0.20.0.tgz#c2c42bca9145d4a75f63b4ce1567270b41986b47" - integrity sha512-YCtzWbJVSZGcvWKVHwIhwfGMLEqAmRSVGcXTCAH/rOzGU7RkOxQkfNDkLAuTRAX9a7HYQStIJ39ENVcysElljg== +"@material/mwc-icon@0.22.0-canary.cc04657a.0": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-icon/-/mwc-icon-0.22.0-canary.cc04657a.0.tgz#d2a9a597a7e1cb894cf85af44298aa44507649e2" + integrity sha512-ArXclZOwcf4UfI2OSQjFNjzp59uRFLD6KDYJuGqrvPneeh4ekS6GVwOrJkI1CVe2ddv9MKWeTdXR6WY2TYk+Uw== dependencies: - lit-element "^2.3.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-list@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-list/-/mwc-list-0.20.0.tgz#44b0bcd3653b46c7493614741fc7a11cee8abca4" - integrity sha512-RLHn4k6oH2jsSorALbQJ3Ak0BwTyaTeKpXgjI65dHuMRhQaQUaMapJzfh5ghKPhjg1R5D+2r5wktjciFoZ9KVw== +"@material/mwc-list@0.22.0-canary.cc04657a.0", "@material/mwc-list@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-list/-/mwc-list-0.22.0-canary.cc04657a.0.tgz#490ac8b1aebf57f937122bd9e55bc406c4ef793f" + integrity sha512-yA0b38mTEh75+W3LxeSJe97/Yu9bZAXX9783v8lhbwlAbp/IZPcLr0FkSfUt4BM4TIuEU9Sb6E8L8YpCqM6NSA== dependencies: - "@material/base" "=9.0.0-canary.1c156d69d.0" - "@material/dom" "=9.0.0-canary.1c156d69d.0" - "@material/list" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/mwc-checkbox" "^0.20.0" - "@material/mwc-radio" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/base" "=12.0.0-canary.1a8d06483.0" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + "@material/list" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-checkbox" "0.22.0-canary.cc04657a.0" + "@material/mwc-radio" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-menu@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-menu/-/mwc-menu-0.20.0.tgz#672d6a4b40975b8101029be3b526aa014a252957" - integrity sha512-slSY3LORaP8MniXoNvvulvptQ3Ohjit13xiFWVWRr63H3YxnNdBqWW6BICASNJWNV/5y8UM1CE2Xw99UEnG9JQ== +"@material/mwc-menu@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-menu/-/mwc-menu-0.22.0-canary.cc04657a.0.tgz#61aa5d70af6509958aff9b583c5d86a048d23af2" + integrity sha512-unXilkODM05Q4Dhmw54OItlRO1A+k8STuWnDSpM7nti1r5uh25BfJ64qs70OBMn4FM9fZGbOAvX1GfW5o/nYrA== dependencies: - "@material/menu" "=9.0.0-canary.1c156d69d.0" - "@material/menu-surface" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/mwc-list" "^0.20.0" - "@material/shape" "=9.0.0-canary.1c156d69d.0" - "@material/theme" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/menu" "=12.0.0-canary.1a8d06483.0" + "@material/menu-surface" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-list" "0.22.0-canary.cc04657a.0" + "@material/shape" "=12.0.0-canary.1a8d06483.0" + "@material/theme" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-radio@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-radio/-/mwc-radio-0.20.0.tgz#bf282fe5bd3f0f8e6c3eeb0b781eea6bc06f1743" - integrity sha512-aVsok8EZJQFHn5VW9iP4gxO1wY5XeNnANdP82GhHZfIcxp1AQDORuUSy6Qoj2YBmCFCnG4BGAac1zs4OXRPRqA== +"@material/mwc-radio@0.22.0-canary.cc04657a.0", "@material/mwc-radio@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-radio/-/mwc-radio-0.22.0-canary.cc04657a.0.tgz#3cf7ea09b4c6bfb8cb654c39c1fadd288235ca91" + integrity sha512-NDCBflXsqbL8vZKce1BPlDJgjcC/XD+ZlmtSY2liZgvZ6fPUGxtii/YGQRrrmZvIKDc+JJG0rhzZOty5XHQy+A== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - "@material/radio" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + "@material/radio" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-ripple@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-ripple/-/mwc-ripple-0.20.0.tgz#ac83eda314b712c2fba293d2732f550dd1c6023b" - integrity sha512-4rlIu+Kk//NsW/u3CnU1kz3dsvwEozax0Zf2CUp+ao0ozclHfQ2+sTZVY0Mr8+GJLn7Oz51gT5OHoarZuWWljA== +"@material/mwc-ripple@0.22.0-canary.cc04657a.0", "@material/mwc-ripple@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-ripple/-/mwc-ripple-0.22.0-canary.cc04657a.0.tgz#bd22e2babe11aeffe7a611eadf7d354597c18eae" + integrity sha512-mjXSH7OA7iBe6e6ssenInTav9gTGx0lK0hrJfi92ku3YYoSgw8ULK8TiL/7YmGGH7UN67Emv4fdGPhwfiMfYbg== dependencies: - "@material/dom" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/ripple" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/ripple" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-switch@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-switch/-/mwc-switch-0.20.0.tgz#e4b3c3f512e7c2c497f07828795aa543320e81f9" - integrity sha512-1++EESLaVGdRQTpm0t5Z5Il/3IZTSaMzBYb/21AVM2SkNqWG5/2ycd+cj4BhfViIBjPXi0Ajcz4nhxHE/6SRjw== +"@material/mwc-switch@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-switch/-/mwc-switch-0.22.0-canary.cc04657a.0.tgz#44ccbb37946ec2884692b6fff8ef3beab854d07a" + integrity sha512-dP4dqqIYULckm7UDynVS5E62nZt28Ae622AGneiHtRc1ob9IVtGRkpTVNoz5QyKvrLyF4XKAsKoOwAm6x66nkg== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - "@material/switch" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + "@material/switch" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-tab-bar@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-tab-bar/-/mwc-tab-bar-0.20.0.tgz#02cecdc1bdf20feeb85085c8138d0f6d933411b2" - integrity sha512-7iGFzVsS33m5uZXxeXMK1ag3u1drRbBcfkXbP8mp0rpIrhZNpCAOZkTpyXtZGx7WAijaCXPdKOo3MkHutqn6Rg== +"@material/mwc-tab-bar@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-tab-bar/-/mwc-tab-bar-0.22.0-canary.cc04657a.0.tgz#5590d3a3e820b4a7a4dc134d44790735cd375884" + integrity sha512-p0T+65FmD2EdMN4L0MStjd1jXSLjq5/w0wQ08WiO2Q7EWgh2iuABxwLLzhL4hMLWKzDXqmzy1rKI2QyiTRIW8A== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-tab" "^0.20.0" - "@material/mwc-tab-scroller" "^0.20.0" - "@material/tab" "=9.0.0-canary.1c156d69d.0" - "@material/tab-bar" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-tab" "0.22.0-canary.cc04657a.0" + "@material/mwc-tab-scroller" "0.22.0-canary.cc04657a.0" + "@material/tab" "=12.0.0-canary.1a8d06483.0" + "@material/tab-bar" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-tab-indicator@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-tab-indicator/-/mwc-tab-indicator-0.20.0.tgz#a25e981517d46689aae5214798cbc083780569e3" - integrity sha512-Y98B1MKeBX2zHwQ4yqpQKULvrm2GaLmw6yUqxiwUoE8CJQv/8wOTJHjtvYXgazYs/VZ2bOD1NoOhtntZwMpn/w== +"@material/mwc-tab-indicator@0.22.0-canary.cc04657a.0": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-tab-indicator/-/mwc-tab-indicator-0.22.0-canary.cc04657a.0.tgz#9a3228248f27ba71f6007a4b9a109c3302cd2017" + integrity sha512-HEFb1H9CsxGhWM57Z6MJaAaMLgKdorl8Dvjfj/hDRPaqiQAncKU2SSzRPqGSgnwqIqPQZVZrHte8+0vpnQgv5w== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/tab-indicator" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/tab-indicator" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-tab-scroller@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-tab-scroller/-/mwc-tab-scroller-0.20.0.tgz#5f4ed139a322eef1047a03c3f79aa5df78f7b04e" - integrity sha512-Q6Gh+xdiTuXtOBJEUz6YBEHakDAdrsiqGJV1x90Oj5PtbSvkEU8dc/QiJBFsCesxK3vssWKLGqeo1GvQSJW0LQ== +"@material/mwc-tab-scroller@0.22.0-canary.cc04657a.0": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-tab-scroller/-/mwc-tab-scroller-0.22.0-canary.cc04657a.0.tgz#2b2d80ef5d66872888259341f9bd76ca341b9725" + integrity sha512-LOBQdbr+7Ooi4cDGIq9SwmL/ynQ08Xrvp7F81uWvHLMKi5lOz30Jp6nBlBO/+cE3GkLXGfRhwRJTBBEaoQhy1g== dependencies: - "@material/dom" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/tab-scroller" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/tab-scroller" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-tab@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-tab/-/mwc-tab-0.20.0.tgz#a3445601dab27880e568dc5706738a6517082838" - integrity sha512-zGHnns1Gj91sucs9GLyN9kSqstWmaKpqeQCAcu98B7D6rI4dZKYgudrwnUUZiu1xqrsWhZy2rSbe8tu075ENVQ== +"@material/mwc-tab@0.22.0-canary.cc04657a.0", "@material/mwc-tab@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-tab/-/mwc-tab-0.22.0-canary.cc04657a.0.tgz#8d4491f55758f5ac4cbabc18c3f4f0de26fd687b" + integrity sha512-G3i5bCIqoz1yivFNdNcQMvbGX4B2X99Ayt+VbOpr0Mo3xGDqxZ1FXIEK6bLBcfLPO92kgaWlSyzMFkVS4Z/xxw== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - "@material/mwc-tab-indicator" "^0.20.0" - "@material/tab" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + "@material/mwc-tab-indicator" "0.22.0-canary.cc04657a.0" + "@material/tab" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/progress-indicator@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/progress-indicator/-/progress-indicator-9.0.0-canary.1c156d69d.0.tgz#2a43d2c1442909874c5990b7ae893aced071a83d" - integrity sha512-56lYRqnUcI4L9a/LgfmzDTCKxxW1oOFqIVn3pMCP8hVGslhXY+yGl24qIp13MDW6FBgzx5rf66zB1rQltcSp/g== +"@material/progress-indicator@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/progress-indicator/-/progress-indicator-12.0.0-canary.1a8d06483.0.tgz#336bde0bfb38c40a1b3f3472fc15be2ee6a35afa" + integrity sha512-/X9x7lEh5iTBsc6JHwzx/jgVoHoAxZVq5Fh5zf0Y0QwOUSu6rxUVCQCRz1ylcsRvmKO5BnJpzeHkRGKZDKImMg== dependencies: - tslib "^1.9.3" + tslib "^2.1.0" -"@material/radio@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/radio/-/radio-9.0.0-canary.1c156d69d.0.tgz#f0db2c1da9106a7a3888ed382da31b16fe78d1fc" - integrity sha512-i2pDFRhvk8bWp8BBJ0dyuGCqP17FlKSHzGqYQNI80dRPVYyLiexqIRfn0KGcW/sJtVC/P4GlyhE98g4mNYA/iQ== +"@material/radio@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/radio/-/radio-12.0.0-canary.1a8d06483.0.tgz#9b2aab58db5ce6f95db385139ffff2295c70d37e" + integrity sha512-j7Af+eoO7HMlnSlnRf7D4LEBVc4s2HPcRxFNrZ87POPRYaKlFGa+1TTqn0E9m6dRMB3AA0FCfJk7dLZKE6wlJA== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/ripple@9.0.0-canary.1c156d69d.0", "@material/ripple@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-9.0.0-canary.1c156d69d.0.tgz#1cbfec1c94640140f6c1c0f43a3582a82dbc7671" - integrity sha512-F1e/LQmYHQFORM/C3hchmANnRwJCXlc7Cp7W+VGpvJdtdzYlTd8DKKcShuOozxUQOjutbNf+Ql8gpZIdYRQaoQ== +"@material/ripple@12.0.0-canary.1a8d06483.0", "@material/ripple@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-12.0.0-canary.1a8d06483.0.tgz#8d7f62f46b83e2533948f2b527266770dbd5f8ae" + integrity sha512-U2uIdgIGDfKueucPnxSmiGwiWYcrE97fOsykagxxiTH037VsSlfLB4gldIKB4vUftYgOlYY1j/2Zz4PWr1MfUg== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/rtl@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/rtl/-/rtl-9.0.0-canary.1c156d69d.0.tgz#0ff1f89f95ea4c67f030e56ce3ffdbfefcea225b" - integrity sha512-ICx0trLFna0M1Ina/1Nat9aSiB64o7VMs8wyCcidX//n7qFDOb0AtU9h2IB+lvX/UmPZVsDAoaL8iVm6RAqygg== +"@material/rtl@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/rtl/-/rtl-12.0.0-canary.1a8d06483.0.tgz#7c0a615ed2c4169b2f7bfa873b13e54ed80a1880" + integrity sha512-7GxyzdTs2aCc/fcN+J+EhlVVlFZHhVnCnYi9lQGY8ohaIB1OxMLIVCp399Gqu89/wLZC0xukwWCsiv5fhPOecA== dependencies: - "@material/theme" "9.0.0-canary.1c156d69d.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/shape@9.0.0-canary.1c156d69d.0", "@material/shape@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/shape/-/shape-9.0.0-canary.1c156d69d.0.tgz#6d42d7004ed09b4493abf3f732bb855d3c3996ed" - integrity sha512-3NPm+LNFfY4xsiwy/jo+kY3WIFDwlVyJhq+eimjZ9vpG7STBPyzi1LpiPKvsrk0rmvsy3M0c1alM8E+BQ5+UAg== +"@material/shape@12.0.0-canary.1a8d06483.0", "@material/shape@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/shape/-/shape-12.0.0-canary.1a8d06483.0.tgz#9b055b9ec771e5f315b0637606b81718e1f13d34" + integrity sha512-VT/DHUHOkaiZznZmKrjIuo0Rq7PyGaAzZyeN3bdJAHz3UXAYQdBUYUxu/PPwKzoIHHKKdfP7XuGpDEysGiNkDw== dependencies: - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/switch@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/switch/-/switch-9.0.0-canary.1c156d69d.0.tgz#e76b4ec213a7fc449a82534289f016ae60002465" - integrity sha512-jGMtsI+IdPORkiEKG56XdiN8/8G9JcIdDKExov3BwGn/d6fO+IXQnMbV6XY9aRq/+eI0eI2XXT+ggiyk1Jy0AQ== +"@material/switch@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/switch/-/switch-12.0.0-canary.1a8d06483.0.tgz#6ebd6ff0f5b4e4373da496b225eaacf423b983a6" + integrity sha512-pYCKMdu8L6zNePrAESkDUyCAjFMXrtk9WmkigzRkku9E0NEvm4ippajmpAX5zKUAS9OhllsZfVIP0TfyEYNGTA== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/tab-bar@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/tab-bar/-/tab-bar-9.0.0-canary.1c156d69d.0.tgz#d3dc2ea7317410c4fb054b32d88dbbbdf9c34bb3" - integrity sha512-wtpMK37gxkpbpdTpQh3IlHXx/maUyiYiwRjioIeh3GFQ42ZXW/N/9Ou2HK+qpiGVZDREYyT9TS2U5DiZTmM7tA== +"@material/tab-bar@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/tab-bar/-/tab-bar-12.0.0-canary.1a8d06483.0.tgz#fb7e3089feaa22de95b8f6c4e34bb6c9e336400d" + integrity sha512-cWhOfT12glndFH+B4V2XeYtBvFvXWmrRjH+lxdeZ+sC12qC6JjryF9wAq7wbciq4m83KaoMwaG1A+ixL6RbcQg== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/tab" "9.0.0-canary.1c156d69d.0" - "@material/tab-scroller" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/tab" "12.0.0-canary.1a8d06483.0" + "@material/tab-scroller" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/tab-indicator@9.0.0-canary.1c156d69d.0", "@material/tab-indicator@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/tab-indicator/-/tab-indicator-9.0.0-canary.1c156d69d.0.tgz#428b53a25cf09de65e1f602f3784b6202844ad48" - integrity sha512-PglSDSuQY6irrTNpEK/n/MDkZh6nH+iw0H31vt2A7QrG+BPwXrVJeRi6b8y2lvEnoQFp5WK8VavhFDNhcibEtw== +"@material/tab-indicator@12.0.0-canary.1a8d06483.0", "@material/tab-indicator@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/tab-indicator/-/tab-indicator-12.0.0-canary.1a8d06483.0.tgz#7765bf234f040b58a9022174c5f857657b1f4b9d" + integrity sha512-tGNP7DnPOiQ8R8Zc6E5DmRZONvhOZOyCo1vzt6uIA9noeFW0gDnNUyw1T7znA8FDJsNKu1R9HTcqym7WurcZFQ== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/tab-scroller@9.0.0-canary.1c156d69d.0", "@material/tab-scroller@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/tab-scroller/-/tab-scroller-9.0.0-canary.1c156d69d.0.tgz#f65267f3af811af3e7b1a7716a4b4a3cd64571ae" - integrity sha512-27h/vQv3+qh3YXPSTw/nakkWxgzDXMv3+ZBw+/XAwxu1siRb6EFBzsfLkQGpjVLm2DCPH3Dz4Xq8DOUkAyvd1A== +"@material/tab-scroller@12.0.0-canary.1a8d06483.0", "@material/tab-scroller@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/tab-scroller/-/tab-scroller-12.0.0-canary.1a8d06483.0.tgz#8fc58334342624b23a6094f9376312141742a750" + integrity sha512-tfvtGqFKe8vnd/6a41mxwR7Nl7b8QbcrJPDUmSVBDnZEg2VZ0+svs+w3OdECwen2ivnEvVIfFdESAzG4D8eI6g== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/tab" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/tab" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/tab@9.0.0-canary.1c156d69d.0", "@material/tab@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/tab/-/tab-9.0.0-canary.1c156d69d.0.tgz#eef68160458a4d55b28e96f14b0077a6dd69e88d" - integrity sha512-gS93t8Yl+djgWA8bFU80amzj2auGg/H3muVIJ1Mncak0CUtX3u6dYyvdKbeecRT9F1Wr4J3L8E0/aQatBOGa1w== +"@material/tab@12.0.0-canary.1a8d06483.0", "@material/tab@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/tab/-/tab-12.0.0-canary.1a8d06483.0.tgz#c901edf4fa9d1c0dd6f26a9c326af9fe13759534" + integrity sha512-HR6+Q4Gi9/Wz/A1D6CAIR+6fRDXDvp3JOTsjRBoXonsGKHQmuB+jI3DaTEQ7gDsWa2k4OAC5/wBn+omEDFMQNQ== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/tab-indicator" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/tab-indicator" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/theme@9.0.0-canary.1c156d69d.0", "@material/theme@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/theme/-/theme-9.0.0-canary.1c156d69d.0.tgz#2d733dea8f762cc8e35969915dfb3b7359147d1e" - integrity sha512-r1610TPwUplt4FHMk7cR06Oz1jU/G31wBIh4Frs/YIB0ZonVlI5cZdIkG0IFtNt9ZYWoDwfP/1nQBxdqrDPPhg== +"@material/theme@12.0.0-canary.1a8d06483.0", "@material/theme@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/theme/-/theme-12.0.0-canary.1a8d06483.0.tgz#0cb281b26a1147ef0322d21ce750f4a0f792d880" + integrity sha512-Llc8UnCcE3UbCrJyNLTVXradY9zoddJgH1cB3bzx/j7gIeoJnqXqZB43Zg+ZMXVzoOyGTbYrqpi5Kl1VzOxJSQ== dependencies: - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/top-app-bar@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/top-app-bar/-/top-app-bar-9.0.0-canary.1c156d69d.0.tgz#6b5c76a9cfd2abae35f45b74eb17c917db74d70d" - integrity sha512-VJLGCF+1vsLY/YFPVgcFCIEG/EjuY7eg7ulBwhwbERIl3pyyY3NAvISGzaeUBKg6JOcw0YqcPKcRnv+Js3KchQ== +"@material/top-app-bar@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/top-app-bar/-/top-app-bar-12.0.0-canary.1a8d06483.0.tgz#7164e244ee41b804660847f1387230b158cd46e1" + integrity sha512-+vDujMPtrCSKMs+6q3TxnpG0sAm/snAL14zrReTLTVwr0QEPh5V/gJ51vRZ/Fubr0ssDxc+g3Jw6MtGkN9hrng== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/touch-target@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/touch-target/-/touch-target-9.0.0-canary.1c156d69d.0.tgz#e2839c73f6df724804c376624af776f32be2c81a" - integrity sha512-AFymS9cb152a2hEwTc80dVKA0ccNCyMAQNpvB6fEopPMLjO4Hrsu4fIHVyZF5xnz3k/iG59Y6vreHQdHKFGyUw== +"@material/touch-target@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/touch-target/-/touch-target-12.0.0-canary.1a8d06483.0.tgz#18ae321c2c6a14bc3bf7c7966f2413a942ef28cb" + integrity sha512-JiEIJVzTEwKxh87/noFXsOmF2uWUPinJc0Hhf/BIZrxQk0Gi0MJWwZ5p4gcfv3Z8sC+DjZXd7BImdDhBV2oZJw== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/typography@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/typography/-/typography-9.0.0-canary.1c156d69d.0.tgz#340328147eaa86efacfad601b6dbdff7ac0388ac" - integrity sha512-+JgMe2fIP+lVh4l5qXfjH9/JWd+LnfDEiVr2clWHgAc3pc2LQm6VVgUbNkrX3yeWql0x7I/inGfQovza8BeYAw== +"@material/typography@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/typography/-/typography-12.0.0-canary.1a8d06483.0.tgz#df337ca915f505ba6607fb239387b5358a933625" + integrity sha512-RGxiA4FEvdO3PQ8xmSaKGvOHmm7WNCjl9rizHembV6tS2rc3CvMiHpQgIyHMGv7WXBcu7Aa9V48S2vXJa0fkmg== dependencies: - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" "@mdi/js@5.9.55": version "5.9.55" @@ -2880,6 +2921,11 @@ resolved "https://registry.yarnpkg.com/@types/sortablejs/-/sortablejs-1.10.6.tgz#98725ae08f1dfe28b8da0fdf302c417f5ff043c0" integrity sha512-QRz8Z+uw2Y4Gwrtxw8hD782zzuxxugdcq8X/FkPsXUa1kfslhGzy13+4HugO9FXNo+jlWVcE6DYmmegniIQ30A== +"@types/trusted-types@^1.0.1": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-1.0.6.tgz#569b8a08121d3203398290d602d84d73c8dcf5da" + integrity sha512-230RC8sFeHoT6sSUlRO6a8cAnclO06eeiq1QDfiv2FGCLWFvvERWgwIQD4FWqD9A69BN7Lzee4OXwoMVnnsWDw== + "@types/webspeechapi@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/webspeechapi/-/webspeechapi-0.0.29.tgz#8f3c6b31b779df7a9bbac7f89acfce0c3bcb1972" @@ -8660,28 +8706,29 @@ lit-analyzer@1.2.1, lit-analyzer@^1.2.1: vscode-html-languageservice "3.1.0" web-component-analyzer "~1.1.1" -lit-element@2.5.1, lit-element@^2.0.0, lit-element@^2.2.1, lit-element@^2.3.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-2.5.1.tgz#3fa74b121a6cd22902409ae3859b7847d01aa6b6" - integrity sha512-ogu7PiJTA33bEK0xGu1dmaX5vhcRjBXCFexPja0e7P7jqLhTpNKYRPmE+GmiCaRVAbiQKGkUgkh/i6+bh++dPQ== +lit-element@3.0.0-rc.2, lit-element@^2.2.1, lit-element@^2.5.0, lit-element@^3.0.0-rc.2: + version "3.0.0-rc.2" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.0.0-rc.2.tgz#883d0b6fd7b846226d360699d1b713da5fc7e1b7" + integrity sha512-2Z7DabJ3b5K+p5073vFjMODoaWqy5PIaI4y6ADKm+fCGc8OnX9fU9dMoUEBZjFpd/bEFR9PBp050tUtBnT9XTQ== dependencies: - lit-html "^1.1.1" + "@lit/reactive-element" "^1.0.0-rc.2" + lit-html "^2.0.0-rc.3" -lit-html@1.4.1, lit-html@^1.0.0, lit-html@^1.1.1, lit-html@^1.1.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-1.4.1.tgz#0c6f3ee4ad4eb610a49831787f0478ad8e9ae5e0" - integrity sha512-B9btcSgPYb1q4oSOb/PrOT6Z/H+r6xuNzfH4lFli/AWhYwdtrgQkQWBbIc6mdnf6E2IL3gDXdkkqNktpU0OZQA== - -lit-virtualizer@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/lit-virtualizer/-/lit-virtualizer-0.4.2.tgz#8c66e26c0e50cd8e3fc7f2dfeab932967b40050a" - integrity sha512-aytx/Qym8h7eIh3u17oT2FfgmhOixnk4IuJAOMIbA6E8szkbpnKUDSLDWlN9ihQyCb0eijV213P+4mlekOWKxA== +lit-html@2.0.0-rc.3, lit-html@^1.4.0, lit-html@^2.0.0-rc.3: + version "2.0.0-rc.3" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.0.0-rc.3.tgz#1c216e548630e18d3093d97f4e29563abce659af" + integrity sha512-Y6P8LlAyQuqvzq6l/Nc4z5/P5M/rVLYKQIRxcNwSuGajK0g4kbcBFQqZmgvqKG+ak+dHZjfm2HUw9TF5N/pkCw== dependencies: - event-target-shim "^5.0.1" - lit-element "^2.0.0" - lit-html "^1.0.0" - resize-observer-polyfill "^1.5.1" - tslib "^1.10.0" + "@types/trusted-types" "^1.0.1" + +lit@^2.0.0-rc.1, lit@^2.0.0-rc.2: + version "2.0.0-rc.2" + resolved "https://registry.yarnpkg.com/lit/-/lit-2.0.0-rc.2.tgz#724a2d621aa098001d73bf7106f3a72b7b5948ef" + integrity sha512-BOCuoJR04WaTV8UqTKk09cNcQA10Aq2LCcBOiHuF7TzWH5RNDsbCBP5QM9sLBSotGTXbDug/gFO08jq6TbyEtw== + dependencies: + "@lit/reactive-element" "^1.0.0-rc.2" + lit-element "^3.0.0-rc.2" + lit-html "^2.0.0-rc.3" load-bmfont@^1.3.1: version "1.4.0" @@ -12503,7 +12550,7 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==