@albi_scando/as-design-system-lib 1.6.6 → 1.7.1

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.
@@ -1,5 +1,5 @@
1
- const ct = "as-design-system-lib";
2
- class ht {
1
+ const ht = "as-design-system-lib";
2
+ class bt {
3
3
  /**
4
4
  * Creates an instance of WebComponentsRegistry.
5
5
  * Registers all custom elements provided in the map of components.
@@ -36,9 +36,10 @@ class ht {
36
36
  customElements.get(t) === void 0 ? (customElements.define(t, e), console.log(`Registered Web Component: ${t}`)) : console.warn(`Web Component "${t}" is already registered.`);
37
37
  }
38
38
  }
39
- const E = {
40
- CONFIRMATION_DIALOG_CONFIRM: "confirmation-dialog-confirm"
41
- }, $ = "base-button", o = "", v = {
39
+ const _ = {
40
+ CONFIRMATION_DIALOG_CONFIRM: "confirmation-dialog-confirm",
41
+ CONFIRMATION_DIALOG_UNDO: "confirmation-dialog-undo"
42
+ }, o = "", p = {
42
43
  SHOW_MODAL: "show-modal",
43
44
  CLOSE: "close"
44
45
  }, H = {
@@ -53,14 +54,23 @@ const E = {
53
54
  </svg>`
54
55
  };
55
56
  `${btoa(H.CUSTOM_CROSSHAIR)}`;
56
- const _ = {
57
+ const A = {
57
58
  ANY: "any",
58
59
  NONE: "none"
59
- }, w = {
60
+ }, E = {
60
61
  KEY_DOWN: "keydown"
61
- }, p = {
62
+ }, h = {
62
63
  CLICK: "click"
63
- }, P = `<button part="button">
64
+ }, P = {
65
+ FERRARI: "ferrari",
66
+ LIGHT: "light",
67
+ LIGHT_BLUE: "light-blue",
68
+ DARK: "dark",
69
+ DARK_PURPLE: "dark-purple"
70
+ }, vt = (y) => {
71
+ const t = document.body;
72
+ t.classList.remove(...Object.values(P)), t.classList.add(y);
73
+ }, j = "base-button", D = `<button part="button">
64
74
  <slot></slot>
65
75
  </button>
66
76
  `, V = ":where(button,input[type=button],input[type=submit],input[type=reset]),:where(input[type=file])::file-selector-button{cursor:pointer;-webkit-user-select:none;user-select:none;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);font-family:var(--font-family-base);letter-spacing:var(--letter-spacing-normal);line-height:var(--line-height-normal);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);display:inline-flex;justify-content:center;align-items:center;text-align:center;gap:var(--gap-sm);background:var(--color-bg-secondary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-primary);border-radius:var(--border-radius-lg);transition:all var(--transition-base)}:where(button,input[type=button],input[type=submit],input[type=reset])>.material-symbols-outlined{font-size:var(--font-size-xl);font-family:Material Symbols Outlined;line-height:1}:where(button,input[type=button],input[type=submit],input[type=reset])[disabled]{opacity:.3;cursor:not-allowed}:where(button,input[type=button],input[type=submit],input[type=reset]):where(:not(:disabled):hover),:where(button,input[type=button],input[type=submit],input[type=reset]):where(:not(:disabled):active){background:var(--color-hover-bg-secondary);border-color:var(--color-hover-border-secondary)}:where(input[type=file]){inline-size:100%;max-inline-size:max-content;background-color:var(--color-bg-secondary)}", x = new CSSStyleSheet();
@@ -204,7 +214,7 @@ class i extends HTMLElement {
204
214
  * Syncs host attributes to the internal button element.
205
215
  */
206
216
  _render() {
207
- this.shadowRoot !== null && (this.shadowRoot.innerHTML = P, this._syncAttributes());
217
+ this.shadowRoot !== null && (this.shadowRoot.innerHTML = D, this._syncAttributes());
208
218
  }
209
219
  /**
210
220
  * Adds event listeners to the component.
@@ -212,7 +222,7 @@ class i extends HTMLElement {
212
222
  * @returns {void}
213
223
  */
214
224
  _addEventListeners() {
215
- this.buttonElement.addEventListener(p.CLICK, this._handleClick);
225
+ this.buttonElement.addEventListener(h.CLICK, this._handleClick);
216
226
  }
217
227
  /**
218
228
  * Removes event listeners from the component.
@@ -220,7 +230,7 @@ class i extends HTMLElement {
220
230
  * @returns {void}
221
231
  */
222
232
  _removeEventListeners() {
223
- this.buttonElement.addEventListener(p.CLICK, this._handleClick);
233
+ this.buttonElement.addEventListener(h.CLICK, this._handleClick);
224
234
  }
225
235
  /**
226
236
  * Handles the internal button click event and executes the configured command.
@@ -252,10 +262,10 @@ class i extends HTMLElement {
252
262
  return;
253
263
  const e = t;
254
264
  switch (this.command) {
255
- case v.SHOW_MODAL:
265
+ case p.SHOW_MODAL:
256
266
  e.showModal?.();
257
267
  break;
258
- case v.CLOSE:
268
+ case p.CLOSE:
259
269
  e.close?.();
260
270
  break;
261
271
  }
@@ -341,23 +351,23 @@ class i extends HTMLElement {
341
351
  });
342
352
  }
343
353
  }
344
- const bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
354
+ const pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
345
355
  __proto__: null,
346
356
  BaseButtonComponent: i,
347
- selector: $
348
- }, Symbol.toStringTag, { value: "Module" })), j = `<button title="Undo" part="button">
357
+ selector: j
358
+ }, Symbol.toStringTag, { value: "Module" })), q = `<button title="Undo" part="button">
349
359
  <span class="material-symbols-outlined">undo</span>
350
360
  <span>Undo</span>
351
361
  </button>
352
- `, z = "button[part=button]{background:var(--color-warning);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}", L = new CSSStyleSheet();
353
- L.replaceSync(z);
354
- class q extends i {
362
+ `, z = "button[part=button]{background:var(--color-warning);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}", I = new CSSStyleSheet();
363
+ I.replaceSync(z);
364
+ class F extends i {
355
365
  /**
356
366
  * @constructor
357
367
  * @ignore
358
368
  */
359
369
  constructor() {
360
- super(), this.shadowRoot?.adoptedStyleSheets.push(L), this.command = v.CLOSE, this.title = "Undo";
370
+ super(), this.shadowRoot?.adoptedStyleSheets.push(I), this.command = p.CLOSE, this.title = "Undo";
361
371
  }
362
372
  /**
363
373
  * Specifies which attributes should be observed for changes.
@@ -375,7 +385,7 @@ class q extends i {
375
385
  * Renders the component's HTML structure.
376
386
  */
377
387
  _render() {
378
- this.shadowRoot !== null && (this.shadowRoot.innerHTML = j, this._syncAttributes());
388
+ this.shadowRoot !== null && (this.shadowRoot.innerHTML = q, this._syncAttributes());
379
389
  }
380
390
  /**
381
391
  * It finds the closest parent dialog and
@@ -390,23 +400,23 @@ class q extends i {
390
400
  e !== null && (this.commandfor = e.id);
391
401
  }
392
402
  }
393
- const D = "undo-button", vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
403
+ const S = "undo-button", yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
394
404
  __proto__: null,
395
- UndoButtonComponent: q,
396
- selector: D
397
- }, Symbol.toStringTag, { value: "Module" })), W = `<button title="Confirm" part="button">
405
+ UndoButtonComponent: F,
406
+ selector: S
407
+ }, Symbol.toStringTag, { value: "Module" })), U = `<button title="Confirm" part="button">
398
408
  <span class="material-symbols-outlined">check</span>
399
409
  <span>Confirm</span>
400
410
  </button>
401
- `, F = "button[part=button]{background:var(--color-success);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}", k = new CSSStyleSheet();
402
- k.replaceSync(F);
403
- class K extends i {
411
+ `, K = "button[part=button]{background:var(--color-success);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}", O = new CSSStyleSheet();
412
+ O.replaceSync(K);
413
+ class B extends i {
404
414
  /**
405
415
  * @constructor
406
416
  * @ignore
407
417
  */
408
418
  constructor() {
409
- super(), this.shadowRoot?.adoptedStyleSheets.push(k), this.command = v.CLOSE, this.title = "Confirm";
419
+ super(), this.shadowRoot?.adoptedStyleSheets.push(O), this.command = p.CLOSE, this.title = "Confirm";
410
420
  }
411
421
  /**
412
422
  * Specifies which attributes should be observed for changes.
@@ -424,7 +434,7 @@ class K extends i {
424
434
  * Renders the component's HTML structure.
425
435
  */
426
436
  _render() {
427
- this.shadowRoot !== null && (this.shadowRoot.innerHTML = W, this._syncAttributes());
437
+ this.shadowRoot !== null && (this.shadowRoot.innerHTML = U, this._syncAttributes());
428
438
  }
429
439
  /**
430
440
  * It finds the closest parent dialog and
@@ -439,16 +449,16 @@ class K extends i {
439
449
  e !== null && (this.commandfor = e.id);
440
450
  }
441
451
  }
442
- const A = "confirm-button", pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
452
+ const w = "confirm-button", gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
443
453
  __proto__: null,
444
- ConfirmButtonComponent: K,
445
- selector: A
446
- }, Symbol.toStringTag, { value: "Module" })), B = `<button part="button">
454
+ ConfirmButtonComponent: B,
455
+ selector: w
456
+ }, Symbol.toStringTag, { value: "Module" })), W = `<button part="button">
447
457
  <span class="material-symbols-outlined">chevron_left</span>
448
458
  </button>
449
- `, U = "button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}", I = new CSSStyleSheet();
450
- I.replaceSync(U);
451
- class g extends i {
459
+ `, G = "button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}", R = new CSSStyleSheet();
460
+ R.replaceSync(G);
461
+ class f extends i {
452
462
  static _disabledAttribute = "disabled";
453
463
  static _titleAttribute = "title";
454
464
  /**
@@ -456,7 +466,7 @@ class g extends i {
456
466
  * @ignore
457
467
  */
458
468
  constructor() {
459
- super(), this.shadowRoot?.adoptedStyleSheets.push(I), this.command = v.CLOSE;
469
+ super(), this.shadowRoot?.adoptedStyleSheets.push(R), this.command = p.CLOSE;
460
470
  }
461
471
  /**
462
472
  * Specifies which attributes should be observed for changes.
@@ -475,13 +485,13 @@ class g extends i {
475
485
  * Updates the title visibility based on disabled state.
476
486
  */
477
487
  attributeChangedCallback(t, e, s) {
478
- super.attributeChangedCallback(t, e, s), t === g._disabledAttribute && this._updateTitle();
488
+ super.attributeChangedCallback(t, e, s), t === f._disabledAttribute && this._updateTitle();
479
489
  }
480
490
  /**
481
491
  * Renders the component's HTML structure.
482
492
  */
483
493
  _render() {
484
- this.shadowRoot !== null && (this.shadowRoot.innerHTML = B, this._syncAttributes());
494
+ this.shadowRoot !== null && (this.shadowRoot.innerHTML = W, this._syncAttributes());
485
495
  }
486
496
  /**
487
497
  * Updates the title attribute based on disabled state.
@@ -491,19 +501,19 @@ class g extends i {
491
501
  const t = this.shadowRoot?.querySelector(
492
502
  "button"
493
503
  );
494
- t !== null && (this.disabled ? t.removeAttribute(g._titleAttribute) : t.setAttribute(g._titleAttribute, "Previous"));
504
+ t !== null && (this.disabled ? t.removeAttribute(f._titleAttribute) : t.setAttribute(f._titleAttribute, "Previous"));
495
505
  }
496
506
  }
497
- const Y = "previous-button", yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
507
+ const Y = "previous-button", ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
498
508
  __proto__: null,
499
- PreviousButtonComponent: g,
509
+ PreviousButtonComponent: f,
500
510
  selector: Y
501
- }, Symbol.toStringTag, { value: "Module" })), G = `<button part="button">
511
+ }, Symbol.toStringTag, { value: "Module" })), X = `<button part="button">
502
512
  <span class="material-symbols-outlined">chevron_right</span>
503
513
  </button>
504
- `, X = "button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}", R = new CSSStyleSheet();
505
- R.replaceSync(X);
506
- class f extends i {
514
+ `, J = "button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}", k = new CSSStyleSheet();
515
+ k.replaceSync(J);
516
+ class m extends i {
507
517
  static _disabledAttribute = "disabled";
508
518
  static _titleAttribute = "title";
509
519
  /**
@@ -511,7 +521,7 @@ class f extends i {
511
521
  * @ignore
512
522
  */
513
523
  constructor() {
514
- super(), this.shadowRoot?.adoptedStyleSheets.push(R), this.command = v.CLOSE;
524
+ super(), this.shadowRoot?.adoptedStyleSheets.push(k), this.command = p.CLOSE;
515
525
  }
516
526
  /**
517
527
  * Specifies which attributes should be observed for changes.
@@ -530,13 +540,13 @@ class f extends i {
530
540
  * Updates the title visibility based on disabled state.
531
541
  */
532
542
  attributeChangedCallback(t, e, s) {
533
- super.attributeChangedCallback(t, e, s), t === f._disabledAttribute && this._updateTitle();
543
+ super.attributeChangedCallback(t, e, s), t === m._disabledAttribute && this._updateTitle();
534
544
  }
535
545
  /**
536
546
  * Renders the component's HTML structure.
537
547
  */
538
548
  _render() {
539
- this.shadowRoot !== null && (this.shadowRoot.innerHTML = G, this._syncAttributes());
549
+ this.shadowRoot !== null && (this.shadowRoot.innerHTML = X, this._syncAttributes());
540
550
  }
541
551
  /**
542
552
  * Updates the title attribute based on disabled state.
@@ -546,19 +556,19 @@ class f extends i {
546
556
  const t = this.shadowRoot?.querySelector(
547
557
  "button"
548
558
  );
549
- t !== null && (this.disabled ? t.removeAttribute(f._titleAttribute) : t.setAttribute(f._titleAttribute, "Next"));
559
+ t !== null && (this.disabled ? t.removeAttribute(m._titleAttribute) : t.setAttribute(m._titleAttribute, "Next"));
550
560
  }
551
561
  }
552
- const J = "next-button", gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
562
+ const Q = "next-button", mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
553
563
  __proto__: null,
554
- NextButtonComponent: f,
555
- selector: J
556
- }, Symbol.toStringTag, { value: "Module" })), Q = `<dialog part="dialog">
564
+ NextButtonComponent: m,
565
+ selector: Q
566
+ }, Symbol.toStringTag, { value: "Module" })), Z = `<dialog part="dialog">
557
567
  <slot></slot>
558
568
  </dialog>
559
- `, Z = "dialog{background-color:var(--color-bg-primary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-xl);padding:var(--spacing-4);max-width:90vw;max-height:90vh;font-family:var(--font-family-base);line-height:var(--line-height-normal);font-size:var(--font-size-sm);box-shadow:var(--shadow-2xl);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:slideIn var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog.closing{animation:slideOut var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog::backdrop{background:var(--window-backdrop);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn var(--transition-base) ease-out forwards}dialog.closing::backdrop{animation:fadeOut var(--transition-base) ease-out forwards}@keyframes slideIn{0%{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.95) translateY(-20px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}", O = new CSSStyleSheet();
560
- O.replaceSync(Z);
561
- class h extends HTMLElement {
569
+ `, tt = "dialog{background-color:var(--color-bg-primary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-xl);padding:var(--spacing-4);max-width:90vw;max-height:90vh;font-family:var(--font-family-base);line-height:var(--line-height-normal);font-size:var(--font-size-sm);box-shadow:var(--shadow-2xl);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:slideIn var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog.closing{animation:slideOut var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog::backdrop{background:var(--window-backdrop);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn var(--transition-base) ease-out forwards}dialog.closing::backdrop{animation:fadeOut var(--transition-base) ease-out forwards}@keyframes slideIn{0%{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.95) translateY(-20px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}", N = new CSSStyleSheet();
570
+ N.replaceSync(tt);
571
+ class b extends HTMLElement {
562
572
  /**
563
573
  * @see HTMLDialogElement.closedBy
564
574
  */
@@ -567,31 +577,31 @@ class h extends HTMLElement {
567
577
  * Defines how the dialog can be closed.
568
578
  * @see DialogClosedBy
569
579
  */
570
- _closedBy = _.ANY;
580
+ _closedBy = A.ANY;
571
581
  /**
572
582
  * @constructor
573
583
  * @ignore
574
584
  */
575
585
  constructor() {
576
- super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(O);
586
+ super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(N);
577
587
  }
578
588
  /**
579
589
  * Specifies which attributes should be observed for changes.
580
590
  */
581
591
  static get observedAttributes() {
582
- return [h.closedByAttribute];
592
+ return [b.closedByAttribute];
583
593
  }
584
594
  get dialogElement() {
585
595
  return this.shadowRoot?.querySelector("dialog");
586
596
  }
587
597
  get command() {
588
- return this.getAttribute(h.closedByAttribute) ?? _.ANY;
598
+ return this.getAttribute(b.closedByAttribute) ?? A.ANY;
589
599
  }
590
600
  get closedBy() {
591
601
  return this._closedBy;
592
602
  }
593
603
  set closedBy(t) {
594
- this._closedBy = t, this.setAttribute(h.closedByAttribute, t);
604
+ this._closedBy = t, this.setAttribute(b.closedByAttribute, t);
595
605
  }
596
606
  /**
597
607
  * Lifecycle
@@ -643,7 +653,7 @@ class h extends HTMLElement {
643
653
  * @returns {void}
644
654
  */
645
655
  _render() {
646
- this.shadowRoot !== null && (this.shadowRoot.innerHTML = Q, this._syncAttributes());
656
+ this.shadowRoot !== null && (this.shadowRoot.innerHTML = Z, this._syncAttributes());
647
657
  }
648
658
  /**
649
659
  * Syncs a single attribute from host to dialog element.
@@ -662,7 +672,7 @@ class h extends HTMLElement {
662
672
  * @returns {void}
663
673
  */
664
674
  _syncAttributes() {
665
- h.observedAttributes.forEach((t) => {
675
+ b.observedAttributes.forEach((t) => {
666
676
  this._syncAttribute(t);
667
677
  });
668
678
  }
@@ -688,11 +698,11 @@ class h extends HTMLElement {
688
698
  }, 300);
689
699
  }
690
700
  }
691
- const tt = "base-dialog", ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
701
+ const et = "base-dialog", _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
692
702
  __proto__: null,
693
- BaseDialogComponent: h,
694
- selector: tt
695
- }, Symbol.toStringTag, { value: "Module" })), et = `<dialog part="dialog">
703
+ BaseDialogComponent: b,
704
+ selector: et
705
+ }, Symbol.toStringTag, { value: "Module" })), it = `<dialog part="dialog">
696
706
  <header part="header">
