@redvars/peacock 3.6.2 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/ButtonConstants-D06bY4uy.js +114 -0
  2. package/dist/ButtonConstants-D06bY4uy.js.map +1 -0
  3. package/dist/{BaseHyperlinkMixin-BNuwbiEf.js → NativeHyperlinkMixin-DrYXyfMQ.js} +8 -10
  4. package/dist/NativeHyperlinkMixin-DrYXyfMQ.js.map +1 -0
  5. package/dist/assets/components.css +1 -1
  6. package/dist/assets/components.css.map +1 -1
  7. package/dist/assets/styles.css +1 -1
  8. package/dist/assets/styles.css.map +1 -1
  9. package/dist/button-colors-Dwnez1tR.js +586 -0
  10. package/dist/button-colors-Dwnez1tR.js.map +1 -0
  11. package/dist/button-group.js +8 -8
  12. package/dist/button-group.js.map +1 -1
  13. package/dist/button.js +236 -133
  14. package/dist/button.js.map +1 -1
  15. package/dist/calendar-column-view.js +0 -1
  16. package/dist/calendar-column-view.js.map +1 -1
  17. package/dist/calendar-month-view.js +0 -1
  18. package/dist/calendar-month-view.js.map +1 -1
  19. package/dist/canvas.js +126 -107
  20. package/dist/canvas.js.map +1 -1
  21. package/dist/card-content.js +0 -1
  22. package/dist/card-content.js.map +1 -1
  23. package/dist/card.js +96 -90
  24. package/dist/card.js.map +1 -1
  25. package/dist/cb-compound-expression.js +4 -1
  26. package/dist/cb-compound-expression.js.map +1 -1
  27. package/dist/cb-divider.js +0 -1
  28. package/dist/cb-divider.js.map +1 -1
  29. package/dist/cb-expression.js +0 -2
  30. package/dist/cb-expression.js.map +1 -1
  31. package/dist/cb-predicate.js +0 -1
  32. package/dist/cb-predicate.js.map +1 -1
  33. package/dist/code-highlighter.js +23 -6
  34. package/dist/code-highlighter.js.map +1 -1
  35. package/dist/custom-elements-jsdocs.json +5079 -17882
  36. package/dist/custom-elements.json +19272 -19314
  37. package/dist/fab.js +181 -117
  38. package/dist/fab.js.map +1 -1
  39. package/dist/flow-designer.js +4 -4
  40. package/dist/icon-button-DJ0kZXYr.js +318 -0
  41. package/dist/icon-button-DJ0kZXYr.js.map +1 -0
  42. package/dist/index.js +7 -7
  43. package/dist/{navigation-rail-CD7IrqbN.js → navigation-rail-CM_svs5_.js} +1311 -730
  44. package/dist/navigation-rail-CM_svs5_.js.map +1 -0
  45. package/dist/observe-slot-change-D8Xg-kSS.js +60 -0
  46. package/dist/observe-slot-change-D8Xg-kSS.js.map +1 -0
  47. package/dist/peacock-loader.js +10 -7
  48. package/dist/peacock-loader.js.map +1 -1
  49. package/dist/popover-content.js +0 -1
  50. package/dist/popover-content.js.map +1 -1
  51. package/dist/search.js +15 -15
  52. package/dist/search.js.map +1 -1
  53. package/dist/src/__controllers/attachable-controller.d.ts +109 -0
  54. package/dist/src/__mixins/{BaseButtonMixin.d.ts → NativeButtonMixin.d.ts} +3 -3
  55. package/dist/src/__mixins/{BaseHyperlinkMixin.d.ts → NativeHyperlinkMixin.d.ts} +3 -4
  56. package/dist/src/__utils/is-link.d.ts +1 -0
  57. package/dist/src/__utils/observe-slot-change.d.ts +1 -1
  58. package/dist/src/accordion/accordion-item.d.ts +0 -1
  59. package/dist/src/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +0 -1
  60. package/dist/src/button/ButtonConstants.d.ts +1 -0
  61. package/dist/src/button/GroupButtonInterface.d.ts +4 -0
  62. package/dist/src/button/button/button.d.ts +32 -7
  63. package/dist/src/button/button-group/button-group.d.ts +2 -1
  64. package/dist/src/button/icon-button/icon-button.d.ts +26 -5
  65. package/dist/src/button/index.d.ts +1 -1
  66. package/dist/src/calendar/calendar-column-view.d.ts +0 -1
  67. package/dist/src/calendar/calendar-month-view.d.ts +0 -1
  68. package/dist/src/canvas/canvas.d.ts +3 -3
  69. package/dist/src/card/card-content.d.ts +0 -1
  70. package/dist/src/card/card.d.ts +9 -6
  71. package/dist/src/chip/chip/chip.d.ts +22 -3
  72. package/dist/src/condition-builder/cb-compound-expression.d.ts +0 -1
  73. package/dist/src/condition-builder/cb-divider.d.ts +0 -1
  74. package/dist/src/condition-builder/cb-expression.d.ts +0 -1
  75. package/dist/src/condition-builder/cb-predicate.d.ts +0 -1
  76. package/dist/src/fab/fab.d.ts +20 -6
  77. package/dist/src/field/field.d.ts +1 -0
  78. package/dist/src/focus-ring/focus-ring.d.ts +26 -20
  79. package/dist/src/image/image.d.ts +2 -2
  80. package/dist/src/index.d.ts +1 -0
  81. package/dist/src/input/input.d.ts +1 -3
  82. package/dist/src/item/index.d.ts +1 -0
  83. package/dist/src/item/item.d.ts +49 -0
  84. package/dist/src/link/link.d.ts +1 -1
  85. package/dist/src/list/list-item.d.ts +1 -2
  86. package/dist/src/menu/menu-item/menu-item.d.ts +9 -11
  87. package/dist/src/menu/sub-menu/sub-menu.d.ts +1 -1
  88. package/dist/src/navigation-rail/navigation-rail-item.d.ts +0 -2
  89. package/dist/src/navigation-rail/navigation-rail.d.ts +2 -6
  90. package/dist/src/popover/popover-content.d.ts +0 -1
  91. package/dist/src/ripple/ripple.d.ts +9 -1
  92. package/dist/src/search/search.d.ts +2 -6
  93. package/dist/src/segmented-button/segmented-button.d.ts +0 -1
  94. package/dist/src/select/option.d.ts +0 -1
  95. package/dist/src/sidebar-menu/sidebar-menu-item.d.ts +0 -1
  96. package/dist/src/sidebar-menu/sidebar-sub-menu.d.ts +0 -1
  97. package/dist/src/tabs/tab-panel.d.ts +0 -1
  98. package/dist/src/tabs/tab.d.ts +4 -6
  99. package/dist/test/item.test.d.ts +1 -0
  100. package/dist/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +4 -2
  102. package/readme.md +2 -2
  103. package/scss/components.scss +0 -1
  104. package/scss/mixin.scss +33 -13
  105. package/scss/styles.scss +1 -3
  106. package/src/__controllers/attachable-controller.ts +198 -0
  107. package/src/__mixins/NativeButtonMixin.ts +87 -0
  108. package/src/__mixins/{BaseHyperlinkMixin.ts → NativeHyperlinkMixin.ts} +15 -15
  109. package/src/__utils/is-link.ts +3 -0
  110. package/src/__utils/observe-slot-change.ts +46 -14
  111. package/src/accordion/accordion-item.scss +1 -1
  112. package/src/accordion/accordion-item.ts +0 -1
  113. package/src/breadcrumb/breadcrumb-item/breadcrumb-item.ts +0 -1
  114. package/src/button/ButtonConstants.ts +1 -0
  115. package/src/button/GroupButtonInterface.ts +4 -0
  116. package/src/button/button/button-colors.scss +2 -2
  117. package/src/button/button/button-layers.scss +124 -0
  118. package/src/button/button/button-sizes.scss +31 -53
  119. package/src/button/button/button.scss +139 -262
  120. package/src/button/button/button.ts +260 -106
  121. package/src/button/button/only-button.scss +13 -0
  122. package/src/button/button-group/button-group.ts +59 -17
  123. package/src/button/icon-button/icon-button-sizes.scss +12 -27
  124. package/src/button/icon-button/icon-button.ts +191 -83
  125. package/src/button/index.ts +1 -1
  126. package/src/calendar/calendar-column-view.ts +0 -1
  127. package/src/calendar/calendar-month-view.ts +0 -1
  128. package/src/canvas/canvas.scss +18 -6
  129. package/src/canvas/canvas.ts +125 -103
  130. package/src/card/card-content.ts +2 -3
  131. package/src/card/card.scss +87 -95
  132. package/src/card/card.ts +62 -60
  133. package/src/chip/chip/chip.scss +66 -71
  134. package/src/chip/chip/chip.ts +155 -56
  135. package/src/code-highlighter/code-highlighter.scss +1 -1
  136. package/src/code-highlighter/code-highlighter.ts +20 -5
  137. package/src/condition-builder/cb-compound-expression.scss +4 -0
  138. package/src/condition-builder/cb-compound-expression.ts +0 -1
  139. package/src/condition-builder/cb-divider.ts +0 -1
  140. package/src/condition-builder/cb-expression.scss +0 -1
  141. package/src/condition-builder/cb-expression.ts +0 -1
  142. package/src/condition-builder/cb-predicate.ts +0 -1
  143. package/src/elevation/elevation.scss +5 -1
  144. package/src/empty-state/empty-state.scss +1 -0
  145. package/src/fab/fab-colors.scss +2 -2
  146. package/src/fab/fab-sizes.scss +24 -34
  147. package/src/fab/fab.scss +77 -71
  148. package/src/fab/fab.ts +141 -65
  149. package/src/field/field.ts +6 -0
  150. package/src/focus-ring/focus-ring.ts +81 -72
  151. package/src/image/image.scss +21 -16
  152. package/src/image/image.ts +13 -14
  153. package/src/index.ts +1 -0
  154. package/src/input/input.ts +16 -25
  155. package/src/item/index.ts +1 -0
  156. package/src/item/item.scss +195 -0
  157. package/src/item/item.ts +362 -0
  158. package/src/link/link.scss +1 -10
  159. package/src/link/link.ts +4 -2
  160. package/src/list/list-item.ts +8 -8
  161. package/src/menu/menu/menu.ts +5 -9
  162. package/src/menu/menu-item/menu-item.scss +30 -108
  163. package/src/menu/menu-item/menu-item.ts +102 -133
  164. package/src/menu/sub-menu/sub-menu.ts +6 -3
  165. package/src/navigation-rail/navigation-rail-item.scss +5 -0
  166. package/src/navigation-rail/navigation-rail-item.ts +10 -15
  167. package/src/navigation-rail/navigation-rail.ts +2 -6
  168. package/src/peacock-loader.ts +5 -1
  169. package/src/popover/popover-content.ts +0 -1
  170. package/src/ripple/ripple.ts +52 -20
  171. package/src/search/search.scss +3 -0
  172. package/src/search/search.ts +11 -16
  173. package/src/segmented-button/segmented-button.ts +0 -1
  174. package/src/select/option.ts +1 -2
  175. package/src/select/select.scss +1 -10
  176. package/src/select/select.ts +2 -0
  177. package/src/sidebar-menu/sidebar-menu-item.ts +0 -1
  178. package/src/sidebar-menu/sidebar-sub-menu.ts +0 -1
  179. package/src/skeleton/skeleton.scss +5 -1
  180. package/src/tabs/tab-panel.ts +0 -1
  181. package/src/tabs/tab.ts +60 -70
  182. package/src/text/text.css-component.scss +3 -21
  183. package/src/tooltip/tooltip.scss +5 -8
  184. package/src/tooltip/tooltip.ts +1 -2
  185. package/dist/BaseButton-BNFAYn-S.js +0 -219
  186. package/dist/BaseButton-BNFAYn-S.js.map +0 -1
  187. package/dist/BaseHyperlinkMixin-BNuwbiEf.js.map +0 -1
  188. package/dist/button-colors-AvGh22Zn.js +0 -561
  189. package/dist/button-colors-AvGh22Zn.js.map +0 -1
  190. package/dist/icon-button-ohxHhy4t.js +0 -247
  191. package/dist/icon-button-ohxHhy4t.js.map +0 -1
  192. package/dist/navigation-rail-CD7IrqbN.js.map +0 -1
  193. package/dist/observe-slot-change-BGJfgg2E.js +0 -31
  194. package/dist/observe-slot-change-BGJfgg2E.js.map +0 -1
  195. package/dist/src/button/BaseButton.d.ts +0 -28
  196. package/dist/src/focus-ring/FocusAttachableController.d.ts +0 -8
  197. package/src/__mixins/BaseButtonMixin.ts +0 -83
  198. package/src/button/BaseButton.ts +0 -113
  199. package/src/focus-ring/FocusAttachableController.ts +0 -28
  200. package/src/popover/tooltip.css-component.scss +0 -19
@@ -2,12 +2,12 @@ import { a as i, _ as __decorate, i as i$1, b, A, c as __classPrivateFieldGet, w
2
2
  import { n } from './property-1psGvXOq.js';
3
3
  import { e as e$1 } from './class-map-YU7g0o3B.js';
4
4
  import { r } from './state-DwbEjqVk.js';
5
- import { o as observerSlotChangesWithCallback } from './observe-slot-change-BGJfgg2E.js';
5
+ import { o as observerSlotChangesWithCallback } from './observe-slot-change-D8Xg-kSS.js';
6
6
  import { a as e, e as e$2 } from './query-QBcUV-L_.js';
7
- import { B as BaseHyperlinkMixin, t as throttle } from './BaseHyperlinkMixin-BNuwbiEf.js';
8
- import { B as BaseButton, o as o$1, s as spread, a as BaseButtonMixin } from './BaseButton-BNFAYn-S.js';
7
+ import { N as NativeHyperlinkMixin, i as isLink, t as throttle } from './NativeHyperlinkMixin-DrYXyfMQ.js';
8
+ import { N as NativeButtonMixin, D as DISABLED_REASON_ID, o as o$1, s as spread } from './ButtonConstants-D06bY4uy.js';
9
+ import { i as isActivationClick, d as dispatchActivationClick, r as redispatchEvent } from './dispatch-event-utils-CuEqjlPT.js';
9
10
  import { o as o$2 } from './style-map-DVmWOuYy.js';
10
- import { r as redispatchEvent, i as isActivationClick, d as dispatchActivationClick } from './dispatch-event-utils-CuEqjlPT.js';
11
11
  import { B as BaseInput } from './BaseInput-14YmcfK7.js';
12
12
  import { F as FloatingController } from './popover-DUPmMVWS.js';
13
13
  import { i as isDarkMode, o as observeThemeChange } from './is-dark-mode-DOcaw4Yq.js';
@@ -20,7 +20,7 @@ import { o as o$4 } from './unsafe-html-BsGUjx94.js';
20
20
  * SPDX-License-Identifier: BSD-3-Clause
21
21
  */function o(o){return (e$1,n)=>{const{slot:r,selector:s}=o??{},c="slot"+(r?`[name=${r}]`:":not([name])");return e(e$1,n,{get(){const t=this.renderRoot?.querySelector(c),e=t?.assignedElements(o)??[];return void 0===s?e:e.filter(t=>t.matches(s))}})}}
22
22
 
23
- var css_248z$U = i`* {
23
+ var css_248z$V = i`* {
24
24
  box-sizing: border-box;
25
25
  }
26
26
 
@@ -111,7 +111,7 @@ class Avatar extends i$1 {
111
111
  return `${first.charAt(0)}${last.charAt(0)}`.toUpperCase();
112
112
  }
113
113
  }
114
- Avatar.styles = [css_248z$U];
114
+ Avatar.styles = [css_248z$V];
115
115
  __decorate([
116
116
  n({ type: String, reflect: true })
117
117
  ], Avatar.prototype, "name", void 0);
@@ -119,7 +119,7 @@ __decorate([
119
119
  n({ type: String, reflect: true })
120
120
  ], Avatar.prototype, "src", void 0);
121
121
 
122
- var css_248z$T = i`* {
122
+ var css_248z$U = i`* {
123
123
  box-sizing: border-box;
124
124
  }
125
125
 
@@ -191,12 +191,12 @@ class Badge extends i$1 {
191
191
  </div>`;
192
192
  }
193
193
  }
194
- Badge.styles = [css_248z$T];
194
+ Badge.styles = [css_248z$U];
195
195
  __decorate([
196
196
  n({ type: String })
197
197
  ], Badge.prototype, "value", void 0);
198
198
 
199
- var css_248z$S = i`* {
199
+ var css_248z$T = i`* {
200
200
  box-sizing: border-box;
201
201
  }
202
202
 
@@ -305,7 +305,7 @@ class Divider extends i$1 {
305
305
  </div>`;
306
306
  }
307
307
  }
308
- Divider.styles = [css_248z$S];
308
+ Divider.styles = [css_248z$T];
309
309
  __decorate([
310
310
  n({ type: Boolean, reflect: true })
311
311
  ], Divider.prototype, "vertical", void 0);
@@ -313,7 +313,7 @@ __decorate([
313
313
  r()
314
314
  ], Divider.prototype, "slotHasContent", void 0);
315
315
 
316
- var css_248z$R = i`* {
316
+ var css_248z$S = i`* {
317
317
  box-sizing: border-box;
318
318
  }
319
319
 
@@ -394,9 +394,9 @@ class Elevation extends i$1 {
394
394
  return b `<span class="shadow"></span>`;
395
395
  }
396
396
  }
397
- Elevation.styles = [css_248z$R];
397
+ Elevation.styles = [css_248z$S];
398
398
 
399
- var css_248z$Q = i`* {
399
+ var css_248z$R = i`* {
400
400
  box-sizing: border-box;
401
401
  }
402
402
 
@@ -516,7 +516,6 @@ var css_248z$Q = i`* {
516
516
  * @tag wc-segmented-button
517
517
  * @rawTag segmented-button
518
518
  * @summary An individual segment within a segmented button group.
519
- * @parentRawTag segmented-button-group
520
519
  * @overview
521
520
  * <p>Segmented buttons help people select options, switch views, or sort elements. They are used within a <code>wc-segmented-button-group</code>.</p>
522
521
  *
@@ -649,7 +648,7 @@ class SegmentedButton extends i$1 {
649
648
  `;
650
649
  }
651
650
  }
652
- SegmentedButton.styles = [css_248z$Q];
651
+ SegmentedButton.styles = [css_248z$R];
653
652
  __decorate([
654
653
  n({ type: String, reflect: true })
655
654
  ], SegmentedButton.prototype, "value", void 0);
@@ -669,7 +668,7 @@ __decorate([
669
668
  r()
670
669
  ], SegmentedButton.prototype, "isActive", void 0);
671
670
 
672
- var css_248z$P = i`* {
671
+ var css_248z$Q = i`* {
673
672
  box-sizing: border-box;
674
673
  }
675
674
 
