nve-designsystem 2.3.0 → 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 (51) hide show
  1. package/chunks/chunk.2PCBEMQZ.js +4 -4
  2. package/chunks/chunk.3RPBFEDE.js +1 -1
  3. package/chunks/chunk.5JY5FUCG.js +1 -1
  4. package/chunks/chunk.6CTB5ZDJ.js +1 -1
  5. package/chunks/chunk.B4BZKR24.js +1 -1
  6. package/chunks/chunk.GI7VDIWX.js +1 -1
  7. package/chunks/chunk.HVTXQL7M.js +77 -173
  8. package/chunks/chunk.JHOXTQXA.js +3 -3
  9. package/chunks/chunk.JQBT7BOV.js +18 -19
  10. package/chunks/chunk.K7JGTRV7.js +1 -1
  11. package/chunks/chunk.KPLQLAWP.js +1 -1
  12. package/chunks/chunk.LD4M4QGE.js +1 -1
  13. package/chunks/chunk.SAPQLUO4.js +1 -1
  14. package/chunks/chunk.TP2GB2HO.js +135 -157
  15. package/chunks/chunk.UDWRA64J.js +1 -1
  16. package/chunks/chunk.YHLNUJ7P.js +3 -3
  17. package/chunks/chunk.ZH2AND3P.js +1 -1
  18. package/chunks/class-map.js +25 -27
  19. package/chunks/directive-helpers.js +4 -4
  20. package/chunks/lit-element.js +181 -213
  21. package/chunks/query.js +8 -11
  22. package/chunks/ref.js +98 -0
  23. package/chunks/static.js +11 -11
  24. package/chunks/unsafe-html.js +26 -0
  25. package/components/nve-accordion/nve-accordion.component.js +6 -7
  26. package/components/nve-alert/nve-alert.component.js +18 -18
  27. package/components/nve-button/nve-button.component.js +15 -19
  28. package/components/nve-carousel/nve-carousel.component.js +21 -24
  29. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +33 -36
  30. package/components/nve-checkbox-group/nve-checkbox-group.component.js +27 -31
  31. package/components/nve-combobox/nve-combobox.component.d.ts +283 -0
  32. package/components/nve-combobox/nve-combobox.component.js +527 -0
  33. package/components/nve-combobox/nve-combobox.styles.d.ts +2 -0
  34. package/components/nve-combobox/nve-combobox.styles.js +149 -0
  35. package/components/nve-dialog/nve-dialog.component.js +14 -15
  36. package/components/nve-dropdown/nve-dropdown.component.js +1 -4
  37. package/components/nve-input/nve-input.component.js +14 -16
  38. package/components/nve-label/nve-label.component.js +24 -24
  39. package/components/nve-label/nve-label.styles.js +3 -2
  40. package/components/nve-message-card/nve-message-card.component.js +22 -23
  41. package/components/nve-option/nve-option.component.js +6 -8
  42. package/components/nve-radio-group/nve-radio-group.component.js +23 -24
  43. package/components/nve-select/nve-select.component.js +17 -22
  44. package/components/nve-stepper/nve-step/nve-step.component.js +9 -9
  45. package/components/nve-tag/nve-tag.styles.js +4 -0
  46. package/components/nve-textarea/nve-textarea.component.js +87 -93
  47. package/custom-elements.json +872 -1
  48. package/nve-designsystem.d.ts +1 -0
  49. package/nve-designsystem.js +58 -56
  50. package/package.json +2 -2
  51. package/vscode.html-custom-data.json +81 -0