697
707
  <h2></h2>
698
708
  </header>
@@ -704,7 +714,7 @@ const tt = "base-dialog", ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Obj
704
714
  <undo-button></undo-button>
705
715
  </footer>
706
716
  </dialog>
707
- `, it = "dialog header[part=header] h2{margin:0;padding:0}dialog div[part=body] p{margin:0;padding:0}dialog footer[part=footer]{display:flex;gap:var(--gap-md);justify-content:flex-end}", st = `<dialog part="dialog">
717
+ `, st = "dialog header[part=header] h2{margin:0;padding:0}dialog div[part=body] p{margin:0;padding:0}dialog footer[part=footer]{display:flex;gap:var(--gap-md);justify-content:flex-end}", rt = `<dialog part="dialog">
708
718
  <header part="header">
709
719
  <slot name="header"></slot>
710
720
  </header>
@@ -715,9 +725,9 @@ const tt = "base-dialog", ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Obj
715
725
  <slot name="footer"></slot>
716
726
  </footer>
717
727
  </dialog>
718
- `, rt = 'dialog[open]{display:flex;flex-direction:column;gap:var(--spacing-4)}dialog>[part]{position:relative}dialog>[part][hidden]{display:none}dialog>[part][data-divider=true]:after{content:"";position:absolute;left:0;right:0;bottom:0;border-bottom:var(--border-width-1) solid var(--color-neutral-600)}dialog>[part][data-divider=true]{padding-bottom:var(--spacing-4)}dialog div[part=body]{flex:1;min-height:0}', N = new CSSStyleSheet();
719
- N.replaceSync(rt);
720
- class S extends h {
728
+ `, nt = 'dialog[open]{display:flex;flex-direction:column;gap:var(--spacing-4)}dialog>[part]{position:relative}dialog>[part][hidden]{display:none}dialog>[part][data-divider=true]:after{content:"";position:absolute;left:0;right:0;bottom:0;border-bottom:var(--border-width-1) solid var(--color-neutral-600)}dialog>[part][data-divider=true]{padding-bottom:var(--spacing-4)}dialog div[part=body]{flex:1;min-height:0}', C = new CSSStyleSheet();
729
+ C.replaceSync(nt);
730
+ class L extends b {
721
731
  _sectionNames = ["header", "body", "footer"];
722
732
  _handleSlotChange = () => {
723
733
  this._updateSectionState();
@@ -727,14 +737,14 @@ class S extends h {
727
737
  * @ignore
728
738
  */
729
739
  constructor() {
730
- super(), this.shadowRoot?.adoptedStyleSheets.push(N);
740
+ super(), this.shadowRoot?.adoptedStyleSheets.push(C);
731
741
  }
732
742
  /**
733
743
  * Specifies which attributes should be observed for changes.
734
744
  * Uses parent's attributes since we're extending the base dialog.
735
745
  */
736
746
  static get observedAttributes() {
737
- return h.observedAttributes;
747
+ return b.observedAttributes;
738
748
  }
739
749
  /**
740
750
  * Renders the component's HTML structure.
@@ -743,7 +753,7 @@ class S extends h {
743
753
  * @returns {void}
744
754
  */
745
755
  _render() {
746
- this.shadowRoot !== null && (this.shadowRoot.innerHTML = st, this._syncAttributes());
756
+ this.shadowRoot !== null && (this.shadowRoot.innerHTML = rt, this._syncAttributes());
747
757
  }
748
758
  /**
749
759
  * Adds slot listeners so sections can react to projected content changes.
@@ -789,9 +799,9 @@ class S extends h {
789
799
  });
790
800
  }
791
801
  }
792
- const C = new CSSStyleSheet();
793
- C.replaceSync(it);
794
- class d extends S {
802
+ const M = new CSSStyleSheet();
803
+ M.replaceSync(st);
804
+ class d extends L {
795
805
  /**
796
806
  * The title of the confirmation dialog.
797
807
  */
@@ -803,7 +813,7 @@ class d extends S {
803
813
  /**
804
814
  * The value associated with the confirmation action, emitted in the confirm event.
805
815
  */
806
- _value;
816
+ _value = void 0;
807
817
  /**
808
818
  * The name of the attribute that holds the dialog's text content.
809
819
  */
@@ -820,7 +830,7 @@ class d extends S {
820
830
  * @constructor
821
831
  */
822
832
  constructor() {
823
- super(), this.shadowRoot?.adoptedStyleSheets.push(C);
833
+ super(), this.shadowRoot?.adoptedStyleSheets.push(M);
824
834
  }
825
835
  /**
826
836
  * Specifies which attributes should be observed for changes.
@@ -828,7 +838,7 @@ class d extends S {
828
838
  */
829
839
  static get observedAttributes() {
830
840
  return [
831
- ...S.observedAttributes,
841
+ ...L.observedAttributes,
832
842
  d.textAttribute,
833
843
  d.headlineAttribute,
834
844
  d.valueAttribute
@@ -858,7 +868,7 @@ class d extends S {
858
868
  * @returns {void}
859
869
  */
860
870
  connectedCallback() {
861
- this._render(), this._addEventListeners(), this.closedBy = _.NONE;
871
+ this._render(), this._addEventListeners(), this.closedBy = A.NONE;
862
872
  }
863
873
  /**
864
874
  * Renders the component's HTML structure.
@@ -867,7 +877,7 @@ class d extends S {
867
877
  * @returns {void}
868
878
  */
869
879
  _render() {
870
- this.shadowRoot !== null && (this.shadowRoot.innerHTML = et, this._syncAttributes());
880
+ this.shadowRoot !== null && (this.shadowRoot.innerHTML = it, this._syncAttributes());
871
881
  }
872
882
  /**
873
883
  * Syncs a single attribute from host to the DOM elements.
@@ -918,8 +928,8 @@ class d extends S {
918
928
  */
919
929
  _addEventListeners() {
920
930
  super._addEventListeners(), this.shadowRoot?.querySelector(
921
- A
922
- )?.addEventListener(p.CLICK, this._handleConfirm);
931
+ w
932
+ )?.addEventListener(h.CLICK, this._handleConfirm), this.shadowRoot?.querySelector(S)?.addEventListener(h.CLICK, this._handleUndo);
923
933
  }
924
934
  /**
925
935
  * Removes event listeners.
@@ -928,8 +938,8 @@ class d extends S {
928
938
  */
929
939
  _removeEventListeners() {
930
940
  super._removeEventListeners(), this.shadowRoot?.querySelector(
931
- A
932
- )?.removeEventListener(p.CLICK, this._handleConfirm);
941
+ w
942
+ )?.removeEventListener(h.CLICK, this._handleConfirm), this.shadowRoot?.querySelector(S)?.removeEventListener(h.CLICK, this._handleUndo);
933
943
  }
934
944
  /**
935
945
  * Handles the confirm button click event.
@@ -939,7 +949,7 @@ class d extends S {
939
949
  */
940
950
  _handleConfirm = () => {
941
951
  const t = new CustomEvent(
942
- E.CONFIRMATION_DIALOG_CONFIRM,
952
+ _.CONFIRMATION_DIALOG_CONFIRM,
943
953
  {
944
954
  bubbles: !0,
945
955
  composed: !0,
@@ -950,19 +960,33 @@ class d extends S {
950
960
  );
951
961
  this.dispatchEvent(t);
952
962
  };
963
+ _handleUndo = () => {
964
+ const t = new CustomEvent(
965
+ _.CONFIRMATION_DIALOG_UNDO,
966
+ {
967
+ bubbles: !0,
968
+ composed: !0,
969
+ detail: {
970
+ value: this._value
971
+ }
972
+ }
973
+ );
974
+ this.dispatchEvent(t), this._value = void 0;
975
+ };
953
976
  }
954
- const nt = "confirmation-dialog", ot = {
955
- CONFIRMATION_DIALOG_CONFIRM: E.CONFIRMATION_DIALOG_CONFIRM
956
- }, mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
977
+ const ot = "confirmation-dialog", at = {
978
+ CONFIRMATION_DIALOG_CONFIRM: _.CONFIRMATION_DIALOG_CONFIRM,
979
+ CONFIRMATION_DIALOG_UNDO: _.CONFIRMATION_DIALOG_UNDO
980
+ }, At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
957
981
  __proto__: null,
958
- COMPONENT_CUSTOM_MESSAGES: ot,
982
+ COMPONENT_CUSTOM_MESSAGES: at,
959
983
  ConfirmationDialogComponent: d,
960
- selector: nt
961
- }, Symbol.toStringTag, { value: "Module" })), at = "header-body-footer-dialog", _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
984
+ selector: ot
985
+ }, Symbol.toStringTag, { value: "Module" })), lt = "header-body-footer-dialog", St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
962
986
  __proto__: null,
963
- HeaderBodyFooterDialogComponent: S,
964
- selector: at
965
- }, Symbol.toStringTag, { value: "Module" })), lt = `<div class="bar-menu-container">
987
+ HeaderBodyFooterDialogComponent: L,
988
+ selector: lt
989
+ }, Symbol.toStringTag, { value: "Module" })), ut = `<div class="bar-menu-container">
966
990
  <previous-button class="nav-prev" part="nav-prev-button"></previous-button>