@@ -781,7 +780,7 @@ class SegmentedButtonGroup extends i$1 {
781
780
  `;
782
781
  }
783
782
  }
784
- SegmentedButtonGroup.styles = [css_248z$P];
783
+ SegmentedButtonGroup.styles = [css_248z$Q];
785
784
  SegmentedButtonGroup.SegmentedButton = SegmentedButton;
786
785
  __decorate([
787
786
  n({ type: Boolean, reflect: true, attribute: 'multi-select' })
@@ -790,7 +789,7 @@ __decorate([
790
789
  n({ type: Boolean, reflect: true })
791
790
  ], SegmentedButtonGroup.prototype, "nullable", void 0);
792
791
 
793
- var css_248z$O = i`:host {
792
+ var css_248z$P = i`:host {
794
793
  display: none;
795
794
  pointer-events: none;
796
795
  position: absolute;
@@ -812,6 +811,126 @@ var css_248z$O = i`:host {
812
811
  outline: 3px solid var(--focus-ring-color);
813
812
  }`;
814
813
 
814
+ /**
815
+ * A key to retrieve an `Attachable` element's `AttachableController` from a
816
+ * global `MutationObserver`.
817
+ */
818
+ const ATTACHABLE_CONTROLLER = Symbol('attachableController');
819
+ let FOR_ATTRIBUTE_OBSERVER;
820
+ {
821
+ /**
822
+ * A global `MutationObserver` that reacts to `for` attribute changes on
823
+ * `Attachable` elements. If the `for` attribute changes, the controller will
824
+ * re-attach to the new referenced element.
825
+ */
826
+ FOR_ATTRIBUTE_OBSERVER = new MutationObserver(records => {
827
+ for (const record of records) {
828
+ // When a control's `for` attribute changes, inform its
829
+ // `AttachableController` to update to a new control.
830
+ record.target[ATTACHABLE_CONTROLLER]?.hostConnected();
831
+ }
832
+ });
833
+ }
834
+ /**
835
+ * A controller that provides an implementation for `Attachable` elements.
836
+ *
837
+ * @example
838
+ * ```ts
839
+ * class MyElement extends LitElement implements Attachable {
840
+ * get control() { return this.attachableController.control; }
841
+ *
842
+ * private readonly attachableController = new AttachableController(
843
+ * this,
844
+ * (previousControl, newControl) => {
845
+ * previousControl?.removeEventListener('click', this.handleClick);
846
+ * newControl?.addEventListener('click', this.handleClick);
847
+ * }
848
+ * );
849
+ *
850
+ * // Implement remaining `Attachable` properties/methods that call the
851
+ * // controller's properties/methods.
852
+ * }
853
+ * ```
854
+ */
855
+ class AttachableController {
856
+ get htmlFor() {
857
+ return this.host.getAttribute('for');
858
+ }
859
+ set htmlFor(htmlFor) {
860
+ if (htmlFor === null) {
861
+ this.host.removeAttribute('for');
862
+ }
863
+ else {
864
+ this.host.setAttribute('for', htmlFor);
865
+ }
866
+ }
867
+ get control() {
868
+ if (this.host.hasAttribute('for')) {
869
+ if (!this.htmlFor || !this.host.isConnected) {
870
+ return null;
871
+ }
872
+ return this.host.getRootNode().querySelector(`#${this.htmlFor}`);
873
+ }
874
+ return this.currentControl || this.host.parentElement;
875
+ }
876
+ set control(control) {
877
+ if (control) {
878
+ this.attach(control);
879
+ }
880
+ else {
881
+ this.detach();
882
+ }
883
+ }
884
+ /**
885
+ * Creates a new controller for an `Attachable` element.
886
+ *
887
+ * @param host The `Attachable` element.
888
+ * @param onControlChange A callback with two parameters for the previous and
889
+ * next control. An `Attachable` element may perform setup or teardown
890
+ * logic whenever the control changes.
891
+ */
892
+ constructor(host, onControlChange) {
893
+ this.host = host;
894
+ this.onControlChange = onControlChange;
895
+ this.currentControl = null;
896
+ host.addController(this);
897
+ host[ATTACHABLE_CONTROLLER] = this;
898
+ FOR_ATTRIBUTE_OBSERVER?.observe(host, { attributeFilter: ['for'] });
899
+ }
900
+ attach(control) {
901
+ if (control === this.currentControl) {
902
+ return;
903
+ }
904
+ this.setCurrentControl(control);
905
+ // When imperatively attaching, remove the `for` attribute so
906
+ // that the attached control is used instead of a referenced one.
907
+ this.host.removeAttribute('for');
908
+ }
909
+ detach() {
910
+ this.setCurrentControl(null);
911
+ // When imperatively detaching, add an empty `for=""` attribute. This will
912
+ // ensure the control is `null` rather than the `parentElement`.
913
+ this.host.setAttribute('for', '');
914
+ }
915
+ /** @private */
916
+ hostConnected() {
917
+ this.setCurrentControl(this.control);
918
+ }
919
+ /** @private */
920
+ hostDisconnected() {
921
+ this.setCurrentControl(null);
922
+ }
923
+ setCurrentControl(control) {
924
+ this.onControlChange(this.currentControl, control);
925
+ this.currentControl = control;
926
+ }
927
+ }
928
+
929
+ /**
930
+ * Events that the focus ring listens to.
931
+ */
932
+ const EVENTS$1 = ['focusin', 'focusout', 'pointerdown'];
933
+ const HANDLED_BY_FOCUS_RING = Symbol('handledByFocusRing');
815
934
  /**
816
935
  * @label Focus Ring
817
936
  *
@@ -822,99 +941,89 @@ var css_248z$O = i`:host {
822
941
  *
823
942
  *
824
943
  * @tags display
944
+ *
945
+ * @fires visibility-changed {Event} Fired whenever `visible` changes.
825
946
  */
