@editora/ui-core 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/README.md +8 -0
  2. package/dist/accordion.cjs.js +1 -1
  3. package/dist/accordion.esm.js +1 -1
  4. package/dist/alert-dialog.cjs.js +32 -24
  5. package/dist/alert-dialog.esm.js +48 -40
  6. package/dist/alert.cjs.js +2 -2
  7. package/dist/alert.esm.js +2 -2
  8. package/dist/animated-text.cjs.js +5 -5
  9. package/dist/animated-text.esm.js +5 -5
  10. package/dist/app-header.cjs.js +12 -7
  11. package/dist/app-header.esm.js +12 -7
  12. package/dist/avatar.cjs.js +3 -3
  13. package/dist/avatar.esm.js +3 -3
  14. package/dist/{calendar-o273O28D.js → calendar-CzpWDxLc.js} +5 -4
  15. package/dist/{calendar-DmxiZrR7.mjs → calendar-DkSDFg33.mjs} +1 -0
  16. package/dist/calendar.cjs.js +1 -1
  17. package/dist/calendar.esm.js +1 -1
  18. package/dist/chart.cjs.js +13 -7
  19. package/dist/chart.esm.js +13 -7
  20. package/dist/collapsible.cjs.js +2 -2
  21. package/dist/collapsible.esm.js +2 -2
  22. package/dist/color-picker.cjs.js +3 -3
  23. package/dist/color-picker.esm.js +3 -3
  24. package/dist/combobox.cjs.js +3 -3
  25. package/dist/combobox.esm.js +36 -36
  26. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  27. package/dist/components/ui-app-header.d.ts.map +1 -1
  28. package/dist/components/ui-calendar.d.ts.map +1 -1
  29. package/dist/components/ui-chart.d.ts.map +1 -1
  30. package/dist/components/ui-gantt.d.ts.map +1 -1
  31. package/dist/components/ui-hover-card.d.ts.map +1 -1
  32. package/dist/components/ui-inline-edit.d.ts.map +1 -1
  33. package/dist/components/ui-multi-select.d.ts.map +1 -1
  34. package/dist/components/ui-sidebar.d.ts.map +1 -1
  35. package/dist/components/ui-tabs.d.ts.map +1 -1
  36. package/dist/components/ui-wizard.d.ts.map +1 -1
  37. package/dist/context-menu.cjs.js +1 -1
  38. package/dist/context-menu.esm.js +1 -1
  39. package/dist/data-table.cjs.js +3 -3
  40. package/dist/data-table.esm.js +3 -3
  41. package/dist/date-field.cjs.js +2 -2
  42. package/dist/date-field.esm.js +14 -14
  43. package/dist/date-picker.cjs.js +3 -3
  44. package/dist/date-picker.esm.js +4 -4
  45. package/dist/date-range-picker.cjs.js +3 -3
  46. package/dist/date-range-picker.esm.js +59 -59
  47. package/dist/date-range-time-picker.cjs.js +2 -2
  48. package/dist/date-range-time-picker.esm.js +3 -3
  49. package/dist/date-time-picker.cjs.js +2 -2
  50. package/dist/date-time-picker.esm.js +3 -3
  51. package/dist/{date-time-utils-DdigV4hs.js → date-time-utils-C-4eHTyy.js} +1 -1
  52. package/dist/{date-time-utils-B4hAkt36.mjs → date-time-utils-zAx4ghvC.mjs} +1 -1
  53. package/dist/description.cjs.js +4 -4
  54. package/dist/description.esm.js +4 -4
  55. package/dist/dialog.cjs.js +2 -2
  56. package/dist/dialog.esm.js +2 -2
  57. package/dist/direction-provider.cjs.js +1 -1
  58. package/dist/direction-provider.esm.js +1 -1
  59. package/dist/dock.cjs.js +1 -1
  60. package/dist/dock.esm.js +1 -1
  61. package/dist/dropdown.cjs.js +1 -1
  62. package/dist/dropdown.esm.js +1 -1
  63. package/dist/field-error.cjs.js +1 -1
  64. package/dist/field-error.esm.js +7 -7
  65. package/dist/field.cjs.js +1 -1
  66. package/dist/field.esm.js +29 -29
  67. package/dist/fieldset.cjs.js +4 -4
  68. package/dist/fieldset.esm.js +3 -3
  69. package/dist/file-upload.cjs.js +2 -2
  70. package/dist/file-upload.esm.js +2 -2
  71. package/dist/flex.cjs.js +2 -2
  72. package/dist/flex.esm.js +8 -8
  73. package/dist/form.cjs.js +4 -4
  74. package/dist/form.esm.js +4 -4
  75. package/dist/gantt.cjs.js +7 -5
  76. package/dist/gantt.esm.js +7 -5
  77. package/dist/grid.cjs.js +1 -1
  78. package/dist/grid.esm.js +1 -1
  79. package/dist/hover-card.cjs.js +1 -1
  80. package/dist/hover-card.esm.js +11 -8
  81. package/dist/index.cjs.js +1 -1
  82. package/dist/index.esm.js +2 -2
  83. package/dist/inline-edit.cjs.js +6 -6
  84. package/dist/inline-edit.esm.js +15 -15
  85. package/dist/input.cjs.js +1 -1
  86. package/dist/input.esm.js +1 -1
  87. package/dist/label.cjs.js +6 -6
  88. package/dist/label.esm.js +6 -6
  89. package/dist/masonry-grid.cjs.js +2 -2
  90. package/dist/masonry-grid.esm.js +11 -11
  91. package/dist/{menu-item-styles-IGSFLAHu.mjs → menu-item-styles-CdqxPUuw.mjs} +15 -15
  92. package/dist/{menu-item-styles-B4onAr4C.js → menu-item-styles-DUdyjQ7i.js} +10 -10
  93. package/dist/menu.cjs.js +1 -1
  94. package/dist/menu.esm.js +1 -1
  95. package/dist/menubar.cjs.js +1 -1
  96. package/dist/menubar.esm.js +1 -1
  97. package/dist/multi-select.cjs.js +7 -7
  98. package/dist/multi-select.esm.js +26 -26
  99. package/dist/number-field.cjs.js +1 -1
  100. package/dist/number-field.esm.js +1 -1
  101. package/dist/number-ticker.cjs.js +4 -4
  102. package/dist/number-ticker.esm.js +10 -10
  103. package/dist/odometer.cjs.js +7 -7
  104. package/dist/odometer.esm.js +14 -14
  105. package/dist/password-field.cjs.js +1 -1
  106. package/dist/password-field.esm.js +1 -1
  107. package/dist/pin-input.cjs.js +1 -1
  108. package/dist/pin-input.esm.js +1 -1
  109. package/dist/placement-grid.cjs.js +1 -1
  110. package/dist/placement-grid.esm.js +1 -1
  111. package/dist/portal.cjs.js +1 -1
  112. package/dist/portal.esm.js +1 -1
  113. package/dist/presence.cjs.js +1 -1
  114. package/dist/presence.esm.js +1 -1
  115. package/dist/quick-actions.cjs.js +1 -1
  116. package/dist/quick-actions.esm.js +1 -1
  117. package/dist/radio.cjs.js +1 -1
  118. package/dist/radio.esm.js +1 -1
  119. package/dist/{runtime-CQM6wZOc.mjs → runtime-CJzoaC8Z.mjs} +385 -329
  120. package/dist/runtime-DYSIU3sR.js +5 -0
  121. package/dist/runtime.cjs.js +1 -1
  122. package/dist/runtime.esm.js +1 -1
  123. package/dist/select.cjs.js +2 -2
  124. package/dist/select.esm.js +2 -2
  125. package/dist/separator.cjs.js +6 -6
  126. package/dist/separator.esm.js +7 -7
  127. package/dist/sidebar.cjs.js +7 -6
  128. package/dist/sidebar.esm.js +7 -6
  129. package/dist/slot.cjs.js +1 -1
  130. package/dist/slot.esm.js +1 -1
  131. package/dist/sortable.cjs.js +6 -6
  132. package/dist/sortable.esm.js +6 -6
  133. package/dist/split-button.cjs.js +2 -2
  134. package/dist/split-button.esm.js +2 -2
  135. package/dist/tabs.cjs.js +11 -6
  136. package/dist/tabs.esm.js +28 -23
  137. package/dist/tags-input.cjs.js +2 -2
  138. package/dist/tags-input.esm.js +2 -2
  139. package/dist/textarea.cjs.js +2 -2
  140. package/dist/textarea.esm.js +16 -16
  141. package/dist/theme.d.ts.map +1 -1
  142. package/dist/time-field.cjs.js +2 -2
  143. package/dist/time-field.esm.js +24 -24
  144. package/dist/time-picker.cjs.js +2 -2
  145. package/dist/time-picker.esm.js +3 -3
  146. package/dist/toast.cjs.js +2 -2
  147. package/dist/toast.esm.js +2 -2
  148. package/dist/transfer-list.cjs.js +9 -9
  149. package/dist/transfer-list.esm.js +4 -4
  150. package/dist/wizard.cjs.js +16 -7
  151. package/dist/wizard.esm.js +16 -7
  152. package/package.json +1 -1
  153. package/dist/runtime-DxCl0A5q.js +0 -5
package/README.md CHANGED
@@ -541,6 +541,12 @@ argument:
541
541
  Apply the theme early, before the first render. To theme one part of the page, call
542
542
  `applyTheme(tokens, element)`.
543
543
 
544
+ Theme a part of the page with `applyTheme(tokens, element)` (or `ThemeProvider` in `@editora/ui-react`), not by
545
+ setting a few `--ui-color-*` variables yourself. The fills, lines and soft accent colours that components read
546
+ (`--ui-color-fill`, `--ui-color-line`, `--ui-color-accent-fill` and the like) are derived from the whole theme, so
547
+ overriding only `--ui-color-text` and `--ui-color-surface` on an element leaves them at the page theme. If you need
548
+ plain CSS, spread `themeToVariables(tokens)` (below) onto the element instead.
549
+
544
550
  ### Follow the system light/dark setting