967
991
 
968
992
  <div class="buttons-wrapper" part="buttons-wrapper">
@@ -971,8 +995,8 @@ const nt = "confirmation-dialog", ot = {
971
995
 
972
996
  <next-button class="nav-next" part="nav-next-button"></next-button>
973
997
  </div>
974
- `, ut = ":host{display:block;width:100%}.bar-menu-container{display:flex;align-items:center;justify-content:space-between;height:100%;gap:var(--gap-sm);padding:var(--spacing-1);background:var(--color-bg-primary);border-radius:var(--border-radius-full);border:var(--border-width-2) solid var(--color-border-secondary);box-shadow:var(--shadow-sm);margin:0 auto}.bar-menu-container .nav-prev,.bar-menu-container .nav-next{flex-shrink:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.bar-menu-container .nav-prev.visible,.bar-menu-container .nav-next.visible{opacity:1;visibility:visible;pointer-events:auto}.bar-menu-container .nav-prev::part(button),.bar-menu-container .nav-next::part(button){background-color:transparent;box-shadow:none}.bar-menu-container .buttons-wrapper{display:grid;grid-template-columns:repeat(var(--bar-menu-visible-count, 3),1fr);grid-auto-rows:max-content;align-items:center;justify-items:center;gap:var(--gap-sm);overflow:hidden;position:relative;width:auto}::slotted(*){display:none;flex-shrink:0;will-change:opacity,transform;contain:layout style paint;opacity:0;transform:scale(.8)}::slotted(.animating){transition:opacity .4s cubic-bezier(.34,1.56,.64,1),transform .4s cubic-bezier(.34,1.56,.64,1)}::slotted(.visible-button){display:inline-flex!important;pointer-events:auto;opacity:1;transform:scale(1)}", M = new CSSStyleSheet();
975
- M.replaceSync(ut);
998
+ `, dt = ":host{display:block;width:100%}.bar-menu-container{display:flex;align-items:center;justify-content:space-between;height:100%;gap:var(--gap-sm);padding:var(--spacing-1);background:var(--color-bg-primary);border-radius:var(--border-radius-full);border:var(--border-width-2) solid var(--color-border-secondary);box-shadow:var(--shadow-sm);margin:0 auto}.bar-menu-container .nav-prev,.bar-menu-container .nav-next{flex-shrink:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.bar-menu-container .nav-prev.visible,.bar-menu-container .nav-next.visible{opacity:1;visibility:visible;pointer-events:auto}.bar-menu-container .nav-prev::part(button),.bar-menu-container .nav-next::part(button){background-color:transparent;box-shadow:none}.bar-menu-container .buttons-wrapper{display:grid;grid-template-columns:repeat(var(--bar-menu-visible-count, 3),1fr);grid-auto-rows:max-content;align-items:center;justify-items:center;gap:var(--gap-sm);overflow:hidden;position:relative;width:auto}::slotted(*){display:none;flex-shrink:0;will-change:opacity,transform;contain:layout style paint;opacity:0;transform:scale(.8)}::slotted(.animating){transition:opacity .4s cubic-bezier(.34,1.56,.64,1),transform .4s cubic-bezier(.34,1.56,.64,1)}::slotted(.visible-button){display:inline-flex!important;pointer-events:auto;opacity:1;transform:scale(1)}", T = new CSSStyleSheet();
999
+ T.replaceSync(dt);
976
1000
  class c extends HTMLElement {
977
1001
  static _visibleCountAttribute = "visible-count";
978
1002
  static _cyclicalNavigationAttribute = "cyclical-navigation";
@@ -991,7 +1015,7 @@ class c extends HTMLElement {
991
1015
  * @constructor
992
1016
  */
993
1017
  constructor() {
994
- super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(M);
1018
+ super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(T);
995
1019
  }
996
1020
  /**
997
1021
  * Specifies which attributes should be observed for changes.
@@ -1051,7 +1075,7 @@ class c extends HTMLElement {
1051
1075
  * Render the component's Shadow DOM structure
1052
1076
  */
1053
1077
  _render() {
1054
- this.shadowRoot !== null && (this.shadowRoot.innerHTML = lt);
1078
+ this.shadowRoot !== null && (this.shadowRoot.innerHTML = ut);
1055
1079
  }
1056
1080
  /**
1057
1081
  * Cache Shadow DOM elements for performance
@@ -1060,9 +1084,9 @@ class c extends HTMLElement {
1060
1084
  this._slotElement = this.shadowRoot?.querySelector("slot") ?? null, this._navPrevButton = this.shadowRoot?.querySelector(".nav-prev") ?? null, this._navNextButton = this.shadowRoot?.querySelector(".nav-next") ?? null, this._buttonsWrapper = this.shadowRoot?.querySelector(".buttons-wrapper") ?? null, this._buttonsWrapper !== null && this._buttonsWrapper.style.setProperty(
1061
1085
  "--bar-menu-visible-count",
1062
1086
  String(this.visibleButtons)
1063
- ), this._navPrevButton !== null && (this._navPrevButton.setAttribute("aria-label", "Previous"), this._navPrevButton.addEventListener(p.CLICK, () => {
1087
+ ), this._navPrevButton !== null && (this._navPrevButton.setAttribute("aria-label", "Previous"), this._navPrevButton.addEventListener(h.CLICK, () => {
1064
1088
  this._scrollPrevious();
1065
- })), this._navNextButton !== null && (this._navNextButton.setAttribute("aria-label", "Next"), this._navNextButton.addEventListener(p.CLICK, () => {
1089
+ })), this._navNextButton !== null && (this._navNextButton.setAttribute("aria-label", "Next"), this._navNextButton.addEventListener(h.CLICK, () => {
1066
1090
  this._scrollNext();
1067
1091
  }));
1068
1092
  }
@@ -1089,13 +1113,13 @@ class c extends HTMLElement {
1089
1113
  _setupKeyboardListener() {
1090
1114
  this._keyDownListener = (t) => {
1091
1115
  t.key === "ArrowLeft" ? (t.preventDefault(), this._scrollPrevious()) : t.key === "ArrowRight" && (t.preventDefault(), this._scrollNext());
1092
- }, this.addEventListener(w.KEY_DOWN, this._keyDownListener);
1116
+ }, this.addEventListener(E.KEY_DOWN, this._keyDownListener);
1093
1117
  }
1094
1118
  /**
1095
1119
  * Remove keyboard listener
1096
1120
  */
1097
1121
  _removeKeyboardListener() {
1098
- this._keyDownListener !== null && this.removeEventListener(w.KEY_DOWN, this._keyDownListener);
1122
+ this._keyDownListener !== null && this.removeEventListener(E.KEY_DOWN, this._keyDownListener);
1099
1123
  }
1100
1124
  /**
1101
1125
  * Get all slotted button elements
@@ -1109,14 +1133,14 @@ class c extends HTMLElement {
1109
1133
  _updateButtonVisibility(t) {
1110
1134
  const e = this._getSlottedButtons(), s = e.length, r = this.visibleButtons, n = this._currentIndex, l = Math.min(n + r, s);
1111
1135
  e.forEach((a, u) => {
1112
- const y = u >= n && u < l, b = a;
1113
- y || (a.classList.remove("visible-button"), a.classList.remove("animating"), b.style.display = "none");
1136
+ const g = u >= n && u < l, v = a;
1137
+ g || (a.classList.remove("visible-button"), a.classList.remove("animating"), v.style.display = "none");
1114
1138
  }), t !== void 0 ? (e[0]?.offsetHeight, e.forEach((a, u) => {
1115
1139
  if (u >= n && u < l) {
1116
- const b = a;
1117
- b.style.display = "inline-flex", a.classList.add("animating");
1118
- const T = u % this.visibleButtons * 50;
1119
- b.style.transitionDelay = `${T}ms`;
1140
+ const v = a;
1141
+ v.style.display = "inline-flex", a.classList.add("animating");
1142
+ const $ = u % this.visibleButtons * 50;
1143
+ v.style.transitionDelay = `${$}ms`;
1120
1144
  }
1121
1145
  }), e[0]?.offsetHeight, e.forEach((a, u) => {
1122
1146
  u >= n && u < l && a.classList.add("visible-button");
@@ -1125,8 +1149,8 @@ class c extends HTMLElement {
1125
1149
  a.classList.remove("animating"), a.style.transitionDelay = o;
1126
1150
  });
1127
1151
  }, 400)) : e.forEach((a, u) => {
1128
- const y = u >= n && u < l, b = a;
1129
- y && (b.style.display = "inline-flex", a.classList.add("visible-button"));
1152
+ const g = u >= n && u < l, v = a;
1153
+ g && (v.style.display = "inline-flex", a.classList.add("visible-button"));
1130
1154
  }), this._updateNavigationButtons(s, r);
1131
1155
  }
1132
1156
  /**
@@ -1183,22 +1207,23 @@ class c extends HTMLElement {
1183
1207
  return this._currentIndex;
1184
1208
  }
1185
1209
  }
1186
- const dt = "bar-menu", At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1210
+ const ct = "bar-menu", wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1187
1211
  __proto__: null,
1188
1212
  BarMenuComponent: c,
1189
- selector: dt
1213
+ selector: ct
1190
1214
  }, Symbol.toStringTag, { value: "Module" }));
1191
1215
  export {
1192
- ct as APPLICATION_NAME,
1193
- At as BarMenu,
1194
- bt as BaseButton,
1195
- ft as BaseDialog,
1196
- E as CUSTOM_MESSAGES,
1197
- pt as ConfirmButton,
1198
- mt as ConfirmationDialog,
1199
- _t as HeaderBodyFooterDialog,
1200
- gt as NextButton,
1201
- yt as PreviousButton,
1202
- vt as UndoButton,
1203
- ht as WebComponentsRegistry
1216
+ ht as APPLICATION_NAME,
1217
+ wt as BarMenu,
1218
+ pt as BaseButton,
1219
+ _t as BaseDialog,
1220
+ _ as CUSTOM_MESSAGES,
1221
+ gt as ConfirmButton,
1222
+ At as ConfirmationDialog,
1223
+ St as HeaderBodyFooterDialog,
1224
+ mt as NextButton,
1225
+ ft as PreviousButton,
1226
+ yt as UndoButton,
1227
+ bt as WebComponentsRegistry,
1228
+ vt as switchTheme
1204
1229
  };
@@ -1,4 +1,4 @@
1
- (function(l,f){typeof exports=="object"&&typeof module<"u"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(l=typeof globalThis<"u"?globalThis:l||self,f(l["as-design-system-lib"]={}))})(this,(function(l){"use strict";const f="as-design-system-lib";class P{constructor(t=new Map){this.registerAllComponents(t)}registerAllComponents(t){Array.from(t.entries()).forEach(([e,s])=>{this.registerComponent(e,s)})}registerComponent(t,e){customElements.get(t)===void 0?(customElements.define(t,e),console.log(`Registered Web Component: ${t}`)):console.warn(`Web Component "${t}" is already registered.`)}}const A={CONFIRMATION_DIALOG_CONFIRM:"confirmation-dialog-confirm"},H="base-button",n="",v={SHOW_MODAL:"show-modal",CLOSE:"close"};`${btoa({CUSTOM_CROSSHAIR:`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
1
+ (function(l,f){typeof exports=="object"&&typeof module<"u"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(l=typeof globalThis<"u"?globalThis:l||self,f(l["as-design-system-lib"]={}))})(this,(function(l){"use strict";const f="as-design-system-lib";class H{constructor(t=new Map){this.registerAllComponents(t)}registerAllComponents(t){Array.from(t.entries()).forEach(([e,s])=>{this.registerComponent(e,s)})}registerComponent(t,e){customElements.get(t)===void 0?(customElements.define(t,e),console.log(`Registered Web Component: ${t}`)):console.warn(`Web Component "${t}" is already registered.`)}}const g={CONFIRMATION_DIALOG_CONFIRM:"confirmation-dialog-confirm",CONFIRMATION_DIALOG_UNDO:"confirmation-dialog-undo"},n="",p={SHOW_MODAL:"show-modal",CLOSE:"close"};`${btoa({CUSTOM_CROSSHAIR:`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
2
  <!-- White border (underneath) -->
3
3
  <line x1="16" y1="2" x2="16" y2="30" stroke="white" stroke-width="5"/>
4
4
  <line x1="2" y1="16" x2="30" y2="16" stroke="white" stroke-width="5"/>
@@ -6,27 +6,27 @@
6
6
  <!-- Black crosshair lines (on top) -->
7
7
  <line x1="16" y1="2" x2="16" y2="30" stroke="black" stroke-width="2"/>
8
8
  <line x1="2" y1="16" x2="30" y2="16" stroke="black" stroke-width="2"/>
9
- </svg>`}.CUSTOM_CROSSHAIR)}`;const S={ANY:"any",NONE:"none"},x={KEY_DOWN:"keydown"},p={CLICK:"click"},j=`<button part="button">
9
+ </svg>`}.CUSTOM_CROSSHAIR)}`;const w={ANY:"any",NONE:"none"},I={KEY_DOWN:"keydown"},b={CLICK:"click"},j={FERRARI:"ferrari",LIGHT:"light",LIGHT_BLUE:"light-blue",DARK:"dark",DARK_PURPLE:"dark-purple"},D=A=>{const t=document.body;t.classList.remove(...Object.values(j)),t.classList.add(A)},V="base-button",q=`<button part="button">
10
10
  <slot></slot>
11
11
  </button>
12
- `,V=":where(button,input[type=button],input[type=submit],input[type=reset]),:where(input[type=file])::file-selector-button{cursor:pointer;-webkit-user-select:none;user-select:none;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);font-family:var(--font-family-base);letter-spacing:var(--letter-spacing-normal);line-height:var(--line-height-normal);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);display:inline-flex;justify-content:center;align-items:center;text-align:center;gap:var(--gap-sm);background:var(--color-bg-secondary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-primary);border-radius:var(--border-radius-lg);transition:all var(--transition-base)}:where(button,input[type=button],input[type=submit],input[type=reset])>.material-symbols-outlined{font-size:var(--font-size-xl);font-family:Material Symbols Outlined;line-height:1}:where(button,input[type=button],input[type=submit],input[type=reset])[disabled]{opacity:.3;cursor:not-allowed}:where(button,input[type=button],input[type=submit],input[type=reset]):where(:not(:disabled):hover),:where(button,input[type=button],input[type=submit],input[type=reset]):where(:not(:disabled):active){background:var(--color-hover-bg-secondary);border-color:var(--color-hover-border-secondary)}:where(input[type=file]){inline-size:100%;max-inline-size:max-content;background-color:var(--color-bg-secondary)}",k=new CSSStyleSheet;k.replaceSync(V);class i extends HTMLElement{static autofocusAttribute="autofocus";static commandAttribute="command";static commandforAttribute="commandfor";static disabledAttribute="disabled";static nameAttribute="name";static titleAttribute="title";static typeAttribute="type";static valueAttribute="value";constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(k)}static get observedAttributes(){return[i.autofocusAttribute,i.commandAttribute,i.commandforAttribute,i.disabledAttribute,i.nameAttribute,i.titleAttribute,i.typeAttribute,i.valueAttribute]}get buttonElement(){return this.shadowRoot?.querySelector("button")}get autofocus(){return this.hasAttribute(i.autofocusAttribute)}set autofocus(t){t?this.setAttribute(i.autofocusAttribute,n):this.removeAttribute(i.autofocusAttribute)}get command(){return this.getAttribute(i.commandAttribute)??n}set command(t){this.setAttribute(i.commandAttribute,t)}get commandfor(){return this.getAttribute(i.commandforAttribute)??n}set commandfor(t){t!==n?this.setAttribute(i.commandforAttribute,t):this.removeAttribute(i.commandforAttribute)}get disabled(){return this.hasAttribute(i.disabledAttribute)}set disabled(t){t?this.setAttribute(i.disabledAttribute,n):this.removeAttribute(i.disabledAttribute)}get name(){return this.getAttribute(i.nameAttribute)??n}set name(t){t!==n?this.setAttribute(i.nameAttribute,t):this.removeAttribute(i.nameAttribute)}get headline(){return this.getAttribute(i.titleAttribute)??n}set headline(t){t!==n?this.setAttribute(i.titleAttribute,t):this.removeAttribute(i.titleAttribute)}get type(){return this.getAttribute(i.typeAttribute)??"button"}set type(t){t!==n?this.setAttribute(i.typeAttribute,t):this.removeAttribute(i.typeAttribute)}get value(){return this.getAttribute(i.valueAttribute)??"button"}set value(t){t!==n?this.setAttribute(i.valueAttribute,t):this.removeAttribute(i.valueAttribute)}connectedCallback(){this._render(),this._addEventListeners()}disconnectedCallback(){this._removeEventListeners()}attributeChangedCallback(t,e,s){s!==e&&this._syncAttribute(t)}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=j,this._syncAttributes())}_addEventListeners(){this.buttonElement.addEventListener(p.CLICK,this._handleClick)}_removeEventListeners(){this.buttonElement.addEventListener(p.CLICK,this._handleClick)}_handleClick=()=>{if(this.command===n||this.commandfor===n)return;let t=document.getElementById(this.commandfor);if(t??=this._findElementInShadowDOM(this.commandfor),t===null)return;const e=t;switch(this.command){case v.SHOW_MODAL:e.showModal?.();break;case v.CLOSE:e.close?.();break}};_findElementInShadowDOM(t){const s=`#${CSS.escape(t)}`;let r=this.querySelector(s);if(r!==null||(r=this._searchInShadowRootsOfChildren(this,s),r!==null))return r;let o=this.parentElement;for(;o!==null;){if(r=o.querySelector(s),r!==null||(r=this._searchInShadowRootsOfChildren(o,s),r!==null))return r;const u=o.parentElement;if(u!==null)o=u;else{const a=o.getRootNode();if(a instanceof ShadowRoot&&a.host!==null)o=a.host;else break}}return null}_searchInShadowRootsOfChildren(t,e){const s=t.children;for(const r of s){if(r.shadowRoot!==null){const u=r.shadowRoot.querySelector(e);if(u!==null)return u;const a=this._searchInShadowRootsOfChildren(r.shadowRoot,e);if(a!==null)return a}const o=this._searchInShadowRootsOfChildren(r,e);if(o!==null)return o}return null}_syncAttribute(t){const e=this.buttonElement;e!==null&&(this.hasAttribute(t)?e.setAttribute(t,this.getAttribute(t)??n):e.removeAttribute(t))}_syncAttributes(){i.observedAttributes.forEach(t=>{this._syncAttribute(t)})}}const z=Object.freeze(Object.defineProperty({__proto__:null,BaseButtonComponent:i,selector:H},Symbol.toStringTag,{value:"Module"})),q=`<button title="Undo" part="button">
12
+ `,z=":where(button,input[type=button],input[type=submit],input[type=reset]),:where(input[type=file])::file-selector-button{cursor:pointer;-webkit-user-select:none;user-select:none;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);font-family:var(--font-family-base);letter-spacing:var(--letter-spacing-normal);line-height:var(--line-height-normal);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);display:inline-flex;justify-content:center;align-items:center;text-align:center;gap:var(--gap-sm);background:var(--color-bg-secondary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-primary);border-radius:var(--border-radius-lg);transition:all var(--transition-base)}:where(button,input[type=button],input[type=submit],input[type=reset])>.material-symbols-outlined{font-size:var(--font-size-xl);font-family:Material Symbols Outlined;line-height:1}:where(button,input[type=button],input[type=submit],input[type=reset])[disabled]{opacity:.3;cursor:not-allowed}:where(button,input[type=button],input[type=submit],input[type=reset]):where(:not(:disabled):hover),:where(button,input[type=button],input[type=submit],input[type=reset]):where(:not(:disabled):active){background:var(--color-hover-bg-secondary);border-color:var(--color-hover-border-secondary)}:where(input[type=file]){inline-size:100%;max-inline-size:max-content;background-color:var(--color-bg-secondary)}",O=new CSSStyleSheet;O.replaceSync(z);class i extends HTMLElement{static autofocusAttribute="autofocus";static commandAttribute="command";static commandforAttribute="commandfor";static disabledAttribute="disabled";static nameAttribute="name";static titleAttribute="title";static typeAttribute="type";static valueAttribute="value";constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(O)}static get observedAttributes(){return[i.autofocusAttribute,i.commandAttribute,i.commandforAttribute,i.disabledAttribute,i.nameAttribute,i.titleAttribute,i.typeAttribute,i.valueAttribute]}get buttonElement(){return this.shadowRoot?.querySelector("button")}get autofocus(){return this.hasAttribute(i.autofocusAttribute)}set autofocus(t){t?this.setAttribute(i.autofocusAttribute,n):this.removeAttribute(i.autofocusAttribute)}get command(){return this.getAttribute(i.commandAttribute)??n}set command(t){this.setAttribute(i.commandAttribute,t)}get commandfor(){return this.getAttribute(i.commandforAttribute)??n}set commandfor(t){t!==n?this.setAttribute(i.commandforAttribute,t):this.removeAttribute(i.commandforAttribute)}get disabled(){return this.hasAttribute(i.disabledAttribute)}set disabled(t){t?this.setAttribute(i.disabledAttribute,n):this.removeAttribute(i.disabledAttribute)}get name(){return this.getAttribute(i.nameAttribute)??n}set name(t){t!==n?this.setAttribute(i.nameAttribute,t):this.removeAttribute(i.nameAttribute)}get headline(){return this.getAttribute(i.titleAttribute)??n}set headline(t){t!==n?this.setAttribute(i.titleAttribute,t):this.removeAttribute(i.titleAttribute)}get type(){return this.getAttribute(i.typeAttribute)??"button"}set type(t){t!==n?this.setAttribute(i.typeAttribute,t):this.removeAttribute(i.typeAttribute)}get value(){return this.getAttribute(i.valueAttribute)??"button"}set value(t){t!==n?this.setAttribute(i.valueAttribute,t):this.removeAttribute(i.valueAttribute)}connectedCallback(){this._render(),this._addEventListeners()}disconnectedCallback(){this._removeEventListeners()}attributeChangedCallback(t,e,s){s!==e&&this._syncAttribute(t)}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=q,this._syncAttributes())}_addEventListeners(){this.buttonElement.addEventListener(b.CLICK,this._handleClick)}_removeEventListeners(){this.buttonElement.addEventListener(b.CLICK,this._handleClick)}_handleClick=()=>{if(this.command===n||this.commandfor===n)return;let t=document.getElementById(this.commandfor);if(t??=this._findElementInShadowDOM(this.commandfor),t===null)return;const e=t;switch(this.command){case p.SHOW_MODAL:e.showModal?.();break;case p.CLOSE:e.close?.();break}};_findElementInShadowDOM(t){const s=`#${CSS.escape(t)}`;let r=this.querySelector(s);if(r!==null||(r=this._searchInShadowRootsOfChildren(this,s),r!==null))return r;let o=this.parentElement;for(;o!==null;){if(r=o.querySelector(s),r!==null||(r=this._searchInShadowRootsOfChildren(o,s),r!==null))return r;const d=o.parentElement;if(d!==null)o=d;else{const a=o.getRootNode();if(a instanceof ShadowRoot&&a.host!==null)o=a.host;else break}}return null}_searchInShadowRootsOfChildren(t,e){const s=t.children;for(const r of s){if(r.shadowRoot!==null){const d=r.shadowRoot.querySelector(e);if(d!==null)return d;const a=this._searchInShadowRootsOfChildren(r.shadowRoot,e);if(a!==null)return a}const o=this._searchInShadowRootsOfChildren(r,e);if(o!==null)return o}return null}_syncAttribute(t){const e=this.buttonElement;e!==null&&(this.hasAttribute(t)?e.setAttribute(t,this.getAttribute(t)??n):e.removeAttribute(t))}_syncAttributes(){i.observedAttributes.forEach(t=>{this._syncAttribute(t)})}}const U=Object.freeze(Object.defineProperty({__proto__:null,BaseButtonComponent:i,selector:V},Symbol.toStringTag,{value:"Module"})),F=`<button title="Undo" part="button">
13
13
  <span class="material-symbols-outlined">undo</span>
14
14
  <span>Undo</span>
15
15
  </button>
16
- `,W="button[part=button]{background:var(--color-warning);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}",I=new CSSStyleSheet;I.replaceSync(W);class D extends i{constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(I),this.command=v.CLOSE,this.title="Undo"}static get observedAttributes(){return i.observedAttributes}connectedCallback(){this._render(),this._setCommandForAttribute(),this._addEventListeners()}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=q,this._syncAttributes())}_setCommandForAttribute(){let t=this.getRootNode();"host"in t&&t.host!==null&&t.host!==void 0&&(t=t.host);const e=t instanceof Element?t.closest("base-dialog")??t.closest("confirmation-dialog"):null;e!==null&&(this.commandfor=e.id)}}const F=Object.freeze(Object.defineProperty({__proto__:null,UndoButtonComponent:D,selector:"undo-button"},Symbol.toStringTag,{value:"Module"})),K=`<button title="Confirm" part="button">
16
+ `,K="button[part=button]{background:var(--color-warning);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}",R=new CSSStyleSheet;R.replaceSync(K);class B extends i{constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(R),this.command=p.CLOSE,this.title="Undo"}static get observedAttributes(){return i.observedAttributes}connectedCallback(){this._render(),this._setCommandForAttribute(),this._addEventListeners()}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=F,this._syncAttributes())}_setCommandForAttribute(){let t=this.getRootNode();"host"in t&&t.host!==null&&t.host!==void 0&&(t=t.host);const e=t instanceof Element?t.closest("base-dialog")??t.closest("confirmation-dialog"):null;e!==null&&(this.commandfor=e.id)}}const E="undo-button",W=Object.freeze(Object.defineProperty({__proto__:null,UndoButtonComponent:B,selector:E},Symbol.toStringTag,{value:"Module"})),G=`<button title="Confirm" part="button">
17
17
  <span class="material-symbols-outlined">check</span>
18
18
  <span>Confirm</span>
19
19
  </button>
20
- `,B="button[part=button]{background:var(--color-success);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}",O=new CSSStyleSheet;O.replaceSync(B);class U extends i{constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(O),this.command=v.CLOSE,this.title="Confirm"}static get observedAttributes(){return i.observedAttributes}connectedCallback(){this._render(),this._setCommandForAttribute(),this._addEventListeners()}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=K,this._syncAttributes())}_setCommandForAttribute(){let t=this.getRootNode();"host"in t&&t.host!==null&&t.host!==void 0&&(t=t.host);const e=t instanceof Element?t.closest("base-dialog")??t.closest("confirmation-dialog"):null;e!==null&&(this.commandfor=e.id)}}const w="confirm-button",Y=Object.freeze(Object.defineProperty({__proto__:null,ConfirmButtonComponent:U,selector:w},Symbol.toStringTag,{value:"Module"})),G=`<button part="button">
20
+ `,Y="button[part=button]{background:var(--color-success);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}",N=new CSSStyleSheet;N.replaceSync(Y);class X extends i{constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(N),this.command=p.CLOSE,this.title="Confirm"}static get observedAttributes(){return i.observedAttributes}connectedCallback(){this._render(),this._setCommandForAttribute(),this._addEventListeners()}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=G,this._syncAttributes())}_setCommandForAttribute(){let t=this.getRootNode();"host"in t&&t.host!==null&&t.host!==void 0&&(t=t.host);const e=t instanceof Element?t.closest("base-dialog")??t.closest("confirmation-dialog"):null;e!==null&&(this.commandfor=e.id)}}const L="confirm-button",J=Object.freeze(Object.defineProperty({__proto__:null,ConfirmButtonComponent:X,selector:L},Symbol.toStringTag,{value:"Module"})),Q=`<button part="button">
21
21
  <span class="material-symbols-outlined">chevron_left</span>
22
22
  </button>
23
- `,X="button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}",R=new CSSStyleSheet;R.replaceSync(X);class g extends i{static _disabledAttribute="disabled";static _titleAttribute="title";constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(R),this.command=v.CLOSE}static get observedAttributes(){return i.observedAttributes}connectedCallback(){this._render(),this._addEventListeners(),this._updateTitle()}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),t===g._disabledAttribute&&this._updateTitle()}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=G,this._syncAttributes())}_updateTitle(){const t=this.shadowRoot?.querySelector("button");t!==null&&(this.disabled?t.removeAttribute(g._titleAttribute):t.setAttribute(g._titleAttribute,"Previous"))}}const J=Object.freeze(Object.defineProperty({__proto__:null,PreviousButtonComponent:g,selector:"previous-button"},Symbol.toStringTag,{value:"Module"})),Q=`<button part="button">
23
+ `,Z="button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}",k=new CSSStyleSheet;k.replaceSync(Z);class m extends i{static _disabledAttribute="disabled";static _titleAttribute="title";constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(k),this.command=p.CLOSE}static get observedAttributes(){return i.observedAttributes}connectedCallback(){this._render(),this._addEventListeners(),this._updateTitle()}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),t===m._disabledAttribute&&this._updateTitle()}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=Q,this._syncAttributes())}_updateTitle(){const t=this.shadowRoot?.querySelector("button");t!==null&&(this.disabled?t.removeAttribute(m._titleAttribute):t.setAttribute(m._titleAttribute,"Previous"))}}const tt=Object.freeze(Object.defineProperty({__proto__:null,PreviousButtonComponent:m,selector:"previous-button"},Symbol.toStringTag,{value:"Module"})),et=`<button part="button">
24
24
  <span class="material-symbols-outlined">chevron_right</span>
25
25
  </button>
26
- `,Z="button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}",N=new CSSStyleSheet;N.replaceSync(Z);class m extends i{static _disabledAttribute="disabled";static _titleAttribute="title";constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(N),this.command=v.CLOSE}static get observedAttributes(){return i.observedAttributes}connectedCallback(){this._render(),this._addEventListeners(),this._updateTitle()}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),t===m._disabledAttribute&&this._updateTitle()}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=Q,this._syncAttributes())}_updateTitle(){const t=this.shadowRoot?.querySelector("button");t!==null&&(this.disabled?t.removeAttribute(m._titleAttribute):t.setAttribute(m._titleAttribute,"Next"))}}const tt=Object.freeze(Object.defineProperty({__proto__:null,NextButtonComponent:m,selector:"next-button"},Symbol.toStringTag,{value:"Module"})),et=`<dialog part="dialog">
26
+ `,it="button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}",C=new CSSStyleSheet;C.replaceSync(it);class _ extends i{static _disabledAttribute="disabled";static _titleAttribute="title";constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(C),this.command=p.CLOSE}static get observedAttributes(){return i.observedAttributes}connectedCallback(){this._render(),this._addEventListeners(),this._updateTitle()}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),t===_._disabledAttribute&&this._updateTitle()}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=et,this._syncAttributes())}_updateTitle(){const t=this.shadowRoot?.querySelector("button");t!==null&&(this.disabled?t.removeAttribute(_._titleAttribute):t.setAttribute(_._titleAttribute,"Next"))}}const st=Object.freeze(Object.defineProperty({__proto__:null,NextButtonComponent:_,selector:"next-button"},Symbol.toStringTag,{value:"Module"})),rt=`<dialog part="dialog">
27
27
  <slot></slot>
28
28
  </dialog>
29
- `,it="dialog{background-color:var(--color-bg-primary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-xl);padding:var(--spacing-4);max-width:90vw;max-height:90vh;font-family:var(--font-family-base);line-height:var(--line-height-normal);font-size:var(--font-size-sm);box-shadow:var(--shadow-2xl);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:slideIn var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog.closing{animation:slideOut var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog::backdrop{background:var(--window-backdrop);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn var(--transition-base) ease-out forwards}dialog.closing::backdrop{animation:fadeOut var(--transition-base) ease-out forwards}@keyframes slideIn{0%{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.95) translateY(-20px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}",C=new CSSStyleSheet;C.replaceSync(it);class b extends HTMLElement{static closedByAttribute="closedby";_closedBy=S.ANY;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(C)}static get observedAttributes(){return[b.closedByAttribute]}get dialogElement(){return this.shadowRoot?.querySelector("dialog")}get command(){return this.getAttribute(b.closedByAttribute)??S.ANY}get closedBy(){return this._closedBy}set closedBy(t){this._closedBy=t,this.setAttribute(b.closedByAttribute,t)}connectedCallback(){this._render(),this._addEventListeners()}disconnectedCallback(){this._removeEventListeners()}attributeChangedCallback(t,e,s){const r=this.dialogElement;r!=null&&s!==e&&this._syncAttribute(t)}_addEventListeners(){}_removeEventListeners(){}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=et,this._syncAttributes())}_syncAttribute(t){const e=this.dialogElement;e!=null&&(this.hasAttribute(t)===!0?e.setAttribute(t,this.getAttribute(t)??n):e.removeAttribute(t))}_syncAttributes(){b.observedAttributes.forEach(t=>{this._syncAttribute(t)})}show(){this.dialogElement.show()}showModal(){this.dialogElement.showModal()}close(t){const e=this.dialogElement;e.classList.add("closing"),setTimeout(()=>{e.close(t),e.classList.remove("closing")},300)}}const st=Object.freeze(Object.defineProperty({__proto__:null,BaseDialogComponent:b,selector:"base-dialog"},Symbol.toStringTag,{value:"Module"})),rt=`<dialog part="dialog">
29
+ `,nt="dialog{background-color:var(--color-bg-primary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-xl);padding:var(--spacing-4);max-width:90vw;max-height:90vh;font-family:var(--font-family-base);line-height:var(--line-height-normal);font-size:var(--font-size-sm);box-shadow:var(--shadow-2xl);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:slideIn var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog.closing{animation:slideOut var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog::backdrop{background:var(--window-backdrop);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn var(--transition-base) ease-out forwards}dialog.closing::backdrop{animation:fadeOut var(--transition-base) ease-out forwards}@keyframes slideIn{0%{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.95) translateY(-20px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}",M=new CSSStyleSheet;M.replaceSync(nt);class v extends HTMLElement{static closedByAttribute="closedby";_closedBy=w.ANY;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(M)}static get observedAttributes(){return[v.closedByAttribute]}get dialogElement(){return this.shadowRoot?.querySelector("dialog")}get command(){return this.getAttribute(v.closedByAttribute)??w.ANY}get closedBy(){return this._closedBy}set closedBy(t){this._closedBy=t,this.setAttribute(v.closedByAttribute,t)}connectedCallback(){this._render(),this._addEventListeners()}disconnectedCallback(){this._removeEventListeners()}attributeChangedCallback(t,e,s){const r=this.dialogElement;r!=null&&s!==e&&this._syncAttribute(t)}_addEventListeners(){}_removeEventListeners(){}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=rt,this._syncAttributes())}_syncAttribute(t){const e=this.dialogElement;e!=null&&(this.hasAttribute(t)===!0?e.setAttribute(t,this.getAttribute(t)??n):e.removeAttribute(t))}_syncAttributes(){v.observedAttributes.forEach(t=>{this._syncAttribute(t)})}show(){this.dialogElement.show()}showModal(){this.dialogElement.showModal()}close(t){const e=this.dialogElement;e.classList.add("closing"),setTimeout(()=>{e.close(t),e.classList.remove("closing")},300)}}const ot=Object.freeze(Object.defineProperty({__proto__:null,BaseDialogComponent:v,selector:"base-dialog"},Symbol.toStringTag,{value:"Module"})),at=`<dialog part="dialog">
30
30
  <header part="header">
31
31
  <h2></h2>
32
32
  </header>
@@ -38,7 +38,7 @@
38
38
  <undo-button></undo-button>
39
39
  </footer>
40
40
  </dialog>
41
- `,nt="dialog header[part=header] h2{margin:0;padding:0}dialog div[part=body] p{margin:0;padding:0}dialog footer[part=footer]{display:flex;gap:var(--gap-md);justify-content:flex-end}",ot=`<dialog part="dialog">
41
+ `,lt="dialog header[part=header] h2{margin:0;padding:0}dialog div[part=body] p{margin:0;padding:0}dialog footer[part=footer]{display:flex;gap:var(--gap-md);justify-content:flex-end}",dt=`<dialog part="dialog">
42
42
  <header part="header">
43
43
  <slot name="header"></slot>
44
44
  </header>
@@ -49,7 +49,7 @@
49
49
  <slot name="footer"></slot>
50
50
  </footer>
51
51
  </dialog>
52
- `,at='dialog[open]{display:flex;flex-direction:column;gap:var(--spacing-4)}dialog>[part]{position:relative}dialog>[part][hidden]{display:none}dialog>[part][data-divider=true]:after{content:"";position:absolute;left:0;right:0;bottom:0;border-bottom:var(--border-width-1) solid var(--color-neutral-600)}dialog>[part][data-divider=true]{padding-bottom:var(--spacing-4)}dialog div[part=body]{flex:1;min-height:0}',M=new CSSStyleSheet;M.replaceSync(at);class E extends b{_sectionNames=["header","body","footer"];_handleSlotChange=()=>{this._updateSectionState()};constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(M)}static get observedAttributes(){return b.observedAttributes}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=ot,this._syncAttributes())}_addEventListeners(){super._addEventListeners(),this.shadowRoot!==null&&(this.shadowRoot.querySelectorAll("slot").forEach(t=>{t.addEventListener("slotchange",this._handleSlotChange)}),this._updateSectionState())}_removeEventListeners(){super._removeEventListeners(),this.shadowRoot!==null&&this.shadowRoot.querySelectorAll("slot").forEach(t=>{t.removeEventListener("slotchange",this._handleSlotChange)})}_updateSectionState(){if(this.shadowRoot===null)return;const t=[];this._sectionNames.forEach(e=>{const s=this.shadowRoot?.querySelector(`[part='${e}']`),r=this.shadowRoot?.querySelector(`slot[name='${e}']`);if(s===null||r===null)return;const o=r.assignedNodes({flatten:!0}).some(u=>u.nodeType===Node.TEXT_NODE?u.textContent?.trim().length!==0:u.nodeType===Node.ELEMENT_NODE);s.toggleAttribute("hidden",o===!1),s.dataset.filled=String(o),s.removeAttribute("data-divider"),o===!0&&t.push(s)}),t.slice(0,-1).forEach(e=>{e.dataset.divider="true"})}}const T=new CSSStyleSheet;T.replaceSync(nt);class d extends E{_headline=n;_text=n;_value;static textAttribute="text";static headlineAttribute="headline";static valueAttribute="value";constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(T)}static get observedAttributes(){return[...E.observedAttributes,d.textAttribute,d.headlineAttribute,d.valueAttribute]}get headline(){return this._headline}set headline(t){this._headline=t,this.setAttribute(d.headlineAttribute,t)}get text(){return this._text}set text(t){this._text=t,this.setAttribute(d.textAttribute,t)}get value(){return this._value}set value(t){this._value=t}connectedCallback(){this._render(),this._addEventListeners(),this.closedBy=S.NONE}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=rt,this._syncAttributes())}_syncAttribute(t){if(d.observedAttributes.includes(t))switch(t){case d.headlineAttribute:{this._headline=this.getAttribute(t)??n;const e=this.shadowRoot?.querySelector("h2");e!=null&&(e.textContent=this._headline);break}case d.textAttribute:{this._text=this.getAttribute(t)??n;const e=this.shadowRoot?.querySelector("p");e!=null&&(e.textContent=this._text);break}case d.valueAttribute:{this._value=this.getAttribute(t);break}default:super._syncAttribute(t)}else super._syncAttribute(t)}_syncAttributes(){super._syncAttributes(),d.observedAttributes.forEach(t=>{this._syncAttribute(t)})}_addEventListeners(){super._addEventListeners(),this.shadowRoot?.querySelector(w)?.addEventListener(p.CLICK,this._handleConfirm)}_removeEventListeners(){super._removeEventListeners(),this.shadowRoot?.querySelector(w)?.removeEventListener(p.CLICK,this._handleConfirm)}_handleConfirm=()=>{const t=new CustomEvent(A.CONFIRMATION_DIALOG_CONFIRM,{bubbles:!0,composed:!0,detail:{value:this._value}});this.dispatchEvent(t)}}const lt="confirmation-dialog",ut={CONFIRMATION_DIALOG_CONFIRM:A.CONFIRMATION_DIALOG_CONFIRM},dt=Object.freeze(Object.defineProperty({__proto__:null,COMPONENT_CUSTOM_MESSAGES:ut,ConfirmationDialogComponent:d,selector:lt},Symbol.toStringTag,{value:"Module"})),ct=Object.freeze(Object.defineProperty({__proto__:null,HeaderBodyFooterDialogComponent:E,selector:"header-body-footer-dialog"},Symbol.toStringTag,{value:"Module"})),ht=`<div class="bar-menu-container">
52
+ `,ut='dialog[open]{display:flex;flex-direction:column;gap:var(--spacing-4)}dialog>[part]{position:relative}dialog>[part][hidden]{display:none}dialog>[part][data-divider=true]:after{content:"";position:absolute;left:0;right:0;bottom:0;border-bottom:var(--border-width-1) solid var(--color-neutral-600)}dialog>[part][data-divider=true]{padding-bottom:var(--spacing-4)}dialog div[part=body]{flex:1;min-height:0}',T=new CSSStyleSheet;T.replaceSync(ut);class x extends v{_sectionNames=["header","body","footer"];_handleSlotChange=()=>{this._updateSectionState()};constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(T)}static get observedAttributes(){return v.observedAttributes}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=dt,this._syncAttributes())}_addEventListeners(){super._addEventListeners(),this.shadowRoot!==null&&(this.shadowRoot.querySelectorAll("slot").forEach(t=>{t.addEventListener("slotchange",this._handleSlotChange)}),this._updateSectionState())}_removeEventListeners(){super._removeEventListeners(),this.shadowRoot!==null&&this.shadowRoot.querySelectorAll("slot").forEach(t=>{t.removeEventListener("slotchange",this._handleSlotChange)})}_updateSectionState(){if(this.shadowRoot===null)return;const t=[];this._sectionNames.forEach(e=>{const s=this.shadowRoot?.querySelector(`[part='${e}']`),r=this.shadowRoot?.querySelector(`slot[name='${e}']`);if(s===null||r===null)return;const o=r.assignedNodes({flatten:!0}).some(d=>d.nodeType===Node.TEXT_NODE?d.textContent?.trim().length!==0:d.nodeType===Node.ELEMENT_NODE);s.toggleAttribute("hidden",o===!1),s.dataset.filled=String(o),s.removeAttribute("data-divider"),o===!0&&t.push(s)}),t.slice(0,-1).forEach(e=>{e.dataset.divider="true"})}}const $=new CSSStyleSheet;$.replaceSync(lt);class u extends x{_headline=n;_text=n;_value=void 0;static textAttribute="text";static headlineAttribute="headline";static valueAttribute="value";constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push($)}static get observedAttributes(){return[...x.observedAttributes,u.textAttribute,u.headlineAttribute,u.valueAttribute]}get headline(){return this._headline}set headline(t){this._headline=t,this.setAttribute(u.headlineAttribute,t)}get text(){return this._text}set text(t){this._text=t,this.setAttribute(u.textAttribute,t)}get value(){return this._value}set value(t){this._value=t}connectedCallback(){this._render(),this._addEventListeners(),this.closedBy=w.NONE}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=at,this._syncAttributes())}_syncAttribute(t){if(u.observedAttributes.includes(t))switch(t){case u.headlineAttribute:{this._headline=this.getAttribute(t)??n;const e=this.shadowRoot?.querySelector("h2");e!=null&&(e.textContent=this._headline);break}case u.textAttribute:{this._text=this.getAttribute(t)??n;const e=this.shadowRoot?.querySelector("p");e!=null&&(e.textContent=this._text);break}case u.valueAttribute:{this._value=this.getAttribute(t);break}default:super._syncAttribute(t)}else super._syncAttribute(t)}_syncAttributes(){super._syncAttributes(),u.observedAttributes.forEach(t=>{this._syncAttribute(t)})}_addEventListeners(){super._addEventListeners(),this.shadowRoot?.querySelector(L)?.addEventListener(b.CLICK,this._handleConfirm),this.shadowRoot?.querySelector(E)?.addEventListener(b.CLICK,this._handleUndo)}_removeEventListeners(){super._removeEventListeners(),this.shadowRoot?.querySelector(L)?.removeEventListener(b.CLICK,this._handleConfirm),this.shadowRoot?.querySelector(E)?.removeEventListener(b.CLICK,this._handleUndo)}_handleConfirm=()=>{const t=new CustomEvent(g.CONFIRMATION_DIALOG_CONFIRM,{bubbles:!0,composed:!0,detail:{value:this._value}});this.dispatchEvent(t)};_handleUndo=()=>{const t=new CustomEvent(g.CONFIRMATION_DIALOG_UNDO,{bubbles:!0,composed:!0,detail:{value:this._value}});this.dispatchEvent(t),this._value=void 0}}const ct="confirmation-dialog",ht={CONFIRMATION_DIALOG_CONFIRM:g.CONFIRMATION_DIALOG_CONFIRM,CONFIRMATION_DIALOG_UNDO:g.CONFIRMATION_DIALOG_UNDO},bt=Object.freeze(Object.defineProperty({__proto__:null,COMPONENT_CUSTOM_MESSAGES:ht,ConfirmationDialogComponent:u,selector:ct},Symbol.toStringTag,{value:"Module"})),vt=Object.freeze(Object.defineProperty({__proto__:null,HeaderBodyFooterDialogComponent:x,selector:"header-body-footer-dialog"},Symbol.toStringTag,{value:"Module"})),pt=`<div class="bar-menu-container">
53
53
  <previous-button class="nav-prev" part="nav-prev-button"></previous-button>
54
54
 
55
55
  <div class="buttons-wrapper" part="buttons-wrapper">
@@ -58,4 +58,4 @@
58
58
 
59
59
  <next-button class="nav-next" part="nav-next-button"></next-button>
60
60
  </div>
61
- `,bt=":host{display:block;width:100%}.bar-menu-container{display:flex;align-items:center;justify-content:space-between;height:100%;gap:var(--gap-sm);padding:var(--spacing-1);background:var(--color-bg-primary);border-radius:var(--border-radius-full);border:var(--border-width-2) solid var(--color-border-secondary);box-shadow:var(--shadow-sm);margin:0 auto}.bar-menu-container .nav-prev,.bar-menu-container .nav-next{flex-shrink:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.bar-menu-container .nav-prev.visible,.bar-menu-container .nav-next.visible{opacity:1;visibility:visible;pointer-events:auto}.bar-menu-container .nav-prev::part(button),.bar-menu-container .nav-next::part(button){background-color:transparent;box-shadow:none}.bar-menu-container .buttons-wrapper{display:grid;grid-template-columns:repeat(var(--bar-menu-visible-count, 3),1fr);grid-auto-rows:max-content;align-items:center;justify-items:center;gap:var(--gap-sm);overflow:hidden;position:relative;width:auto}::slotted(*){display:none;flex-shrink:0;will-change:opacity,transform;contain:layout style paint;opacity:0;transform:scale(.8)}::slotted(.animating){transition:opacity .4s cubic-bezier(.34,1.56,.64,1),transform .4s cubic-bezier(.34,1.56,.64,1)}::slotted(.visible-button){display:inline-flex!important;pointer-events:auto;opacity:1;transform:scale(1)}",$=new CSSStyleSheet;$.replaceSync(bt);class h extends HTMLElement{static _visibleCountAttribute="visible-count";static _cyclicalNavigationAttribute="cyclical-navigation";_currentIndex=0;_visibleCount=3;_cyclicalNavigation=!1;_MIN_VISIBLE=1;_MAX_VISIBLE=5;_slotElement=null;_navPrevButton=null;_navNextButton=null;_buttonsWrapper=null;_slotChangeListener=null;_keyDownListener=null;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push($)}static get observedAttributes(){return[h._visibleCountAttribute,h._cyclicalNavigationAttribute]}get visibleButtons(){const t=this.getAttribute(h._visibleCountAttribute);if(t!==null&&t!==n){const e=parseInt(t,10);return Math.max(this._MIN_VISIBLE,Math.min(this._MAX_VISIBLE,e))}return this._visibleCount}set visibleButtons(t){const e=Math.max(this._MIN_VISIBLE,Math.min(this._MAX_VISIBLE,t));this.setAttribute(h._visibleCountAttribute,String(e))}get cyclicalNavigation(){return this.hasAttribute(h._cyclicalNavigationAttribute)}set cyclicalNavigation(t){t?this.setAttribute(h._cyclicalNavigationAttribute,n):this.removeAttribute(h._cyclicalNavigationAttribute)}connectedCallback(){this._render(),this._cacheElements(),this._setupSlotListener(),this._setupKeyboardListener(),this._updateButtonVisibility()}disconnectedCallback(){this._removeSlotListener(),this._removeKeyboardListener()}attributeChangedCallback(t,e,s){t===h._visibleCountAttribute?(this._visibleCount=this.visibleButtons,this._buttonsWrapper!==null&&this._buttonsWrapper.style.setProperty("--bar-menu-visible-count",String(this.visibleButtons)),this._updateButtonVisibility()):t===h._cyclicalNavigationAttribute&&(this._cyclicalNavigation=this.cyclicalNavigation,this._updateButtonVisibility())}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=ht)}_cacheElements(){this._slotElement=this.shadowRoot?.querySelector("slot")??null,this._navPrevButton=this.shadowRoot?.querySelector(".nav-prev")??null,this._navNextButton=this.shadowRoot?.querySelector(".nav-next")??null,this._buttonsWrapper=this.shadowRoot?.querySelector(".buttons-wrapper")??null,this._buttonsWrapper!==null&&this._buttonsWrapper.style.setProperty("--bar-menu-visible-count",String(this.visibleButtons)),this._navPrevButton!==null&&(this._navPrevButton.setAttribute("aria-label","Previous"),this._navPrevButton.addEventListener(p.CLICK,()=>{this._scrollPrevious()})),this._navNextButton!==null&&(this._navNextButton.setAttribute("aria-label","Next"),this._navNextButton.addEventListener(p.CLICK,()=>{this._scrollNext()}))}_setupSlotListener(){this._slotElement!==null&&(this._slotChangeListener=()=>{this._currentIndex=0,this._updateButtonVisibility()},this._slotElement.addEventListener("slotchange",this._slotChangeListener))}_removeSlotListener(){this._slotElement!==null&&this._slotChangeListener!==null&&this._slotElement.removeEventListener("slotchange",this._slotChangeListener)}_setupKeyboardListener(){this._keyDownListener=t=>{t.key==="ArrowLeft"?(t.preventDefault(),this._scrollPrevious()):t.key==="ArrowRight"&&(t.preventDefault(),this._scrollNext())},this.addEventListener(x.KEY_DOWN,this._keyDownListener)}_removeKeyboardListener(){this._keyDownListener!==null&&this.removeEventListener(x.KEY_DOWN,this._keyDownListener)}_getSlottedButtons(){return this._slotElement===null?[]:this._slotElement.assignedElements()}_updateButtonVisibility(t){const e=this._getSlottedButtons(),s=e.length,r=this.visibleButtons,o=this._currentIndex,u=Math.min(o+r,s);e.forEach((a,c)=>{const _=c>=o&&c<u,y=a;_||(a.classList.remove("visible-button"),a.classList.remove("animating"),y.style.display="none")}),t!==void 0?(e[0]?.offsetHeight,e.forEach((a,c)=>{if(c>=o&&c<u){const y=a;y.style.display="inline-flex",a.classList.add("animating");const pt=c%this.visibleButtons*50;y.style.transitionDelay=`${pt}ms`}}),e[0]?.offsetHeight,e.forEach((a,c)=>{c>=o&&c<u&&a.classList.add("visible-button")}),setTimeout(()=>{e.forEach(a=>{a.classList.remove("animating"),a.style.transitionDelay=n})},400)):e.forEach((a,c)=>{const _=c>=o&&c<u,y=a;_&&(y.style.display="inline-flex",a.classList.add("visible-button"))}),this._updateNavigationButtons(s,r)}_updateNavigationButtons(t,e){const s=t>e,r=this._currentIndex+e<t,o=this._currentIndex===0,u=!r;this._navPrevButton!==null&&(s?(this._navPrevButton.classList.add("visible"),this._navPrevButton.disabled=!this._cyclicalNavigation&&o):this._navPrevButton.classList.remove("visible")),this._navNextButton!==null&&(s?(this._navNextButton.classList.add("visible"),this._navNextButton.disabled=!this._cyclicalNavigation&&u):this._navNextButton.classList.remove("visible"))}_scrollPrevious(){const t=this._getSlottedButtons().length,e=this.visibleButtons;this._currentIndex>0?(this._currentIndex=Math.max(0,this._currentIndex-e),this._updateButtonVisibility("previous")):this._cyclicalNavigation&&t>e&&(this._currentIndex=Math.max(0,t-e),this._updateButtonVisibility("previous"))}_scrollNext(){const t=this._getSlottedButtons().length,e=this.visibleButtons,s=this._currentIndex+e;s<t?(this._currentIndex=s,this._updateButtonVisibility("next")):this._cyclicalNavigation&&t>e&&(this._currentIndex=0,this._updateButtonVisibility("next"))}scrollToButton(t){const e=this._getSlottedButtons().length,s=this.visibleButtons;t>=0&&t<e&&(this._currentIndex=Math.max(0,Math.min(t,e-s)),this._updateButtonVisibility())}getVisibleButtons(){return this._getSlottedButtons().filter(t=>t.classList.contains("visible-button"))}getAllButtons(){return this._getSlottedButtons()}getCurrentIndex(){return this._currentIndex}}const vt=Object.freeze(Object.defineProperty({__proto__:null,BarMenuComponent:h,selector:"bar-menu"},Symbol.toStringTag,{value:"Module"}));l.APPLICATION_NAME=f,l.BarMenu=vt,l.BaseButton=z,l.BaseDialog=st,l.CUSTOM_MESSAGES=A,l.ConfirmButton=Y,l.ConfirmationDialog=dt,l.HeaderBodyFooterDialog=ct,l.NextButton=tt,l.PreviousButton=J,l.UndoButton=F,l.WebComponentsRegistry=P,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
61
+ `,yt=":host{display:block;width:100%}.bar-menu-container{display:flex;align-items:center;justify-content:space-between;height:100%;gap:var(--gap-sm);padding:var(--spacing-1);background:var(--color-bg-primary);border-radius:var(--border-radius-full);border:var(--border-width-2) solid var(--color-border-secondary);box-shadow:var(--shadow-sm);margin:0 auto}.bar-menu-container .nav-prev,.bar-menu-container .nav-next{flex-shrink:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.bar-menu-container .nav-prev.visible,.bar-menu-container .nav-next.visible{opacity:1;visibility:visible;pointer-events:auto}.bar-menu-container .nav-prev::part(button),.bar-menu-container .nav-next::part(button){background-color:transparent;box-shadow:none}.bar-menu-container .buttons-wrapper{display:grid;grid-template-columns:repeat(var(--bar-menu-visible-count, 3),1fr);grid-auto-rows:max-content;align-items:center;justify-items:center;gap:var(--gap-sm);overflow:hidden;position:relative;width:auto}::slotted(*){display:none;flex-shrink:0;will-change:opacity,transform;contain:layout style paint;opacity:0;transform:scale(.8)}::slotted(.animating){transition:opacity .4s cubic-bezier(.34,1.56,.64,1),transform .4s cubic-bezier(.34,1.56,.64,1)}::slotted(.visible-button){display:inline-flex!important;pointer-events:auto;opacity:1;transform:scale(1)}",P=new CSSStyleSheet;P.replaceSync(yt);class h extends HTMLElement{static _visibleCountAttribute="visible-count";static _cyclicalNavigationAttribute="cyclical-navigation";_currentIndex=0;_visibleCount=3;_cyclicalNavigation=!1;_MIN_VISIBLE=1;_MAX_VISIBLE=5;_slotElement=null;_navPrevButton=null;_navNextButton=null;_buttonsWrapper=null;_slotChangeListener=null;_keyDownListener=null;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(P)}static get observedAttributes(){return[h._visibleCountAttribute,h._cyclicalNavigationAttribute]}get visibleButtons(){const t=this.getAttribute(h._visibleCountAttribute);if(t!==null&&t!==n){const e=parseInt(t,10);return Math.max(this._MIN_VISIBLE,Math.min(this._MAX_VISIBLE,e))}return this._visibleCount}set visibleButtons(t){const e=Math.max(this._MIN_VISIBLE,Math.min(this._MAX_VISIBLE,t));this.setAttribute(h._visibleCountAttribute,String(e))}get cyclicalNavigation(){return this.hasAttribute(h._cyclicalNavigationAttribute)}set cyclicalNavigation(t){t?this.setAttribute(h._cyclicalNavigationAttribute,n):this.removeAttribute(h._cyclicalNavigationAttribute)}connectedCallback(){this._render(),this._cacheElements(),this._setupSlotListener(),this._setupKeyboardListener(),this._updateButtonVisibility()}disconnectedCallback(){this._removeSlotListener(),this._removeKeyboardListener()}attributeChangedCallback(t,e,s){t===h._visibleCountAttribute?(this._visibleCount=this.visibleButtons,this._buttonsWrapper!==null&&this._buttonsWrapper.style.setProperty("--bar-menu-visible-count",String(this.visibleButtons)),this._updateButtonVisibility()):t===h._cyclicalNavigationAttribute&&(this._cyclicalNavigation=this.cyclicalNavigation,this._updateButtonVisibility())}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=pt)}_cacheElements(){this._slotElement=this.shadowRoot?.querySelector("slot")??null,this._navPrevButton=this.shadowRoot?.querySelector(".nav-prev")??null,this._navNextButton=this.shadowRoot?.querySelector(".nav-next")??null,this._buttonsWrapper=this.shadowRoot?.querySelector(".buttons-wrapper")??null,this._buttonsWrapper!==null&&this._buttonsWrapper.style.setProperty("--bar-menu-visible-count",String(this.visibleButtons)),this._navPrevButton!==null&&(this._navPrevButton.setAttribute("aria-label","Previous"),this._navPrevButton.addEventListener(b.CLICK,()=>{this._scrollPrevious()})),this._navNextButton!==null&&(this._navNextButton.setAttribute("aria-label","Next"),this._navNextButton.addEventListener(b.CLICK,()=>{this._scrollNext()}))}_setupSlotListener(){this._slotElement!==null&&(this._slotChangeListener=()=>{this._currentIndex=0,this._updateButtonVisibility()},this._slotElement.addEventListener("slotchange",this._slotChangeListener))}_removeSlotListener(){this._slotElement!==null&&this._slotChangeListener!==null&&this._slotElement.removeEventListener("slotchange",this._slotChangeListener)}_setupKeyboardListener(){this._keyDownListener=t=>{t.key==="ArrowLeft"?(t.preventDefault(),this._scrollPrevious()):t.key==="ArrowRight"&&(t.preventDefault(),this._scrollNext())},this.addEventListener(I.KEY_DOWN,this._keyDownListener)}_removeKeyboardListener(){this._keyDownListener!==null&&this.removeEventListener(I.KEY_DOWN,this._keyDownListener)}_getSlottedButtons(){return this._slotElement===null?[]:this._slotElement.assignedElements()}_updateButtonVisibility(t){const e=this._getSlottedButtons(),s=e.length,r=this.visibleButtons,o=this._currentIndex,d=Math.min(o+r,s);e.forEach((a,c)=>{const S=c>=o&&c<d,y=a;S||(a.classList.remove("visible-button"),a.classList.remove("animating"),y.style.display="none")}),t!==void 0?(e[0]?.offsetHeight,e.forEach((a,c)=>{if(c>=o&&c<d){const y=a;y.style.display="inline-flex",a.classList.add("animating");const gt=c%this.visibleButtons*50;y.style.transitionDelay=`${gt}ms`}}),e[0]?.offsetHeight,e.forEach((a,c)=>{c>=o&&c<d&&a.classList.add("visible-button")}),setTimeout(()=>{e.forEach(a=>{a.classList.remove("animating"),a.style.transitionDelay=n})},400)):e.forEach((a,c)=>{const S=c>=o&&c<d,y=a;S&&(y.style.display="inline-flex",a.classList.add("visible-button"))}),this._updateNavigationButtons(s,r)}_updateNavigationButtons(t,e){const s=t>e,r=this._currentIndex+e<t,o=this._currentIndex===0,d=!r;this._navPrevButton!==null&&(s?(this._navPrevButton.classList.add("visible"),this._navPrevButton.disabled=!this._cyclicalNavigation&&o):this._navPrevButton.classList.remove("visible")),this._navNextButton!==null&&(s?(this._navNextButton.classList.add("visible"),this._navNextButton.disabled=!this._cyclicalNavigation&&d):this._navNextButton.classList.remove("visible"))}_scrollPrevious(){const t=this._getSlottedButtons().length,e=this.visibleButtons;this._currentIndex>0?(this._currentIndex=Math.max(0,this._currentIndex-e),this._updateButtonVisibility("previous")):this._cyclicalNavigation&&t>e&&(this._currentIndex=Math.max(0,t-e),this._updateButtonVisibility("previous"))}_scrollNext(){const t=this._getSlottedButtons().length,e=this.visibleButtons,s=this._currentIndex+e;s<t?(this._currentIndex=s,this._updateButtonVisibility("next")):this._cyclicalNavigation&&t>e&&(this._currentIndex=0,this._updateButtonVisibility("next"))}scrollToButton(t){const e=this._getSlottedButtons().length,s=this.visibleButtons;t>=0&&t<e&&(this._currentIndex=Math.max(0,Math.min(t,e-s)),this._updateButtonVisibility())}getVisibleButtons(){return this._getSlottedButtons().filter(t=>t.classList.contains("visible-button"))}getAllButtons(){return this._getSlottedButtons()}getCurrentIndex(){return this._currentIndex}}const ft=Object.freeze(Object.defineProperty({__proto__:null,BarMenuComponent:h,selector:"bar-menu"},Symbol.toStringTag,{value:"Module"}));l.APPLICATION_NAME=f,l.BarMenu=ft,l.BaseButton=U,l.BaseDialog=ot,l.CUSTOM_MESSAGES=g,l.ConfirmButton=J,l.ConfirmationDialog=bt,l.HeaderBodyFooterDialog=vt,l.NextButton=st,l.PreviousButton=tt,l.UndoButton=W,l.WebComponentsRegistry=H,l.switchTheme=D,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
@@ -3,4 +3,5 @@
3
3
  */
4
4
  export declare const CUSTOM_MESSAGES: {
5
5
  CONFIRMATION_DIALOG_CONFIRM: string;
6
+ CONFIRMATION_DIALOG_UNDO: string;
6
7
  };
@@ -2,6 +2,7 @@ import { APPLICATION_NAME } from './constants/application.constant.ts';
2
2
  export { APPLICATION_NAME };
3
3
  export { WebComponentsRegistry } from './web-components/registry.ts';
4
4
  export { CUSTOM_MESSAGES } from './constants/custom-messages.const.ts';
5
+ export { switchTheme } from './utils/switch-theme.utils.ts';
5
6
  export * as BaseButton from './web-components/buttons/base-button/main.ts';
6
7
  export * as UndoButton from './web-components/buttons/undo-button/main.ts';
7
8
  export * as ConfirmButton from './web-components/buttons/confirm-button/main.ts';
@@ -0,0 +1,6 @@
1
+ import { THEMES } from '@albi_scando/as-const-lib';
2
+ /**
3
+ * Utility function to switch the theme of the application by manipulating the body class.
4
+ * @param theme The theme to apply.
5
+ */
6
+ export declare const switchTheme: (theme: (typeof THEMES)[keyof typeof THEMES]) => void;
@@ -43,8 +43,8 @@ export declare class ConfirmationDialogComponent<T> extends HeaderBodyFooterDial
43
43
  set headline(value: string);
44
44
  get text(): string;
45
45
  set text(value: string);
46
- get value(): T;
47
- set value(value: T);
46
+ get value(): T | undefined;
47
+ set value(value: T | undefined);
48
48
  /**
49
49
  * Lifecycle hook invoked when the component is inserted into the DOM.
50
50
  *
@@ -91,4 +91,5 @@ export declare class ConfirmationDialogComponent<T> extends HeaderBodyFooterDial
91
91
  * @returns {void}
92
92
  */
93
93
  private _handleConfirm;
94
+ private _handleUndo;
94
95
  }
@@ -3,4 +3,5 @@
3
3
  */
4
4
  export declare const COMPONENT_CUSTOM_MESSAGES: {
5
5
  CONFIRMATION_DIALOG_CONFIRM: string;
6
+ CONFIRMATION_DIALOG_UNDO: string;
6
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@albi_scando/as-design-system-lib",
3
- "version": "1.6.6",
3
+ "version": "1.7.1",
4
4
  "description": "A library of reusable, strongly typed Web Components built with TypeScript, designed for creating consistent and maintainable user interfaces.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -55,8 +55,8 @@
55
55
  "@semantic-release/git": "^10.0.1",
56
56
  "@semantic-release/github": "^12.0.3",
57
57
  "@semantic-release/npm": "^13.1.3",
58
- "@storybook/addon-docs": "10.2.19",
59
- "@storybook/html-vite": "10.2.19",
58
+ "@storybook/addon-docs": "10.3.0",
59
+ "@storybook/html-vite": "10.3.0",
60
60
  "@types/node": "^25.2.1",
61
61
  "@types/numeric": "^1.2.6",
62
62
  "@vitest/coverage-v8": "^4.0.18",
@@ -69,7 +69,7 @@
69
69
  "eslint-plugin-prettier": "^5.5.5",
70
70
  "eslint-plugin-regexp": "^3.0.0",
71
71
  "eslint-plugin-security": "^3.0.1",
72
- "eslint-plugin-storybook": "10.2.19",
72
+ "eslint-plugin-storybook": "10.3.0",
73
73
  "globals": "^17.3.0",
74
74
  "http-server": "^14.1.1",
75
75
  "husky": "^9.1.7",
@@ -77,7 +77,7 @@
77
77
  "prettier": "3.8.1",
78
78
  "sass": "^1.97.3",
79
79
  "semantic-release": "^25.0.3",
80
- "storybook": "10.2.19",
80
+ "storybook": "10.3.0",
81
81
  "typedoc": "^0.28.16",
82
82
  "typescript": "^5.9.3",
83
83
  "typescript-eslint": "^8.54.0",