@m3e/web 2.3.1 → 2.4.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 (170) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -0
  3. package/dist/all.js +940 -42
  4. package/dist/all.js.map +1 -1
  5. package/dist/all.min.js +44 -44
  6. package/dist/all.min.js.map +1 -1
  7. package/dist/app-bar.js +1 -1
  8. package/dist/app-bar.min.js +1 -1
  9. package/dist/autocomplete.js +1 -1
  10. package/dist/autocomplete.min.js +1 -1
  11. package/dist/avatar.js +1 -1
  12. package/dist/avatar.min.js +1 -1
  13. package/dist/badge.js +1 -1
  14. package/dist/badge.min.js +1 -1
  15. package/dist/bottom-sheet.js +1 -1
  16. package/dist/bottom-sheet.min.js +1 -1
  17. package/dist/button-group.js +1 -1
  18. package/dist/button-group.min.js +1 -1
  19. package/dist/button.js +1 -1
  20. package/dist/button.min.js +1 -1
  21. package/dist/calendar.js +1 -1
  22. package/dist/calendar.min.js +1 -1
  23. package/dist/card.js +1 -1
  24. package/dist/card.min.js +1 -1
  25. package/dist/checkbox.js +1 -1
  26. package/dist/checkbox.min.js +1 -1
  27. package/dist/chips.js +1 -1
  28. package/dist/chips.min.js +1 -1
  29. package/dist/core-a11y.js +5 -3
  30. package/dist/core-a11y.js.map +1 -1
  31. package/dist/core-a11y.min.js +6 -6
  32. package/dist/core-a11y.min.js.map +1 -1
  33. package/dist/core-anchoring.js +1 -1
  34. package/dist/core-anchoring.min.js +1 -1
  35. package/dist/core-bidi.js +1 -1
  36. package/dist/core-bidi.min.js +1 -1
  37. package/dist/core-layout.js +1 -1
  38. package/dist/core-layout.min.js +1 -1
  39. package/dist/core-platform.js +1 -1
  40. package/dist/core-platform.min.js +1 -1
  41. package/dist/core.js +6 -6
  42. package/dist/core.js.map +1 -1
  43. package/dist/core.min.js +2 -2
  44. package/dist/core.min.js.map +1 -1
  45. package/dist/css-custom-data.json +290 -180
  46. package/dist/custom-elements.json +22418 -21145
  47. package/dist/datepicker.js +1 -1
  48. package/dist/datepicker.min.js +1 -1
  49. package/dist/dialog.js +1 -1
  50. package/dist/dialog.min.js +1 -1
  51. package/dist/divider.js +1 -1
  52. package/dist/divider.min.js +1 -1
  53. package/dist/drawer-container.js +1 -1
  54. package/dist/drawer-container.min.js +1 -1
  55. package/dist/expansion-panel.js +1 -1
  56. package/dist/expansion-panel.min.js +1 -1
  57. package/dist/fab-menu.js +1 -1
  58. package/dist/fab-menu.min.js +1 -1
  59. package/dist/fab.js +1 -1
  60. package/dist/fab.min.js +1 -1
  61. package/dist/form-field.js +1 -1
  62. package/dist/form-field.min.js +1 -1
  63. package/dist/heading.js +1 -1
  64. package/dist/heading.min.js +1 -1
  65. package/dist/html-custom-data.json +172 -133
  66. package/dist/icon-button.js +1 -1
  67. package/dist/icon-button.min.js +1 -1
  68. package/dist/icon.js +146 -6
  69. package/dist/icon.js.map +1 -1
  70. package/dist/icon.min.js +2 -2
  71. package/dist/icon.min.js.map +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/index.min.js +1 -1
  74. package/dist/list.js +2 -2
  75. package/dist/list.js.map +1 -1
  76. package/dist/list.min.js +2 -2
  77. package/dist/list.min.js.map +1 -1
  78. package/dist/loading-indicator.js +1 -1
  79. package/dist/loading-indicator.min.js +1 -1
  80. package/dist/menu.js +1 -1
  81. package/dist/menu.min.js +1 -1
  82. package/dist/nav-bar.js +1 -1
  83. package/dist/nav-bar.min.js +1 -1
  84. package/dist/nav-menu.js +19 -27
  85. package/dist/nav-menu.js.map +1 -1
  86. package/dist/nav-menu.min.js +2 -2
  87. package/dist/nav-menu.min.js.map +1 -1
  88. package/dist/nav-rail.js +1 -1
  89. package/dist/nav-rail.min.js +1 -1
  90. package/dist/option.js +1 -1
  91. package/dist/option.min.js +1 -1
  92. package/dist/paginator.js +1 -1
  93. package/dist/paginator.min.js +1 -1
  94. package/dist/progress-indicator.js +1 -1
  95. package/dist/progress-indicator.min.js +1 -1
  96. package/dist/radio-group.js +1 -1
  97. package/dist/radio-group.min.js +1 -1
  98. package/dist/search.js +1 -1
  99. package/dist/search.min.js +1 -1
  100. package/dist/segmented-button.js +1 -1
  101. package/dist/segmented-button.min.js +1 -1
  102. package/dist/select.js +1 -1
  103. package/dist/select.min.js +1 -1
  104. package/dist/shape.js +1 -1
  105. package/dist/shape.min.js +1 -1
  106. package/dist/skeleton.js +48 -4
  107. package/dist/skeleton.js.map +1 -1
  108. package/dist/skeleton.min.js +2 -2
  109. package/dist/skeleton.min.js.map +1 -1
  110. package/dist/slide-group.js +1 -1
  111. package/dist/slide-group.min.js +1 -1
  112. package/dist/slider.js +1 -1
  113. package/dist/slider.min.js +1 -1
  114. package/dist/snackbar.js +1 -1
  115. package/dist/snackbar.min.js +1 -1
  116. package/dist/split-button.js +1 -1
  117. package/dist/split-button.min.js +1 -1
  118. package/dist/split-pane.js +1 -1
  119. package/dist/split-pane.min.js +1 -1
  120. package/dist/src/all.d.ts +1 -0
  121. package/dist/src/all.d.ts.map +1 -1
  122. package/dist/src/core/a11y/list-key/ListKeyManager.d.ts.map +1 -1
  123. package/dist/src/core/shared/primitives/ElevationElement.d.ts +1 -1
  124. package/dist/src/core/shared/primitives/FocusRingElement.d.ts +1 -1
  125. package/dist/src/core/shared/primitives/PseudoCheckboxElement.d.ts.map +1 -1
  126. package/dist/src/core/shared/primitives/PseudoRadioElement.d.ts.map +1 -1
  127. package/dist/src/core/shared/primitives/RippleElement.d.ts +1 -1
  128. package/dist/src/icon/IconElement.d.ts +7 -1
  129. package/dist/src/icon/IconElement.d.ts.map +1 -1
  130. package/dist/src/icon/IconRegistry.d.ts +54 -0
  131. package/dist/src/icon/IconRegistry.d.ts.map +1 -0
  132. package/dist/src/icon/IconWeight.d.ts +3 -0
  133. package/dist/src/icon/IconWeight.d.ts.map +1 -0
  134. package/dist/src/icon/index.d.ts +1 -0
  135. package/dist/src/icon/index.d.ts.map +1 -1
  136. package/dist/src/icon/registerIcon.d.ts +14 -0
  137. package/dist/src/icon/registerIcon.d.ts.map +1 -0
  138. package/dist/src/list/ListItemElement.d.ts.map +1 -1
  139. package/dist/src/nav-menu/NavMenuElement.d.ts +18 -6
  140. package/dist/src/nav-menu/NavMenuElement.d.ts.map +1 -1
  141. package/dist/src/nav-menu/NavMenuItemElement.d.ts +3 -5
  142. package/dist/src/nav-menu/NavMenuItemElement.d.ts.map +1 -1
  143. package/dist/src/skeleton/SkeletonElement.d.ts.map +1 -1
  144. package/dist/src/tree/TreeElement.d.ts +150 -0
  145. package/dist/src/tree/TreeElement.d.ts.map +1 -0
  146. package/dist/src/tree/TreeItemElement.d.ts +131 -0
  147. package/dist/src/tree/TreeItemElement.d.ts.map +1 -0
  148. package/dist/src/tree/index.d.ts +3 -0
  149. package/dist/src/tree/index.d.ts.map +1 -0
  150. package/dist/stepper.js +1 -1
  151. package/dist/stepper.min.js +1 -1
  152. package/dist/switch.js +1 -1
  153. package/dist/switch.min.js +1 -1
  154. package/dist/tabs.js +1 -1
  155. package/dist/tabs.min.js +1 -1
  156. package/dist/textarea-autosize.js +1 -1
  157. package/dist/textarea-autosize.min.js +1 -1
  158. package/dist/theme.js +1 -1
  159. package/dist/theme.min.js +1 -1
  160. package/dist/toc.js +1 -1
  161. package/dist/toc.min.js +1 -1
  162. package/dist/toolbar.js +1 -1
  163. package/dist/toolbar.min.js +1 -1
  164. package/dist/tooltip.js +1 -1
  165. package/dist/tooltip.min.js +1 -1
  166. package/dist/tree.js +737 -0
  167. package/dist/tree.js.map +1 -0
  168. package/dist/tree.min.js +7 -0
  169. package/dist/tree.min.js.map +1 -0
  170. package/package.json +7 -2
package/dist/all.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * Copyright (c) 2025 matraic
3
+ * Copyright (c) 2025–2026 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import { __classPrivateFieldGet, __decorate, __classPrivateFieldSet } from 'tslib';
@@ -5670,7 +5670,7 @@ M3eFilterChipElement.formAssociated = true;
5670
5670
  M3eFilterChipElement.styles = [M3eChipElement.styles, css`:host([selected]:not(:state(-hide-selection))) .wrapper { padding-inline-start: var(--m3e-chip-with-icon-padding-start, 0.5rem); } .icon { display: flex; align-items: center; justify-content: center; } .check { width: 1em; font-size: var(--m3e-chip-icon-size, 1.125rem); } :host(:not(:disabled):not([disabled-interactive])) .check { color: var(--m3e-chip-selected-leading-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not([selected])) .check, :host(:state(-hide-selection)) .check, :host(:state(-hide-selection):not(:state(-with-icon))) .icon { display: none; } :host(:not(:state(-with-icon))) .icon { margin-inline-start: calc(0px - var(--m3e-chip-with-icon-padding-start, 0.5rem)); transition: margin-inline-start ${DesignToken$1.motion.spring.fastEffects}; } :host([selected]) .icon { margin-inline-start: 0; } :host([selected]:not(:state(-hide-selection))) ::slotted([slot="icon"]) { display: none !important; } :host(:not(:disabled):not([disabled-interactive]):not([selected])) .base { color: var(--m3e-chip-unselected-label-text-color, ${DesignToken$1.color.onSurfaceVariant}); --m3e-ripple-color: var(--m3e-chip-unselected-ripple-color, ${DesignToken$1.color.onSurfaceVariant}); --m3e-state-layer-focus-color: var( --m3e-chip-unselected-state-layer-focus-color, ${DesignToken$1.color.onSurfaceVariant} ); --m3e-state-layer-hover-color: var( --m3e-chip-unselected-state-layer-hover-color, ${DesignToken$1.color.onSurfaceVariant} ); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="icon"]) { color: var(--m3e-chip-unselected-leading-icon-color, ${DesignToken$1.color.primary}); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="trailing-icon"]) { color: var(--m3e-chip-unselected-trailing-icon-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled):not([disabled-interactive])[selected]) .base { outline-offset: unset; outline-width: var(--m3e-chip-selected-outline-thickness, 0); color: var(--m3e-chip-selected-label-text-color, ${DesignToken$1.color.onSecondaryContainer}); background-color: var(--m3e-chip-selected-container-color, ${DesignToken$1.color.secondaryContainer}); --m3e-state-layer-hover-color: var( --m3e-chip-selected-container-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-chip-selected-container-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-elevation-hover-level: var(--m3e-chip-selected-hover-elevation, ${DesignToken$1.elevation.level1}); --m3e-ripple-color: var(--m3e-chip-selected-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-chip-selected-state-layer-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-chip-selected-state-layer-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); } :host(:not(:disabled):not([disabled-interactive])[selected]) ::slotted([slot="icon"]) { color: var(--m3e-chip-selected-leading-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="trailing-icon"]) { color: var(--m3e-chip-selected-trailing-icon-color, ${DesignToken$1.color.onSecondaryContainer}); } @media (prefers-reduced-motion) { .base, :host(:not(:state(-with-icon))) .icon { transition: none; } } @media (forced-colors: active) { :host(:not(:disabled):not([disabled-interactive]):not([selected])) .base, :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="icon"]), :host(:not(:disabled):not([disabled-interactive]):not([selected])) ::slotted([slot="trailing-icon"]) { color: CanvasText; } :host(:not(:disabled):not([disabled-interactive])[selected]) .base, :host(:not(:disabled):not([disabled-interactive])[selected]) ::slotted([slot="icon"]), :host(:not(:disabled):not([disabled-interactive])[selected]) ::slotted([slot="trailing-icon"]), :host(:not(:disabled):not([disabled-interactive])) .check { color: ButtonText; } :host(:not(:disabled):not([disabled-interactive])[selected]) .base { outline-offset: calc(0px - var(--m3e-outlined-chip-outline-thickness, 1px)); outline-width: var(--m3e-outlined-chip-outline-thickness, 1px); outline-color: ButtonText; } }`];
5671
5671
  M3eFilterChipElement = __decorate([customElement$1("m3e-filter-chip")], M3eFilterChipElement);
5672
5672
 
5673
- var _M3eFilterChipSetElement_instances, _M3eFilterChipSetElement_directionalitySubscription, _M3eFilterChipSetElement_handleSlotChange, _M3eFilterChipSetElement_handleKeyDown, _M3eFilterChipSetElement_handleChange, _M3eFilterChipSetElement_updateChipRole, _a$9;
5673
+ var _M3eFilterChipSetElement_instances, _M3eFilterChipSetElement_directionalitySubscription, _M3eFilterChipSetElement_handleSlotChange, _M3eFilterChipSetElement_handleKeyDown, _M3eFilterChipSetElement_handleChange, _M3eFilterChipSetElement_updateChipRole, _a$a;
5674
5674
  /**
5675
5675
  * A container that organizes filter chips into a cohesive group, enabling selection and
5676
5676
  * deselection of values used to refine content or trigger contextual behavior.
@@ -5715,7 +5715,7 @@ let M3eFilterChipSetElement = class M3eFilterChipSetElement extends Labelled$1(D
5715
5715
  /** @private */
5716
5716
  _M3eFilterChipSetElement_directionalitySubscription.set(this, void 0);
5717
5717
  /** @internal */
5718
- this[_a$9] = new SelectionManager().onActiveItemChange(() => this[selectionManager].activeItem?.focus()).withWrap().withDirectionality(M3eDirectionality.current);
5718
+ this[_a$a] = new SelectionManager().onActiveItemChange(() => this[selectionManager].activeItem?.focus()).withWrap().withDirectionality(M3eDirectionality.current);
5719
5719
  /**
5720
5720
  * Whether multiple chips can be selected.
5721
5721
  * @default false
@@ -5748,7 +5748,7 @@ let M3eFilterChipSetElement = class M3eFilterChipSetElement extends Labelled$1(D
5748
5748
  }
5749
5749
  }
5750
5750
  /** @inheritdoc @internal */