@@ -55,19 +55,19 @@ var k = g`
55
55
  }
56
56
  handleFocus(t) {
57
57
  const e = h(t.target);
58
- e == null || e.toggleAttribute("data-sl-button-group__button--focus", !0);
58
+ e?.toggleAttribute("data-sl-button-group__button--focus", !0);
59
59
  }
60
60
  handleBlur(t) {
61
61
  const e = h(t.target);
62
- e == null || e.toggleAttribute("data-sl-button-group__button--focus", !1);
62
+ e?.toggleAttribute("data-sl-button-group__button--focus", !1);
63
63
  }
64
64
  handleMouseOver(t) {
65
65
  const e = h(t.target);
66
- e == null || e.toggleAttribute("data-sl-button-group__button--hover", !0);
66
+ e?.toggleAttribute("data-sl-button-group__button--hover", !0);
67
67
  }
68
68
  handleMouseOut(t) {
69
69
  const e = h(t.target);
70
- e == null || e.toggleAttribute("data-sl-button-group__button--hover", !1);
70
+ e?.toggleAttribute("data-sl-button-group__button--hover", !1);
71
71
  }
72
72
  handleSlotChange() {
73
73
  const t = [...this.defaultSlot.assignedElements({ flatten: !0 })];
@@ -133,7 +133,7 @@ var a = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), n = /*
133
133
  cancelable: !0,
134
134
  detail: {}
135
135
  });
136
- e || i.preventDefault(), this.host.dispatchEvent(i) || e == null || e.preventDefault();
136
+ e || i.preventDefault(), this.host.dispatchEvent(i) || e?.preventDefault();
137
137
  }
138
138
  }, u = Object.freeze({
139
139
  badInput: !1,
@@ -1063,7 +1063,7 @@ function Oe(t, e, o, i) {
1063
1063
  var m;
1064
1064
  f.forEach((w) => {
1065
1065
  n && w.removeEventListener("scroll", o), s && w.removeEventListener("resize", o);
1066
- }), u == null || u(), (m = p) == null || m.disconnect(), p = null, a && cancelAnimationFrame(h);
1066
+ }), u?.(), (m = p) == null || m.disconnect(), p = null, a && cancelAnimationFrame(h);
1067
1067
  };
1068
1068
  }
1069
1069
  const Ce = le, Se = ae, ze = re, Lt = ce, Le = ne, Te = (t, e, o) => {
@@ -37,7 +37,7 @@ let w = class {
37
37
  }
38
38
  getTranslationData(e) {
39
39
  var t, r;
40
- const n = new Intl.Locale(e.replace(/_/g, "-")), l = n == null ? void 0 : n.language.toLowerCase(), u = (r = (t = n == null ? void 0 : n.region) === null || t === void 0 ? void 0 : t.toLowerCase()) !== null && r !== void 0 ? r : "", v = a.get(`${l}-${u}`), p = a.get(l);
40
+ const n = new Intl.Locale(e.replace(/_/g, "-")), l = n?.language.toLowerCase(), u = (r = (t = n?.region) === null || t === void 0 ? void 0 : t.toLowerCase()) !== null && r !== void 0 ? r : "", v = a.get(`${l}-${u}`), p = a.get(l);
41
41
  return { locale: n, language: l, region: u, primary: v, secondary: p };
42
42
  }
43
43
  exists(e, t) {
@@ -1,7 +1,7 @@
1
1
  import { _ as a, a as o } from "./chunk.4TUIT776.js";
2
2
  function m(e, t, n) {
3
3
  return new Promise((r) => {
4
- if ((n == null ? void 0 : n.duration) === 1 / 0)
4
+ if (n?.duration === 1 / 0)
5
5
  throw new Error("Promise-based animations must be finite.");
6
6
  const i = e.animate(t, a(o({}, n), {
7
7
  duration: s() ? 0 : n.duration
@@ -5,7 +5,7 @@ var C = (r = "value") => (l, s) => {
5
5
  var a;
6
6
  const t = e.getPropertyOptions(r), p = typeof t.attribute == "string" ? t.attribute : r;
7
7
  if (i === p) {
8
- const o = t.converter || c, u = (typeof o == "function" ? o : (a = o == null ? void 0 : o.fromAttribute) != null ? a : c.fromAttribute)(n, t.type);
8
+ const o = t.converter || c, u = (typeof o == "function" ? o : (a = o?.fromAttribute) != null ? a : c.fromAttribute)(n, t.type);
9
9
  this[r] !== u && (this[s] = u);
10
10
  }
11
11
  b.call(this, i, f, n);
@@ -1,16 +1,16 @@
1
- import { a as S, E as g, x as c } from "./lit-element.js";
2
- import { f as _ } from "./directive-helpers.js";
3
- import { i as C, t as k, a as $, e as w } from "./class-map.js";
4
- import { S as A } from "./chunk.5JY5FUCG.js";
5
- import { S as L } from "./chunk.36O46B5H.js";
6
- import { H as E, g as M } from "./chunk.NYIIDP5N.js";
7
- import { L as T } from "./chunk.6CTB5ZDJ.js";
8
- import { S as P } from "./chunk.YHLNUJ7P.js";
9
- import { w as b } from "./chunk.GMYPQTFK.js";
10
- import { c as R, d as l, S as z } from "./chunk.4TUIT776.js";
11
- import { n as d } from "./property.js";
12
- import { e as y } from "./query.js";
13
- var D = S`
1
+ import { a 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`
14
14
  :host {
15
15
  --submenu-offset: -2px;
16
16
 
@@ -162,105 +162,9 @@ var D = S`
162
162
  max-width: var(--auto-size-available-width) !important;
163
163
  max-height: var(--auto-size-available-height) !important;
164
164
  }
