@redvars/peacock 3.6.2 → 3.6.3

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 (75) hide show
  1. package/dist/assets/components.css.map +1 -1
  2. package/dist/assets/styles.css.map +1 -1
  3. package/dist/{button-colors-AvGh22Zn.js → button-colors-Cg6oxiz-.js} +126 -116
  4. package/dist/{button-colors-AvGh22Zn.js.map → button-colors-Cg6oxiz-.js.map} +1 -1
  5. package/dist/button-group.js +2 -2
  6. package/dist/button.js +17 -14
  7. package/dist/button.js.map +1 -1
  8. package/dist/canvas.js +126 -107
  9. package/dist/canvas.js.map +1 -1
  10. package/dist/custom-elements-jsdocs.json +665 -162
  11. package/dist/custom-elements.json +859 -326
  12. package/dist/{flow-designer-node-BWrPuxAR.js → flow-designer-node-9Bqyn6qx.js} +2 -1
  13. package/dist/flow-designer-node-9Bqyn6qx.js.map +1 -0
  14. package/dist/flow-designer-node.js +1 -1
  15. package/dist/flow-designer.js +3 -3
  16. package/dist/{icon-button-ohxHhy4t.js → icon-button-AdJBEoNy.js} +34 -30
  17. package/dist/icon-button-AdJBEoNy.js.map +1 -0
  18. package/dist/index.js +4 -4
  19. package/dist/{navigation-rail-CD7IrqbN.js → navigation-rail-DAUuJ_Yp.js} +735 -370
  20. package/dist/navigation-rail-DAUuJ_Yp.js.map +1 -0
  21. package/dist/peacock-loader.js +6 -3
  22. package/dist/peacock-loader.js.map +1 -1
  23. package/dist/popover-content.js +1 -1
  24. package/dist/popover-content.js.map +1 -1
  25. package/dist/search.js +11 -14
  26. package/dist/search.js.map +1 -1
  27. package/dist/src/canvas/canvas.d.ts +3 -3
  28. package/dist/src/field/field.d.ts +1 -0
  29. package/dist/src/flow-designer/flow-designer-node.d.ts +1 -0
  30. package/dist/src/image/image.d.ts +2 -2
  31. package/dist/src/index.d.ts +1 -0
  32. package/dist/src/input/input.d.ts +1 -3
  33. package/dist/src/item/index.d.ts +1 -0
  34. package/dist/src/item/item.d.ts +48 -0
  35. package/dist/src/menu/menu-item/menu-item.d.ts +8 -9
  36. package/dist/src/menu/sub-menu/sub-menu.d.ts +1 -0
  37. package/dist/src/navigation-rail/navigation-rail.d.ts +2 -6
  38. package/dist/src/popover/popover-content.d.ts +1 -1
  39. package/dist/src/search/search.d.ts +2 -6
  40. package/dist/test/item.test.d.ts +1 -0
  41. package/dist/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +1 -1
  43. package/scss/mixin.scss +23 -0
  44. package/src/button/button/button-sizes.scss +11 -11
  45. package/src/button/button/button.scss +96 -122
  46. package/src/button/button/button.ts +37 -34
  47. package/src/button/icon-button/icon-button-sizes.scss +8 -8
  48. package/src/button/icon-button/icon-button.ts +23 -20
  49. package/src/canvas/canvas.scss +18 -6
  50. package/src/canvas/canvas.ts +125 -103
  51. package/src/chip/chip/chip.scss +1 -1
  52. package/src/empty-state/empty-state.scss +1 -0
  53. package/src/field/field.ts +6 -0
  54. package/src/flow-designer/flow-designer-node.ts +1 -0
  55. package/src/image/image.scss +21 -16
  56. package/src/image/image.ts +13 -14
  57. package/src/index.ts +1 -0
  58. package/src/input/input.ts +16 -25
  59. package/src/item/index.ts +1 -0
  60. package/src/item/item.scss +184 -0
  61. package/src/item/item.ts +340 -0
  62. package/src/menu/menu/menu.ts +5 -9
  63. package/src/menu/menu-item/menu-item.scss +30 -108
  64. package/src/menu/menu-item/menu-item.ts +89 -129
  65. package/src/menu/sub-menu/sub-menu.ts +6 -2
  66. package/src/navigation-rail/navigation-rail.ts +2 -6
  67. package/src/peacock-loader.ts +4 -0
  68. package/src/popover/popover-content.ts +1 -1
  69. package/src/search/search.ts +11 -16
  70. package/src/select/option.ts +1 -1
  71. package/src/select/select.scss +1 -10
  72. package/src/select/select.ts +2 -0
  73. package/dist/flow-designer-node-BWrPuxAR.js.map +0 -1
  74. package/dist/icon-button-ohxHhy4t.js.map +0 -1
  75. package/dist/navigation-rail-CD7IrqbN.js.map +0 -1
@@ -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
 
@@ -649,7 +649,7 @@ class SegmentedButton extends i$1 {
649
649
  `;
650
650
  }
651
651
  }
652
- SegmentedButton.styles = [css_248z$Q];
652
+ SegmentedButton.styles = [css_248z$R];
653
653
  __decorate([
654
654
  n({ type: String, reflect: true })
655
655
  ], SegmentedButton.prototype, "value", void 0);
@@ -669,7 +669,7 @@ __decorate([
669
669
  r()
670
670
  ], SegmentedButton.prototype, "isActive", void 0);
671
671
 
672
- var css_248z$P = i`* {
672
+ var css_248z$Q = i`* {
673
673
  box-sizing: border-box;
674
674
  }
675
675
 
@@ -781,7 +781,7 @@ class SegmentedButtonGroup extends i$1 {
781
781
  `;
782
782
  }
783
783
  }
784
- SegmentedButtonGroup.styles = [css_248z$P];
784
+ SegmentedButtonGroup.styles = [css_248z$Q];
785
785
  SegmentedButtonGroup.SegmentedButton = SegmentedButton;
786
786
  __decorate([
787
787
  n({ type: Boolean, reflect: true, attribute: 'multi-select' })
@@ -790,7 +790,7 @@ __decorate([
790
790
  n({ type: Boolean, reflect: true })
791
791
  ], SegmentedButtonGroup.prototype, "nullable", void 0);
792
792
 
793
- var css_248z$O = i`:host {
793
+ var css_248z$P = i`:host {
794
794
  display: none;
795
795
  pointer-events: none;
796
796
  position: absolute;
@@ -908,7 +908,7 @@ class FocusRing extends i$1 {
908
908
  }
909
909
  }
910
910
  }
911
- FocusRing.styles = [css_248z$O];
911
+ FocusRing.styles = [css_248z$P];
912
912
  __decorate([
913
913
  n({ type: Boolean, reflect: true })
914
914
  ], FocusRing.prototype, "visible", void 0);
@@ -1385,7 +1385,7 @@ __decorate([
1385
1385
  e$2('.surface')
1386
1386
  ], Ripple.prototype, "mdRoot", void 0);
1387
1387
 
1388
- var css_248z$N = i`* {
1388
+ var css_248z$O = i`* {
1389
1389
  box-sizing: border-box;
1390
1390
  }
1391
1391
 
@@ -1681,7 +1681,7 @@ class AccordionItem extends i$1 {
1681
1681
  }
1682
1682
  }
1683
1683
  _AccordionItem_id = new WeakMap();
1684
- AccordionItem.styles = [css_248z$N];
1684
+ AccordionItem.styles = [css_248z$O];
1685
1685
  __decorate([
1686
1686
  n({ type: Boolean, reflect: true })
1687
1687
  ], AccordionItem.prototype, "disabled", void 0);
@@ -1704,7 +1704,7 @@ __decorate([
1704
1704
  e$2('.header-button')
1705
1705
  ], AccordionItem.prototype, "buttonElement", void 0);
1706
1706
 
1707
- var css_248z$M = i`* {
1707
+ var css_248z$N = i`* {
1708
1708
  box-sizing: border-box;
1709
1709
  }
1710
1710
 
@@ -1832,7 +1832,7 @@ class Accordion extends i$1 {
1832
1832
  return b `<div class="accordion"><slot></slot></div>`;
1833
1833
  }
1834
1834
  }
1835
- Accordion.styles = [css_248z$M];
1835
+ Accordion.styles = [css_248z$N];
1836
1836
  Accordion.Item = AccordionItem;