545
551
 
546
552
  ```js
@@ -573,6 +579,8 @@ stay on theme.
573
579
  | `--ui-color-surface-elevated`, `--ui-color-info` | raised surface (menus, popovers) and the informational colour |
574
580
  | `--ui-color-placeholder` | placeholder text (62% of the text colour, 4.5:1 or better on the field) |
575
581
  | `--ui-color-foreground-on-warning` | text on a solid warning fill: dark when the warning colour is light (amber) |
582
+ | `--ui-color-danger-text`, `-success-text`, `-warning-text`, `-info-text`, `-accent-text` | the status and accent hues as text: pulled toward the text colour until they read at 4.5:1 or better on the surface and on their own tint. The plain `--ui-color-danger` and the like are fill and icon colours (about 3-4:1 as text on white) |
583
+ | `--ui-color-danger-solid`, `-success-solid`, `--ui-color-foreground-on-danger`, `-on-success` | a solid fill that white text reads on, and that text colour |
576
584
  | `--ui-ring-color`, `--ui-ring-width`, `--ui-ring-offset` | the focus ring |
577
585
  | `--ui-control-height-{1..4}`, `--ui-control-font-size-{1..4}`, `--ui-control-padding-inline-{1..4}`, `--ui-control-radius-{1..4}` | the control scale: 24, 32, 40 and 48px (see below) |
578
586
  | `--ui-motion-enter-easing`, `--ui-motion-exit-easing` | easing for things that appear and disappear |
@@ -240,7 +240,7 @@
240
240
  text-transform: uppercase;
241
241
  line-height: 1.2;
242
242
  background: color-mix(in srgb, var(--ui-accordion-accent) 14%, transparent);
243
- color: color-mix(in srgb, var(--ui-accordion-accent) 45%, var(--ui-color-text-strong, var(--ui-accordion-text)));
243
+ color: color-mix(in srgb, var(--ui-accordion-accent) 32%, var(--ui-color-text-strong, var(--ui-accordion-text)));
244
244
  }
245
245
 
246
246
  ui-accordion[data-ui-accordion-root="true"] [data-ui-accordion-chevron] {
@@ -241,7 +241,7 @@ const p = `
241
241
  text-transform: uppercase;
242
242
  line-height: 1.2;
243
243
  background: color-mix(in srgb, var(--ui-accordion-accent) 14%, transparent);
244
- color: color-mix(in srgb, var(--ui-accordion-accent) 45%, var(--ui-color-text-strong, var(--ui-accordion-text)));
244
+ color: color-mix(in srgb, var(--ui-accordion-accent) 32%, var(--ui-color-text-strong, var(--ui-accordion-text)));
245
245
  }
246
246
 
