nve-designsystem 3.2.0 → 3.3.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 (197) hide show
  1. package/chunks/chunk.2PCBEMQZ.js +163 -226
  2. package/chunks/chunk.36O46B5H.js +15 -15
  3. package/chunks/chunk.4TUIT776.js +78 -96
  4. package/chunks/chunk.5JY5FUCG.js +965 -1245
  5. package/chunks/chunk.5P45LHIX.js +668 -96
  6. package/chunks/chunk.6CTB5ZDJ.js +107 -100
  7. package/chunks/chunk.B4BZKR24.js +29 -39
  8. package/chunks/chunk.D5YQDJ7X.js +122 -166
  9. package/chunks/chunk.EA437WHD.js +5 -5
  10. package/chunks/chunk.GI7VDIWX.js +14 -15
  11. package/chunks/chunk.GMYPQTFK.js +18 -20
  12. package/chunks/chunk.HVTXQL7M.js +191 -215
  13. package/chunks/chunk.IKV4VH3T.js +18 -16
  14. package/chunks/chunk.IVVHNXMC.js +26 -27
  15. package/chunks/chunk.JHOXTQXA.js +65 -74
  16. package/chunks/chunk.JXOKFADN.js +63 -90
  17. package/chunks/chunk.K7JGTRV7.js +24 -23
  18. package/chunks/chunk.KPLQLAWP.js +132 -147
  19. package/chunks/chunk.LD4M4QGE.js +61 -74
  20. package/chunks/chunk.MSKEYBDI.js +53 -71
  21. package/chunks/chunk.NYIIDP5N.js +39 -45
  22. package/chunks/chunk.RWUUFNUL.js +91 -114
  23. package/chunks/chunk.SAPQLUO4.js +249 -228
  24. package/chunks/chunk.SI4ACBFK.js +139 -5
  25. package/chunks/chunk.TP2GB2HO.js +361 -460
  26. package/chunks/chunk.UDWRA64J.js +185 -223
  27. package/chunks/chunk.URTPIBTY.js +119 -151
  28. package/chunks/chunk.VESXC477.js +63 -66
  29. package/chunks/chunk.XA43ZQPC.js +198 -313
  30. package/chunks/chunk.XQ2OKYYA.js +25 -26
  31. package/chunks/chunk.XZNBUGX7.js +6 -6
  32. package/chunks/chunk.YHLNUJ7P.js +93 -116
  33. package/chunks/chunk.ZH2AND3P.js +340 -399
  34. package/chunks/chunk.ZL53POKZ.js +61 -156
  35. package/chunks/chunk.js +20 -0
  36. package/chunks/class-map.js +49 -45
  37. package/chunks/decorate.js +105 -0
  38. package/chunks/directive-helpers.js +5 -7
  39. package/chunks/if-defined.js +5 -5
  40. package/chunks/lit.js +525 -0
  41. package/chunks/live.js +24 -24
  42. package/chunks/nve-alert.component.js +163 -0
  43. package/chunks/nve-carousel-item.component.js +36 -0
  44. package/chunks/nve-carousel.component.js +41 -0
  45. package/chunks/nve-checkbox-group.component.js +114 -0
  46. package/chunks/nve-checkbox.component.js +28 -0
  47. package/chunks/nve-dialog.component.js +39 -0
  48. package/chunks/nve-divider.component.js +23 -0
  49. package/chunks/nve-drawer.component.js +40 -0
  50. package/chunks/nve-dropdown.component.js +83 -0
  51. package/chunks/nve-input.component.js +80 -0
  52. package/chunks/nve-label.component.js +89 -0
  53. package/chunks/nve-menu-item.component.js +35 -0
  54. package/chunks/nve-menu.component.js +17 -0
  55. package/chunks/nve-option.component.js +27 -0
  56. package/chunks/nve-popup.component.js +15 -0
  57. package/chunks/nve-radio-button.component.js +20 -0
  58. package/chunks/nve-radio-group.component.js +78 -0
  59. package/chunks/nve-radio.component.js +18 -0
  60. package/chunks/nve-select.component.js +58 -0
  61. package/chunks/nve-skeleton.component.js +20 -0
  62. package/chunks/nve-spinner.component.js +23 -0
  63. package/chunks/nve-tooltip.component.js +20 -0
  64. package/chunks/nve-warning-level.component.js +57 -0
  65. package/chunks/ref.js +75 -84
  66. package/chunks/shoelace.js +10006 -0
  67. package/chunks/static-html.js +27 -0
  68. package/chunks/unsafe-html.js +24 -20
  69. package/chunks/updateInvalidProperty.js +7 -7
  70. package/chunks/watch.js +20 -20
  71. package/components/nve-accordion/nve-accordion.component.js +24 -30
  72. package/components/nve-accordion-item/nve-accordion-item.component.js +30 -64
  73. package/components/nve-accordion-item/nve-accordion-item.styles.js +5 -5
  74. package/components/nve-alert/nve-alert.component.js +2 -227
  75. package/components/nve-alert/nve-alert.styles.js +45 -27
  76. package/components/nve-badge/nve-badge.component.js +41 -45
  77. package/components/nve-badge/nve-badge.styles.js +33 -31
  78. package/components/nve-button/nve-button.component.d.ts +110 -10
  79. package/components/nve-button/nve-button.component.js +146 -39
  80. package/components/nve-button/nve-button.styles.js +214 -157
  81. package/components/nve-carousel/nve-carousel.component.js +2 -47
  82. package/components/nve-carousel/nve-carousel.styles.js +6 -6
  83. package/components/nve-carousel-item/nve-carousel-item.component.js +2 -40
  84. package/components/nve-carousel-item/nve-carousel-item.styles.js +5 -5
  85. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +44 -54
  86. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.styles.js +5 -5
  87. package/components/nve-checkbox/nve-checkbox.component.js +2 -34
  88. package/components/nve-checkbox/nve-checkbox.styles.js +7 -7
  89. package/components/nve-checkbox-group/nve-checkbox-group.component.js +2 -152
  90. package/components/nve-checkbox-group/nve-checkbox-group.styles.js +5 -5
  91. package/components/nve-combobox/nve-combobox.component.js +222 -440
  92. package/components/nve-combobox/nve-combobox.styles.js +6 -6
  93. package/components/nve-darkmode-switch/nve-darkmode-switch.component.js +32 -38
  94. package/components/nve-dialog/nve-dialog-styles.js +6 -6
  95. package/components/nve-dialog/nve-dialog.component.js +2 -54
  96. package/components/nve-divider/nve-divider.component.js +2 -30
  97. package/components/nve-drawer/nve-drawer.component.js +2 -44
  98. package/components/nve-drawer/nve-drawer.styles.js +6 -6
  99. package/components/nve-dropdown/nve-dropdown.component.js +2 -79
  100. package/components/nve-dropdown/nve-dropdown.styles.js +5 -5
  101. package/components/nve-heading/nve-heading.component.d.ts +29 -0
  102. package/components/nve-heading/nve-heading.component.js +45 -0
  103. package/components/nve-heading/nve-heading.styles.d.ts +2 -0
  104. package/components/nve-heading/nve-heading.styles.js +41 -0
  105. package/components/nve-icon/nve-icon.component.js +145 -164
  106. package/components/nve-icon/nve-icon.styles.js +11 -6
  107. package/components/nve-icon/offline-icons.js +16 -13
  108. package/components/nve-input/nve-input.component.js +2 -100
  109. package/components/nve-input/nve-input.styles.js +5 -5
  110. package/components/nve-label/nve-label.component.js +2 -115
  111. package/components/nve-label/nve-label.styles.js +5 -5
  112. package/components/nve-link-card/nve-link-card.component.d.ts +5 -2
  113. package/components/nve-link-card/nve-link-card.component.js +44 -80
  114. package/components/nve-link-card/nve-link-card.styles.js +71 -66
  115. package/components/nve-menu/nve-menu.component.js +2 -22
  116. package/components/nve-menu/nve-menu.styles.js +5 -5
  117. package/components/nve-menu-item/nve-menu-item.component.js +2 -43
  118. package/components/nve-menu-item/nve-menu-item.styles.js +7 -7
  119. package/components/nve-message-card/nve-message-card.component.js +61 -91
  120. package/components/nve-message-card/nve-message-card.styles.js +24 -27
  121. package/components/nve-navigation-card/nve-navigation-card.component.d.ts +52 -0
  122. package/components/nve-navigation-card/nve-navigation-card.component.js +60 -0
  123. package/components/nve-navigation-card/nve-navigation-card.styles.d.ts +2 -0
  124. package/components/nve-navigation-card/nve-navigation-card.styles.js +112 -0
  125. package/components/nve-option/nve-option.component.js +2 -41
  126. package/components/nve-option/nve-option.styles.js +5 -5
  127. package/components/nve-paragraph/nve-paragraph.component.d.ts +26 -0
  128. package/components/nve-paragraph/nve-paragraph.component.js +26 -0
  129. package/components/nve-paragraph/nve-paragraph.styles.d.ts +2 -0
  130. package/components/nve-paragraph/nve-paragraph.styles.js +105 -0
  131. package/components/nve-popup/nve-popup.component.js +2 -22
  132. package/components/nve-radio/nve-radio.component.js +2 -23
  133. package/components/nve-radio/nve-radio.styles.js +5 -5
  134. package/components/nve-radio-button/nve-radio-button.component.js +2 -25
  135. package/components/nve-radio-button/nve-radio-button.styles.js +5 -5
  136. package/components/nve-radio-group/nve-radio-group.component.js +2 -119
  137. package/components/nve-radio-group/nve-radio-group.styles.js +5 -5
  138. package/components/nve-relative-time/nve-relative-time.component.js +21 -56
  139. package/components/nve-relative-time/nve-relative-time.styles.js +5 -5
  140. package/components/nve-select/nve-select.component.js +2 -80
  141. package/components/nve-select/nve-select.styles.js +5 -5
  142. package/components/nve-skeleton/nve-skeleton.component.js +2 -27
  143. package/components/nve-skeleton/nve-skeleton.styles.js +5 -5
  144. package/components/nve-spinner/nve-spinner.component.js +2 -31
  145. package/components/nve-stepper/nve-step/nve-step.component.js +113 -173
  146. package/components/nve-stepper/nve-step/nve-step.styles.js +12 -12
  147. package/components/nve-stepper/nve-stepper-mobile.component.js +37 -49
  148. package/components/nve-stepper/nve-stepper-mobile.styles.js +7 -7
  149. package/components/nve-stepper/nve-stepper.component.js +94 -139
  150. package/components/nve-stepper/nve-stepper.styles.js +5 -5
  151. package/components/nve-switch/nve-switch.component.js +75 -107
  152. package/components/nve-switch/nve-switch.styles.js +7 -7
  153. package/components/nve-tab/nve-tab.component.js +30 -42
  154. package/components/nve-tab/nve-tab.styles.js +7 -7
  155. package/components/nve-tab-group/nve-tab-group.component.js +180 -260
  156. package/components/nve-tab-group/nve-tab-group.styles.js +5 -5
  157. package/components/nve-tab-panel/nve-tab-panel.component.js +21 -31
  158. package/components/nve-tab-panel/nve-tab-panel.styles.js +5 -5
  159. package/components/nve-tag/nve-tag.component.d.ts +3 -3
  160. package/components/nve-tag/nve-tag.component.js +71 -72
  161. package/components/nve-tag/nve-tag.styles.js +23 -22
  162. package/components/nve-textarea/nve-textarea.component.d.ts +3 -1
  163. package/components/nve-textarea/nve-textarea.component.js +112 -173
  164. package/components/nve-textarea/nve-textarea.styles.js +10 -5
  165. package/components/nve-tooltip/nve-tooltip.component.js +2 -30
  166. package/components/nve-tooltip/nve-tooltip.styles.js +5 -5
  167. package/components/nve-warning-level/nve-warning-level.component.js +2 -78
  168. package/components/nve-warning-level/nve-warning-level.styles.js +7 -7
  169. package/css/global.css +13 -55
  170. package/css/nve.css +1048 -393
  171. package/css/nve_dark.css +406 -305
  172. package/css/rme.css +1050 -395
  173. package/css/rme_dark.css +408 -307
  174. package/css/shoelace-styles.css +539 -0
  175. package/css/varsom.css +1046 -391
  176. package/css/varsom_dark.css +404 -303
  177. package/custom-elements.json +2905 -12389
  178. package/fonts/LICENSE.txt +37 -0
  179. package/fonts/SourceSans3-VariableFont_wght.woff2 +0 -0
  180. package/interfaces/NveComponent.interface.js +0 -1
  181. package/nve-designsystem.d.ts +5 -0
  182. package/nve-designsystem.js +46 -86
  183. package/package.json +26 -8
  184. package/registerIcons/systemLibraryCustomization.js +23 -91
  185. package/vite-env.d.js +0 -1
  186. package/chunks/chunk.3RPBFEDE.js +0 -162
  187. package/chunks/chunk.JCXLDPQF.js +0 -225
  188. package/chunks/chunk.JQBT7BOV.js +0 -8446
  189. package/chunks/chunk.MAQXLKQ7.js +0 -598
  190. package/chunks/lit-element.js +0 -508
  191. package/chunks/property.js +0 -37
  192. package/chunks/query.js +0 -13
  193. package/chunks/state.js +0 -7
  194. package/chunks/static.js +0 -26
  195. package/nve-designsystem.css +0 -1
  196. package/vscode.css-custom-data.json +0 -621
  197. package/vscode.html-custom-data.json +0 -2354