1837
1837
  __decorate([
1838
1838
  n({ type: Boolean, reflect: true })
@@ -1844,7 +1844,7 @@ __decorate([
1844
1844
  o({ selector: 'wc-accordion-item' })
1845
1845
  ], Accordion.prototype, "items", void 0);
1846
1846
 
1847
- var css_248z$L = i`* {
1847
+ var css_248z$M = i`* {
1848
1848
  box-sizing: border-box;
1849
1849
  }
1850
1850
 
@@ -1908,9 +1908,9 @@ class Link extends BaseHyperlinkMixin(i$1) {
1908
1908
  </a>`;
1909
1909
  }
1910
1910
  }
1911
- Link.styles = [css_248z$L];
1911
+ Link.styles = [css_248z$M];
1912
1912
 
1913
- var css_248z$K = i`* {
1913
+ var css_248z$L = i`* {
1914
1914
  box-sizing: border-box;
1915
1915
  }
1916
1916
 
@@ -2047,7 +2047,7 @@ slot::slotted(*) {
2047
2047
  --_container-state-opacity: 0.08;
2048
2048
  }`;
2049
2049
 
2050
- var css_248z$J = i`:host([color=default]) {
2050
+ var css_248z$K = i`:host([color=default]) {
2051
2051
  --filled-tag-container-color: var(--color-surface);
2052
2052
  --filled-tag-label-text-color: var(--color-on-surface);
2053
2053
  --tonal-tag-container-color: var(--color-surface-container);
@@ -2113,7 +2113,7 @@ var css_248z$J = i`:host([color=default]) {
2113
2113
  --outlined-tag-label-text-color: var(--color-purple);
2114
2114
  }`;
2115
2115
 
2116
- var css_248z$I = i`.tag {
2116
+ var css_248z$J = i`.tag {
2117
2117
  font-family: var(--font-family-sans) !important;
2118
2118
  }
2119
2119
 
@@ -2212,7 +2212,7 @@ class Tag extends i$1 {
2212
2212
  }
2213
2213
  // Define styles (Lit handles Scoping via Shadow DOM by default)
2214
2214
  // 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];
2215
+ Tag.styles = [css_248z$L, css_248z$K, css_248z$J];
2216
2216
  __decorate([
2217
2217
  n({ type: Boolean })
2218
2218
  ], Tag.prototype, "dismissible", void 0);
@@ -2226,7 +2226,7 @@ __decorate([
2226
2226
  n()
2227
2227
  ], Tag.prototype, "size", void 0);
2228
2228
 
2229
- var css_248z$H = i`* {
2229
+ var css_248z$I = i`* {
2230
2230
  box-sizing: border-box;
2231
2231
  }
2232
2232
 
@@ -2235,7 +2235,7 @@ var css_248z$H = i`* {
2235
2235
  }
2236
2236
 
2237
2237
  :host {
2238
- display: inline-block;
2238
+ display: inline-flex;
2239
2239
  --chip-container-color: var(--color-surface);
2240
2240
  --chip-label-text-color: var(--color-on-surface);
2241
2241
  --chip-outline-color: var(--color-outline-variant);
@@ -2398,7 +2398,7 @@ var css_248z$H = i`* {
2398
2398
  display: none;
2399
2399
  }`;
2400
2400
 
2401
- var css_248z$G = i`.tag {
2401
+ var css_248z$H = i`.tag {
2402
2402
  font-family: var(--font-family-sans) !important;
2403
2403
  }
2404
2404
 
@@ -2585,7 +2585,7 @@ class Chip extends BaseButton {
2585
2585
  }
2586
2586
  // Define styles (Lit handles Scoping via Shadow DOM by default)
2587
2587
  // You would typically import your tag.scss.js here or use the css tag
2588
- Chip.styles = [css_248z$H, css_248z$G];
2588
+ Chip.styles = [css_248z$I, css_248z$H];
2589
2589
  __decorate([
2590
2590
  n({ type: Boolean })
2591
2591
  ], Chip.prototype, "dismissible", void 0);
@@ -2599,7 +2599,7 @@ __decorate([
2599
2599
  r()
2600
2600
  ], Chip.prototype, "_isPressed", void 0);
2601
2601
 
2602
- var css_248z$F = i`* {
2602
+ var css_248z$G = i`* {
2603
2603
  box-sizing: border-box;
2604
2604
  }
2605
2605
 
@@ -2637,9 +2637,9 @@ class ChipSet extends i$1 {
2637
2637
  return b `<slot></slot>`;
2638
2638
  }
2639
2639
  }
2640
- ChipSet.styles = [css_248z$F];
2640
+ ChipSet.styles = [css_248z$G];
2641
2641
 
2642
- var css_248z$E = i`:host {
2642
+ var css_248z$F = i`:host {
2643
2643
  display: block;
2644
2644
  --progress-height: 0.25rem;
2645
2645
  --progress-container-color: var(--color-primary);
@@ -2845,9 +2845,9 @@ class LinearProgress extends BaseProgress {
2845
2845
  }
2846
2846
  }
2847
2847
  // Lit components use static styles for better performance
2848
- LinearProgress.styles = [css_248z$E];
2848
+ LinearProgress.styles = [css_248z$F];
2849
2849
 
2850
- var css_248z$D = i`:host {
2850
+ var css_248z$E = i`:host {
2851
2851
  display: inline-block;
2852
2852
  --progress-height: 1.5rem;
2853
2853
  --progress-line-thickness: 4px;
@@ -3010,9 +3010,9 @@ class CircularProgress extends BaseProgress {
3010
3010
  }
3011
3011
  }
3012
3012
  // Lit components use static styles for better performance
3013
- CircularProgress.styles = [css_248z$D];
3013
+ CircularProgress.styles = [css_248z$E];
3014
3014
 
3015
- var css_248z$C = i`* {
3015
+ var css_248z$D = i`* {
3016
3016
  box-sizing: border-box;
3017
3017
  }
3018
3018
 
@@ -3116,12 +3116,12 @@ class Skeleton extends i$1 {
3116
3116
  return b ` <div class="skeleton"></div>`;
3117
3117
  }
3118
3118
  }
3119
- Skeleton.styles = [css_248z$C];
3119
+ Skeleton.styles = [css_248z$D];
3120
3120
  __decorate([
3121
3121
  n({ type: Boolean, reflect: true })
3122
3122
  ], Skeleton.prototype, "visible", void 0);
3123
3123
 
3124
- var css_248z$B = i`* {
3124
+ var css_248z$C = i`* {
3125
3125
  box-sizing: border-box;
3126
3126
  }
3127
3127
 
@@ -3191,16 +3191,23 @@ class Input extends BaseInput {
3191
3191
  * validation errors only display in response to user interactions.
3192
3192
  */
3193
3193
  this.dirty = false;
3194
+ this.__handleFocusChange = (event) => {
3195
+ this.focused = event.type === 'focus';
3196
+ };
3197
+ }
3198
+ async focus() {
3199
+ await Promise.all([
3200
+ customElements.whenDefined('wc-input'),
3201
+ customElements.whenDefined('wc-field'),
3202
+ ]);
3203
+ await this.updateComplete;
3204
+ this.inputElement?.focus();
3194
3205
  }
3195
3206
  connectedCallback() {
3196
3207
  super.connectedCallback();
3197
3208
  this.handleInitialAttributes();
3198
3209
  }
3199
3210
  handleInitialAttributes() {
3200
- if (this.hasAttribute('tabindex')) {
3201
- this.tabindex = this.getAttribute('tabindex') || undefined;
3202
- this.removeAttribute('tabindex');
3203
- }
3204
3211
  Array.from(this.attributes).forEach(attr => {
3205
3212
  if (attr.name.startsWith('aria-')) {
3206
3213
  this.configAria[attr.name] = attr.value;
@@ -3212,19 +3219,6 @@ class Input extends BaseInput {
3212
3219
  this.dirty = true;
3213
3220
  this.value = event.target.value;
3214
3221
  }
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
3222
  __redispatchEvent(event) {
3229
3223
  redispatchEvent(this, event);
3230
3224
  }
@@ -3257,7 +3251,6 @@ class Input extends BaseInput {
3257
3251
  placeholder=${this.placeholder}
3258
3252
  autocomplete=${this.autocomplete}
3259
3253
  .value=${this.value}
3260
- ?tabindex=${this.tabindex}
3261
3254
  ?readonly=${this.readonly}
3262
3255
  ?required=${this.required}
3263
3256
  ?disabled=${this.disabled}
@@ -3270,7 +3263,7 @@ class Input extends BaseInput {
3270
3263
 
3271
3264
  ${this.type === 'password'
3272
3265
  ? b `
3273
- <pc-tooltip
3266
+ <wc-tooltip
3274
3267
  slot="field-end"
3275
3268
  content=${this.passwordVisible
3276
3269
  ? 'Hide password'
@@ -3284,10 +3277,12 @@ class Input extends BaseInput {
3284
3277
  }}
3285
3278
  >
3286
3279
  <wc-icon
3287
- name=${this.passwordVisible ? 'visibility_off' : 'visibility'}
3280
+ name=${this.passwordVisible
3281
+ ? 'visibility_off'
3282
+ : 'visibility'}
3288
3283
  ></wc-icon>
3289
3284
  </wc-icon-button>
3290
- </pc-tooltip>
3285
+ </wc-tooltip>
3291
3286
  `
3292
3287
  : A}
3293
3288
 
@@ -3296,7 +3291,7 @@ class Input extends BaseInput {
3296
3291
  `;
3297
3292
  }
3298
3293
  }
3299
- Input.styles = [css_248z$B];
3294
+ Input.styles = [css_248z$C];
3300
3295
  __decorate([
3301
3296
  n({ type: String })
3302
3297
  ], Input.prototype, "value", void 0);
@@ -3355,7 +3350,7 @@ __decorate([
3355
3350
  e$2('.input-element')
3356
3351
  ], Input.prototype, "inputElement", void 0);
3357
3352
 
3358
- var css_248z$A = i`* {
3353
+ var css_248z$B = i`* {
3359
3354
  box-sizing: border-box;
3360
3355
  }
3361
3356
 
@@ -3588,7 +3583,7 @@ class UrlField extends BaseInput {
3588
3583
  `;
3589
3584
  }
3590
3585
  }
3591
- UrlField.styles = [css_248z$A];
3586
+ UrlField.styles = [css_248z$B];
3592
3587
  __decorate([
3593
3588
  n({ type: String })
3594
3589
  ], UrlField.prototype, "value", void 0);
@@ -3638,7 +3633,7 @@ __decorate([
3638
3633
  e$2('.url-input')
3639
3634
  ], UrlField.prototype, "inputElement", void 0);
3640
3635
 
3641
- var css_248z$z = i`* {
3636
+ var css_248z$A = i`* {
3642
3637
  box-sizing: border-box;
3643
3638
  }
3644
3639
 
@@ -4006,7 +4001,11 @@ class Field extends i$1 {
4006
4001
  return b `<div class="text-count">${this.textCount}</div>`;
4007
4002
  }
4008
4003
  }
4009
- Field.styles = [css_248z$z];
4004
+ Field.shadowRootOptions = {
4005
+ ...i$1.shadowRootOptions,
4006
+ delegatesFocus: true,
4007
+ };
4008
+ Field.styles = [css_248z$A];
4010
4009
  __decorate([
4011
4010
  n({ type: String })
4012
4011
  ], Field.prototype, "label", void 0);
@@ -4062,7 +4061,7 @@ __decorate([
4062
4061
  r()
4063
4062
  ], Field.prototype, "slotEndHasContent", void 0);
4064
4063
 
4065
- var css_248z$y = i`* {
4064
+ var css_248z$z = i`* {
4066
4065
  box-sizing: border-box;
4067
4066
  }
4068
4067
 
@@ -4261,7 +4260,7 @@ class NumberField extends BaseInput {
4261
4260
  }
4262
4261
  }
4263
4262
  _NumberField_id = new WeakMap();
4264
- NumberField.styles = [css_248z$y];
4263
+ NumberField.styles = [css_248z$z];
4265
4264
  __decorate([
4266
4265
  n({ type: Number })
4267
4266
  ], NumberField.prototype, "value", void 0);
@@ -4323,7 +4322,7 @@ __decorate([
4323
4322
  e$2('.input-element')
4324
4323
  ], NumberField.prototype, "inputElement", void 0);
4325
4324
 
4326
- var css_248z$x = i`* {
4325
+ var css_248z$y = i`* {
4327
4326
  box-sizing: border-box;
4328
4327
  }
4329
4328
 
@@ -4490,7 +4489,7 @@ class DatePicker extends BaseInput {
4490
4489
  `;
4491
4490
  }
4492
4491
  }
4493
- DatePicker.styles = [css_248z$x];
4492
+ DatePicker.styles = [css_248z$y];
4494
4493
  __decorate([
4495
4494
  n({ type: String })
4496
4495
  ], DatePicker.prototype, "value", void 0);
@@ -4546,7 +4545,7 @@ __decorate([
4546
4545
  e$2('.input-element')
4547
4546
  ], DatePicker.prototype, "inputElement", void 0);
4548
4547
 
4549
- var css_248z$w = i`* {
4548
+ var css_248z$x = i`* {
4550
4549
  box-sizing: border-box;
4551
4550
  }
4552
4551
 
@@ -4713,7 +4712,7 @@ class TimePicker extends BaseInput {
4713
4712
  `;
4714
4713
  }
4715
4714
  }
4716
- TimePicker.styles = [css_248z$w];
4715
+ TimePicker.styles = [css_248z$x];
4717
4716
  __decorate([
4718
4717
  n({ type: String })
4719
4718
  ], TimePicker.prototype, "value", void 0);
@@ -4769,7 +4768,7 @@ __decorate([
4769
4768
  e$2('.input-element')
4770
4769
  ], TimePicker.prototype, "inputElement", void 0);
4771
4770
 
4772
- var css_248z$v = i`* {
4771
+ var css_248z$w = i`* {
4773
4772
  box-sizing: border-box;
4774
4773
  }
4775
4774
 
@@ -4929,7 +4928,7 @@ class Textarea extends BaseInput {
4929
4928
  `;
4930
4929
  }
4931
4930
  }
4932
- Textarea.styles = [css_248z$v];
4931
+ Textarea.styles = [css_248z$w];
4933
4932
  __decorate([
4934
4933
  n({ type: String })
4935
4934
  ], Textarea.prototype, "value", void 0);
@@ -4988,7 +4987,7 @@ __decorate([
4988
4987
  e$2('.input-element')
4989
4988
  ], Textarea.prototype, "inputElement", void 0);
4990
4989
 
4991
- var css_248z$u = i`* {
4990
+ var css_248z$v = i`* {
4992
4991
  box-sizing: border-box;
4993
4992
  }
4994
4993
 
@@ -5329,7 +5328,7 @@ class Switch extends BaseInput {
5329
5328
  `;
5330
5329
  }
5331
5330
  }
5332
- Switch.styles = [css_248z$u];
5331
+ Switch.styles = [css_248z$v];
5333
5332
  __decorate([
5334
5333
  n({ type: Boolean })
5335
5334
  ], Switch.prototype, "value", void 0);
@@ -5373,7 +5372,7 @@ __decorate([
5373
5372
  e$2('.input-native')
5374
5373
  ], Switch.prototype, "nativeElement", void 0);
5375
5374
 
5376
- var css_248z$t = i`* {
5375
+ var css_248z$u = i`* {
5377
5376
  box-sizing: border-box;
5378
5377
  }
5379
5378
 
@@ -5831,7 +5830,7 @@ class Checkbox extends i$1 {
5831
5830
  `;
5832
5831
  }
5833
5832
  }
5834
- Checkbox.styles = [css_248z$t];
5833
+ Checkbox.styles = [css_248z$u];
5835
5834
  __decorate([
5836
5835
  n({ type: String })
5837
5836
  ], Checkbox.prototype, "name", void 0);
@@ -5878,7 +5877,7 @@ __decorate([
5878
5877
  e$2('.input-native')
5879
5878
  ], Checkbox.prototype, "nativeElement", void 0);
5880
5879
 
5881
- var css_248z$s = i`* {
5880
+ var css_248z$t = i`* {
5882
5881
  box-sizing: border-box;
5883
5882
  }
5884
5883
 
@@ -5965,9 +5964,9 @@ class Spinner extends i$1 {
5965
5964
  `;
5966
5965
  }
5967
5966
  }
5968
- Spinner.styles = [css_248z$s];
5967
+ Spinner.styles = [css_248z$t];
5969
5968
 
5970
- var css_248z$r = i`* {
5969
+ var css_248z$s = i`* {
5971
5970
  box-sizing: border-box;
5972
5971
  }
5973
5972
 
@@ -6085,12 +6084,12 @@ class Container extends i$1 {
6085
6084
  `;
6086
6085
  }
6087
6086
  }
6088
- Container.styles = [css_248z$r];
6087
+ Container.styles = [css_248z$s];
6089
6088
  __decorate([
6090
6089
  n({ type: String, reflect: true })
6091
6090
  ], Container.prototype, "size", void 0);
6092
6091
 
6093
- var css_248z$q = i`* {
6092
+ var css_248z$r = i`* {
6094
6093
  box-sizing: border-box;
6095
6094
  }
6096
6095
 
@@ -6152,6 +6151,7 @@ var css_248z$q = i`* {
6152
6151
 
6153
6152
  :host(.content-center) .content {
6154
6153
  align-items: center;
6154
+ text-align: center;
6155
6155
  }
6156
6156
 
6157
6157
  @container emptystate (min-width: 672px) {
@@ -6253,7 +6253,7 @@ class EmptyState extends i$1 {
6253
6253
  }
6254
6254
  }
6255
6255
  // Lit handles styles in a static property for better performance
6256
- EmptyState.styles = [css_248z$q];
6256
+ EmptyState.styles = [css_248z$r];
6257
6257
  __decorate([
6258
6258
  n({ type: String, reflect: true })
6259
6259
  ], EmptyState.prototype, "illustration", void 0);
@@ -6267,7 +6267,7 @@ __decorate([
6267
6267
  r()
6268
6268
  ], EmptyState.prototype, "vertical", void 0);
6269
6269
 
6270
- var css_248z$p = i`* {
6270
+ var css_248z$q = i`* {
6271
6271
  box-sizing: border-box;
6272
6272
  }
6273
6273
 
@@ -6505,7 +6505,7 @@ class Tooltip extends i$1 {
6505
6505
  `;
6506
6506
  }
6507
6507
  }
6508
- Tooltip.styles = [css_248z$p];
6508
+ Tooltip.styles = [css_248z$q];
6509
6509
  __decorate([
6510
6510
  n()
6511
6511
  ], Tooltip.prototype, "content", void 0);
@@ -6525,7 +6525,7 @@ __decorate([
6525
6525
  n({ type: Boolean, reflect: true })
6526
6526
  ], Tooltip.prototype, "preview", void 0);
6527
6527
 
6528
- var css_248z$o = i`* {
6528
+ var css_248z$p = i`* {
6529
6529
  box-sizing: border-box;
6530
6530
  }
6531
6531
 
@@ -6561,7 +6561,7 @@ ol {
6561
6561
  pointer-events: none;
6562
6562
  }`;
6563
6563
 
6564
- var css_248z$n = i`* {
6564
+ var css_248z$o = i`* {
6565
6565
  box-sizing: border-box;
6566
6566
  }
6567
6567
 
@@ -6691,7 +6691,7 @@ class BreadcrumbItem extends i$1 {
6691
6691
  `;
6692
6692
  }
6693
6693
  }
6694
- BreadcrumbItem.styles = [css_248z$n];
6694
+ BreadcrumbItem.styles = [css_248z$o];
6695
6695
  __decorate([
6696
6696
  n({ reflect: true })
6697
6697
  ], BreadcrumbItem.prototype, "href", void 0);
@@ -6744,13 +6744,13 @@ class Breadcrumb extends i$1 {
6744
6744
  </nav>`;
6745
6745
  }
6746
6746
  }
6747
- Breadcrumb.styles = [css_248z$o];
6747
+ Breadcrumb.styles = [css_248z$p];
6748
6748
  Breadcrumb.Item = BreadcrumbItem;
6749
6749
  __decorate([
6750
6750
  n({ type: String })
6751
6751
  ], Breadcrumb.prototype, "label", void 0);
6752
6752
 
6753
- var css_248z$m = i`* {
6753
+ var css_248z$n = i`* {
6754
6754
  box-sizing: border-box;
6755
6755
  }
6756
6756
 
@@ -6858,7 +6858,7 @@ var css_248z$m = i`* {
6858
6858
  --_container-color: var(--color-tertiary-container);
6859
6859
  }`;
6860
6860
 
6861
- var css_248z$l = i`* {
6861
+ var css_248z$m = i`* {
6862
6862
  box-sizing: border-box;
6863
6863
  }
6864
6864
 
@@ -6867,113 +6867,42 @@ var css_248z$l = i`* {
6867
6867
  }
6868
6868
 
6869
6869
  :host {
6870
- padding-inline: var(--spacing-050);
6871
6870
  outline: none;
6871
+ --menu-item-container-shape-start-start: var(--shape-corner-extra-small);
6872
+ --menu-item-container-shape-start-end: var(--shape-corner-extra-small);
6873
+ --menu-item-container-shape-end-start: var(--shape-corner-extra-small);
6874
+ --menu-item-container-shape-end-end: var(--shape-corner-extra-small);
6872
6875
  }
6873
6876
 
6874
6877
  .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
6878
  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;
6879
+ --item-height: 3rem;
6880
+ --item-container-shape-start-start: var(--menu-item-container-shape-start-start);
6881
+ --item-container-shape-start-end: var(--menu-item-container-shape-start-end);
6882
+ --item-container-shape-end-start: var(--menu-item-container-shape-end-start);
6883
+ --item-container-shape-end-end: var(--menu-item-container-shape-end-end);
6884
+ --item-container-shape-variant: none;
6885
+ --item-label-font-family: var(--typography-label-large-font-family);
6886
+ --item-label-font-size: var(--typography-label-large-font-size);
6887
+ --item-label-font-weight: var(--typography-label-large-font-weight);
6888
+ --item-label-line-height: var(--typography-label-large-line-height);
6889
+ --item-label-letter-spacing: var(--typography-label-large-letter-spacing);
6890
+ --item-label-text-color: var(--menu-item-label-color);
6891
+ --item-leading-trailing-color: var(--menu-item-label-color);
6892
+ --item-supporting-text-color: var(--menu-item-label-color);
6893
+ --item-container-selected-color: var(--menu-item-container-selected-color);
6894
+ --item-label-text-selected-color: var(--menu-item-label-selected-color);
6895
+ --item-icon-size: var(--button-icon-size, var(--_button-icon-size));
6896
+ }
6897
+
6898
+ :host([selected]) {
6899
+ --menu-item-container-shape-start-start: var(--shape-corner-large);
6900
+ --menu-item-container-shape-start-end: var(--shape-corner-large);
6901
+ --menu-item-container-shape-end-start: var(--shape-corner-large);
6902
+ --menu-item-container-shape-end-end: var(--shape-corner-large);
6974
6903
  }`;
6975
6904
 
6976
- var css_248z$k = i`:host-context([variant=standard]) {
6905
+ var css_248z$l = i`:host-context([variant=standard]) {
6977
6906
  --menu-item-label-color: var(--color-on-surface-variant);
6978
6907
  --menu-item-label-selected-color: var(--color-on-tertiary-container);
6979
6908
  --menu-item-container-selected-color: var(--color-tertiary-container);
@@ -7007,144 +6936,106 @@ class MenuItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
7007
6936
  this.hasSubmenu = false;
7008
6937
  this.submenuOpen = false;
7009
6938
  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
- };
6939
+ this._contentObserver = new MutationObserver(() => {
6940
+ this.requestUpdate();
6941
+ });
6942
+ this._rovingTabIndex = -1;
7062
6943
  }
7063
6944
  connectedCallback() {
7064
6945
  // eslint-disable-next-line wc/guard-super-call
7065
6946
  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);
6947
+ this._contentObserver.observe(this, {
6948
+ subtree: true,
6949
+ childList: true,
6950
+ characterData: true,
6951
+ attributes: true,
6952
+ attributeFilter: ['slot'],
6953
+ });
7071
6954
  }
7072
6955
  disconnectedCallback() {
7073
- window.removeEventListener('mouseup', this.__handlePress);
7074
- this.removeEventListener('click', this.__dispatchClickWithThrottle);
6956
+ this._contentObserver.disconnect();
7075
6957
  super.disconnectedCallback();
7076
6958
  }
6959
+ get tabIndex() {
6960
+ return this._rovingTabIndex;
6961
+ }
6962
+ set tabIndex(value) {
6963
+ this._rovingTabIndex = value;
6964
+ this.requestUpdate();
6965
+ }
7077
6966
  focus() {
7078
6967
  this.itemElement?.focus();
7079
6968
  }
7080
6969
  blur() {
7081
6970
  this.itemElement?.blur();
7082
6971
  }
6972
+ _hasNamedSlot(...names) {
6973
+ return names.some(name => Array.from(this.children).some(child => child.getAttribute('slot') === name));
6974
+ }
6975
+ _hasDefaultSlot() {
6976
+ return Array.from(this.childNodes).some(node => {
6977
+ if (node.nodeType === Node.TEXT_NODE) {
6978
+ return Boolean(node.textContent?.trim());
6979
+ }
6980
+ return (node.nodeType === Node.ELEMENT_NODE &&
6981
+ !node.hasAttribute('slot'));
6982
+ });
6983
+ }
7083
6984
  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
6985
  const controls = this.getAttribute('aria-controls');
7092
- if (isLink) {
7093
- return b `<a
6986
+ return b `
6987
+ <wc-item
7094
6988
  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)}
6989
+ class="menu-item"
6990
+ role="menuitem"
6991
+ tabindex=${String(this.tabIndex)}
6992
+ ?selected=${this.selected}
6993
+ ?disabled=${this.disabled}
6994
+ .softDisabled=${this.softDisabled}
6995
+ .htmlType=${this.htmlType}
6996
+ .href=${this.href}
6997
+ .target=${this.target}
6998
+ .rel=${this.rel}
6999
+ .download=${this.download}
7106
7000
  aria-haspopup=${this.hasSubmenu ? 'menu' : A}
7107
- aria-controls=${this.hasSubmenu && controls ? controls : A}
7108
- aria-expanded=${this.hasSubmenu ? String(this.submenuOpen) : A}
7001
+ aria-controls=${o$1(this.hasSubmenu && controls ? controls : undefined)}
7002
+ aria-expanded=${o$1(this.hasSubmenu ? String(this.submenuOpen) : undefined)}
7109
7003
  >
7110
7004
  ${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>`;
7005
+ </wc-item>
7006
+ `;
7130
7007
  }
7131
7008
  renderContent() {
7009
+ const hasStart = this._hasNamedSlot('start');
7010
+ const hasOverline = this._hasNamedSlot('overline');
7011
+ const hasHeadline = this._hasNamedSlot('headline');
7012
+ const hasDefault = this._hasDefaultSlot();
7013
+ const hasSupportingText = this._hasNamedSlot('supporting-text');
7014
+ const hasTrailingSupportingText = this._hasNamedSlot('trailing-supporting-text');
7015
+ const hasEnd = this._hasNamedSlot('end');
7132
7016
  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>
7144
- `;
7017
+ ${hasStart ? b `<slot name="start" slot="start"></slot>` : A}
7018
+ ${hasOverline
7019
+ ? b `<slot name="overline" slot="overline"></slot>`
7020
+ : A}
7021
+ ${hasHeadline ? b `<slot name="headline" slot="headline"></slot>` : A}
7022
+ ${hasDefault ? b `<slot></slot>` : A}
7023
+ ${hasSupportingText
7024
+ ? b `<slot name="supporting-text" slot="supporting-text"></slot>`
7025
+ : A}
7026
+ ${hasTrailingSupportingText
7027
+ ? b `
7028
+ <slot
7029
+ name="trailing-supporting-text"
7030
+ slot="trailing-supporting-text"
7031
+ ></slot>
7032
+ `
7033
+ : A}
7034
+ ${hasEnd ? b `<slot name="end" slot="end"></slot>` : A}
7035
+ `;
7145
7036
  }
7146
7037
  }
7147
- MenuItem.styles = [css_248z$l, css_248z$k];
7038
+ MenuItem.styles = [css_248z$m, css_248z$l];
7148
7039
  __decorate([
7149
7040
  n({ type: String })
7150
7041
  ], MenuItem.prototype, "value", void 0);
@@ -7164,11 +7055,8 @@ __decorate([
7164
7055
  n({ type: String, reflect: true })
7165
7056
  ], MenuItem.prototype, "variant", void 0);
7166
7057
  __decorate([
7167
- e$2('#item')
7058
+ e$2('wc-item')
7168
7059
  ], MenuItem.prototype, "itemElement", void 0);
7169
- __decorate([
7170
- r()
7171
- ], MenuItem.prototype, "isPressed", void 0);
7172
7060
 
7173
7061
  /**
7174
7062
  * @label Menu
@@ -7409,8 +7297,7 @@ class Menu extends i$1 {
7409
7297
  }
7410
7298
  _isEventFromThisMenu(event) {
7411
7299
  const path = event.composedPath();
7412
- const sourceMenu = path.find(target => target instanceof HTMLElement &&
7413
- target.tagName.toLowerCase() === 'wc-menu');
7300
+ const sourceMenu = path.find(target => target instanceof Menu);
7414
7301
  return sourceMenu === this;
7415
7302
  }
7416
7303
  _ownedItemFromEvent(event) {
@@ -7420,12 +7307,10 @@ class Menu extends i$1 {
7420
7307
  const path = event.composedPath();
7421
7308
  const ownedItems = this.items;
7422
7309
  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
- }
7310
+ if (target instanceof MenuItem) {
7311
+ const ownedItem = ownedItems.find(item => item === target);
7312
+ if (ownedItem) {
7313
+ return ownedItem;
7429
7314
  }
7430
7315
  }
7431
7316
  }
@@ -7528,7 +7413,7 @@ class Menu extends i$1 {
7528
7413
  </div>`;
7529
7414
  }
7530
7415
  }
7531
- Menu.styles = [css_248z$m];
7416
+ Menu.styles = [css_248z$n];
7532
7417
  Menu.Item = MenuItem;
7533
7418
  __decorate([
7534
7419
  n({ type: Boolean, reflect: true })
@@ -7564,7 +7449,7 @@ __decorate([
7564
7449
  e$2('.menu')
7565
7450
  ], Menu.prototype, "menuListElement", void 0);
7566
7451
 
7567
- var css_248z$j = i`* {
7452
+ var css_248z$k = i`* {
7568
7453
  box-sizing: border-box;
7569
7454
  }
7570
7455
 
@@ -7627,7 +7512,7 @@ class SubMenu extends i$1 {
7627
7512
  menu.addEventListener('opened', this._onChildMenuOpened);
7628
7513
  menu.addEventListener('closed', this._onChildMenuClosed);
7629
7514
  menu.isSubmenu = true;
7630
- menu.anchorElement = item;
7515
+ menu.anchorElement = this._resolveAnchorElement(item);
7631
7516
  menu.placement =
7632
7517
  getComputedStyle(this).direction === 'rtl' ? 'left-start' : 'right-start';
7633
7518
  menu.offset = 4;
@@ -7698,6 +7583,9 @@ class SubMenu extends i$1 {
7698
7583
  }, this.hoverCloseDelay);
7699
7584
  };
7700
7585
  }
7586
+ _resolveAnchorElement(item) {
7587
+ return item.itemElement?.itemElement ?? item.itemElement ?? item;
7588
+ }
7701
7589
  get item() {
7702
7590
  const [candidate] = this._items ?? [];
7703
7591
  return candidate instanceof MenuItem ? candidate : null;
@@ -7726,7 +7614,7 @@ class SubMenu extends i$1 {
7726
7614
  if (!item || !menu) {
7727
7615
  return;
7728
7616
  }
7729
- menu.anchorElement = item;
7617
+ menu.anchorElement = this._resolveAnchorElement(item);
7730
7618
  menu.isSubmenu = true;
7731
7619
  menu.show();
7732
7620
  item.hasSubmenu = true;
@@ -7759,7 +7647,7 @@ class SubMenu extends i$1 {
7759
7647
  `;
7760
7648
  }
7761
7649
  }
7762
- SubMenu.styles = [css_248z$j];
7650
+ SubMenu.styles = [css_248z$k];
7763
7651
  __decorate([
7764
7652
  n({ type: Number, attribute: 'hover-open-delay' })
7765
7653
  ], SubMenu.prototype, "hoverOpenDelay", void 0);
@@ -7779,7 +7667,7 @@ __decorate([
7779
7667
  o({ slot: 'menu' })
7780
7668
  ], SubMenu.prototype, "_menus", void 0);
7781
7669
 
7782
- var css_248z$i = i`* {
7670
+ var css_248z$j = i`* {
7783
7671
  box-sizing: border-box;
7784
7672
  }
7785
7673
 
@@ -7808,7 +7696,7 @@ var css_248z$i = i`* {
7808
7696
  --_container-color: var(--color-tertiary-container);
7809
7697
  }`;
7810
7698
 
7811
- var css_248z$h = i`* {
7699
+ var css_248z$i = i`* {
7812
7700
  box-sizing: border-box;
7813
7701
  }
7814
7702
 
@@ -8060,7 +7948,7 @@ class ListItem extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
8060
7948
  `;
8061
7949
  }
8062
7950
  }
8063
- ListItem.styles = [css_248z$h];
7951
+ ListItem.styles = [css_248z$i];
8064
7952
  __decorate([
8065
7953
  n({ type: Boolean, reflect: true })
8066
7954
  ], ListItem.prototype, "selected", void 0);
@@ -8111,12 +7999,498 @@ class List extends i$1 {
8111
7999
  `;
8112
8000
  }
8113
8001
  }
8114
- List.styles = [css_248z$i];
8002
+ List.styles = [css_248z$j];
8115
8003
  List.Item = ListItem;
8116
8004
  __decorate([
8117
8005
  n({ type: String, reflect: true })
8118
8006
  ], List.prototype, "variant", void 0);
8119
8007
 
8008
+ var css_248z$h = i`* {
8009
+ box-sizing: border-box;
8010
+ }
8011
+
8012
+ .screen-reader-only {
8013
+ display: none !important;
8014
+ }
8015
+
8016
+ :host {
8017
+ display: block;
8018
+ padding-inline: var(--spacing-050);
8019
+ --item-height: 3.5rem;
8020
+ }
8021
+
8022
+ /**
8023
+ * Reset native button/link styles
8024
+ */
8025
+ .native-button {
8026
+ background: transparent;
8027
+ border: none;
8028
+ appearance: none;
8029
+ margin: 0;
8030
+ outline: none;
8031
+ padding: 0;
8032
+ }
8033
+
8034
+ .native-link {
8035
+ text-decoration: none;
8036
+ color: inherit;
8037
+ cursor: pointer;
8038
+ }
8039
+ .native-link:link, .native-link:visited, .native-link:hover, .native-link:active {
8040
+ text-decoration: none;
8041
+ color: inherit;
8042
+ }
8043
+
8044
+ .item {
8045
+ position: relative;
8046
+ min-height: var(--item-height);
8047
+ width: 100%;
8048
+ background: transparent;
8049
+ text-align: initial;
8050
+ cursor: pointer;
8051
+ --private-item-container-shape-start-start: var(--item-container-shape-start-start, var(--shape-corner-extra-small));
8052
+ --private-item-container-shape-start-end: var(--item-container-shape-start-end, var(--shape-corner-extra-small));
8053
+ --private-item-container-shape-end-start: var(--item-container-shape-end-start, var(--shape-corner-extra-small));
8054
+ --private-item-container-shape-end-end: var(--item-container-shape-end-end, var(--shape-corner-extra-small));
8055
+ --private-item-container-shape-variant: var(--item-container-shape-variant, none);
8056
+ font-family: var(--item-label-font-family, var(--typography-body-large-font-family)) !important;
8057
+ font-size: var(--item-label-font-size, var(--typography-body-large-font-size)) !important;
8058
+ font-weight: var(--item-label-font-weight, var(--typography-body-large-font-weight)) !important;
8059
+ line-height: var(--item-label-line-height, var(--typography-body-large-line-height)) !important;
8060
+ letter-spacing: var(--item-label-letter-spacing, var(--typography-body-large-letter-spacing)) !important;
8061
+ }
8062
+ .item .item-content {
8063
+ position: relative;
8064
+ z-index: 1;
8065
+ display: flex;
8066
+ align-items: center;
8067
+ gap: var(--spacing-200);
8068
+ min-height: var(--item-height);
8069
+ padding-inline: var(--spacing-200);
8070
+ color: var(--private-item-label-text-color);
8071
+ opacity: var(--private-item-label-text-opacity, 1);
8072
+ --icon-size: var(--item-icon-size, 1.5rem);
8073
+ --icon-color: var(--private-item-leading-trailing-color);
8074
+ }
8075
+ .item .start,
8076
+ .item .end {
8077
+ display: inline-flex;
8078
+ align-items: center;
8079
+ justify-content: center;
8080
+ color: var(--private-item-leading-trailing-color);
8081
+ }
8082
+ .item .end {
8083
+ margin-inline-start: auto;
8084
+ }
8085
+ .item .content {
8086
+ display: flex;
8087
+ flex: 1;
8088
+ flex-direction: column;
8089
+ justify-content: center;
8090
+ gap: 0.125rem;
8091
+ min-inline-size: 0;
8092
+ }
8093
+ .item .headline-row {
8094
+ display: flex;
8095
+ min-inline-size: 0;
8096
+ }
8097
+ .item .headline,
8098
+ .item .overline,
8099
+ .item .supporting-text,
8100
+ .item .trailing-supporting-text {
8101
+ min-inline-size: 0;
8102
+ }
8103
+ .item .headline {
8104
+ flex: 1;
8105
+ color: var(--private-item-label-text-color);
8106
+ }
8107
+ .item .overline,
8108
+ .item .supporting-text,
8109
+ .item .trailing-supporting-text {
8110
+ color: var(--private-item-supporting-text-color);
8111
+ }
8112
+ .item .overline {
8113
+ font-family: var(--typography-label-small-font-family) !important;
8114
+ font-size: var(--typography-label-small-font-size) !important;
8115
+ font-weight: var(--typography-label-small-font-weight) !important;
8116
+ line-height: var(--typography-label-small-line-height) !important;
8117
+ letter-spacing: var(--typography-label-small-letter-spacing) !important;
8118
+ }
8119
+ .item .supporting-text,
8120
+ .item .trailing-supporting-text {
8121
+ font-family: var(--typography-body-medium-font-family) !important;
8122
+ font-size: var(--typography-body-medium-font-size) !important;
8123
+ font-weight: var(--typography-body-medium-font-weight) !important;
8124
+ line-height: var(--typography-body-medium-line-height) !important;
8125
+ letter-spacing: var(--typography-body-medium-letter-spacing) !important;
8126
+ }
8127
+ .item .trailing-supporting-text {
8128
+ display: inline-flex;
8129
+ align-items: center;
8130
+ white-space: nowrap;
8131
+ color: var(--private-item-supporting-text-color);
8132
+ }
8133
+ .item .background {
8134
+ position: absolute;
8135
+ inset: 0;
8136
+ background-color: var(--private-item-container-color);
8137
+ opacity: var(--private-item-container-opacity, 1);
8138
+ pointer-events: none;
8139
+ border-start-start-radius: var(--private-item-container-shape-start-start, var(--private-item-container-shape));
8140
+ border-start-end-radius: var(--private-item-container-shape-start-end, var(--private-item-container-shape));
8141
+ border-end-start-radius: var(--private-item-container-shape-end-start, var(--private-item-container-shape));
8142
+ border-end-end-radius: var(--private-item-container-shape-end-end, var(--private-item-container-shape));
8143
+ corner-shape: var(--private-item-container-shape-variant);
8144
+ }
8145
+ .item .focus-ring {
8146
+ z-index: 2;
8147
+ --focus-ring-container-shape-start-start: var(--private-item-container-shape-start-start, var(--private-item-container-shape));
8148
+ --focus-ring-container-shape-start-end: var(--private-item-container-shape-start-end, var(--private-item-container-shape));
8149
+ --focus-ring-container-shape-end-start: var(--private-item-container-shape-end-start, var(--private-item-container-shape));
8150
+ --focus-ring-container-shape-end-end: var(--private-item-container-shape-end-end, var(--private-item-container-shape));
8151
+ --focus-ring-container-shape-variant: var(--private-item-container-shape-variant);
8152
+ }
8153
+ .item .ripple {
8154
+ border-start-start-radius: var(--private-item-container-shape-start-start, var(--private-item-container-shape));
8155
+ border-start-end-radius: var(--private-item-container-shape-start-end, var(--private-item-container-shape));
8156
+ border-end-start-radius: var(--private-item-container-shape-end-start, var(--private-item-container-shape));
8157
+ border-end-end-radius: var(--private-item-container-shape-end-end, var(--private-item-container-shape));
8158
+ corner-shape: var(--private-item-container-shape-variant);
8159
+ --ripple-state-opacity: var(--private-item-container-state-opacity, 0);
8160
+ --ripple-pressed-color: var(--private-item-container-state-color);
8161
+ }
8162
+
8163
+ .item {
8164
+ --private-item-container-color: var(--item-container-color);
8165
+ --private-item-label-text-color: var(--item-label-text-color);
8166
+ --private-item-leading-trailing-color: var(--item-leading-trailing-color);
8167
+ --private-item-supporting-text-color: var(--item-supporting-text-color);
8168
+ --private-item-container-state-color: var(--private-item-label-text-color);
8169
+ }
8170
+ .item:hover:not(:where(.disabled, .selected)) {
8171
+ --private-item-container-state-opacity: 0.08;
8172
+ }
8173
+ .item.pressed:not(:where(.disabled)) {
8174
+ --private-item-container-state-opacity: 0.12;
8175
+ }
8176
+ .item.selected {
8177
+ --private-item-container-color: var(--item-container-selected-color);
8178
+ --private-item-label-text-color: var(--item-label-text-selected-color);
8179
+ --private-item-leading-trailing-color: var(--item-label-text-selected-color);
8180
+ --private-item-supporting-text-color: var(--item-label-text-selected-color);
8181
+ }
8182
+ .item.disabled {
8183
+ cursor: not-allowed;
8184
+ --private-item-label-text-color: var(--color-on-surface);
8185
+ --private-item-label-text-opacity: 0.38;
8186
+ --private-item-leading-trailing-color: var(--color-on-surface);
8187
+ --private-item-supporting-text-color: var(--color-on-surface);
8188
+ --private-item-container-opacity: 0.12;
8189
+ }
8190
+ .item.disabled .ripple {
8191
+ display: none;
8192
+ }
8193
+
8194
+ :host {
8195
+ --item-container-color: transparent;
8196
+ --item-label-text-color: var(--color-on-surface);
8197
+ --item-leading-trailing-color: var(--color-on-surface-variant);
8198
+ --item-supporting-text-color: var(--color-on-surface-variant);
8199
+ --item-container-selected-color: var(--color-tertiary-container);
8200
+ --item-label-text-selected-color: var(--color-on-tertiary-container);
8201
+ }`;
8202
+
8203
+ /**
8204
+ * @label Item
8205
+ * @tag wc-item
8206
+ * @rawTag item
8207
+ *
8208
+ * @summary A Material 3 item with start, text and end slots.
8209
+ *
8210
+ * @example
8211
+ * ```html
8212
+ * <wc-item selected>
8213
+ * <wc-icon slot="start" name="home"></wc-icon>
8214
+ * <div slot="overline">Overline</div>
8215
+ * <div slot="headline">Headline</div>
8216
+ * <div slot="supporting-text">Supporting text</div>
8217
+ * <div slot="trailing-supporting-text">Trailing</div>
8218
+ * <wc-icon slot="end" name="chevron_right"></wc-icon>
8219
+ * </wc-item>
8220
+ * ```
8221
+ * @tags display
8222
+ */
8223
+ class Item extends BaseButtonMixin(BaseHyperlinkMixin(i$1)) {
8224
+ constructor() {
8225
+ super(...arguments);
8226
+ this.__contentObserver = new MutationObserver(() => {
8227
+ this.requestUpdate();
8228
+ });
8229
+ this.__isCapturingTabIndex = false;
8230
+ this.selected = false;
8231
+ this.isPressed = false;
8232
+ this.__handleSlotChange = () => {
8233
+ this.requestUpdate();
8234
+ };
8235
+ this.__dispatchClick = (event) => {
8236
+ if (this.softDisabled || (this.disabled && this.href)) {
8237
+ event.stopImmediatePropagation();
8238
+ event.preventDefault();
8239
+ return;
8240
+ }
8241
+ if (!isActivationClick(event) || !this.itemElement) {
8242
+ return;
8243
+ }
8244
+ this.focus();
8245
+ dispatchActivationClick(this.itemElement);
8246
+ };
8247
+ this.__handleKeyDown = (event) => {
8248
+ this.__handlePress(event);
8249
+ if (this.disabled || this.softDisabled || !this.itemElement) {
8250
+ return;
8251
+ }
8252
+ if (event.key === ' ') {
8253
+ event.preventDefault();
8254
+ this.itemElement.click();
8255
+ return;
8256
+ }
8257
+ if (event.key === 'Enter' && !this.__isLink()) {
8258
+ event.preventDefault();
8259
+ this.itemElement.click();
8260
+ }
8261
+ };
8262
+ this.__handlePress = (event) => {
8263
+ if (this.disabled || this.softDisabled)
8264
+ return;
8265
+ if (event instanceof KeyboardEvent &&
8266
+ event.type === 'keydown' &&
8267
+ (event.key === 'Enter' || event.key === ' ')) {
8268
+ this.isPressed = true;
8269
+ }
8270
+ else if (event.type === 'mousedown') {
8271
+ this.isPressed = true;
8272
+ }
8273
+ else {
8274
+ this.isPressed = false;
8275
+ }
8276
+ };
8277
+ }
8278
+ static get observedAttributes() {
8279
+ return [...super.observedAttributes, 'tabindex'];
8280
+ }
8281
+ __hasNamedSlot(...names) {
8282
+ return names.some(name => Array.from(this.children).some(child => child.getAttribute('slot') === name));
8283
+ }
8284
+ __hasDefaultSlot() {
8285
+ return Array.from(this.childNodes).some(node => {
8286
+ if (node.nodeType === Node.TEXT_NODE) {
8287
+ return Boolean(node.textContent?.trim());
8288
+ }
8289
+ return (node.nodeType === Node.ELEMENT_NODE &&
8290
+ !node.hasAttribute('slot'));
8291
+ });
8292
+ }
8293
+ connectedCallback() {
8294
+ // eslint-disable-next-line wc/guard-super-call
8295
+ super.connectedCallback();
8296
+ this.__captureHostTabIndex();
8297
+ this.__contentObserver.observe(this, {
8298
+ subtree: true,
8299
+ childList: true,
8300
+ characterData: true,
8301
+ attributes: true,
8302
+ attributeFilter: ['slot'],
8303
+ });
8304
+ }
8305
+ disconnectedCallback() {
8306
+ this.__contentObserver.disconnect();
8307
+ super.disconnectedCallback();
8308
+ }
8309
+ attributeChangedCallback(name, oldValue, newValue) {
8310
+ if (name === 'tabindex') {
8311
+ if (!this.__isCapturingTabIndex && newValue != null) {
8312
+ this.__capturedTabIndex = newValue;
8313
+ this.__isCapturingTabIndex = true;
8314
+ this.removeAttribute('tabindex');
8315
+ this.__isCapturingTabIndex = false;
8316
+ this.requestUpdate();
8317
+ }
8318
+ return;
8319
+ }
8320
+ super.attributeChangedCallback(name, oldValue, newValue);
8321
+ }
8322
+ focus() {
8323
+ this.itemElement?.focus();
8324
+ }
8325
+ blur() {
8326
+ this.itemElement?.blur();
8327
+ }
8328
+ __getForwardedAttribute(name) {
8329
+ return this.getAttribute(name) ?? undefined;
8330
+ }
8331
+ __captureHostTabIndex() {
8332
+ const tabIndex = this.getAttribute('tabindex');
8333
+ if (tabIndex == null) {
8334
+ return;
8335
+ }
8336
+ this.__capturedTabIndex = tabIndex;
8337
+ this.__isCapturingTabIndex = true;
8338
+ this.removeAttribute('tabindex');
8339
+ this.__isCapturingTabIndex = false;
8340
+ }
8341
+ render() {
8342
+ const isLink = this.__isLink();
8343
+ const role = this.__getForwardedAttribute('role');
8344
+ const tabIndex = this.__capturedTabIndex;
8345
+ const ariaHasPopup = this.__getForwardedAttribute('aria-haspopup');
8346
+ const ariaControls = this.__getForwardedAttribute('aria-controls');
8347
+ const ariaExpanded = this.__getForwardedAttribute('aria-expanded');
8348
+ const cssClasses = {
8349
+ item: true,
8350
+ selected: this.selected,
8351
+ disabled: this.disabled || this.softDisabled,
8352
+ pressed: this.isPressed,
8353
+ };
8354
+ if (!isLink) {
8355
+ cssClasses['native-button'] = true;
8356
+ return b `
8357
+ <button
8358
+ id="item"
8359
+ class=${e$1(cssClasses)}
8360
+ type=${this.htmlType}
8361
+ role=${o$1(role)}
8362
+ tabindex=${o$1(tabIndex)}
8363
+ ?disabled=${this.disabled}
8364
+ ?aria-disabled=${this.softDisabled}
8365
+ aria-haspopup=${o$1(ariaHasPopup)}
8366
+ aria-controls=${o$1(ariaControls)}
8367
+ aria-expanded=${o$1(ariaExpanded)}
8368
+ @click=${this.__dispatchClick}
8369
+ @mousedown=${this.__handlePress}
8370
+ @keydown=${this.__handleKeyDown}
8371
+ @keyup=${this.__handlePress}
8372
+ >
8373
+ ${this.renderContent()}
8374
+ </button>
8375
+ `;
8376
+ }
8377
+ else {
8378
+ cssClasses['native-link'] = true;
8379
+ return b `
8380
+ <a
8381
+ id="item"
8382
+ class=${e$1(cssClasses)}
8383
+ href=${this.href}
8384
+ target=${this.target}
8385
+ rel=${o$1(this.rel)}
8386
+ download=${o$1(this.download)}
8387
+ role=${o$1(role)}
8388
+ tabindex=${o$1(tabIndex ?? (this.disabled ? '-1' : '0'))}
8389
+ aria-disabled=${String(this.disabled || this.softDisabled)}
8390
+ aria-haspopup=${o$1(ariaHasPopup)}
8391
+ aria-controls=${o$1(ariaControls)}
8392
+ aria-expanded=${o$1(ariaExpanded)}
8393
+ @click=${this.__dispatchClick}
8394
+ @mousedown=${this.__handlePress}
8395
+ @keydown=${this.__handleKeyDown}
8396
+ @keyup=${this.__handlePress}
8397
+ >
8398
+ ${this.renderContent()}
8399
+ </a>
8400
+ `;
8401
+ }
8402
+ }
8403
+ renderContent() {
8404
+ const hasStart = this.__hasNamedSlot('start');
8405
+ const hasEnd = this.__hasNamedSlot('end');
8406
+ const hasOverline = this.__hasNamedSlot('overline');
8407
+ const hasHeadline = this.__hasNamedSlot('headline');
8408
+ const hasDefault = this.__hasDefaultSlot();
8409
+ const hasSupportingText = this.__hasNamedSlot('supporting-text');
8410
+ const hasTrailingSupportingText = this.__hasNamedSlot('trailing-supporting-text');
8411
+ return b `
8412
+ <wc-focus-ring class="focus-ring" for="item"></wc-focus-ring>
8413
+ <div class="background"></div>
8414
+ <wc-ripple class="ripple"></wc-ripple>
8415
+
8416
+ <div class="item-content">
8417
+ ${hasStart
8418
+ ? b `
8419
+ <div class="start">
8420
+ <slot name="start" @slotchange=${this.__handleSlotChange}></slot>
8421
+ </div>
8422
+ `
8423
+ : A}
8424
+ <div class="content">
8425
+
8426
+ ${hasOverline
8427
+ ? b `
8428
+ <div class="overline">
8429
+ <slot name="overline" @slotchange=${this.__handleSlotChange}></slot>
8430
+ </div>
8431
+ `
8432
+ : A}
8433
+ ${hasHeadline || hasDefault
8434
+ ? b `
8435
+ <div class="headline-row">
8436
+ ${hasHeadline || hasDefault
8437
+ ? b `
8438
+ <div class="headline">
8439
+ ${hasHeadline
8440
+ ? b `<slot name="headline" @slotchange=${this.__handleSlotChange}></slot>`
8441
+ : A}
8442
+ ${hasDefault
8443
+ ? b `<slot @slotchange=${this.__handleSlotChange}></slot>`
8444
+ : A}
8445
+ </div>
8446
+ `
8447
+ : A}
8448
+ </div>
8449
+ `
8450
+ : A}
8451
+ ${hasSupportingText
8452
+ ? b `
8453
+ <div class="supporting-text">
8454
+ <slot
8455
+ name="supporting-text"
8456
+ @slotchange=${this.__handleSlotChange}
8457
+ ></slot>
8458
+ </div>
8459
+ `
8460
+ : A}
8461
+ </div>
8462
+ ${hasTrailingSupportingText
8463
+ ? b `
8464
+ <div class="trailing-supporting-text">
8465
+ <slot
8466
+ name="trailing-supporting-text"
8467
+ @slotchange=${this.__handleSlotChange}
8468
+ ></slot>
8469
+ </div>
8470
+ `
8471
+ : A}
8472
+ ${hasEnd
8473
+ ? b `
8474
+ <div class="end">
8475
+ <slot name="end" @slotchange=${this.__handleSlotChange}></slot>
8476
+ </div>
8477
+ `
8478
+ : A}
8479
+ </div>
8480
+ `;
8481
+ }
8482
+ }
8483
+ Item.styles = [css_248z$h];
8484
+ __decorate([
8485
+ n({ type: Boolean, reflect: true })
8486
+ ], Item.prototype, "selected", void 0);
8487
+ __decorate([
8488
+ e$2('#item')
8489
+ ], Item.prototype, "itemElement", void 0);
8490
+ __decorate([
8491
+ r()
8492
+ ], Item.prototype, "isPressed", void 0);
8493
+
8120
8494
  var css_248z$g = i`@charset "UTF-8";
8121
8495
  :host {
8122
8496
  display: block;
@@ -8149,29 +8523,32 @@ img.clickable {
8149
8523
  display: block;
8150
8524
  }
8151
8525
 
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;
8526
+ /* Lightbox previewnative <dialog> renders in the top layer,
8527
+ bypassing any stacking context on the host page. */
8528
+ .preview-dialog {
8529
+ background: transparent;
8530
+ border: none;
8162
8531
  cursor: zoom-out;
8532
+ max-height: 90dvh;
8533
+ max-width: 90dvw;
8534
+ padding: 0;
8163
8535
  }
8164
-
8165
- .preview-overlay.open {
8536
+ .preview-dialog[open] {
8166
8537
  display: flex;
8538
+ align-items: center;
8539
+ justify-content: center;
8540
+ }
8541
+ .preview-dialog::backdrop {
8542
+ background: color-mix(in srgb, var(--color-scrim), transparent 15%);
8167
8543
  }
8168
8544
 
8169
- .preview-overlay img {
8545
+ .preview-dialog img {
8170
8546
  max-width: 90vw;
8171
8547
  max-height: 90vh;
8172
8548
  object-fit: contain;
8173
- box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
8549
+ box-shadow: 0 8px 40px color-mix(in srgb, var(--color-shadow), transparent 40%);
8174
8550
  border-radius: 4px;
8551
+ cursor: auto;
8175
8552
  }`;
8176
8553
 
8177
8554
  /**
@@ -8199,7 +8576,6 @@ class Image extends i$1 {
8199
8576
  this.preview = false;
8200
8577
  this._isDarkMode = isDarkMode();
8201
8578
  this._loaded = false;
8202
- this._previewOpen = false;
8203
8579
  this._intersectionObserver = null;
8204
8580
  this._themeCleanup = null;
8205
8581
  }
@@ -8240,12 +8616,14 @@ class Image extends i$1 {
8240
8616
  }
8241
8617
  _handleClick() {
8242
8618
  if (this.preview) {
8243
- this._previewOpen = true;
8619
+ this._dialog?.showModal();
8244
8620
  }
8245
8621
  }
8246
- _closePreview(e) {
8247
- e.stopPropagation();
8248
- this._previewOpen = false;
8622
+ _handleDialogClick(e) {
8623
+ // Close when clicking the backdrop (target is the dialog itself, not the image)
8624
+ if (e.target === e.currentTarget) {
8625
+ e.currentTarget.close();
8626
+ }
8249
8627
  }
8250
8628
  render() {
8251
8629
  return b `
@@ -8260,17 +8638,14 @@ class Image extends i$1 {
8260
8638
  : b `<span class="placeholder" aria-hidden="true"></span>`}
8261
8639
  </div>
8262
8640
 
8263
- <!-- Lightbox preview overlay (inside shadow root) -->
8264
- <div
8265
- class="preview-overlay ${this._previewOpen ? 'open' : ''}"
8266
- role="dialog"
8267
- aria-modal="true"
8641
+ <!-- Lightbox preview dialog uses native top-layer to avoid stacking context issues -->
8642
+ <dialog
8643
+ class="preview-dialog"
8268
8644
  aria-label="Image preview"
8269
- @click=${this._closePreview}
8270
- @keydown=${(e) => e.key === 'Escape' && this._closePreview(e)}
8645
+ @click=${this._handleDialogClick}
8271
8646
  >
8272
8647
  <img src=${this._activeSrc} alt=${this.imageTitle} @click=${(e) => e.stopPropagation()} />
8273
- </div>
8648
+ </dialog>
8274
8649
  `;
8275
8650
  }
8276
8651
  }
@@ -8294,8 +8669,8 @@ __decorate([
8294
8669
  r()
8295
8670
  ], Image.prototype, "_loaded", void 0);
8296
8671
  __decorate([
8297
- r()
8298
- ], Image.prototype, "_previewOpen", void 0);
8672
+ e$2('.preview-dialog')
8673
+ ], Image.prototype, "_dialog", void 0);
8299
8674
 
8300
8675
  var css_248z$f = i`* {
8301
8676
  box-sizing: border-box;
@@ -12391,17 +12766,9 @@ var css_248z$2 = i`@charset "UTF-8";
12391
12766
  /* Multi-select chips area — single scrollable row, no vertical growth */
12392
12767
  .chips-container {
12393
12768
  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
12769
  align-items: center;
12400
12770
  flex: 1;
12401
- min-width: 0;
12402
- }
12403
- .chips-container::-webkit-scrollbar {
12404
- display: none;
12771
+ padding-block: 0.5rem;
12405
12772
  }
12406
12773
 
12407
12774
  /* Disabled state */
@@ -12483,7 +12850,7 @@ class SelectOptionElement extends i$1 {
12483
12850
  ?keep-open=${this.keepOpen}
12484
12851
  >
12485
12852
  ${this.icon
12486
- ? b `<wc-icon name=${this.icon} slot="leading-icon"></wc-icon>`
12853
+ ? b `<wc-icon name=${this.icon} slot="start"></wc-icon>`
12487
12854
  : A}
12488
12855
  <slot>${this.value === '' ? 'None' : ''}</slot>
12489
12856
  ${this.selected && this.keepOpen
@@ -12877,6 +13244,7 @@ class Select extends BaseInput {
12877
13244
  // Multi-select: show chips for selected items
12878
13245
  if (this.multiple && this._selectedValues.length > 0) {
12879
13246
  return b `<div class="chips-container">
13247
+ <wc-chip-set>
12880
13248
  ${this._selectedValues.map(val => b `
12881
13249
  <wc-chip
12882
13250
  dismissible
@@ -12885,6 +13253,7 @@ class Select extends BaseInput {
12885
13253
  >${this._getLabelForValue(val)}</wc-chip
12886
13254
  >
12887
13255
  `)}
13256
+ </wc-chip-set>
12888
13257
  </div>`;
12889
13258
  }
12890
13259
  // Single select: show selected label or placeholder
@@ -13495,17 +13864,13 @@ __decorate([
13495
13864
  * ```html
13496
13865
  * <wc-navigation-rail>
13497
13866
  * <wc-navigation-rail-item active>
13498
- * <wc-icon slot="icon">home</wc-icon>
13867
+ * <wc-icon slot="icon" name="home"></wc-icon>
13499
13868
  * Home
13500
13869
  * </wc-navigation-rail-item>
13501
13870
  * <wc-navigation-rail-item>
13502
- * <wc-icon slot="icon">search</wc-icon>
13871
+ * <wc-icon slot="icon" name="search"></wc-icon>
13503
13872
  * Search
13504
13873
  * </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
13874
  * </wc-navigation-rail>
13510
13875
  * ```
13511
13876
  * @tags navigation
@@ -13599,5 +13964,5 @@ __decorate([
13599
13964
  n({ type: Boolean, attribute: 'show-divider' })
13600
13965
  ], NavigationRail.prototype, "showDivider", void 0);
13601
13966
 
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
13967
+ 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 };
13968
+ //# sourceMappingURL=navigation-rail-DAUuJ_Yp.js.map