826
947
  class FocusRing extends i$1 {
827
948
  constructor() {
828
949
  super(...arguments);
950
+ /**
951
+ * Makes the focus ring visible.
952
+ */
829
953
  this.visible = false;
830
- this.for = '';
831
- this.__boundFocusin = this.__focusin.bind(this);
832
- this.__boundFocusout = this.__focusout.bind(this);
833
- this.__boundPointerdown = this.__pointerdown.bind(this);
954
+ /**
955
+ * Makes the focus ring animate inwards instead of outwards.
956
+ */
957
+ this.inward = false;
958
+ this.attachableController = new AttachableController(this, this.onControlChange.bind(this));
834
959
  }
835
- render() {
836
- return A;
960
+ get htmlFor() {
961
+ return this.attachableController.htmlFor;
837
962
  }
838
- connectedCallback() {
839
- super.connectedCallback();
840
- this.attach();
963
+ set htmlFor(htmlFor) {
964
+ this.attachableController.htmlFor = htmlFor;
841
965
  }
842
- disconnectedCallback() {
843
- this.detach();
844
- super.disconnectedCallback();
966
+ get control() {
967
+ return this.attachableController.control;
845
968
  }
846
- updated(changed) {
847
- if (changed.has('for')) {
848
- const prevId = changed.get('for');
849
- if (prevId) {
850
- const root = this.parentElement?.getRootNode();
851
- const prevEl = root?.getElementById(prevId) ?? document.getElementById(prevId);
852
- if (prevEl) {
853
- prevEl.removeEventListener('focusin', this.__boundFocusin);
854
- prevEl.removeEventListener('focusout', this.__boundFocusout);
855
- prevEl.removeEventListener('pointerdown', this.__boundPointerdown);
856
- }
857
- }
858
- this.attach();
859
- }
969
+ set control(control) {
970
+ this.attachableController.control = control;
860
971
  }
861
- __focusin() {
862
- const focusTarget = this.__getFocusTarget();
863
- this.visible = focusTarget?.matches(':focus-visible') ?? false;
972
+ attach(control) {
973
+ this.attachableController.attach(control);
864
974
  }
865
- __focusout() {
866
- this.visible = false;
975
+ detach() {
976
+ this.attachableController.detach();
867
977
  }
868
- __pointerdown() {
869
- this.visible = false;
978
+ connectedCallback() {
979
+ super.connectedCallback();
980
+ // Needed for VoiceOver, which will create a "group" if the element is a
981
+ // sibling to other content.
982
+ this.setAttribute('aria-hidden', 'true');
870
983
  }
871
- /**
872
- * Resolves the element that should receive focus-ring event listeners by id.
873
- * Prefers lookup from the current control's root node, then falls back to a
874
- * document-level lookup.
875
- *
876
- * @returns The resolved focus target, if one can be found.
877
- */
878
- __getFocusTarget() {
879
- if (this.for) {
880
- const root = this.parentElement?.getRootNode();
881
- if (root) {
882
- const focusTarget = root.getElementById(this.for);
883
- if (focusTarget) {
884
- return focusTarget;
885
- }
886
- }
887
- const focusTarget = document.getElementById(this.for);
888
- if (focusTarget) {
889
- return focusTarget;
890
- }
984
+ /** @private */
985
+ handleEvent(event) {
986
+ if (event[HANDLED_BY_FOCUS_RING]) {
987
+ // This ensures the focus ring does not activate when multiple focus rings
988
+ // are used within a single component.
989
+ return;
990
+ }
991
+ switch (event.type) {
992
+ case 'focusin':
993
+ this.visible = this.control?.matches(':focus-visible') ?? false;
994
+ break;
995
+ case 'focusout':
996
+ case 'pointerdown':
997
+ this.visible = false;
998
+ break;
999
+ default:
1000
+ return;
891
1001
  }
892
- return undefined;
1002
+ // eslint-disable-next-line no-param-reassign
1003
+ event[HANDLED_BY_FOCUS_RING] = true;
893
1004
  }
894
- attach() {
895
- const focusTarget = this.__getFocusTarget();
896
- if (focusTarget) {
897
- focusTarget.addEventListener('focusin', this.__boundFocusin);
898
- focusTarget.addEventListener('focusout', this.__boundFocusout);
899
- focusTarget.addEventListener('pointerdown', this.__boundPointerdown);
1005
+ onControlChange(prev, next) {
1006
+ for (const event of EVENTS$1) {
1007
+ prev?.removeEventListener(event, this);
1008
+ next?.addEventListener(event, this);
900
1009
  }
901
1010
  }
902
- detach() {
903
- const focusTarget = this.__getFocusTarget();
904
- if (focusTarget) {
905
- focusTarget.removeEventListener('focusin', this.__boundFocusin);
906
- focusTarget.removeEventListener('focusout', this.__boundFocusout);
907
- focusTarget.removeEventListener('pointerdown', this.__boundPointerdown);
1011
+ update(changed) {
1012
+ if (changed.has('visible')) {
1013
+ // This logic can be removed once the `:has` selector has been introduced
1014
+ // to Firefox. This is necessary to allow correct submenu styles.
1015
+ this.dispatchEvent(new Event('visibility-changed'));
908
1016
  }
1017
+ super.update(changed);
909
1018
  }
910
1019
  }
911
- FocusRing.styles = [css_248z$O];
1020
+ FocusRing.styles = [css_248z$P];
912
1021
  __decorate([
913
1022
  n({ type: Boolean, reflect: true })
914
1023
  ], FocusRing.prototype, "visible", void 0);
915
1024
  __decorate([
916
- n({ type: String })
917
- ], FocusRing.prototype, "for", void 0);
1025
+ n({ type: Boolean, reflect: true })
1026
+ ], FocusRing.prototype, "inward", void 0);
918
1027
 
919
1028
  const PRESS_GROW_MS = 450;
920
1029
  const MINIMUM_PRESS_MS = 225;
@@ -1037,38 +1146,50 @@ class Ripple extends i$1 {
1037
1146
  this.rippleScale = '';
1038
1147
  this.initialSize = 0;
1039
1148
  this.state = State.INACTIVE;
1149
+ this._boundHandleEvent = this.handleEvent.bind(this);
1150
+ this.attachableController = new AttachableController(
1151
+ // `LitElement` satisfies the ReactiveControllerHost & HTMLElement shape
1152
+ // required by the controller.
1153
+ this, this.onControlChange.bind(this));
1154
+ }
1155
+ get htmlFor() {
1156
+ return this.attachableController.htmlFor;
1157
+ }
1158
+ set htmlFor(htmlFor) {
1159
+ this.attachableController.htmlFor = htmlFor;
1160
+ }
1161
+ get control() {
1162
+ return this.attachableController.control;
1163
+ }
1164
+ set control(control) {
1165
+ this.attachableController.control = control;
1040
1166
  }
1041
1167
  connectedCallback() {
1042
1168
  super.connectedCallback();
1043
1169
  // Needed for VoiceOver, which will create a "group" if the element is a
1044
1170
  // sibling to other content.
1045
1171
  this.setAttribute('aria-hidden', 'true');
1046
- // Attach to parent
1047
- this.attach(this.parentElement);
1048
1172
  }
1049
1173
  disconnectedCallback() {
1050
1174
  super.disconnectedCallback();
1051
1175
  this.detach();
1052
1176
  }
1053
1177
  attach(control) {
1054
- if (!control)
1055
- return;
1056
- EVENTS.forEach(event => {
1057
- control.addEventListener(event, this.handleEvent.bind(this));
1058
- });
1178
+ this.attachableController.attach(control);
1059
1179
  }
1060
1180
  detach() {
1061
- const control = this.parentElement;
1062
- if (!control)
1063
- return;
1064
- EVENTS.forEach(event => {
1065
- control.removeEventListener(event, this.handleEvent.bind(this));
1066
- });
1181
+ this.attachableController.detach();
1182
+ }
1183
+ onControlChange(prev, next) {
1184
+ for (const event of EVENTS) {
1185
+ prev?.removeEventListener(event, this._boundHandleEvent);
1186
+ next?.addEventListener(event, this._boundHandleEvent);
1187
+ }
1067
1188
  }
1068
1189
  render() {
1069
1190
  const classes = {
1070
- 'hovered': this.hovered,
1071
- 'pressed': this.pressed,
1191
+ hovered: this.hovered,
1192
+ pressed: this.pressed,
1072
1193
  };
1073
1194
  return b `<div class="surface ${e$1(classes)}"></div>`;
1074
1195
  }
@@ -1121,7 +1242,7 @@ class Ripple extends i$1 {
1121
1242
  }
1122
1243
  // Wait for a hold after touch delay
1123
1244
  this.state = State.TOUCH_DELAY;
1124
- await new Promise((resolve) => {
1245
+ await new Promise(resolve => {
1125
1246
  setTimeout(resolve, TOUCH_DELAY_MS);
1126
1247
  });
1127
1248
  if (this.state !== State.TOUCH_DELAY) {
@@ -1233,7 +1354,7 @@ class Ripple extends i$1 {
1233
1354
  this.pressed = false;
1234
1355
  return;
1235
1356
  }
1236
- await new Promise((resolve) => {
1357
+ await new Promise(resolve => {
1237
1358
  setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);
1238
1359
  });
1239
1360
  if (this.growAnimation !== animation) {
@@ -1349,13 +1470,16 @@ Ripple.styles = i `
1349
1470
  &::before {
1350
1471
  background-color: var(--ripple-pressed-color, var(--color-on-surface));
1351
1472
  inset: 0;
1352
- transition: opacity 15ms linear, background-color 15ms linear;
1473
+ transition:
1474
+ opacity 15ms linear,
1475
+ background-color 15ms linear;
1353
1476
  }
1354
1477
 
1355
1478
  &::after {
1356
1479
  background: radial-gradient(
1357
1480
  closest-side,
1358
- var(--ripple-pressed-color, var(--color-on-surface)) max(calc(100% - 70px), 65%),
1481
+ var(--ripple-pressed-color, var(--color-on-surface))
1482
+ max(calc(100% - 70px), 65%),
1359
1483
  transparent 100%
1360
1484
  );
1361
1485
  transform-origin: center center;
@@ -1385,7 +1509,7 @@ __decorate([
1385
1509
  e$2('.surface')
1386
1510
  ], Ripple.prototype, "mdRoot", void 0);
1387
1511
 
1388
- var css_248z$N = i`* {
1512
+ var css_248z$O = i`* {
1389
1513
  box-sizing: border-box;
1390
1514
  }
1391
1515
 
@@ -1518,7 +1642,7 @@ var css_248z$N = i`* {
1518
1642
  border-block-start: 1px solid var(--color-outline-variant);
1519
1643
  }
1520
1644
  .expansion-panel.open .content-inner {
1521
- padding: 0 var(--spacing-300) var(--spacing-200);
1645
+ padding: var(--spacing-200) var(--spacing-300);
1522
1646
  }
1523
1647
  .expansion-panel.open .toggle-icon {
1524
1648
  transform: rotate(180deg);
@@ -1542,7 +1666,6 @@ var _AccordionItem_id;
1542
1666
  * @tag wc-accordion-item
1543
1667
  * @rawTag accordion-item
1544
1668
  * @summary An expansion panel with a header that reveals or hides associated content. Follows Material Design 3 expansion panel guidelines.
1545
- * @parentRawTag accordion
1546
1669
  *
1547
1670
  * @slot - The body content revealed when the panel is expanded.
1548
1671
  * @slot heading - The panel title. Renders as `body-large` text.
@@ -1681,7 +1804,7 @@ class AccordionItem extends i$1 {
1681
1804
  }
1682
1805
  }
1683
1806
  _AccordionItem_id = new WeakMap();
1684
- AccordionItem.styles = [css_248z$N];
1807
+ AccordionItem.styles = [css_248z$O];
1685
1808
  __decorate([
1686
1809
  n({ type: Boolean, reflect: true })
1687
1810
  ], AccordionItem.prototype, "disabled", void 0);
@@ -1704,7 +1827,7 @@ __decorate([
1704
1827
  e$2('.header-button')
1705
1828
  ], AccordionItem.prototype, "buttonElement", void 0);
1706
1829
 
1707
- var css_248z$M = i`* {
1830
+ var css_248z$N = i`* {
1708
1831
  box-sizing: border-box;
1709
1832
  }
1710
1833
 
@@ -1832,7 +1955,7 @@ class Accordion extends i$1 {
1832
1955
  return b `<div class="accordion"><slot></slot></div>`;
1833
1956
  }
1834
1957
  }
1835
- Accordion.styles = [css_248z$M];
1958
+ Accordion.styles = [css_248z$N];
1836
1959
  Accordion.Item = AccordionItem;
1837
1960
  __decorate([
1838
1961
  n({ type: Boolean, reflect: true })
@@ -1844,7 +1967,7 @@ __decorate([
1844
1967
  o({ selector: 'wc-accordion-item' })
1845
1968
  ], Accordion.prototype, "items", void 0);
1846
1969
 
1847
- var css_248z$L = i`* {
1970
+ var css_248z$M = i`* {
1848
1971
  box-sizing: border-box;
1849
1972
  }
1850
1973
 
@@ -1853,9 +1976,7 @@ var css_248z$L = i`* {
1853
1976
  }
1854
1977
 
1855
1978
  :host {
1856
- display: inline-block;
1857
- border-radius: inherit;
1858
- corner-shape: inherit;
1979
+ display: inline;
1859
1980
  color: var(--color-primary);
1860
1981
  }
1861
1982
 
@@ -1873,12 +1994,6 @@ var css_248z$L = i`* {
1873
1994
  :host(.inherit) .link {
1874
1995
  color: inherit;
1875
1996
  text-decoration: none !important;
1876
- }
1877
-
1878
- :host(.with-icon) .link {
1879
- display: inline-flex;
1880
- align-items: center;
1881
- gap: 0.5em;
1882
1997
  }`;
1883
1998
 
1884
1999
  /**
@@ -1894,23 +2009,25 @@ var css_248z$L = i`* {
1894
2009
  * <wc-link href="#">Link</wc-link>
1895
2010
  * ```
1896
2011
  */
1897
- class Link extends BaseHyperlinkMixin(i$1) {
2012
+ class Link extends NativeHyperlinkMixin(i$1) {
1898
2013
  render() {
1899
2014
  return b `<a
1900
2015
  class=${e$1({
1901
2016
  link: true,
1902
2017
  })}
1903
2018
  href=${this.href}
2019
+ ?download=${this.download}
1904
2020
  target=${this.target}
2021
+ ?rel=${this.rel}
1905
2022
  ?tabindex=${this.parentElement?.tabIndex}
1906
2023
  >
1907
2024
  <slot></slot>
1908
2025
  </a>`;
1909
2026
  }
1910
2027
  }
1911
- Link.styles = [css_248z$L];
2028
+ Link.styles = [css_248z$M];
1912
2029
 
1913
- var css_248z$K = i`* {
2030
+ var css_248z$L = i`* {
1914
2031
  box-sizing: border-box;
1915
2032
  }
1916
2033
 
@@ -2047,7 +2164,7 @@ slot::slotted(*) {
2047
2164
  --_container-state-opacity: 0.08;
2048
2165
  }`;
2049
2166
 
2050
- var css_248z$J = i`:host([color=default]) {
2167
+ var css_248z$K = i`:host([color=default]) {
2051
2168
  --filled-tag-container-color: var(--color-surface);
2052
2169
  --filled-tag-label-text-color: var(--color-on-surface);
2053
2170
  --tonal-tag-container-color: var(--color-surface-container);
@@ -2113,7 +2230,7 @@ var css_248z$J = i`:host([color=default]) {
2113
2230
  --outlined-tag-label-text-color: var(--color-purple);
2114
2231
  }`;
2115
2232
 
2116
- var css_248z$I = i`.tag {
2233
+ var css_248z$J = i`.tag {
2117
2234
  font-family: var(--font-family-sans) !important;
2118
2235
  }
2119
2236
 
@@ -2212,7 +2329,7 @@ class Tag extends i$1 {
2212
2329
  }
2213
2330
  // Define styles (Lit handles Scoping via Shadow DOM by default)
2214
2331
  // You would typically import your tag.scss.js here or use the css tag
2215
- Tag.styles = [css_248z$K, css_248z$J, css_248z$I];
2332
+ Tag.styles = [css_248z$L, css_248z$K, css_248z$J];
2216
2333
  __decorate([
2217
2334
  n({ type: Boolean })
2218
2335
  ], Tag.prototype, "dismissible", void 0);
@@ -2226,7 +2343,7 @@ __decorate([
2226
2343
  n()
2227
2344
  ], Tag.prototype, "size", void 0);
2228
2345
 
2229
- var css_248z$H = i`* {
2346
+ var css_248z$I = i`* {
2230
2347
  box-sizing: border-box;
2231
2348
  }
2232
2349
 
@@ -2235,7 +2352,8 @@ var css_248z$H = i`* {
2235
2352
  }
2236
2353
 
2237
2354
  :host {
2238
- display: inline-block;
2355
+ position: relative;
2356
+ display: inline-flex;
2239
2357
  --chip-container-color: var(--color-surface);
2240
2358
  --chip-label-text-color: var(--color-on-surface);
2241
2359
  --chip-outline-color: var(--color-outline-variant);
@@ -2258,12 +2376,12 @@ var css_248z$H = i`* {
2258
2376
  }
2259
2377
 
2260
2378
  .chip {
2261
- position: relative;
2262
2379
  display: inline-flex;
2263
2380
  align-items: center;
2264
2381
  height: var(--chip-height, var(--_chip-height, 2rem));
2265
2382
  width: 100%;
2266
2383
  cursor: pointer;
2384
+ z-index: 0;
2267
2385
  }
2268
2386
  .chip .tag-content {
2269
2387
  position: relative;
@@ -2315,17 +2433,6 @@ var css_248z$H = i`* {
2315
2433
  --icon-size: 1rem;
2316
2434
  --icon-color: var(--color-primary);
2317
2435
  }
2318
- .chip .focus-ring {
2319
- z-index: 2;
2320
- display: block;
2321
- --focus-ring-container-shape: var(--chip-container-shape);
2322
- }
2323
- .chip .ripple {
2324
- display: block;
2325
- border-radius: var(--chip-container-shape);
2326
- --ripple-state-opacity: var(--_chip-state-opacity, 0);
2327
- --ripple-pressed-color: var(--_chip-state-color);
2328
- }
2329
2436
  .chip.disabled {
2330
2437
  cursor: not-allowed;
2331
2438
  }
@@ -2341,14 +2448,27 @@ var css_248z$H = i`* {
2341
2448
  .chip.icon-slot-has-content .icon-slot-container, .chip.selected .icon-slot-container {
2342
2449
  padding-inline: calc(var(--chip-container-padding) / 2);
2343
2450
  }
2344
- .chip {
2345
- /**
2346
- * Tag background layers
2347
- */
2451
+
2452
+ /*
2453
+ Background layers
2454
+ */
2455
+ .focus-ring {
2456
+ z-index: 2;
2457
+ display: block;
2458
+ --focus-ring-container-shape: var(--chip-container-shape);
2459
+ }
2460
+
2461
+ .ripple {
2462
+ display: block;
2463
+ border-radius: var(--chip-container-shape);
2464
+ --ripple-state-opacity: var(--_chip-state-opacity, 0);
2465
+ --ripple-pressed-color: var(--_chip-state-color);
2348
2466
  }
2349
- .chip .background {
2467
+
2468
+ .background {
2350
2469
  display: block;
2351
2470
  position: absolute;
2471
+ top: 0;
2352
2472
  left: 0;
2353
2473
  width: 100%;
2354
2474
  height: 100%;
@@ -2356,49 +2476,56 @@ var css_248z$H = i`* {
2356
2476
  background: var(--_chip-container-color);
2357
2477
  pointer-events: none;
2358
2478
  }
2359
- .chip .outline {
2479
+
2480
+ .outline {
2360
2481
  z-index: 0;
2361
2482
  display: block;
2362
2483
  position: absolute;
2484
+ top: 0;
2363
2485
  left: 0;
2364
2486
  width: 100%;
2365
2487
  height: 100%;
2366
2488
  border-radius: var(--chip-container-shape);
2367
2489
  border: 1px solid var(--chip-outline-color);
2368
2490
  }
2369
- .chip .elevation {
2491
+
2492
+ .elevation {
2370
2493
  --elevation-level: 0;
2371
2494
  transition-duration: 280ms;
2372
2495
  --elevation-container-shape: var(--chip-container-shape);
2373
2496
  }
2374
2497
 
2375
- /** Color state management */
2376
- .chip {
2498
+ /* Color/state management */
2499
+ :host {
2377
2500
  --_chip-container-color: var(--chip-container-color);
2378
2501
  --_chip-text-color: var(--chip-label-text-color);
2379
2502
  --_chip-state-color: var(--_chip-text-color);
2380
2503
  }
2381
- .chip:hover {
2504
+
2505
+ :host:hover {
2382
2506
  --_chip-state-opacity: 0.08;
2383
2507
  }
2384
- .chip.pressed {
2508
+
2509
+ :host([pressed]) {
2385
2510
  --_chip-state-opacity: 0.12;
2386
2511
  }
2387
- .chip.selected {
2512
+
2513
+ :host([selected]) {
2388
2514
  --_chip-container-color: var(--color-secondary-container);
2389
2515
  --_chip-text-color: var(--color-on-secondary-container);
2390
2516
  }
2391
- .chip.disabled {
2517
+
2518
+ :host([disabled]) {
2392
2519
  --_chip-container-color: var(--color-on-surface);
2393
2520
  --_chip-container-opacity: 0.1;
2394
2521
  --_chip-text-color: var(--color-on-surface);
2395
2522
  --_chip-text-opacity: 0.38;
2396
2523
  }
2397
- .chip.disabled .ripple {
2524
+ :host([disabled]) .ripple {
2398
2525
  display: none;
2399
2526
  }`;
2400
2527
 
2401
- var css_248z$G = i`.tag {
2528
+ var css_248z$H = i`.tag {
2402
2529
  font-family: var(--font-family-sans) !important;
2403
2530
  }
2404
2531
 
@@ -2468,13 +2595,86 @@ var css_248z$G = i`.tag {
2468
2595
  * <wc-chip>Chip content</wc-chip>
2469
2596
  * ```
2470
2597
  */
2471
- class Chip extends BaseButton {
2598
+ class Chip extends NativeButtonMixin(NativeHyperlinkMixin(i$1)) {
2472
2599
  constructor() {
2473
2600
  super(...arguments);
2474
2601
  /** If true, the tag will have a close icon. */
2475
2602
  this.dismissible = false;
2476
2603
  this._hasIconSlotContent = false;
2477
- this._isPressed = false;
2604
+ this.skeleton = false;
2605
+ this.toggle = false;
2606
+ this.selected = false;
2607
+ /**
2608
+ * Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.
2609
+ */
2610
+ this.throttleDelay = 200;
2611
+ this.pressed = false;
2612
+ this.__handlePress = (event) => {
2613
+ if (this.disabled || this.skeleton || this.softDisabled)
2614
+ return;
2615
+ if (event instanceof KeyboardEvent &&
2616
+ event.type === 'keydown' &&
2617
+ (event.key === 'Enter' || event.key === ' ')) {
2618
+ this.pressed = true;
2619
+ }
2620
+ else if (event.type === 'mousedown') {
2621
+ this.pressed = true;
2622
+ }
2623
+ else {
2624
+ this.pressed = false;
2625
+ }
2626
+ };
2627
+ this.__dispatchClickWithThrottle = event => {
2628
+ this.__dispatchClick(event);
2629
+ };
2630
+ this.__dispatchClick = (event) => {
2631
+ // If the button is soft-disabled or a disabled link, we need to explicitly
2632
+ // prevent the click from propagating to other event listeners as well as
2633
+ // prevent the default action.
2634
+ if (this.softDisabled || (this.disabled && this.href) || this.skeleton) {
2635
+ event.stopImmediatePropagation();
2636
+ event.preventDefault();
2637
+ return;
2638
+ }
2639
+ if (!isActivationClick(event) || !this.buttonElement) {
2640
+ return;
2641
+ }
2642
+ if (this.toggle) {
2643
+ this.selected = !this.selected;
2644
+ }
2645
+ this.focus();
2646
+ dispatchActivationClick(this.buttonElement);
2647
+ };
2648
+ }
2649
+ connectedCallback() {
2650
+ super.connectedCallback();
2651
+ this.addEventListener('click', this.__dispatchClickWithThrottle);
2652
+ window.addEventListener('mouseup', this.__handlePress);
2653
+ }
2654
+ disconnectedCallback() {
2655
+ window.removeEventListener('mouseup', this.__handlePress);
2656
+ this.removeEventListener('click', this.__dispatchClickWithThrottle);
2657
+ super.disconnectedCallback();
2658
+ }
2659
+ __renderDisabledReason(softDisabled) {
2660
+ if (softDisabled)
2661
+ return b `<div
2662
+ id=${DISABLED_REASON_ID}
2663
+ role="tooltip"
2664
+ aria-label=${this.disabledReason}
2665
+ class="screen-reader-only"
2666
+ >
2667
+ ${this.disabledReason}
2668
+ </div>`;
2669
+ return A;
2670
+ }
2671
+ __renderTooltip() {
2672
+ if (this.tooltip) {
2673
+ return b `<wc-tooltip class="tooltip" for="button"
2674
+ >${this.tooltip}</wc-tooltip
2675
+ >`;
2676
+ }
2677
+ return A;
2478
2678
  }
2479
2679
  focus() {
2480
2680
  this.buttonElement?.focus();
@@ -2512,63 +2712,63 @@ class Chip extends BaseButton {
2512
2712
  `;
2513
2713
  }
2514
2714
  render() {
2715
+ return b `
2716
+ <wc-focus-ring class="focus-ring" for="button"></wc-focus-ring>
2717
+ <wc-elevation class="elevation"></wc-elevation>
2718
+ <div class="background"></div>
2719
+ <div class="outline"></div>
2720
+ <wc-ripple class="ripple" for="button"></wc-ripple>
2721
+
2722
+ ${this.renderChipElement()} ${this.__renderTooltip()}
2723
+ `;
2724
+ }
2725
+ renderChipElement() {
2515
2726
  const cssClasses = {
2516
2727
  chip: true,
2517
2728
  button: true,
2518
2729
  selected: this.selected,
2519
2730
  dismissible: this.dismissible,
2520
- pressed: this._isPressed,
2731
+ pressed: this.pressed,
2521
2732
  'icon-slot-has-content': this._hasIconSlotContent,
2522
2733
  };
2523
- if (!this.__isLink()) {
2734
+ if (!isLink(this)) {
2524
2735
  return b `<button
2525
- class=${e$1(cssClasses)}
2526
- id="button"
2527
- type=${this.htmlType}
2528
- @click=${this.__dispatchClickWithThrottle}
2529
- @mousedown=${this.__handlePress}
2530
- @keydown=${this.__handlePress}
2531
- @keyup=${this.__handlePress}
2532
-
2533
- aria-describedby=${o$1(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
2534
- ?aria-disabled=${this.softDisabled}
2535
-
2536
- ?disabled=${this.disabled}
2537
- ${spread(this.configAria)}
2538
- >
2539
- ${this.renderChipContent()}
2540
- </button>`;
2736
+ class=${e$1(cssClasses)}
2737
+ id="button"
2738
+ type=${this.htmlType}
2739
+ @click=${this.__dispatchClickWithThrottle}
2740
+ @mousedown=${this.__handlePress}
2741
+ @keydown=${this.__handlePress}
2742
+ @keyup=${this.__handlePress}
2743
+ aria-describedby=${o$1(this.softDisabled ? DISABLED_REASON_ID : undefined)}
2744
+ ?aria-disabled=${this.softDisabled}
2745
+ ?disabled=${this.disabled}
2746
+ ${spread(this.configAria)}
2747
+ >
2748
+ ${this.renderChipContent()}
2749
+ </button>`;
2541
2750
  }
2542
2751
  return b `<a
2543
- class=${e$1(cssClasses)}
2544
- id="button"
2545
- href=${this.href}
2546
- target=${this.target}
2547
- tabindex=${this.disabled ? '-1' : '0'}
2548
-
2549
- @click=${this.__dispatchClick}
2550
- @mousedown=${this.__handlePress}
2551
- @keydown=${this.__handlePress}
2552
- @keyup=${this.__handlePress}
2553
- role="button"
2554
-
2555
- aria-describedby=${o$1(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
2556
- ?aria-disabled=${this.softDisabled}
2557
-
2558
- ${spread(this.configAria)}
2559
- >
2560
- ${this.renderChipContent()}
2561
- </a>`;
2562
- }
2563
- renderChipContent() {
2564
- return b `
2565
- <wc-focus-ring class="focus-ring" for="button"></wc-focus-ring>
2566
- <wc-elevation class="elevation"></wc-elevation>
2567
- <div class="background"></div>
2568
- <div class="outline"></div>
2569
- <wc-ripple class="ripple"></wc-ripple>
2752
+ class=${e$1(cssClasses)}
2753
+ id="button"
2754
+ href=${this.href}
2755
+ target=${this.target}
2756
+ tabindex=${this.disabled ? '-1' : '0'}
2757
+ @click=${this.__dispatchClick}
2758
+ @mousedown=${this.__handlePress}
2759
+ @keydown=${this.__handlePress}
2760
+ @keyup=${this.__handlePress}
2761
+ role="button"
2762
+ aria-describedby=${o$1(this.softDisabled ? DISABLED_REASON_ID : undefined)}
2763
+ ?aria-disabled=${this.softDisabled}
2764
+ ${spread(this.configAria)}
2765
+ >
2766
+ ${this.renderChipContent()}
2767
+ </a>`;
2768
+ }
2769
+ renderChipContent() {
2770
+ return b `
2570
2771
  <div class="tag-content">
2571
-
2572
2772
  <div class="icon-slot-container">
2573
2773
  ${this.selected
2574
2774
  ? b `<wc-icon class="selected-icon" name="check"></wc-icon>`
@@ -2576,8 +2776,7 @@ class Chip extends BaseButton {
2576
2776
  </div>
2577
2777
  <div class="label-container">
2578
2778
  <slot></slot>
2579
- </div>
2580
-
2779
+ </div>
2581
2780
  ${this._renderCloseButton()}
2582
2781
  </div>
2583
2782
  `;
@@ -2585,7 +2784,7 @@ class Chip extends BaseButton {
2585
2784
  }
2586
2785
  // Define styles (Lit handles Scoping via Shadow DOM by default)
2587
2786
  // You would typically import your tag.scss.js here or use the css tag
2588
- Chip.styles = [css_248z$H, css_248z$G];
2787
+ Chip.styles = [css_248z$I, css_248z$H];
2589
2788
  __decorate([
2590
2789
  n({ type: Boolean })
2591
2790
  ], Chip.prototype, "dismissible", void 0);
@@ -2596,10 +2795,28 @@ __decorate([
2596
2795
  r()
2597
2796
  ], Chip.prototype, "_hasIconSlotContent", void 0);
2598
2797
  __decorate([
2599
- r()
2600
- ], Chip.prototype, "_isPressed", void 0);
2798
+ n({ type: Boolean, reflect: true })
2799
+ ], Chip.prototype, "skeleton", void 0);
2800
+ __decorate([
2801
+ n({ type: Boolean, reflect: true })
2802
+ ], Chip.prototype, "toggle", void 0);
2803
+ __decorate([
2804
+ n({ type: Boolean, reflect: true })
2805
+ ], Chip.prototype, "selected", void 0);
2806
+ __decorate([
2807
+ n()
2808
+ ], Chip.prototype, "throttleDelay", void 0);
2809
+ __decorate([
2810
+ n()
2811
+ ], Chip.prototype, "tooltip", void 0);
2812
+ __decorate([
2813
+ n({ type: Boolean, reflect: true })
2814
+ ], Chip.prototype, "pressed", void 0);
2815
+ __decorate([
2816
+ e$2('.button')
2817
+ ], Chip.prototype, "buttonElement", void 0);
2601
2818
 
2602
- var css_248z$F = i`* {
2819
+ var css_248z$G = i`* {
2603
2820
  box-sizing: border-box;
2604
2821
  }
2605
2822
 
@@ -2637,9 +2854,9 @@ class ChipSet extends i$1 {
2637
2854
  return b `<slot></slot>`;
2638
2855
  }
2639
2856
  }
2640
- ChipSet.styles = [css_248z$F];
2857
+ ChipSet.styles = [css_248z$G];
2641
2858
 
2642
- var css_248z$E = i`:host {
2859
+ var css_248z$F = i`:host {
2643
2860
  display: block;
2644
2861
  --progress-height: 0.25rem;
2645
2862
  --progress-container-color: var(--color-primary);
@@ -2845,9 +3062,9 @@ class LinearProgress extends BaseProgress {
2845
3062
  }
2846
3063
  }
2847
3064
  // Lit components use static styles for better performance
2848
- LinearProgress.styles = [css_248z$E];
3065
+ LinearProgress.styles = [css_248z$F];
2849
3066
 
2850
- var css_248z$D = i`:host {
3067
+ var css_248z$E = i`:host {
2851
3068
  display: inline-block;
2852
3069
  --progress-height: 1.5rem;
2853
3070
  --progress-line-thickness: 4px;
@@ -3010,9 +3227,9 @@ class CircularProgress extends BaseProgress {
3010
3227
  }
3011
3228
  }
3012
3229
  // Lit components use static styles for better performance
3013
- CircularProgress.styles = [css_248z$D];
3230
+ CircularProgress.styles = [css_248z$E];
3014
3231
 
3015
- var css_248z$C = i`* {
3232
+ var css_248z$D = i`* {
3016
3233
  box-sizing: border-box;
3017
3234
  }
3018
3235
 
@@ -3116,12 +3333,12 @@ class Skeleton extends i$1 {
3116
3333
  return b ` <div class="skeleton"></div>`;
3117
3334
  }
3118
3335
  }
3119
- Skeleton.styles = [css_248z$C];
3336
+ Skeleton.styles = [css_248z$D];
3120
3337
  __decorate([
3121
3338
  n({ type: Boolean, reflect: true })
3122
3339
  ], Skeleton.prototype, "visible", void 0);
3123
3340
 
3124
- var css_248z$B = i`* {
3341
+ var css_248z$C = i`* {
3125
3342
  box-sizing: border-box;
3126
3343
  }
3127
3344
 
@@ -3191,16 +3408,23 @@ class Input extends BaseInput {
3191
3408
  * validation errors only display in response to user interactions.
3192
3409
  */
3193
3410
  this.dirty = false;
3411
+ this.__handleFocusChange = (event) => {
3412
+ this.focused = event.type === 'focus';
3413
+ };
3414
+ }
3415
+ async focus() {
3416
+ await Promise.all([
3417
+ customElements.whenDefined('wc-input'),
3418
+ customElements.whenDefined('wc-field'),
3419
+ ]);
3420
+ await this.updateComplete;
3421
+ this.inputElement?.focus();
3194
3422
  }
3195
3423
  connectedCallback() {
3196
3424
  super.connectedCallback();
3197
3425
  this.handleInitialAttributes();
3198
3426
  }
3199
3427
  handleInitialAttributes() {
3200
- if (this.hasAttribute('tabindex')) {
3201
- this.tabindex = this.getAttribute('tabindex') || undefined;
3202
- this.removeAttribute('tabindex');
3203
- }
3204
3428
  Array.from(this.attributes).forEach(attr => {
3205
3429
  if (attr.name.startsWith('aria-')) {
3206
3430
  this.configAria[attr.name] = attr.value;
@@ -3212,19 +3436,6 @@ class Input extends BaseInput {
3212
3436
  this.dirty = true;
3213
3437
  this.value = event.target.value;
3214
3438
  }
3215
- focus() {
3216
- this.inputElement?.focus();
3217
- }
3218
- blur() {
3219
- this.inputElement?.blur();
3220
- }
3221
- __handleFocusChange() {
3222
- // When calling focus() or reportValidity() during change, it's possible
3223
- // for blur to be called after the new focus event. Rather than set
3224
- // `this.focused` to true/false on focus/blur, we always set it to whether
3225
- // or not the input itself is focused.
3226
- this.focused = this.inputElement?.matches(':focus') ?? false;
3227
- }
3228
3439
  __redispatchEvent(event) {
3229
3440
  redispatchEvent(this, event);
3230
3441
  }
@@ -3257,7 +3468,6 @@ class Input extends BaseInput {
3257
3468
  placeholder=${this.placeholder}
3258
3469
  autocomplete=${this.autocomplete}
3259
3470
  .value=${this.value}
3260
- ?tabindex=${this.tabindex}
3261
3471
  ?readonly=${this.readonly}
3262
3472
  ?required=${this.required}
3263
3473
  ?disabled=${this.disabled}
@@ -3270,7 +3480,7 @@ class Input extends BaseInput {
3270
3480
 
3271
3481
  ${this.type === 'password'
3272
3482
  ? b `
3273
- <pc-tooltip
3483
+ <wc-tooltip
3274
3484
  slot="field-end"
3275
3485
  content=${this.passwordVisible
3276
3486
  ? 'Hide password'
@@ -3284,10 +3494,12 @@ class Input extends BaseInput {
3284
3494
  }}
3285
3495
  >
3286
3496
  <wc-icon
3287
- name=${this.passwordVisible ? 'visibility_off' : 'visibility'}
3497
+ name=${this.passwordVisible
3498
+ ? 'visibility_off'
3499
+ : 'visibility'}
3288
3500
  ></wc-icon>
3289
3501
  </wc-icon-button>
3290
- </pc-tooltip>
3502
+ </wc-tooltip>
3291
3503
  `
3292
3504
  : A}
3293
3505
 
@@ -3296,7 +3508,7 @@ class Input extends BaseInput {
3296
3508
  `;
3297
3509
  }
3298
3510
  }
3299
- Input.styles = [css_248z$B];
3511
+ Input.styles = [css_248z$C];
3300
3512
  __decorate([
3301
3513
  n({ type: String })
3302
3514
  ], Input.prototype, "value", void 0);
@@ -3355,7 +3567,7 @@ __decorate([
3355
3567
  e$2('.input-element')
3356
3568
  ], Input.prototype, "inputElement", void 0);
3357
3569
 
3358
- var css_248z$A = i`* {
3570
+ var css_248z$B = i`* {
3359
3571
  box-sizing: border-box;
3360
3572
  }
3361
3573
 
@@ -3588,7 +3800,7 @@ class UrlField extends BaseInput {
3588
3800
  `;
3589
3801
  }
3590
3802
  }
3591
- UrlField.styles = [css_248z$A];
3803
+ UrlField.styles = [css_248z$B];
3592
3804
  __decorate([
3593
3805
  n({ type: String })
3594
3806
  ], UrlField.prototype, "value", void 0);
@@ -3638,7 +3850,7 @@ __decorate([
3638
3850
  e$2('.url-input')
3639
3851
  ], UrlField.prototype, "inputElement", void 0);
3640
3852
 
3641
- var css_248z$z = i`* {
3853
+ var css_248z$A = i`* {
3642
3854
  box-sizing: border-box;
3643
3855
  }
3644
3856
 
@@ -4006,7 +4218,11 @@ class Field extends i$1 {
4006
4218
  return b `<div class="text-count">${this.textCount}</div>`;
4007
4219
  }
4008
4220
  }
4009
- Field.styles = [css_248z$z];
4221
+ Field.shadowRootOptions = {
4222
+ ...i$1.shadowRootOptions,
4223
+ delegatesFocus: true,
4224
+ };
4225
+ Field.styles = [css_248z$A];
4010
4226
  __decorate([
4011
4227
  n({ type: String })
4012
4228
  ], Field.prototype, "label", void 0);
@@ -4062,7 +4278,7 @@ __decorate([
4062
4278
  r()
4063
4279
  ], Field.prototype, "slotEndHasContent", void 0);
4064
4280
 
4065
- var css_248z$y = i`* {
4281
+ var css_248z$z = i`* {
4066
4282
  box-sizing: border-box;
4067
4283
  }
4068
4284
 
@@ -4261,7 +4477,7 @@ class NumberField extends BaseInput {
4261
4477
  }
4262
4478
  }
4263
4479
  _NumberField_id = new WeakMap();
4264
- NumberField.styles = [css_248z$y];
4480
+ NumberField.styles = [css_248z$z];
4265
4481
  __decorate([
4266
4482
  n({ type: Number })
4267
4483
  ], NumberField.prototype, "value", void 0);
@@ -4323,7 +4539,7 @@ __decorate([
4323
4539
  e$2('.input-element')
4324
4540
  ], NumberField.prototype, "inputElement", void 0);
4325
4541
 
4326
- var css_248z$x = i`* {
4542
+ var css_248z$y = i`* {
4327
4543
  box-sizing: border-box;
4328
4544
  }
4329
4545
 
@@ -4490,7 +4706,7 @@ class DatePicker extends BaseInput {
4490
4706
  `;
4491
4707
  }
4492
4708
  }
4493
- DatePicker.styles = [css_248z$x];
4709
+ DatePicker.styles = [css_248z$y];
4494
4710
  __decorate([
4495
4711
  n({ type: String })
4496
4712
  ], DatePicker.prototype, "value", void 0);
@@ -4546,7 +4762,7 @@ __decorate([
4546
4762
  e$2('.input-element')
4547
4763
  ], DatePicker.prototype, "inputElement", void 0);
4548
4764
 
4549
- var css_248z$w = i`* {
4765
+ var css_248z$x = i`* {
4550
4766
  box-sizing: border-box;
4551
4767
  }
4552
4768
 
@@ -4713,7 +4929,7 @@ class TimePicker extends BaseInput {
4713
4929
  `;
4714
4930
  }
4715
4931
  }
4716
- TimePicker.styles = [css_248z$w];
4932
+ TimePicker.styles = [css_248z$x];
4717
4933
  __decorate([
4718
4934
  n({ type: String })
4719
4935
  ], TimePicker.prototype, "value", void 0);
@@ -4769,7 +4985,7 @@ __decorate([
4769
4985
  e$2('.input-element')
4770
4986
  ], TimePicker.prototype, "inputElement", void 0);
4771
4987
 
4772
- var css_248z$v = i`* {
4988
+ var css_248z$w = i`* {
4773
4989
  box-sizing: border-box;
4774
4990
  }
4775
4991
 
@@ -4929,7 +5145,7 @@ class Textarea extends BaseInput {
4929
5145
  `;
4930
5146
  }
4931
5147
  }
4932
- Textarea.styles = [css_248z$v];
5148
+ Textarea.styles = [css_248z$w];
4933
5149
  __decorate([
4934
5150
  n({ type: String })
4935
5151
  ], Textarea.prototype, "value", void 0);
@@ -4988,7 +5204,7 @@ __decorate([
4988
5204
  e$2('.input-element')
4989
5205
  ], Textarea.prototype, "inputElement", void 0);
4990
5206
 
4991
- var css_248z$u = i`* {
5207
+ var css_248z$v = i`* {
4992
5208
  box-sizing: border-box;
4993
5209
  }
4994
5210
 
@@ -5329,7 +5545,7 @@ class Switch extends BaseInput {
5329
5545
  `;
5330
5546
  }
5331
5547
  }
5332
- Switch.styles = [css_248z$u];
5548
+ Switch.styles = [css_248z$v];
5333
5549
  __decorate([
5334
5550
  n({ type: Boolean })
5335
5551
  ], Switch.prototype, "value", void 0);
@@ -5373,7 +5589,7 @@ __decorate([
5373
5589
  e$2('.input-native')
5374
5590
  ], Switch.prototype, "nativeElement", void 0);
5375
5591
 
5376
- var css_248z$t = i`* {
5592
+ var css_248z$u = i`* {
5377
5593
  box-sizing: border-box;
5378
5594
  }
5379
5595
 
@@ -5831,7 +6047,7 @@ class Checkbox extends i$1 {
5831
6047
  `;
5832
6048
  }
5833
6049
  }
5834
- Checkbox.styles = [css_248z$t];
6050
+ Checkbox.styles = [css_248z$u];
5835
6051
  __decorate([
5836
6052
  n({ type: String })
5837
6053
  ], Checkbox.prototype, "name", void 0);
@@ -5878,7 +6094,7 @@ __decorate([
5878
6094
  e$2('.input-native')
5879
6095
  ], Checkbox.prototype, "nativeElement", void 0);
5880
6096
 
5881
- var css_248z$s = i`* {
6097
+ var css_248z$t = i`* {
5882
6098
  box-sizing: border-box;
5883
6099
  }
5884
6100
 
@@ -5965,9 +6181,9 @@ class Spinner extends i$1 {
5965
6181
  `;
5966
6182
  }
5967
6183
  }
5968
- Spinner.styles = [css_248z$s];
6184
+ Spinner.styles = [css_248z$t];
5969
6185
 
5970
- var css_248z$r = i`* {
6186
+ var css_248z$s = i`* {
5971
6187
  box-sizing: border-box;
5972
6188
  }
5973
6189
 
@@ -6085,12 +6301,12 @@ class Container extends i$1 {
6085
6301
  `;
6086
6302
  }
6087
6303
  }
6088
- Container.styles = [css_248z$r];
6304
+ Container.styles = [css_248z$s];
6089
6305
  __decorate([
6090
6306
  n({ type: String, reflect: true })
6091
6307
  ], Container.prototype, "size", void 0);
6092
6308
 
6093
- var css_248z$q = i`* {
6309
+ var css_248z$r = i`* {
6094
6310
  box-sizing: border-box;
6095
6311
  }
6096
6312
 
@@ -6152,6 +6368,7 @@ var css_248z$q = i`* {
6152
6368
 
6153
6369
  :host(.content-center) .content {
6154
6370
  align-items: center;
6371
+ text-align: center;
6155
6372
  }
6156
6373
 
6157
6374
  @container emptystate (min-width: 672px) {
@@ -6253,7 +6470,7 @@ class EmptyState extends i$1 {
6253
6470
  }
6254
6471
  }
6255
6472
  // Lit handles styles in a static property for better performance
6256
- EmptyState.styles = [css_248z$q];
6473
+ EmptyState.styles = [css_248z$r];
6257
6474
  __decorate([
6258
6475
  n({ type: String, reflect: true })
6259
6476
  ], EmptyState.prototype, "illustration", void 0);
@@ -6267,7 +6484,7 @@ __decorate([
6267
6484
  r()
6268
6485
  ], EmptyState.prototype, "vertical", void 0);
6269
6486
 
6270
- var css_248z$p = i`* {
6487
+ var css_248z$q = i`* {
6271
6488
  box-sizing: border-box;
6272
6489
  }
6273
6490
 
@@ -6279,14 +6496,12 @@ var css_248z$p = i`* {
6279
6496
  position: absolute;
6280
6497
  top: 0;
6281
6498
  left: 0;
6282
- }
6283
- :host(:not([preview])) .tooltip {
6284
6499
  pointer-events: none;
6285
6500
  transition: transform var(--duration-short2) ease-in-out, opacity var(--duration-short2) ease-in-out;
6286
6501
  transform: scale(0);
6287
6502
  opacity: 0;
6288
6503
  }
6289
- :host(:not([preview])) .tooltip.open {
6504
+ :host(:not([preview])):host([open]) {
6290
6505
  pointer-events: auto;
6291
6506
  transform: scale(1);
6292
6507
  opacity: 1;
@@ -6467,7 +6682,6 @@ class Tooltip extends i$1 {
6467
6682
  return b ` <div
6468
6683
  class=${e$1({
6469
6684
  tooltip: true,
6470
- open: this.open,
6471
6685
  [`variant-${this.variant}`]: true,
6472
6686
  })}
6473
6687
  id="tooltip"
@@ -6505,7 +6719,7 @@ class Tooltip extends i$1 {
6505
6719
  `;
6506
6720
  }
6507
6721
  }
6508
- Tooltip.styles = [css_248z$p];
6722
+ Tooltip.styles = [css_248z$q];
6509
6723
  __decorate([
6510
6724
  n()
6511
6725
  ], Tooltip.prototype, "content", void 0);
@@ -6525,7 +6739,7 @@ __decorate([
6525
6739
  n({ type: Boolean, reflect: true })
6526
6740
  ], Tooltip.prototype, "preview", void 0);
6527
6741
 
6528
- var css_248z$o = i`* {
6742
+ var css_248z$p = i`* {
6529
6743
  box-sizing: border-box;
6530
6744
  }
6531
6745
 
@@ -6561,7 +6775,7 @@ ol {
6561
6775
  pointer-events: none;
6562
6776
  }`;
6563
6777
 
6564
- var css_248z$n = i`* {
6778
+ var css_248z$o = i`* {
6565
6779
  box-sizing: border-box;
6566
6780
  }
6567
6781
 
@@ -6623,7 +6837,6 @@ var css_248z$n = i`* {
6623
6837
  * @label Breadcrumb Item
6624
6838
  * @tag wc-breadcrumb-item
6625
6839
  * @rawTag breadcrumb-item
6626
- * @parentRawTag breadcrumb
6627
6840
  * @summary A breadcrumb item component that represents a single item in a breadcrumb navigation.
6628
6841
  * @tags navigation
6629
6842
  *
@@ -6691,7 +6904,7 @@ class BreadcrumbItem extends i$1 {
6691
6904
  `;
6692
6905
  }
6693
6906
  }
6694
- BreadcrumbItem.styles = [css_248z$n];
6907
+ BreadcrumbItem.styles = [css_248z$o];
6695
6908
  __decorate([
6696
6909
  n({ reflect: true })
6697
6910
  ], BreadcrumbItem.prototype, "href", void 0);
@@ -6744,13 +6957,13 @@ class Breadcrumb extends i$1 {
6744
6957
  </nav>`;
6745
6958
  }
6746
6959
  }
6747
- Breadcrumb.styles = [css_248z$o];
6960
+ Breadcrumb.styles = [css_248z$p];
6748
6961
  Breadcrumb.Item = BreadcrumbItem;
6749
6962
  __decorate([
6750
6963
  n({ type: String })
6751
6964
  ], Breadcrumb.prototype, "label", void 0);
6752
6965
 
6753
- var css_248z$m = i`* {
6966
+ var css_248z$n = i`* {
6754
6967
  box-sizing: border-box;
6755
6968
  }
6756
6969
 
@@ -6858,7 +7071,7 @@ var css_248z$m = i`* {
6858
7071
  --_container-color: var(--color-tertiary-container);
6859
7072
  }`;
6860
7073
 
6861
- var css_248z$l = i`* {
7074
+ var css_248z$m = i`* {
6862
7075
  box-sizing: border-box;
6863
7076
  }
6864
7077
 
@@ -6867,113 +7080,42 @@ var css_248z$l = i`* {
6867
7080
  }
6868
7081
 
6869
7082
  :host {
6870
- padding-inline: var(--spacing-050);
6871
7083
  outline: none;
7084
+ --menu-item-container-shape-start-start: var(--shape-corner-extra-small);
7085
+ --menu-item-container-shape-start-end: var(--shape-corner-extra-small);
7086
+ --menu-item-container-shape-end-start: var(--shape-corner-extra-small);
7087
+ --menu-item-container-shape-end-end: var(--shape-corner-extra-small);
6872
7088
  }
6873
7089
 
6874
7090
  .menu-item {
6875
- position: relative;
6876
- height: 3rem;
6877
- display: flex;
6878
- align-items: center;
6879
- padding-inline: 0.75rem;
6880
- outline: 0;
6881
- text-decoration: none;
6882
- font-family: var(--typography-label-large-font-family) !important;
6883
- font-size: var(--typography-label-large-font-size) !important;
6884
- font-weight: var(--typography-label-large-font-weight) !important;
6885
- line-height: var(--typography-label-large-line-height) !important;
6886
- letter-spacing: var(--typography-label-large-letter-spacing) !important;
6887
- }
6888
- .menu-item .menu-item-content {
6889
- display: flex;
6890
- align-items: center;
6891
- z-index: 1;
6892
- width: 100%;
6893
- gap: var(--spacing-100);
6894
- color: var(--_label-text-color);
6895
- opacity: var(--_label-text-opacity, 1);
6896
- --icon-size: var(--button-icon-size, var(--_button-icon-size));
6897
- --icon-color: var(--_label-text-color);
6898
- }
6899
- .menu-item .menu-item-content .slot-container {
6900
- flex: 1;
6901
- }
6902
- .menu-item .background {
6903
- display: block;
6904
- position: absolute;
6905
- left: 0;
6906
- top: 0;
6907
7091
  width: 100%;
6908
- height: 100%;
6909
- background-color: var(--_container-color);
6910
- opacity: var(--_container-opacity, 1);
6911
- border-start-start-radius: var(--_container-shape-start-start);
6912
- border-start-end-radius: var(--_container-shape-start-end);
6913
- border-end-start-radius: var(--_container-shape-end-start);
6914
- border-end-end-radius: var(--_container-shape-end-end);
6915
- corner-shape: var(--_container-corner-shape-variant);
6916
- pointer-events: none;
6917
- }
6918
- .menu-item {
6919
- /*
6920
- Background layers
6921
- */
6922
- }
6923
- .menu-item .focus-ring {
6924
- z-index: 2;
6925
- --focus-ring-container-shape-start-start: var(--_container-shape-start-start);
6926
- --focus-ring-container-shape-start-end: var(--_container-shape-start-end);
6927
- --focus-ring-container-shape-end-start: var(--_container-shape-end-start);
6928
- --focus-ring-container-shape-end-end: var(--_container-shape-end-end);
6929
- --focus-ring-container-shape-variant: var(--_container-corner-shape-variant);
6930
- }
6931
- .menu-item .ripple {
6932
- --ripple-state-opacity: var(--_container-state-opacity, 0);
6933
- --ripple-pressed-color: var(--_container-state-color);
6934
- border-start-start-radius: var(--_container-shape-start-start);
6935
- border-start-end-radius: var(--_container-shape-start-end);
6936
- border-end-start-radius: var(--_container-shape-end-start);
6937
- border-end-end-radius: var(--_container-shape-end-end);
6938
- corner-shape: var(--_container-corner-shape-variant);
6939
- }
6940
-
6941
- .menu-item {
6942
- --_container-shape-start-start: var(--menu-item-container-shape-start-start, var(--shape-corner-extra-small));
6943
- --_container-shape-start-end: var(--menu-item-container-shape-start-end, var(--shape-corner-extra-small));
6944
- --_container-shape-end-start: var(--menu-item-container-shape-end-start, var(--shape-corner-extra-small));
6945
- --_container-shape-end-end: var(--menu-item-container-shape-end-end, var(--shape-corner-extra-small));
6946
- --_container-corner-shape-variant: none;
6947
- --_label-text-color: var(--menu-item-label-color);
6948
- --_container-state-color: var(--_label-text-color);
6949
- }
6950
- .menu-item:hover:not(:where(.disabled, .selected)) {
6951
- --_container-state-opacity: 0.08;
6952
- }
6953
- .menu-item.pressed:not(:where(.disabled)) {
6954
- --_container-state-opacity: 0.12;
6955
- }
6956
- .menu-item.selected {
6957
- --_container-color: var(--menu-item-container-selected-color);
6958
- --_label-text-color: var(--menu-item-label-selected-color);
6959
- --_container-shape-start-start: var(--shape-corner-large);
6960
- --_container-shape-start-end: var(--shape-corner-large);
6961
- --_container-shape-end-start: var(--shape-corner-large);
6962
- --_container-shape-end-end: var(--shape-corner-large);
6963
- --_container-corner-shape-variant: none;
6964
- }
6965
- .menu-item.disabled {
6966
- cursor: not-allowed;
6967
- --_container-color: var(--color-on-surface);
6968
- --_container-opacity: 0.1;
6969
- --_label-text-color: var(--color-on-surface);
6970
- --_label-text-opacity: 0.38;
6971
- }
6972
- .menu-item.disabled .ripple {
6973
- display: none;
7092
+ --item-height: 3rem;
7093
+ --item-container-shape-start-start: var(--menu-item-container-shape-start-start);
7094
+ --item-container-shape-start-end: var(--menu-item-container-shape-start-end);
7095
+ --item-container-shape-end-start: var(--menu-item-container-shape-end-start);
7096
+ --item-container-shape-end-end: var(--menu-item-container-shape-end-end);
7097
+ --item-container-shape-variant: none;
7098
+ --item-label-font-family: var(--typography-label-large-font-family);
7099
+ --item-label-font-size: var(--typography-label-large-font-size);
7100
+ --item-label-font-weight: var(--typography-label-large-font-weight);
7101
+ --item-label-line-height: var(--typography-label-large-line-height);
7102
+ --item-label-letter-spacing: var(--typography-label-large-letter-spacing);
7103
+ --item-label-text-color: var(--menu-item-label-color);
7104
+ --item-leading-trailing-color: var(--menu-item-label-color);
7105
+ --item-supporting-text-color: var(--menu-item-label-color);
7106
+ --item-container-selected-color: var(--menu-item-container-selected-color);
7107
+ --item-label-text-selected-color: var(--menu-item-label-selected-color);
7108
+ --item-icon-size: var(--button-icon-size, var(--_button-icon-size));
7109
+ }
7110
+
7111
+ :host([selected]) {
7112
+ --menu-item-container-shape-start-start: var(--shape-corner-large);
7113
+ --menu-item-container-shape-start-end: var(--shape-corner-large);
7114
+ --menu-item-container-shape-end-start: var(--shape-corner-large);
7115
+ --menu-item-container-shape-end-end: var(--shape-corner-large);
6974
7116
  }`;
6975
7117
 
6976
- var css_248z$k = i`:host-context([variant=standard]) {
7118
+ var css_248z$l = i`:host-context([variant=standard]) {
6977
7119
  --menu-item-label-color: var(--color-on-surface-variant);
6978
7120
  --menu-item-label-selected-color: var(--color-on-tertiary-container);
6979
7121
  --menu-item-container-selected-color: var(--color-tertiary-container);
@@ -6989,7 +7131,6 @@ var css_248z$k = i`:host-context([variant=standard]) {
6989
7131
  * @label Menu Item
6990
7132
  * @tag wc-menu-item
6991
7133
  * @rawTag menu-item
6992
- * @parentRawTag menu
6993
7134
  * @summary An item in a menu list.
6994
7135
  * @tags navigation
6995
7136
  *
@@ -6998,7 +7139,7 @@ var css_248z$k = i`:host-context([variant=standard]) {
6998
7139
  * <wc-menu-item>Menu Item</wc-menu-item>
6999
7140
  * ```
7000
7141
  */
7001
- class MenuItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
7142
+ class MenuItem extends NativeButtonMixin(NativeHyperlinkMixin(i$1)) {
7002
7143
  constructor() {
7003
7144
  super(...arguments);
7004
7145
  this.value = '';
@@ -7007,144 +7148,108 @@ class MenuItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
7007
7148
  this.hasSubmenu = false;
7008
7149
  this.submenuOpen = false;
7009
7150
  this.variant = 'standard';
7010
- /**
7011
- * States
7012
- */
7013
- this.isPressed = false;
7014
- this.__dispatchClickWithThrottle = event => {
7015
- this.__dispatchClick(event);
7016
- };
7017
- this.__dispatchClick = (event) => {
7018
- // If the button is soft-disabled or a disabled link, we need to explicitly
7019
- // prevent the click from propagating to other event listeners as well as
7020
- // prevent the default action.
7021
- if (this.softDisabled || (this.disabled && this.href)) {
7022
- event.stopImmediatePropagation();
7023
- event.preventDefault();
7024
- return;
7025
- }
7026
- if (!isActivationClick(event) || !this.itemElement) {
7027
- return;
7028
- }
7029
- this.focus();
7030
- dispatchActivationClick(this.itemElement);
7031
- };
7032
- this.__handleKeyDown = (event) => {
7033
- this.__handlePress(event);
7034
- if (this.disabled || this.softDisabled || !this.itemElement) {
7035
- return;
7036
- }
7037
- if (event.key === ' ') {
7038
- event.preventDefault();
7039
- this.itemElement.click();
7040
- return;
7041
- }
7042
- if (event.key === 'Enter' && !this.__isLink()) {
7043
- event.preventDefault();
7044
- this.itemElement.click();
7045
- }
7046
- };
7047
- this.__handlePress = (event) => {
7048
- if (this.disabled || this.softDisabled)
7049
- return;
7050
- if (event instanceof KeyboardEvent &&
7051
- event.type === 'keydown' &&
7052
- (event.key === 'Enter' || event.key === ' ')) {
7053
- this.isPressed = true;
7054
- }
7055
- else if (event.type === 'mousedown') {
7056
- this.isPressed = true;
7057
- }
7058
- else {
7059
- this.isPressed = false;
7060
- }
7061
- };
7151
+ this._contentObserver = new MutationObserver(() => {
7152
+ this.requestUpdate();
7153
+ });
7154
+ this._rovingTabIndex = -1;
7062
7155
  }
7063
7156
  connectedCallback() {
7064
7157
  // eslint-disable-next-line wc/guard-super-call
7065
7158
  super.connectedCallback();
7066
- if (!this.hasAttribute('role')) {
7067
- this.setAttribute('role', 'menuitem');
7068
- }
7069
- this.addEventListener('click', this.__dispatchClickWithThrottle);
7070
- window.addEventListener('mouseup', this.__handlePress);
7159
+ this._contentObserver.observe(this, {
7160
+ subtree: true,
7161
+ childList: true,
7162
+ characterData: true,
7163
+ attributes: true,
7164
+ attributeFilter: ['slot'],
7165
+ });
7071
7166
  }
7072
7167
  disconnectedCallback() {
7073
- window.removeEventListener('mouseup', this.__handlePress);
7074
- this.removeEventListener('click', this.__dispatchClickWithThrottle);
7168
+ this._contentObserver.disconnect();
7075
7169
  super.disconnectedCallback();
7076
7170
  }
7171
+ get tabIndex() {
7172
+ return this._rovingTabIndex;
7173
+ }
7174
+ set tabIndex(value) {
7175
+ this._rovingTabIndex = value;
7176
+ this.requestUpdate();
7177
+ }
7077
7178
  focus() {
7078
7179
  this.itemElement?.focus();
7079
7180
  }
7080
7181
  blur() {
7081
7182
  this.itemElement?.blur();
7082
7183
  }
7184
+ _hasNamedSlot(...names) {
7185
+ return names.some(name => Array.from(this.children).some(child => child.getAttribute('slot') === name));
7186
+ }
7187
+ _hasDefaultSlot() {
7188
+ return Array.from(this.childNodes).some(node => {
7189
+ if (node.nodeType === Node.TEXT_NODE) {
7190
+ return Boolean(node.textContent?.trim());
7191
+ }
7192
+ return (node.nodeType === Node.ELEMENT_NODE &&
7193
+ !node.hasAttribute('slot'));
7194
+ });
7195
+ }
7083
7196
  render() {
7084
- const isLink = this.__isLink();
7085
- const cssClasses = {
7086
- 'menu-item': true,
7087
- disabled: this.disabled,
7088
- selected: this.selected,
7089
- pressed: this.isPressed,
7090
- };
7091
7197
  const controls = this.getAttribute('aria-controls');
7092
- if (isLink) {
7093
- return b `<a
7198
+ return b `
7199
+ <wc-item
7094
7200
  id="item"
7095
- class=${e$1(cssClasses)}
7096
- href=${this.href}
7097
- target=${this.target}
7098
- tabindex=${this.disabled ? '-1' : '0'}
7099
-
7100
- @click=${this.__dispatchClickWithThrottle}
7101
- @mousedown=${this.__handlePress}
7102
- @keydown=${this.__handleKeyDown}
7103
- @keyup=${this.__handlePress}
7104
-
7105
- aria-disabled=${String(this.disabled)}
7201
+ class="menu-item"
7202
+ role="menuitem"
7203
+ tabindex=${String(this.tabIndex)}
7204
+ ?selected=${this.selected}
7205
+ ?disabled=${this.disabled}
7206
+ .softDisabled=${this.softDisabled}
7207
+ .htmlType=${this.htmlType}
7208
+ .href=${this.href}
7209
+ .target=${this.target}
7210
+ .rel=${this.rel}
7211
+ .download=${this.download}
7106
7212
  aria-haspopup=${this.hasSubmenu ? 'menu' : A}
7107
- aria-controls=${this.hasSubmenu && controls ? controls : A}
7108
- aria-expanded=${this.hasSubmenu ? String(this.submenuOpen) : A}
7213
+ aria-controls=${o$1(this.hasSubmenu && controls ? controls : undefined)}
7214
+ aria-expanded=${o$1(this.hasSubmenu ? String(this.submenuOpen) : undefined)}
7109
7215
  >
7110
7216
  ${this.renderContent()}
7111
- </a> `;
7112
- }
7113
- return b `<div
7114
- id="item"
7115
- class=${e$1(cssClasses)}
7116
- tabindex=${this.disabled ? '-1' : '0'}
7117
-
7118
- @click=${this.__dispatchClick}
7119
- @mousedown=${this.__handlePress}
7120
- @keydown=${this.__handleKeyDown}
7121
- @keyup=${this.__handlePress}
7122
-
7123
- aria-disabled=${String(this.disabled)}
7124
- aria-haspopup=${this.hasSubmenu ? 'menu' : A}
7125
- aria-controls=${this.hasSubmenu && controls ? controls : A}
7126
- aria-expanded=${this.hasSubmenu ? String(this.submenuOpen) : A}
7127
- >
7128
- ${this.renderContent()}
7129
- </div>`;
7217
+ </wc-item>
7218
+ `;
7130
7219
  }
7131
7220
  renderContent() {
7221
+ const hasStart = this._hasNamedSlot('start');
7222
+ const hasOverline = this._hasNamedSlot('overline');
7223
+ const hasHeadline = this._hasNamedSlot('headline');
7224
+ const hasDefault = this._hasDefaultSlot();
7225
+ const hasSupportingText = this._hasNamedSlot('supporting-text');
7226
+ const hasTrailingSupportingText = this._hasNamedSlot('trailing-supporting-text');
7227
+ const hasEnd = this._hasNamedSlot('end');
7132
7228
  return b `
7133
- <wc-focus-ring class="focus-ring" for='item'></wc-focus-ring>
7134
- <div class="background"></div>
7135
- <wc-ripple class="ripple"></wc-ripple>
7136
-
7137
- <div class="menu-item-content" data-variant=${this.variant}>
7138
- <slot name="leading-icon"></slot>
7139
- <div class="slot-container">
7140
- <slot></slot>
7141
- </div>
7142
- <slot name="trailing-supporting-text"></slot>
7143
- </div>
7229
+ ${hasStart ? b `<slot name="start" slot="start"></slot>` : A}
7230
+ ${hasOverline
7231
+ ? b `<slot name="overline" slot="overline"></slot>`
7232
+ : A}
7233
+ ${hasHeadline
7234
+ ? b `<slot name="headline" slot="headline"></slot>`
7235
+ : A}
7236
+ ${hasDefault ? b `<slot></slot>` : A}
7237
+ ${hasSupportingText
7238
+ ? b `<slot name="supporting-text" slot="supporting-text"></slot>`
7239
+ : A}
7240
+ ${hasTrailingSupportingText
7241
+ ? b `
7242
+ <slot
7243
+ name="trailing-supporting-text"
7244
+ slot="trailing-supporting-text"
7245
+ ></slot>
7246
+ `
7247
+ : A}
7248
+ ${hasEnd ? b `<slot name="end" slot="end"></slot>` : A}
7144
7249
  `;
7145
7250
  }
7146
7251
  }
7147
- MenuItem.styles = [css_248z$l, css_248z$k];
7252
+ MenuItem.styles = [css_248z$m, css_248z$l];
7148
7253
  __decorate([
7149
7254
  n({ type: String })
7150
7255
  ], MenuItem.prototype, "value", void 0);
@@ -7164,11 +7269,8 @@ __decorate([
7164
7269
  n({ type: String, reflect: true })
7165
7270
  ], MenuItem.prototype, "variant", void 0);
7166
7271
  __decorate([
7167
- e$2('#item')
7272
+ e$2('wc-item')
7168
7273
  ], MenuItem.prototype, "itemElement", void 0);
7169
- __decorate([
7170
- r()
7171
- ], MenuItem.prototype, "isPressed", void 0);
7172
7274
 
7173
7275
  /**
7174
7276
  * @label Menu
@@ -7409,8 +7511,7 @@ class Menu extends i$1 {
7409
7511
  }
7410
7512
  _isEventFromThisMenu(event) {
7411
7513
  const path = event.composedPath();
7412
- const sourceMenu = path.find(target => target instanceof HTMLElement &&
7413
- target.tagName.toLowerCase() === 'wc-menu');
7514
+ const sourceMenu = path.find(target => target instanceof Menu);
7414
7515
  return sourceMenu === this;
7415
7516
  }
7416
7517
  _ownedItemFromEvent(event) {
@@ -7420,12 +7521,10 @@ class Menu extends i$1 {
7420
7521
  const path = event.composedPath();
7421
7522
  const ownedItems = this.items;
7422
7523
  for (const target of path) {
7423
- if (target instanceof HTMLElement) {
7424
- if (target.tagName.toLowerCase() === 'wc-menu-item') {
7425
- const ownedItem = ownedItems.find(item => item === target);
7426
- if (ownedItem) {
7427
- return ownedItem;
7428
- }
7524
+ if (target instanceof MenuItem) {
7525
+ const ownedItem = ownedItems.find(item => item === target);
7526
+ if (ownedItem) {
7527
+ return ownedItem;
7429
7528
  }
7430
7529
  }
7431
7530
  }
@@ -7528,7 +7627,7 @@ class Menu extends i$1 {
7528
7627
  </div>`;
7529
7628
  }
7530
7629
  }
7531
- Menu.styles = [css_248z$m];
7630
+ Menu.styles = [css_248z$n];
7532
7631
  Menu.Item = MenuItem;
7533
7632
  __decorate([
7534
7633
  n({ type: Boolean, reflect: true })
@@ -7564,7 +7663,7 @@ __decorate([
7564
7663
  e$2('.menu')
7565
7664
  ], Menu.prototype, "menuListElement", void 0);
7566
7665
 
7567
- var css_248z$j = i`* {
7666
+ var css_248z$k = i`* {
7568
7667
  box-sizing: border-box;
7569
7668
  }
7570
7669
 
@@ -7581,7 +7680,6 @@ let subMenuIdCounter = 0;
7581
7680
  * @label Sub Menu
7582
7681
  * @tag wc-sub-menu
7583
7682
  * @rawTag sub-menu
7584
- * @parentRawTag menu
7585
7683
  * @summary Connects a menu item to a nested menu.
7586
7684
  */
7587
7685
  class SubMenu extends i$1 {
@@ -7627,7 +7725,7 @@ class SubMenu extends i$1 {
7627
7725
  menu.addEventListener('opened', this._onChildMenuOpened);
7628
7726
  menu.addEventListener('closed', this._onChildMenuClosed);
7629
7727
  menu.isSubmenu = true;
7630
- menu.anchorElement = item;
7728
+ menu.anchorElement = this._resolveAnchorElement(item);
7631
7729
  menu.placement =
7632
7730
  getComputedStyle(this).direction === 'rtl' ? 'left-start' : 'right-start';
7633
7731
  menu.offset = 4;
@@ -7698,6 +7796,9 @@ class SubMenu extends i$1 {
7698
7796
  }, this.hoverCloseDelay);
7699
7797
  };
7700
7798
  }
7799
+ _resolveAnchorElement(item) {
7800
+ return item.itemElement?.itemElement ?? item.itemElement ?? item;
7801
+ }
7701
7802
  get item() {
7702
7803
  const [candidate] = this._items ?? [];
7703
7804
  return candidate instanceof MenuItem ? candidate : null;
@@ -7726,7 +7827,7 @@ class SubMenu extends i$1 {
7726
7827
  if (!item || !menu) {
7727
7828
  return;
7728
7829
  }
7729
- menu.anchorElement = item;
7830
+ menu.anchorElement = this._resolveAnchorElement(item);
7730
7831
  menu.isSubmenu = true;
7731
7832
  menu.show();
7732
7833
  item.hasSubmenu = true;
@@ -7759,7 +7860,7 @@ class SubMenu extends i$1 {
7759
7860
  `;
7760
7861
  }
7761
7862
  }
7762
- SubMenu.styles = [css_248z$j];
7863
+ SubMenu.styles = [css_248z$k];
7763
7864
  __decorate([
7764
7865
  n({ type: Number, attribute: 'hover-open-delay' })
7765
7866
  ], SubMenu.prototype, "hoverOpenDelay", void 0);
@@ -7779,7 +7880,7 @@ __decorate([
7779
7880
  o({ slot: 'menu' })
7780
7881
  ], SubMenu.prototype, "_menus", void 0);
7781
7882
 
7782
- var css_248z$i = i`* {
7883
+ var css_248z$j = i`* {
7783
7884
  box-sizing: border-box;
7784
7885
  }
7785
7886
 
@@ -7808,7 +7909,7 @@ var css_248z$i = i`* {
7808
7909
  --_container-color: var(--color-tertiary-container);
7809
7910
  }`;
7810
7911
 
7811
- var css_248z$h = i`* {
7912
+ var css_248z$i = i`* {
7812
7913
  box-sizing: border-box;
7813
7914
  }
7814
7915
 
@@ -7861,84 +7962,493 @@ var css_248z$h = i`* {
7861
7962
  .item-element .trailing {
7862
7963
  margin-inline-start: auto;
7863
7964
  }
7864
- .item-element .content {
7865
- display: block;
7866
- flex: 1;
7867
- min-inline-size: 0;
7965
+ .item-element .content {
7966
+ display: block;
7967
+ flex: 1;
7968
+ min-inline-size: 0;
7969
+ }
7970
+ .item-element .background {
7971
+ position: absolute;
7972
+ inset: 0;
7973
+ background-color: var(--_container-color);
7974
+ opacity: var(--_container-opacity, 1);
7975
+ border-radius: var(--shape-corner-medium);
7976
+ pointer-events: none;
7977
+ }
7978
+ .item-element .focus-ring {
7979
+ --focus-ring-container-shape-start-start: var(--shape-corner-medium);
7980
+ --focus-ring-container-shape-start-end: var(--shape-corner-medium);
7981
+ --focus-ring-container-shape-end-start: var(--shape-corner-medium);
7982
+ --focus-ring-container-shape-end-end: var(--shape-corner-medium);
7983
+ z-index: 2;
7984
+ }
7985
+ .item-element .ripple {
7986
+ --ripple-state-opacity: var(--_container-state-opacity, 0);
7987
+ --ripple-pressed-color: var(--_container-state-color);
7988
+ border-radius: var(--shape-corner-medium);
7989
+ }
7990
+
7991
+ .item-element {
7992
+ --_container-color: transparent;
7993
+ --_label-text-color: var(--color-on-surface);
7994
+ --_leading-trailing-color: var(--color-on-surface-variant);
7995
+ --_container-state-color: var(--color-on-surface);
7996
+ }
7997
+ .item-element:hover:not(:where(.disabled, .selected)) {
7998
+ --_container-state-opacity: 0.08;
7999
+ }
8000
+ .item-element.pressed:not(:where(.disabled)) {
8001
+ --_container-state-opacity: 0.12;
8002
+ }
8003
+ .item-element.selected {
8004
+ --_container-color: var(--color-secondary-container);
8005
+ --_label-text-color: var(--color-on-secondary-container);
8006
+ --_leading-trailing-color: var(--color-on-secondary-container);
8007
+ --_container-state-color: var(--color-on-secondary-container);
8008
+ }
8009
+ .item-element.disabled {
8010
+ cursor: not-allowed;
8011
+ --_label-text-color: var(--color-on-surface);
8012
+ --_label-text-opacity: 0.38;
8013
+ --_leading-trailing-color: var(--color-on-surface);
8014
+ --_container-opacity: 0.12;
8015
+ }
8016
+ .item-element.disabled .ripple {
8017
+ display: none;
8018
+ }`;
8019
+
8020
+ /**
8021
+ * @label List Item
8022
+ * @tag wc-list-item
8023
+ * @rawTag list-item
8024
+ *
8025
+ * @summary A Material 3 list item with leading, trailing and content slots.
8026
+ *
8027
+ * @example
8028
+ * ```html
8029
+ * <wc-list-item selected>
8030
+ * <wc-icon slot="leading" name="person"></wc-icon>
8031
+ * Profile
8032
+ * <wc-icon slot="trailing" name="chevron_right"></wc-icon>
8033
+ * </wc-list-item>
8034
+ * ```
8035
+ * @tags display
8036
+ */
8037
+ class ListItem extends NativeButtonMixin(NativeHyperlinkMixin(i$1)) {
8038
+ constructor() {
8039
+ super(...arguments);
8040
+ this.selected = false;
8041
+ this.isPressed = false;
8042
+ this.__dispatchClick = (event) => {
8043
+ if (this.softDisabled || (this.disabled && this.href)) {
8044
+ event.stopImmediatePropagation();
8045
+ event.preventDefault();
8046
+ return;
8047
+ }
8048
+ if (!isActivationClick(event) || !this.itemElement) {
8049
+ return;
8050
+ }
8051
+ this.focus();
8052
+ dispatchActivationClick(this.itemElement);
8053
+ };
8054
+ this.__handleKeyDown = (event) => {
8055
+ this.__handlePress(event);
8056
+ if (this.disabled || this.softDisabled || !this.itemElement) {
8057
+ return;
8058
+ }
8059
+ if (event.key === ' ') {
8060
+ event.preventDefault();
8061
+ this.itemElement.click();
8062
+ return;
8063
+ }
8064
+ if (event.key === 'Enter' && !isLink(this)) {
8065
+ event.preventDefault();
8066
+ this.itemElement.click();
8067
+ }
8068
+ };
8069
+ this.__handlePress = (event) => {
8070
+ if (this.disabled || this.softDisabled)
8071
+ return;
8072
+ if (event instanceof KeyboardEvent &&
8073
+ event.type === 'keydown' &&
8074
+ (event.key === 'Enter' || event.key === ' ')) {
8075
+ this.isPressed = true;
8076
+ }
8077
+ else if (event.type === 'mousedown') {
8078
+ this.isPressed = true;
8079
+ }
8080
+ else {
8081
+ this.isPressed = false;
8082
+ }
8083
+ };
8084
+ }
8085
+ connectedCallback() {
8086
+ // eslint-disable-next-line wc/guard-super-call
8087
+ super.connectedCallback();
8088
+ if (!this.hasAttribute('role')) {
8089
+ this.setAttribute('role', 'listitem');
8090
+ }
8091
+ }
8092
+ focus() {
8093
+ this.itemElement?.focus();
8094
+ }
8095
+ blur() {
8096
+ this.itemElement?.blur();
8097
+ }
8098
+ render() {
8099
+ const cssClasses = {
8100
+ 'list-item': true,
8101
+ 'item-element': true,
8102
+ selected: this.selected,
8103
+ disabled: this.disabled || this.softDisabled,
8104
+ pressed: this.isPressed,
8105
+ };
8106
+ if (!isLink(this)) {
8107
+ return b `
8108
+ <button
8109
+ id="item"
8110
+ class=${e$1(cssClasses)}
8111
+ type=${this.htmlType}
8112
+ ?disabled=${this.disabled}
8113
+ ?aria-disabled=${this.softDisabled}
8114
+ @click=${this.__dispatchClick}
8115
+ @mousedown=${this.__handlePress}
8116
+ @keydown=${this.__handleKeyDown}
8117
+ @keyup=${this.__handlePress}
8118
+ >
8119
+ ${this.renderContent()}
8120
+ </button>
8121
+ `;
8122
+ }
8123
+ return b `
8124
+ <a
8125
+ id="item"
8126
+ class=${e$1(cssClasses)}
8127
+ href=${this.href}
8128
+ target=${this.target}
8129
+ rel=${o$1(this.rel)}
8130
+ download=${o$1(this.download)}
8131
+ tabindex=${this.disabled ? '-1' : '0'}
8132
+ aria-disabled=${String(this.disabled || this.softDisabled)}
8133
+ @click=${this.__dispatchClick}
8134
+ @mousedown=${this.__handlePress}
8135
+ @keydown=${this.__handleKeyDown}
8136
+ @keyup=${this.__handlePress}
8137
+ >
8138
+ ${this.renderContent()}
8139
+ </a>
8140
+ `;
8141
+ }
8142
+ renderContent() {
8143
+ return b `
8144
+ <wc-focus-ring class="focus-ring" for="item"></wc-focus-ring>
8145
+ <div class="background"></div>
8146
+ <wc-ripple class="ripple"></wc-ripple>
8147
+
8148
+ <div class="list-item-content">
8149
+ <div class="leading">
8150
+ <slot name="leading"></slot>
8151
+ </div>
8152
+ <div class="content">
8153
+ <slot></slot>
8154
+ </div>
8155
+ <div class="trailing">
8156
+ <slot name="trailing"></slot>
8157
+ </div>
8158
+ </div>
8159
+ `;
8160
+ }
8161
+ }
8162
+ ListItem.styles = [css_248z$i];
8163
+ __decorate([
8164
+ n({ type: Boolean, reflect: true })
8165
+ ], ListItem.prototype, "selected", void 0);
8166
+ __decorate([
8167
+ e$2('#item')
8168
+ ], ListItem.prototype, "itemElement", void 0);
8169
+ __decorate([
8170
+ r()
8171
+ ], ListItem.prototype, "isPressed", void 0);
8172
+
8173
+ /**
8174
+ * @label List
8175
+ * @tag wc-list
8176
+ * @rawTag list
8177
+ *
8178
+ * @summary A Material 3 list container for one or more list items.
8179
+ *
8180
+ * @example
8181
+ * ```html
8182
+ * <wc-list>
8183
+ * <wc-list-item>
8184
+ * <wc-icon slot="leading" name="inbox"></wc-icon>
8185
+ * Inbox
8186
+ * <span slot="trailing">24</span>
8187
+ * </wc-list-item>
8188
+ * </wc-list>
8189
+ * ```
8190
+ * @tags display
8191
+ */
8192
+ class List extends i$1 {
8193
+ constructor() {
8194
+ super(...arguments);
8195
+ this.variant = 'standard';
8196
+ }
8197
+ connectedCallback() {
8198
+ super.connectedCallback();
8199
+ this.setAttribute('role', 'list');
8200
+ }
8201
+ render() {
8202
+ const cssClasses = {
8203
+ list: true,
8204
+ [`variant-${this.variant}`]: true,
8205
+ };
8206
+ return b `
8207
+ <div class=${e$1(cssClasses)}>
8208
+ <slot></slot>
8209
+ </div>
8210
+ `;
8211
+ }
8212
+ }
8213
+ List.styles = [css_248z$j];
8214
+ List.Item = ListItem;
8215
+ __decorate([
8216
+ n({ type: String, reflect: true })
8217
+ ], List.prototype, "variant", void 0);
8218
+
8219
+ var css_248z$h = i`* {
8220
+ box-sizing: border-box;
8221
+ }
8222
+
8223
+ .screen-reader-only {
8224
+ display: none !important;
8225
+ }
8226
+
8227
+ :host {
8228
+ position: relative;
8229
+ display: block;
8230
+ padding-inline: var(--spacing-050);
8231
+ --item-height: 3.5rem;
8232
+ --item-container-color: transparent;
8233
+ --item-label-text-color: var(--color-on-surface);
8234
+ --item-leading-trailing-color: var(--color-on-surface-variant);
8235
+ --item-supporting-text-color: var(--color-on-surface-variant);
8236
+ --item-container-selected-color: var(--color-tertiary-container);
8237
+ --item-label-text-selected-color: var(--color-on-tertiary-container);
8238
+ --private-item-container-color: var(--item-container-color);
8239
+ --private-item-label-text-color: var(--item-label-text-color);
8240
+ --private-item-leading-trailing-color: var(--item-leading-trailing-color);
8241
+ --private-item-supporting-text-color: var(--item-supporting-text-color);
8242
+ --private-item-container-state-color: var(--private-item-label-text-color);
8243
+ --private-item-container-shape-start-start: var(--item-container-shape-start-start, var(--shape-corner-extra-small));
8244
+ --private-item-container-shape-start-end: var(--item-container-shape-start-end, var(--shape-corner-extra-small));
8245
+ --private-item-container-shape-end-start: var(--item-container-shape-end-start, var(--shape-corner-extra-small));
8246
+ --private-item-container-shape-end-end: var(--item-container-shape-end-end, var(--shape-corner-extra-small));
8247
+ --private-item-container-shape-variant: var(--item-container-shape-variant, none);
8248
+ }
8249
+
8250
+ /**
8251
+ * Reset native button/link styles
8252
+ */
8253
+ .native-button {
8254
+ background: transparent;
8255
+ border: none;
8256
+ appearance: none;
8257
+ margin: 0;
8258
+ outline: none;
8259
+ padding: 0;
8260
+ }
8261
+
8262
+ .native-link {
8263
+ text-decoration: none;
8264
+ color: inherit;
8265
+ cursor: pointer;
8266
+ }
8267
+ .native-link:link, .native-link:visited, .native-link:hover, .native-link:active {
8268
+ text-decoration: none;
8269
+ color: inherit;
8270
+ }
8271
+
8272
+ .item {
8273
+ min-height: var(--item-height);
8274
+ width: 100%;
8275
+ background: transparent;
8276
+ text-align: initial;
8277
+ cursor: pointer;
8278
+ z-index: 0;
8279
+ font-family: var(--item-label-font-family, var(--typography-body-large-font-family)) !important;
8280
+ font-size: var(--item-label-font-size, var(--typography-body-large-font-size)) !important;
8281
+ font-weight: var(--item-label-font-weight, var(--typography-body-large-font-weight)) !important;
8282
+ line-height: var(--item-label-line-height, var(--typography-body-large-line-height)) !important;
8283
+ letter-spacing: var(--item-label-letter-spacing, var(--typography-body-large-letter-spacing)) !important;
8284
+ }
8285
+ .item .item-content {
8286
+ position: relative;
8287
+ z-index: 1;
8288
+ display: flex;
8289
+ align-items: center;
8290
+ gap: var(--spacing-200);
8291
+ min-height: var(--item-height);
8292
+ padding-inline: var(--spacing-200);
8293
+ color: var(--private-item-label-text-color);
8294
+ opacity: var(--private-item-label-text-opacity, 1);
8295
+ --icon-size: var(--item-icon-size, 1.5rem);
8296
+ --icon-color: var(--private-item-leading-trailing-color);
8297
+ }
8298
+ .item .start,
8299
+ .item .end {
8300
+ display: inline-flex;
8301
+ align-items: center;
8302
+ justify-content: center;
8303
+ color: var(--private-item-leading-trailing-color);
8304
+ }
8305
+ .item .end {
8306
+ margin-inline-start: auto;
8307
+ }
8308
+ .item .content {
8309
+ display: flex;
8310
+ flex: 1;
8311
+ flex-direction: column;
8312
+ justify-content: center;
8313
+ gap: 0.125rem;
8314
+ min-inline-size: 0;
8315
+ }
8316
+ .item .headline-row {
8317
+ display: flex;
8318
+ min-inline-size: 0;
8319
+ }
8320
+ .item .headline,
8321
+ .item .overline,
8322
+ .item .supporting-text,
8323
+ .item .trailing-supporting-text {
8324
+ min-inline-size: 0;
8325
+ }
8326
+ .item .headline {
8327
+ flex: 1;
8328
+ color: var(--private-item-label-text-color);
8329
+ }
8330
+ .item .overline,
8331
+ .item .supporting-text,
8332
+ .item .trailing-supporting-text {
8333
+ color: var(--private-item-supporting-text-color);
8334
+ }
8335
+ .item .overline {
8336
+ font-family: var(--typography-label-small-font-family) !important;
8337
+ font-size: var(--typography-label-small-font-size) !important;
8338
+ font-weight: var(--typography-label-small-font-weight) !important;
8339
+ line-height: var(--typography-label-small-line-height) !important;
8340
+ letter-spacing: var(--typography-label-small-letter-spacing) !important;
8341
+ }
8342
+ .item .supporting-text,
8343
+ .item .trailing-supporting-text {
8344
+ font-family: var(--typography-body-medium-font-family) !important;
8345
+ font-size: var(--typography-body-medium-font-size) !important;
8346
+ font-weight: var(--typography-body-medium-font-weight) !important;
8347
+ line-height: var(--typography-body-medium-line-height) !important;
8348
+ letter-spacing: var(--typography-body-medium-letter-spacing) !important;
8349
+ }
8350
+ .item .trailing-supporting-text {
8351
+ display: inline-flex;
8352
+ align-items: center;
8353
+ white-space: nowrap;
8354
+ color: var(--private-item-supporting-text-color);
7868
8355
  }
7869
- .item-element .background {
8356
+
8357
+ /*
8358
+ Background layers
8359
+ */
8360
+ .background {
7870
8361
  position: absolute;
7871
8362
  inset: 0;
7872
- background-color: var(--_container-color);
7873
- opacity: var(--_container-opacity, 1);
7874
- border-radius: var(--shape-corner-medium);
8363
+ background-color: var(--private-item-container-color);
8364
+ opacity: var(--private-item-container-opacity, 1);
7875
8365
  pointer-events: none;
8366
+ border-start-start-radius: var(--private-item-container-shape-start-start, var(--private-item-container-shape));
8367
+ border-start-end-radius: var(--private-item-container-shape-start-end, var(--private-item-container-shape));
8368
+ border-end-start-radius: var(--private-item-container-shape-end-start, var(--private-item-container-shape));
8369
+ border-end-end-radius: var(--private-item-container-shape-end-end, var(--private-item-container-shape));
8370
+ corner-shape: var(--private-item-container-shape-variant);
7876
8371
  }
7877
- .item-element .focus-ring {
7878
- --focus-ring-container-shape-start-start: var(--shape-corner-medium);
7879
- --focus-ring-container-shape-start-end: var(--shape-corner-medium);
7880
- --focus-ring-container-shape-end-start: var(--shape-corner-medium);
7881
- --focus-ring-container-shape-end-end: var(--shape-corner-medium);
8372
+
8373
+ .focus-ring {
7882
8374
  z-index: 2;
7883
- }
7884
- .item-element .ripple {
7885
- --ripple-state-opacity: var(--_container-state-opacity, 0);
7886
- --ripple-pressed-color: var(--_container-state-color);
7887
- border-radius: var(--shape-corner-medium);
8375
+ --focus-ring-container-shape-start-start: var(--private-item-container-shape-start-start, var(--private-item-container-shape));
8376
+ --focus-ring-container-shape-start-end: var(--private-item-container-shape-start-end, var(--private-item-container-shape));
8377
+ --focus-ring-container-shape-end-start: var(--private-item-container-shape-end-start, var(--private-item-container-shape));
8378
+ --focus-ring-container-shape-end-end: var(--private-item-container-shape-end-end, var(--private-item-container-shape));
8379
+ --focus-ring-container-shape-variant: var(--private-item-container-shape-variant);
7888
8380
  }
7889
8381
 
7890
- .item-element {
7891
- --_container-color: transparent;
7892
- --_label-text-color: var(--color-on-surface);
7893
- --_leading-trailing-color: var(--color-on-surface-variant);
7894
- --_container-state-color: var(--color-on-surface);
8382
+ .ripple {
8383
+ border-start-start-radius: var(--private-item-container-shape-start-start, var(--private-item-container-shape));
8384
+ border-start-end-radius: var(--private-item-container-shape-start-end, var(--private-item-container-shape));
8385
+ border-end-start-radius: var(--private-item-container-shape-end-start, var(--private-item-container-shape));
8386
+ border-end-end-radius: var(--private-item-container-shape-end-end, var(--private-item-container-shape));
8387
+ corner-shape: var(--private-item-container-shape-variant);
8388
+ --ripple-state-opacity: var(--private-item-container-state-opacity, 0);
8389
+ --ripple-pressed-color: var(--private-item-container-state-color);
7895
8390
  }
7896
- .item-element:hover:not(:where(.disabled, .selected)) {
7897
- --_container-state-opacity: 0.08;
8391
+
8392
+ /* State management */
8393
+ :host:hover:not([disabled], [selected]) {
8394
+ --private-item-container-state-opacity: 0.08;
7898
8395
  }
7899
- .item-element.pressed:not(:where(.disabled)) {
7900
- --_container-state-opacity: 0.12;
8396
+
8397
+ :host:has(.item.pressed):not([disabled]) {
8398
+ --private-item-container-state-opacity: 0.12;
7901
8399
  }
7902
- .item-element.selected {
7903
- --_container-color: var(--color-secondary-container);
7904
- --_label-text-color: var(--color-on-secondary-container);
7905
- --_leading-trailing-color: var(--color-on-secondary-container);
7906
- --_container-state-color: var(--color-on-secondary-container);
8400
+
8401
+ :host([selected]) {
8402
+ --private-item-container-color: var(--item-container-selected-color);
8403
+ --private-item-label-text-color: var(--item-label-text-selected-color);
8404
+ --private-item-leading-trailing-color: var(--item-label-text-selected-color);
8405
+ --private-item-supporting-text-color: var(--item-label-text-selected-color);
7907
8406
  }
7908
- .item-element.disabled {
8407
+
8408
+ :host([disabled]) {
7909
8409
  cursor: not-allowed;
7910
- --_label-text-color: var(--color-on-surface);
7911
- --_label-text-opacity: 0.38;
7912
- --_leading-trailing-color: var(--color-on-surface);
7913
- --_container-opacity: 0.12;
8410
+ --private-item-label-text-color: var(--color-on-surface);
8411
+ --private-item-label-text-opacity: 0.38;
8412
+ --private-item-leading-trailing-color: var(--color-on-surface);
8413
+ --private-item-supporting-text-color: var(--color-on-surface);
8414
+ --private-item-container-opacity: 0.12;
7914
8415
  }
7915
- .item-element.disabled .ripple {
8416
+ :host([disabled]) .ripple {
7916
8417
  display: none;
7917
8418
  }`;
7918
8419
 
7919
8420
  /**
7920
- * @label List Item
7921
- * @tag wc-list-item
7922
- * @rawTag list-item
7923
- * @parentRawTag list
8421
+ * @label Item
8422
+ * @tag wc-item
8423
+ * @rawTag item
7924
8424
  *
7925
- * @summary A Material 3 list item with leading, trailing and content slots.
8425
+ * @summary A Material 3 item with start, text and end slots.
7926
8426
  *
7927
8427
  * @example
7928
8428
  * ```html
7929
- * <wc-list-item selected>
7930
- * <wc-icon slot="leading" name="person"></wc-icon>
7931
- * Profile
7932
- * <wc-icon slot="trailing" name="chevron_right"></wc-icon>
7933
- * </wc-list-item>
8429
+ * <wc-item selected>
8430
+ * <wc-icon slot="start" name="home"></wc-icon>
8431
+ * <div slot="overline">Overline</div>
8432
+ * <div slot="headline">Headline</div>
8433
+ * <div slot="supporting-text">Supporting text</div>
8434
+ * <div slot="trailing-supporting-text">Trailing</div>
8435
+ * <wc-icon slot="end" name="chevron_right"></wc-icon>
8436
+ * </wc-item>
7934
8437
  * ```
7935
8438
  * @tags display
7936
8439
  */
7937
- class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
8440
+ class Item extends NativeButtonMixin(NativeHyperlinkMixin(i$1)) {
7938
8441
  constructor() {
7939
8442
  super(...arguments);
8443
+ this.__contentObserver = new MutationObserver(() => {
8444
+ this.requestUpdate();
8445
+ });
8446
+ this.__isCapturingTabIndex = false;
7940
8447
  this.selected = false;
7941
8448
  this.isPressed = false;
8449
+ this.__handleSlotChange = () => {
8450
+ this.requestUpdate();
8451
+ };
7942
8452
  this.__dispatchClick = (event) => {
7943
8453
  if (this.softDisabled || (this.disabled && this.href)) {
7944
8454
  event.stopImmediatePropagation();
@@ -7961,7 +8471,7 @@ class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
7961
8471
  this.itemElement.click();
7962
8472
  return;
7963
8473
  }
7964
- if (event.key === 'Enter' && !this.__isLink()) {
8474
+ if (event.key === 'Enter' && !isLink(this)) {
7965
8475
  event.preventDefault();
7966
8476
  this.itemElement.click();
7967
8477
  }
@@ -7982,12 +8492,49 @@ class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
7982
8492
  }
7983
8493
  };
7984
8494
  }
8495
+ static get observedAttributes() {
8496
+ return [...super.observedAttributes, 'tabindex'];
8497
+ }
8498
+ __hasNamedSlot(...names) {
8499
+ return names.some(name => Array.from(this.children).some(child => child.getAttribute('slot') === name));
8500
+ }
8501
+ __hasDefaultSlot() {
8502
+ return Array.from(this.childNodes).some(node => {
8503
+ if (node.nodeType === Node.TEXT_NODE) {
8504
+ return Boolean(node.textContent?.trim());
8505
+ }
8506
+ return (node.nodeType === Node.ELEMENT_NODE &&
8507
+ !node.hasAttribute('slot'));
8508
+ });
8509
+ }
7985
8510
  connectedCallback() {
7986
8511
  // eslint-disable-next-line wc/guard-super-call
7987
8512
  super.connectedCallback();
7988
- if (!this.hasAttribute('role')) {
7989
- this.setAttribute('role', 'listitem');
8513
+ this.__captureHostTabIndex();
8514
+ this.__contentObserver.observe(this, {
8515
+ subtree: true,
8516
+ childList: true,
8517
+ characterData: true,
8518
+ attributes: true,
8519
+ attributeFilter: ['slot'],
8520
+ });
8521
+ }
8522
+ disconnectedCallback() {
8523
+ this.__contentObserver.disconnect();
8524
+ super.disconnectedCallback();
8525
+ }
8526
+ attributeChangedCallback(name, oldValue, newValue) {
8527
+ if (name === 'tabindex') {
8528
+ if (!this.__isCapturingTabIndex && newValue != null) {
8529
+ this.__capturedTabIndex = newValue;
8530
+ this.__isCapturingTabIndex = true;
8531
+ this.removeAttribute('tabindex');
8532
+ this.__isCapturingTabIndex = false;
8533
+ this.requestUpdate();
8534
+ }
8535
+ return;
7990
8536
  }
8537
+ super.attributeChangedCallback(name, oldValue, newValue);
7991
8538
  }
7992
8539
  focus() {
7993
8540
  this.itemElement?.focus();
@@ -7995,23 +8542,54 @@ class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
7995
8542
  blur() {
7996
8543
  this.itemElement?.blur();
7997
8544
  }
8545
+ __getForwardedAttribute(name) {
8546
+ return this.getAttribute(name) ?? undefined;
8547
+ }
8548
+ __captureHostTabIndex() {
8549
+ const tabIndex = this.getAttribute('tabindex');
8550
+ if (tabIndex == null) {
8551
+ return;
8552
+ }
8553
+ this.__capturedTabIndex = tabIndex;
8554
+ this.__isCapturingTabIndex = true;
8555
+ this.removeAttribute('tabindex');
8556
+ this.__isCapturingTabIndex = false;
8557
+ }
7998
8558
  render() {
7999
- const isLink = this.__isLink();
8559
+ const role = this.__getForwardedAttribute('role');
8560
+ const tabIndex = this.__capturedTabIndex;
8561
+ const ariaHasPopup = this.__getForwardedAttribute('aria-haspopup');
8562
+ const ariaControls = this.__getForwardedAttribute('aria-controls');
8563
+ const ariaExpanded = this.__getForwardedAttribute('aria-expanded');
8000
8564
  const cssClasses = {
8001
- 'list-item': true,
8002
- 'item-element': true,
8565
+ item: true,
8003
8566
  selected: this.selected,
8004
8567
  disabled: this.disabled || this.softDisabled,
8005
8568
  pressed: this.isPressed,
8006
8569
  };
8007
- if (!isLink) {
8570
+ return b `
8571
+ <wc-focus-ring class="focus-ring" for="item"></wc-focus-ring>
8572
+ <div class="background"></div>
8573
+ <wc-ripple class="ripple" for="item"></wc-ripple>
8574
+
8575
+ ${this.renderItemElement(cssClasses, role, tabIndex, ariaHasPopup, ariaControls, ariaExpanded)}
8576
+ `;
8577
+ }
8578
+ renderItemElement(cssClasses, role, tabIndex, ariaHasPopup, ariaControls, ariaExpanded) {
8579
+ if (!isLink(this)) {
8580
+ cssClasses['native-button'] = true;
8008
8581
  return b `
8009
8582
  <button
8010
8583
  id="item"
8011
8584
  class=${e$1(cssClasses)}
8012
8585
  type=${this.htmlType}
8586
+ role=${o$1(role)}
8587
+ tabindex=${o$1(tabIndex)}
8013
8588
  ?disabled=${this.disabled}
8014
8589
  ?aria-disabled=${this.softDisabled}
8590
+ aria-haspopup=${o$1(ariaHasPopup)}
8591
+ aria-controls=${o$1(ariaControls)}
8592
+ aria-expanded=${o$1(ariaExpanded)}
8015
8593
  @click=${this.__dispatchClick}
8016
8594
  @mousedown=${this.__handlePress}
8017
8595
  @keydown=${this.__handleKeyDown}
@@ -8021,6 +8599,7 @@ class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
8021
8599
  </button>
8022
8600
  `;
8023
8601
  }
8602
+ cssClasses['native-link'] = true;
8024
8603
  return b `
8025
8604
  <a
8026
8605
  id="item"
@@ -8029,8 +8608,12 @@ class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
8029
8608
  target=${this.target}
8030
8609
  rel=${o$1(this.rel)}
8031
8610
  download=${o$1(this.download)}
8032
- tabindex=${this.disabled ? '-1' : '0'}
8611
+ role=${o$1(role)}
8612
+ tabindex=${o$1(tabIndex ?? (this.disabled ? '-1' : '0'))}
8033
8613
  aria-disabled=${String(this.disabled || this.softDisabled)}
8614
+ aria-haspopup=${o$1(ariaHasPopup)}
8615
+ aria-controls=${o$1(ariaControls)}
8616
+ aria-expanded=${o$1(ariaExpanded)}
8034
8617
  @click=${this.__dispatchClick}
8035
8618
  @mousedown=${this.__handlePress}
8036
8619
  @keydown=${this.__handleKeyDown}
@@ -8041,81 +8624,101 @@ class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
8041
8624
  `;
8042
8625
  }
8043
8626
  renderContent() {
8627
+ const hasStart = this.__hasNamedSlot('start');
8628
+ const hasEnd = this.__hasNamedSlot('end');
8629
+ const hasOverline = this.__hasNamedSlot('overline');
8630
+ const hasHeadline = this.__hasNamedSlot('headline');
8631
+ const hasDefault = this.__hasDefaultSlot();
8632
+ const hasSupportingText = this.__hasNamedSlot('supporting-text');
8633
+ const hasTrailingSupportingText = this.__hasNamedSlot('trailing-supporting-text');
8044
8634
  return b `
8045
- <wc-focus-ring class="focus-ring" for="item"></wc-focus-ring>
8046
- <div class="background"></div>
8047
- <wc-ripple class="ripple"></wc-ripple>
8048
-
8049
- <div class="list-item-content">
8050
- <div class="leading">
8051
- <slot name="leading"></slot>
8052
- </div>
8635
+ <div class="item-content">
8636
+ ${hasStart
8637
+ ? b `
8638
+ <div class="start">
8639
+ <slot
8640
+ name="start"
8641
+ @slotchange=${this.__handleSlotChange}
8642
+ ></slot>
8643
+ </div>
8644
+ `
8645
+ : A}
8053
8646
  <div class="content">
8054
- <slot></slot>
8055
- </div>
8056
- <div class="trailing">
8057
- <slot name="trailing"></slot>
8647
+ ${hasOverline
8648
+ ? b `
8649
+ <div class="overline">
8650
+ <slot
8651
+ name="overline"
8652
+ @slotchange=${this.__handleSlotChange}
8653
+ ></slot>
8654
+ </div>
8655
+ `
8656
+ : A}
8657
+ ${hasHeadline || hasDefault
8658
+ ? b `
8659
+ <div class="headline-row">
8660
+ ${hasHeadline || hasDefault
8661
+ ? b `
8662
+ <div class="headline">
8663
+ ${hasHeadline
8664
+ ? b `<slot
8665
+ name="headline"
8666
+ @slotchange=${this.__handleSlotChange}
8667
+ ></slot>`
8668
+ : A}
8669
+ ${hasDefault
8670
+ ? b `<slot
8671
+ @slotchange=${this.__handleSlotChange}
8672
+ ></slot>`
8673
+ : A}
8674
+ </div>
8675
+ `
8676
+ : A}
8677
+ </div>
8678
+ `
8679
+ : A}
8680
+ ${hasSupportingText
8681
+ ? b `
8682
+ <div class="supporting-text">
8683
+ <slot
8684
+ name="supporting-text"
8685
+ @slotchange=${this.__handleSlotChange}
8686
+ ></slot>
8687
+ </div>
8688
+ `
8689
+ : A}
8058
8690
  </div>
8691
+ ${hasTrailingSupportingText
8692
+ ? b `
8693
+ <div class="trailing-supporting-text">
8694
+ <slot
8695
+ name="trailing-supporting-text"
8696
+ @slotchange=${this.__handleSlotChange}
8697
+ ></slot>
8698
+ </div>
8699
+ `
8700
+ : A}
8701
+ ${hasEnd
8702
+ ? b `
8703
+ <div class="end">
8704
+ <slot name="end" @slotchange=${this.__handleSlotChange}></slot>
8705
+ </div>
8706
+ `
8707
+ : A}
8059
8708
  </div>
8060
8709
  `;
8061
8710
  }
8062
8711
  }
8063
- ListItem.styles = [css_248z$h];
8712
+ Item.styles = [css_248z$h];
8064
8713
  __decorate([
8065
8714
  n({ type: Boolean, reflect: true })
8066
- ], ListItem.prototype, "selected", void 0);
8715
+ ], Item.prototype, "selected", void 0);
8067
8716
  __decorate([
8068
8717
  e$2('#item')
8069
- ], ListItem.prototype, "itemElement", void 0);
8718
+ ], Item.prototype, "itemElement", void 0);
8070
8719
  __decorate([
8071
8720
  r()
8072
- ], ListItem.prototype, "isPressed", void 0);
8073
-
8074
- /**
8075
- * @label List
8076
- * @tag wc-list
8077
- * @rawTag list
8078
- *
8079
- * @summary A Material 3 list container for one or more list items.
8080
- *
8081
- * @example
8082
- * ```html
8083
- * <wc-list>
8084
- * <wc-list-item>
8085
- * <wc-icon slot="leading" name="inbox"></wc-icon>
8086
- * Inbox
8087
- * <span slot="trailing">24</span>
8088
- * </wc-list-item>
8089
- * </wc-list>
8090
- * ```
8091
- * @tags display
8092
- */
8093
- class List extends i$1 {
8094
- constructor() {
8095
- super(...arguments);
8096
- this.variant = 'standard';
8097
- }
8098
- connectedCallback() {
8099
- super.connectedCallback();
8100
- this.setAttribute('role', 'list');
8101
- }
8102
- render() {
8103
- const cssClasses = {
8104
- list: true,
8105
- [`variant-${this.variant}`]: true,
8106
- };
8107
- return b `
8108
- <div class=${e$1(cssClasses)}>
8109
- <slot></slot>
8110
- </div>
8111
- `;
8112
- }
8113
- }
8114
- List.styles = [css_248z$i];
8115
- List.Item = ListItem;
8116
- __decorate([
8117
- n({ type: String, reflect: true })
8118
- ], List.prototype, "variant", void 0);
8721
+ ], Item.prototype, "isPressed", void 0);
8119
8722
 
8120
8723
  var css_248z$g = i`@charset "UTF-8";
8121
8724
  :host {
@@ -8149,29 +8752,32 @@ img.clickable {
8149
8752
  display: block;
8150
8753
  }
8151
8754
 
8152
- /* Preview overlayrendered in light DOM via portal, but we keep
8153
- a host-level overlay as a fallback when shadow DOM is used. */
8154
- .preview-overlay {
8155
- display: none;
8156
- position: fixed;
8157
- inset: 0;
8158
- z-index: 9999;
8159
- background: rgba(0, 0, 0, 0.85);
8160
- align-items: center;
8161
- justify-content: center;
8755
+ /* Lightbox previewnative <dialog> renders in the top layer,
8756
+ bypassing any stacking context on the host page. */
8757
+ .preview-dialog {
8758
+ background: transparent;
8759
+ border: none;
8162
8760
  cursor: zoom-out;
8761
+ max-height: 90dvh;
8762
+ max-width: 90dvw;
8763
+ padding: 0;
8163
8764
  }
8164
-
8165
- .preview-overlay.open {
8765
+ .preview-dialog[open] {
8166
8766
  display: flex;
8767
+ align-items: center;
8768
+ justify-content: center;
8769
+ }
8770
+ .preview-dialog::backdrop {
8771
+ background: color-mix(in srgb, var(--color-scrim), transparent 15%);
8167
8772
  }
8168
8773
 
8169
- .preview-overlay img {
8774
+ .preview-dialog img {
8170
8775
  max-width: 90vw;
8171
8776
  max-height: 90vh;
8172
8777
  object-fit: contain;
8173
- box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
8778
+ box-shadow: 0 8px 40px color-mix(in srgb, var(--color-shadow), transparent 40%);
8174
8779
  border-radius: 4px;
8780
+ cursor: auto;
8175
8781
  }`;
8176
8782
 
8177
8783
  /**
@@ -8199,7 +8805,6 @@ class Image extends i$1 {
8199
8805
  this.preview = false;
8200
8806
  this._isDarkMode = isDarkMode();
8201
8807
  this._loaded = false;
8202
- this._previewOpen = false;
8203
8808
  this._intersectionObserver = null;
8204
8809
  this._themeCleanup = null;
8205
8810
  }
@@ -8240,12 +8845,14 @@ class Image extends i$1 {
8240
8845
  }
8241
8846
  _handleClick() {
8242
8847
  if (this.preview) {
8243
- this._previewOpen = true;
8848
+ this._dialog?.showModal();
8244
8849
  }
8245
8850
  }
8246
- _closePreview(e) {
8247
- e.stopPropagation();
8248
- this._previewOpen = false;
8851
+ _handleDialogClick(e) {
8852
+ // Close when clicking the backdrop (target is the dialog itself, not the image)
8853
+ if (e.target === e.currentTarget) {
8854
+ e.currentTarget.close();
8855
+ }
8249
8856
  }
8250
8857
  render() {
8251
8858
  return b `
@@ -8260,17 +8867,14 @@ class Image extends i$1 {
8260
8867
  : b `<span class="placeholder" aria-hidden="true"></span>`}
8261
8868
  </div>
8262
8869
 
8263
- <!-- Lightbox preview overlay (inside shadow root) -->
8264
- <div
8265
- class="preview-overlay ${this._previewOpen ? 'open' : ''}"
8266
- role="dialog"
8267
- aria-modal="true"
8870
+ <!-- Lightbox preview dialog uses native top-layer to avoid stacking context issues -->
8871
+ <dialog
8872
+ class="preview-dialog"
8268
8873
  aria-label="Image preview"
8269
- @click=${this._closePreview}
8270
- @keydown=${(e) => e.key === 'Escape' && this._closePreview(e)}
8874
+ @click=${this._handleDialogClick}
8271
8875
  >
8272
8876
  <img src=${this._activeSrc} alt=${this.imageTitle} @click=${(e) => e.stopPropagation()} />
8273
- </div>
8877
+ </dialog>
8274
8878
  `;
8275
8879
  }
8276
8880
  }
@@ -8294,8 +8898,8 @@ __decorate([
8294
8898
  r()
8295
8899
  ], Image.prototype, "_loaded", void 0);
8296
8900
  __decorate([
8297
- r()
8298
- ], Image.prototype, "_previewOpen", void 0);
8901
+ e$2('.preview-dialog')
8902
+ ], Image.prototype, "_dialog", void 0);
8299
8903
 
8300
8904
  var css_248z$f = i`* {
8301
8905
  box-sizing: border-box;
@@ -8910,7 +9514,6 @@ var _Tab_id;
8910
9514
  * @label Tab
8911
9515
  * @tag wc-tab
8912
9516
  * @rawTag tab
8913
- * @parentRawTag tabs
8914
9517
  *
8915
9518
  * @summary A tab component for use within tabs.
8916
9519
  * @overview
@@ -8936,8 +9539,8 @@ class Tab extends i$1 {
8936
9539
  this.disabled = false;
8937
9540
  this.disabledReason = '';
8938
9541
  /**
8939
- * Sets or retrieves the window or frame at which to target content.
8940
- */
9542
+ * Sets or retrieves the window or frame at which to target content.
9543
+ */
8941
9544
  this.target = '_self';
8942
9545
  /**
8943
9546
  * Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.
@@ -8948,8 +9551,8 @@ class Tab extends i$1 {
8948
9551
  this.slotHasIcon = false;
8949
9552
  this.slotHasBadge = false;
8950
9553
  /**
8951
- * States
8952
- */
9554
+ * States
9555
+ */
8953
9556
  this.isPressed = false;
8954
9557
  this._tabindex = 0;
8955
9558
  this.__dispatchClickWithThrottle = event => {
@@ -9002,9 +9605,6 @@ class Tab extends i$1 {
9002
9605
  this.requestUpdate();
9003
9606
  });
9004
9607
  }
9005
- __isLink() {
9006
- return !!this.href;
9007
- }
9008
9608
  __getParentTabsVariant() {
9009
9609
  return this.closest('wc-tabs')?.variant ?? 'primary';
9010
9610
  }
@@ -9017,7 +9617,6 @@ class Tab extends i$1 {
9017
9617
  // }
9018
9618
  // }
9019
9619
  render() {
9020
- const isLink = this.__isLink();
9021
9620
  const variant = this.__getParentTabsVariant();
9022
9621
  const cssClasses = {
9023
9622
  tab: true,
@@ -9030,38 +9629,38 @@ class Tab extends i$1 {
9030
9629
  'has-icon': this.slotHasIcon,
9031
9630
  'has-badge': this.slotHasBadge,
9032
9631
  };
9033
- if (!isLink) {
9632
+ if (!isLink(this)) {
9034
9633
  return b `<button
9035
- id="button"
9036
- class=${e$1(cssClasses)}
9037
- tabindex="0"
9038
- @mousedown=${this.__handlePress}
9039
- @keydown=${this.__handlePress}
9040
- @keyup=${this.__handlePress}
9041
- ?aria-describedby=${this.__getDisabledReasonID()}
9042
- aria-disabled=${`${this.disabled}`}
9043
- ?disabled=${this.disabled}
9044
- ${spread(this.configAria)}
9045
- >
9046
- ${this.renderTabContent(variant)}
9047
- </button>`;
9048
- }
9049
- return b `<a
9050
- class=${e$1(cssClasses)}
9051
9634
  id="button"
9635
+ class=${e$1(cssClasses)}
9052
9636
  tabindex="0"
9053
- href=${this.href}
9054
- target=${this.target}
9055
9637
  @mousedown=${this.__handlePress}
9056
9638
  @keydown=${this.__handlePress}
9057
9639
  @keyup=${this.__handlePress}
9058
- role="button"
9059
9640
  ?aria-describedby=${this.__getDisabledReasonID()}
9060
9641
  aria-disabled=${`${this.disabled}`}
9642
+ ?disabled=${this.disabled}
9061
9643
  ${spread(this.configAria)}
9062
9644
  >
9063
9645
  ${this.renderTabContent(variant)}
9064
- </a>`;
9646
+ </button>`;
9647
+ }
9648
+ return b `<a
9649
+ class=${e$1(cssClasses)}
9650
+ id="button"
9651
+ tabindex="0"
9652
+ href=${this.href}
9653
+ target=${this.target}
9654
+ @mousedown=${this.__handlePress}
9655
+ @keydown=${this.__handlePress}
9656
+ @keyup=${this.__handlePress}
9657
+ role="button"
9658
+ ?aria-describedby=${this.__getDisabledReasonID()}
9659
+ aria-disabled=${`${this.disabled}`}
9660
+ ${spread(this.configAria)}
9661
+ >
9662
+ ${this.renderTabContent(variant)}
9663
+ </a>`;
9065
9664
  }
9066
9665
  renderTabContent(variant) {
9067
9666
  switch (variant) {
@@ -9078,14 +9677,13 @@ class Tab extends i$1 {
9078
9677
  }
9079
9678
  renderPrimaryTabContent() {
9080
9679
  return b `
9081
- <wc-focus-ring class="focus-ring" for='button'></wc-focus-ring>
9680
+ <wc-focus-ring class="focus-ring" for="button"></wc-focus-ring>
9082
9681
  <wc-elevation class="elevation"></wc-elevation>
9083
9682
  <div class="background"></div>
9084
9683
  <div class="outline"></div>
9085
9684
  <wc-ripple class="ripple"></wc-ripple>
9086
-
9087
- <div class="tab-content">
9088
9685
 
9686
+ <div class="tab-content">
9089
9687
  <div class="icon-section">
9090
9688
  <slot name="badge"></slot>
9091
9689
  <slot name="icon"></slot>
@@ -9095,7 +9693,6 @@ class Tab extends i$1 {
9095
9693
  </div>
9096
9694
 
9097
9695
  <div class="indicator"></div>
9098
-
9099
9696
  </div>
9100
9697
 
9101
9698
  ${this.__renderDisabledReason()}
@@ -9103,14 +9700,13 @@ class Tab extends i$1 {
9103
9700
  }
9104
9701
  renderSecondaryTabContent() {
9105
9702
  return b `
9106
- <wc-focus-ring class="focus-ring" for='button'></wc-focus-ring>
9703
+ <wc-focus-ring class="focus-ring" for="button"></wc-focus-ring>
9107
9704
  <wc-elevation class="elevation"></wc-elevation>
9108
9705
  <div class="background"></div>
9109
9706
  <div class="outline"></div>
9110
9707
  <wc-ripple class="ripple"></wc-ripple>
9111
-
9112
- <div class="tab-content">
9113
9708
 
9709
+ <div class="tab-content">
9114
9710
  <slot name="icon"></slot>
9115
9711
 
9116
9712
  <div class="slot-container">
@@ -9133,7 +9729,7 @@ class Tab extends i$1 {
9133
9729
  }
9134
9730
  renderSegmentedTabContent() {
9135
9731
  return b `
9136
- <wc-focus-ring class="focus-ring" for='button'></wc-focus-ring>
9732
+ <wc-focus-ring class="focus-ring" for="button"></wc-focus-ring>
9137
9733
  <wc-elevation class="elevation"></wc-elevation>
9138
9734
  <div class="background"></div>
9139
9735
  <div class="outline"></div>
@@ -9467,7 +10063,6 @@ var css_248z$b = i`* {
9467
10063
  * @label Tab Panel
9468
10064
  * @tag wc-tab-panel
9469
10065
  * @rawTag tab-panel
9470
- * @parentRawTag tab-group
9471
10066
  *
9472
10067
  * @summary Content panel for tabs.
9473
10068
  * @overview
@@ -10916,7 +11511,6 @@ var css_248z$7 = i`* {
10916
11511
  * @label Sidebar Menu Item
10917
11512
  * @tag wc-sidebar-menu-item
10918
11513
  * @rawTag sidebar-menu-item
10919
- * @parentRawTag sidebar-menu
10920
11514
  * @summary A sidebar menu item represents a selectable leaf item in the sidebar navigation tree.
10921
11515
  *
10922
11516
  * @example
@@ -11197,7 +11791,6 @@ var css_248z$6 = i`* {
11197
11791
  * @label Sidebar Sub Menu
11198
11792
  * @tag wc-sidebar-sub-menu
11199
11793
  * @rawTag sidebar-sub-menu
11200
- * @parentRawTag sidebar-menu
11201
11794
  * @summary A sidebar sub menu groups sidebar menu items and handles expand/collapse behavior.
11202
11795
  *
11203
11796
  * @example
@@ -12391,17 +12984,9 @@ var css_248z$2 = i`@charset "UTF-8";
12391
12984
  /* Multi-select chips area — single scrollable row, no vertical growth */
12392
12985
  .chips-container {
12393
12986
  display: flex;
12394
- flex-wrap: nowrap;
12395
- overflow-x: auto;
12396
- scrollbar-width: none;
12397
- gap: var(--spacing-050);
12398
- padding-block: var(--spacing-050);
12399
12987
  align-items: center;
12400
12988
  flex: 1;
12401
- min-width: 0;
12402
- }
12403
- .chips-container::-webkit-scrollbar {
12404
- display: none;
12989
+ padding-block: 0.5rem;
12405
12990
  }
12406
12991
 
12407
12992
  /* Disabled state */
@@ -12420,7 +13005,6 @@ var css_248z$2 = i`@charset "UTF-8";
12420
13005
  * @label Select Option
12421
13006
  * @tag wc-option
12422
13007
  * @rawTag option
12423
- * @parentRawTag select
12424
13008
  *
12425
13009
  * @summary A declarative option element for use inside wc-select.
12426
13010
  *
@@ -12483,7 +13067,7 @@ class SelectOptionElement extends i$1 {
12483
13067
  ?keep-open=${this.keepOpen}
12484
13068
  >
12485
13069
  ${this.icon
12486
- ? b `<wc-icon name=${this.icon} slot="leading-icon"></wc-icon>`
13070
+ ? b `<wc-icon name=${this.icon} slot="start"></wc-icon>`
12487
13071
  : A}
12488
13072
  <slot>${this.value === '' ? 'None' : ''}</slot>
12489
13073
  ${this.selected && this.keepOpen
@@ -12877,6 +13461,7 @@ class Select extends BaseInput {
12877
13461
  // Multi-select: show chips for selected items
12878
13462
  if (this.multiple && this._selectedValues.length > 0) {
12879
13463
  return b `<div class="chips-container">
13464
+ <wc-chip-set>
12880
13465
  ${this._selectedValues.map(val => b `
12881
13466
  <wc-chip
12882
13467
  dismissible
@@ -12885,6 +13470,7 @@ class Select extends BaseInput {
12885
13470
  >${this._getLabelForValue(val)}</wc-chip
12886
13471
  >
12887
13472
  `)}
13473
+ </wc-chip-set>
12888
13474
  </div>`;
12889
13475
  }
12890
13476
  // Single select: show selected label or placeholder
@@ -13184,6 +13770,12 @@ var css_248z = i`* {
13184
13770
  z-index: 1;
13185
13771
  transition: color var(--duration-short4, 200ms) var(--easing-standard, ease), font-weight var(--duration-short4, 200ms) var(--easing-standard, ease);
13186
13772
  }
13773
+ .item {
13774
+ /* Hide label when collapsed via class */
13775
+ }
13776
+ .item .label.hidden {
13777
+ display: none;
13778
+ }
13187
13779
  .item {
13188
13780
  /* Active icon slot: hidden by default */
13189
13781
  }
@@ -13261,7 +13853,6 @@ var _NavigationRailItem_id;
13261
13853
  * @label Navigation Rail Item
13262
13854
  * @tag wc-navigation-rail-item
13263
13855
  * @rawTag navigation-rail-item
13264
- * @parentRawTag navigation-rail
13265
13856
  *
13266
13857
  * @summary An individual item within a navigation rail.
13267
13858
  * @overview
@@ -13334,18 +13925,15 @@ class NavigationRailItem extends i$1 {
13334
13925
  }
13335
13926
  firstUpdated() {
13336
13927
  this.__dispatchClickWithThrottle = throttle(this.__dispatchClick, this.throttleDelay);
13337
- observerSlotChangesWithCallback(this.renderRoot.querySelector('slot:not([name])'), hasContent => {
13928
+ observerSlotChangesWithCallback(this.renderRoot.querySelector('slot.label'), hasContent => {
13338
13929
  this._hasLabel = hasContent;
13339
13930
  this.requestUpdate();
13340
13931
  });
13341
- observerSlotChangesWithCallback(this.renderRoot.querySelector('slot[name="active-icon"]'), hasContent => {
13932
+ observerSlotChangesWithCallback(this.renderRoot.querySelector('slot.active-icon-slot'), hasContent => {
13342
13933
  this._hasActiveIcon = hasContent;
13343
13934
  this.requestUpdate();
13344
13935
  });
13345
13936
  }
13346
- __isLink() {
13347
- return !!this.href;
13348
- }
13349
13937
  __getDisabledReasonID() {
13350
13938
  return this.disabled && this.disabledReason
13351
13939
  ? `disabled-reason-${__classPrivateFieldGet(this, _NavigationRailItem_id, "f")}`
@@ -13366,7 +13954,7 @@ class NavigationRailItem extends i$1 {
13366
13954
  }
13367
13955
  __renderItemContent() {
13368
13956
  return b `
13369
- <wc-focus-ring class="focus-ring" for='item'></wc-focus-ring>
13957
+ <wc-focus-ring class="focus-ring" for="item"></wc-focus-ring>
13370
13958
 
13371
13959
  <div class="item-content">
13372
13960
  <div class="indicator">
@@ -13376,16 +13964,13 @@ class NavigationRailItem extends i$1 {
13376
13964
  <slot name="icon" class="icon-slot"></slot>
13377
13965
  </div>
13378
13966
  </div>
13379
- ${this._hasLabel && !this.collapsed
13380
- ? b `<div class="label"><slot></slot></div>`
13381
- : b `<slot class="hidden-slot"></slot>`}
13967
+ <div class="label ${this.collapsed ? 'hidden' : ''}"><slot></slot></div>
13382
13968
  </div>
13383
13969
 
13384
13970
  ${this.__renderDisabledReason()}
13385
13971
  `;
13386
13972
  }
13387
13973
  render() {
13388
- const isLink = this.__isLink();
13389
13974
  const cssClasses = {
13390
13975
  item: true,
13391
13976
  'item-element': true,
@@ -13395,7 +13980,7 @@ class NavigationRailItem extends i$1 {
13395
13980
  'has-label': this._hasLabel,
13396
13981
  'has-active-icon': this._hasActiveIcon,
13397
13982
  };
13398
- if (!isLink) {
13983
+ if (!isLink(this)) {
13399
13984
  return b `<button
13400
13985
  id="item"
13401
13986
  class=${e$1(cssClasses)}
@@ -13495,17 +14080,13 @@ __decorate([
13495
14080
  * ```html
13496
14081
  * <wc-navigation-rail>
13497
14082
  * <wc-navigation-rail-item active>
13498
- * <wc-icon slot="icon">home</wc-icon>
14083
+ * <wc-icon slot="icon" name="home"></wc-icon>
13499
14084
  * Home
13500
14085
  * </wc-navigation-rail-item>
13501
14086
  * <wc-navigation-rail-item>
13502
- * <wc-icon slot="icon">search</wc-icon>
14087
+ * <wc-icon slot="icon" name="search"></wc-icon>
13503
14088
  * Search
13504
14089
  * </wc-navigation-rail-item>
13505
- * <wc-navigation-rail-item>
13506
- * <wc-icon slot="icon">settings</wc-icon>
13507
- * Settings
13508
- * </wc-navigation-rail-item>
13509
14090
  * </wc-navigation-rail>
13510
14091
  * ```
13511
14092
  * @tags navigation
@@ -13599,5 +14180,5 @@ __decorate([
13599
14180
  n({ type: Boolean, attribute: 'show-divider' })
13600
14181
  ], NavigationRail.prototype, "showDivider", void 0);
13601
14182
 
13602
- export { UrlField as $, Accordion as A, Badge as B, Checkbox as C, DatePicker as D, Elevation as E, Field as F, Snackbar as G, Spinner as H, Image as I, SubMenu as J, Svg as K, LinearProgress as L, Menu as M, NavigationRail as N, Switch as O, Pagination as P, TabGroup as Q, Radio as R, SegmentedButton as S, Tab as T, TabPanel as U, Table as V, Tabs as W, Tag as X, Textarea as Y, TimePicker as Z, Tooltip as _, Avatar as a, Breadcrumb as b, BreadcrumbItem as c, Chip as d, ChipSet as e, CircularProgress as f, Container as g, Divider as h, EmptyState as i, FocusRing as j, Input as k, Link as l, List as m, ListItem as n, MenuItem as o, NavigationRailItem as p, NumberField as q, Ripple as r, SegmentedButtonGroup as s, Select as t, SelectOptionElement as u, SidebarMenu as v, SidebarMenuItem as w, SidebarSubMenu as x, Skeleton as y, Slider as z };
13603
- //# sourceMappingURL=navigation-rail-CD7IrqbN.js.map
14183
+ export { Tooltip as $, Accordion as A, Badge as B, Checkbox as C, DatePicker as D, Elevation as E, Field as F, Slider as G, Snackbar as H, Image as I, Spinner as J, SubMenu as K, LinearProgress as L, Menu as M, NavigationRail as N, Svg as O, Pagination as P, Switch as Q, Radio as R, SegmentedButton as S, Tab as T, TabGroup as U, TabPanel as V, Table as W, Tabs as X, Tag as Y, Textarea as Z, TimePicker as _, Avatar as a, UrlField as a0, Breadcrumb as b, BreadcrumbItem as c, Chip as d, ChipSet as e, CircularProgress as f, Container as g, Divider as h, EmptyState as i, FocusRing as j, Input as k, Item as l, Link as m, List as n, ListItem as o, MenuItem as p, NavigationRailItem as q, NumberField as r, Ripple as s, SegmentedButtonGroup as t, Select as u, SelectOptionElement as v, SidebarMenu as w, SidebarMenuItem as x, SidebarSubMenu as y, Skeleton as z };
14184
+ //# sourceMappingURL=navigation-rail-CM_svs5_.js.map