247
247
  ui-accordion[data-ui-accordion-root="true"] [data-ui-accordion-chevron] {
@@ -18,7 +18,10 @@
18
18
  --ui-alert-z: 1301;
19
19
  --ui-alert-backdrop-z: 1300;
20
20
  --ui-alert-focus: var(--ui-color-focus-ring, var(--ui-focus-ring, #2563eb));
21
- --ui-alert-danger: var(--ui-color-danger, #dc2626);
21
+ --ui-alert-danger: var(--ui-color-danger-text, var(--ui-color-danger, #dc2626));
22
+ /* A solid dialog: the fill, and the text colour that reads on it. */
23
+ --ui-alert-solid-bg: var(--ui-alert-accent);
24
+ --ui-alert-on-accent: var(--ui-color-foreground-on-primary, #ffffff);
22
25
  --ui-alert-backdrop: var(--base-alert-dialog-backdrop, var(--color-overlay, rgba(2, 6, 23, 0.52)));
23
26
  --ui-alert-btn-bg: color-mix(in srgb, var(--ui-alert-bg-base) 90%, var(--ui-color-background, #ffffff) 10%);
24
27
  --ui-alert-btn-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 72%, transparent);
@@ -46,18 +49,23 @@
46
49
 
47
50
  :host([tone='success']) {
48
51
  --ui-alert-accent: var(--ui-color-success, #15803d);
52
+ --ui-alert-solid-bg: var(--ui-color-success-solid, var(--ui-alert-accent));
53
+ --ui-alert-on-accent: var(--ui-color-foreground-on-success, #ffffff);
49
54
  --ui-alert-confirm-bg: color-mix(in srgb, var(--ui-alert-accent) 76%, #000000);
50
55
  --ui-alert-confirm-color: #ffffff;
51
56
  }
52
57
 
53
58
  :host([tone='warning']) {
54
59
  --ui-alert-accent: var(--ui-color-warning, #b45309);
60
+ --ui-alert-on-accent: var(--ui-color-foreground-on-warning, #ffffff);
55
61
  --ui-alert-confirm-bg: var(--ui-alert-accent);
56
62
  --ui-alert-confirm-color: var(--ui-color-foreground-on-warning, #ffffff);
57
63
  }
58
64
 
59
65
  :host([tone='danger']) {
60
66
  --ui-alert-accent: var(--ui-color-danger, #dc2626);
67
+ --ui-alert-solid-bg: var(--ui-color-danger-solid, var(--ui-alert-accent));
68
+ --ui-alert-on-accent: var(--ui-color-foreground-on-danger, #ffffff);
61
69
  --ui-alert-confirm-bg: color-mix(in srgb, var(--ui-alert-accent) 80%, #000000);
62
70
  --ui-alert-confirm-color: #ffffff;
63
71
  }
@@ -108,17 +116,17 @@
108
116
  }
109
117
 
110
118
  :host([variant='solid']) {
111
- --ui-alert-bg: var(--ui-alert-accent);
119
+ --ui-alert-bg: var(--ui-alert-solid-bg);
112
120
  --ui-alert-border: 1px solid color-mix(in srgb, #000000 16%, transparent);
113
- --ui-alert-text: #ffffff;
114
- --ui-alert-muted: color-mix(in srgb, #ffffff 98%, transparent);
121
+ --ui-alert-text: var(--ui-alert-on-accent);
122
+ --ui-alert-muted: color-mix(in srgb, var(--ui-alert-on-accent) 98%, transparent);
115
123
  --ui-alert-btn-bg: color-mix(in srgb, #000000 14%, transparent);
116
- --ui-alert-btn-border: color-mix(in srgb, #ffffff 30%, transparent);
124
+ --ui-alert-btn-border: color-mix(in srgb, var(--ui-alert-on-accent) 30%, transparent);
117
125
  --ui-alert-btn-hover: color-mix(in srgb, #000000 22%, transparent);
118
126
  --ui-alert-confirm-bg: color-mix(in srgb, #000000 30%, transparent);
119
- --ui-alert-confirm-color: #ffffff;
120
- --ui-alert-icon-bg: color-mix(in srgb, #ffffff 18%, transparent);
121
- --ui-alert-icon-color: #ffffff;
127
+ --ui-alert-confirm-color: var(--ui-alert-on-accent);
128
+ --ui-alert-icon-bg: color-mix(in srgb, var(--ui-alert-on-accent) 18%, transparent);
129
+ --ui-alert-icon-color: var(--ui-alert-on-accent);
122
130
  }
123
131
 
124
132
  :host([elevation='none']) {
@@ -528,17 +536,17 @@
528
536
  border: 1px solid CanvasText;
529
537
  }
530
538
  }
531
- `,J='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function b(i,t){if(i==null)return t;const e=i.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="off"}function o(i){return String(i).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Q(i){return i==="info"||i==="success"||i==="warning"||i==="danger"?i:"neutral"}function X(i){return i==="sm"||i==="1"?"sm":i==="lg"||i==="3"?"lg":"md"}function tt(i){return i==="soft"||i==="outline"||i==="solid"?i:"surface"}function et(i){return i==="none"||i==="high"?i:"low"}function it(i){return i==="none"?"none":"line"}function rt(i,t="var(--base-alert-dialog-radius, var(--ui-radius, 6px))"){if(i==null)return t;const e=i.trim().toLowerCase();return e?e==="full"||e==="pill"?"999px":/^-?\d+(\.\d+)?$/.test(e)?`${e}px`:i:t}const st=new Set(["tone","size","variant","elevation","indicator","radius"]);function ot(i){return i==="success"?'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M5 10.2 8.3 13.4 15 6.8"></path></svg>':i==="warning"?'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3.6 17 16.4H3L10 3.6Z"></path><path d="M10 8v3.4"></path><circle cx="10" cy="14.1" r="0.9" fill="currentColor" stroke="none"></circle></svg>':i==="danger"?'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="m7.5 7.5 5 5M12.5 7.5l-5 5"></path></svg>':i==="info"?'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="M10 13v-3.8"></path><circle cx="10" cy="6.5" r="0.9" fill="currentColor" stroke="none"></circle></svg>':'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M6 10h8"></path><circle cx="10" cy="10" r="7.1"></circle></svg>'}function u(){return typeof window<"u"&&typeof document<"u"}function T(){if(!u())return null;const i=document.activeElement;return i instanceof HTMLElement?i:null}function w(i){return typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>i()):window.setTimeout(i,16)}function p(i){if(i){if(typeof cancelAnimationFrame=="function"){cancelAnimationFrame(i);return}window.clearTimeout(i)}}const c="data-ui-auto-name",l=class l extends Z.ElementBase{constructor(){super(),this._lastActive=null,this._active=!1,this._terminalEmitted=!1,this._closeMeta=null,this._uid=Math.random().toString(36).slice(2,10),this._dialogId="",this._config={},this._inputValue="",this._checked=!1,this._runtimeError="",this._activeHeadless=!1,this._focusInitialFrame=0,this._restoreFocusFrame=0,this._presented=!1,this._finishClose=null,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onInput=this._onInput.bind(this),this._dialogId=this._uid}static get observedAttributes(){return["open","headless","dismissible","close-on-esc","close-on-backdrop","lock-while-loading","role","tone","size","variant","elevation","indicator","radius","state","aria-label","aria-labelledby","aria-describedby","initial-focus","title","description","confirm-text","cancel-text","loading-text","error-message"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("click",this._onClick),this.root.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("input",this._onInput),this._syncFromAttributes(),this._syncVisualTokens(),this._syncOpenState()}disconnectedCallback(){this.root.removeEventListener("click",this._onClick),this.root.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("input",this._onInput),this._focusInitialFrame&&(p(this._focusInitialFrame),this._focusInitialFrame=0),this._restoreFocusFrame&&(p(this._restoreFocusFrame),this._restoreFocusFrame=0),this._active&&!this._terminalEmitted&&this.close("dismiss","unmount"),this._deactivate(),super.disconnectedCallback()}attributeChangedCallback(t,e,r){if(e!==r){if(st.has(t)){this._syncVisualTokens();return}if(t==="headless"){this._syncActiveEnvironment(),this.requestRender();return}if(t==="open"){this._syncOpenState();return}t==="state"&&r!=="error"&&(this._runtimeError=""),this._syncFromAttributes(),this.isConnected&&this.requestRender()}}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.close("dismiss","programmatic")}get headless(){return this.hasAttribute("headless")}set headless(t){t?this.setAttribute("headless",""):this.removeAttribute("headless")}get dismissible(){return b(this.getAttribute("dismissible"),!0)}set dismissible(t){this.setAttribute("dismissible",String(t))}get closeOnEsc(){return b(this.getAttribute("close-on-esc"),this.dismissible)}set closeOnEsc(t){this.setAttribute("close-on-esc",String(t))}get closeOnBackdrop(){return b(this.getAttribute("close-on-backdrop"),this.dismissible)}set closeOnBackdrop(t){this.setAttribute("close-on-backdrop",String(t))}get lockWhileLoading(){return b(this.getAttribute("lock-while-loading"),!0)}set lockWhileLoading(t){this.setAttribute("lock-while-loading",String(t))}get roleType(){return this.getAttribute("role")==="dialog"?"dialog":"alertdialog"}set roleType(t){this.setAttribute("role",t)}get tone(){return Q(this.getAttribute("tone"))}set tone(t){if(t==="neutral"){this.removeAttribute("tone");return}this.setAttribute("tone",t)}get size(){return X(this.getAttribute("size"))}set size(t){if(t==="md"){this.removeAttribute("size");return}this.setAttribute("size",t)}get variant(){return tt(this.getAttribute("variant"))}set variant(t){if(t==="surface"){this.removeAttribute("variant");return}this.setAttribute("variant",t)}get elevation(){return et(this.getAttribute("elevation"))}set elevation(t){if(t==="low"){this.removeAttribute("elevation");return}this.setAttribute("elevation",t)}get indicator(){return it(this.getAttribute("indicator"))}set indicator(t){if(t==="line"){this.removeAttribute("indicator");return}this.setAttribute("indicator",t)}get radius(){return this.getAttribute("radius")||""}set radius(t){if(!t){this.removeAttribute("radius");return}this.setAttribute("radius",t)}get state(){const t=this.getAttribute("state");return t==="loading"||t==="error"?t:"idle"}set state(t){if(t==="idle"){this.removeAttribute("state");return}this.setAttribute("state",t)}get initialFocus(){return this.getAttribute("initial-focus")||this._config.initialFocus||""}set initialFocus(t){if(!t){this.removeAttribute("initial-focus");return}this.setAttribute("initial-focus",t)}get dialogId(){return this._dialogId}set dialogId(t){this._dialogId=t||this._uid,this.requestRender()}get config(){return this._config}set config(t){this._config=t||{},this._config.id&&(this._dialogId=this._config.id),this._config.dismissible!=null&&(this.dismissible=!!this._config.dismissible),this._config.closeOnEsc!=null&&(this.closeOnEsc=!!this._config.closeOnEsc),this._config.closeOnBackdrop!=null&&(this.closeOnBackdrop=!!this._config.closeOnBackdrop),this._config.lockWhileLoading!=null&&(this.lockWhileLoading=!!this._config.lockWhileLoading),this._config.role&&(this.roleType=this._config.role),this._config.tone&&(this.tone=this._config.tone),this._config.size&&(this.size=this._config.size),this._config.variant&&(this.variant=this._config.variant),this._config.elevation&&(this.elevation=this._config.elevation),this._config.indicator&&(this.indicator=this._config.indicator),this._config.radius!=null&&(this.radius=String(this._config.radius)),this._config.ariaLabel&&this.setAttribute("aria-label",this._config.ariaLabel),this._config.ariaLabelledby&&this.setAttribute("aria-labelledby",this._config.ariaLabelledby),this._config.ariaDescribedby&&this.setAttribute("aria-describedby",this._config.ariaDescribedby),this._config.initialFocus&&(this.initialFocus=this._config.initialFocus),this._config.headless!=null&&(this.headless=!!this._config.headless),this._inputValue=this._config.input?.value??this._inputValue,this._checked=this._config.checkbox?.checked??this._checked,this._runtimeError=this._config.errorMessage||"",this._syncVisualTokens(),this.requestRender()}getInputValue(){return this.root.querySelector(".input")?.value??this._inputValue}setInputValue(t){this._inputValue=t;const e=this.root.querySelector(".input");e&&(e.value=t)}getChecked(){return this.root.querySelector(".checkbox-input")?.checked??this._checked}setChecked(t){this._checked=t;const e=this.root.querySelector(".checkbox-input");e&&(e.checked=t)}setError(t){this._runtimeError=t,this.state=t?"error":"idle",this.requestRender()}clearError(){this._runtimeError="",this.state==="error"&&(this.state="idle"),this.requestRender()}close(t="dismiss",e,r){this._terminalEmitted||(this._closeMeta={action:t,source:e,reason:r},this.hasAttribute("open")&&this.removeAttribute("open"),this._syncOpenState())}_syncFromAttributes(){this.hasAttribute("role")||this.setAttribute("role","alertdialog")}_syncVisualTokens(){this.style.setProperty("--ui-alert-radius",rt(this.getAttribute("radius")))}_syncOpenState(){const t=this.hasAttribute("open");if(t&&!this._active){this._activate();return}!t&&this._active&&this._deactivate()}_activate(){this._active=!0,this._activeHeadless=this.headless,this._terminalEmitted=!1,this._closeMeta=null,l._openStack.includes(this)||l._openStack.push(this),this._lastActive=this.headless?null:T(),this.headless||f.acquireBodyScrollLock(),u()&&!this.headless&&document.addEventListener("focusin",this._onFocusIn,!0);const t=this.dialogId||this._uid;this._dispatchWithLegacy("ui-open","open",{id:t}),this.headless||(this._focusInitialFrame&&p(this._focusInitialFrame),this._focusInitialFrame=w(()=>{this._focusInitialFrame=0,this._focusInitial()})),this.requestRender()}_deactivate(){if(!this._active)return;this._active=!1;const t=l._openStack.lastIndexOf(this);if(t>=0&&l._openStack.splice(t,1),u()&&!this._activeHeadless&&document.removeEventListener("focusin",this._onFocusIn,!0),this._activeHeadless||f.releaseBodyScrollLock(),!this._terminalEmitted){const r=this._closeMeta||{action:"dismiss",source:"abort"},s=this.dialogId||this._uid;r.action==="cancel"?this._dispatchWithLegacy("ui-cancel","cancel",{id:s}):r.action==="dismiss"&&this._dispatchWithLegacy("ui-dismiss","dismiss",{id:s,source:r.source||"abort",reason:r.reason}),this._dispatchWithLegacy("ui-close","close",{id:s,action:r.action,source:r.source,reason:r.reason}),this._terminalEmitted=!0,this._closeMeta=null}const e=this._lastActive;this._lastActive=null,e&&!this._activeHeadless&&(this._restoreFocusFrame&&p(this._restoreFocusFrame),this._restoreFocusFrame=w(()=>{this._restoreFocusFrame=0;try{e.focus()}catch{}})),this._activeHeadless=!1,this.requestRender()}_syncActiveEnvironment(){if(this._active&&this.headless!==this._activeHeadless){if(this.headless){u()&&document.removeEventListener("focusin",this._onFocusIn,!0),f.releaseBodyScrollLock(),this._lastActive=null,this._activeHeadless=!0;return}this._lastActive=T(),f.acquireBodyScrollLock(),u()&&document.addEventListener("focusin",this._onFocusIn,!0),this._activeHeadless=!1,this._focusInitialFrame&&p(this._focusInitialFrame),this._focusInitialFrame=w(()=>{this._focusInitialFrame=0,this._focusInitial()})}}_dispatchWithLegacy(t,e,r,s=!1){const a=new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:s});this.dispatchEvent(a);const n=new CustomEvent(e,{detail:r,bubbles:!0,composed:!0,cancelable:s});return this.dispatchEvent(n),a}_isTopMost(){if(!this._active)return!1;const t=l._openStack;return t.length>0&&t[t.length-1]===this}_queryPanel(){return this.root.querySelector(".dialog")}_collectFocusable(t){return Array.from(t.querySelectorAll(J)).filter(e=>{if(e.disabled||e.getAttribute("aria-hidden")==="true")return!1;const s=u()?window.getComputedStyle(e):null;return!(s&&(s.display==="none"||s.visibility==="hidden"))})}_focusInitial(){if(!this.open)return;const t=this._queryPanel();if(!t)return;const e=this.initialFocus;if(e){const n=t.querySelector(e);if(n&&typeof n.focus=="function"){n.focus();return}}const r=this._collectFocusable(t),a=r.find(n=>n.hasAttribute("autofocus"))||r[0]||t;!a.hasAttribute("tabindex")&&a===t&&a.setAttribute("tabindex","-1");try{a.focus()}catch{}}_handleTab(t){if(t.key!=="Tab")return;const e=this._queryPanel();if(!e)return;const r=this._collectFocusable(e);if(!r.length){t.preventDefault(),e.focus();return}const s=this.root.activeElement||document.activeElement,a=r[0],n=r[r.length-1];if(t.shiftKey){(s===a||!s||!e.contains(s))&&(t.preventDefault(),n.focus());return}s===n&&(t.preventDefault(),a.focus())}_onFocusIn(t){if(!this.open||!this._isTopMost())return;const e=this._queryPanel();if(!e)return;const r=t.target;(typeof t.composedPath=="function"?t.composedPath():[]).includes(e)||r&&e.contains(r)||this._focusInitial()}_onInput(t){const e=t.target;e&&(e.classList.contains("input")&&(this._inputValue=e.value),e.classList.contains("checkbox-input")&&(this._checked=e.checked),this._dispatchWithLegacy("ui-change","change",{id:this.dialogId||this._uid,inputValue:this._inputValue,checked:this._checked}))}_isInteractionLocked(){return this.state==="loading"&&this.lockWhileLoading}_requestDismiss(t,e){this._isInteractionLocked()||this.close("dismiss",t,e)}_handleConfirm(){const t={id:this.dialogId||this._uid,inputValue:this.getInputValue(),checked:this.getChecked()};this._dispatchWithLegacy("ui-confirm","confirm",t,!0).defaultPrevented||this.close("confirm")}_handleCancel(){this._isInteractionLocked()||this.close("cancel")}_onClick(t){if(!this.open||!this._isTopMost())return;const e=t.target;if(e){if(e.classList.contains("backdrop")&&this.closeOnBackdrop){this._requestDismiss("backdrop");return}if(e.closest(".close")){this._requestDismiss("close-icon");return}if(e.closest(".btn-confirm")){this._handleConfirm();return}e.closest(".btn-cancel")&&this._handleCancel()}}_onKeyDown(t){if(!(!this.open||!this._isTopMost())){if(t.key==="Escape"){if(!this.closeOnEsc)return;t.preventDefault(),t.stopPropagation(),this._requestDismiss("esc");return}this._handleTab(t)}}_syncHostSemantics(t,e="",r=!1){if(!t){this.getAttribute("aria-hidden")!=="true"&&this.setAttribute("aria-hidden","true"),this.hasAttribute(c)&&(this.removeAttribute("aria-label"),this.removeAttribute(c));return}if(this.hasAttribute("aria-hidden")&&this.removeAttribute("aria-hidden"),r){this.hasAttribute(c)&&this.removeAttribute(c);return}this.getAttribute("aria-label")!==e&&this.setAttribute("aria-label",e),this.hasAttribute(c)||this.setAttribute(c,"")}render(){if(!this.open){this._syncHostSemantics(!1);const y=this.root.querySelector(".backdrop");if(this._presented&&y){this._presented=!1,y.removeAttribute("data-instant"),this._finishClose=L.closeOverlay(y,()=>{this._finishClose=null,this.setContent("")});return}if(this._finishClose)return;this.setContent("");return}this._finishClose?.(),this._finishClose=null;const t=this._config.title??this.getAttribute("title")??"",e=this._config.description??this.getAttribute("description")??"",r=this._config.confirmText??this.getAttribute("confirm-text")??"Confirm",s=this._config.cancelText??this.getAttribute("cancel-text")??"Cancel",a=this._config.loadingText??this.getAttribute("loading-text")??"Working...",n=!!this._config.input?.enabled,B=this._config.input?.label||"Value",$=this._config.input?.placeholder||"",q=!!this._config.input?.required,M=!!this._config.checkbox?.enabled,O=this._config.checkbox?.label||"Remember this choice",D=this.state,m=this._runtimeError||this._config.errorMessage||this.getAttribute("error-message")||"",A=`ui-alert-title-${this._uid}`,z=`ui-alert-description-${this._uid}`,F=`ui-alert-error-${this._uid}`,H=!!this.querySelector('[slot="title"]'),V=!!this.querySelector('[slot="description"]'),R=!!this.querySelector('[slot="icon"]'),W=!!this.querySelector('[slot="footer"]'),P=!!this.querySelector('[slot="content"]'),v=H||!!t,x=V||!!e,j=R||v||x,K=this._config.showCancel??this.dismissible,Y=this._config.showClose??this.dismissible,N=this.tone,_=this.hasAttribute(c)?"":this.getAttribute("aria-label")||"",C=this.getAttribute("aria-labelledby")||"",E=this.getAttribute("aria-describedby")||"",k=C||(v?A:""),S=_||(k?"":t||e||"Dialog"),U=(this.querySelector('[slot="title"]')?.textContent||"").replace(/\s+/g," ").trim();this._syncHostSemantics(!0,_||U||t||e||"Dialog",!!_||!!C);const d=[];E?d.push(E):(x&&d.push(z),m&&d.push(F));const h=D==="loading";this.setContent(`
539
+ `,J='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function b(i,t){if(i==null)return t;const e=i.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!=="off"}function s(i){return String(i).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Q(i){return i==="info"||i==="success"||i==="warning"||i==="danger"?i:"neutral"}function X(i){return i==="sm"||i==="1"?"sm":i==="lg"||i==="3"?"lg":"md"}function tt(i){return i==="soft"||i==="outline"||i==="solid"?i:"surface"}function et(i){return i==="none"||i==="high"?i:"low"}function it(i){return i==="none"?"none":"line"}function rt(i,t="var(--base-alert-dialog-radius, var(--ui-radius, 6px))"){if(i==null)return t;const e=i.trim().toLowerCase();return e?e==="full"||e==="pill"?"999px":/^-?\d+(\.\d+)?$/.test(e)?`${e}px`:i:t}const at=new Set(["tone","size","variant","elevation","indicator","radius"]);function st(i){return i==="success"?'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M5 10.2 8.3 13.4 15 6.8"></path></svg>':i==="warning"?'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3.6 17 16.4H3L10 3.6Z"></path><path d="M10 8v3.4"></path><circle cx="10" cy="14.1" r="0.9" fill="currentColor" stroke="none"></circle></svg>':i==="danger"?'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="m7.5 7.5 5 5M12.5 7.5l-5 5"></path></svg>':i==="info"?'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="M10 13v-3.8"></path><circle cx="10" cy="6.5" r="0.9" fill="currentColor" stroke="none"></circle></svg>':'<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M6 10h8"></path><circle cx="10" cy="10" r="7.1"></circle></svg>'}function u(){return typeof window<"u"&&typeof document<"u"}function T(){if(!u())return null;const i=document.activeElement;return i instanceof HTMLElement?i:null}function w(i){return typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>i()):window.setTimeout(i,16)}function p(i){if(i){if(typeof cancelAnimationFrame=="function"){cancelAnimationFrame(i);return}window.clearTimeout(i)}}const c="data-ui-auto-name",l=class l extends Z.ElementBase{constructor(){super(),this._lastActive=null,this._active=!1,this._terminalEmitted=!1,this._closeMeta=null,this._uid=Math.random().toString(36).slice(2,10),this._dialogId="",this._config={},this._inputValue="",this._checked=!1,this._runtimeError="",this._activeHeadless=!1,this._focusInitialFrame=0,this._restoreFocusFrame=0,this._presented=!1,this._finishClose=null,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onInput=this._onInput.bind(this),this._dialogId=this._uid}static get observedAttributes(){return["open","headless","dismissible","close-on-esc","close-on-backdrop","lock-while-loading","role","tone","size","variant","elevation","indicator","radius","state","aria-label","aria-labelledby","aria-describedby","initial-focus","title","description","confirm-text","cancel-text","loading-text","error-message"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("click",this._onClick),this.root.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("input",this._onInput),this._syncFromAttributes(),this._syncVisualTokens(),this._syncOpenState()}disconnectedCallback(){this.root.removeEventListener("click",this._onClick),this.root.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("input",this._onInput),this._focusInitialFrame&&(p(this._focusInitialFrame),this._focusInitialFrame=0),this._restoreFocusFrame&&(p(this._restoreFocusFrame),this._restoreFocusFrame=0),this._active&&!this._terminalEmitted&&this.close("dismiss","unmount"),this._deactivate(),super.disconnectedCallback()}attributeChangedCallback(t,e,r){if(e!==r){if(at.has(t)){this._syncVisualTokens();return}if(t==="headless"){this._syncActiveEnvironment(),this.requestRender();return}if(t==="open"){this._syncOpenState();return}t==="state"&&r!=="error"&&(this._runtimeError=""),this._syncFromAttributes(),this.isConnected&&this.requestRender()}}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.close("dismiss","programmatic")}get headless(){return this.hasAttribute("headless")}set headless(t){t?this.setAttribute("headless",""):this.removeAttribute("headless")}get dismissible(){return b(this.getAttribute("dismissible"),!0)}set dismissible(t){this.setAttribute("dismissible",String(t))}get closeOnEsc(){return b(this.getAttribute("close-on-esc"),this.dismissible)}set closeOnEsc(t){this.setAttribute("close-on-esc",String(t))}get closeOnBackdrop(){return b(this.getAttribute("close-on-backdrop"),this.dismissible)}set closeOnBackdrop(t){this.setAttribute("close-on-backdrop",String(t))}get lockWhileLoading(){return b(this.getAttribute("lock-while-loading"),!0)}set lockWhileLoading(t){this.setAttribute("lock-while-loading",String(t))}get roleType(){return this.getAttribute("role")==="dialog"?"dialog":"alertdialog"}set roleType(t){this.setAttribute("role",t)}get tone(){return Q(this.getAttribute("tone"))}set tone(t){if(t==="neutral"){this.removeAttribute("tone");return}this.setAttribute("tone",t)}get size(){return X(this.getAttribute("size"))}set size(t){if(t==="md"){this.removeAttribute("size");return}this.setAttribute("size",t)}get variant(){return tt(this.getAttribute("variant"))}set variant(t){if(t==="surface"){this.removeAttribute("variant");return}this.setAttribute("variant",t)}get elevation(){return et(this.getAttribute("elevation"))}set elevation(t){if(t==="low"){this.removeAttribute("elevation");return}this.setAttribute("elevation",t)}get indicator(){return it(this.getAttribute("indicator"))}set indicator(t){if(t==="line"){this.removeAttribute("indicator");return}this.setAttribute("indicator",t)}get radius(){return this.getAttribute("radius")||""}set radius(t){if(!t){this.removeAttribute("radius");return}this.setAttribute("radius",t)}get state(){const t=this.getAttribute("state");return t==="loading"||t==="error"?t:"idle"}set state(t){if(t==="idle"){this.removeAttribute("state");return}this.setAttribute("state",t)}get initialFocus(){return this.getAttribute("initial-focus")||this._config.initialFocus||""}set initialFocus(t){if(!t){this.removeAttribute("initial-focus");return}this.setAttribute("initial-focus",t)}get dialogId(){return this._dialogId}set dialogId(t){this._dialogId=t||this._uid,this.requestRender()}get config(){return this._config}set config(t){this._config=t||{},this._config.id&&(this._dialogId=this._config.id),this._config.dismissible!=null&&(this.dismissible=!!this._config.dismissible),this._config.closeOnEsc!=null&&(this.closeOnEsc=!!this._config.closeOnEsc),this._config.closeOnBackdrop!=null&&(this.closeOnBackdrop=!!this._config.closeOnBackdrop),this._config.lockWhileLoading!=null&&(this.lockWhileLoading=!!this._config.lockWhileLoading),this._config.role&&(this.roleType=this._config.role),this._config.tone&&(this.tone=this._config.tone),this._config.size&&(this.size=this._config.size),this._config.variant&&(this.variant=this._config.variant),this._config.elevation&&(this.elevation=this._config.elevation),this._config.indicator&&(this.indicator=this._config.indicator),this._config.radius!=null&&(this.radius=String(this._config.radius)),this._config.ariaLabel&&this.setAttribute("aria-label",this._config.ariaLabel),this._config.ariaLabelledby&&this.setAttribute("aria-labelledby",this._config.ariaLabelledby),this._config.ariaDescribedby&&this.setAttribute("aria-describedby",this._config.ariaDescribedby),this._config.initialFocus&&(this.initialFocus=this._config.initialFocus),this._config.headless!=null&&(this.headless=!!this._config.headless),this._inputValue=this._config.input?.value??this._inputValue,this._checked=this._config.checkbox?.checked??this._checked,this._runtimeError=this._config.errorMessage||"",this._syncVisualTokens(),this.requestRender()}getInputValue(){return this.root.querySelector(".input")?.value??this._inputValue}setInputValue(t){this._inputValue=t;const e=this.root.querySelector(".input");e&&(e.value=t)}getChecked(){return this.root.querySelector(".checkbox-input")?.checked??this._checked}setChecked(t){this._checked=t;const e=this.root.querySelector(".checkbox-input");e&&(e.checked=t)}setError(t){this._runtimeError=t,this.state=t?"error":"idle",this.requestRender()}clearError(){this._runtimeError="",this.state==="error"&&(this.state="idle"),this.requestRender()}close(t="dismiss",e,r){this._terminalEmitted||(this._closeMeta={action:t,source:e,reason:r},this.hasAttribute("open")&&this.removeAttribute("open"),this._syncOpenState())}_syncFromAttributes(){this.hasAttribute("role")||this.setAttribute("role","alertdialog")}_syncVisualTokens(){this.style.setProperty("--ui-alert-radius",rt(this.getAttribute("radius")))}_syncOpenState(){const t=this.hasAttribute("open");if(t&&!this._active){this._activate();return}!t&&this._active&&this._deactivate()}_activate(){this._active=!0,this._activeHeadless=this.headless,this._terminalEmitted=!1,this._closeMeta=null,l._openStack.includes(this)||l._openStack.push(this),this._lastActive=this.headless?null:T(),this.headless||f.acquireBodyScrollLock(),u()&&!this.headless&&document.addEventListener("focusin",this._onFocusIn,!0);const t=this.dialogId||this._uid;this._dispatchWithLegacy("ui-open","open",{id:t}),this.headless||(this._focusInitialFrame&&p(this._focusInitialFrame),this._focusInitialFrame=w(()=>{this._focusInitialFrame=0,this._focusInitial()})),this.requestRender()}_deactivate(){if(!this._active)return;this._active=!1;const t=l._openStack.lastIndexOf(this);if(t>=0&&l._openStack.splice(t,1),u()&&!this._activeHeadless&&document.removeEventListener("focusin",this._onFocusIn,!0),this._activeHeadless||f.releaseBodyScrollLock(),!this._terminalEmitted){const r=this._closeMeta||{action:"dismiss",source:"abort"},a=this.dialogId||this._uid;r.action==="cancel"?this._dispatchWithLegacy("ui-cancel","cancel",{id:a}):r.action==="dismiss"&&this._dispatchWithLegacy("ui-dismiss","dismiss",{id:a,source:r.source||"abort",reason:r.reason}),this._dispatchWithLegacy("ui-close","close",{id:a,action:r.action,source:r.source,reason:r.reason}),this._terminalEmitted=!0,this._closeMeta=null}const e=this._lastActive;this._lastActive=null,e&&!this._activeHeadless&&(this._restoreFocusFrame&&p(this._restoreFocusFrame),this._restoreFocusFrame=w(()=>{this._restoreFocusFrame=0;try{e.focus()}catch{}})),this._activeHeadless=!1,this.requestRender()}_syncActiveEnvironment(){if(this._active&&this.headless!==this._activeHeadless){if(this.headless){u()&&document.removeEventListener("focusin",this._onFocusIn,!0),f.releaseBodyScrollLock(),this._lastActive=null,this._activeHeadless=!0;return}this._lastActive=T(),f.acquireBodyScrollLock(),u()&&document.addEventListener("focusin",this._onFocusIn,!0),this._activeHeadless=!1,this._focusInitialFrame&&p(this._focusInitialFrame),this._focusInitialFrame=w(()=>{this._focusInitialFrame=0,this._focusInitial()})}}_dispatchWithLegacy(t,e,r,a=!1){const o=new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:a});this.dispatchEvent(o);const n=new CustomEvent(e,{detail:r,bubbles:!0,composed:!0,cancelable:a});return this.dispatchEvent(n),o}_isTopMost(){if(!this._active)return!1;const t=l._openStack;return t.length>0&&t[t.length-1]===this}_queryPanel(){return this.root.querySelector(".dialog")}_collectFocusable(t){return Array.from(t.querySelectorAll(J)).filter(e=>{if(e.disabled||e.getAttribute("aria-hidden")==="true")return!1;const a=u()?window.getComputedStyle(e):null;return!(a&&(a.display==="none"||a.visibility==="hidden"))})}_focusInitial(){if(!this.open)return;const t=this._queryPanel();if(!t)return;const e=this.initialFocus;if(e){const n=t.querySelector(e);if(n&&typeof n.focus=="function"){n.focus();return}}const r=this._collectFocusable(t),o=r.find(n=>n.hasAttribute("autofocus"))||r[0]||t;!o.hasAttribute("tabindex")&&o===t&&o.setAttribute("tabindex","-1");try{o.focus()}catch{}}_handleTab(t){if(t.key!=="Tab")return;const e=this._queryPanel();if(!e)return;const r=this._collectFocusable(e);if(!r.length){t.preventDefault(),e.focus();return}const a=this.root.activeElement||document.activeElement,o=r[0],n=r[r.length-1];if(t.shiftKey){(a===o||!a||!e.contains(a))&&(t.preventDefault(),n.focus());return}a===n&&(t.preventDefault(),o.focus())}_onFocusIn(t){if(!this.open||!this._isTopMost())return;const e=this._queryPanel();if(!e)return;const r=t.target;(typeof t.composedPath=="function"?t.composedPath():[]).includes(e)||r&&e.contains(r)||this._focusInitial()}_onInput(t){const e=t.target;e&&(e.classList.contains("input")&&(this._inputValue=e.value),e.classList.contains("checkbox-input")&&(this._checked=e.checked),this._dispatchWithLegacy("ui-change","change",{id:this.dialogId||this._uid,inputValue:this._inputValue,checked:this._checked}))}_isInteractionLocked(){return this.state==="loading"&&this.lockWhileLoading}_requestDismiss(t,e){this._isInteractionLocked()||this.close("dismiss",t,e)}_handleConfirm(){const t={id:this.dialogId||this._uid,inputValue:this.getInputValue(),checked:this.getChecked()};this._dispatchWithLegacy("ui-confirm","confirm",t,!0).defaultPrevented||this.close("confirm")}_handleCancel(){this._isInteractionLocked()||this.close("cancel")}_onClick(t){if(!this.open||!this._isTopMost())return;const e=t.target;if(e){if(e.classList.contains("backdrop")&&this.closeOnBackdrop){this._requestDismiss("backdrop");return}if(e.closest(".close")){this._requestDismiss("close-icon");return}if(e.closest(".btn-confirm")){this._handleConfirm();return}e.closest(".btn-cancel")&&this._handleCancel()}}_onKeyDown(t){if(!(!this.open||!this._isTopMost())){if(t.key==="Escape"){if(!this.closeOnEsc)return;t.preventDefault(),t.stopPropagation(),this._requestDismiss("esc");return}this._handleTab(t)}}_syncHostSemantics(t,e="",r=!1){if(!t){this.getAttribute("aria-hidden")!=="true"&&this.setAttribute("aria-hidden","true"),this.hasAttribute(c)&&(this.removeAttribute("aria-label"),this.removeAttribute(c));return}if(this.hasAttribute("aria-hidden")&&this.removeAttribute("aria-hidden"),r){this.hasAttribute(c)&&this.removeAttribute(c);return}this.getAttribute("aria-label")!==e&&this.setAttribute("aria-label",e),this.hasAttribute(c)||this.setAttribute(c,"")}render(){if(!this.open){this._syncHostSemantics(!1);const y=this.root.querySelector(".backdrop");if(this._presented&&y){this._presented=!1,y.removeAttribute("data-instant"),this._finishClose=L.closeOverlay(y,()=>{this._finishClose=null,this.setContent("")});return}if(this._finishClose)return;this.setContent("");return}this._finishClose?.(),this._finishClose=null;const t=this._config.title??this.getAttribute("title")??"",e=this._config.description??this.getAttribute("description")??"",r=this._config.confirmText??this.getAttribute("confirm-text")??"Confirm",a=this._config.cancelText??this.getAttribute("cancel-text")??"Cancel",o=this._config.loadingText??this.getAttribute("loading-text")??"Working...",n=!!this._config.input?.enabled,B=this._config.input?.label||"Value",$=this._config.input?.placeholder||"",q=!!this._config.input?.required,M=!!this._config.checkbox?.enabled,O=this._config.checkbox?.label||"Remember this choice",D=this.state,m=this._runtimeError||this._config.errorMessage||this.getAttribute("error-message")||"",A=`ui-alert-title-${this._uid}`,z=`ui-alert-description-${this._uid}`,F=`ui-alert-error-${this._uid}`,H=!!this.querySelector('[slot="title"]'),V=!!this.querySelector('[slot="description"]'),R=!!this.querySelector('[slot="icon"]'),W=!!this.querySelector('[slot="footer"]'),P=!!this.querySelector('[slot="content"]'),v=H||!!t,x=V||!!e,j=R||v||x,K=this._config.showCancel??this.dismissible,Y=this._config.showClose??this.dismissible,N=this.tone,_=this.hasAttribute(c)?"":this.getAttribute("aria-label")||"",C=this.getAttribute("aria-labelledby")||"",E=this.getAttribute("aria-describedby")||"",k=C||(v?A:""),S=_||(k?"":t||e||"Dialog"),U=(this.querySelector('[slot="title"]')?.textContent||"").replace(/\s+/g," ").trim();this._syncHostSemantics(!0,_||U||t||e||"Dialog",!!_||!!C);const d=[];E?d.push(E):(x&&d.push(z),m&&d.push(F));const h=D==="loading";this.setContent(`
532
540
  <style>${G}</style>
533
541
  <div class="backdrop" part="backdrop" role="presentation" data-open="${String(this.open)}" data-state="open" ${this._presented?"data-instant":""}>
534
542
  <section
535
543
  class="dialog"
536
544
  part="dialog"
537
- role="${o(this.roleType)}"
545
+ role="${s(this.roleType)}"
538
546
  aria-modal="true"
539
- ${S?`aria-label="${o(S)}"`:""}
540
- ${k?`aria-labelledby="${o(k)}"`:""}
541
- ${d.length?`aria-describedby="${o(d.join(" "))}"`:""}
547
+ ${S?`aria-label="${s(S)}"`:""}
548
+ ${k?`aria-labelledby="${s(k)}"`:""}
549
+ ${d.length?`aria-describedby="${s(d.join(" "))}"`:""}
542
550
  tabindex="-1"
543
551
  >
544
552
  ${Y?`<button class="close" part="close" aria-label="Close dialog">
@@ -551,12 +559,12 @@
551
559
  <div class="header-main">
552
560
  <span class="icon-wrap" part="icon-wrap" aria-hidden="true">
553
561
  <span class="icon" part="icon">
554
- <slot name="icon">${ot(N)}</slot>
562
+ <slot name="icon">${st(N)}</slot>
555
563
  </span>
556
564
  </span>
557
565
  <div class="heading">
558
- ${v?`<h2 id="${A}" class="title" part="title"><slot name="title">${o(t)}</slot></h2>`:""}
559
- ${x?`<p id="${z}" class="description" part="description"><slot name="description">${o(e)}</slot></p>`:""}
566
+ ${v?`<h2 id="${A}" class="title" part="title"><slot name="title">${s(t)}</slot></h2>`:""}
567
+ ${x?`<p id="${z}" class="description" part="description"><slot name="description">${s(e)}</slot></p>`:""}
560
568
  </div>
561
569
  </div>
562
570
  </header>`:""}
@@ -565,13 +573,13 @@
565
573
  ${P?'<slot name="content"></slot>':"<slot></slot>"}
566
574
 
567
575
  ${n?`<label class="input-wrap">
568
- <span class="label">${o(B)}</span>
576
+ <span class="label">${s(B)}</span>
569
577
  <input
570
578
  class="input"
571
579
  part="input"
572
580
  type="text"
573
- value="${o(this.getInputValue())}"
574
- placeholder="${o($)}"
581
+ value="${s(this.getInputValue())}"
582
+ placeholder="${s($)}"
575
583
  ${q?"required":""}
576
584
  ${h?"disabled":""}
577
585
  />
@@ -580,18 +588,18 @@
580
588
  ${M?`<label class="checkbox" part="checkbox">
581
589
  <span class="checkbox-line">
582
590
  <input class="checkbox-input" type="checkbox" ${this.getChecked()?"checked":""} ${h?"disabled":""} />
583
- <span>${o(O)}</span>
591
+ <span>${s(O)}</span>
584
592
  </span>
585
593
  </label>`:""}
586
594
  </div>
587
595
 
588
- <div class="error" id="${F}" part="error" aria-live="polite" data-empty="${String(!m)}">${o(m)}</div>
596
+ <div class="error" id="${F}" part="error" aria-live="polite" data-empty="${String(!m)}">${s(m)}</div>
589
597
 
590
598
  <footer class="footer" part="footer">
591
- ${h?`<span class="loading"><span class="spinner" aria-hidden="true"></span><span>${o(a)}</span></span>`:'<span aria-hidden="true"></span>'}
599
+ ${h?`<span class="loading"><span class="spinner" aria-hidden="true"></span><span>${s(o)}</span></span>`:'<span aria-hidden="true"></span>'}
592
600
 
593
- ${W?'<slot name="footer"></slot>':`${K?`<button class="btn btn-cancel" part="cancel" type="button" ${h?"disabled":""}>${o(s)}</button>`:""}
594
- <button class="btn btn-confirm" part="confirm" type="button" ${h?"disabled":""}>${o(r)}</button>`}
601
+ ${W?'<slot name="footer"></slot>':`${K?`<button class="btn btn-cancel" part="cancel" type="button" ${h?"disabled":""}>${s(a)}</button>`:""}
602
+ <button class="btn btn-confirm" part="confirm" type="button" ${h?"disabled":""}>${s(r)}</button>`}
595
603
  </footer>
596
604
  </section>
597
605
  </div>
@@ -21,7 +21,10 @@ const Q = `
21
21
  --ui-alert-z: 1301;
22
22
  --ui-alert-backdrop-z: 1300;
23
23
  --ui-alert-focus: var(--ui-color-focus-ring, var(--ui-focus-ring, #2563eb));
24
- --ui-alert-danger: var(--ui-color-danger, #dc2626);
24
+ --ui-alert-danger: var(--ui-color-danger-text, var(--ui-color-danger, #dc2626));
25
+ /* A solid dialog: the fill, and the text colour that reads on it. */
26
+ --ui-alert-solid-bg: var(--ui-alert-accent);
27
+ --ui-alert-on-accent: var(--ui-color-foreground-on-primary, #ffffff);
25
28
  --ui-alert-backdrop: var(--base-alert-dialog-backdrop, var(--color-overlay, rgba(2, 6, 23, 0.52)));
26
29
  --ui-alert-btn-bg: color-mix(in srgb, var(--ui-alert-bg-base) 90%, var(--ui-color-background, #ffffff) 10%);
27
30
  --ui-alert-btn-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 72%, transparent);
@@ -49,18 +52,23 @@ const Q = `
49
52
 
50
53
  :host([tone='success']) {
51
54
  --ui-alert-accent: var(--ui-color-success, #15803d);
55
+ --ui-alert-solid-bg: var(--ui-color-success-solid, var(--ui-alert-accent));
56
+ --ui-alert-on-accent: var(--ui-color-foreground-on-success, #ffffff);
52
57
  --ui-alert-confirm-bg: color-mix(in srgb, var(--ui-alert-accent) 76%, #000000);
53
58
  --ui-alert-confirm-color: #ffffff;
54
59
  }
55
60
 
56
61
  :host([tone='warning']) {
57
62
  --ui-alert-accent: var(--ui-color-warning, #b45309);
63
+ --ui-alert-on-accent: var(--ui-color-foreground-on-warning, #ffffff);
58
64
  --ui-alert-confirm-bg: var(--ui-alert-accent);
59
65
  --ui-alert-confirm-color: var(--ui-color-foreground-on-warning, #ffffff);
60
66
  }
61
67
 
62
68
  :host([tone='danger']) {
63
69
  --ui-alert-accent: var(--ui-color-danger, #dc2626);
70
+ --ui-alert-solid-bg: var(--ui-color-danger-solid, var(--ui-alert-accent));
71
+ --ui-alert-on-accent: var(--ui-color-foreground-on-danger, #ffffff);
64
72
  --ui-alert-confirm-bg: color-mix(in srgb, var(--ui-alert-accent) 80%, #000000);
65
73
  --ui-alert-confirm-color: #ffffff;
66
74
  }
@@ -111,17 +119,17 @@ const Q = `
111
119
  }
112
120
 
113
121
  :host([variant='solid']) {
114
- --ui-alert-bg: var(--ui-alert-accent);
122
+ --ui-alert-bg: var(--ui-alert-solid-bg);
115
123
  --ui-alert-border: 1px solid color-mix(in srgb, #000000 16%, transparent);
116
- --ui-alert-text: #ffffff;
117
- --ui-alert-muted: color-mix(in srgb, #ffffff 98%, transparent);
124
+ --ui-alert-text: var(--ui-alert-on-accent);
125
+ --ui-alert-muted: color-mix(in srgb, var(--ui-alert-on-accent) 98%, transparent);
118
126
  --ui-alert-btn-bg: color-mix(in srgb, #000000 14%, transparent);
119
- --ui-alert-btn-border: color-mix(in srgb, #ffffff 30%, transparent);
127
+ --ui-alert-btn-border: color-mix(in srgb, var(--ui-alert-on-accent) 30%, transparent);
120
128
  --ui-alert-btn-hover: color-mix(in srgb, #000000 22%, transparent);
121
129
  --ui-alert-confirm-bg: color-mix(in srgb, #000000 30%, transparent);
122
- --ui-alert-confirm-color: #ffffff;
123
- --ui-alert-icon-bg: color-mix(in srgb, #ffffff 18%, transparent);
124
- --ui-alert-icon-color: #ffffff;
130
+ --ui-alert-confirm-color: var(--ui-alert-on-accent);
131
+ --ui-alert-icon-bg: color-mix(in srgb, var(--ui-alert-on-accent) 18%, transparent);
132
+ --ui-alert-icon-color: var(--ui-alert-on-accent);
125
133
  }
126
134
 
127
135
  :host([elevation='none']) {
@@ -537,7 +545,7 @@ function f(i, t) {
537
545
  const e = i.trim().toLowerCase();
538
546
  return e !== "false" && e !== "0" && e !== "off";
539
547
  }
540
- function a(i) {
548
+ function s(i) {
541
549
  return String(i).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
542
550
  }
543
551
  function tt(i) {
@@ -552,10 +560,10 @@ function it(i) {
552
560
  function rt(i) {
553
561
  return i === "none" || i === "high" ? i : "low";
554
562
  }
555
- function st(i) {
563
+ function at(i) {
556
564
  return i === "none" ? "none" : "line";
557
565
  }
558
- function at(i, t = "var(--base-alert-dialog-radius, var(--ui-radius, 6px))") {
566
+ function st(i, t = "var(--base-alert-dialog-radius, var(--ui-radius, 6px))") {
559
567
  if (i == null) return t;
560
568
  const e = i.trim().toLowerCase();
561
569
  return e ? e === "full" || e === "pill" ? "999px" : /^-?\d+(\.\d+)?$/.test(e) ? `${e}px` : i : t;
@@ -722,7 +730,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
722
730
  this.setAttribute("elevation", t);
723
731
  }
724
732
  get indicator() {
725
- return st(this.getAttribute("indicator"));
733
+ return at(this.getAttribute("indicator"));
726
734
  }
727
735
  set indicator(t) {
728
736
  if (t === "line") {
@@ -803,7 +811,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
803
811
  this.hasAttribute("role") || this.setAttribute("role", "alertdialog");
804
812
  }
805
813
  _syncVisualTokens() {
806
- this.style.setProperty("--ui-alert-radius", at(this.getAttribute("radius")));
814
+ this.style.setProperty("--ui-alert-radius", st(this.getAttribute("radius")));
807
815
  }
808
816
  _syncOpenState() {
809
817
  const t = this.hasAttribute("open");
@@ -825,13 +833,13 @@ const c = "data-ui-auto-name", l = class l extends Z {
825
833
  this._active = !1;
826
834
  const t = l._openStack.lastIndexOf(this);
827
835
  if (t >= 0 && l._openStack.splice(t, 1), u() && !this._activeHeadless && document.removeEventListener("focusin", this._onFocusIn, !0), this._activeHeadless || L(), !this._terminalEmitted) {
828
- const r = this._closeMeta || { action: "dismiss", source: "abort" }, s = this.dialogId || this._uid;
829
- r.action === "cancel" ? this._dispatchWithLegacy("ui-cancel", "cancel", { id: s }) : r.action === "dismiss" && this._dispatchWithLegacy("ui-dismiss", "dismiss", {
830
- id: s,
836
+ const r = this._closeMeta || { action: "dismiss", source: "abort" }, a = this.dialogId || this._uid;
837
+ r.action === "cancel" ? this._dispatchWithLegacy("ui-cancel", "cancel", { id: a }) : r.action === "dismiss" && this._dispatchWithLegacy("ui-dismiss", "dismiss", {
838
+ id: a,
831
839
  source: r.source || "abort",
832
840
  reason: r.reason
833
841
  }), this._dispatchWithLegacy("ui-close", "close", {
834
- id: s,
842
+ id: a,
835
843
  action: r.action,
836
844
  source: r.source,
837
845
  reason: r.reason
@@ -857,19 +865,19 @@ const c = "data-ui-auto-name", l = class l extends Z {
857
865
  });
858
866
  }
859
867
  }
860
- _dispatchWithLegacy(t, e, r, s = !1) {
868
+ _dispatchWithLegacy(t, e, r, a = !1) {
861
869
  const o = new CustomEvent(t, {
862
870
  detail: r,
863
871
  bubbles: !0,
864
872
  composed: !0,
865
- cancelable: s
873
+ cancelable: a
866
874
  });
867
875
  this.dispatchEvent(o);
868
876
  const n = new CustomEvent(e, {
869
877
  detail: r,
870
878
  bubbles: !0,
871
879
  composed: !0,
872
- cancelable: s
880
+ cancelable: a
873
881
  });
874
882
  return this.dispatchEvent(n), o;
875
883
  }
@@ -884,8 +892,8 @@ const c = "data-ui-auto-name", l = class l extends Z {
884
892
  _collectFocusable(t) {
885
893
  return Array.from(t.querySelectorAll(X)).filter((e) => {
886
894
  if (e.disabled || e.getAttribute("aria-hidden") === "true") return !1;
887
- const s = u() ? window.getComputedStyle(e) : null;
888
- return !(s && (s.display === "none" || s.visibility === "hidden"));
895
+ const a = u() ? window.getComputedStyle(e) : null;
896
+ return !(a && (a.display === "none" || a.visibility === "hidden"));
889
897
  });
890
898
  }
891
899
  _focusInitial() {
@@ -916,12 +924,12 @@ const c = "data-ui-auto-name", l = class l extends Z {
916
924
  t.preventDefault(), e.focus();
917
925
  return;
918
926
  }
919
- const s = this.root.activeElement || document.activeElement, o = r[0], n = r[r.length - 1];
927
+ const a = this.root.activeElement || document.activeElement, o = r[0], n = r[r.length - 1];
920
928
  if (t.shiftKey) {
921
- (s === o || !s || !e.contains(s)) && (t.preventDefault(), n.focus());
929
+ (a === o || !a || !e.contains(a)) && (t.preventDefault(), n.focus());
922
930
  return;
923
931
  }
924
- s === n && (t.preventDefault(), o.focus());
932
+ a === n && (t.preventDefault(), o.focus());
925
933
  }
926
934
  _onFocusIn(t) {
927
935
  if (!this.open || !this._isTopMost()) return;
@@ -1013,7 +1021,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
1013
1021
  return;
1014
1022
  }
1015
1023
  this._finishClose?.(), this._finishClose = null;
1016
- const t = this._config.title ?? this.getAttribute("title") ?? "", e = this._config.description ?? this.getAttribute("description") ?? "", r = this._config.confirmText ?? this.getAttribute("confirm-text") ?? "Confirm", s = this._config.cancelText ?? this.getAttribute("cancel-text") ?? "Cancel", o = this._config.loadingText ?? this.getAttribute("loading-text") ?? "Working...", n = !!this._config.input?.enabled, $ = this._config.input?.label || "Value", B = this._config.input?.placeholder || "", q = !!this._config.input?.required, O = !!this._config.checkbox?.enabled, D = this._config.checkbox?.label || "Remember this choice", M = this.state, b = this._runtimeError || this._config.errorMessage || this.getAttribute("error-message") || "", w = `ui-alert-title-${this._uid}`, A = `ui-alert-description-${this._uid}`, z = `ui-alert-error-${this._uid}`, H = !!this.querySelector('[slot="title"]'), V = !!this.querySelector('[slot="description"]'), R = !!this.querySelector('[slot="icon"]'), W = !!this.querySelector('[slot="footer"]'), P = !!this.querySelector('[slot="content"]'), g = H || !!t, m = V || !!e, j = R || g || m, K = this._config.showCancel ?? this.dismissible, Y = this._config.showClose ?? this.dismissible, N = this.tone, v = this.hasAttribute(c) ? "" : this.getAttribute("aria-label") || "", F = this.getAttribute("aria-labelledby") || "", C = this.getAttribute("aria-describedby") || "", x = F || (g ? w : ""), E = v || (x ? "" : t || e || "Dialog"), U = (this.querySelector('[slot="title"]')?.textContent || "").replace(/\s+/g, " ").trim();
1024
+ const t = this._config.title ?? this.getAttribute("title") ?? "", e = this._config.description ?? this.getAttribute("description") ?? "", r = this._config.confirmText ?? this.getAttribute("confirm-text") ?? "Confirm", a = this._config.cancelText ?? this.getAttribute("cancel-text") ?? "Cancel", o = this._config.loadingText ?? this.getAttribute("loading-text") ?? "Working...", n = !!this._config.input?.enabled, $ = this._config.input?.label || "Value", B = this._config.input?.placeholder || "", q = !!this._config.input?.required, O = !!this._config.checkbox?.enabled, D = this._config.checkbox?.label || "Remember this choice", M = this.state, b = this._runtimeError || this._config.errorMessage || this.getAttribute("error-message") || "", w = `ui-alert-title-${this._uid}`, A = `ui-alert-description-${this._uid}`, z = `ui-alert-error-${this._uid}`, H = !!this.querySelector('[slot="title"]'), V = !!this.querySelector('[slot="description"]'), R = !!this.querySelector('[slot="icon"]'), W = !!this.querySelector('[slot="footer"]'), P = !!this.querySelector('[slot="content"]'), g = H || !!t, m = V || !!e, j = R || g || m, K = this._config.showCancel ?? this.dismissible, Y = this._config.showClose ?? this.dismissible, N = this.tone, v = this.hasAttribute(c) ? "" : this.getAttribute("aria-label") || "", F = this.getAttribute("aria-labelledby") || "", C = this.getAttribute("aria-describedby") || "", x = F || (g ? w : ""), E = v || (x ? "" : t || e || "Dialog"), U = (this.querySelector('[slot="title"]')?.textContent || "").replace(/\s+/g, " ").trim();
1017
1025
  this._syncHostSemantics(
1018
1026
  !0,
1019
1027
  v || U || t || e || "Dialog",
@@ -1028,11 +1036,11 @@ const c = "data-ui-auto-name", l = class l extends Z {
1028
1036
  <section
1029
1037
  class="dialog"
1030
1038
  part="dialog"
1031
- role="${a(this.roleType)}"
1039
+ role="${s(this.roleType)}"
1032
1040
  aria-modal="true"
1033
- ${E ? `aria-label="${a(E)}"` : ""}
1034
- ${x ? `aria-labelledby="${a(x)}"` : ""}
1035
- ${d.length ? `aria-describedby="${a(d.join(" "))}"` : ""}
1041
+ ${E ? `aria-label="${s(E)}"` : ""}
1042
+ ${x ? `aria-labelledby="${s(x)}"` : ""}
1043
+ ${d.length ? `aria-describedby="${s(d.join(" "))}"` : ""}
1036
1044
  tabindex="-1"
1037
1045
  >
1038
1046
  ${Y ? `<button class="close" part="close" aria-label="Close dialog">
@@ -1049,8 +1057,8 @@ const c = "data-ui-auto-name", l = class l extends Z {
1049
1057
  </span>
1050
1058
  </span>
1051
1059
  <div class="heading">
1052
- ${g ? `<h2 id="${w}" class="title" part="title"><slot name="title">${a(t)}</slot></h2>` : ""}
1053
- ${m ? `<p id="${A}" class="description" part="description"><slot name="description">${a(e)}</slot></p>` : ""}
1060
+ ${g ? `<h2 id="${w}" class="title" part="title"><slot name="title">${s(t)}</slot></h2>` : ""}
1061
+ ${m ? `<p id="${A}" class="description" part="description"><slot name="description">${s(e)}</slot></p>` : ""}
1054
1062
  </div>
1055
1063
  </div>
1056
1064
  </header>` : ""}
@@ -1059,13 +1067,13 @@ const c = "data-ui-auto-name", l = class l extends Z {
1059
1067
  ${P ? '<slot name="content"></slot>' : "<slot></slot>"}
1060
1068
 
1061
1069
  ${n ? `<label class="input-wrap">
1062
- <span class="label">${a($)}</span>
1070
+ <span class="label">${s($)}</span>
1063
1071
  <input
1064
1072
  class="input"
1065
1073
  part="input"
1066
1074
  type="text"
1067
- value="${a(this.getInputValue())}"
1068
- placeholder="${a(B)}"
1075
+ value="${s(this.getInputValue())}"
1076
+ placeholder="${s(B)}"
1069
1077
  ${q ? "required" : ""}
1070
1078
  ${h ? "disabled" : ""}
1071
1079
  />
@@ -1074,18 +1082,18 @@ const c = "data-ui-auto-name", l = class l extends Z {
1074
1082
  ${O ? `<label class="checkbox" part="checkbox">
1075
1083
  <span class="checkbox-line">
1076
1084
  <input class="checkbox-input" type="checkbox" ${this.getChecked() ? "checked" : ""} ${h ? "disabled" : ""} />
1077
- <span>${a(D)}</span>
1085
+ <span>${s(D)}</span>
1078
1086
  </span>
1079
1087
  </label>` : ""}
1080
1088
  </div>
1081
1089
 
1082
- <div class="error" id="${z}" part="error" aria-live="polite" data-empty="${String(!b)}">${a(b)}</div>
1090
+ <div class="error" id="${z}" part="error" aria-live="polite" data-empty="${String(!b)}">${s(b)}</div>
1083
1091
 
1084
1092
  <footer class="footer" part="footer">
1085
- ${h ? `<span class="loading"><span class="spinner" aria-hidden="true"></span><span>${a(o)}</span></span>` : '<span aria-hidden="true"></span>'}
1093
+ ${h ? `<span class="loading"><span class="spinner" aria-hidden="true"></span><span>${s(o)}</span></span>` : '<span aria-hidden="true"></span>'}
1086
1094
 
1087
- ${W ? '<slot name="footer"></slot>' : `${K ? `<button class="btn btn-cancel" part="cancel" type="button" ${h ? "disabled" : ""}>${a(s)}</button>` : ""}
1088
- <button class="btn btn-confirm" part="confirm" type="button" ${h ? "disabled" : ""}>${a(r)}</button>`}
1095
+ ${W ? '<slot name="footer"></slot>' : `${K ? `<button class="btn btn-cancel" part="cancel" type="button" ${h ? "disabled" : ""}>${s(a)}</button>` : ""}
1096
+ <button class="btn btn-confirm" part="confirm" type="button" ${h ? "disabled" : ""}>${s(r)}</button>`}
1089
1097
  </footer>
1090
1098
  </section>
1091
1099
  </div>
package/dist/alert.cjs.js CHANGED
@@ -209,7 +209,7 @@
209
209
  :host([variant="solid"]) .alert {
210
210
  --ui-alert-bg: var(--ui-alert-accent);
211
211
  --ui-alert-color: #ffffff;
212
- --ui-alert-muted: color-mix(in srgb, #ffffff 82%, transparent);
212
+ --ui-alert-muted: color-mix(in srgb, #ffffff 92%, transparent);
213
213
  --ui-alert-border: 1px solid color-mix(in srgb, #000000 18%, transparent);
214
214
  --ui-alert-icon-bg: color-mix(in srgb, #ffffff 20%, transparent);
215
215
  --ui-alert-icon-color: #ffffff;
@@ -258,7 +258,7 @@
258
258
 
259
259
  /* The tone rules above set a tinted fill; a solid alert must win over them, so these come last. */
260
260
  :host([variant="solid"]) .alert {
261
- --ui-alert-bg: color-mix(in srgb, var(--ui-alert-accent) 84%, #000000);
261
+ --ui-alert-bg: color-mix(in srgb, var(--ui-alert-accent) 78%, #000000);
262
262
  --ui-alert-border: 1px solid color-mix(in srgb, #000000 18%, transparent);
263
263
  }
264
264
 
package/dist/alert.esm.js CHANGED
@@ -210,7 +210,7 @@ const y = `
210
210
  :host([variant="solid"]) .alert {
211
211
  --ui-alert-bg: var(--ui-alert-accent);
212
212
  --ui-alert-color: #ffffff;
213
- --ui-alert-muted: color-mix(in srgb, #ffffff 82%, transparent);
213
+ --ui-alert-muted: color-mix(in srgb, #ffffff 92%, transparent);
214
214
  --ui-alert-border: 1px solid color-mix(in srgb, #000000 18%, transparent);
215
215
  --ui-alert-icon-bg: color-mix(in srgb, #ffffff 20%, transparent);
216
216
  --ui-alert-icon-color: #ffffff;
@@ -259,7 +259,7 @@ const y = `
259
259
 
260
260
  /* The tone rules above set a tinted fill; a solid alert must win over them, so these come last. */
261
261
  :host([variant="solid"]) .alert {
262
- --ui-alert-bg: color-mix(in srgb, var(--ui-alert-accent) 84%, #000000);
262
+ --ui-alert-bg: color-mix(in srgb, var(--ui-alert-accent) 78%, #000000);
263
263
  --ui-alert-border: 1px solid color-mix(in srgb, #000000 18%, transparent);
264
264
  }
265
265
 
@@ -96,7 +96,7 @@
96
96
 
97
97
  :host([variant="soft"]) {
98
98
  --ui-animated-text-color:
99
- color-mix(in srgb, var(--ui-animated-text-accent) 72%, var(--ui-color-text, var(--ui-text, #0f172a)));
99
+ color-mix(in srgb, var(--ui-animated-text-accent) 62%, var(--ui-color-text, var(--ui-text, #0f172a)));
100
100
  --ui-animated-text-bg:
101
101
  color-mix(in srgb, var(--ui-animated-text-accent) 8%, var(--ui-color-surface, #ffffff));
102
102
  --ui-animated-text-border:
@@ -106,7 +106,7 @@
106
106
  }
107
107
 
108
108
  :host([variant="solid"]) {
109
- --ui-animated-text-color: color-mix(in srgb, var(--ui-animated-text-accent) 88%, #061221);
109
+ --ui-animated-text-color: color-mix(in srgb, var(--ui-animated-text-accent) 45%, var(--ui-color-text-strong, #0f172a));
110
110
  --ui-animated-text-bg:
111
111
  linear-gradient(
112
112
  180deg,
@@ -149,7 +149,7 @@
149
149
 
150
150
  :host([variant="minimal"]) {
151
151
  --ui-animated-text-color:
152
- color-mix(in srgb, var(--ui-animated-text-accent) 84%, var(--ui-color-text, var(--ui-text, #0f172a)));
152
+ color-mix(in srgb, var(--ui-animated-text-accent) 45%, var(--ui-color-text-strong, var(--ui-color-text, var(--ui-text, #0f172a))));
153
153
  --ui-animated-text-bg: transparent;
154
154
  --ui-animated-text-border: none;
155
155
  --ui-animated-text-shadow: none;
@@ -396,8 +396,8 @@
396
396
  background:
397
397
  linear-gradient(
398
398
  135deg,
399
- color-mix(in srgb, var(--ui-animated-text-accent) 96%, #ffffff 4%),
400
- color-mix(in srgb, var(--ui-animated-text-accent) 58%, #0f172a 42%)
399
+ color-mix(in srgb, var(--ui-animated-text-accent) 62%, var(--ui-color-text-strong, #0f172a)),
400
+ color-mix(in srgb, var(--ui-animated-text-accent) 40%, var(--ui-color-text-strong, #0f172a))
401
401
  );
402
402
  -webkit-background-clip: text;
403
403
  background-clip: text;