@@ -1,16 +1,15 @@
1
- import { u as c } from "./lit-element.js";
2
- var C = (r = "value") => (l, s) => {
3
- const e = l.constructor, b = e.prototype.attributeChangedCallback;
4
- e.prototype.attributeChangedCallback = function(i, f, n) {
5
- var a;
6
- const t = e.getPropertyOptions(r), p = typeof t.attribute == "string" ? t.attribute : r;
7
- if (i === p) {
8
- const o = t.converter || c, u = (typeof o == "function" ? o : (a = o?.fromAttribute) != null ? a : c.fromAttribute)(n, t.type);
9
- this[r] !== u && (this[s] = u);
10
- }
11
- b.call(this, i, f, n);
12
- };
13
- };
14
- export {
15
- C as d
1
+ import { l as e } from "./lit.js";
2
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GI7VDIWX.js
3
+ var t = (t = "value") => (n, r) => {
4
+ let i = n.constructor, a = i.prototype.attributeChangedCallback;
5
+ i.prototype.attributeChangedCallback = function(n, o, s) {
6
+ let c = i.getPropertyOptions(t);
7
+ if (n === (typeof c.attribute == "string" ? c.attribute : t)) {
8
+ let n = c.converter || e, i = (typeof n == "function" ? n : n?.fromAttribute ?? e.fromAttribute)(s, c.type);
9
+ this[t] !== i && (this[r] = i);
10
+ }
11
+ a.call(this, n, o, s);
12
+ };
16
13
  };
14
+ //#endregion
15
+ export { t };
@@ -1,21 +1,19 @@
1
- import { a as u } from "./chunk.4TUIT776.js";
2
- function w(t, c) {
3
- const l = u({
4
- waitUntilFirstUpdate: !1
5
- }, c);
6
- return (i, o) => {
7
- const { update: r } = i, d = Array.isArray(t) ? t : [t];
8
- i.update = function(s) {
9
- d.forEach((f) => {
10
- const a = f;
11
- if (s.has(a)) {
12
- const e = s.get(a), n = this[a];
13
- e !== n && (!l.waitUntilFirstUpdate || this.hasUpdated) && this[o](e, n);
14
- }
15
- }), r.call(this, s);
16
- };
17
- };
1
+ import { a as e } from "./chunk.4TUIT776.js";
2
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GMYPQTFK.js
3
+ function t(t, n) {
4
+ let r = e({ waitUntilFirstUpdate: !1 }, n);
5
+ return (e, n) => {
6
+ let { update: i } = e, a = Array.isArray(t) ? t : [t];
7
+ e.update = function(e) {
8
+ a.forEach((t) => {
9
+ let i = t;
10
+ if (e.has(i)) {
11
+ let t = e.get(i), a = this[i];
12
+ t !== a && (!r.waitUntilFirstUpdate || this.hasUpdated) && this[n](t, a);
13
+ }
14
+ }), i.call(this, e);
15
+ };
16
+ };
18
17
  }
19
- export {
20
- w
21
- };
18
+ //#endregion
19
+ export { t };
@@ -1,16 +1,16 @@
1
- import { i as b, x as m } from "./lit-element.js";
2
- import { e as v, n as g } from "./ref.js";
3
- import { S as y } from "./chunk.5JY5FUCG.js";
4
- import { S as x } from "./chunk.36O46B5H.js";
5
- import { H as S, g as k } from "./chunk.NYIIDP5N.js";
6
- import { L as C } from "./chunk.6CTB5ZDJ.js";
7
- import { S as _ } from "./chunk.YHLNUJ7P.js";
8
- import { w as p } from "./chunk.GMYPQTFK.js";
9
- import { c as w, d as n, S as L } from "./chunk.4TUIT776.js";
10
- import { e as E } from "./class-map.js";
11
- import { n as u } from "./property.js";
12
- import { e as f } from "./query.js";
13
- var R = b`
1
+ import { a as e, u as t } from "./lit.js";
2
+ import { o as n, r } from "./decorate.js";
3
+ import { n as i, r as a, t as o } from "./chunk.4TUIT776.js";
4
+ import { n as s, t as c } from "./chunk.NYIIDP5N.js";
5
+ import { t as l } from "./chunk.YHLNUJ7P.js";
6
+ import { t as u } from "./chunk.GMYPQTFK.js";
7
+ import { t as d } from "./class-map.js";
8
+ import { t as f } from "./chunk.36O46B5H.js";
9
+ import { t as p } from "./chunk.6CTB5ZDJ.js";
10
+ import { t as m } from "./chunk.5JY5FUCG.js";
11
+ import { n as h, t as g } from "./ref.js";
12
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KZJNDGFO.js
13
+ var _ = t`
14
14
  :host {
15
15
  --submenu-offset: -2px;
16
16
 
@@ -162,109 +162,103 @@ var R = b`
162
162
  max-width: var(--auto-size-available-width) !important;
163
163
  max-height: var(--auto-size-available-height) !important;
164
164
  }
165
- `, P = class {
166
- constructor(t, o) {
167
- this.popupRef = v(), this.enableSubmenuTimer = -1, this.isConnected = !1, this.isPopupConnected = !1, this.skidding = 0, this.submenuOpenDelay = 100, this.handleMouseMove = (e) => {
168
- this.host.style.setProperty("--safe-triangle-cursor-x", `${e.clientX}px`), this.host.style.setProperty("--safe-triangle-cursor-y", `${e.clientY}px`);
169
- }, this.handleMouseOver = () => {
170
- this.hasSlotController.test("submenu") && this.enableSubmenu();
171
- }, this.handleKeyDown = (e) => {
172
- switch (e.key) {
173
- case "Escape":
174
- case "Tab":
175
- this.disableSubmenu();
176
- break;
177
- case "ArrowLeft":
178
- e.target !== this.host && (e.preventDefault(), e.stopPropagation(), this.host.focus(), this.disableSubmenu());
179
- break;
180
- case "ArrowRight":
181
- case "Enter":
182
- case " ":
183
- this.handleSubmenuEntry(e);
184
- break;
185
- }
186
- }, this.handleClick = (e) => {
187
- var i;
188
- e.target === this.host ? (e.preventDefault(), e.stopPropagation()) : e.target instanceof Element && (e.target.tagName === "sl-menu-item" || (i = e.target.role) != null && i.startsWith("menuitem")) && this.disableSubmenu();
189
- }, this.handleFocusOut = (e) => {
190
- e.relatedTarget && e.relatedTarget instanceof Element && this.host.contains(e.relatedTarget) || this.disableSubmenu();
191
- }, this.handlePopupMouseover = (e) => {
192
- e.stopPropagation();
193
- }, this.handlePopupReposition = () => {
194
- const e = this.host.renderRoot.querySelector("slot[name='submenu']"), i = e?.assignedElements({ flatten: !0 }).filter((d) => d.localName === "sl-menu")[0], h = getComputedStyle(this.host).direction === "rtl";
195
- if (!i)
196
- return;
197
- const { left: a, top: l, width: r, height: c } = i.getBoundingClientRect();
198
- this.host.style.setProperty("--safe-triangle-submenu-start-x", `${h ? a + r : a}px`), this.host.style.setProperty("--safe-triangle-submenu-start-y", `${l}px`), this.host.style.setProperty("--safe-triangle-submenu-end-x", `${h ? a + r : a}px`), this.host.style.setProperty("--safe-triangle-submenu-end-y", `${l + c}px`);
199
- }, (this.host = t).addController(this), this.hasSlotController = o;
200
- }
201
- hostConnected() {
202
- this.hasSlotController.test("submenu") && !this.host.disabled && this.addListeners();
203
- }
204
- hostDisconnected() {
205
- this.removeListeners();
206
- }
207
- hostUpdated() {
208
- this.hasSlotController.test("submenu") && !this.host.disabled ? (this.addListeners(), this.updateSkidding()) : this.removeListeners();
209
- }
210
- addListeners() {
211
- this.isConnected || (this.host.addEventListener("mousemove", this.handleMouseMove), this.host.addEventListener("mouseover", this.handleMouseOver), this.host.addEventListener("keydown", this.handleKeyDown), this.host.addEventListener("click", this.handleClick), this.host.addEventListener("focusout", this.handleFocusOut), this.isConnected = !0), this.isPopupConnected || this.popupRef.value && (this.popupRef.value.addEventListener("mouseover", this.handlePopupMouseover), this.popupRef.value.addEventListener("sl-reposition", this.handlePopupReposition), this.isPopupConnected = !0);
212
- }
213
- removeListeners() {
214
- this.isConnected && (this.host.removeEventListener("mousemove", this.handleMouseMove), this.host.removeEventListener("mouseover", this.handleMouseOver), this.host.removeEventListener("keydown", this.handleKeyDown), this.host.removeEventListener("click", this.handleClick), this.host.removeEventListener("focusout", this.handleFocusOut), this.isConnected = !1), this.isPopupConnected && this.popupRef.value && (this.popupRef.value.removeEventListener("mouseover", this.handlePopupMouseover), this.popupRef.value.removeEventListener("sl-reposition", this.handlePopupReposition), this.isPopupConnected = !1);
215
- }
216
- handleSubmenuEntry(t) {
217
- const o = this.host.renderRoot.querySelector("slot[name='submenu']");
218
- if (!o) {
219
- console.error("Cannot activate a submenu if no corresponding menuitem can be found.", this);
220
- return;
221
- }
222
- let e = null;
223
- for (const i of o.assignedElements())
224
- if (e = i.querySelectorAll("sl-menu-item, [role^='menuitem']"), e.length !== 0)
225
- break;
226
- if (!(!e || e.length === 0)) {
227
- e[0].setAttribute("tabindex", "0");
228
- for (let i = 1; i !== e.length; ++i)
229
- e[i].setAttribute("tabindex", "-1");
230
- this.popupRef.value && (t.preventDefault(), t.stopPropagation(), this.popupRef.value.active ? e[0] instanceof HTMLElement && e[0].focus() : (this.enableSubmenu(!1), this.host.updateComplete.then(() => {
231
- e[0] instanceof HTMLElement && e[0].focus();
232
- }), this.host.requestUpdate()));
233
- }
234
- }
235
- setSubmenuState(t) {
236
- this.popupRef.value && this.popupRef.value.active !== t && (this.popupRef.value.active = t, this.host.requestUpdate());
237
- }
238
- // Shows the submenu. Supports disabling the opening delay, e.g. for keyboard events that want to set the focus to the
239
- // newly opened menu.
240
- enableSubmenu(t = !0) {
241
- t ? (window.clearTimeout(this.enableSubmenuTimer), this.enableSubmenuTimer = window.setTimeout(() => {
242
- this.setSubmenuState(!0);
243
- }, this.submenuOpenDelay)) : this.setSubmenuState(!0);
244
- }
245
- disableSubmenu() {
246
- window.clearTimeout(this.enableSubmenuTimer), this.setSubmenuState(!1);
247
- }
248
- // Calculate the space the top of a menu takes-up, for aligning the popup menu-item with the activating element.
249
- updateSkidding() {
250
- var t;
251
- if (!((t = this.host.parentElement) != null && t.computedStyleMap))
252
- return;
253
- const o = this.host.parentElement.computedStyleMap(), i = ["padding-top", "border-top-width", "margin-top"].reduce((h, a) => {
254
- var l;
255
- const r = (l = o.get(a)) != null ? l : new CSSUnitValue(0, "px"), d = (r instanceof CSSUnitValue ? r : new CSSUnitValue(0, "px")).to("px");
256
- return h - d.value;
257
- }, 0);
258
- this.skidding = i;
259
- }
260
- isExpanded() {
261
- return this.popupRef.value ? this.popupRef.value.active : !1;
262
- }
263
- renderSubmenu() {
264
- const t = getComputedStyle(this.host).direction === "rtl";
265
- return this.isConnected ? m`
165
+ `, v = class {
166
+ constructor(e, t) {
167
+ this.popupRef = g(), this.enableSubmenuTimer = -1, this.isConnected = !1, this.isPopupConnected = !1, this.skidding = 0, this.submenuOpenDelay = 100, this.handleMouseMove = (e) => {
168
+ this.host.style.setProperty("--safe-triangle-cursor-x", `${e.clientX}px`), this.host.style.setProperty("--safe-triangle-cursor-y", `${e.clientY}px`);
169
+ }, this.handleMouseOver = () => {
170
+ this.hasSlotController.test("submenu") && this.enableSubmenu();
171
+ }, this.handleKeyDown = (e) => {
172
+ switch (e.key) {
173
+ case "Escape":
174
+ case "Tab":
175
+ this.disableSubmenu();
176
+ break;
177
+ case "ArrowLeft":
178
+ e.target !== this.host && (e.preventDefault(), e.stopPropagation(), this.host.focus(), this.disableSubmenu());
179
+ break;
180
+ case "ArrowRight":
181
+ case "Enter":
182
+ case " ":
183
+ this.handleSubmenuEntry(e);
184
+ break;
185
+ default: break;
186
+ }
187
+ }, this.handleClick = (e) => {
188
+ e.target === this.host ? (e.preventDefault(), e.stopPropagation()) : e.target instanceof Element && (e.target.tagName === "sl-menu-item" || e.target.role?.startsWith("menuitem")) && this.disableSubmenu();
189
+ }, this.handleFocusOut = (e) => {
190
+ e.relatedTarget && e.relatedTarget instanceof Element && this.host.contains(e.relatedTarget) || this.disableSubmenu();
191
+ }, this.handlePopupMouseover = (e) => {
192
+ e.stopPropagation();
193
+ }, this.handlePopupReposition = () => {
194
+ let e = this.host.renderRoot.querySelector("slot[name='submenu']")?.assignedElements({ flatten: !0 }).filter((e) => e.localName === "sl-menu")[0], t = getComputedStyle(this.host).direction === "rtl";
195
+ if (!e) return;
196
+ let { left: n, top: r, width: i, height: a } = e.getBoundingClientRect();
197
+ this.host.style.setProperty("--safe-triangle-submenu-start-x", `${t ? n + i : n}px`), this.host.style.setProperty("--safe-triangle-submenu-start-y", `${r}px`), this.host.style.setProperty("--safe-triangle-submenu-end-x", `${t ? n + i : n}px`), this.host.style.setProperty("--safe-triangle-submenu-end-y", `${r + a}px`);
198
+ }, (this.host = e).addController(this), this.hasSlotController = t;
199
+ }
200
+ hostConnected() {
201
+ this.hasSlotController.test("submenu") && !this.host.disabled && this.addListeners();
202
+ }
203
+ hostDisconnected() {
204
+ this.removeListeners();
205
+ }
206
+ hostUpdated() {
207
+ this.hasSlotController.test("submenu") && !this.host.disabled ? (this.addListeners(), this.updateSkidding()) : this.removeListeners();
208
+ }
209
+ addListeners() {
210
+ this.isConnected ||= (this.host.addEventListener("mousemove", this.handleMouseMove), this.host.addEventListener("mouseover", this.handleMouseOver), this.host.addEventListener("keydown", this.handleKeyDown), this.host.addEventListener("click", this.handleClick), this.host.addEventListener("focusout", this.handleFocusOut), !0), this.isPopupConnected || this.popupRef.value && (this.popupRef.value.addEventListener("mouseover", this.handlePopupMouseover), this.popupRef.value.addEventListener("sl-reposition", this.handlePopupReposition), this.isPopupConnected = !0);
211
+ }
212
+ removeListeners() {
213
+ this.isConnected &&= (this.host.removeEventListener("mousemove", this.handleMouseMove), this.host.removeEventListener("mouseover", this.handleMouseOver), this.host.removeEventListener("keydown", this.handleKeyDown), this.host.removeEventListener("click", this.handleClick), this.host.removeEventListener("focusout", this.handleFocusOut), !1), this.isPopupConnected && this.popupRef.value && (this.popupRef.value.removeEventListener("mouseover", this.handlePopupMouseover), this.popupRef.value.removeEventListener("sl-reposition", this.handlePopupReposition), this.isPopupConnected = !1);
214
+ }
215
+ handleSubmenuEntry(e) {
216
+ let t = this.host.renderRoot.querySelector("slot[name='submenu']");
217
+ if (!t) {
218
+ console.error("Cannot activate a submenu if no corresponding menuitem can be found.", this);
219
+ return;
220
+ }
221
+ let n = null;
222
+ for (let e of t.assignedElements()) if (n = e.querySelectorAll("sl-menu-item, [role^='menuitem']"), n.length !== 0) break;
223
+ if (!(!n || n.length === 0)) {
224
+ n[0].setAttribute("tabindex", "0");
225
+ for (let e = 1; e !== n.length; ++e) n[e].setAttribute("tabindex", "-1");
226
+ this.popupRef.value && (e.preventDefault(), e.stopPropagation(), this.popupRef.value.active ? n[0] instanceof HTMLElement && n[0].focus() : (this.enableSubmenu(!1), this.host.updateComplete.then(() => {
227
+ n[0] instanceof HTMLElement && n[0].focus();
228
+ }), this.host.requestUpdate()));
229
+ }
230
+ }
231
+ setSubmenuState(e) {
232
+ this.popupRef.value && this.popupRef.value.active !== e && (this.popupRef.value.active = e, this.host.requestUpdate());
233
+ }
234
+ enableSubmenu(e = !0) {
235
+ e ? (window.clearTimeout(this.enableSubmenuTimer), this.enableSubmenuTimer = window.setTimeout(() => {
236
+ this.setSubmenuState(!0);
237
+ }, this.submenuOpenDelay)) : this.setSubmenuState(!0);
238
+ }
239
+ disableSubmenu() {
240
+ window.clearTimeout(this.enableSubmenuTimer), this.setSubmenuState(!1);
241
+ }
242
+ updateSkidding() {
243
+ if (!this.host.parentElement?.computedStyleMap) return;
244
+ let e = this.host.parentElement.computedStyleMap(), t = [
245
+ "padding-top",
246
+ "border-top-width",
247
+ "margin-top"
248
+ ].reduce((t, n) => {
249
+ let r = e.get(n) ?? new CSSUnitValue(0, "px");
250
+ return t - (r instanceof CSSUnitValue ? r : new CSSUnitValue(0, "px")).to("px").value;
251
+ }, 0);
252
+ this.skidding = t;
253
+ }
254
+ isExpanded() {
255
+ return this.popupRef.value ? this.popupRef.value.active : !1;
256
+ }
257
+ renderSubmenu() {
258
+ let t = getComputedStyle(this.host).direction === "rtl";
259
+ return this.isConnected ? e`
266
260
  <sl-popup
267
- ${g(this.popupRef)}
261
+ ${h(this.popupRef)}
268
262
  placement=${t ? "left-start" : "right-start"}
269
263
  anchor="anchor"
270
264
  flip
@@ -276,67 +270,70 @@ var R = b`
276
270
  >
277
271
  <slot name="submenu"></slot>
278
272
  </sl-popup>
279
- ` : m` <slot name="submenu" hidden></slot> `;
280
- }
281
- }, s = class extends L {
282
- constructor() {
283
- super(...arguments), this.localize = new C(this), this.type = "normal", this.checked = !1, this.value = "", this.loading = !1, this.disabled = !1, this.hasSlotController = new S(this, "submenu"), this.submenuController = new P(this, this.hasSlotController), this.handleHostClick = (t) => {
284
- this.disabled && (t.preventDefault(), t.stopImmediatePropagation());
285
- }, this.handleMouseOver = (t) => {
286
- this.focus(), t.stopPropagation();
287
- };
288
- }
289
- connectedCallback() {
290
- super.connectedCallback(), this.addEventListener("click", this.handleHostClick), this.addEventListener("mouseover", this.handleMouseOver);
291
- }
292
- disconnectedCallback() {
293
- super.disconnectedCallback(), this.removeEventListener("click", this.handleHostClick), this.removeEventListener("mouseover", this.handleMouseOver);
294
- }
295
- handleDefaultSlotChange() {
296
- const t = this.getTextLabel();
297
- if (typeof this.cachedTextLabel > "u") {
298
- this.cachedTextLabel = t;
299
- return;
300
- }
301
- t !== this.cachedTextLabel && (this.cachedTextLabel = t, this.emit("slotchange", { bubbles: !0, composed: !1, cancelable: !1 }));
302
- }
303
- handleCheckedChange() {
304
- if (this.checked && this.type !== "checkbox") {
305
- this.checked = !1, console.error('The checked attribute can only be used on menu items with type="checkbox"', this);
306
- return;
307
- }
308
- this.type === "checkbox" ? this.setAttribute("aria-checked", this.checked ? "true" : "false") : this.removeAttribute("aria-checked");
309
- }
310
- handleDisabledChange() {
311
- this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
312
- }
313
- handleTypeChange() {
314
- this.type === "checkbox" ? (this.setAttribute("role", "menuitemcheckbox"), this.setAttribute("aria-checked", this.checked ? "true" : "false")) : (this.setAttribute("role", "menuitem"), this.removeAttribute("aria-checked"));
315
- }
316
- /** Returns a text label based on the contents of the menu item's default slot. */
317
- getTextLabel() {
318
- return k(this.defaultSlot);
319
- }
320
- isSubmenu() {
321
- return this.hasSlotController.test("submenu");
322
- }
323
- render() {
324
- const t = this.localize.dir() === "rtl", o = this.submenuController.isExpanded();
325
- return m`
273
+ ` : e` <slot name="submenu" hidden></slot> `;
274
+ }
275
+ }, y = class extends o {
276
+ constructor() {
277
+ super(...arguments), this.localize = new p(this), this.type = "normal", this.checked = !1, this.value = "", this.loading = !1, this.disabled = !1, this.hasSlotController = new c(this, "submenu"), this.submenuController = new v(this, this.hasSlotController), this.handleHostClick = (e) => {
278
+ this.disabled && (e.preventDefault(), e.stopImmediatePropagation());
279
+ }, this.handleMouseOver = (e) => {
280
+ this.focus(), e.stopPropagation();
281
+ };
282
+ }
283
+ connectedCallback() {
284
+ super.connectedCallback(), this.addEventListener("click", this.handleHostClick), this.addEventListener("mouseover", this.handleMouseOver);
285
+ }
286
+ disconnectedCallback() {
287
+ super.disconnectedCallback(), this.removeEventListener("click", this.handleHostClick), this.removeEventListener("mouseover", this.handleMouseOver);
288
+ }
289
+ handleDefaultSlotChange() {
290
+ let e = this.getTextLabel();
291
+ if (this.cachedTextLabel === void 0) {
292
+ this.cachedTextLabel = e;
293
+ return;
294
+ }
295
+ e !== this.cachedTextLabel && (this.cachedTextLabel = e, this.emit("slotchange", {
296
+ bubbles: !0,
297
+ composed: !1,
298
+ cancelable: !1
299
+ }));
300
+ }
301
+ handleCheckedChange() {
302
+ if (this.checked && this.type !== "checkbox") {
303
+ this.checked = !1, console.error("The checked attribute can only be used on menu items with type=\"checkbox\"", this);
304
+ return;
305
+ }
306
+ this.type === "checkbox" ? this.setAttribute("aria-checked", this.checked ? "true" : "false") : this.removeAttribute("aria-checked");
307
+ }
308
+ handleDisabledChange() {
309
+ this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
310
+ }
311
+ handleTypeChange() {
312
+ this.type === "checkbox" ? (this.setAttribute("role", "menuitemcheckbox"), this.setAttribute("aria-checked", this.checked ? "true" : "false")) : (this.setAttribute("role", "menuitem"), this.removeAttribute("aria-checked"));
313
+ }
314
+ getTextLabel() {
315
+ return s(this.defaultSlot);
316
+ }
317
+ isSubmenu() {
318
+ return this.hasSlotController.test("submenu");
319
+ }
320
+ render() {
321
+ let t = this.localize.dir() === "rtl", n = this.submenuController.isExpanded();
322
+ return e`
326
323
  <div
327
324
  id="anchor"
328
325
  part="base"
329
- class=${E({
330
- "menu-item": !0,
331
- "menu-item--rtl": t,
332
- "menu-item--checked": this.checked,
333
- "menu-item--disabled": this.disabled,
334
- "menu-item--loading": this.loading,
335
- "menu-item--has-submenu": this.isSubmenu(),
336
- "menu-item--submenu-expanded": o
337
- })}
326
+ class=${d({
327
+ "menu-item": !0,
328
+ "menu-item--rtl": t,
329
+ "menu-item--checked": this.checked,
330
+ "menu-item--disabled": this.disabled,
331
+ "menu-item--loading": this.loading,
332
+ "menu-item--has-submenu": this.isSubmenu(),
333
+ "menu-item--submenu-expanded": n
334
+ })}
338
335
  ?aria-haspopup="${this.isSubmenu()}"
339
- ?aria-expanded="${!!o}"
336
+ ?aria-expanded="${!!n}"
340
337
  >
341
338
  <span part="checked-icon" class="menu-item__check">
342
339
  <sl-icon name="check" library="system" aria-hidden="true"></sl-icon>
@@ -353,49 +350,28 @@ var R = b`
353
350
  </span>
354
351
 
355
352
  ${this.submenuController.renderSubmenu()}
356
- ${this.loading ? m` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> ` : ""}
353
+ ${this.loading ? e` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> ` : ""}
357
354
  </div>
358
355
  `;
359
- }
360
- };
361
- s.styles = [w, R];
362
- s.dependencies = {
363
- "sl-icon": _,
364
- "sl-popup": y,
365
- "sl-spinner": x
366
- };
367
- n([
368
- f("slot:not([name])")
369
- ], s.prototype, "defaultSlot", 2);
370
- n([
371
- f(".menu-item")
372
- ], s.prototype, "menuItem", 2);
373
- n([
374
- u()
375
- ], s.prototype, "type", 2);
376
- n([
377
- u({ type: Boolean, reflect: !0 })
378
- ], s.prototype, "checked", 2);
379
- n([
380
- u()
381
- ], s.prototype, "value", 2);
382
- n([
383
- u({ type: Boolean, reflect: !0 })
384
- ], s.prototype, "loading", 2);
385
- n([
386
- u({ type: Boolean, reflect: !0 })
387
- ], s.prototype, "disabled", 2);
388
- n([
389
- p("checked")
390
- ], s.prototype, "handleCheckedChange", 1);
391
- n([
392
- p("disabled")
393
- ], s.prototype, "handleDisabledChange", 1);
394
- n([
395
- p("type")
396
- ], s.prototype, "handleTypeChange", 1);
397
- var B = s;
398
- s.define("sl-menu-item");
399
- export {
400
- B as m
356
+ }
401
357
  };
358
+ y.styles = [i, _], y.dependencies = {
359
+ "sl-icon": l,
360
+ "sl-popup": m,
361
+ "sl-spinner": f
362
+ }, a([r("slot:not([name])")], y.prototype, "defaultSlot", 2), a([r(".menu-item")], y.prototype, "menuItem", 2), a([n()], y.prototype, "type", 2), a([n({
363
+ type: Boolean,
364
+ reflect: !0
365
+ })], y.prototype, "checked", 2), a([n()], y.prototype, "value", 2), a([n({
366
+ type: Boolean,
367
+ reflect: !0
368
+ })], y.prototype, "loading", 2), a([n({
369
+ type: Boolean,
370
+ reflect: !0
371
+ })], y.prototype, "disabled", 2), a([u("checked")], y.prototype, "handleCheckedChange", 1), a([u("disabled")], y.prototype, "handleDisabledChange", 1), a([u("type")], y.prototype, "handleTypeChange", 1);
372
+ //#endregion
373
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HVTXQL7M.js
374
+ var b = y;
375
+ y.define("sl-menu-item");
376
+ //#endregion
377
+ export { b as t };
@@ -1,6 +1,7 @@
1
- import { i as e, x as a } from "./lit-element.js";
2
- import { c as s, S as l } from "./chunk.4TUIT776.js";
3
- var o = e`
1
+ import { a as e, u as t } from "./lit.js";
2
+ import { n, t as r } from "./chunk.4TUIT776.js";
3
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NQ44LUGM.js
4
+ var i = t`
4
5
  :host {
5
6
  --aspect-ratio: inherit;
6
7
 
@@ -20,17 +21,18 @@ var o = e`
20
21
  height: 100% !important;
21
22
  object-fit: cover;
22
23
  }
23
- `, t = class extends l {
24
- connectedCallback() {
25
- super.connectedCallback();
26
- }
27
- render() {
28
- return a` <slot></slot> `;
29
- }
30
- };
31
- t.styles = [s, o];
32
- var c = t;
33
- t.define("sl-carousel-item");
34
- export {
35
- c
24
+ `, a = class extends r {
25
+ connectedCallback() {
26
+ super.connectedCallback();
27
+ }
28
+ render() {
29
+ return e` <slot></slot> `;
30
+ }
36
31
  };
32
+ a.styles = [n, i];
33
+ //#endregion
34
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IKV4VH3T.js
35
+ var o = a;
36
+ a.define("sl-carousel-item");
37
+ //#endregion
38
+ export { o as t };
@@ -1,8 +1,9 @@
1
- import { i as t } from "./lit-element.js";
2
- import { w as a } from "./chunk.GMYPQTFK.js";
3
- import { c as i, d as r, S as o } from "./chunk.4TUIT776.js";
4
- import { n as l } from "./property.js";
5
- var s = t`
1
+ import { u as e } from "./lit.js";
2
+ import { o as t } from "./decorate.js";
3
+ import { n, r, t as i } from "./chunk.4TUIT776.js";
4
+ import { t as a } from "./chunk.GMYPQTFK.js";
5
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SUSCR7CI.js
6
+ var o = e`
6
7
  :host {
7
8
  --color: var(--sl-panel-border-color);
8
9
  --width: var(--sl-panel-border-width);
@@ -21,26 +22,24 @@ var s = t`
21
22
  border-left: solid var(--width) var(--color);
22
23
  margin: 0 var(--spacing);
23
24
  }
24
- `, e = class extends o {
25
- constructor() {
26
- super(...arguments), this.vertical = !1;
27
- }
28
- connectedCallback() {
29
- super.connectedCallback(), this.setAttribute("role", "separator");
30
- }
31
- handleVerticalChange() {
32
- this.setAttribute("aria-orientation", this.vertical ? "vertical" : "horizontal");
33
- }
34
- };
35
- e.styles = [i, s];
36
- r([
37
- l({ type: Boolean, reflect: !0 })
38
- ], e.prototype, "vertical", 2);
39
- r([
40
- a("vertical")
41
- ], e.prototype, "handleVerticalChange", 1);
42
- var v = e;
43
- e.define("sl-divider");
44
- export {
45
- v as d
25
+ `, s = class extends i {
26
+ constructor() {
27
+ super(...arguments), this.vertical = !1;
28
+ }
29
+ connectedCallback() {
30
+ super.connectedCallback(), this.setAttribute("role", "separator");
31
+ }
32
+ handleVerticalChange() {
33
+ this.setAttribute("aria-orientation", this.vertical ? "vertical" : "horizontal");
34
+ }
46
35
  };
36
+ s.styles = [n, o], r([t({
37
+ type: Boolean,
38
+ reflect: !0
39
+ })], s.prototype, "vertical", 2), r([a("vertical")], s.prototype, "handleVerticalChange", 1);
40
+ //#endregion
41
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IVVHNXMC.js
42
+ var c = s;
43
+ s.define("sl-divider");
44
+ //#endregion
45
+ export { c as t };