165
- `;
166
- /**
167
- * @license
168
- * Copyright 2017 Google LLC
169
- * SPDX-License-Identifier: BSD-3-Clause
170
- */
171
- const h = (t, s) => {
172
- var i;
173
- const e = t._$AN;
174
- if (e === void 0) return !1;
175
- for (const n of e) (i = n._$AO) == null || i.call(n, s, !1), h(n, s);
176
- return !0;
177
- }, m = (t) => {
178
- let s, e;
179
- do {
180
- if ((s = t._$AM) === void 0) break;
181
- e = s._$AN, e.delete(t), t = s;
182
- } while ((e == null ? void 0 : e.size) === 0);
183
- }, x = (t) => {
184
- for (let s; s = t._$AM; t = s) {
185
- let e = s._$AN;
186
- if (e === void 0) s._$AN = e = /* @__PURE__ */ new Set();
187
- else if (e.has(t)) break;
188
- e.add(t), H(s);
189
- }
190
- };
191
- function O(t) {
192
- this._$AN !== void 0 ? (m(this), this._$AM = t, x(this)) : this._$AM = t;
193
- }
194
- function G(t, s = !1, e = 0) {
195
- const i = this._$AH, n = this._$AN;
196
- if (n !== void 0 && n.size !== 0) if (s) if (Array.isArray(i)) for (let a = e; a < i.length; a++) h(i[a], !1), m(i[a]);
197
- else i != null && (h(i, !1), m(i));
198
- else h(this, t);
199
- }
200
- const H = (t) => {
201
- t.type == k.CHILD && (t._$AP ?? (t._$AP = G), t._$AQ ?? (t._$AQ = O));
202
- };
203
- class I extends C {
204
- constructor() {
205
- super(...arguments), this._$AN = void 0;
206
- }
207
- _$AT(s, e, i) {
208
- super._$AT(s, e, i), x(this), this.isConnected = s._$AU;
209
- }
210
- _$AO(s, e = !0) {
211
- var i, n;
212
- s !== this.isConnected && (this.isConnected = s, s ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (h(this, s), m(this));
213
- }
214
- setValue(s) {
215
- if (_(this._$Ct)) this._$Ct._$AI(s, this);
216
- else {
217
- const e = [...this._$Ct._$AH];
218
- e[this._$Ci] = s, this._$Ct._$AI(e, this, 0);
219
- }
220
- }
221
- disconnected() {
222
- }
223
- reconnected() {
224
- }
225
- }
226
- /**
227
- * @license
228
- * Copyright 2020 Google LLC
229
- * SPDX-License-Identifier: BSD-3-Clause
230
- */
231
- const N = () => new V();
232
- class V {
233
- }
234
- const f = /* @__PURE__ */ new WeakMap(), U = $(class extends I {
235
- render(t) {
236
- return g;
237
- }
238
- update(t, [s]) {
239
- var i;
240
- const e = s !== this.G;
241
- return e && this.G !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.G = s, this.ht = (i = t.options) == null ? void 0 : i.host, this.rt(this.ct = t.element)), g;
242
- }
243
- rt(t) {
244
- if (this.isConnected || (t = void 0), typeof this.G == "function") {
245
- const s = this.ht ?? globalThis;
246
- let e = f.get(s);
247
- e === void 0 && (e = /* @__PURE__ */ new WeakMap(), f.set(s, e)), e.get(this.G) !== void 0 && this.G.call(this.ht, void 0), e.set(this.G, t), t !== void 0 && this.G.call(this.ht, t);
248
- } else this.G.value = t;
249
- }
250
- get lt() {
251
- var t, s;
252
- return typeof this.G == "function" ? (t = f.get(this.ht ?? globalThis)) == null ? void 0 : t.get(this.G) : (s = this.G) == null ? void 0 : s.value;
253
- }
254
- disconnected() {
255
- this.lt === this.ct && this.rt(void 0);
256
- }
257
- reconnected() {
258
- this.rt(this.ct);
259
- }
260
- });
261
- var q = class {
262
- constructor(t, s) {
263
- this.popupRef = N(), this.enableSubmenuTimer = -1, this.isConnected = !1, this.isPopupConnected = !1, this.skidding = 0, this.submenuOpenDelay = 100, this.handleMouseMove = (e) => {
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) => {
264
168
  this.host.style.setProperty("--safe-triangle-cursor-x", `${e.clientX}px`), this.host.style.setProperty("--safe-triangle-cursor-y", `${e.clientY}px`);
265
169
  }, this.handleMouseOver = () => {
266
170
  this.hasSlotController.test("submenu") && this.enableSubmenu();
@@ -287,12 +191,12 @@ var q = class {
287
191
  }, this.handlePopupMouseover = (e) => {
288
192
  e.stopPropagation();
289
193
  }, this.handlePopupReposition = () => {
290
- const e = this.host.renderRoot.querySelector("slot[name='submenu']"), i = e == null ? void 0 : e.assignedElements({ flatten: !0 }).filter((p) => p.localName === "sl-menu")[0], n = getComputedStyle(this.host).direction === "rtl";
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";
291
195
  if (!i)
292
196
  return;
293
- const { left: a, top: r, width: u, height: v } = i.getBoundingClientRect();
294
- this.host.style.setProperty("--safe-triangle-submenu-start-x", `${n ? a + u : a}px`), this.host.style.setProperty("--safe-triangle-submenu-start-y", `${r}px`), this.host.style.setProperty("--safe-triangle-submenu-end-x", `${n ? a + u : a}px`), this.host.style.setProperty("--safe-triangle-submenu-end-y", `${r + v}px`);
295
- }, (this.host = t).addController(this), this.hasSlotController = s;
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;
296
200
  }
297
201
  hostConnected() {
298
202
  this.hasSlotController.test("submenu") && !this.host.disabled && this.addListeners();
@@ -310,13 +214,13 @@ var q = class {
310
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);
311
215
  }
312
216
  handleSubmenuEntry(t) {
313
- const s = this.host.renderRoot.querySelector("slot[name='submenu']");
314
- if (!s) {
217
+ const o = this.host.renderRoot.querySelector("slot[name='submenu']");
218
+ if (!o) {
315
219
  console.error("Cannot activate a submenu if no corresponding menuitem can be found.", this);
316
220
  return;
317
221
  }
318
222
  let e = null;
319
- for (const i of s.assignedElements())
223
+ for (const i of o.assignedElements())
320
224
  if (e = i.querySelectorAll("sl-menu-item, [role^='menuitem']"), e.length !== 0)
321
225
  break;
322
226
  if (!(!e || e.length === 0)) {
@@ -346,10 +250,10 @@ var q = class {
346
250
  var t;
347
251
  if (!((t = this.host.parentElement) != null && t.computedStyleMap))
348
252
  return;
349
- const s = this.host.parentElement.computedStyleMap(), i = ["padding-top", "border-top-width", "margin-top"].reduce((n, a) => {
350
- var r;
351
- const u = (r = s.get(a)) != null ? r : new CSSUnitValue(0, "px"), p = (u instanceof CSSUnitValue ? u : new CSSUnitValue(0, "px")).to("px");
352
- return n - p.value;
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;
353
257
  }, 0);
354
258
  this.skidding = i;
355
259
  }
@@ -358,9 +262,9 @@ var q = class {
358
262
  }
359
263
  renderSubmenu() {
360
264
  const t = getComputedStyle(this.host).direction === "rtl";
361
- return this.isConnected ? c`
265
+ return this.isConnected ? m`
362
266
  <sl-popup
363
- ${U(this.popupRef)}
267
+ ${g(this.popupRef)}
364
268
  placement=${t ? "left-start" : "right-start"}
365
269
  anchor="anchor"
366
270
  flip
@@ -372,11 +276,11 @@ var q = class {
372
276
  >
373
277
  <slot name="submenu"></slot>
374
278
  </sl-popup>
375
- ` : c` <slot name="submenu" hidden></slot> `;
279
+ ` : m` <slot name="submenu" hidden></slot> `;
376
280
  }
377
- }, o = class extends z {
281
+ }, s = class extends L {
378
282
  constructor() {
379
- super(...arguments), this.localize = new T(this), this.type = "normal", this.checked = !1, this.value = "", this.loading = !1, this.disabled = !1, this.hasSlotController = new E(this, "submenu"), this.submenuController = new q(this, this.hasSlotController), this.handleHostClick = (t) => {
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) => {
380
284
  this.disabled && (t.preventDefault(), t.stopImmediatePropagation());
381
285
  }, this.handleMouseOver = (t) => {
382
286
  this.focus(), t.stopPropagation();
@@ -411,28 +315,28 @@ var q = class {
411
315
  }
412
316
  /** Returns a text label based on the contents of the menu item's default slot. */
413
317
  getTextLabel() {
414
- return M(this.defaultSlot);
318
+ return k(this.defaultSlot);
415
319
  }
416
320
  isSubmenu() {
417
321
  return this.hasSlotController.test("submenu");
418
322
  }
419
323
  render() {
420
- const t = this.localize.dir() === "rtl", s = this.submenuController.isExpanded();
421
- return c`
324
+ const t = this.localize.dir() === "rtl", o = this.submenuController.isExpanded();
325
+ return m`
422
326
  <div
423
327
  id="anchor"
424
328
  part="base"
425
- class=${w({
329
+ class=${E({
426
330
  "menu-item": !0,
427
331
  "menu-item--rtl": t,
428
332
  "menu-item--checked": this.checked,
429
333
  "menu-item--disabled": this.disabled,
430
334
  "menu-item--loading": this.loading,
431
335
  "menu-item--has-submenu": this.isSubmenu(),
432
- "menu-item--submenu-expanded": s
336
+ "menu-item--submenu-expanded": o
433
337
  })}
434
338
  ?aria-haspopup="${this.isSubmenu()}"
435
- ?aria-expanded="${!!s}"
339
+ ?aria-expanded="${!!o}"
436
340
  >
437
341
  <span part="checked-icon" class="menu-item__check">
438
342
  <sl-icon name="check" library="system" aria-hidden="true"></sl-icon>
@@ -449,49 +353,49 @@ var q = class {
449
353
  </span>
450
354
 
451
355
  ${this.submenuController.renderSubmenu()}
452
- ${this.loading ? c` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> ` : ""}
356
+ ${this.loading ? m` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> ` : ""}
453
357
  </div>
454
358
  `;
