Skip to content

Commit

Permalink
Polyfill ElementInternals for material-web components. Fix #18600 (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven authored Nov 16, 2023
1 parent fb95de1 commit 36bca04
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"date-fns-tz": "2.0.0",
"deep-clone-simple": "1.1.1",
"deep-freeze": "0.0.1",
"element-internals-polyfill": "1.3.9",
"fuse.js": "7.0.0",
"google-timezones-json": "1.2.0",
"hls.js": "1.4.12",
Expand Down
1 change: 1 addition & 0 deletions src/components/chips/ha-assist-chip.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "element-internals-polyfill";
import { MdAssistChip } from "@material/web/chips/assist-chip";
import { css, html } from "lit";
import { customElement, property } from "lit/decorators";
Expand Down
1 change: 1 addition & 0 deletions src/components/chips/ha-chip-set.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "element-internals-polyfill";
import { MdChipSet } from "@material/web/chips/chip-set";
import { customElement } from "lit/decorators";

Expand Down
1 change: 1 addition & 0 deletions src/components/chips/ha-filter-chip.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "element-internals-polyfill";
import { MdFilterChip } from "@material/web/chips/filter-chip";
import { css, html } from "lit";
import { customElement, property } from "lit/decorators";
Expand Down
1 change: 1 addition & 0 deletions src/components/chips/ha-input-chip.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "element-internals-polyfill";
import { MdInputChip } from "@material/web/chips/input-chip";
import { css } from "lit";
import { customElement } from "lit/decorators";
Expand Down
1 change: 1 addition & 0 deletions src/components/ha-outlined-button.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { css } from "lit";
import { customElement } from "lit/decorators";
import "element-internals-polyfill";
import { MdOutlinedButton } from "@material/web/button/outlined-button";

@customElement("ha-outlined-button")
Expand Down
1 change: 1 addition & 0 deletions src/components/ha-outlined-icon-button.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { css } from "lit";
import { customElement } from "lit/decorators";
import "element-internals-polyfill";
import { MdOutlinedIconButton } from "@material/web/iconbutton/outlined-icon-button";

@customElement("ha-outlined-icon-button")
Expand Down
1 change: 1 addition & 0 deletions src/components/ha-slider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { customElement } from "lit/decorators";
import "element-internals-polyfill";
import { MdSlider } from "@material/web/slider/slider";
import { CSSResult, css } from "lit";

Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7633,6 +7633,13 @@ __metadata:
languageName: node
linkType: hard

"element-internals-polyfill@npm:1.3.9":
version: 1.3.9
resolution: "element-internals-polyfill@npm:1.3.9"
checksum: bd9b63e68ca3462ed7623758398d5b8016736438b02be4527e456711bb91afe93af60028ddb928e12f0f1975c958c7b439d4b31a1ec41f4737969cd0202bcced
languageName: node
linkType: hard

"emoji-regex@npm:^10.2.1":
version: 10.3.0
resolution: "emoji-regex@npm:10.3.0"
Expand Down Expand Up @@ -9732,6 +9739,7 @@ __metadata:
deep-clone-simple: "npm:1.1.1"
deep-freeze: "npm:0.0.1"
del: "npm:7.1.0"
element-internals-polyfill: "npm:1.3.9"
eslint: "npm:8.53.0"
eslint-config-airbnb-base: "npm:15.0.0"
eslint-config-airbnb-typescript: "npm:17.1.0"
Expand Down

0 comments on commit 36bca04

Please sign in to comment.