5751
- get [(_M3eFilterChipSetElement_directionalitySubscription = new WeakMap(), _M3eFilterChipSetElement_instances = new WeakSet(), _a$9 = selectionManager, formValue$1)]() {
5751
+ get [(_M3eFilterChipSetElement_directionalitySubscription = new WeakMap(), _M3eFilterChipSetElement_instances = new WeakSet(), _a$a = selectionManager, formValue$1)]() {
5752
5752
  const values = this.value;
5753
5753
  if (Array.isArray(values)) {
5754
5754
  const data = new FormData();
@@ -10283,7 +10283,7 @@ var _M3eElevationElement_instances, _M3eElevationElement_hoverController, _M3eEl
10283
10283
  * The component can also be attached to another element using the `for` attribute. When attached, elevation will
10284
10284
  * be lifted by 1 level on hover. This can be disabled using the `disabled` attribute.
10285
10285
  *
10286
- * Alternately, use the `attach` and `detach` methods to programmatically attach and detach this element to another.
10286
+ * Alternatively, use the `attach` and `detach` methods to programmatically attach and detach this element to another.
10287
10287
  *
10288
10288
  * @example
10289
10289
  * The following example illustrates basic markup. Note how the parenting element's position is `relative`. A parenting
@@ -10461,7 +10461,7 @@ var _M3eFocusRingElement_instances, _M3eFocusRingElement_focusController, _M3eFo
10461
10461
  * The focus ring is displayed when the interactive element receives visible focus and hidden when focus is lost.
10462
10462
  * This can be disabled using the `disabled` attribute.
10463
10463
  *
10464
- * Alternately, you can use the `show` and `hide` methods to programmatically control the focus ring.
10464
+ * Alternatively, you can use the `show` and `hide` methods to programmatically control the focus ring.
10465
10465
  *
10466
10466
  * @example
10467
10467
  * The following example illustrates attaching a focus ring to an interactive element. In this example, the parenting div
@@ -10624,7 +10624,7 @@ let M3ePseudoCheckboxElement = class M3ePseudoCheckboxElement extends CheckedInd
10624
10624
  }
10625
10625
  };
10626
10626
  /** The styles of the element. */
10627
- M3ePseudoCheckboxElement.styles = css`:host { display: inline-block; vertical-align: middle; width: var(--m3e-checkbox-icon-size, 1.125rem); height: var(--m3e-checkbox-icon-size, 1.125rem); border-radius: var(--m3e-checkbox-container-shape, 2px); box-sizing: border-box; flex: none; } :host(:not([checked]):not([indeterminate])) { border-width: var(--m3e-checkbox-unselected-outline-thickness, 2px); border-style: solid; } :host(:not([disabled])[checked]), :host(:not([disabled])[indeterminate]) { background-color: var(--m3e-checkbox-selected-container-color, ${DesignToken.color.primary}); color: var(--m3e-checkbox-selected-icon-color, ${DesignToken.color.onPrimary}); } :host(:not([disabled]):not([checked]):not([indeterminate])) { border-color: var(--m3e-checkbox-unselected-outline-color, ${DesignToken.color.onSurfaceVariant}); } :host([disabled]:not([checked]):not([indeterminate])) { border-color: color-mix( in srgb, var(--m3e-checkbox-unselected-disabled-outline-color, ${DesignToken.color.onSurface}) var(--m3e-checkbox-unselected-disabled-outline-opacity, 38%), transparent ); } :host([disabled][checked]), :host([disabled][indeterminate]) { background-color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-container-color, ${DesignToken.color.onSurface}) var(--m3e-checkbox-selected-disabled-container-opacity, 38%), transparent ); color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-icon-color, ${DesignToken.color.surface}) var(--m3e-checkbox-selected-disabled-icon-opacity, 100%), transparent ); }`;
10627
+ M3ePseudoCheckboxElement.styles = css`:host { display: inline-block; vertical-align: middle; width: var(--m3e-checkbox-icon-size, 1.125rem); height: var(--m3e-checkbox-icon-size, 1.125rem); border-radius: var(--m3e-checkbox-container-shape, 2px); box-sizing: border-box; flex: none; } :host(:not([checked]):not([indeterminate])) { border-width: var(--m3e-checkbox-unselected-outline-thickness, 2px); border-style: solid; } :host(:not([disabled])[checked]), :host(:not([disabled])[indeterminate]) { background-color: var(--m3e-checkbox-selected-container-color, ${DesignToken.color.primary}); color: var(--m3e-checkbox-selected-icon-color, ${DesignToken.color.onPrimary}); } :host(:not([disabled]):not([checked]):not([indeterminate])) { border-color: var(--m3e-checkbox-unselected-outline-color, ${DesignToken.color.onSurfaceVariant}); } :host([disabled]:not([checked]):not([indeterminate])) { border-color: color-mix( in srgb, var(--m3e-checkbox-unselected-disabled-outline-color, ${DesignToken.color.onSurface}) var(--m3e-checkbox-unselected-disabled-outline-opacity, 38%), transparent ); } :host([disabled][checked]), :host([disabled][indeterminate]) { background-color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-container-color, ${DesignToken.color.onSurface}) var(--m3e-checkbox-selected-disabled-container-opacity, 38%), transparent ); color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-icon-color, ${DesignToken.color.surface}) var(--m3e-checkbox-selected-disabled-icon-opacity, 100%), transparent ); } svg { pointer-events: none; } @media (forced-colors: active) { :host(:not([disabled])[checked]), :host(:not([disabled])[indeterminate]) { border-color: Highlight; background-color: Highlight; color: HighlightText; } :host(:not([disabled]):not([checked]):not([indeterminate])) { border-color: CanvasText; background: Canvas; } :host([disabled]:not([checked]):not([indeterminate])) { border-color: GrayText; background-color: Canvas; } :host([disabled][checked]), :host([disabled][indeterminate]) { background-color: GrayText; color: Canvas; } }`;
10628
10628
  M3ePseudoCheckboxElement = __decorate([customElement("m3e-pseudo-checkbox")], M3ePseudoCheckboxElement);
10629
10629
 
10630
10630
  /**
@@ -10662,7 +10662,7 @@ let M3ePseudoRadioElement = class M3ePseudoRadioElement extends Checked(Disabled
10662
10662
  }
10663
10663
  };
10664
10664
  /** The styles of the element. */
10665
- M3ePseudoRadioElement.styles = css`:host { display: inline-block; vertical-align: middle; box-sizing: border-box; width: var(--m3e-radio-icon-size, 1.25rem); height: var(--m3e-radio-icon-size, 1.25rem); flex: none; } .circle { fill: currentColor; } :host(:not([checked])) .circle.inner { opacity: 0; } :host(:not([checked])) { color: var(--m3e-radio-unselected-icon-color, ${DesignToken.color.onSurfaceVariant}); } :host([checked]) { color: var(--m3e-radio-selected-icon-color, ${DesignToken.color.primary}); } :host([disabled]) { color: color-mix(in srgb, var(--m3e-radio-disabled-icon-color, ${DesignToken.color.onSurface}) 38%, transparent); }`;
10665
+ M3ePseudoRadioElement.styles = css`:host { display: inline-block; vertical-align: middle; box-sizing: border-box; width: var(--m3e-radio-icon-size, 1.25rem); height: var(--m3e-radio-icon-size, 1.25rem); flex: none; } .circle { fill: currentColor; } :host(:not([checked])) .circle.inner { opacity: 0; } :host(:not([checked])) { color: var(--m3e-radio-unselected-icon-color, ${DesignToken.color.onSurfaceVariant}); } :host([checked]) { color: var(--m3e-radio-selected-icon-color, ${DesignToken.color.primary}); } :host([disabled]) { color: color-mix(in srgb, var(--m3e-radio-disabled-icon-color, ${DesignToken.color.onSurface}) 38%, transparent); } @media (forced-colors: active) { :host { border-radius: 50%; } :host(:not([checked])) { color: CanvasText; background-color: Canvas; } :host([checked]) { color: HighlightText; background-color: Highlight; } :host([disabled]) { color: GrayText; background-color: Canvas; } }`;
10666
10666
  M3ePseudoRadioElement = __decorate([customElement("m3e-pseudo-radio")], M3ePseudoRadioElement);
10667
10667
 
10668
10668
  /**
@@ -10690,7 +10690,7 @@ var _M3eRippleElement_instances, _M3eRippleElement_ripple, _M3eRippleElement_pre
10690
10690
  *
10691
10691
  * The pressed state actives either using both pointer and keyboard events. For keyboard events, `SPACE` activate a ripple.
10692
10692
  *
10693
- * Alternately, you can use the `show` and `hide` methods to programmatically control the ripple.
10693
+ * Alternatively, you can use the `show` and `hide` methods to programmatically control the ripple.
10694
10694
  *
10695
10695
  * @example
10696
10696
  * The following example illustrates attaching a ripple to an interactive element. In this example, the parenting div
@@ -15438,6 +15438,117 @@ __decorate([property({
15438
15438
  })], M3eHeadingElement.prototype, "level", void 0);
15439
15439
  M3eHeadingElement = __decorate([customElement$1("m3e-heading")], M3eHeadingElement);
15440
15440
 
15441
+ var _a$9, _IconRegistry_icons, _IconRegistry_observers, _IconRegistry_createKey, _IconRegistry_validateSvgIconInfo;
15442
+ /** @private */
15443
+ const PATH_DATA_PATTERN = /^[MmLlHhVvCcSsQqTtAaZz0-9.,\s-]+$/;
15444
+ /** @private */
15445
+ const VIEW_BOX_PATTERN = /^-?\d+(\.\d+)?\s+-?\d+(\.\d+)?\s+-?\d+(\.\d+)?\s+-?\d+(\.\d+)?$/;
15446
+ /**
15447
+ * Service to register and display icons used by the `m3e-icon` component.
15448
+ * @internal
15449
+ */
15450
+ class IconRegistry {
15451
+ /**
15452
+ * Adds an icon to the registry for the given variant and weight.
15453
+ * @param {string} name The name of the icon.
15454
+ * @param {IconVariant} variant The variant of the icon.
15455
+ * @param {SvgIconFillSet} fillSet The SVG data for both fill states (outlined and filled) of the icon.
15456
+ */
15457
+ static addIcon(name, variant, fillSet) {
15458
+ const trustOutlinedViewBox = typeof fillSet.outlined === "string";
15459
+ const trustFilledViewBox = typeof fillSet.filled === "string";
15460
+ if (typeof fillSet.outlined === "string") {
15461
+ fillSet.outlined = {
15462
+ viewBox: "0 -960 960 960",
15463
+ path: fillSet.outlined
15464
+ };
15465
+ }
15466
+ if (typeof fillSet.filled === "string") {
15467
+ fillSet.filled = {
15468
+ viewBox: "0 -960 960 960",
15469
+ path: fillSet.filled
15470
+ };
15471
+ }
15472
+ __classPrivateFieldGet(this, _a$9, "m", _IconRegistry_validateSvgIconInfo).call(this, name, variant, fillSet.outlined, trustOutlinedViewBox);
15473
+ __classPrivateFieldGet(this, _a$9, "m", _IconRegistry_validateSvgIconInfo).call(this, name, variant, fillSet.filled, trustFilledViewBox);
15474
+ if (window !== undefined) {
15475
+ const key = __classPrivateFieldGet(this, _a$9, "m", _IconRegistry_createKey).call(this, name, variant);
15476
+ __classPrivateFieldGet(this, _a$9, "f", _IconRegistry_icons).set(key, {
15477
+ outlined: svg`<svg viewBox="${fillSet.outlined.viewBox}"><path d="${fillSet.outlined.path}"/></svg>`,
15478
+ filled: svg`<svg viewBox="${fillSet.filled.viewBox}"><path d="${fillSet.filled.path}"/></svg>`
15479
+ });
15480
+ __classPrivateFieldGet(this, _a$9, "f", _IconRegistry_observers).get(key)?.forEach(x => x());
15481
+ }
15482
+ }
15483
+ /**
15484
+ * Determines whether an icon is registered for the given variant.
15485
+ * @param {string} name The name of the icon.
15486
+ * @param {IconVariant} variant The variant of the icon.
15487
+ * @returns {boolean} Whether `icon` is registered for the given `variant`.
15488
+ */
15489
+ static isIconRegistered(name, variant) {
15490
+ return window !== undefined && __classPrivateFieldGet(this, _a$9, "f", _IconRegistry_icons).has(__classPrivateFieldGet(this, _a$9, "m", _IconRegistry_createKey).call(this, name, variant));
15491
+ }
15492
+ /**
15493
+ * Renders an icon from the registry.
15494
+ * @param {string} name The name of the icon.
15495
+ * @param {IconVariant} variant The variant of the icon.
15496
+ * @param {boolean} filled Whether to render a filled variant of the icon.
15497
+ * @returns {SVGTemplateResult | undefined} A `SVGTemplateResult` used to render the icon.
15498
+ */
15499
+ static renderIcon(name, variant, filled) {
15500
+ const data = __classPrivateFieldGet(this, _a$9, "f", _IconRegistry_icons).get(__classPrivateFieldGet(this, _a$9, "m", _IconRegistry_createKey).call(this, name, variant));
15501
+ return filled ? data?.filled : data?.outlined;
15502
+ }
15503
+ /**
15504
+ * Begins observing registration for the specified icon.
15505
+ * @param {string} name The name of the icon to observe.
15506
+ * @param {IconVariant} variant The variant of the icon to observe.
15507
+ * @param {() => void} callback Callback invoked when the specified icon is registered for the given variant.
15508
+ * @returns {() => void} Function used to stop observing.
15509
+ */
15510
+ static observe(name, variant, callback) {
15511
+ if (window === undefined) return () => {};
15512
+ const key = __classPrivateFieldGet(this, _a$9, "m", _IconRegistry_createKey).call(this, name, variant);
15513
+ if (!__classPrivateFieldGet(this, _a$9, "f", _IconRegistry_observers).has(key)) {
15514
+ __classPrivateFieldGet(this, _a$9, "f", _IconRegistry_observers).set(key, [callback]);
15515
+ } else {
15516
+ __classPrivateFieldGet(this, _a$9, "f", _IconRegistry_observers).get(key)?.push(callback);
15517
+ }
15518
+ return () => {
15519
+ const callbacks = __classPrivateFieldGet(this, _a$9, "f", _IconRegistry_observers).get(key);
15520
+ if (callbacks) {
15521
+ const index = callbacks.indexOf(callback);
15522
+ if (index >= 0) {
15523
+ callbacks.splice(index, 1);
15524
+ }
15525
+ if (callbacks.length == 0) {
15526
+ __classPrivateFieldGet(this, _a$9, "f", _IconRegistry_observers).delete(key);
15527
+ }
15528
+ }
15529
+ };
15530
+ }
15531
+ }
15532
+ _a$9 = IconRegistry, _IconRegistry_createKey = function _IconRegistry_createKey(name, variant) {
15533
+ return `${variant}-${name}`;
15534
+ }, _IconRegistry_validateSvgIconInfo = function _IconRegistry_validateSvgIconInfo(name, variant, info, trustViewBox = false) {
15535
+ if (!trustViewBox && !VIEW_BOX_PATTERN.test(info.viewBox)) {
15536
+ throw new Error(`Unable to register icon '${name}' for variant '${variant}'. Invalid viewbox data.`);
15537
+ }
15538
+ if (!PATH_DATA_PATTERN.test(info.path)) {
15539
+ throw new Error(`Unable to register icon '${name}' for variant '${variant}'. Invalid path data.`);
15540
+ }
15541
+ };
15542
+ /** @private */
15543
+ _IconRegistry_icons = {
15544
+ value: new Map()
15545
+ };
15546
+ /** @private */
15547
+ _IconRegistry_observers = {
15548
+ value: new Map()
15549
+ };
15550
+
15551
+ var _M3eIconElement_iconRegistryUnobserve;
15441
15552
  /**
15442
15553
  * A small symbol used to easily identify an action or category.
15443
15554
  *
@@ -15475,6 +15586,8 @@ M3eHeadingElement = __decorate([customElement$1("m3e-heading")], M3eHeadingEleme
15475
15586
  let M3eIconElement = class M3eIconElement extends Role$1(LitElement, "img") {
15476
15587
  constructor() {
15477
15588
  super(...arguments);
15589
+ /** @private */
15590
+ _M3eIconElement_iconRegistryUnobserve.set(this, void 0);
15478
15591
  /** The name of the icon. */
15479
15592
  this.name = "";
15480
15593
  /**
@@ -15511,6 +15624,22 @@ let M3eIconElement = class M3eIconElement extends Role$1(LitElement, "img") {
15511
15624
  super.connectedCallback();
15512
15625
  }
15513
15626
  /** @inheritdoc */
15627
+ disconnectedCallback() {
15628
+ super.disconnectedCallback();
15629
+ __classPrivateFieldGet(this, _M3eIconElement_iconRegistryUnobserve, "f")?.call(this);
15630
+ }
15631
+ /** @inheritdoc */
15632
+ willUpdate(_changedProperties) {
15633
+ super.willUpdate(_changedProperties);
15634
+ if (_changedProperties.has("name") && !IconRegistry.isIconRegistered(this.name, this.variant)) {
15635
+ __classPrivateFieldSet(this, _M3eIconElement_iconRegistryUnobserve, IconRegistry.observe(this.name, this.variant, () => {
15636
+ this.requestUpdate();
15637
+ __classPrivateFieldGet(this, _M3eIconElement_iconRegistryUnobserve, "f")?.call(this);
15638
+ __classPrivateFieldSet(this, _M3eIconElement_iconRegistryUnobserve, undefined, "f");
15639
+ }), "f");
15640
+ }
15641
+ }
15642
+ /** @inheritdoc */
15514
15643
  updated(_changedProperties) {
15515
15644
  super.updated(_changedProperties);
15516
15645
  if (_changedProperties.has("filled")) {
@@ -15528,11 +15657,12 @@ let M3eIconElement = class M3eIconElement extends Role$1(LitElement, "img") {
15528
15657
  }
15529
15658
  /** @inheritdoc */
15530
15659
  render() {
15531
- return html`<div class="icon" aria-hidden="true">${this.name}</div>`;
15660
+ return IconRegistry.isIconRegistered(this.name, this.variant) ? IconRegistry.renderIcon(this.name, this.variant, this.filled) : html`<div class="icon" aria-hidden="true">${this.name}</div>`;
15532
15661
  }
15533
15662
  };
15663
+ _M3eIconElement_iconRegistryUnobserve = new WeakMap();
15534
15664
  /** The styles of the element. */
15535
- M3eIconElement.styles = css`:host { display: inline-block; user-select: none; font-size: var(--m3e-icon-size, 1.5rem); width: 1em; vertical-align: middle; overflow: hidden; } .icon { font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; width: inherit; height: inherit; vertical-align: inherit; font-variation-settings: "FILL" var(--_icon-fill, 0), "wght" var(--_icon-weight, 400), "GRAD" var(--_icon-grade, 0), "opsz" var(--_icon-optical-size, 24); } :host([variant="outlined"]) .icon { font-family: "Material Symbols Outlined"; } :host([variant="rounded"]) .icon { font-family: "Material Symbols Rounded"; } :host([variant="sharp"]) .icon { font-family: "Material Symbols Sharp"; }`;
15665
+ M3eIconElement.styles = css`:host { display: inline-block; user-select: none; font-size: var(--m3e-icon-size, 1.5rem); width: 1em; height: 1em; vertical-align: middle; overflow: hidden; } .icon { font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; width: inherit; height: inherit; vertical-align: inherit; font-variation-settings: "FILL" var(--_icon-fill, 0), "wght" var(--_icon-weight, 400), "GRAD" var(--_icon-grade, 0), "opsz" var(--_icon-optical-size, 24); } :host([variant="outlined"]) .icon { font-family: "Material Symbols Outlined"; } :host([variant="rounded"]) .icon { font-family: "Material Symbols Rounded"; } :host([variant="sharp"]) .icon { font-family: "Material Symbols Sharp"; } svg { font-size: inherit; width: 1em; height: 1em; }`;
15536
15666
  __decorate([query(".icon")], M3eIconElement.prototype, "_icon", void 0);
15537
15667
  __decorate([property()], M3eIconElement.prototype, "name", void 0);
15538
15668
  __decorate([property({
@@ -15552,6 +15682,16 @@ __decorate([property({
15552
15682
  })], M3eIconElement.prototype, "opticalSize", void 0);
15553
15683
  M3eIconElement = __decorate([customElement$1("m3e-icon")], M3eIconElement);
15554
15684
 
15685
+ /**
15686
+ * Registers an SVG icon to the internal icon registry used by `m3e-icon`.
15687
+ * @param {string} name The name of the icon.
15688
+ * @param {IconVariant} variant The variant of the icon.
15689
+ * @param data The outlined and filled SVG information of the icon.
15690
+ */
15691
+ function registerIcon(name, variant, data) {
15692
+ IconRegistry.addIcon(name, variant, data);
15693
+ }
15694
+
15555
15695
  /**
15556
15696
  * Component design tokens that control the `M3eIconButtonElement` for all size variants.
15557
15697
  * @internal
@@ -16760,7 +16900,7 @@ _M3eListItemElement_getSlotContentType = function _M3eListItemElement_getSlotCon
16760
16900
  return elements.length > 0 ? "text" : undefined;
16761
16901
  };
16762
16902
  /** The styles of the element. */
16763
- M3eListItemElement.styles = css`:host { display: block; } .base { display: flex; min-height: inherit; width: 100%; box-sizing: border-box; column-gap: var(--m3e-list-item-between-space, 1rem); padding-inline-start: var(--m3e-list-item-leading-space, 1rem); padding-inline-end: var(--m3e-list-item-trailing-space, 1rem); border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); transition: ${unsafeCSS(`border-radius ${DesignToken$1.motion.spring.fastEffects}, background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:state(-one-line)) { min-height: calc(var(--m3e-list-item-one-line-height, 3.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:state(-one-line)) .base { padding-block-start: var(--m3e-list-item-one-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-one-line-bottom-space, 0.5rem); } :host(:state(-two-line)) { min-height: calc(var(--m3e-list-item-two-line-height, 4.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:state(-two-line)) .base { padding-block-start: var(--m3e-list-item-two-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-two-line-bottom-space, 0.5rem); } :host(:state(-three-line)) { min-height: calc(var(--m3e-list-item-three-line-height, 5.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:state(-three-line)) .base { padding-block-start: var(--m3e-list-item-three-line-top-space, 0.75rem); padding-block-end: var(--m3e-list-item-three-line-bottom-space, 0.75rem); } :host(:not(:state(-three-line))) .base { align-items: center; } :host(:state(-three-line)) .base { align-items: flex-start; } :host(:not(:disabled):not([selected])) .base:not(.hover).focus-visible:not(.pressed) { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); } :host(:not(:disabled):not([selected])) .base.hover, :host(:not(:disabled):not([selected])) .base.pressed { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); } .content { flex: 1 1 auto; display: flex; flex-direction: column; align-items: unset; justify-content: unset; } ::slotted([slot="overline"]) { font-size: var(--m3e-list-item-overline-font-size, ${DesignToken$1.typescale.standard.label.small.fontSize}); font-weight: var(--m3e-list-item-overline-font-weight, ${DesignToken$1.typescale.standard.label.small.fontWeight}); line-height: var(--m3e-list-item-overline-line-height, ${DesignToken$1.typescale.standard.label.small.lineHeight}); letter-spacing: var(--m3e-list-item-overline-tracking, ${DesignToken$1.typescale.standard.label.small.tracking}); } ::slotted([slot="supporting-text"]) { font-size: var(--m3e-list-item-supporting-text-font-size, ${DesignToken$1.typescale.standard.body.medium.fontSize}); font-weight: var( --m3e-list-item-supporting-text-font-weight, ${DesignToken$1.typescale.standard.body.medium.fontWeight} ); line-height: var( --m3e-list-item-supporting-text-line-height, ${DesignToken$1.typescale.standard.body.medium.lineHeight} ); letter-spacing: var( --m3e-list-item-supporting-text-tracking, ${DesignToken$1.typescale.standard.body.medium.tracking} ); } ::slotted(:not([slot])) { font-size: var(--m3e-list-item-font-size, ${DesignToken$1.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-list-item-font-weight, ${DesignToken$1.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-list-item-line-height, ${DesignToken$1.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-list-item-tracking, ${DesignToken$1.typescale.standard.body.large.tracking}); } :host(:state(-has-leading)) slot[name="leading"], :host(:state(-has-trailing)) slot[name="trailing"] { display: flex; justify-content: center; } :host(:not(:state(-has-leading))) slot[name="leading"] { display: var(--_list-item-leading-reserved-display, contents); } :host(:not(:state(-has-trailing))) slot[name="trailing"] { display: var(--_list-item-trailing-reserved-display, contents); } slot[name="leading"] { min-width: var(--_list-item-leading-reserved-space, 0px); margin-inline-start: calc(0px - var(--_list-item-leading-reserved-outset, 0px)); } slot[name="trailing"] { min-width: var(--_list-item-trailing-reserved-space, 0px); margin-inline-end: calc(0px - var(--_list-item-trailing-reserved-outset, 0px)); } ::slotted(span[slot="trailing"]), ::slotted([slot="trailing-supporting-text"]) { white-space: nowrap; font-size: var(--m3e-list-item-trailing-text-font-size, ${DesignToken$1.typescale.standard.label.small.fontSize}); font-weight: var( --m3e-list-item-trailing-text-font-weight, ${DesignToken$1.typescale.standard.label.small.fontWeight} ); line-height: var( --m3e-list-item-trailing-text-line-height, ${DesignToken$1.typescale.standard.label.small.lineHeight} ); letter-spacing: var( --m3e-list-item-trailing-text-tracking, ${DesignToken$1.typescale.standard.label.small.tracking} ); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]), ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { display: block; margin: 0 auto; overflow: hidden; object-fit: cover; } ::slotted(video) { width: var(--m3e-list-item-video-width, 6.25rem); height: var(--m3e-list-item-video-height, 3.5rem); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]) { border-radius: var(--m3e-list-item-video-shape, ${DesignToken$1.shape.corner.none}); } ::slotted(video[slot="leading"]) { margin-inline-start: calc(0px - var(--_list-item-leading-video-outset, 0px)); } ::slotted(video[slot="trailing"]) { margin-inline-end: calc(0px - var(--_list-item-trailing-video-outset, 0px)); } ::slotted(img) { user-drag: none; user-select: none; pointer-events: none; width: var(--m3e-list-item-image-width, 3.5rem); height: var(--m3e-list-item-image-height, 3.5rem); } ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { border-radius: var(--m3e-list-item-image-shape, ${DesignToken$1.shape.corner.none}); } ::slotted(m3e-icon[slot="leading"]), ::slotted(m3e-icon[slot="leading-icon"]), ::slotted(m3e-icon[slot="trailing"]), ::slotted(m3e-icon[slot="trailing-icon"]) { --m3e-icon-size: var(--m3e-list-item-icon-size, 1.5rem); } :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading"]), :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading-icon"]) { color: var(--m3e-list-item-leading-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) .content { color: var(--m3e-list-item-label-text-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled)) ::slotted([slot="overline"]) { color: var(--m3e-list-item-overline-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="supporting-text"]) { color: var(--m3e-list-item-supporting-text-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="trailing"]), :host(:not(:disabled)) ::slotted([slot="trailing-supporting-text"]), :host(:not(:disabled)) ::slotted([slot="trailing-icon"]) { color: var(--m3e-list-item-trailing-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) .base { background-color: var(--_list-item-container-color, var(--m3e-list-item-container-color, transparent)); } :host(:disabled) .base { background-color: var(--m3e-list-item-disabled-container-color, transparent); } :host(:disabled) ::slotted(video), :host(:disabled) ::slotted(img), :host(:disabled) ::slotted(m3e-avatar) { opacity: var(--m3e-list-item-disabled-media-opacity, 38%); } :host(:disabled) .content { color: color-mix( in srgb, var(--m3e-list-item-disabled-label-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="overline"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-overline-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-overline-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="supporting-text"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-supporting-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-supporting-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-leading-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-leading-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-trailing-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-trailing-opacity, 38%), transparent ); } :host(:not(:disabled)) .state-layer { --m3e-state-layer-hover-color: var(--m3e-list-item-hover-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-hover-opacity: var( --m3e-list-item-hover-state-layer-opacity, ${DesignToken$1.state.hoverStateLayerOpacity} ); --m3e-state-layer-focus-color: var(--m3e-list-item-focus-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-opacity: var( --m3e-list-item-focus-state-layer-opacity, ${DesignToken$1.state.focusStateLayerOpacity} ); } :host(:not(:disabled)) .ripple { --m3e-ripple-color: var(--m3e-list-item-pressed-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-opacity: var( --m3e-list-item-pressed-state-layer-opacity, ${DesignToken$1.state.pressedStateLayerOpacity} ); } @media (forced-colors: active) { :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]), :host(:disabled) .content, :host(:disabled) ::slotted([slot="overline"]), :host(:disabled) ::slotted([slot="supporting-text"]), :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: GrayText; } } @media (prefers-reduced-motion) { .base { transition: none; } }`;
16903
+ M3eListItemElement.styles = css`:host { display: block; } .base { display: flex; min-height: inherit; width: 100%; box-sizing: border-box; column-gap: var(--m3e-list-item-between-space, 1rem); padding-inline-start: var(--m3e-list-item-leading-space, 1rem); padding-inline-end: var(--m3e-list-item-trailing-space, 1rem); border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${DesignToken$1.shape.corner.none}) ); transition: ${unsafeCSS(`border-radius ${DesignToken$1.motion.spring.fastEffects}, background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } :host(:state(-one-line)) { min-height: calc(var(--m3e-list-item-one-line-height, 3.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:state(-one-line)) .base { padding-block-start: var(--m3e-list-item-one-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-one-line-bottom-space, 0.5rem); } :host(:state(-two-line)) { min-height: calc(var(--m3e-list-item-two-line-height, 4.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:state(-two-line)) .base { padding-block-start: var(--m3e-list-item-two-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-two-line-bottom-space, 0.5rem); } :host(:state(-three-line)) { min-height: calc(var(--m3e-list-item-three-line-height, 5.5rem) + ${DesignToken$1.density.calc(-3)}); } :host(:state(-three-line)) .base { padding-block-start: var(--m3e-list-item-three-line-top-space, 0.75rem); padding-block-end: var(--m3e-list-item-three-line-bottom-space, 0.75rem); } :host(:not(:state(-three-line))) .base { align-items: center; } :host(:state(-three-line)) .base { align-items: flex-start; } :host(:not(:disabled):not([selected])) .base:not(.hover).focus-visible:not(.pressed) { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${DesignToken$1.shape.corner.large}) ); } :host(:not(:disabled):not([selected])) .base.hover, :host(:not(:disabled):not([selected])) .base.pressed { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${DesignToken$1.shape.corner.medium}) ); } .content { flex: 1 1 auto; display: flex; flex-direction: column; align-items: unset; justify-content: unset; } ::slotted([slot="overline"]) { font-size: var(--m3e-list-item-overline-font-size, ${DesignToken$1.typescale.standard.label.small.fontSize}); font-weight: var(--m3e-list-item-overline-font-weight, ${DesignToken$1.typescale.standard.label.small.fontWeight}); line-height: var(--m3e-list-item-overline-line-height, ${DesignToken$1.typescale.standard.label.small.lineHeight}); letter-spacing: var(--m3e-list-item-overline-tracking, ${DesignToken$1.typescale.standard.label.small.tracking}); } ::slotted([slot="supporting-text"]) { font-size: var(--m3e-list-item-supporting-text-font-size, ${DesignToken$1.typescale.standard.body.medium.fontSize}); font-weight: var( --m3e-list-item-supporting-text-font-weight, ${DesignToken$1.typescale.standard.body.medium.fontWeight} ); line-height: var( --m3e-list-item-supporting-text-line-height, ${DesignToken$1.typescale.standard.body.medium.lineHeight} ); letter-spacing: var( --m3e-list-item-supporting-text-tracking, ${DesignToken$1.typescale.standard.body.medium.tracking} ); } ::slotted(:not([slot])) { font-size: var(--m3e-list-item-font-size, ${DesignToken$1.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-list-item-font-weight, ${DesignToken$1.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-list-item-line-height, ${DesignToken$1.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-list-item-tracking, ${DesignToken$1.typescale.standard.body.large.tracking}); } :host(:state(-has-leading)) slot[name="leading"], :host(:state(-has-trailing)) slot[name="trailing"] { display: flex; justify-content: center; } :host(:not(:state(-has-leading))) slot[name="leading"] { display: var(--_list-item-leading-reserved-display, contents); } :host(:not(:state(-has-trailing))) slot[name="trailing"] { display: var(--_list-item-trailing-reserved-display, contents); } slot[name="leading"] { min-width: var(--_list-item-leading-reserved-space, 0px); margin-inline-start: calc(0px - var(--_list-item-leading-reserved-outset, 0px)); } slot[name="trailing"] { min-width: var(--_list-item-trailing-reserved-space, 0px); margin-inline-end: calc(0px - var(--_list-item-trailing-reserved-outset, 0px)); } ::slotted(span[slot="trailing"]), ::slotted([slot="trailing-supporting-text"]) { white-space: nowrap; font-size: var(--m3e-list-item-trailing-text-font-size, ${DesignToken$1.typescale.standard.label.small.fontSize}); font-weight: var( --m3e-list-item-trailing-text-font-weight, ${DesignToken$1.typescale.standard.label.small.fontWeight} ); line-height: var( --m3e-list-item-trailing-text-line-height, ${DesignToken$1.typescale.standard.label.small.lineHeight} ); letter-spacing: var( --m3e-list-item-trailing-text-tracking, ${DesignToken$1.typescale.standard.label.small.tracking} ); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]), ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { display: block; margin: 0 auto; overflow: hidden; object-fit: cover; } ::slotted(video) { width: var(--m3e-list-item-video-width, 6.25rem); height: var(--m3e-list-item-video-height, 3.5rem); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]) { border-radius: var(--m3e-list-item-video-shape, ${DesignToken$1.shape.corner.none}); } ::slotted(video[slot="leading"]) { margin-inline-start: calc(0px - var(--_list-item-leading-video-outset, 0px)); } ::slotted(video[slot="trailing"]) { margin-inline-end: calc(0px - var(--_list-item-trailing-video-outset, 0px)); } ::slotted(img) { user-drag: none; user-select: none; pointer-events: none; width: var(--m3e-list-item-image-width, 3.5rem); height: var(--m3e-list-item-image-height, 3.5rem); } ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { border-radius: var(--m3e-list-item-image-shape, ${DesignToken$1.shape.corner.none}); } ::slotted(m3e-icon[slot="leading"]), ::slotted(m3e-icon[slot="leading-icon"]), ::slotted(m3e-icon[slot="trailing"]), ::slotted(m3e-icon[slot="trailing-icon"]) { --m3e-icon-size: var(--m3e-list-item-icon-size, 1.5rem); } :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading"]), :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading-icon"]) { color: var(--m3e-list-item-leading-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) .content { color: var(--m3e-list-item-label-text-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled)) ::slotted([slot="overline"]) { color: var(--m3e-list-item-overline-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="supporting-text"]) { color: var(--m3e-list-item-supporting-text-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="trailing"]), :host(:not(:disabled)) ::slotted([slot="trailing-supporting-text"]), :host(:not(:disabled)) ::slotted([slot="trailing-icon"]) { color: var(--m3e-list-item-trailing-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:not(:disabled)) .base { background-color: var(--_list-item-container-color, var(--m3e-list-item-container-color, transparent)); } :host(:disabled) .base { background-color: var(--m3e-list-item-disabled-container-color, transparent); } :host(:disabled) ::slotted(video), :host(:disabled) ::slotted(img), :host(:disabled) ::slotted(m3e-avatar) { opacity: var(--m3e-list-item-disabled-media-opacity, 38%); } :host(:disabled) .content { color: color-mix( in srgb, var(--m3e-list-item-disabled-label-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="overline"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-overline-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-overline-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="supporting-text"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-supporting-text-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-supporting-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-leading-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-leading-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-trailing-color, ${DesignToken$1.color.onSurface}) var(--m3e-list-item-disabled-trailing-opacity, 38%), transparent ); } :host(:not(:disabled)) .state-layer { --m3e-state-layer-hover-color: var(--m3e-list-item-hover-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-hover-opacity: var( --m3e-list-item-hover-state-layer-opacity, ${DesignToken$1.state.hoverStateLayerOpacity} ); --m3e-state-layer-focus-color: var(--m3e-list-item-focus-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-state-layer-focus-opacity: var( --m3e-list-item-focus-state-layer-opacity, ${DesignToken$1.state.focusStateLayerOpacity} ); } :host(:not(:disabled)) .ripple { --m3e-ripple-color: var(--m3e-list-item-pressed-state-layer-color, ${DesignToken$1.color.onSurface}); --m3e-ripple-opacity: var( --m3e-list-item-pressed-state-layer-opacity, ${DesignToken$1.state.pressedStateLayerOpacity} ); } @media (forced-colors: active) { .base { transition: none; } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]), :host(:disabled) .content, :host(:disabled) ::slotted([slot="overline"]), :host(:disabled) ::slotted([slot="supporting-text"]), :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: GrayText; } } @media (prefers-reduced-motion) { .base { transition: none; } }`;
16764
16904
  M3eListItemElement = __decorate([customElement$1("m3e-list-item")], M3eListItemElement);
16765
16905
 
16766
16906
  var _M3eListElement_instances, _M3eListElement_items, _M3eListElement_leadingContentTypes, _M3eListElement_trailingContentTypes, _M3eListElement_handleSlotChange;
@@ -19168,10 +19308,9 @@ var M3eNavMenuItemElement_1;
19168
19308
  *
19169
19309
  * @description
19170
19310
  * The `m3e-nav-menu-item` component represents an expandable, selectable item within a navigation menu.
19171
- * It supports nested child items, selection, disabled and indeterminate states, and emits events for
19172
- * open/close transitions. The component is highly customizable via slots and CSS custom properties, and
19173
- * is designed for accessible, keyboard-navigable menu structures.
19174
- *
19311
+ * It supports nested child items, selection and disabled states, and emits events for open/close transitions.
19312
+ * The component is highly customizable via slots and CSS custom properties, and is designed for accessible,
19313
+ * keyboard-navigable menu structures.
19175
19314
  *
19176
19315
  * @example
19177
19316
  * The following example illustrates a navigation menu with a top-level group of menu items.
@@ -19235,7 +19374,6 @@ var M3eNavMenuItemElement_1;
19235
19374
  * @slot toggle-icon - Renders the toggle icon.
19236
19375
  *
19237
19376
  * @attr disabled - Whether the element is disabled.
19238
- * @attr indeterminate - Whether the element's selected / checked state is indeterminate.
19239
19377
  * @attr open - Whether the item is expanded.
19240
19378
  * @attr selected - Whether the item is selected.
19241
19379
  *
@@ -19486,7 +19624,7 @@ __decorate([property({
19486
19624
  })], M3eNavMenuItemElement.prototype, "open", void 0);
19487
19625
  M3eNavMenuItemElement = M3eNavMenuItemElement_1 = __decorate([customElement$1("m3e-nav-menu-item")], M3eNavMenuItemElement);
19488
19626
 
19489
- var _M3eNavMenuElement_instances, _M3eNavMenuElement_ignoreFocusVisible, _M3eNavMenuElement_ignoreFocus, _M3eNavMenuElement_keyDownHandler, _M3eNavMenuElement_keyUpHandler, _M3eNavMenuElement_pointerDownHandler, _M3eNavMenuElement_handleSlotChange, _M3eNavMenuElement_handleKeyDown, _M3eNavMenuElement_handleKeyUp, _M3eNavMenuElement_handlePointerDown, _M3eNavMenuElement_activateItem, _M3eNavMenuElement_updateFocusVisible, _M3eNavMenuElement_updateItemFocusVisible, _b;
19627
+ var _M3eNavMenuElement_instances, _M3eNavMenuElement_ignoreFocusVisible, _M3eNavMenuElement_ignoreFocus, _M3eNavMenuElement_keyDownHandler, _M3eNavMenuElement_keyUpHandler, _M3eNavMenuElement_pointerDownHandler, _M3eNavMenuElement_handleSlotChange, _M3eNavMenuElement_handleKeyDown, _M3eNavMenuElement_handleKeyUp, _M3eNavMenuElement_handlePointerDown, _M3eNavMenuElement_activateItem, _M3eNavMenuElement_updateFocusVisible, _M3eNavMenuElement_updateItemFocusVisible, _b$1;
19490
19628
  var M3eNavMenuElement_1;
19491
19629
  /**
19492
19630
  * A hierarchical menu, typically used on larger devices, that allows a user to switch between views.
@@ -19570,7 +19708,7 @@ let M3eNavMenuElement = M3eNavMenuElement_1 = class M3eNavMenuElement extends Ro
19570
19708
  /** @private */
19571
19709
  _M3eNavMenuElement_ignoreFocus.set(this, false);
19572
19710
  /** @private */
19573
- this[_b] = new SelectionManager().withVerticalOrientation().withHomeAndEnd().withTypeahead().withSkipPredicate(x => x.disabled || !x.visible).disableRovingTabIndex().onActiveItemChange(() => {
19711
+ this[_b$1] = new SelectionManager().withVerticalOrientation().withHomeAndEnd().withTypeahead().withSkipPredicate(x => x.disabled || !x.visible).disableRovingTabIndex().onActiveItemChange(() => {
19574
19712
  if (this[selectionManager].activeItem) {
19575
19713
  __classPrivateFieldGet(this, _M3eNavMenuElement_instances, "m", _M3eNavMenuElement_activateItem).call(this, this[selectionManager].activeItem);
19576
19714
  }
@@ -19613,19 +19751,17 @@ let M3eNavMenuElement = M3eNavMenuElement_1 = class M3eNavMenuElement extends Ro
19613
19751
  get items() {
19614
19752
  return this[selectionManager].items;
19615
19753
  }
19616
- /**
19617
- * Expands the specified items, or all items if no items are provided.
19618
- * @param {M3eNavMenuItemElement | undefined} items The items to expand.
19619
- */
19620
- expand(items) {
19621
- (items ?? this[selectionManager].items).forEach(x => x.expand());
19754
+ /** @internal */
19755
+ expand(itemsOrDescendants, maybeDescendants = false) {
19756
+ const items = Array.isArray(itemsOrDescendants) ? itemsOrDescendants : this[selectionManager].items;
19757
+ const descendants = typeof itemsOrDescendants === "boolean" ? itemsOrDescendants : maybeDescendants;
19758
+ items.forEach(x => x.expand(descendants));
19622
19759
  }
19623
- /**
19624
- * Collapses the specified items, or all items if no items are provided.
19625
- * @param {M3eNavMenuItemElement | undefined} items The items to collapse.
19626
- */
19627
- collapse(items) {
19628
- (items ?? this[selectionManager].items).forEach(x => x.collapse());
19760
+ /** @internal */
19761
+ collapse(itemsOrDescendants, maybeDescendants = false) {
19762
+ const items = Array.isArray(itemsOrDescendants) ? itemsOrDescendants : this[selectionManager].items;
19763
+ const descendants = typeof itemsOrDescendants === "boolean" ? itemsOrDescendants : maybeDescendants;
19764
+ items.forEach(x => x.collapse(descendants));
19629
19765
  const activeItem = this[selectionManager].activeItem;
19630
19766
  if (activeItem && !activeItem.visible) {
19631
19767
  for (let parent = activeItem.parentItem; parent; parent = parent.parentItem) {
@@ -19662,7 +19798,7 @@ _M3eNavMenuElement_keyDownHandler = new WeakMap();
19662
19798
  _M3eNavMenuElement_keyUpHandler = new WeakMap();
19663
19799
  _M3eNavMenuElement_pointerDownHandler = new WeakMap();
19664
19800
  _M3eNavMenuElement_instances = new WeakSet();
19665
- _b = selectionManager;
19801
+ _b$1 = selectionManager;
19666
19802
  _M3eNavMenuElement_handleSlotChange = function _M3eNavMenuElement_handleSlotChange() {
19667
19803
  for (const divider of this.querySelectorAll("m3e-divider")) {
19668
19804
  divider.ariaHidden = "true";
@@ -19690,7 +19826,9 @@ _M3eNavMenuElement_handleKeyDown = function _M3eNavMenuElement_handleKeyDown(e)
19690
19826
  case " ":
19691
19827
  e.preventDefault();
19692
19828
  if (e.key === " " && item.ripple && !item.ripple.visible) {
19829
+ item.ripple.centered = true;
19693
19830
  item.ripple.show(0, 0, true);
19831
+ item.ripple.centered = false;
19694
19832
  }
19695
19833
  if (item.hasChildItems) {
19696
19834
  requestAnimationFrame(() => item.toggle());
@@ -19712,10 +19850,7 @@ _M3eNavMenuElement_handleKeyDown = function _M3eNavMenuElement_handleKeyDown(e)
19712
19850
  } else {
19713
19851
  const parent = item.parentItem;
19714
19852
  if (parent) {
19715
- requestAnimationFrame(() => {
19716
- parent.collapse();
19717
- this[selectionManager].setActiveItem(parent);
19718
- });
19853
+ this[selectionManager].setActiveItem(parent);
19719
19854
  }
19720
19855
  }
19721
19856
  } else if (item.hasChildItems && !item.open) {
@@ -19731,10 +19866,7 @@ _M3eNavMenuElement_handleKeyDown = function _M3eNavMenuElement_handleKeyDown(e)
19731
19866
  } else {
19732
19867
  const parent = item.parentItem;
19733
19868
  if (parent) {
19734
- requestAnimationFrame(() => {
19735
- parent.collapse();
19736
- this[selectionManager].setActiveItem(parent);
19737
- });
19869
+ this[selectionManager].setActiveItem(parent);
19738
19870
  }
19739
19871
  }
19740
19872
  } else if (item.hasChildItems && !item.open) {
@@ -23548,8 +23680,52 @@ async function _M3eSkeletonElement_createShape(element) {
23548
23680
  __classPrivateFieldGet(this, _M3eSkeletonElement_anchoringCleanupMap, "f").set(shape, anchoringCleanup);
23549
23681
  this.shadowRoot?.appendChild(shape);
23550
23682
  };
23683
+ (() => {
23684
+ if (window !== undefined) {
23685
+ registerStyleSheet$1(css`@property --_m3e-skeleton-wave-pct { syntax: "<number>"; inherits: true; initial-value: 0; } @property --_m3e-skeleton-pulse-norm { syntax: "<number>"; inherits: true; initial-value: 0; } :root { --_m3e-skeleton-wave-span: 40vw; --_m3e-skeleton-pulse-min: 0.06; }</number></number>`);
23686
+ const reducedMediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
23687
+ const forcedColorsMediaQuery = window.matchMedia("(forced-colors: active)");
23688
+ let waveAnimation = null;
23689
+ let pulseAnimation = null;
23690
+ function startAnimations() {
23691
+ waveAnimation = document.documentElement.animate([{
23692
+ ["--_m3e-skeleton-wave-pct"]: 0
23693
+ }, {
23694
+ ["--_m3e-skeleton-wave-pct"]: 1
23695
+ }], {
23696
+ duration: 2100,
23697
+ iterations: Infinity,
23698
+ easing: "linear"
23699
+ });
23700
+ pulseAnimation = document.documentElement.animate([{
23701
+ ["--_m3e-skeleton-pulse-norm"]: 0
23702
+ }, {
23703
+ ["--_m3e-skeleton-pulse-norm"]: 1
23704
+ }, {
23705
+ ["--_m3e-skeleton-pulse-norm"]: 0
23706
+ }], {
23707
+ duration: 1200,
23708
+ iterations: Infinity,
23709
+ easing: "ease-in-out"
23710
+ });
23711
+ }
23712
+ function applyMotionState() {
23713
+ if (reducedMediaQuery.matches || forcedColorsMediaQuery.matches) {
23714
+ waveAnimation?.pause();
23715
+ pulseAnimation?.pause();
23716
+ } else {
23717
+ waveAnimation?.play();
23718
+ pulseAnimation?.play();
23719
+ }
23720
+ }
23721
+ startAnimations();
23722
+ applyMotionState();
23723
+ reducedMediaQuery.addEventListener("change", applyMotionState);
23724
+ forcedColorsMediaQuery.addEventListener("change", applyMotionState);
23725
+ }
23726
+ })();
23551
23727
  /** The styles of the element. */
23552
- M3eSkeletonElement.styles = css`:host { display: contents; } .shape { position: absolute; overflow: hidden; pointer-events: none; opacity: 1; background-color: var(--m3e-skeleton-color, ${DesignToken$1.color.surface}); } .shape::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-color: color-mix( in srgb, var(--m3e-skeleton-tint-color, ${DesignToken$1.color.onSurface}) var(--m3e-skeleton-tint-opacity, 8%), transparent ); } :host(:not([loaded])) slot { visibility: hidden; } :host([loaded]) .shape { opacity: 0; transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard}`)}; } :host([shape="rounded"]) .shape { border-radius: var(--m3e-skeleton-rounded-shape, var(--m3e-skeleton-shape, ${DesignToken$1.shape.corner.large})); } :host([shape="circular"]) .shape { border-radius: var(--m3e-skeleton-circular-shape, var(--m3e-skeleton-shape, ${DesignToken$1.shape.corner.full})); } :host([shape="square"]) .shape { border-radius: var(--m3e-skeleton-square-shape, var(--m3e-skeleton-shape, 0px)); } :host([animation="pulse"]:not([loaded])) .shape::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; animation: pulse 1.2s ease-in-out infinite; background-color: var(--m3e-skeleton-tint-color, ${DesignToken$1.color.surfaceDim}); } :host([animation="wave"]:not([loaded])) .shape::after { content: ""; position: absolute; top: 0; left: -150%; height: 100%; width: 150%; opacity: var(--m3e-skeleton-accent-opacity, 6%); background: linear-gradient( 90deg, transparent, var(--m3e-skeleton-accent-color, ${DesignToken$1.color.onSurface}), transparent ); animation: wave 2.1s linear infinite; } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: var(--m3e-skeleton-accent-opacity, 6%); } 100% { opacity: 1; } } @keyframes wave { 0% { left: -150%; } 100% { left: 100%; } } @media (forced-colors: active) { :host([loaded]) .shape { transition: none; } .shape::after { display: none; } .shape { background-color: GrayText; } } @media (prefers-reduced-motion) { :host([loaded]) .shape { transition: none; } .shape::after { display: none; } }`;
23728
+ M3eSkeletonElement.styles = css`:host { display: contents; } .shape { position: absolute; overflow: hidden; pointer-events: none; opacity: 1; background-color: var(--m3e-skeleton-color, ${DesignToken$1.color.surface}); } .shape::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-color: color-mix( in srgb, var(--m3e-skeleton-tint-color, ${DesignToken$1.color.onSurface}) var(--m3e-skeleton-tint-opacity, 8%), transparent ); } :host(:not([loaded])) slot { visibility: hidden; } :host([loaded]) .shape { opacity: 0; transition: ${unsafeCSS(`opacity ${DesignToken$1.motion.duration.short3} ${DesignToken$1.motion.easing.standard}`)}; } :host([shape="rounded"]) .shape { border-radius: var(--m3e-skeleton-rounded-shape, var(--m3e-skeleton-shape, ${DesignToken$1.shape.corner.large})); } :host([shape="circular"]) .shape { border-radius: var(--m3e-skeleton-circular-shape, var(--m3e-skeleton-shape, ${DesignToken$1.shape.corner.full})); } :host([shape="square"]) .shape { border-radius: var(--m3e-skeleton-square-shape, var(--m3e-skeleton-shape, 0px)); } :host([animation="pulse"]:not([loaded])) .shape::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: calc( var(--m3e-skeleton-accent-opacity, 0.06) + (1 - var(--m3e-skeleton-accent-opacity, 0.06)) * var(--_m3e-skeleton-pulse-norm) ); background-color: var(--m3e-skeleton-tint-color, ${DesignToken$1.color.surfaceDim}); } :host([animation="wave"]:not([loaded])) .shape::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient( 90deg, transparent 0%, transparent 35%, var(--m3e-skeleton-accent-color, ${DesignToken$1.color.onSurface}) 50%, transparent 65%, transparent 100% ); background-attachment: fixed; background-size: calc(100vw + var(--_m3e-skeleton-wave-span) * 2) 100%; background-position-x: calc( var(--_m3e-skeleton-wave-pct) * (100vw + var(--_m3e-skeleton-wave-span) * 2) - var(--_m3e-skeleton-wave-span) ); opacity: var(--m3e-skeleton-accent-opacity, 0.06); } @media (forced-colors: active) { :host([loaded]) .shape { transition: none; } .shape::after { display: none; } .shape { background-color: GrayText; } } @media (prefers-reduced-motion) { :host([loaded]) .shape { transition: none; } .shape::after { display: none; } }`;
23553
23729
  __decorate([property({
23554
23730
  reflect: true
23555
23731
  })], M3eSkeletonElement.prototype, "shape", void 0);
@@ -31523,5 +31699,727 @@ M3eTooltipElement.styles = css`:host { display: contents; } .base { position: ab
31523
31699
  __decorate([property()], M3eTooltipElement.prototype, "position", void 0);
31524
31700
  M3eTooltipElement = __decorate([customElement$1("m3e-tooltip")], M3eTooltipElement);
31525
31701
 
31526
- export { ActionElementBase, AnimationLoopController, AttachInternals, CalendarViewElementBase, Checked, CheckedIndeterminate, ConstraintValidation, DesignToken, Dirty, Disabled, DisabledInteractive, EventAttribute, FocusController, Focusable, FormAssociated, FormSubmitter, HoverController, HtmlFor, InertController, IntersectionController, KeyboardClick, Labelled, LinkButton, LongPressController, M3eAccordionElement, M3eActionListElement, M3eAppBarElement, M3eAssistChipElement, M3eAutocompleteElement, M3eAvatarElement, M3eBadgeElement, M3eBottomSheetActionElement, M3eBottomSheetElement, M3eBottomSheetTriggerElement, M3eButtonElement, M3eButtonGroupElement, M3eButtonSegmentElement, M3eCalendarElement, M3eCardElement, M3eCheckboxElement, M3eChipElement, M3eChipSetElement, M3eCircularProgressIndicatorElement, M3eCollapsibleElement, M3eDatepickerElement, M3eDatepickerToggleElement, M3eDialogActionElement, M3eDialogElement, M3eDialogTriggerElement, M3eDividerElement, M3eDrawerContainerElement, M3eDrawerToggleElement, M3eElevationElement, M3eExpandableListItemElement, M3eExpansionHeaderElement, M3eExpansionPanelElement, M3eFabElement, M3eFabMenuElement, M3eFabMenuItemElement, M3eFabMenuTriggerElement, M3eFilterChipElement, M3eFilterChipSetElement, M3eFocusRingElement, M3eFormFieldElement, M3eHeadingElement, M3eIconButtonElement, M3eIconElement, M3eInputChipElement, M3eInputChipSetElement, M3eLinearProgressIndicatorElement, M3eListActionElement, M3eListElement, M3eListItemButtonElement, M3eListItemElement, M3eListOptionElement, M3eLoadingIndicatorElement, M3eMenuElement, M3eMenuItemCheckboxElement, M3eMenuItemElement, M3eMenuItemGroupElement, M3eMenuItemRadioElement, M3eMenuTriggerElement, M3eMonthViewElement, M3eMultiYearViewElement, M3eNavBarElement, M3eNavItemElement, M3eNavMenuElement, M3eNavMenuItemElement, M3eNavMenuItemGroupElement, M3eNavRailElement, M3eNavRailToggleElement, M3eOptGroupElement, M3eOptionElement, M3eOptionPanelElement, M3ePaginatorElement, M3ePseudoCheckboxElement, M3ePseudoRadioElement, M3eRadioElement, M3eRadioGroupElement, M3eRichTooltipActionElement, M3eRichTooltipElement, M3eRippleElement, M3eScrollContainerElement, M3eSearchBarElement, M3eSearchViewElement, M3eSegmentedButtonElement, M3eSelectElement, M3eSelectionListElement, M3eShapeElement, M3eSkeletonElement, M3eSlideElement, M3eSlideGroupElement, M3eSliderElement, M3eSliderThumbElement, M3eSnackbar, M3eSnackbarElement, M3eSplitButtonElement, M3eSplitPaneElement, M3eStateLayerElement, M3eStepElement, M3eStepPanelElement, M3eStepperElement, M3eStepperNextElement, M3eStepperPreviousElement, M3eStepperResetElement, M3eSuggestionChipElement, M3eSwitchElement, M3eTabElement, M3eTabPanelElement, M3eTabsElement, M3eTextHighlightElement, M3eTextOverflowElement, M3eTextareaAutosizeElement, M3eThemeElement, M3eTocElement, M3eTocItemElement, M3eToolbarElement, M3eTooltipElement, M3eYearViewElement, MutationController, PressedController, ProgressElementIndicatorBase, ReadOnly, ReconnectedCallback, Required, RequiredConstraintValidation, ResizeController, Role, ScrollController, ScrollLockController, Selected, StepperButtonElementBase, SuppressInitialAnimation, TocGenerator, TooltipElementBase, Touched, VelocityTracker, Vertical, addCustomState, checkOrSelect, computeCssSize, computeLineCount, customElement, dateConverter, debounce, defaultValue, deleteCustomState, findFormFieldControl, focusWhenReady, forcedColorsActive, formValue, generateClipPaths, getTextContent, guid, hasAssignedNodes, hasCustomState, hasKeys, interceptProperty, internals, isAttachInternalsMixin, isCheckedIndeterminateMixin, isCheckedMixin, isCheckedOrSelected, isCheckedOrSelectedMixin, isConstraintValidationMixin, isDirtyMixin, isDisabledInteractiveMixin, isDisabledMixin, isFormAssociatedMixin, isFormFieldControl, isFormSubmitterMixin, isHtmlForMixin, isLabelledMixin, isLinkButtonMixin, isReadOnlyMixin, isRequiredConstraintValidationMixin, isRequiredMixin, isSelectedMixin, isTouchedMixin, isVerticalMixin, prefersReducedMotion, registerStyleSheet, renderPseudoLink, resolveElementById, resolveFragmentUrl, safeStyleMap, scrollIntoViewIfNeeded, setCustomState, spaceSeparatedStringConverter, updateLabels, validate, waitForUpgrade };
31702
+ var _M3eTreeItemElement_instances, _M3eTreeItemElement_treeMutationController, _M3eTreeItemElement_items, _M3eTreeItemElement_tree, _M3eTreeItemElement_path, _M3eTreeItemElement_link, _M3eTreeItemElement_renderIcon, _M3eTreeItemElement_handleOpenToggleIconSlotChange, _M3eTreeItemElement_handleIconSlotChange, _M3eTreeItemElement_handleSlotChange, _M3eTreeItemElement_handleItemSlotChange, _M3eTreeItemElement_handleTreeChange, _M3eTreeItemElement_handleClick, _M3eTreeItemElement_handleCheckboxClick, _M3eTreeItemElement_handleCollapsibleEvent;
31703
+ var M3eTreeItemElement_1;
31704
+ /**
31705
+ * An expandable item in a tree.
31706
+ *
31707
+ * @description
31708
+ * The `m3e-tree-item` component represents a single item within an `m3e-tree`.
31709
+ * It supports nested child items, expand/collapse behavior, selection,
31710
+ * disabled state, and interaction styling. Items may contain a child group
31711
+ * that hosts additional `m3e-tree-item` elements.
31712
+ *
31713
+ * @tag m3e-tree-item
31714
+ *
31715
+ * @slot - Renders the nested child items.
31716
+ * @slot label - Renders the label of the item.
31717
+ * @slot icon - Renders the icon of the item.
31718
+ * @slot selected-icon - Renders the icon of the item when selected.
31719
+ * @slot toggle-icon - Renders the toggle icon.
31720
+ * @slot open-toggle-icon - Renders the toggle icon when selected.
31721
+ *
31722
+ * @attr disabled - Whether the element is disabled.
31723
+ * @attr indeterminate - Whether the element's checked state is indeterminate.
31724
+ * @attr open - Whether the item is expanded.
31725
+ * @attr selected - Whether the item is selected.
31726
+ *
31727
+ * @fires opening - Emitted when the item begins to open.
31728
+ * @fires opened - Emitted when the item has opened.
31729
+ * @fires closing - Emitted when the item begins to close.
31730
+ * @fires closed - Emitted when the item has closed.
31731
+ * @fires click - Emitted when the element is clicked.
31732
+ *
31733
+ * @cssprop --m3e-tree-item-font-size - Font size for the item label.
31734
+ * @cssprop --m3e-tree-item-font-weight - Font weight for the item label.
31735
+ * @cssprop --m3e-tree-item-line-height - Line height for the item label.
31736
+ * @cssprop --m3e-tree-item-tracking - Letter spacing for the item label.
31737
+ * @cssprop --m3e-tree-item-padding - Inline padding for the item.
31738
+ * @cssprop --m3e-tree-item-height - Height of the item.
31739
+ * @cssprop --m3e-tree-item-shape - Border radius of the item and focus ring.
31740
+ * @cssprop --m3e-tree-item-icon-size - Size of the icon.
31741
+ * @cssprop --m3e-tree-item-inset - Indentation for nested items.
31742
+ * @cssprop --m3e-tree-item-label-color - Text color for the item label.
31743
+ * @cssprop --m3e-tree-item-selected-label-color - Text color for selected item label.
31744
+ * @cssprop --m3e-tree-item-selected-container-color - Background color for selected item.
31745
+ * @cssprop --m3e-tree-item-selected-container-focus-color - Focus color for selected item container.
31746
+ * @cssprop --m3e-tree-item-selected-container-hover-color - Hover color for selected item container.
31747
+ * @cssprop --m3e-tree-item-selected-ripple-color - Ripple color for selected item.
31748
+ * @cssprop --m3e-tree-item-unselected-container-focus-color - Focus color for unselected item container.
31749
+ * @cssprop --m3e-tree-item-unselected-container-hover-color - Hover color for unselected item container.
31750
+ * @cssprop --m3e-tree-item-unselected-ripple-color - Ripple color for unselected item.
31751
+ * @cssprop --m3e-tree-item-disabled-color - Text color for disabled item.
31752
+ * @cssprop --m3e-tree-item-disabled-color-opacity - Opacity for disabled item text color.
31753
+ */
31754
+ let M3eTreeItemElement = M3eTreeItemElement_1 = class M3eTreeItemElement extends Selected$1(Disabled$1(EventAttribute$1(AttachInternals$1(Role$1(LitElement, "treeitem"), true), "opening", "opened", "closing", "closed"))) {
31755
+ constructor() {
31756
+ super(...arguments);
31757
+ _M3eTreeItemElement_instances.add(this);
31758
+ /** @private */
31759
+ this._hasChildItems = false;
31760
+ /** @private */
31761
+ this._multi = false;
31762
+ /** @private */
31763
+ _M3eTreeItemElement_treeMutationController.set(this, new MutationController$1(this, {
31764
+ target: null,
31765
+ skipInitial: true,
31766
+ config: {
31767
+ attributeFilter: ["multi"]
31768
+ },
31769
+ callback: () => __classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleTreeChange).call(this)
31770
+ }));
31771
+ /** @private */
31772
+ _M3eTreeItemElement_items.set(this, []);
31773
+ /** @private */
31774
+ _M3eTreeItemElement_tree.set(this, null);
31775
+ /** @private */
31776
+ _M3eTreeItemElement_path.set(this, new Array());
31777
+ /** @private */
31778
+ _M3eTreeItemElement_link.set(this, null);
31779
+ /**
31780
+ * Whether the item is expanded.
31781
+ * @default false
31782
+ */
31783
+ this.open = false;
31784
+ /**
31785
+ * A value indicating whether the element's selected / checked state is indeterminate.
31786
+ * @default false
31787
+ */
31788
+ this.indeterminate = false;
31789
+ }
31790
+ /** A reference to the nested `HTMLAnchorElement`. */
31791
+ get link() {
31792
+ return __classPrivateFieldGet(this, _M3eTreeItemElement_link, "f");
31793
+ }
31794
+ /** A reference to the element used to present the label of the item. */
31795
+ get label() {
31796
+ return this._base ?? null;
31797
+ }
31798
+ /** Whether the item is visible. */
31799
+ get visible() {
31800
+ return !__classPrivateFieldGet(this, _M3eTreeItemElement_path, "f").some(x => !x.open);
31801
+ }
31802
+ /** The full path of the item, starting with the top-most ancestor, including this item. */
31803
+ get path() {
31804
+ return [...__classPrivateFieldGet(this, _M3eTreeItemElement_path, "f"), this];
31805
+ }
31806
+ /** Whether the item has child items. */
31807
+ get hasChildItems() {
31808
+ return this._hasChildItems;
31809
+ }
31810
+ /** The parenting item. */
31811
+ get parentItem() {
31812
+ return __classPrivateFieldGet(this, _M3eTreeItemElement_path, "f")[__classPrivateFieldGet(this, _M3eTreeItemElement_path, "f").length - 1] ?? null;
31813
+ }
31814
+ /** The items that immediately descend from this item. */
31815
+ get childItems() {
31816
+ return __classPrivateFieldGet(this, _M3eTreeItemElement_items, "f");
31817
+ }
31818
+ /** The one-based level of the item. */
31819
+ get level() {
31820
+ return __classPrivateFieldGet(this, _M3eTreeItemElement_path, "f").length + 1;
31821
+ }
31822
+ /**
31823
+ * Expands this item, and optionally, all descendants.
31824
+ * @param {boolean} [descendants=false] Whether to expand all descendants.
31825
+ */
31826
+ expand(descendants = false) {
31827
+ if (this.hasChildItems) {
31828
+ this.open = true;
31829
+ if (descendants) {
31830
+ this.childItems.forEach(x => x.expand(true));
31831
+ }
31832
+ }
31833
+ }
31834
+ /**
31835
+ * Collapses this item, and optionally, all descendants.
31836
+ * @param {boolean} [descendants=false] Whether to collapse all descendants.
31837
+ */
31838
+ collapse(descendants = false) {
31839
+ if (this.hasChildItems) {
31840
+ this.open = false;
31841
+ if (descendants) {
31842
+ this.childItems.forEach(x => x.collapse(true));
31843
+ }
31844
+ }
31845
+ }
31846
+ /** Toggles the expanded state of the item. */
31847
+ toggle() {
31848
+ if (this.hasChildItems) {
31849
+ this.open = !this.open;
31850
+ }
31851
+ }
31852
+ /** @inheritdoc */
31853
+ connectedCallback() {
31854
+ super.connectedCallback();
31855
+ __classPrivateFieldGet(this, _M3eTreeItemElement_path, "f").length = 0;
31856
+ for (let item = this.parentElement?.closest("m3e-tree-item"); item; item = item.parentElement?.closest("m3e-tree-item")) {
31857
+ __classPrivateFieldGet(this, _M3eTreeItemElement_path, "f").push(item);
31858
+ }
31859
+ __classPrivateFieldGet(this, _M3eTreeItemElement_path, "f").reverse();
31860
+ this.style.setProperty("--_tree-item-level", `${this.level - 1}`);
31861
+ __classPrivateFieldSet(this, _M3eTreeItemElement_tree, this.closest("m3e-tree"), "f");
31862
+ if (__classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")) {
31863
+ __classPrivateFieldGet(this, _M3eTreeItemElement_treeMutationController, "f").observe(__classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f"));
31864
+ __classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleTreeChange).call(this);
31865
+ }
31866
+ }
31867
+ /** @inheritdoc */
31868
+ disconnectedCallback() {
31869
+ super.disconnectedCallback();
31870
+ __classPrivateFieldGet(this, _M3eTreeItemElement_path, "f").length = 0;
31871
+ if (__classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")) {
31872
+ __classPrivateFieldGet(this, _M3eTreeItemElement_treeMutationController, "f").unobserve(__classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f"));
31873
+ }
31874
+ }
31875
+ /** @inheritdoc */
31876
+ update(changedProperties) {
31877
+ super.update(changedProperties);
31878
+ if (changedProperties.has("selected") || changedProperties.has("indeterminate") || changedProperties.has("_multi")) {
31879
+ if (__classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.multi) {
31880
+ this.ariaSelected = null;
31881
+ this.ariaChecked = this.indeterminate ? "mixed" : `${this.selected}`;
31882
+ } else {
31883
+ this.ariaSelected = `${this.selected}`;
31884
+ }
31885
+ }
31886
+ if (changedProperties.has("selected")) {
31887
+ for (const icon of this.querySelectorAll(":scope > m3e-icon[slot]:not([slot='toggle-icon']):not([slot='open-toggle-icon'])")) {
31888
+ icon.toggleAttribute("filled", this.selected);
31889
+ }
31890
+ }
31891
+ if (changedProperties.has("open") || changedProperties.has("_hasChildItems")) {
31892
+ this.ariaExpanded = this._hasChildItems ? `${this.open}` : null;
31893
+ }
31894
+ if (changedProperties.has("_hasChildItems") && this.disabled || changedProperties.has("disabled")) {
31895
+ __classPrivateFieldGet(this, _M3eTreeItemElement_items, "f").forEach(x => x.disabled = this.disabled);
31896
+ }
31897
+ }
31898
+ /** @inheritdoc */
31899
+ firstUpdated(_changedProperties) {
31900
+ super.firstUpdated(_changedProperties);
31901
+ const base = this._base;
31902
+ if (base) {
31903
+ [this.focusRing, this.stateLayer, this.ripple].forEach(x => x?.attach(base));
31904
+ }
31905
+ }
31906
+ /** @inheritdoc */
31907
+ render() {
31908
+ return html`<div class="base" @click="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleClick)}"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div aria-hidden="true" class="inset"></div><div aria-hidden="true" class="toggle"><slot name="toggle-icon"><svg class="toggle-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"/></svg></slot><slot name="open-toggle-icon" @slotchange="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleOpenToggleIconSlotChange)}"></slot></div>${this._multi ? html`<m3e-pseudo-checkbox class="checkbox" ?checked="${this.selected}" ?indeterminate="${this.indeterminate}" ?disabled="${this.disabled}" @click="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleCheckboxClick)}"></m3e-pseudo-checkbox>` : nothing}<div class="icon" aria-hidden="true">${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_renderIcon).call(this)}</div><div class="label"><slot name="label" @slotchange="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleSlotChange)}"></slot></div></div><m3e-collapsible class="group" role="group" aria-hidden="${ifDefined(this._hasChildItems ? undefined : "true")}" ?open="${this._hasChildItems && this.open}" @opening="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleCollapsibleEvent)}" @opened="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleCollapsibleEvent)}" @closing="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleCollapsibleEvent)}" @closed="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleCollapsibleEvent)}"><slot @slotchange="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleItemSlotChange)}"></slot></m3e-collapsible>`;
31909
+ }
31910
+ };
31911
+ _M3eTreeItemElement_treeMutationController = new WeakMap();
31912
+ _M3eTreeItemElement_items = new WeakMap();
31913
+ _M3eTreeItemElement_tree = new WeakMap();
31914
+ _M3eTreeItemElement_path = new WeakMap();
31915
+ _M3eTreeItemElement_link = new WeakMap();
31916
+ _M3eTreeItemElement_instances = new WeakSet();
31917
+ _M3eTreeItemElement_renderIcon = function _M3eTreeItemElement_renderIcon() {
31918
+ const icon = html`<slot name="icon" @slotchange="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleIconSlotChange)}"></slot>`;
31919
+ return this.selected && !this.hasChildItems ? html`<slot name="selected-icon" @slotchange="${__classPrivateFieldGet(this, _M3eTreeItemElement_instances, "m", _M3eTreeItemElement_handleIconSlotChange)}">${icon}</slot>` : icon;
31920
+ };
31921
+ _M3eTreeItemElement_handleOpenToggleIconSlotChange = function _M3eTreeItemElement_handleOpenToggleIconSlotChange(e) {
31922
+ setCustomState$1(this, "-with-open-toggle-icon", hasAssignedNodes$1(e.target));
31923
+ };
31924
+ _M3eTreeItemElement_handleIconSlotChange = function _M3eTreeItemElement_handleIconSlotChange(e) {
31925
+ setCustomState$1(this, "-with-icon", hasAssignedNodes$1(e.target));
31926
+ };
31927
+ _M3eTreeItemElement_handleSlotChange = function _M3eTreeItemElement_handleSlotChange(e) {
31928
+ __classPrivateFieldSet(this, _M3eTreeItemElement_link, e.target.assignedElements({
31929
+ flatten: true
31930
+ }).find(x => x instanceof HTMLAnchorElement) ?? null, "f");
31931
+ __classPrivateFieldGet(this, _M3eTreeItemElement_link, "f")?.setAttribute("tabindex", "-1");
31932
+ };
31933
+ _M3eTreeItemElement_handleItemSlotChange = function _M3eTreeItemElement_handleItemSlotChange(e) {
31934
+ __classPrivateFieldSet(this, _M3eTreeItemElement_items, e.target.assignedElements({
31935
+ flatten: true
31936
+ }).filter(x => x instanceof M3eTreeItemElement_1), "f");
31937
+ const hadChildItems = this._hasChildItems;
31938
+ this._hasChildItems = __classPrivateFieldGet(this, _M3eTreeItemElement_items, "f").length > 0;
31939
+ setCustomState$1(this, "-with-items", this._hasChildItems);
31940
+ if (hadChildItems || this._hasChildItems) {
31941
+ if (this._multi && __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.cascade) {
31942
+ let anySelected = false,
31943
+ anyDeselected = false;
31944
+ for (const child of this.querySelectorAll("m3e-tree-item")) {
31945
+ anySelected = anySelected || child.selected;
31946
+ anyDeselected = anyDeselected || !child.selected;
31947
+ if (anySelected && anyDeselected) {
31948
+ break;
31949
+ }
31950
+ }
31951
+ if (anyDeselected) {
31952
+ __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.[selectionManager].deselect(this);
31953
+ this.indeterminate = anySelected;
31954
+ } else {
31955
+ __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.[selectionManager].select(this, false);
31956
+ this.indeterminate = false;
31957
+ }
31958
+ }
31959
+ }
31960
+ };
31961
+ _M3eTreeItemElement_handleTreeChange = function _M3eTreeItemElement_handleTreeChange() {
31962
+ this._multi = __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.multi === true;
31963
+ console.log(this._multi);
31964
+ setCustomState$1(this, "-multi", this._multi);
31965
+ };
31966
+ _M3eTreeItemElement_handleClick = function _M3eTreeItemElement_handleClick() {
31967
+ if (this.disabled) return;
31968
+ __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.[selectionManager].setActiveItem(this);
31969
+ if (!this._hasChildItems) {
31970
+ if (this._multi) {
31971
+ if (this.selected) {
31972
+ __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.deselect(this);
31973
+ } else {
31974
+ __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.select(this);
31975
+ }
31976
+ } else {
31977
+ __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.select(this);
31978
+ }
31979
+ __classPrivateFieldGet(this, _M3eTreeItemElement_link, "f")?.click();
31980
+ } else {
31981
+ if (!this._multi) {
31982
+ __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.select(this);
31983
+ }
31984
+ this.toggle();
31985
+ }
31986
+ };
31987
+ _M3eTreeItemElement_handleCheckboxClick = function _M3eTreeItemElement_handleCheckboxClick(e) {
31988
+ e.stopPropagation();
31989
+ if (!this.selected) {
31990
+ __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.select(this);
31991
+ } else {
31992
+ __classPrivateFieldGet(this, _M3eTreeItemElement_tree, "f")?.deselect(this);
31993
+ }
31994
+ };
31995
+ _M3eTreeItemElement_handleCollapsibleEvent = function _M3eTreeItemElement_handleCollapsibleEvent(e) {
31996
+ e.stopPropagation();
31997
+ this.dispatchEvent(new Event(e.type, {
31998
+ bubbles: true
31999
+ }));
32000
+ };
32001
+ /** The styles of the element. */
32002
+ M3eTreeItemElement.styles = css`:host { display: block; flex: none; outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { display: flex; align-items: center; position: relative; height: calc(var(--m3e-tree-item-height, 3rem) + ${DesignToken$1.density.calc(-3)}); padding-inline: var(--m3e-tree-item-padding, 1rem); font-size: var(--m3e-tree-item-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-tree-item-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-tree-item-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-tree-item-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); transition: ${unsafeCSS(`color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard},
32003
+ background-color ${DesignToken$1.motion.duration.short4} ${DesignToken$1.motion.easing.standard}`)}; } .base, .focus-ring { border-radius: var(--m3e-tree-item-shape, ${DesignToken$1.shape.corner.none}); } .label { flex: 1 1 auto; display: flex; align-items: center; position: relative; overflow: hidden; vertical-align: middle; } .checkbox { flex: none; margin-inline-end: 0.5rem; } .icon, .toggle { flex: none; align-items: center; justify-content: center; position: relative; vertical-align: middle; margin-inline-end: 0.5rem; } .toggle { display: var(--_tree-item-toggle-display, none); } :host(:not(:state(-with-icon))) .icon { display: none; } .inset { margin-inline-start: calc(var(--m3e-tree-item-inset, 2rem) * var(--_tree-item-level, 0)); } :host([open]) .toggle-icon { transform: rotate(90deg); } :host(:not(:state(-with-items))) .toggle { visibility: hidden; } :host(:not(:state(-with-items))) .group { display: none; } ::slotted([slot="selected-icon"]), ::slotted([slot="icon"]), ::slotted([slot="toggle-icon"]), ::slotted([slot="open-toggle-icon"]), .toggle-icon { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-tree-item-icon-size, 1.5rem); } .toggle-icon { transition: ${unsafeCSS(`transform var(--m3e-collapsible-animation-duration, ${DesignToken$1.motion.duration.medium1})
32004
+ ${DesignToken$1.motion.easing.standard}`)}; } :host(:state(-with-open-toggle-icon)[open]) slot[name="toggle-icon"], :host(:state(-with-open-toggle-icon):not([open])) slot[name="open-toggle-icon"] { display: none; } :host(:not(:disabled)) .base { cursor: pointer; } :host(:not(:disabled)) .base { color: var(--m3e-tree-item-label-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-tree-item-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-tree-item-disabled-color-opacity, 38%), transparent ); } :host([selected]:not(:disabled)) .base { color: var(--m3e-tree-item-selected-label-color, ${DesignToken$1.color.onSecondaryContainer}); background-color: var(--m3e-tree-item-selected-container-color, ${DesignToken$1.color.secondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-tree-item-selected-container-focus-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-tree-item-selected-container-hover-color, ${DesignToken$1.color.onSecondaryContainer} ); --m3e-ripple-color: var(--m3e-tree-item-selected-ripple-color, ${DesignToken$1.color.onSecondaryContainer}); } :host(:not([selected]):not(:disabled)) .base { --m3e-state-layer-focus-color: var( --m3e-tree-item-unselected-container-focus-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-tree-item-unselected-container-hover-color, ${DesignToken$1.color.onSurface} ); --m3e-ripple-color: var(--m3e-tree-item-unselected-ripple-color, ${DesignToken$1.color.onSurface}); } .state-layer { margin-inline: auto; } ::slotted(a[slot="label"]) { all: unset; } @media (prefers-reduced-motion) { .base, .toggle, .state-layer { transition: none !important; } } @media (forced-colors: active) { .base, .state-layer { transition: none !important; } :host(:disabled) .base { color: GrayText; } :host(:not(:disabled)) .base { color: CanvasText; background-color: Canvas; } :host([selected]:not(:state(-multi)):not(:disabled)) slot[name="icon"], :host([selected]:not(:state(-multi)):not(:disabled)) slot[name="label"] { color: Highlight; } }`;
32005
+ __decorate([query(".state-layer")], M3eTreeItemElement.prototype, "stateLayer", void 0);
32006
+ __decorate([query(".focus-ring")], M3eTreeItemElement.prototype, "focusRing", void 0);
32007
+ __decorate([query(".ripple")], M3eTreeItemElement.prototype, "ripple", void 0);
32008
+ __decorate([query(".base")], M3eTreeItemElement.prototype, "_base", void 0);
32009
+ __decorate([state()], M3eTreeItemElement.prototype, "_hasChildItems", void 0);
32010
+ __decorate([state()], M3eTreeItemElement.prototype, "_multi", void 0);
32011
+ __decorate([property({
32012
+ type: Boolean,
32013
+ reflect: true
32014
+ })], M3eTreeItemElement.prototype, "open", void 0);
32015
+ __decorate([property({
32016
+ type: Boolean,
32017
+ reflect: true
32018
+ })], M3eTreeItemElement.prototype, "indeterminate", void 0);
32019
+ M3eTreeItemElement = M3eTreeItemElement_1 = __decorate([customElement$1("m3e-tree-item")], M3eTreeItemElement);
32020
+
32021
+ var _M3eTreeElement_instances, _M3eTreeElement_ignoreFocusVisible, _M3eTreeElement_ignoreFocus, _M3eTreeElement_keyDownHandler, _M3eTreeElement_keyUpHandler, _M3eTreeElement_pointerDownHandler, _M3eTreeElement_handleSlotChange, _M3eTreeElement_handleKeyDown, _M3eTreeElement_handleKeyUp, _M3eTreeElement_handlePointerDown, _M3eTreeElement_activateItem, _M3eTreeElement_updateFocusVisible, _M3eTreeElement_updateItemFocusVisible, _M3eTreeElement_cascadeAncestorSelected, _b;
32022
+ var M3eTreeElement_1;
32023
+ /**
32024
+ * Presents hierarchical data in a tree structure.
32025
+ *
32026
+ * @description
32027
+ * The `m3e-tree` component presents hierarchical data in a structure that users can
32028
+ * navigate, with nested levels that open and collapse as needed.
32029
+ *
32030
+ * @example
32031
+ * The following example illustrates a simple tree with nested child items.
32032
+ * ```html
32033
+ * <m3e-tree>
32034
+ * <m3e-tree-item open>
32035
+ * <span slot="label">Getting Started</span>
32036
+ * <m3e-tree-item>
32037
+ * <span slot="label">Overview</span>
32038
+ * </m3e-tree-item>
32039
+ * <m3e-tree-item>
32040
+ * <span slot="label">Installation</span>
32041
+ * </m3e-tree-item>
32042
+ * </m3e-tree-item>
32043
+ * <m3e-tree-item>
32044
+ * <span slot="label">Components</span>
32045
+ * <m3e-tree-item>
32046
+ * <span slot="label">Button</span>
32047
+ * </m3e-tree-item>
32048
+ * <m3e-tree-item>
32049
+ * <span slot="label">Card</span>
32050
+ * </m3e-tree-item>
32051
+ * </m3e-tree-item>
32052
+ * </m3e-tree>
32053
+ * ```
32054
+ *
32055
+ * @example
32056
+ * The next example demonstrates multi-selection with cascading selection state.
32057
+ * ```html
32058
+ * <m3e-tree multi cascade>
32059
+ * <m3e-tree-item>
32060
+ * <span slot="label">Fruits</span>
32061
+ * <m3e-tree-item>
32062
+ * <span slot="label">Apples</span>
32063
+ * </m3e-tree-item>
32064
+ * <m3e-tree-item>
32065
+ * <span slot="label">Oranges</span>
32066
+ * </m3e-tree-item>
32067
+ * <m3e-tree-item>
32068
+ * <span slot="label">Bananas</span>
32069
+ * </m3e-tree-item>
32070
+ * </m3e-tree-item>
32071
+ * <m3e-tree-item>
32072
+ * <span slot="label">Vegetables</span>
32073
+ * <m3e-tree-item>
32074
+ * <span slot="label">Carrots</span>
32075
+ * </m3e-tree-item>
32076
+ * <m3e-tree-item>
32077
+ * <span slot="label">Broccoli</span>
32078
+ * </m3e-tree-item>
32079
+ * <m3e-tree-item>
32080
+ * <span slot="label">Spinach</span>
32081
+ * </m3e-tree-item>
32082
+ * </m3e-tree-item>
32083
+ * </m3e-tree>
32084
+ * ```
32085
+ *
32086
+ * @tag m3e-tree
32087
+ *
32088
+ * @slot - Renders the items of the tree.
32089
+ *
32090
+ * @attr multi - Whether multiple items can be selected.
32091
+ * @attr cascade -Whether multiple item selection cascades to child items.
32092
+ *
32093
+ * @fires change - Emitted when the selected state changes.
32094
+ *
32095
+ * @cssprop --m3e-tree-scrollbar-width - Width of the tree scrollbar.
32096
+ * @cssprop --m3e-tree-scrollbar-color - Color of the tree scrollbar.
32097
+ */
32098
+ let M3eTreeElement = M3eTreeElement_1 = class M3eTreeElement extends Role$1(LitElement, "tree") {
32099
+ constructor() {
32100
+ super();
32101
+ _M3eTreeElement_instances.add(this);
32102
+ /** @private */
32103
+ _M3eTreeElement_ignoreFocusVisible.set(this, false);
32104
+ /** @private */
32105
+ _M3eTreeElement_ignoreFocus.set(this, false);
32106
+ /** @private */
32107
+ this[_b] = new SelectionManager().withVerticalOrientation().withHomeAndEnd().withPageUpAndDown().withTypeahead().withSkipPredicate(x => x.disabled || !x.visible).disableRovingTabIndex().onActiveItemChange(() => {
32108
+ if (this[selectionManager].activeItem) {
32109
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_activateItem).call(this, this[selectionManager].activeItem);
32110
+ }
32111
+ });
32112
+ /** @private */
32113
+ _M3eTreeElement_keyDownHandler.set(this, e => __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_handleKeyDown).call(this, e));
32114
+ /** @private */
32115
+ _M3eTreeElement_keyUpHandler.set(this, () => __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_handleKeyUp).call(this));
32116
+ /** @private */
32117
+ _M3eTreeElement_pointerDownHandler.set(this, e => __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_handlePointerDown).call(this, e));
32118
+ /**
32119
+ * Whether multiple items can be selected.
32120
+ * @default false
32121
+ */
32122
+ this.multi = false;
32123
+ /**
32124
+ * Whether multiple item selection cascades to child items.
32125
+ * @default false
32126
+ */
32127
+ this.cascade = false;
32128
+ new PressedController$1(this, {
32129
+ callback: pressed => __classPrivateFieldSet(this, _M3eTreeElement_ignoreFocus, pressed, "f")
32130
+ });
32131
+ new FocusController$1(this, {
32132
+ callback: () => {
32133
+ if (!__classPrivateFieldGet(this, _M3eTreeElement_ignoreFocus, "f")) {
32134
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_updateFocusVisible).call(this);
32135
+ }
32136
+ }
32137
+ });
32138
+ }
32139
+ /** The selected items of the tree. */
32140
+ get selected() {
32141
+ return this[selectionManager].selectedItems;
32142
+ }
32143
+ /** All the items of the tree. */
32144
+ get items() {
32145
+ return this[selectionManager].items;
32146
+ }
32147
+ /** @internal */
32148
+ expand(itemsOrDescendants, maybeDescendants = false) {
32149
+ const items = Array.isArray(itemsOrDescendants) ? itemsOrDescendants : this[selectionManager].items;
32150
+ const descendants = typeof itemsOrDescendants === "boolean" ? itemsOrDescendants : maybeDescendants;
32151
+ items.forEach(x => x.expand(descendants));
32152
+ }
32153
+ /** @internal */
32154
+ collapse(itemsOrDescendants, maybeDescendants = false) {
32155
+ const items = Array.isArray(itemsOrDescendants) ? itemsOrDescendants : this[selectionManager].items;
32156
+ const descendants = typeof itemsOrDescendants === "boolean" ? itemsOrDescendants : maybeDescendants;
32157
+ items.forEach(x => x.collapse(descendants));
32158
+ const activeItem = this[selectionManager].activeItem;
32159
+ if (activeItem && !activeItem.visible) {
32160
+ for (let parent = activeItem.parentItem; parent; parent = parent.parentItem) {
32161
+ if (parent.visible) {
32162
+ this[selectionManager].setActiveItem(parent);
32163
+ break;
32164
+ }
32165
+ }
32166
+ }
32167
+ }
32168
+ /**
32169
+ * Selects the specified item.
32170
+ * @param {M3eTreeItemElement} item The item to select.
32171
+ * @param {boolean} [activate=false] A value indicating whether to activate the item.
32172
+ */
32173
+ select(item, activate = false) {
32174
+ this[selectionManager].select(item, activate);
32175
+ item.indeterminate = false;
32176
+ if (this.multi && this.cascade) {
32177
+ if (item.hasChildItems) {
32178
+ item.childItems.forEach(x => this.select(x));
32179
+ }
32180
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_cascadeAncestorSelected).call(this, item);
32181
+ }
32182
+ if (activate) {
32183
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_activateItem).call(this, item);
32184
+ }
32185
+ this.dispatchEvent(new Event("change", {
32186
+ bubbles: true
32187
+ }));
32188
+ }
32189
+ /**
32190
+ * Deselects the specified item.
32191
+ * @param {M3eTreeItemElement} item The item to deselect.
32192
+ */
32193
+ deselect(item) {
32194
+ this[selectionManager].deselect(item);
32195
+ item.indeterminate = false;
32196
+ if (this.multi && this.cascade) {
32197
+ if (item.hasChildItems) {
32198
+ item.childItems.forEach(x => this.deselect(x));
32199
+ }
32200
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_cascadeAncestorSelected).call(this, item);
32201
+ }
32202
+ this.dispatchEvent(new Event("change", {
32203
+ bubbles: true
32204
+ }));
32205
+ }
32206
+ /** @inheritdoc */
32207
+ connectedCallback() {
32208
+ super.connectedCallback();
32209
+ this.setAttribute("tabindex", "0");
32210
+ this.addEventListener("keydown", __classPrivateFieldGet(this, _M3eTreeElement_keyDownHandler, "f"));
32211
+ this.addEventListener("keyup", __classPrivateFieldGet(this, _M3eTreeElement_keyUpHandler, "f"));
32212
+ this.addEventListener("pointerdown", __classPrivateFieldGet(this, _M3eTreeElement_pointerDownHandler, "f"));
32213
+ }
32214
+ /** @inheritdoc */
32215
+ disconnectedCallback() {
32216
+ super.disconnectedCallback();
32217
+ this.removeEventListener("keydown", __classPrivateFieldGet(this, _M3eTreeElement_keyDownHandler, "f"));
32218
+ this.removeEventListener("keyup", __classPrivateFieldGet(this, _M3eTreeElement_keyUpHandler, "f"));
32219
+ this.removeEventListener("pointerdown", __classPrivateFieldGet(this, _M3eTreeElement_pointerDownHandler, "f"));
32220
+ }
32221
+ /** @inheritdoc */
32222
+ willUpdate(_changedProperties) {
32223
+ super.willUpdate(_changedProperties);
32224
+ if (_changedProperties.has("multi")) {
32225
+ this[selectionManager].multi = this.multi;
32226
+ if (this.multi) {
32227
+ this.setAttribute("aria-multiselectable", "true");
32228
+ } else {
32229
+ this.removeAttribute("aria-multiselectable");
32230
+ }
32231
+ }
32232
+ }
32233
+ /** @inheritdoc */
32234
+ render() {
32235
+ return html`<div class="base"><slot @slotchange="${__classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_handleSlotChange)}"></slot></div>`;
32236
+ }
32237
+ };
32238
+ _M3eTreeElement_ignoreFocusVisible = new WeakMap();
32239
+ _M3eTreeElement_ignoreFocus = new WeakMap();
32240
+ _M3eTreeElement_keyDownHandler = new WeakMap();
32241
+ _M3eTreeElement_keyUpHandler = new WeakMap();
32242
+ _M3eTreeElement_pointerDownHandler = new WeakMap();
32243
+ _M3eTreeElement_instances = new WeakSet();
32244
+ _b = selectionManager;
32245
+ _M3eTreeElement_handleSlotChange = function _M3eTreeElement_handleSlotChange() {
32246
+ const {
32247
+ added
32248
+ } = this[selectionManager].setItems([...this.querySelectorAll("m3e-tree-item")]);
32249
+ for (const item of added) {
32250
+ item.id = item.id || `m3e-tree-item-${M3eTreeElement_1.__nextId++}`;
32251
+ }
32252
+ if (this[selectionManager].activeItem) {
32253
+ this.setAttribute("aria-activedescendant", this[selectionManager].activeItem.id);
32254
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_updateFocusVisible).call(this);
32255
+ } else {
32256
+ this.removeAttribute("aria-activedescendant");
32257
+ }
32258
+ };
32259
+ _M3eTreeElement_handleKeyDown = function _M3eTreeElement_handleKeyDown(e) {
32260
+ __classPrivateFieldSet(this, _M3eTreeElement_ignoreFocusVisible, false, "f");
32261
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_updateFocusVisible).call(this);
32262
+ const item = this[selectionManager].activeItem;
32263
+ if (e.defaultPrevented || !item || item.disabled) return;
32264
+ switch (e.key) {
32265
+ case "Enter":
32266
+ if (!this.multi) {
32267
+ if (!item.selected) {
32268
+ this.select(item);
32269
+ item.link?.click();
32270
+ }
32271
+ } else {
32272
+ if (item.ripple && !item.ripple.visible) {
32273
+ item.ripple.centered = true;
32274
+ item.ripple.show(0, 0, true);
32275
+ item.ripple.centered = false;
32276
+ }
32277
+ item.link?.click();
32278
+ }
32279
+ break;
32280
+ case " ":
32281
+ e.preventDefault();
32282
+ if (this.multi) {
32283
+ if (item.selected) {
32284
+ this.deselect(item);
32285
+ } else {
32286
+ this.select(item);
32287
+ }
32288
+ } else {
32289
+ if (item.ripple && !item.ripple.visible) {
32290
+ item.ripple.centered = true;
32291
+ item.ripple.show(0, 0, true);
32292
+ item.ripple.centered = false;
32293
+ }
32294
+ this.select(item);
32295
+ item.link?.click();
32296
+ }
32297
+ break;
32298
+ case "*":
32299
+ e.preventDefault();
32300
+ item.expand(true);
32301
+ break;
32302
+ case "Left":
32303
+ case "ArrowLeft":
32304
+ e.preventDefault();
32305
+ if (M3eDirectionality.current === "ltr") {
32306
+ if (item.hasChildItems && item.open) {
32307
+ requestAnimationFrame(() => item.collapse());
32308
+ } else {
32309
+ const parent = item.parentItem;
32310
+ if (parent) {
32311
+ this[selectionManager].setActiveItem(parent);
32312
+ }
32313
+ }
32314
+ } else if (item.hasChildItems && !item.open) {
32315
+ item.expand();
32316
+ }
32317
+ break;
32318
+ case "Right":
32319
+ case "ArrowRight":
32320
+ e.preventDefault();
32321
+ if (M3eDirectionality.current === "rtl") {
32322
+ if (item.hasChildItems && item.open) {
32323
+ requestAnimationFrame(() => item.collapse());
32324
+ } else {
32325
+ const parent = item.parentItem;
32326
+ if (parent) {
32327
+ this[selectionManager].setActiveItem(parent);
32328
+ }
32329
+ }
32330
+ } else if (item.hasChildItems && !item.open) {
32331
+ item.expand();
32332
+ }
32333
+ break;
32334
+ default:
32335
+ this[selectionManager].onKeyDown(e);
32336
+ break;
32337
+ }
32338
+ };
32339
+ _M3eTreeElement_handleKeyUp = function _M3eTreeElement_handleKeyUp() {
32340
+ const item = this[selectionManager].activeItem;
32341
+ if (item && !item.disabled && item.ripple?.visible) {
32342
+ item.ripple.hide();
32343
+ }
32344
+ };
32345
+ _M3eTreeElement_handlePointerDown = function _M3eTreeElement_handlePointerDown(e) {
32346
+ if (!e.defaultPrevented && !__classPrivateFieldGet(this, _M3eTreeElement_ignoreFocusVisible, "f")) {
32347
+ __classPrivateFieldSet(this, _M3eTreeElement_ignoreFocusVisible, true, "f");
32348
+ const item = e.composedPath().reverse().find(x => x instanceof M3eTreeItemElement);
32349
+ if (item && !item.disabled) {
32350
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_updateItemFocusVisible).call(this, item, true, false);
32351
+ }
32352
+ }
32353
+ };
32354
+ _M3eTreeElement_activateItem = function _M3eTreeElement_activateItem(item) {
32355
+ this.setAttribute("aria-activedescendant", item.id);
32356
+ if (item.label) {
32357
+ scrollIntoViewIfNeeded$1(item.label, this, {
32358
+ block: "nearest",
32359
+ behavior: "smooth"
32360
+ });
32361
+ }
32362
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_updateFocusVisible).call(this);
32363
+ };
32364
+ _M3eTreeElement_updateFocusVisible = function _M3eTreeElement_updateFocusVisible() {
32365
+ const focused = this.matches(":focus") || this.matches(":focus-within");
32366
+ const focusVisible = !__classPrivateFieldGet(this, _M3eTreeElement_ignoreFocusVisible, "f") && this.matches(":focus-visible");
32367
+ this[selectionManager].items.forEach(x => {
32368
+ const active = x === this[selectionManager].activeItem;
32369
+ __classPrivateFieldGet(this, _M3eTreeElement_instances, "m", _M3eTreeElement_updateItemFocusVisible).call(this, x, active && focused, active && focusVisible);
32370
+ });
32371
+ };
32372
+ _M3eTreeElement_updateItemFocusVisible = function _M3eTreeElement_updateItemFocusVisible(item, focused, focusVisible) {
32373
+ if (focused && focusVisible) {
32374
+ item.stateLayer?.show("focused");
32375
+ } else {
32376
+ item.stateLayer?.hide("focused");
32377
+ }
32378
+ if (focusVisible) {
32379
+ item.focusRing?.show();
32380
+ } else {
32381
+ item.focusRing?.hide();
32382
+ }
32383
+ };
32384
+ _M3eTreeElement_cascadeAncestorSelected = function _M3eTreeElement_cascadeAncestorSelected(item) {
32385
+ for (let parent = item.parentItem; parent; parent = parent.parentItem) {
32386
+ let hasSelected = false,
32387
+ hasDeselected = false;
32388
+ for (const child of parent.querySelectorAll("m3e-tree-item")) {
32389
+ hasSelected = hasSelected || child.selected;
32390
+ hasDeselected = hasDeselected || !child.selected;
32391
+ if (hasSelected && hasDeselected) {
32392
+ break;
32393
+ }
32394
+ }
32395
+ if (hasDeselected) {
32396
+ this[selectionManager].deselect(parent);
32397
+ parent.indeterminate = hasSelected;
32398
+ } else {
32399
+ this[selectionManager].select(parent, false);
32400
+ parent.indeterminate = false;
32401
+ }
32402
+ }
32403
+ };
32404
+ (() => {
32405
+ // NOTE: unsafeCSS used here due to linting error with use of '>'.
32406
+ registerStyleSheet$1(css`${unsafeCSS(`m3e-tree:has(> m3e-tree-item:state(-with-items)) {
32407
+ --_tree-item-toggle-display: flex;
32408
+ }`)}`);
32409
+ })();
32410
+ /** The styles of the element. */
32411
+ M3eTreeElement.styles = css`:host { display: block; outline: none; overflow-y: auto; overflow-x: hidden; min-height: 0; scrollbar-width: ${DesignToken$1.scrollbar.width}; scrollbar-color: ${DesignToken$1.scrollbar.color}; } .base { width: 100%; display: flex; flex-direction: column; position: relative; min-height: inherit; box-sizing: border-box; }`;
32412
+ /** @private */
32413
+ M3eTreeElement.__nextId = 0;
32414
+ __decorate([property({
32415
+ type: Boolean,
32416
+ reflect: true
32417
+ })], M3eTreeElement.prototype, "multi", void 0);
32418
+ __decorate([property({
32419
+ type: Boolean,
32420
+ reflect: true
32421
+ })], M3eTreeElement.prototype, "cascade", void 0);
32422
+ M3eTreeElement = M3eTreeElement_1 = __decorate([customElement$1("m3e-tree")], M3eTreeElement);
32423
+
32424
+ export { ActionElementBase, AnimationLoopController, AttachInternals, CalendarViewElementBase, Checked, CheckedIndeterminate, ConstraintValidation, DesignToken, Dirty, Disabled, DisabledInteractive, EventAttribute, FocusController, Focusable, FormAssociated, FormSubmitter, HoverController, HtmlFor, InertController, IntersectionController, KeyboardClick, Labelled, LinkButton, LongPressController, M3eAccordionElement, M3eActionListElement, M3eAppBarElement, M3eAssistChipElement, M3eAutocompleteElement, M3eAvatarElement, M3eBadgeElement, M3eBottomSheetActionElement, M3eBottomSheetElement, M3eBottomSheetTriggerElement, M3eButtonElement, M3eButtonGroupElement, M3eButtonSegmentElement, M3eCalendarElement, M3eCardElement, M3eCheckboxElement, M3eChipElement, M3eChipSetElement, M3eCircularProgressIndicatorElement, M3eCollapsibleElement, M3eDatepickerElement, M3eDatepickerToggleElement, M3eDialogActionElement, M3eDialogElement, M3eDialogTriggerElement, M3eDividerElement, M3eDrawerContainerElement, M3eDrawerToggleElement, M3eElevationElement, M3eExpandableListItemElement, M3eExpansionHeaderElement, M3eExpansionPanelElement, M3eFabElement, M3eFabMenuElement, M3eFabMenuItemElement, M3eFabMenuTriggerElement, M3eFilterChipElement, M3eFilterChipSetElement, M3eFocusRingElement, M3eFormFieldElement, M3eHeadingElement, M3eIconButtonElement, M3eIconElement, M3eInputChipElement, M3eInputChipSetElement, M3eLinearProgressIndicatorElement, M3eListActionElement, M3eListElement, M3eListItemButtonElement, M3eListItemElement, M3eListOptionElement, M3eLoadingIndicatorElement, M3eMenuElement, M3eMenuItemCheckboxElement, M3eMenuItemElement, M3eMenuItemGroupElement, M3eMenuItemRadioElement, M3eMenuTriggerElement, M3eMonthViewElement, M3eMultiYearViewElement, M3eNavBarElement, M3eNavItemElement, M3eNavMenuElement, M3eNavMenuItemElement, M3eNavMenuItemGroupElement, M3eNavRailElement, M3eNavRailToggleElement, M3eOptGroupElement, M3eOptionElement, M3eOptionPanelElement, M3ePaginatorElement, M3ePseudoCheckboxElement, M3ePseudoRadioElement, M3eRadioElement, M3eRadioGroupElement, M3eRichTooltipActionElement, M3eRichTooltipElement, M3eRippleElement, M3eScrollContainerElement, M3eSearchBarElement, M3eSearchViewElement, M3eSegmentedButtonElement, M3eSelectElement, M3eSelectionListElement, M3eShapeElement, M3eSkeletonElement, M3eSlideElement, M3eSlideGroupElement, M3eSliderElement, M3eSliderThumbElement, M3eSnackbar, M3eSnackbarElement, M3eSplitButtonElement, M3eSplitPaneElement, M3eStateLayerElement, M3eStepElement, M3eStepPanelElement, M3eStepperElement, M3eStepperNextElement, M3eStepperPreviousElement, M3eStepperResetElement, M3eSuggestionChipElement, M3eSwitchElement, M3eTabElement, M3eTabPanelElement, M3eTabsElement, M3eTextHighlightElement, M3eTextOverflowElement, M3eTextareaAutosizeElement, M3eThemeElement, M3eTocElement, M3eTocItemElement, M3eToolbarElement, M3eTooltipElement, M3eTreeElement, M3eTreeItemElement, M3eYearViewElement, MutationController, PressedController, ProgressElementIndicatorBase, ReadOnly, ReconnectedCallback, Required, RequiredConstraintValidation, ResizeController, Role, ScrollController, ScrollLockController, Selected, StepperButtonElementBase, SuppressInitialAnimation, TocGenerator, TooltipElementBase, Touched, VelocityTracker, Vertical, addCustomState, checkOrSelect, computeCssSize, computeLineCount, customElement, dateConverter, debounce, defaultValue, deleteCustomState, findFormFieldControl, focusWhenReady, forcedColorsActive, formValue, generateClipPaths, getTextContent, guid, hasAssignedNodes, hasCustomState, hasKeys, interceptProperty, internals, isAttachInternalsMixin, isCheckedIndeterminateMixin, isCheckedMixin, isCheckedOrSelected, isCheckedOrSelectedMixin, isConstraintValidationMixin, isDirtyMixin, isDisabledInteractiveMixin, isDisabledMixin, isFormAssociatedMixin, isFormFieldControl, isFormSubmitterMixin, isHtmlForMixin, isLabelledMixin, isLinkButtonMixin, isReadOnlyMixin, isRequiredConstraintValidationMixin, isRequiredMixin, isSelectedMixin, isTouchedMixin, isVerticalMixin, prefersReducedMotion, registerIcon, registerStyleSheet, renderPseudoLink, resolveElementById, resolveFragmentUrl, safeStyleMap, scrollIntoViewIfNeeded, setCustomState, spaceSeparatedStringConverter, updateLabels, validate, waitForUpgrade };
31527
32425
  //# sourceMappingURL=all.js.map