455
359
  }
456
360
  };
457
- o.styles = [R, D];
458
- o.dependencies = {
459
- "sl-icon": P,
460
- "sl-popup": A,
461
- "sl-spinner": L
361
+ s.styles = [w, R];
362
+ s.dependencies = {
363
+ "sl-icon": _,
364
+ "sl-popup": y,
365
+ "sl-spinner": x
462
366
  };
463
- l([
464
- y("slot:not([name])")
465
- ], o.prototype, "defaultSlot", 2);
466
- l([
467
- y(".menu-item")
468
- ], o.prototype, "menuItem", 2);
469
- l([
470
- d()
471
- ], o.prototype, "type", 2);
472
- l([
473
- d({ type: Boolean, reflect: !0 })
474
- ], o.prototype, "checked", 2);
475
- l([
476
- d()
477
- ], o.prototype, "value", 2);
478
- l([
479
- d({ type: Boolean, reflect: !0 })
480
- ], o.prototype, "loading", 2);
481
- l([
482
- d({ type: Boolean, reflect: !0 })
483
- ], o.prototype, "disabled", 2);
484
- l([
485
- b("checked")
486
- ], o.prototype, "handleCheckedChange", 1);
487
- l([
488
- b("disabled")
489
- ], o.prototype, "handleDisabledChange", 1);
490
- l([
491
- b("type")
492
- ], o.prototype, "handleTypeChange", 1);
493
- var se = o;
494
- o.define("sl-menu-item");
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");
495
399
  export {
496
- se as m
400
+ B as m
497
401
  };
@@ -23,11 +23,11 @@ var f = a`
23
23
  handleClick(e) {
24
24
  const t = ["menuitem", "menuitemcheckbox"], l = e.composedPath(), s = l.find((r) => {
25
25
  var n;
26
- return t.includes(((n = r == null ? void 0 : r.getAttribute) == null ? void 0 : n.call(r, "role")) || "");
26
+ return t.includes(((n = r?.getAttribute) == null ? void 0 : n.call(r, "role")) || "");
27
27
  });
28
28
  if (!s || l.find((r) => {
29
29
  var n;
30
- return ((n = r == null ? void 0 : r.getAttribute) == null ? void 0 : n.call(r, "role")) === "menu";
30
+ return ((n = r?.getAttribute) == null ? void 0 : n.call(r, "role")) === "menu";
31
31
  }) !== this) return;
32
32
  const o = s;
33
33
  o.type === "checkbox" && (o.checked = !o.checked), this.emit("sl-select", { detail: { item: o } });
@@ -35,7 +35,7 @@ var f = a`
35
35
  handleKeyDown(e) {
36
36
  if (e.key === "Enter" || e.key === " ") {
37
37
  const t = this.getCurrentItem();
38
- e.preventDefault(), e.stopPropagation(), t == null || t.click();
38
+ e.preventDefault(), e.stopPropagation(), t?.click();
39
39
  } else if (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) {
40
40
  const t = this.getAllItems(), l = this.getCurrentItem();
41
41
  let s = l ? t.indexOf(l) : 0;
@@ -13,13 +13,14 @@ import { n } from "./property.js";
13
13
  import { r as E } from "./state.js";
14
14
  import { a as Ie, e as z } from "./query.js";
15
15
  import { a as X, t as jt } from "./chunk.ZH2AND3P.js";
16
- import { S as Ae, o as qt } from "./chunk.TP2GB2HO.js";
16
+ import { S as Ae } from "./chunk.TP2GB2HO.js";
17
17
  import { d as Yt } from "./chunk.GI7VDIWX.js";
18
18
  import { f as re } from "./chunk.SI4ACBFK.js";
19
19
  import { F as Gt } from "./chunk.3RPBFEDE.js";
20
20
  import { H as $t } from "./chunk.NYIIDP5N.js";
21
21
  import { o as R } from "./if-defined.js";
22
22
  import { S as Wt, s as ae } from "./chunk.RWUUFNUL.js";
23
+ import { o as qt } from "./unsafe-html.js";
23
24
  import { S as De } from "./chunk.URTPIBTY.js";
24
25
  import { S as Ee } from "./chunk.XA43ZQPC.js";
25
26
  import { S as Fe } from "./chunk.UDWRA64J.js";
@@ -33,8 +34,7 @@ import { b as Ve } from "./chunk.LD4M4QGE.js";
33
34
  */
34
35
  function Oe(t) {
35
36
  return (e, r) => Ie(e, r, { async get() {
36
- var a;
37
- return await this.updateComplete, ((a = this.renderRoot) == null ? void 0 : a.querySelector(t)) ?? null;
37
+ return await this.updateComplete, this.renderRoot?.querySelector(t) ?? null;
38
38
  } });
39
39
  }
40
40
  var Le = F`
@@ -196,7 +196,7 @@ var Le = F`
196
196
  * SPDX-License-Identifier: BSD-3-Clause
197
197
  */
198
198
  function ie(t, e, r) {
199
- return t ? e(t) : r == null ? void 0 : r(t);
199
+ return t ? e(t) : r?.(t);
200
200
  }
201
201
  var N = class te extends A {
202
202
  constructor() {
@@ -517,12 +517,12 @@ var xt = class extends A {
517
517
  return [...this.querySelectorAll("sl-tree-item")];
518
518
  }
519
519
  focusItem(t) {
520
- t == null || t.focus();
520
+ t?.focus();
521
521
  }
522
522
  handleKeyDown(t) {
523
523
  if (!["ArrowDown", "ArrowUp", "ArrowRight", "ArrowLeft", "Home", "End", "Enter", " "].includes(t.key) || t.composedPath().some((i) => {
524
524
  var o;
525
- return ["input", "textarea"].includes((o = i == null ? void 0 : i.tagName) == null ? void 0 : o.toLowerCase());
525
+ return ["input", "textarea"].includes((o = i?.tagName) == null ? void 0 : o.toLowerCase());
526
526
  }))
527
527
  return;
528
528
  const e = this.getFocusableItems(), r = this.localize.dir() === "ltr", a = this.localize.dir() === "rtl";
@@ -540,7 +540,7 @@ var xt = class extends A {
540
540
  handleClick(t) {
541
541
  const e = t.target, r = e.closest("sl-tree-item"), a = t.composedPath().some((i) => {
542
542
  var o;
543
- return (o = i == null ? void 0 : i.classList) == null ? void 0 : o.contains("tree-item__expand-button");
543
+ return (o = i?.classList) == null ? void 0 : o.contains("tree-item__expand-button");
544
544
  });
545
545
  !r || r.disabled || e !== this.clickTarget || (a ? r.expanded = !r.expanded : this.selectItem(r));
546
546
  }
@@ -1605,14 +1605,14 @@ var W = class extends A {
1605
1605
  }
1606
1606
  handleClick(t) {
1607
1607
  const r = t.target.closest("sl-tab");
1608
- (r == null ? void 0 : r.closest("sl-tab-group")) === this && r !== null && this.setActiveTab(r, { scrollBehavior: "smooth" });
1608
+ r?.closest("sl-tab-group") === this && r !== null && this.setActiveTab(r, { scrollBehavior: "smooth" });
1609
1609
  }
1610
1610
  handleKeyDown(t) {
1611
1611
  const r = t.target.closest("sl-tab");
1612
- if ((r == null ? void 0 : r.closest("sl-tab-group")) === this && (["Enter", " "].includes(t.key) && r !== null && (this.setActiveTab(r, { scrollBehavior: "smooth" }), t.preventDefault()), ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(t.key))) {
1612
+ if (r?.closest("sl-tab-group") === this && (["Enter", " "].includes(t.key) && r !== null && (this.setActiveTab(r, { scrollBehavior: "smooth" }), t.preventDefault()), ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(t.key))) {
1613
1613
  const i = this.tabs.find((p) => p.matches(":focus")), o = this.localize.dir() === "rtl";
1614
1614
  let h = null;
1615
- if ((i == null ? void 0 : i.tagName.toLowerCase()) === "sl-tab") {
1615
+ if (i?.tagName.toLowerCase() === "sl-tab") {
1616
1616
  if (t.key === "Home")
1617
1617
  h = this.focusableTabs[0];
1618
1618
  else if (t.key === "End")
@@ -1918,12 +1918,12 @@ var Ge = F`
1918
1918
  function Dt(t, e) {
1919
1919
  function r(i) {
1920
1920
  const o = t.getBoundingClientRect(), h = t.ownerDocument.defaultView, p = o.left + h.scrollX, l = o.top + h.scrollY, u = i.pageX - p, v = i.pageY - l;
1921
- e != null && e.onMove && e.onMove(u, v);
1921
+ e?.onMove && e.onMove(u, v);
1922
1922
  }
1923
1923
  function a() {
1924
- document.removeEventListener("pointermove", r), document.removeEventListener("pointerup", a), e != null && e.onStop && e.onStop();
1924
+ document.removeEventListener("pointermove", r), document.removeEventListener("pointerup", a), e?.onStop && e.onStop();
1925
1925
  }
1926
- document.addEventListener("pointermove", r, { passive: !0 }), document.addEventListener("pointerup", a), (e == null ? void 0 : e.initialEvent) instanceof PointerEvent && r(e.initialEvent);
1926
+ document.addEventListener("pointermove", r, { passive: !0 }), document.addEventListener("pointerup", a), e?.initialEvent instanceof PointerEvent && r(e.initialEvent);
1927
1927
  }
1928
1928
  var ne = () => null, tt = class extends A {
1929
1929
  constructor() {
@@ -3000,8 +3000,7 @@ var qe = F`
3000
3000
  */
3001
3001
  const me = "important", Qe = " !" + me, Q = $e(class extends Se {
3002
3002
  constructor(t) {
3003
- var e;
3004
- if (super(t), t.type !== Te.ATTRIBUTE || t.name !== "style" || ((e = t.strings) == null ? void 0 : e.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
3003
+ if (super(t), t.type !== Te.ATTRIBUTE || t.name !== "style" || t.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
3005
3004
  }
3006
3005
  render(t) {
3007
3006
  return Object.keys(t).reduce((e, r) => {
@@ -3274,7 +3273,7 @@ function Rt(t) {
3274
3273
  const r = { second: 1e3, minute: 6e4, hour: 36e5, day: 864e5 }[t];
3275
3274
  return r - Date.now() % r;
3276
3275
  }
3277
- var Ja = gt;
3276
+ var ti = gt;
3278
3277
  gt.define("sl-relative-time");
3279
3278
  var Je = F`
3280
3279
  :host {
@@ -4969,7 +4968,7 @@ bt("details.hide", {
4969
4968
  ],
4970
4969
  options: { duration: 250, easing: "linear" }
4971
4970
  });
4972
- var ti = at;
4971
+ var ei = at;
4973
4972
  at.define("sl-details");
4974
4973
  var dr = F`
4975
4974
  :host {
@@ -8457,6 +8456,6 @@ s([
8457
8456
  ], Y.prototype, "handlePlaybackRateChange", 1);
8458
8457
  Y.define("sl-animation");
8459
8458
  export {
8460
- ti as d,
8461
- Ja as r
8459
+ ei as d,
8460
+ ti as r
8462
8461
  };
@@ -13,7 +13,7 @@ function a(t, e) {
13
13
  }
14
14
  function l(t, e, r) {
15
15
  const n = u.get(t);
16
- if (n != null && n[e])
16
+ if (n?.[e])
17
17
  return i(n[e], r.dir);
18
18
  const o = s.get(e);
19
19
  return o ? i(o, r.dir) : {
@@ -183,7 +183,7 @@ var S = _`
183
183
  })
184
184
  ]), this.dialog.hidden = !0, this.overlay.hidden = !1, this.panel.hidden = !1, p(this);
185
185
  const o = this.originalTrigger;
186
- typeof (o == null ? void 0 : o.focus) == "function" && setTimeout(() => o.focus()), this.emit("sl-after-hide");
186
+ typeof o?.focus == "function" && setTimeout(() => o.focus()), this.emit("sl-after-hide");
187
187
  }
188
188
  }
189
189
  /** Shows the dialog. */
@@ -57,7 +57,7 @@ var a = [], v = class {
57
57
  const e = u(this.element);
58
58
  if (!this.element.matches(":focus-within")) {
59
59
  const t = e[0], s = e[e.length - 1], i = this.tabDirection === "forward" ? t : s;
60
- typeof (i == null ? void 0 : i.focus) == "function" && (this.currentFocus = i, i.focus({ preventScroll: !1 }));
60
+ typeof i?.focus == "function" && (this.currentFocus = i, i.focus({ preventScroll: !1 }));
61
61
  }
62
62
  }
63
63
  }
@@ -227,7 +227,7 @@ var t = class extends z {
227
227
  })
228
228
  ]), this.drawer.hidden = !0, this.overlay.hidden = !1, this.panel.hidden = !1;
229
229
  const o = this.originalTrigger;
230
- typeof (o == null ? void 0 : o.focus) == "function" && setTimeout(() => o.focus()), this.emit("sl-after-hide");
230
+ typeof o?.focus == "function" && setTimeout(() => o.focus()), this.emit("sl-after-hide");
231
231
  }
232
232
  }
233
233
  handleNoModalChange() {