@editora/ui-core 0.1.24 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/README.md +339 -5
  2. package/dist/accordion.cjs.js +13 -12
  3. package/dist/accordion.esm.js +13 -12
  4. package/dist/alert-dialog.cjs.js +76 -45
  5. package/dist/alert-dialog.esm.js +179 -135
  6. package/dist/alert.cjs.js +41 -32
  7. package/dist/alert.esm.js +79 -70
  8. package/dist/animated-beam.cjs.js +42 -50
  9. package/dist/animated-beam.esm.js +47 -55
  10. package/dist/animated-list.cjs.js +11 -27
  11. package/dist/animated-list.esm.js +12 -28
  12. package/dist/animated-text.cjs.js +4 -4
  13. package/dist/animated-text.esm.js +4 -4
  14. package/dist/app-header.cjs.js +5 -5
  15. package/dist/app-header.esm.js +6 -6
  16. package/dist/aspect-ratio.cjs.js +10 -12
  17. package/dist/aspect-ratio.esm.js +11 -13
  18. package/dist/avatar.cjs.js +13 -17
  19. package/dist/avatar.esm.js +13 -17
  20. package/dist/badge.cjs.js +27 -22
  21. package/dist/badge.esm.js +32 -27
  22. package/dist/block-controls.cjs.js +11 -12
  23. package/dist/block-controls.esm.js +8 -9
  24. package/dist/box.cjs.js +2 -3
  25. package/dist/box.esm.js +2 -3
  26. package/dist/breadcrumb.cjs.js +12 -18
  27. package/dist/breadcrumb.esm.js +11 -17
  28. package/dist/button.cjs.js +1 -1
  29. package/dist/button.esm.js +1 -1
  30. package/dist/{calendar-B3PUKHQm.mjs → calendar-DmxiZrR7.mjs} +126 -117
  31. package/dist/{calendar-D-mXMgqc.js → calendar-o273O28D.js} +53 -44
  32. package/dist/calendar.cjs.js +1 -1
  33. package/dist/calendar.esm.js +1 -1
  34. package/dist/card.cjs.js +6 -7
  35. package/dist/card.esm.js +5 -6
  36. package/dist/chart.cjs.js +52 -52
  37. package/dist/chart.esm.js +95 -95
  38. package/dist/checkbox.cjs.js +19 -15
  39. package/dist/checkbox.esm.js +19 -15
  40. package/dist/collapsible.cjs.js +7 -11
  41. package/dist/collapsible.esm.js +7 -11
  42. package/dist/color-picker.cjs.js +36 -17
  43. package/dist/color-picker.esm.js +132 -113
  44. package/dist/combobox.cjs.js +57 -54
  45. package/dist/combobox.esm.js +62 -58
  46. package/dist/command-palette.cjs.js +1 -0
  47. package/dist/command-palette.esm.js +1 -0
  48. package/dist/command.cjs.js +32 -14
  49. package/dist/command.esm.js +46 -28
  50. package/dist/components/date-time-utils.d.ts.map +1 -1
  51. package/dist/components/gantt-schedule.d.ts +79 -0
  52. package/dist/components/gantt-schedule.d.ts.map +1 -0
  53. package/dist/components/ui-accordion.d.ts.map +1 -1
  54. package/dist/components/ui-alert-dialog.d.ts +2 -0
  55. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  56. package/dist/components/ui-alert.d.ts.map +1 -1
  57. package/dist/components/ui-animated-beam.d.ts.map +1 -1
  58. package/dist/components/ui-animated-list.d.ts.map +1 -1
  59. package/dist/components/ui-aspect-ratio.d.ts.map +1 -1
  60. package/dist/components/ui-avatar.d.ts.map +1 -1
  61. package/dist/components/ui-badge.d.ts.map +1 -1
  62. package/dist/components/ui-block-controls.d.ts.map +1 -1
  63. package/dist/components/ui-box.d.ts.map +1 -1
  64. package/dist/components/ui-breadcrumb.d.ts.map +1 -1
  65. package/dist/components/ui-button.d.ts.map +1 -1
  66. package/dist/components/ui-calendar.d.ts.map +1 -1
  67. package/dist/components/ui-card.d.ts.map +1 -1
  68. package/dist/components/ui-checkbox.d.ts.map +1 -1
  69. package/dist/components/ui-collapsible.d.ts.map +1 -1
  70. package/dist/components/ui-color-picker.d.ts.map +1 -1
  71. package/dist/components/ui-combobox.d.ts.map +1 -1
  72. package/dist/components/ui-command-palette.d.ts.map +1 -1
  73. package/dist/components/ui-command.d.ts.map +1 -1
  74. package/dist/components/ui-container.d.ts.map +1 -1
  75. package/dist/components/ui-context-menu.d.ts.map +1 -1
  76. package/dist/components/ui-data-table.d.ts +7 -0
  77. package/dist/components/ui-data-table.d.ts.map +1 -1
  78. package/dist/components/ui-date-picker.d.ts.map +1 -1
  79. package/dist/components/ui-date-range-picker.d.ts.map +1 -1
  80. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
  81. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  82. package/dist/components/ui-dialog.d.ts +2 -0
  83. package/dist/components/ui-dialog.d.ts.map +1 -1
  84. package/dist/components/ui-dock.d.ts.map +1 -1
  85. package/dist/components/ui-drawer.d.ts.map +1 -1
  86. package/dist/components/ui-dropdown.d.ts.map +1 -1
  87. package/dist/components/ui-empty-state.d.ts.map +1 -1
  88. package/dist/components/ui-field.d.ts.map +1 -1
  89. package/dist/components/ui-fieldset.d.ts.map +1 -1
  90. package/dist/components/ui-file-upload.d.ts.map +1 -1
  91. package/dist/components/ui-floating-toolbar.d.ts.map +1 -1
  92. package/dist/components/ui-form.d.ts.map +1 -1
  93. package/dist/components/ui-gantt.d.ts +186 -2
  94. package/dist/components/ui-gantt.d.ts.map +1 -1
  95. package/dist/components/ui-icon-cloud.d.ts.map +1 -1
  96. package/dist/components/ui-inline-edit.d.ts.map +1 -1
  97. package/dist/components/ui-input.d.ts.map +1 -1
  98. package/dist/components/ui-marquee.d.ts.map +1 -1
  99. package/dist/components/ui-menu.d.ts.map +1 -1
  100. package/dist/components/ui-menubar.d.ts.map +1 -1
  101. package/dist/components/ui-meter.d.ts.map +1 -1
  102. package/dist/components/ui-multi-select.d.ts.map +1 -1
  103. package/dist/components/ui-number-field.d.ts.map +1 -1
  104. package/dist/components/ui-orbiter.d.ts.map +1 -1
  105. package/dist/components/ui-pagination.d.ts.map +1 -1
  106. package/dist/components/ui-password-field.d.ts.map +1 -1
  107. package/dist/components/ui-pin-input.d.ts.map +1 -1
  108. package/dist/components/ui-popover.d.ts.map +1 -1
  109. package/dist/components/ui-progress.d.ts.map +1 -1
  110. package/dist/components/ui-radio-group.d.ts.map +1 -1
  111. package/dist/components/ui-radio.d.ts.map +1 -1
  112. package/dist/components/ui-rating.d.ts +1 -0
  113. package/dist/components/ui-rating.d.ts.map +1 -1
  114. package/dist/components/ui-scroll-area.d.ts.map +1 -1
  115. package/dist/components/ui-section.d.ts.map +1 -1
  116. package/dist/components/ui-select.d.ts.map +1 -1
  117. package/dist/components/ui-selection-popup.d.ts.map +1 -1
  118. package/dist/components/ui-slider.d.ts.map +1 -1
  119. package/dist/components/ui-sortable.d.ts.map +1 -1
  120. package/dist/components/ui-spinning-text.d.ts.map +1 -1
  121. package/dist/components/ui-split-button.d.ts.map +1 -1
  122. package/dist/components/ui-splitter.d.ts.map +1 -1
  123. package/dist/components/ui-stepper.d.ts.map +1 -1
  124. package/dist/components/ui-switch.d.ts.map +1 -1
  125. package/dist/components/ui-tabs.d.ts.map +1 -1
  126. package/dist/components/ui-tags-input.d.ts.map +1 -1
  127. package/dist/components/ui-textarea.d.ts.map +1 -1
  128. package/dist/components/ui-time-picker.d.ts.map +1 -1
  129. package/dist/components/ui-toggle-group.d.ts +2 -0
  130. package/dist/components/ui-toggle-group.d.ts.map +1 -1
  131. package/dist/components/ui-toggle.d.ts.map +1 -1
  132. package/dist/components/ui-toolbar.d.ts +2 -0
  133. package/dist/components/ui-toolbar.d.ts.map +1 -1
  134. package/dist/components/ui-tooltip.d.ts.map +1 -1
  135. package/dist/components/ui-transfer-list.d.ts.map +1 -1
  136. package/dist/components/ui-tree-item.d.ts.map +1 -1
  137. package/dist/components/ui-tree.d.ts.map +1 -1
  138. package/dist/components/ui-wizard.d.ts.map +1 -1
  139. package/dist/container.cjs.js +6 -12
  140. package/dist/container.esm.js +8 -14
  141. package/dist/context-menu.cjs.js +8 -8
  142. package/dist/context-menu.esm.js +42 -41
  143. package/dist/data-table.cjs.js +18 -15
  144. package/dist/data-table.esm.js +207 -187
  145. package/dist/date-field.cjs.js +8 -8
  146. package/dist/date-field.esm.js +7 -7
  147. package/dist/date-picker.cjs.js +27 -18
  148. package/dist/date-picker.esm.js +57 -48
  149. package/dist/date-range-picker.cjs.js +22 -17
  150. package/dist/date-range-picker.esm.js +31 -26
  151. package/dist/date-range-time-picker.cjs.js +26 -19
  152. package/dist/date-range-time-picker.esm.js +23 -16
  153. package/dist/date-time-picker.cjs.js +23 -16
  154. package/dist/date-time-picker.esm.js +88 -81
  155. package/dist/{date-time-utils-BTlxnz5j.mjs → date-time-utils-B4hAkt36.mjs} +75 -68
  156. package/dist/date-time-utils-DdigV4hs.js +1 -0
  157. package/dist/dialog.cjs.js +57 -41
  158. package/dist/dialog.esm.js +84 -51
  159. package/dist/dock.cjs.js +16 -30
  160. package/dist/dock.esm.js +26 -40
  161. package/dist/drawer.cjs.js +8 -12
  162. package/dist/drawer.esm.js +6 -10
  163. package/dist/dropdown.cjs.js +8 -6
  164. package/dist/dropdown.esm.js +33 -30
  165. package/dist/empty-state.cjs.js +17 -15
  166. package/dist/empty-state.esm.js +13 -11
  167. package/dist/field.cjs.js +22 -13
  168. package/dist/field.esm.js +54 -45
  169. package/dist/fieldset.cjs.js +18 -11
  170. package/dist/fieldset.esm.js +20 -13
  171. package/dist/file-upload.cjs.js +77 -35
  172. package/dist/file-upload.esm.js +152 -110
  173. package/dist/floating-toolbar.cjs.js +6 -7
  174. package/dist/floating-toolbar.esm.js +8 -9
  175. package/dist/form.cjs.js +20 -23
  176. package/dist/form.esm.js +20 -23
  177. package/dist/gantt.cjs.js +525 -110
  178. package/dist/gantt.esm.js +1882 -377
  179. package/dist/hover-card.cjs.js +7 -7
  180. package/dist/hover-card.esm.js +7 -7
  181. package/dist/icon-cloud.cjs.js +19 -36
  182. package/dist/icon-cloud.esm.js +41 -58
  183. package/dist/index.cjs.js +1 -1
  184. package/dist/index.d.ts +2 -0
  185. package/dist/index.d.ts.map +1 -1
  186. package/dist/index.esm.js +108 -104
  187. package/dist/inline-edit.cjs.js +47 -19
  188. package/dist/inline-edit.esm.js +66 -38
  189. package/dist/input.cjs.js +44 -37
  190. package/dist/input.esm.js +59 -52
  191. package/dist/layout.cjs.js +3 -3
  192. package/dist/layout.esm.js +3 -3
  193. package/dist/marquee.cjs.js +7 -10
  194. package/dist/marquee.esm.js +7 -10
  195. package/dist/menu.cjs.js +8 -24
  196. package/dist/menu.esm.js +52 -72
  197. package/dist/menubar.cjs.js +9 -31
  198. package/dist/menubar.esm.js +127 -153
  199. package/dist/meter.cjs.js +4 -9
  200. package/dist/meter.esm.js +6 -11
  201. package/dist/multi-select.cjs.js +48 -35
  202. package/dist/multi-select.esm.js +67 -53
  203. package/dist/navigation-menu.cjs.js +10 -10
  204. package/dist/navigation-menu.esm.js +33 -33
  205. package/dist/number-field.cjs.js +27 -16
  206. package/dist/number-field.esm.js +36 -25
  207. package/dist/odometer.cjs.js +5 -5
  208. package/dist/odometer.esm.js +3 -3
  209. package/dist/orbiter.cjs.js +11 -28
  210. package/dist/orbiter.esm.js +28 -45
  211. package/dist/overlay-motion-B56x1GoY.js +49 -0
  212. package/dist/overlay-motion-BX3dPLay.mjs +120 -0
  213. package/dist/pagination.cjs.js +28 -25
  214. package/dist/pagination.esm.js +54 -51
  215. package/dist/password-field.cjs.js +38 -33
  216. package/dist/password-field.esm.js +62 -57
  217. package/dist/pin-input.cjs.js +17 -13
  218. package/dist/pin-input.esm.js +23 -19
  219. package/dist/plugin-panel.cjs.js +1 -1
  220. package/dist/plugin-panel.esm.js +1 -1
  221. package/dist/popover.cjs.js +16 -28
  222. package/dist/popover.esm.js +29 -45
  223. package/dist/portal-DeaM1tYY.mjs +121 -0
  224. package/dist/portal-XbYR3m_q.js +1 -0
  225. package/dist/portal.d.ts +3 -1
  226. package/dist/portal.d.ts.map +1 -1
  227. package/dist/{positioner-D0VGxtYU.mjs → positioner-BE8Nbho2.mjs} +5 -3
  228. package/dist/{positioner-D_fqyx_j.js → positioner-DZ1FW6A9.js} +1 -1
  229. package/dist/positioner.cjs.js +1 -1
  230. package/dist/positioner.esm.js +1 -1
  231. package/dist/primitives/overlay-motion.d.ts +47 -0
  232. package/dist/primitives/overlay-motion.d.ts.map +1 -0
  233. package/dist/primitives/positioner.d.ts.map +1 -1
  234. package/dist/progress.cjs.js +11 -16
  235. package/dist/progress.esm.js +37 -42
  236. package/dist/quick-actions.cjs.js +13 -13
  237. package/dist/quick-actions.esm.js +11 -11
  238. package/dist/radio-group.cjs.js +50 -26
  239. package/dist/radio-group.esm.js +53 -29
  240. package/dist/radio.cjs.js +15 -12
  241. package/dist/radio.esm.js +15 -12
  242. package/dist/rating.cjs.js +11 -15
  243. package/dist/rating.esm.js +48 -50
  244. package/dist/{runtime-CFnK53iC.mjs → runtime-CQM6wZOc.mjs} +498 -514
  245. package/dist/runtime-DxCl0A5q.js +5 -0
  246. package/dist/runtime.cjs.js +1 -1
  247. package/dist/runtime.d.ts +3 -2
  248. package/dist/runtime.d.ts.map +1 -1
  249. package/dist/runtime.esm.js +36 -32
  250. package/dist/scroll-area.cjs.js +3 -4
  251. package/dist/scroll-area.esm.js +3 -4
  252. package/dist/section.cjs.js +2 -4
  253. package/dist/section.esm.js +2 -4
  254. package/dist/select.cjs.js +40 -73
  255. package/dist/select.esm.js +55 -87
  256. package/dist/selection-popup.cjs.js +3 -4
  257. package/dist/selection-popup.esm.js +3 -4
  258. package/dist/semantic-tokens.d.ts +17 -0
  259. package/dist/semantic-tokens.d.ts.map +1 -0
  260. package/dist/sidebar.cjs.js +22 -22
  261. package/dist/sidebar.esm.js +25 -25
  262. package/dist/skeleton.cjs.js +2 -2
  263. package/dist/skeleton.esm.js +2 -2
  264. package/dist/slider.cjs.js +22 -26
  265. package/dist/slider.esm.js +25 -29
  266. package/dist/sortable.cjs.js +4 -5
  267. package/dist/sortable.esm.js +4 -5
  268. package/dist/spinning-text.cjs.js +4 -13
  269. package/dist/spinning-text.esm.js +4 -13
  270. package/dist/split-button.cjs.js +5 -5
  271. package/dist/split-button.esm.js +15 -14
  272. package/dist/splitter.cjs.js +52 -10
  273. package/dist/splitter.esm.js +55 -13
  274. package/dist/stepper.cjs.js +31 -65
  275. package/dist/stepper.esm.js +32 -66
  276. package/dist/switch.cjs.js +20 -22
  277. package/dist/switch.esm.js +20 -22
  278. package/dist/table.cjs.js +5 -5
  279. package/dist/table.esm.js +20 -20
  280. package/dist/tabs.cjs.js +91 -21
  281. package/dist/tabs.esm.js +182 -112
  282. package/dist/tags-input.cjs.js +41 -15
  283. package/dist/tags-input.esm.js +73 -47
  284. package/dist/textarea.cjs.js +32 -33
  285. package/dist/textarea.esm.js +38 -39
  286. package/dist/theme.d.ts +25 -1
  287. package/dist/theme.d.ts.map +1 -1
  288. package/dist/time-field.cjs.js +7 -7
  289. package/dist/time-field.esm.js +6 -6
  290. package/dist/time-picker.cjs.js +16 -13
  291. package/dist/time-picker.esm.js +27 -24
  292. package/dist/timeline.cjs.js +10 -10
  293. package/dist/timeline.esm.js +7 -7
  294. package/dist/toggle-group.cjs.js +13 -13
  295. package/dist/toggle-group.esm.js +66 -61
  296. package/dist/toggle.cjs.js +52 -34
  297. package/dist/toggle.esm.js +80 -62
  298. package/dist/toolbar.cjs.js +14 -14
  299. package/dist/toolbar.esm.js +41 -33
  300. package/dist/tooltip.cjs.js +3 -3
  301. package/dist/tooltip.esm.js +39 -33
  302. package/dist/transfer-list.cjs.js +28 -29
  303. package/dist/transfer-list.esm.js +28 -29
  304. package/dist/{tree-B_oQput6.mjs → tree-33fVNnaf.mjs} +6 -5
  305. package/dist/{tree-SivHxcAy.js → tree-Dc02MChE.js} +6 -5
  306. package/dist/tree-item.cjs.js +9 -8
  307. package/dist/tree-item.esm.js +13 -12
  308. package/dist/tree.cjs.js +1 -1
  309. package/dist/tree.esm.js +1 -1
  310. package/dist/{ui-button-Co8Sid6t.mjs → ui-button-C3OmI7Sn.mjs} +152 -154
  311. package/dist/{ui-button-BPrzJScZ.js → ui-button-CnLwXBnx.js} +107 -109
  312. package/dist/wizard.cjs.js +39 -36
  313. package/dist/wizard.esm.js +39 -36
  314. package/package.json +1 -1
  315. package/dist/date-time-utils-y3AvNvGe.js +0 -1
  316. package/dist/portal-DgpQ3Jo1.js +0 -1
  317. package/dist/portal-bR42gHvG.mjs +0 -118
  318. package/dist/runtime-DwE-tizc.js +0 -1
@@ -1,60 +1,60 @@
1
- import "./portal-bR42gHvG.mjs";
2
- import "./positioner-D0VGxtYU.mjs";
3
- function k() {
1
+ import "./portal-DeaM1tYY.mjs";
2
+ import "./positioner-BE8Nbho2.mjs";
3
+ function C() {
4
4
  return typeof window < "u" && typeof document < "u";
5
5
  }
6
- function O(e) {
7
- return e ? typeof e == "string" ? e : e instanceof Error && e.message ? e.message : "Something went wrong. Please try again." : "Something went wrong. Please try again.";
6
+ function F(n) {
7
+ return n ? typeof n == "string" ? n : n instanceof Error && n.message ? n.message : "Something went wrong. Please try again." : "Something went wrong. Please try again.";
8
8
  }
9
- function R(e) {
10
- return e === "replace" || e === "stack" ? e : "queue";
9
+ function j(n) {
10
+ return n === "replace" || n === "stack" ? n : "queue";
11
11
  }
12
- function _(e) {
13
- return `ui-alert-dialog-${e}`;
12
+ function z(n) {
13
+ return `ui-alert-dialog-${n}`;
14
14
  }
15
- function H(e, a) {
16
- const r = e.kind === "alert" && a.action === "cancel" ? "dismiss" : a.action, i = e.dialog?.getChecked();
17
- if (e.kind === "prompt") {
18
- const s = e.dialog?.getInputValue() ?? e.value ?? "";
15
+ function B(n, a) {
16
+ const e = n.kind === "alert" && a.action === "cancel" ? "dismiss" : a.action, r = n.dialog?.getChecked();
17
+ if (n.kind === "prompt") {
18
+ const i = n.dialog?.getInputValue() ?? n.value ?? "";
19
19
  return {
20
- id: e.id,
21
- action: r,
22
- value: s,
23
- checked: i,
20
+ id: n.id,
21
+ action: e,
22
+ value: i,
23
+ checked: r,
24
24
  source: a.source,
25
25
  reason: a.reason
26
26
  };
27
27
  }
28
28
  return {
29
- id: e.id,
30
- action: r,
31
- value: e.value,
32
- checked: i,
29
+ id: n.id,
30
+ action: e,
31
+ value: n.value,
32
+ checked: r,
33
33
  source: a.source,
34
34
  reason: a.reason
35
35
  };
36
36
  }
37
- function h(e, a, r) {
38
- return e.kind === "prompt" ? {
39
- id: e.id,
37
+ function h(n, a, e) {
38
+ return n.kind === "prompt" ? {
39
+ id: n.id,
40
40
  action: "dismiss",
41
- value: e.dialog?.getInputValue() ?? e.value ?? "",
42
- checked: e.dialog?.getChecked(),
41
+ value: n.dialog?.getInputValue() ?? n.value ?? "",
42
+ checked: n.dialog?.getChecked(),
43
43
  source: a,
44
- reason: r
44
+ reason: e
45
45
  } : {
46
- id: e.id,
46
+ id: n.id,
47
47
  action: "dismiss",
48
- value: e.value,
49
- checked: e.dialog?.getChecked(),
48
+ value: n.value,
49
+ checked: n.dialog?.getChecked(),
50
50
  source: a,
51
- reason: r
51
+ reason: e
52
52
  };
53
53
  }
54
- function F(e) {
55
- return e === "esc" || e === "backdrop" || e === "close-icon" || e === "abort" || e === "unmount" || e === "replace" || e === "programmatic" ? e : "abort";
54
+ function N(n) {
55
+ return n === "esc" || n === "backdrop" || n === "close-icon" || n === "abort" || n === "unmount" || n === "replace" || n === "programmatic" ? n : "abort";
56
56
  }
57
- class $ {
57
+ class V {
58
58
  constructor(a) {
59
59
  this._container = null, this._ownsContainer = !1, this._queue = [], this._active = [], this._disposed = !1, this._seed = 0, this._defaults = {}, this._container = a ?? null;
60
60
  }
@@ -75,127 +75,127 @@ class $ {
75
75
  }
76
76
  destroy(a = "unmount") {
77
77
  this._disposed = !0;
78
- const r = [...this._active, ...this._queue];
78
+ const e = [...this._active, ...this._queue];
79
79
  this._queue = [];
80
- for (const i of r)
81
- this._settle(i, h(i, a), !1);
80
+ for (const r of e)
81
+ this._settle(r, h(r, a), !1);
82
82
  this._active = [], this._ownsContainer && this._container && this._container.parentElement && this._container.parentElement.removeChild(this._container), this._container = null, this._ownsContainer = !1;
83
83
  }
84
- _enqueue(a, r) {
85
- const i = this._mergeOptions(r);
86
- if (!k() || this._disposed) {
87
- const l = {
88
- id: i.id || _(++this._seed),
84
+ _enqueue(a, e) {
85
+ const r = this._mergeOptions(e);
86
+ if (!C() || this._disposed) {
87
+ const s = {
88
+ id: r.id || z(++this._seed),
89
89
  action: "dismiss",
90
90
  source: "unmount"
91
91
  };
92
- return Promise.resolve(l);
92
+ return Promise.resolve(s);
93
93
  }
94
- const s = i.id || _(++this._seed), n = R(i.mode);
95
- return new Promise((l) => {
96
- const d = {
97
- id: s,
94
+ const i = r.id || z(++this._seed), t = j(r.mode);
95
+ return new Promise((s) => {
96
+ const c = {
97
+ id: i,
98
98
  kind: a,
99
- mode: n,
100
- options: i,
99
+ mode: t,
100
+ options: r,
101
101
  settled: !1,
102
102
  processing: !1,
103
- resolve: l,
103
+ resolve: s,
104
104
  cleanup: []
105
105
  };
106
- if (i.signal?.aborted) {
107
- this._settle(d, h(d, "abort"), !1);
106
+ if (r.signal?.aborted) {
107
+ this._settle(c, h(c, "abort"), !1);
108
108
  return;
109
109
  }
110
- if (n === "replace") {
111
- const c = this._active[this._active.length - 1];
112
- c && this._settle(c, h(c, "replace", "replace"), !1, !1), this._open(d);
110
+ if (t === "replace") {
111
+ const d = this._active[this._active.length - 1];
112
+ d && this._settle(d, h(d, "replace", "replace"), !1, !1), this._open(c);
113
113
  return;
114
114
  }
115
- if (n === "stack") {
116
- this._open(d);
115
+ if (t === "stack") {
116
+ this._open(c);
117
117
  return;
118
118
  }
119
119
  if (this._active.length > 0) {
120
- this._queue.push(d);
120
+ this._queue.push(c);
121
121
  return;
122
122
  }
123
- this._open(d);
123
+ this._open(c);
124
124
  });
125
125
  }
126
126
  _open(a) {
127
- const r = this._ensureContainer();
128
- if (!r) {
127
+ const e = this._ensureContainer();
128
+ if (!e) {
129
129
  this._settle(a, h(a, "unmount"), !1);
130
130
  return;
131
131
  }
132
- const i = document.createElement("ui-alert-dialog");
133
- a.dialog = i, a.checked = !!a.options.checkbox?.defaultChecked;
134
- const s = this._buildConfig(a);
135
- i.dialogId = a.id, i.config = s;
136
- const n = (c) => {
132
+ const r = document.createElement("ui-alert-dialog");
133
+ a.dialog = r, a.checked = !!a.options.checkbox?.defaultChecked;
134
+ const i = this._buildConfig(a);
135
+ r.dialogId = a.id, r.config = i;
136
+ const t = (d) => {
137
137
  if (a.settled) return;
138
- const u = c.detail;
138
+ const u = d.detail;
139
139
  a.value = u?.inputValue, a.checked = u?.checked;
140
- const w = this._validatePrompt(a);
141
- if (w) {
142
- c.preventDefault(), i.setError(w);
140
+ const x = this._validatePrompt(a);
141
+ if (x) {
142
+ d.preventDefault(), r.setError(x);
143
143
  return;
144
144
  }
145
145
  if (!a.options.onConfirm) {
146
- i.clearError();
146
+ r.clearError();
147
147
  return;
148
148
  }
149
- c.preventDefault(), a.processing = !0, i.state = "loading", i.clearError(), Promise.resolve(
149
+ d.preventDefault(), a.processing = !0, r.state = "loading", r.clearError(), Promise.resolve(
150
150
  a.options.onConfirm({
151
151
  id: a.id,
152
152
  value: a.value,
153
153
  checked: a.checked,
154
- dialog: i,
154
+ dialog: r,
155
155
  signal: a.options.signal
156
156
  })
157
157
  ).then(() => {
158
- a.processing = !1, i.state = "idle", i.clearError(), a.settled || i.close("confirm");
159
- }).catch((M) => {
160
- a.processing = !1, i.state = "error", i.setError(O(M));
158
+ a.processing = !1, r.state = "idle", r.clearError(), a.settled || r.close("confirm");
159
+ }).catch((k) => {
160
+ a.processing = !1, r.state = "error", r.setError(F(k));
161
161
  });
162
- }, l = () => {
163
- a.settled || (a.value = i.getInputValue(), a.checked = i.getChecked(), i.state === "error" && i.clearError());
164
- }, d = (c) => {
162
+ }, s = () => {
163
+ a.settled || (a.value = r.getInputValue(), a.checked = r.getChecked(), r.state === "error" && r.clearError());
164
+ }, c = (d) => {
165
165
  if (a.settled) return;
166
- const u = c.detail;
166
+ const u = d.detail;
167
167
  this._handleClose(a, u);
168
168
  };
169
- if (i.addEventListener("ui-confirm", n), i.addEventListener("ui-change", l), i.addEventListener("ui-close", d), a.cleanup.push(() => i.removeEventListener("ui-confirm", n)), a.cleanup.push(() => i.removeEventListener("ui-change", l)), a.cleanup.push(() => i.removeEventListener("ui-close", d)), a.options.signal) {
170
- const c = () => {
169
+ if (r.addEventListener("ui-confirm", t), r.addEventListener("ui-change", s), r.addEventListener("ui-close", c), a.cleanup.push(() => r.removeEventListener("ui-confirm", t)), a.cleanup.push(() => r.removeEventListener("ui-change", s)), a.cleanup.push(() => r.removeEventListener("ui-close", c)), a.options.signal) {
170
+ const d = () => {
171
171
  a.settled || this._settle(a, h(a, "abort"), !1);
172
172
  };
173
- a.options.signal.addEventListener("abort", c, { once: !0 }), a.cleanup.push(() => a.options.signal?.removeEventListener("abort", c));
173
+ a.options.signal.addEventListener("abort", d, { once: !0 }), a.cleanup.push(() => a.options.signal?.removeEventListener("abort", d));
174
174
  }
175
- this._active.push(a), r.appendChild(i), i.open = !0, this._updateStackZIndex();
175
+ this._active.push(a), e.appendChild(r), r.open = !0, this._updateStackZIndex();
176
176
  }
177
177
  _validatePrompt(a) {
178
178
  if (a.kind !== "prompt") return null;
179
- const i = a.options.input, s = a.dialog?.getInputValue() ?? a.value ?? "";
180
- return i?.required && !s.trim() ? "Please enter a value." : i?.validate ? i.validate(s) : null;
179
+ const r = a.options.input, i = a.dialog?.getInputValue() ?? a.value ?? "";
180
+ return r?.required && !i.trim() ? "Please enter a value." : r?.validate ? r.validate(i) : null;
181
181
  }
182
- _settle(a, r, i, s = !0) {
182
+ _settle(a, e, r, i = !0) {
183
183
  if (!a.settled) {
184
- if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((n) => n !== a), this._queue = this._queue.filter((n) => n !== a), a.dialog) {
185
- const n = a.dialog;
186
- if (!i && n.open) {
187
- const l = F(r.source);
188
- n.close("dismiss", l, r.reason);
184
+ if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((t) => t !== a), this._queue = this._queue.filter((t) => t !== a), a.dialog) {
185
+ const t = a.dialog;
186
+ if (!r && t.open) {
187
+ const s = N(e.source);
188
+ t.close("dismiss", s, e.reason);
189
189
  }
190
- n.parentElement && n.parentElement.removeChild(n);
190
+ t.parentElement && t.parentElement.removeChild(t);
191
191
  }
192
- a.resolve(r), this._updateStackZIndex(), !this._disposed && s && this._drainQueue();
192
+ a.resolve(e), this._updateStackZIndex(), !this._disposed && i && this._drainQueue();
193
193
  }
194
194
  }
195
195
  _cleanupRequest(a) {
196
- for (const r of a.cleanup.splice(0))
196
+ for (const e of a.cleanup.splice(0))
197
197
  try {
198
- r();
198
+ e();
199
199
  } catch {
200
200
  }
201
201
  }
@@ -205,44 +205,44 @@ class $ {
205
205
  a && this._open(a);
206
206
  }
207
207
  _buildConfig(a) {
208
- const r = a.options, i = a.kind === "prompt", s = a.kind === "alert", n = i ? r.input : void 0;
208
+ const e = a.options, r = a.kind === "prompt", i = a.kind === "alert", t = r ? e.input : void 0;
209
209
  return {
210
210
  id: a.id,
211
- title: r.title,
212
- description: r.description,
213
- confirmText: r.confirmText || (s ? "OK" : "Confirm"),
214
- cancelText: r.cancelText || "Cancel",
215
- loadingText: r.loadingText,
216
- errorMessage: r.errorMessage,
217
- dismissible: r.dismissible ?? !0,
218
- closeOnEsc: r.closeOnEsc,
219
- closeOnBackdrop: r.closeOnBackdrop,
220
- lockWhileLoading: r.lockWhileLoading ?? !0,
221
- role: r.role || "alertdialog",
222
- tone: r.tone || (s ? "info" : i ? "neutral" : "warning"),
223
- size: r.size || "md",
224
- variant: r.variant || "surface",
225
- radius: r.radius,
226
- elevation: r.elevation || "low",
227
- indicator: r.indicator || "line",
228
- initialFocus: r.initialFocus,
229
- ariaLabel: r.ariaLabel,
230
- ariaLabelledby: r.ariaLabelledby,
231
- ariaDescribedby: r.ariaDescribedby,
232
- headless: r.headless,
233
- showCancel: !s,
234
- showClose: r.dismissible ?? !0,
211
+ title: e.title,
212
+ description: e.description,
213
+ confirmText: e.confirmText || (i ? "OK" : "Confirm"),
214
+ cancelText: e.cancelText || "Cancel",
215
+ loadingText: e.loadingText,
216
+ errorMessage: e.errorMessage,
217
+ dismissible: e.dismissible ?? !0,
218
+ closeOnEsc: e.closeOnEsc,
219
+ closeOnBackdrop: e.closeOnBackdrop,
220
+ lockWhileLoading: e.lockWhileLoading ?? !0,
221
+ role: e.role || "alertdialog",
222
+ tone: e.tone || (i ? "info" : r ? "neutral" : "warning"),
223
+ size: e.size || "md",
224
+ variant: e.variant || "surface",
225
+ radius: e.radius,
226
+ elevation: e.elevation || "low",
227
+ indicator: e.indicator || "line",
228
+ initialFocus: e.initialFocus,
229
+ ariaLabel: e.ariaLabel,
230
+ ariaLabelledby: e.ariaLabelledby,
231
+ ariaDescribedby: e.ariaDescribedby,
232
+ headless: e.headless,
233
+ showCancel: !i,
234
+ showClose: e.dismissible ?? !0,
235
235
  input: {
236
- enabled: i,
237
- label: n?.label,
238
- placeholder: n?.placeholder,
239
- value: n?.defaultValue || "",
240
- required: n?.required
236
+ enabled: r,
237
+ label: t?.label,
238
+ placeholder: t?.placeholder,
239
+ value: t?.defaultValue || "",
240
+ required: t?.required
241
241
  },
242
242
  checkbox: {
243
- enabled: !!r.checkbox?.enabled,
244
- label: r.checkbox?.label,
245
- checked: r.checkbox?.defaultChecked
243
+ enabled: !!e.checkbox?.enabled,
244
+ label: e.checkbox?.label,
245
+ checked: e.checkbox?.defaultChecked
246
246
  }
247
247
  };
248
248
  }
@@ -255,84 +255,84 @@ class $ {
255
255
  signal: a.options.signal
256
256
  };
257
257
  }
258
- _handleClose(a, r) {
259
- const i = H(a, r);
260
- if (r.action === "cancel" && a.options.onCancel) {
258
+ _handleClose(a, e) {
259
+ const r = B(a, e);
260
+ if (e.action === "cancel" && a.options.onCancel) {
261
261
  Promise.resolve(a.options.onCancel(this._buildLifecycleContext(a))).finally(() => {
262
- this._settle(a, i, !0);
262
+ this._settle(a, r, !0);
263
263
  });
264
264
  return;
265
265
  }
266
- if (r.action === "dismiss" && a.options.onDismiss) {
266
+ if (e.action === "dismiss" && a.options.onDismiss) {
267
267
  Promise.resolve(
268
268
  a.options.onDismiss({
269
269
  ...this._buildLifecycleContext(a),
270
- source: r.source || "programmatic",
271
- reason: r.reason
270
+ source: e.source || "programmatic",
271
+ reason: e.reason
272
272
  })
273
273
  ).finally(() => {
274
- this._settle(a, i, !0);
274
+ this._settle(a, r, !0);
275
275
  });
276
276
  return;
277
277
  }
278
- this._settle(a, i, !0);
278
+ this._settle(a, r, !0);
279
279
  }
280
280
  _mergeOptions(a) {
281
- const r = this._defaults;
281
+ const e = this._defaults;
282
282
  return {
283
- ...r,
283
+ ...e,
284
284
  ...a,
285
285
  checkbox: {
286
- ...r.checkbox || {},
286
+ ...e.checkbox || {},
287
287
  ...a.checkbox || {}
288
288
  }
289
289
  };
290
290
  }
291
291
  _ensureContainer() {
292
- if (!k()) return null;
292
+ if (!C()) return null;
293
293
  if (this._container && this._container.isConnected) return this._container;
294
294
  let a = document.querySelector('[data-ui-alert-dialog-host="true"]');
295
295
  return a ? this._ownsContainer = !1 : (a = document.createElement("div"), a.setAttribute("data-ui-alert-dialog-host", "true"), a.style.position = "relative", a.style.zIndex = "1000", document.body.appendChild(a), this._ownsContainer = !0), this._container = a, a;
296
296
  }
297
297
  _updateStackZIndex() {
298
298
  for (let a = 0; a < this._active.length; a += 1) {
299
- const r = this._active[a];
300
- r.dialog && (r.dialog.style.setProperty("--ui-alert-backdrop-z", String(1e3 + a * 2)), r.dialog.style.setProperty("--ui-alert-z", String(1001 + a * 2)));
299
+ const e = this._active[a];
300
+ e.dialog && (e.dialog.style.setProperty("--ui-alert-backdrop-z", String(1e3 + a * 2)), e.dialog.style.setProperty("--ui-alert-z", String(1001 + a * 2)));
301
301
  }
302
302
  }
303
303
  }
304
- let m = null;
305
- function B(e = {}) {
306
- return new $(e.container ?? null);
304
+ let g = null;
305
+ function Z(n = {}) {
306
+ return new V(n.container ?? null);
307
307
  }
308
- function y() {
309
- return m || (m = B()), m;
308
+ function S() {
309
+ return g || (g = Z()), g;
310
310
  }
311
- function Y(e = {}) {
312
- return y().alert(e);
311
+ function da(n = {}) {
312
+ return S().alert(n);
313
313
  }
314
- function q(e = {}) {
315
- return y().confirm(e);
314
+ function fa(n = {}) {
315
+ return S().confirm(n);
316
316
  }
317
- function aa(e = {}) {
318
- return y().prompt(e);
317
+ function ua(n = {}) {
318
+ return S().prompt(n);
319
319
  }
320
- function ea(e = "programmatic") {
321
- m && (m.destroy(e), m = null);
320
+ function ga(n = "programmatic") {
321
+ g && (g.destroy(n), g = null);
322
322
  }
323
- function S() {
323
+ function E() {
324
324
  return typeof window < "u" && typeof document < "u";
325
325
  }
326
- function V(e) {
327
- return e === "replace" || e === "stack" ? e : "queue";
326
+ function U(n) {
327
+ return n === "replace" || n === "stack" ? n : "queue";
328
328
  }
329
- function C(e) {
330
- return `ui-dialog-${e}`;
329
+ function A(n) {
330
+ return `ui-dialog-${n}`;
331
331
  }
332
- function j(e) {
333
- return e ? typeof e == "string" ? e : e instanceof Error && e.message ? e.message : "Something went wrong. Please try again." : "Something went wrong. Please try again.";
332
+ function Q(n) {
333
+ return n ? typeof n == "string" ? n : n instanceof Error && n.message ? n.message : "Something went wrong. Please try again." : "Something went wrong. Please try again.";
334
334
  }
335
- class Z {
335
+ class W {
336
336
  constructor(a) {
337
337
  this._container = null, this._ownsContainer = !1, this._queue = [], this._active = [], this._disposed = !1, this._seed = 0, this._container = a ?? null;
338
338
  }
@@ -347,11 +347,11 @@ class Z {
347
347
  }
348
348
  destroy(a = "unmount") {
349
349
  this._disposed = !0;
350
- const r = [...this._active, ...this._queue];
350
+ const e = [...this._active, ...this._queue];
351
351
  this._queue = [];
352
- for (const i of r)
353
- this._settle(i, {
354
- id: i.id,
352
+ for (const r of e)
353
+ this._settle(r, {
354
+ id: r.id,
355
355
  action: "dismiss",
356
356
  source: a,
357
357
  reason: a
@@ -359,45 +359,45 @@ class Z {
359
359
  this._active = [], this._ownsContainer && this._container && this._container.parentElement && this._container.parentElement.removeChild(this._container), this._container = null, this._ownsContainer = !1;
360
360
  }
361
361
  _enqueue(a) {
362
- if (!S() || this._disposed)
362
+ if (!E() || this._disposed)
363
363
  return Promise.resolve({
364
- id: a.id || C(++this._seed),
364
+ id: a.id || A(++this._seed),
365
365
  action: "dismiss",
366
366
  source: "unmount"
367
367
  });
368
- const r = a.id || C(++this._seed), i = V(a.mode);
369
- return new Promise((s) => {
370
- const n = {
371
- id: r,
372
- mode: i,
368
+ const e = a.id || A(++this._seed), r = U(a.mode);
369
+ return new Promise((i) => {
370
+ const t = {
371
+ id: e,
372
+ mode: r,
373
373
  options: a,
374
374
  settled: !1,
375
- resolve: s,
375
+ resolve: i,
376
376
  cleanup: []
377
377
  };
378
378
  if (a.signal?.aborted) {
379
- this._settle(n, { id: r, action: "dismiss", source: "abort" }, !1);
379
+ this._settle(t, { id: e, action: "dismiss", source: "abort" }, !1);
380
380
  return;
381
381
  }
382
- if (i === "replace") {
383
- const l = this._active[this._active.length - 1];
384
- l && this._settle(l, { id: l.id, action: "dismiss", source: "replace", reason: "replace" }, !1, !1), this._open(n);
382
+ if (r === "replace") {
383
+ const s = this._active[this._active.length - 1];
384
+ s && this._settle(s, { id: s.id, action: "dismiss", source: "replace", reason: "replace" }, !1, !1), this._open(t);
385
385
  return;
386
386
  }
387
- if (i === "stack") {
388
- this._open(n);
387
+ if (r === "stack") {
388
+ this._open(t);
389
389
  return;
390
390
  }
391
391
  if (this._active.length > 0) {
392
- this._queue.push(n);
392
+ this._queue.push(t);
393
393
  return;
394
394
  }
395
- this._open(n);
395
+ this._open(t);
396
396
  });
397
397
  }
398
398
  _open(a) {
399
- const r = this._ensureContainer();
400
- if (!r) {
399
+ const e = this._ensureContainer();
400
+ if (!e) {
401
401
  this._settle(a, {
402
402
  id: a.id,
403
403
  action: "dismiss",
@@ -405,65 +405,65 @@ class Z {
405
405
  }, !1);
406
406
  return;
407
407
  }
408
- const i = document.createElement("ui-dialog");
409
- a.dialog = i;
410
- const s = this._buildConfig(a.options, a.id);
411
- i.dialogId = a.id, i.config = s;
412
- const n = (d) => {
408
+ const r = document.createElement("ui-dialog");
409
+ a.dialog = r;
410
+ const i = this._buildConfig(a.options, a.id);
411
+ r.dialogId = a.id, r.config = i;
412
+ const t = (c) => {
413
413
  if (a.settled) return;
414
- const c = d.detail;
415
- if (a.resultFormData = c?.formData, !a.options.onSubmit) {
416
- i.clearError();
414
+ const d = c.detail;
415
+ if (a.resultFormData = d?.formData, !a.options.onSubmit) {
416
+ r.clearError();
417
417
  return;
418
418
  }
419
- d.preventDefault(), i.state = "loading", i.clearError(), Promise.resolve(
419
+ c.preventDefault(), r.state = "loading", r.clearError(), Promise.resolve(
420
420
  a.options.onSubmit({
421
421
  id: a.id,
422
- dialog: i,
422
+ dialog: r,
423
423
  signal: a.options.signal,
424
- formData: c?.formData
424
+ formData: d?.formData
425
425
  })
426
426
  ).then(() => {
427
- a.settled || (i.state = "idle", i.clearError(), i.close("submit"));
427
+ a.settled || (r.state = "idle", r.clearError(), r.close("submit"));
428
428
  }).catch((u) => {
429
- i.state = "error", i.setError(j(u));
429
+ r.state = "error", r.setError(Q(u));
430
430
  });
431
- }, l = (d) => {
431
+ }, s = (c) => {
432
432
  if (a.settled) return;
433
- const c = d.detail;
433
+ const d = c.detail;
434
434
  this._settle(a, {
435
435
  id: a.id,
436
- action: c.action,
437
- source: c.source,
438
- reason: c.reason,
436
+ action: d.action,
437
+ source: d.source,
438
+ reason: d.reason,
439
439
  formData: a.resultFormData
440
440
  }, !0);
441
441
  };
442
- if (i.addEventListener("ui-submit", n), i.addEventListener("ui-close", l), a.cleanup.push(() => i.removeEventListener("ui-submit", n)), a.cleanup.push(() => i.removeEventListener("ui-close", l)), a.options.signal) {
443
- const d = () => {
442
+ if (r.addEventListener("ui-submit", t), r.addEventListener("ui-close", s), a.cleanup.push(() => r.removeEventListener("ui-submit", t)), a.cleanup.push(() => r.removeEventListener("ui-close", s)), a.options.signal) {
443
+ const c = () => {
444
444
  a.settled || this._settle(a, {
445
445
  id: a.id,
446
446
  action: "dismiss",
447
447
  source: "abort"
448
448
  }, !1);
449
449
  };
450
- a.options.signal.addEventListener("abort", d, { once: !0 }), a.cleanup.push(() => a.options.signal?.removeEventListener("abort", d));
450
+ a.options.signal.addEventListener("abort", c, { once: !0 }), a.cleanup.push(() => a.options.signal?.removeEventListener("abort", c));
451
451
  }
452
- this._active.push(a), r.appendChild(i), i.openDialog(), this._updateStackZIndex();
452
+ this._active.push(a), e.appendChild(r), r.openDialog(), this._updateStackZIndex();
453
453
  }
454
- _settle(a, r, i, s = !0) {
454
+ _settle(a, e, r, i = !0) {
455
455
  if (!a.settled) {
456
- if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((n) => n !== a), this._queue = this._queue.filter((n) => n !== a), a.dialog) {
457
- const n = a.dialog;
458
- !i && n.open && n.close("dismiss", r.source || "abort", r.reason), n.parentElement && n.parentElement.removeChild(n);
456
+ if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((t) => t !== a), this._queue = this._queue.filter((t) => t !== a), a.dialog) {
457
+ const t = a.dialog;
458
+ !r && t.open && t.close("dismiss", e.source || "abort", e.reason), t.parentElement && t.parentElement.removeChild(t);
459
459
  }
460
- a.resolve(r), this._updateStackZIndex(), !this._disposed && s && this._drainQueue();
460
+ a.resolve(e), this._updateStackZIndex(), !this._disposed && i && this._drainQueue();
461
461
  }
462
462
  }
463
463
  _cleanupRequest(a) {
464
- for (const r of a.cleanup.splice(0))
464
+ for (const e of a.cleanup.splice(0))
465
465
  try {
466
- r();
466
+ e();
467
467
  } catch {
468
468
  }
469
469
  }
@@ -472,9 +472,9 @@ class Z {
472
472
  const a = this._queue.shift();
473
473
  a && this._open(a);
474
474
  }
475
- _buildConfig(a, r) {
475
+ _buildConfig(a, e) {
476
476
  return {
477
- id: r,
477
+ id: e,
478
478
  title: a.title,
479
479
  description: a.description,
480
480
  submitText: a.submitText || "Submit",
@@ -497,35 +497,48 @@ class Z {
497
497
  };
498
498
  }
499
499
  _ensureContainer() {
500
- if (!S()) return null;
500
+ if (!E()) return null;
501
501
  if (this._container && this._container.isConnected) return this._container;
502
502
  let a = document.querySelector('[data-ui-dialog-host="true"]');
503
503
  return a ? this._ownsContainer = !1 : (a = document.createElement("div"), a.setAttribute("data-ui-dialog-host", "true"), a.style.position = "relative", a.style.zIndex = "1200", document.body.appendChild(a), this._ownsContainer = !0), this._container = a, a;
504
504
  }
505
505
  _updateStackZIndex() {
506
506
  for (let a = 0; a < this._active.length; a += 1) {
507
- const r = this._active[a];
508
- r.dialog && (r.dialog.style.setProperty("--ui-dialog-backdrop-z", String(1200 + a * 2)), r.dialog.style.setProperty("--ui-dialog-z", String(1201 + a * 2)));
507
+ const e = this._active[a];
508
+ e.dialog && (e.dialog.style.setProperty("--ui-dialog-backdrop-z", String(1200 + a * 2)), e.dialog.style.setProperty("--ui-dialog-z", String(1201 + a * 2)));
509
509
  }
510
510
  }
511
511
  }
512
- let g = null;
513
- function U(e = {}) {
514
- return new Z(e.container ?? null);
512
+ let m = null;
513
+ function G(n = {}) {
514
+ return new W(n.container ?? null);
515
+ }
516
+ function L() {
517
+ return m || (m = G()), m;
515
518
  }
516
- function A() {
517
- return g || (g = U()), g;
519
+ function ma(n = {}) {
520
+ return L().open(n);
518
521
  }
519
- function ia(e = {}) {
520
- return A().open(e);
522
+ function xa(n = {}) {
523
+ return L().confirm(n);
521
524
  }
522
- function ra(e = {}) {
523
- return A().confirm(e);
525
+ function ha(n = "programmatic") {
526
+ m && (m.destroy(n), m = null);
524
527
  }
525
- function oa(e = "programmatic") {
526
- g && (g.destroy(e), g = null);
528
+ const K = ["1", "2", "3", "4"], X = { 1: "24px", 2: "32px", 3: "40px", 4: "48px" }, J = { 1: "12px", 2: "14px", 3: "16px", 4: "18px" }, Y = { 1: "8px", 2: "12px", 3: "16px", 4: "20px" }, q = { 1: 0, 2: 0, 3: 2, 4: 4 };
529
+ function aa(n) {
530
+ const a = n.palette?.gray || {}, e = n.palette?.accent || {}, r = n.radiusScale || {}, i = n.colors, t = {}, s = (c, d) => {
531
+ d && (t[c] = d);
532
+ };
533
+ s("--ui-color-surface-subtle", a[2]), s("--ui-color-fill", a[3]), s("--ui-color-fill-hover", a[4]), s("--ui-color-fill-active", a[5]), s("--ui-color-line-subtle", a[6]), s("--ui-color-line", a[7]), s("--ui-color-line-strong", a[8]), s("--ui-color-text-secondary", a[11] || i.muted), s("--ui-color-text-strong", a[12] || i.text), s("--ui-color-accent-subtle", e[2]), s("--ui-color-accent-fill", e[3]), s("--ui-color-accent-fill-hover", e[4]), s("--ui-color-accent-fill-active", e[5]), s("--ui-color-accent-line", e[7]), s("--ui-color-accent-solid", e[9] || i.primary), s("--ui-color-accent-solid-hover", e[10] || i.primaryHover || i.primary), s("--ui-color-accent-text", e[11]), s("--ui-color-surface-elevated", n.surfaces?.panelSolid || i.surfaceAlt || i.surface), s("--ui-color-info", i.info), s("--ui-color-placeholder", i.text ? `color-mix(in srgb, ${i.text} 62%, transparent)` : void 0), s("--ui-ring-color", i.focusRing || i.primary), t["--ui-ring-width"] = "2px", t["--ui-ring-offset"] = "2px";
534
+ for (const c of K) {
535
+ t[`--ui-control-height-${c}`] = X[c], t[`--ui-control-font-size-${c}`] = J[c], t[`--ui-control-padding-inline-${c}`] = Y[c];
536
+ const d = q[c], u = n.radius || r[2] || "6px";
537
+ t[`--ui-control-radius-${c}`] = d ? `calc(${u} + ${d}px)` : u;
538
+ }
539
+ return t["--ui-motion-enter-easing"] = "cubic-bezier(0.16, 1, 0.3, 1)", t["--ui-motion-exit-easing"] = "cubic-bezier(0.4, 0, 1, 1)", s("--ui-font-family-mono", n.typography?.codeFamily || "monospace"), s("--font-mono", n.typography?.codeFamily || "monospace"), s("--ui-breakpoint-xl", n.breakpoints?.xl || "1280px"), t;
527
540
  }
528
- const P = {
541
+ const O = {
529
542
  1: "#0000000d",
530
543
  2: "#0000001a",
531
544
  3: "#00000026",
@@ -538,7 +551,7 @@ const P = {
538
551
  10: "#000c",
539
552
  11: "#000000e6",
540
553
  12: "#000000f2"
541
- }, T = {
554
+ }, I = {
542
555
  1: "#ffffff0d",
543
556
  2: "#ffffff1a",
544
557
  3: "#ffffff26",
@@ -902,11 +915,8 @@ const P = {
902
915
  track: "#7b7b7b"
903
916
  }
904
917
  }
905
- }, Q = {
918
+ }, ea = {
906
919
  button: {
907
- "height-sm": "32px",
908
- "height-md": "36px",
909
- "height-lg": "44px",
910
920
  "classic-after-inset": "2px",
911
921
  "classic-box-shadow-top": "inset 0 0 0 1px var(--gray-a5), inset 0 1px 1px var(--white-a10)",
912
922
  "classic-box-shadow-bottom": "inset 0 4px 2px -2px var(--white-a9), inset 0 2px 1px -1px var(--white-a9)",
@@ -915,14 +925,7 @@ const P = {
915
925
  "solid-active-filter": "brightness(0.96) saturate(1.02)"
916
926
  },
917
927
  badge: {
918
- radius: "999px",
919
- shadow: "none",
920
- "font-size": "12px",
921
- "font-weight": "600",
922
- gap: "6px",
923
- "padding-block": "5px",
924
- "padding-inline": "10px",
925
- "border-width": "1px"
928
+ shadow: "none"
926
929
  },
927
930
  blockControls: {
928
931
  bg: "var(--color-panel)",
@@ -967,12 +970,8 @@ const P = {
967
970
  },
968
971
  select: {
969
972
  bg: "var(--color-panel-solid)",
970
- border: "1px solid color-mix(in srgb, var(--gray-a5) 82%, transparent)",
971
973
  radius: "var(--ui-radius)",
972
974
  shadow: "none",
973
- "height-sm": "34px",
974
- "height-md": "42px",
975
- "height-lg": "46px",
976
975
  "padding-x": "12px",
977
976
  gap: "8px",
978
977
  "label-color": "var(--ui-color-text)",
@@ -995,31 +994,18 @@ const P = {
995
994
  },
996
995
  sidebar: {
997
996
  bg: "var(--color-panel-solid)",
998
- border: "1px solid color-mix(in srgb, var(--gray-a5) 82%, transparent)",
999
- radius: "4px",
1000
- shadow: "var(--shadow-5)",
1001
997
  padding: "12px",
1002
998
  gap: "12px",
1003
999
  "header-padding": "6px 8px 10px",
1004
- "item-radius": "4px",
1005
- "item-height": "45px",
1006
- "item-padding-x": "6px",
1007
- "item-padding-y": "3px",
1008
1000
  "item-gap": "8px",
1009
- "item-font-size": "12px",
1010
- "item-line-height": "22px",
1011
1001
  "section-gap": "10px",
1012
1002
  "section-label-size": "12px",
1013
1003
  "section-label-spacing": "0.06em",
1014
1004
  "submenu-indent": "18px",
1015
- "promo-radius": "4px",
1016
1005
  "promo-padding": "18px"
1017
1006
  },
1018
1007
  card: {
1019
1008
  bg: "var(--color-panel-solid)",
1020
- border: "1px solid color-mix(in srgb, var(--gray-a5) 82%, transparent)",
1021
- radius: "var(--ui-radius)",
1022
- shadow: "var(--shadow-2)",
1023
1009
  "hover-shadow": "var(--shadow-3)",
1024
1010
  "active-shadow": "var(--shadow-2)",
1025
1011
  "classic-shadow": "var(--shadow-2)",
@@ -1028,14 +1014,9 @@ const P = {
1028
1014
  },
1029
1015
  multiSelect: {
1030
1016
  bg: "var(--color-panel-solid)",
1031
- border: "1px solid color-mix(in srgb, var(--gray-a5) 82%, transparent)",
1032
1017
  radius: "var(--ui-radius)",
1033
1018
  shadow: "none",
1034
- "height-sm": "38px",
1035
- "height-md": "44px",
1036
- "height-lg": "48px",
1037
1019
  "padding-x": "10px",
1038
- "padding-y": "8px",
1039
1020
  "panel-bg": "var(--color-panel-solid)",
1040
1021
  "panel-border": "1px solid color-mix(in srgb, var(--gray-a5) 84%, transparent)",
1041
1022
  "panel-radius": "calc(var(--ui-radius) + 2px)",
@@ -1043,7 +1024,6 @@ const P = {
1043
1024
  "chip-radius": "999px",
1044
1025
  "chip-gap": "6px",
1045
1026
  "chip-padding-x": "10px",
1046
- "chip-padding-y": "6px",
1047
1027
  "option-radius": "10px",
1048
1028
  "option-gap": "10px",
1049
1029
  "option-padding-x": "10px",
@@ -1051,12 +1031,8 @@ const P = {
1051
1031
  },
1052
1032
  navigationMenu: {
1053
1033
  bg: "var(--color-panel-solid)",
1054
- border: "1px solid color-mix(in srgb, var(--gray-a5) 80%, transparent)",
1055
- radius: "var(--radius-4)",
1056
- shadow: "var(--shadow-2)",
1057
1034
  padding: "6px",
1058
1035
  gap: "6px",
1059
- "item-radius": "var(--radius-2)",
1060
1036
  "item-padding-x": "12px",
1061
1037
  "item-padding-y": "8px",
1062
1038
  "item-font-size": "14px",
@@ -1116,13 +1092,10 @@ const P = {
1116
1092
  },
1117
1093
  alert: {
1118
1094
  bg: "var(--color-panel-solid)",
1119
- border: "1px solid color-mix(in srgb, var(--gray-a5) 82%, transparent)",
1120
1095
  radius: "var(--ui-radius)",
1121
- shadow: "var(--shadow-2)",
1122
1096
  "padding-x": "16px",
1123
1097
  "padding-y": "14px",
1124
1098
  gap: "var(--ui-default-gap)",
1125
- "icon-size": "26px",
1126
1099
  "dismiss-size": "28px"
1127
1100
  },
1128
1101
  alertDialog: {
@@ -1140,9 +1113,7 @@ const P = {
1140
1113
  },
1141
1114
  appHeader: {
1142
1115
  bg: "var(--color-panel)",
1143
- border: "1px solid color-mix(in srgb, var(--gray-a5) 78%, transparent)",
1144
1116
  radius: "0px",
1145
- shadow: "none",
1146
1117
  padding: "16px",
1147
1118
  gap: "12px",
1148
1119
  height: "64px",
@@ -1158,10 +1129,7 @@ const P = {
1158
1129
  "badge-radius": "999px"
1159
1130
  },
1160
1131
  avatar: {
1161
- bg: "var(--color-panel-solid)",
1162
- border: "1px solid color-mix(in srgb, var(--gray-a5) 82%, transparent)",
1163
1132
  radius: "999px",
1164
- shadow: "0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 24px rgba(15, 23, 42, 0.12)",
1165
1133
  "size-sm": "30px",
1166
1134
  "size-md": "40px",
1167
1135
  "size-lg": "52px",
@@ -1194,18 +1162,10 @@ const P = {
1194
1162
  padding: "var(--ui-default-gap)"
1195
1163
  },
1196
1164
  input: {
1197
- "height-sm": "32px",
1198
- "height-md": "36px",
1199
- "height-lg": "44px",
1200
- bg: "var(--color-panel-solid)",
1201
- border: "1px solid color-mix(in srgb, var(--gray-a5) 84%, transparent)",
1202
- "focus-ring": "0 0 0 3px color-mix(in srgb, var(--accent-a5) 48%, transparent)"
1165
+ bg: "var(--color-panel-solid)"
1203
1166
  }
1204
- }, W = {
1167
+ }, na = {
1205
1168
  button: {
1206
- "height-sm": "32px",
1207
- "height-md": "36px",
1208
- "height-lg": "44px",
1209
1169
  "classic-after-inset": "1px",
1210
1170
  "classic-box-shadow-top": "inset 0 0 0 1px var(--white-a2), inset 0 4px 2px -2px var(--white-a3), inset 0 1px 1px var(--white-a6), inset 0 -1px 1px var(--black-a6)",
1211
1171
  "classic-box-shadow-bottom": "inset 0 0 0 1px var(--black-a4), inset 0 -1px 1px var(--black-a8)",
@@ -1214,14 +1174,7 @@ const P = {
1214
1174
  "solid-active-filter": "brightness(0.92) saturate(1.04)"
1215
1175
  },
1216
1176
  badge: {
1217
- radius: "999px",
1218
- shadow: "none",
1219
- "font-size": "12px",
1220
- "font-weight": "600",
1221
- gap: "6px",
1222
- "padding-block": "5px",
1223
- "padding-inline": "10px",
1224
- "border-width": "1px"
1177
+ shadow: "none"
1225
1178
  },
1226
1179
  blockControls: {
1227
1180
  bg: "var(--color-panel)",
@@ -1266,12 +1219,8 @@ const P = {
1266
1219
  },
1267
1220
  select: {
1268
1221
  bg: "var(--color-panel-solid)",
1269
- border: "1px solid color-mix(in srgb, var(--gray-a6) 88%, transparent)",
1270
1222
  radius: "var(--ui-radius)",
1271
1223
  shadow: "none",
1272
- "height-sm": "34px",
1273
- "height-md": "42px",
1274
- "height-lg": "46px",
1275
1224
  "padding-x": "12px",
1276
1225
  gap: "8px",
1277
1226
  "label-color": "var(--ui-color-text)",
@@ -1294,31 +1243,18 @@ const P = {
1294
1243
  },
1295
1244
  sidebar: {
1296
1245
  bg: "var(--color-panel-solid)",
1297
- border: "1px solid color-mix(in srgb, var(--gray-a6) 88%, transparent)",
1298
- radius: "4px",
1299
- shadow: "var(--shadow-5)",
1300
1246
  padding: "12px",
1301
1247
  gap: "12px",
1302
1248
  "header-padding": "6px 8px 10px",
1303
- "item-radius": "4px",
1304
- "item-height": "45px",
1305
- "item-padding-x": "6px",
1306
- "item-padding-y": "3px",
1307
1249
  "item-gap": "8px",
1308
- "item-font-size": "12px",
1309
- "item-line-height": "22px",
1310
1250
  "section-gap": "10px",
1311
1251
  "section-label-size": "12px",
1312
1252
  "section-label-spacing": "0.06em",
1313
1253
  "submenu-indent": "18px",
1314
- "promo-radius": "4px",
1315
1254
  "promo-padding": "18px"
1316
1255
  },
1317
1256
  card: {
1318
1257
  bg: "var(--color-panel-solid)",
1319
- border: "1px solid color-mix(in srgb, var(--gray-a6) 88%, transparent)",
1320
- radius: "var(--ui-radius)",
1321
- shadow: "var(--shadow-2)",
1322
1258
  "hover-shadow": "var(--shadow-3)",
1323
1259
  "active-shadow": "var(--shadow-2)",
1324
1260
  "classic-shadow": "var(--shadow-2)",
@@ -1327,14 +1263,9 @@ const P = {
1327
1263
  },
1328
1264
  multiSelect: {
1329
1265
  bg: "var(--color-panel-solid)",
1330
- border: "1px solid color-mix(in srgb, var(--gray-a6) 88%, transparent)",
1331
1266
  radius: "var(--ui-radius)",
1332
1267
  shadow: "none",
1333
- "height-sm": "38px",
1334
- "height-md": "44px",
1335
- "height-lg": "48px",
1336
1268
  "padding-x": "10px",
1337
- "padding-y": "8px",
1338
1269
  "panel-bg": "var(--color-panel-solid)",
1339
1270
  "panel-border": "1px solid color-mix(in srgb, var(--gray-a6) 88%, transparent)",
1340
1271
  "panel-radius": "calc(var(--ui-radius) + 2px)",
@@ -1342,7 +1273,6 @@ const P = {
1342
1273
  "chip-radius": "999px",
1343
1274
  "chip-gap": "6px",
1344
1275
  "chip-padding-x": "10px",
1345
- "chip-padding-y": "6px",
1346
1276
  "option-radius": "10px",
1347
1277
  "option-gap": "10px",
1348
1278
  "option-padding-x": "10px",
@@ -1350,12 +1280,8 @@ const P = {
1350
1280
  },
1351
1281
  navigationMenu: {
1352
1282
  bg: "var(--color-panel-solid)",
1353
- border: "1px solid color-mix(in srgb, var(--gray-a6) 84%, transparent)",
1354
- radius: "var(--radius-4)",
1355
- shadow: "var(--shadow-2)",
1356
1283
  padding: "6px",
1357
1284
  gap: "6px",
1358
- "item-radius": "var(--radius-2)",
1359
1285
  "item-padding-x": "12px",
1360
1286
  "item-padding-y": "8px",
1361
1287
  "item-font-size": "14px",
@@ -1415,13 +1341,10 @@ const P = {
1415
1341
  },
1416
1342
  alert: {
1417
1343
  bg: "var(--color-panel-solid)",
1418
- border: "1px solid color-mix(in srgb, var(--gray-a6) 88%, transparent)",
1419
1344
  radius: "var(--ui-radius)",
1420
- shadow: "var(--shadow-2)",
1421
1345
  "padding-x": "16px",
1422
1346
  "padding-y": "14px",
1423
1347
  gap: "var(--ui-default-gap)",
1424
- "icon-size": "26px",
1425
1348
  "dismiss-size": "28px"
1426
1349
  },
1427
1350
  alertDialog: {
@@ -1439,9 +1362,7 @@ const P = {
1439
1362
  },
1440
1363
  appHeader: {
1441
1364
  bg: "var(--color-panel)",
1442
- border: "1px solid color-mix(in srgb, var(--gray-a6) 82%, transparent)",
1443
1365
  radius: "0px",
1444
- shadow: "none",
1445
1366
  padding: "16px",
1446
1367
  gap: "12px",
1447
1368
  height: "64px",
@@ -1457,10 +1378,7 @@ const P = {
1457
1378
  "badge-radius": "999px"
1458
1379
  },
1459
1380
  avatar: {
1460
- bg: "var(--color-panel-solid)",
1461
- border: "1px solid color-mix(in srgb, var(--gray-a6) 88%, transparent)",
1462
1381
  radius: "999px",
1463
- shadow: "0 1px 2px rgba(2, 6, 23, 0.18), 0 12px 24px rgba(2, 6, 23, 0.28)",
1464
1382
  "size-sm": "30px",
1465
1383
  "size-md": "40px",
1466
1384
  "size-lg": "52px",
@@ -1493,49 +1411,44 @@ const P = {
1493
1411
  padding: "var(--ui-default-gap)"
1494
1412
  },
1495
1413
  input: {
1496
- "height-sm": "32px",
1497
- "height-md": "36px",
1498
- "height-lg": "44px",
1499
- bg: "var(--color-panel-solid)",
1500
- border: "1px solid color-mix(in srgb, var(--gray-a6) 88%, transparent)",
1501
- "focus-ring": "0 0 0 3px color-mix(in srgb, var(--accent-a6) 42%, transparent)"
1414
+ bg: "var(--color-panel-solid)"
1502
1415
  }
1503
1416
  };
1504
- function z(e) {
1505
- const a = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(e.trim())?.[1];
1417
+ function b(n) {
1418
+ const a = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(n.trim())?.[1];
1506
1419
  if (!a) return null;
1507
- const r = a.length === 3 ? a.replace(/./g, (s) => s + s) : a.slice(0, 6), i = (s) => {
1508
- const n = parseInt(r.slice(s, s + 2), 16) / 255;
1509
- return n <= 0.03928 ? n / 12.92 : ((n + 0.055) / 1.055) ** 2.4;
1420
+ const e = a.length === 3 ? a.replace(/./g, (i) => i + i) : a.slice(0, 6), r = (i) => {
1421
+ const t = parseInt(e.slice(i, i + 2), 16) / 255;
1422
+ return t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
1510
1423
  };
1511
- return 0.2126 * i(0) + 0.7152 * i(2) + 0.0722 * i(4);
1424
+ return 0.2126 * r(0) + 0.7152 * r(2) + 0.0722 * r(4);
1512
1425
  }
1513
- function b(e, a) {
1514
- const r = z(e), i = z(a);
1515
- return r === null || i === null ? null : (Math.max(r, i) + 0.05) / (Math.min(r, i) + 0.05);
1426
+ function _(n, a) {
1427
+ const e = b(n), r = b(a);
1428
+ return e === null || r === null ? null : (Math.max(e, r) + 0.05) / (Math.min(e, r) + 0.05);
1516
1429
  }
1517
- function N(e, a) {
1518
- const r = e?.colors;
1519
- if (!r?.primary) return {};
1520
- const i = r.foregroundOnPrimary;
1521
- return a ? r.primary === a.colors?.primary ? {} : i && i !== a.colors?.foregroundOnPrimary ? {} : { foregroundOnPrimary: v(r.primary, a.colors?.foregroundOnPrimary || "#ffffff") } : i ? {} : { foregroundOnPrimary: v(r.primary, "#ffffff") };
1430
+ function ra(n, a) {
1431
+ const e = n?.colors;
1432
+ if (!e?.primary) return {};
1433
+ const r = e.foregroundOnPrimary;
1434
+ return a ? e.primary === a.colors?.primary ? {} : r && r !== a.colors?.foregroundOnPrimary ? {} : { foregroundOnPrimary: v(e.primary, a.colors?.foregroundOnPrimary || "#ffffff") } : r ? {} : { foregroundOnPrimary: v(e.primary, "#ffffff") };
1522
1435
  }
1523
- function v(e, a) {
1524
- const r = b(a, e);
1525
- if (r === null || r >= 4.5) return a;
1526
- const i = b("#ffffff", e) ?? 0;
1527
- return (b("#111111", e) ?? 0) > i ? "#111111" : "#ffffff";
1436
+ function v(n, a) {
1437
+ const e = _(a, n);
1438
+ if (e === null || e >= 4.5) return a;
1439
+ const r = _("#ffffff", n) ?? 0;
1440
+ return (_("#111111", n) ?? 0) > r ? "#111111" : "#ffffff";
1528
1441
  }
1529
- function D(e) {
1442
+ function P(n) {
1530
1443
  return {
1531
- primary: e.scale[9],
1532
- primaryHover: e.scale[10] || e.scale[9],
1533
- foregroundOnPrimary: v(e.scale[9], e.contrast),
1534
- focusRing: e.scale[8] || e.scale[9],
1535
- warning: e.scale[9]
1444
+ primary: n.scale[9],
1445
+ primaryHover: n.scale[10] || n.scale[9],
1446
+ foregroundOnPrimary: v(n.scale[9], n.contrast),
1447
+ focusRing: n.scale[8] || n.scale[9],
1448
+ warning: n.scale[9]
1536
1449
  };
1537
1450
  }
1538
- const x = {
1451
+ const y = {
1539
1452
  colors: {
1540
1453
  primary: "#ffc53d",
1541
1454
  primaryHover: "#ffba18",
@@ -1549,7 +1462,8 @@ const x = {
1549
1462
  focusRing: "#e2a336",
1550
1463
  success: "#30a46c",
1551
1464
  danger: "#e5484d",
1552
- warning: "#ffc53d"
1465
+ warning: "#ffc53d",
1466
+ info: "#0e7490"
1553
1467
  },
1554
1468
  palette: {
1555
1469
  gray: {
@@ -1580,8 +1494,8 @@ const x = {
1580
1494
  11: "#0000009b",
1581
1495
  12: "#000000df"
1582
1496
  },
1583
- blackAlpha: P,
1584
- whiteAlpha: T,
1497
+ blackAlpha: O,
1498
+ whiteAlpha: I,
1585
1499
  accent: {
1586
1500
  ...f.amber.light.scale
1587
1501
  },
@@ -1602,7 +1516,7 @@ const x = {
1602
1516
  overlay: "rgba(2, 6, 23, 0.52)",
1603
1517
  transparent: "transparent"
1604
1518
  },
1605
- radius: "4px",
1519
+ radius: "6px",
1606
1520
  radiusScale: {
1607
1521
  1: "3px",
1608
1522
  2: "4px",
@@ -1689,11 +1603,11 @@ const x = {
1689
1603
  effects: {
1690
1604
  backdropFilterPanel: "blur(64px)"
1691
1605
  },
1692
- components: Q,
1606
+ components: ea,
1693
1607
  zIndex: { modal: 1e3, overlay: 900, toast: 1100 },
1694
1608
  breakpoints: { sm: "640px", md: "768px", lg: "1024px" }
1695
- }, G = {
1696
- ...x,
1609
+ }, ta = {
1610
+ ...y,
1697
1611
  colors: {
1698
1612
  primary: "#ffc53d",
1699
1613
  primaryHover: "#ffd60a",
@@ -1707,10 +1621,11 @@ const x = {
1707
1621
  focusRing: "#ffc53d",
1708
1622
  success: "#30a46c",
1709
1623
  danger: "#e5484d",
1710
- warning: "#ffc53d"
1624
+ warning: "#ffc53d",
1625
+ info: "#4cc3d6"
1711
1626
  },
1712
1627
  palette: {
1713
- ...x.palette,
1628
+ ...y.palette,
1714
1629
  gray: {
1715
1630
  1: "#111",
1716
1631
  2: "#191919",
@@ -1739,8 +1654,8 @@ const x = {
1739
1654
  11: "#ffffffaf",
1740
1655
  12: "#ffffffed"
1741
1656
  },
1742
- blackAlpha: P,
1743
- whiteAlpha: T,
1657
+ blackAlpha: O,
1658
+ whiteAlpha: I,
1744
1659
  accent: {
1745
1660
  ...f.amber.dark.scale
1746
1661
  },
@@ -1772,195 +1687,264 @@ const x = {
1772
1687
  5: "0 0 0 1px var(--gray-a6),0 12px 60px var(--black-a5),0 12px 32px -16px var(--black-a7)",
1773
1688
  6: "0 0 0 1px var(--gray-a6),0 12px 60px var(--black-a4),0 16px 64px var(--black-a6),0 16px 36px -20px var(--black-a11)"
1774
1689
  },
1775
- components: W
1776
- }, na = x, I = /* @__PURE__ */ new Set();
1777
- function p(e, a) {
1778
- if (!(!e && !a))
1779
- return { ...e || {}, ...a || {} };
1690
+ components: na
1691
+ }, ba = y, D = /* @__PURE__ */ new Set();
1692
+ function p(n, a) {
1693
+ if (!(!n && !a))
1694
+ return { ...n || {}, ...a || {} };
1780
1695
  }
1781
- function K(e) {
1782
- const a = e?.colors, r = e?.surfaces || {}, i = {};
1783
- if (!a) return i;
1784
- if (a.background && !r.background && (i.background = a.background), a.surface) {
1785
- const s = `color-mix(in srgb, ${a.surface} 80%, transparent)`;
1786
- r.surface || (i.surface = a.surface), r.panelSolid || (i.panelSolid = a.surface), r.panel || (i.panel = s), r.panelTranslucent || (i.panelTranslucent = s);
1696
+ function ia(n) {
1697
+ const a = n?.colors, e = n?.surfaces || {}, r = {};
1698
+ if (!a) return r;
1699
+ if (a.background && !e.background && (r.background = a.background), a.surface) {
1700
+ const i = `color-mix(in srgb, ${a.surface} 80%, transparent)`;
1701
+ e.surface || (r.surface = a.surface), e.panelSolid || (r.panelSolid = a.surface), e.panel || (r.panel = i), e.panelTranslucent || (r.panelTranslucent = i);
1787
1702
  }
1788
- return i;
1703
+ return r;
1789
1704
  }
1790
- function L(e, a) {
1791
- const r = a?.mode || "light", i = r === "dark" ? G : x, s = a?.accentPalette, n = s ? f[s][r] : null, l = n ? {
1705
+ function w(n, a) {
1706
+ const e = a?.mode || "light", r = e === "dark" ? ta : y, i = a?.accentPalette, t = i ? f[i][e] : null, s = t ? {
1792
1707
  colors: {
1793
- ...D(n)
1708
+ ...P(t)
1794
1709
  },
1795
1710
  palette: {
1796
- accent: n.scale,
1797
- accentAlpha: n.alphaScale,
1798
- accentContrast: n.contrast,
1799
- accentSurface: n.surface,
1800
- accentIndicator: n.indicator,
1801
- accentTrack: n.track
1711
+ accent: t.scale,
1712
+ accentAlpha: t.alphaScale,
1713
+ accentContrast: t.contrast,
1714
+ accentSurface: t.surface,
1715
+ accentIndicator: t.indicator,
1716
+ accentTrack: t.track
1802
1717
  }
1803
1718
  } : null;
1804
1719
  return {
1805
- ...i,
1806
- ...e,
1720
+ ...r,
1721
+ ...n,
1807
1722
  colors: {
1808
- ...i.colors,
1809
- ...l?.colors || {},
1810
- ...e?.colors || {},
1811
- ...N(e)
1723
+ ...r.colors,
1724
+ ...s?.colors || {},
1725
+ ...n?.colors || {},
1726
+ ...ra(n)
1812
1727
  },
1813
1728
  palette: {
1814
- ...i.palette || {},
1815
- ...l?.palette || {},
1816
- ...e?.palette || {},
1817
- gray: p(i.palette?.gray, e?.palette?.gray),
1818
- grayAlpha: p(i.palette?.grayAlpha, e?.palette?.grayAlpha),
1819
- blackAlpha: p(i.palette?.blackAlpha, e?.palette?.blackAlpha),
1820
- whiteAlpha: p(i.palette?.whiteAlpha, e?.palette?.whiteAlpha),
1821
- accent: p(n?.scale || i.palette?.accent, e?.palette?.accent),
1822
- accentAlpha: p(n?.alphaScale || i.palette?.accentAlpha, e?.palette?.accentAlpha)
1729
+ ...r.palette || {},
1730
+ ...s?.palette || {},
1731
+ ...n?.palette || {},
1732
+ gray: p(r.palette?.gray, n?.palette?.gray),
1733
+ grayAlpha: p(r.palette?.grayAlpha, n?.palette?.grayAlpha),
1734
+ blackAlpha: p(r.palette?.blackAlpha, n?.palette?.blackAlpha),
1735
+ whiteAlpha: p(r.palette?.whiteAlpha, n?.palette?.whiteAlpha),
1736
+ accent: p(t?.scale || r.palette?.accent, n?.palette?.accent),
1737
+ accentAlpha: p(t?.alphaScale || r.palette?.accentAlpha, n?.palette?.accentAlpha)
1823
1738
  },
1824
1739
  surfaces: {
1825
- ...i.surfaces || {},
1826
- ...K(e),
1827
- ...e?.surfaces || {}
1740
+ ...r.surfaces || {},
1741
+ ...ia(n),
1742
+ ...n?.surfaces || {}
1828
1743
  },
1829
1744
  shadows: {
1830
- ...i.shadows || {},
1831
- ...e?.shadows || {}
1745
+ ...r.shadows || {},
1746
+ ...n?.shadows || {}
1832
1747
  },
1833
1748
  spacing: {
1834
- ...i.spacing || {},
1835
- ...e?.spacing || {}
1749
+ ...r.spacing || {},
1750
+ ...n?.spacing || {}
1836
1751
  },
1837
- spaceScale: p(i.spaceScale, e?.spaceScale),
1838
- radiusScale: p(i.radiusScale, e?.radiusScale),
1752
+ spaceScale: p(r.spaceScale, n?.spaceScale),
1753
+ radiusScale: p(r.radiusScale, n?.radiusScale),
1839
1754
  typography: {
1840
- ...i.typography || {},
1841
- ...e?.typography || {},
1755
+ ...r.typography || {},
1756
+ ...n?.typography || {},
1842
1757
  size: {
1843
- ...i.typography?.size || {},
1844
- ...e?.typography?.size || {}
1758
+ ...r.typography?.size || {},
1759
+ ...n?.typography?.size || {}
1845
1760
  },
1846
- fontScale: p(i.typography?.fontScale, e?.typography?.fontScale),
1847
- lineHeight: p(i.typography?.lineHeight, e?.typography?.lineHeight),
1848
- letterSpacing: p(i.typography?.letterSpacing, e?.typography?.letterSpacing)
1761
+ fontScale: p(r.typography?.fontScale, n?.typography?.fontScale),
1762
+ lineHeight: p(r.typography?.lineHeight, n?.typography?.lineHeight),
1763
+ letterSpacing: p(r.typography?.letterSpacing, n?.typography?.letterSpacing)
1849
1764
  },
1850
1765
  motion: {
1851
- ...i.motion || {},
1852
- ...e?.motion || {}
1766
+ ...r.motion || {},
1767
+ ...n?.motion || {}
1853
1768
  },
1854
1769
  effects: {
1855
- ...i.effects || {},
1856
- ...e?.effects || {}
1770
+ ...r.effects || {},
1771
+ ...n?.effects || {}
1857
1772
  },
1858
1773
  components: {
1859
- ...i.components || {},
1860
- ...e?.components || {},
1861
- button: p(i.components?.button, e?.components?.button),
1862
- badge: p(i.components?.badge, e?.components?.badge),
1863
- dropdown: p(i.components?.dropdown, e?.components?.dropdown),
1864
- select: p(i.components?.select, e?.components?.select),
1865
- sidebar: p(i.components?.sidebar, e?.components?.sidebar),
1866
- card: p(i.components?.card, e?.components?.card),
1867
- navigationMenu: p(i.components?.navigationMenu, e?.components?.navigationMenu),
1868
- blockControls: p(i.components?.blockControls, e?.components?.blockControls),
1869
- box: p(i.components?.box, e?.components?.box),
1870
- breadcrumb: p(i.components?.breadcrumb, e?.components?.breadcrumb),
1871
- contextMenu: p(i.components?.contextMenu, e?.components?.contextMenu),
1872
- menubar: p(i.components?.menubar, e?.components?.menubar),
1873
- alert: p(i.components?.alert, e?.components?.alert),
1874
- alertDialog: p(i.components?.alertDialog, e?.components?.alertDialog),
1875
- appHeader: p(i.components?.appHeader, e?.components?.appHeader),
1876
- aspectRatio: p(i.components?.aspectRatio, e?.components?.aspectRatio),
1877
- avatar: p(i.components?.avatar, e?.components?.avatar),
1878
- menu: p(i.components?.menu, e?.components?.menu),
1879
- multiSelect: p(i.components?.multiSelect, e?.components?.multiSelect),
1880
- panel: p(i.components?.panel, e?.components?.panel),
1881
- input: p(i.components?.input, e?.components?.input)
1774
+ ...r.components || {},
1775
+ ...n?.components || {},
1776
+ button: p(r.components?.button, n?.components?.button),
1777
+ badge: p(r.components?.badge, n?.components?.badge),
1778
+ dropdown: p(r.components?.dropdown, n?.components?.dropdown),
1779
+ select: p(r.components?.select, n?.components?.select),
1780
+ sidebar: p(r.components?.sidebar, n?.components?.sidebar),
1781
+ card: p(r.components?.card, n?.components?.card),
1782
+ navigationMenu: p(r.components?.navigationMenu, n?.components?.navigationMenu),
1783
+ blockControls: p(r.components?.blockControls, n?.components?.blockControls),
1784
+ box: p(r.components?.box, n?.components?.box),
1785
+ breadcrumb: p(r.components?.breadcrumb, n?.components?.breadcrumb),
1786
+ contextMenu: p(r.components?.contextMenu, n?.components?.contextMenu),
1787
+ menubar: p(r.components?.menubar, n?.components?.menubar),
1788
+ alert: p(r.components?.alert, n?.components?.alert),
1789
+ alertDialog: p(r.components?.alertDialog, n?.components?.alertDialog),
1790
+ appHeader: p(r.components?.appHeader, n?.components?.appHeader),
1791
+ aspectRatio: p(r.components?.aspectRatio, n?.components?.aspectRatio),
1792
+ avatar: p(r.components?.avatar, n?.components?.avatar),
1793
+ menu: p(r.components?.menu, n?.components?.menu),
1794
+ multiSelect: p(r.components?.multiSelect, n?.components?.multiSelect),
1795
+ panel: p(r.components?.panel, n?.components?.panel),
1796
+ input: p(r.components?.input, n?.components?.input)
1882
1797
  },
1883
1798
  zIndex: {
1884
- ...i.zIndex || {},
1885
- ...e?.zIndex || {}
1799
+ ...r.zIndex || {},
1800
+ ...n?.zIndex || {}
1886
1801
  },
1887
1802
  breakpoints: {
1888
- ...i.breakpoints || {},
1889
- ...e?.breakpoints || {}
1803
+ ...r.breakpoints || {},
1804
+ ...n?.breakpoints || {}
1890
1805
  }
1891
1806
  };
1892
1807
  }
1893
- function sa(e, a, r = "light") {
1894
- const i = f[a][r], s = e;
1895
- return L(
1808
+ function va(n, a, e = "light") {
1809
+ const r = f[a][e], i = n;
1810
+ return w(
1896
1811
  {
1897
- ...s,
1812
+ ...i,
1898
1813
  colors: {
1899
- ...s.colors || {},
1900
- ...D(i)
1814
+ ...i.colors || {},
1815
+ ...P(r)
1901
1816
  },
1902
1817
  palette: {
1903
- ...s.palette || {},
1904
- accent: i.scale,
1905
- accentAlpha: i.alphaScale,
1906
- accentContrast: i.contrast,
1907
- accentSurface: i.surface,
1908
- accentIndicator: i.indicator,
1909
- accentTrack: i.track
1818
+ ...i.palette || {},
1819
+ accent: r.scale,
1820
+ accentAlpha: r.alphaScale,
1821
+ accentContrast: r.contrast,
1822
+ accentSurface: r.surface,
1823
+ accentIndicator: r.indicator,
1824
+ accentTrack: r.track
1910
1825
  }
1911
1826
  },
1912
- { mode: r }
1827
+ { mode: e }
1913
1828
  );
1914
1829
  }
1915
- function o(e, a, r) {
1916
- try {
1917
- e.style.setProperty(a, r);
1918
- } catch {
1919
- }
1830
+ function o(n, a, e) {
1831
+ n[a] = e;
1920
1832
  }
1921
- function t(e, a, r) {
1922
- r && Object.entries(r).forEach(([i, s]) => {
1923
- typeof s == "string" && s && e.style.setProperty(`${a}${i}`, s);
1833
+ function l(n, a, e) {
1834
+ e && Object.entries(e).forEach(([r, i]) => {
1835
+ typeof i == "string" && i && (n[`${a}${r}`] = i);
1924
1836
  });
1925
1837
  }
1926
- function ta(e) {
1927
- e && I.add(e);
1838
+ function ya(n) {
1839
+ n && D.add(n);
1840
+ }
1841
+ function oa(n) {
1842
+ return M(w(n));
1928
1843
  }
1929
- function E(e, a) {
1930
- o(e, "--ui-color-primary", a.colors.primary), o(e, "--ui-color-primary-hover", a.colors.primaryHover || a.colors.primary), o(e, "--ui-color-foreground-on-primary", a.colors.foregroundOnPrimary || "#ffffff"), o(e, "--ui-color-background", a.colors.background || "#ffffff"), o(e, "--ui-color-surface", a.colors.surface || a.colors.background || "#ffffff"), o(e, "--ui-color-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), o(e, "--ui-color-text", a.colors.text || "#202020"), o(e, "--ui-color-muted", a.colors.muted || "#646464"), o(e, "--ui-color-border", a.colors.border || "#0000001f"), o(e, "--ui-color-focus-ring", a.colors.focusRing || a.colors.primary), o(e, "--ui-color-success", a.colors.success || "#30a46c"), o(e, "--ui-color-danger", a.colors.danger || "#e5484d"), o(e, "--ui-color-warning", a.colors.warning || a.colors.primary), o(e, "--ui-primary", a.colors.primary), o(e, "--ui-primary-hover", a.colors.primaryHover || a.colors.primary), o(e, "--ui-foreground", a.colors.foregroundOnPrimary || "#ffffff"), o(e, "--ui-background", a.colors.background || "#ffffff"), o(e, "--ui-surface", a.colors.surface || a.colors.background || "#ffffff"), o(e, "--ui-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), o(e, "--ui-text", a.colors.text || "#202020"), o(e, "--ui-muted", a.colors.muted || "#646464"), o(e, "--ui-border", a.colors.border || "#0000001f"), o(e, "--ui-focus-ring", a.colors.focusRing || a.colors.primary), o(e, "--ui-success", a.colors.success || "#30a46c"), o(e, "--ui-error", a.colors.danger || "#e5484d"), o(e, "--ui-warning", a.colors.warning || a.colors.primary), o(e, "--ui-radius", a.radius || "4px"), o(e, "--ui-space-xs", a.spacing?.xs || "4px"), o(e, "--ui-space-sm", a.spacing?.sm || "8px"), o(e, "--ui-space-md", a.spacing?.md || "12px"), o(e, "--ui-space-lg", a.spacing?.lg || "24px"), o(e, "--ui-space-xl", a.spacing?.xl || "32px"), o(e, "--ui-space-xxl", a.spacing?.xxl || "48px"), o(e, "--ui-default-gap", a.spacing?.sm || a.spaceScale?.["2"] || "8px"), o(e, "--ui-shadow-sm", a.shadows?.sm || a.shadows?.["2"] || "none"), o(e, "--ui-shadow-md", a.shadows?.md || a.shadows?.["3"] || "none"), o(e, "--ui-shadow-lg", a.shadows?.lg || a.shadows?.["4"] || "none"), o(e, "--ui-font-family", a.typography?.family || "system-ui, sans-serif"), o(e, "--ui-font-family-heading", a.typography?.headingFamily || a.typography?.family || "system-ui, sans-serif"), o(e, "--ui-font-family-code", a.typography?.codeFamily || "monospace"), o(e, "--ui-font-size-sm", a.typography?.size?.sm || "12px"), o(e, "--ui-font-size-md", a.typography?.size?.md || "14px"), o(e, "--ui-font-size-lg", a.typography?.size?.lg || "16px"), o(e, "--ui-default-font-size", a.typography?.size?.md || a.typography?.fontScale?.["2"] || "14px"), o(e, "--ui-default-line-height", a.typography?.lineHeight?.["2"] || "20px"), o(e, "--ui-default-letter-spacing", a.typography?.letterSpacing?.["2"] || "0em"), o(e, "--ui-motion-short", a.motion?.durationShort || "120ms"), o(e, "--ui-motion-base", a.motion?.durationBase || "180ms"), o(e, "--ui-motion-long", a.motion?.durationLong || "260ms"), o(e, "--ui-motion-easing", a.motion?.easing || "cubic-bezier(0.2, 0.8, 0.2, 1)"), o(e, "--ui-z-modal", String(a.zIndex?.modal ?? 1e3)), o(e, "--ui-z-overlay", String(a.zIndex?.overlay ?? 900)), o(e, "--ui-z-toast", String(a.zIndex?.toast ?? 1100)), o(e, "--ui-breakpoint-sm", a.breakpoints?.sm || "640px"), o(e, "--ui-breakpoint-md", a.breakpoints?.md || "768px"), o(e, "--ui-breakpoint-lg", a.breakpoints?.lg || "1024px"), o(e, "--color-background", a.surfaces?.background || a.colors.background || "#ffffff"), o(e, "--color-surface", a.surfaces?.surface || a.colors.surface || "#fcfcfc"), o(e, "--color-panel", a.surfaces?.panel || a.surfaces?.panelTranslucent || "#ffffffcc"), o(e, "--color-panel-solid", a.surfaces?.panelSolid || a.colors.surface || "#ffffff"), o(e, "--color-panel-translucent", a.surfaces?.panelTranslucent || "#ffffffcc"), o(e, "--color-overlay", a.surfaces?.overlay || "rgba(2, 6, 23, 0.52)"), o(e, "--color-transparent", a.surfaces?.transparent || "transparent"), o(e, "--backdrop-filter-panel", a.effects?.backdropFilterPanel || "blur(64px)"), a.palette?.accentContrast && o(e, "--accent-contrast", a.palette.accentContrast), a.palette?.accentSurface && o(e, "--accent-surface", a.palette.accentSurface), a.palette?.accentIndicator && o(e, "--accent-indicator", a.palette.accentIndicator), a.palette?.accentTrack && o(e, "--accent-track", a.palette.accentTrack), t(e, "--gray-", a.palette?.gray), t(e, "--gray-a", a.palette?.grayAlpha), t(e, "--black-a", a.palette?.blackAlpha), t(e, "--white-a", a.palette?.whiteAlpha), t(e, "--accent-", a.palette?.accent), t(e, "--accent-a", a.palette?.accentAlpha), t(e, "--space-", a.spaceScale), t(e, "--radius-", a.radiusScale), t(e, "--font-size-", a.typography?.fontScale), t(e, "--line-height-", a.typography?.lineHeight), t(e, "--letter-spacing-", a.typography?.letterSpacing), t(e, "--shadow-", a.shadows), t(e, "--base-button-", a.components?.button), t(e, "--base-badge-", a.components?.badge), t(e, "--base-dropdown-", a.components?.dropdown), t(e, "--base-select-", a.components?.select), t(e, "--base-sidebar-", a.components?.sidebar), t(e, "--base-block-controls-", a.components?.blockControls), t(e, "--base-box-", a.components?.box), t(e, "--base-breadcrumb-", a.components?.breadcrumb), t(e, "--base-card-", a.components?.card), t(e, "--base-multi-select-", a.components?.multiSelect), t(e, "--base-navigation-menu-", a.components?.navigationMenu), t(e, "--base-menubar-", a.components?.menubar), t(e, "--base-context-menu-", a.components?.contextMenu), t(e, "--base-alert-", a.components?.alert), t(e, "--base-alert-dialog-", a.components?.alertDialog), t(e, "--base-app-header-", a.components?.appHeader), t(e, "--base-aspect-ratio-", a.components?.aspectRatio), t(e, "--base-avatar-", a.components?.avatar), t(e, "--base-menu-", a.components?.menu), t(e, "--base-panel-", a.components?.panel), t(e, "--base-input-", a.components?.input);
1844
+ function sa(n) {
1845
+ const a = n.colors, e = n.palette;
1846
+ if (!e || !a) return n;
1847
+ const r = (k, H, $) => `color-mix(in srgb, ${k} ${H}%, ${$})`, i = a.surface || a.background, t = a.text;
1848
+ let s = e.gray, c = e.accent;
1849
+ const d = a.background ? b(a.background) : null, u = s?.["1"] ? b(s[1]) : null;
1850
+ i && t && d !== null && u !== null && d < 0.4 != u < 0.4 && (s = {
1851
+ ...s,
1852
+ 2: r(t, 4, i),
1853
+ 3: r(t, 8, i),
1854
+ 4: r(t, 12, i),
1855
+ 5: r(t, 16, i),
1856
+ 6: r(t, 20, i),
1857
+ 7: r(t, 28, i),
1858
+ 8: r(t, 40, i),
1859
+ 11: a.muted || t,
1860
+ 12: t
1861
+ });
1862
+ const x = c?.["9"];
1863
+ return i && t && a.primary && x && x.trim().toLowerCase() !== a.primary.trim().toLowerCase() && (c = {
1864
+ ...c,
1865
+ 2: r(a.primary, 6, i),
1866
+ 3: r(a.primary, 14, i),
1867
+ 4: r(a.primary, 20, i),
1868
+ 5: r(a.primary, 26, i),
1869
+ 7: r(a.primary, 42, i),
1870
+ 9: a.primary,
1871
+ 10: a.primaryHover || a.primary,
1872
+ 11: r(a.primary, 60, t)
1873
+ }), s === e.gray && c === e.accent ? n : { ...n, palette: { ...e, gray: s, accent: c } };
1931
1874
  }
1932
- function pa(e, a = typeof document < "u" ? document : null) {
1875
+ function M(n) {
1876
+ const a = sa(n), e = {};
1877
+ return o(e, "--ui-color-primary", a.colors.primary), o(e, "--ui-color-primary-hover", a.colors.primaryHover || a.colors.primary), o(e, "--ui-color-foreground-on-primary", a.colors.foregroundOnPrimary || "#ffffff"), o(e, "--ui-color-background", a.colors.background || "#ffffff"), o(e, "--ui-color-surface", a.colors.surface || a.colors.background || "#ffffff"), o(e, "--ui-color-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), o(e, "--ui-color-text", a.colors.text || "#202020"), o(e, "--ui-color-muted", a.colors.muted || "#646464"), o(e, "--ui-color-border", a.colors.border || "#0000001f"), o(e, "--ui-color-focus-ring", a.colors.focusRing || a.colors.primary), o(e, "--ui-color-success", a.colors.success || "#30a46c"), o(e, "--ui-color-danger", a.colors.danger || "#e5484d"), o(e, "--ui-color-warning", a.colors.warning || a.colors.primary), o(e, "--ui-primary", a.colors.primary), o(e, "--ui-primary-hover", a.colors.primaryHover || a.colors.primary), o(e, "--ui-foreground", a.colors.foregroundOnPrimary || "#ffffff"), o(e, "--ui-background", a.colors.background || "#ffffff"), o(e, "--ui-surface", a.colors.surface || a.colors.background || "#ffffff"), o(e, "--ui-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), o(e, "--ui-text", a.colors.text || "#202020"), o(e, "--ui-muted", a.colors.muted || "#646464"), o(e, "--ui-border", a.colors.border || "#0000001f"), o(e, "--ui-focus-ring", a.colors.focusRing || a.colors.primary), o(e, "--ui-success", a.colors.success || "#30a46c"), o(e, "--ui-error", a.colors.danger || "#e5484d"), o(e, "--ui-warning", a.colors.warning || a.colors.primary), o(e, "--ui-radius", a.radius || "6px"), o(e, "--ui-space-xs", a.spacing?.xs || "4px"), o(e, "--ui-space-sm", a.spacing?.sm || "8px"), o(e, "--ui-space-md", a.spacing?.md || "12px"), o(e, "--ui-space-lg", a.spacing?.lg || "24px"), o(e, "--ui-space-xl", a.spacing?.xl || "32px"), o(e, "--ui-space-xxl", a.spacing?.xxl || "48px"), o(e, "--ui-default-gap", a.spacing?.sm || a.spaceScale?.["2"] || "8px"), o(e, "--ui-shadow-sm", a.shadows?.sm || a.shadows?.["2"] || "none"), o(e, "--ui-shadow-md", a.shadows?.md || a.shadows?.["3"] || "none"), o(e, "--ui-shadow-lg", a.shadows?.lg || a.shadows?.["4"] || "none"), o(e, "--ui-font-family", a.typography?.family || "system-ui, sans-serif"), o(e, "--ui-font-family-heading", a.typography?.headingFamily || a.typography?.family || "system-ui, sans-serif"), o(e, "--ui-font-family-code", a.typography?.codeFamily || "monospace"), o(e, "--ui-font-size-sm", a.typography?.size?.sm || "12px"), o(e, "--ui-font-size-md", a.typography?.size?.md || "14px"), o(e, "--ui-font-size-lg", a.typography?.size?.lg || "16px"), o(e, "--ui-default-font-size", a.typography?.size?.md || a.typography?.fontScale?.["2"] || "14px"), o(e, "--ui-default-line-height", a.typography?.lineHeight?.["2"] || "20px"), o(e, "--ui-default-letter-spacing", a.typography?.letterSpacing?.["2"] || "0em"), o(e, "--ui-motion-short", a.motion?.durationShort || "120ms"), o(e, "--ui-motion-base", a.motion?.durationBase || "180ms"), o(e, "--ui-motion-long", a.motion?.durationLong || "260ms"), o(e, "--ui-motion-easing", a.motion?.easing || "cubic-bezier(0.2, 0.8, 0.2, 1)"), o(e, "--ui-z-modal", String(a.zIndex?.modal ?? 1e3)), o(e, "--ui-z-overlay", String(a.zIndex?.overlay ?? 900)), o(e, "--ui-z-toast", String(a.zIndex?.toast ?? 1100)), o(e, "--ui-breakpoint-sm", a.breakpoints?.sm || "640px"), o(e, "--ui-breakpoint-md", a.breakpoints?.md || "768px"), o(e, "--ui-breakpoint-lg", a.breakpoints?.lg || "1024px"), o(e, "--color-background", a.surfaces?.background || a.colors.background || "#ffffff"), o(e, "--color-surface", a.surfaces?.surface || a.colors.surface || "#fcfcfc"), o(e, "--color-panel", a.surfaces?.panel || a.surfaces?.panelTranslucent || "#ffffffcc"), o(e, "--color-panel-solid", a.surfaces?.panelSolid || a.colors.surface || "#ffffff"), o(e, "--color-panel-translucent", a.surfaces?.panelTranslucent || "#ffffffcc"), o(e, "--color-overlay", a.surfaces?.overlay || "rgba(2, 6, 23, 0.52)"), o(e, "--color-transparent", a.surfaces?.transparent || "transparent"), o(e, "--backdrop-filter-panel", a.effects?.backdropFilterPanel || "blur(64px)"), a.palette?.accentContrast && o(e, "--accent-contrast", a.palette.accentContrast), a.palette?.accentSurface && o(e, "--accent-surface", a.palette.accentSurface), a.palette?.accentIndicator && o(e, "--accent-indicator", a.palette.accentIndicator), a.palette?.accentTrack && o(e, "--accent-track", a.palette.accentTrack), l(e, "--gray-", a.palette?.gray), l(e, "--gray-a", a.palette?.grayAlpha), l(e, "--black-a", a.palette?.blackAlpha), l(e, "--white-a", a.palette?.whiteAlpha), l(e, "--accent-", a.palette?.accent), l(e, "--accent-a", a.palette?.accentAlpha), l(e, "--space-", a.spaceScale), l(e, "--radius-", a.radiusScale), l(e, "--font-size-", a.typography?.fontScale), l(e, "--line-height-", a.typography?.lineHeight), l(e, "--letter-spacing-", a.typography?.letterSpacing), l(e, "--shadow-", a.shadows), l(e, "--base-button-", a.components?.button), l(e, "--base-badge-", a.components?.badge), l(e, "--base-dropdown-", a.components?.dropdown), l(e, "--base-select-", a.components?.select), l(e, "--base-sidebar-", a.components?.sidebar), l(e, "--base-block-controls-", a.components?.blockControls), l(e, "--base-box-", a.components?.box), l(e, "--base-breadcrumb-", a.components?.breadcrumb), l(e, "--base-card-", a.components?.card), l(e, "--base-multi-select-", a.components?.multiSelect), l(e, "--base-navigation-menu-", a.components?.navigationMenu), l(e, "--base-menubar-", a.components?.menubar), l(e, "--base-context-menu-", a.components?.contextMenu), l(e, "--base-alert-", a.components?.alert), l(e, "--base-alert-dialog-", a.components?.alertDialog), l(e, "--base-app-header-", a.components?.appHeader), l(e, "--base-aspect-ratio-", a.components?.aspectRatio), l(e, "--base-avatar-", a.components?.avatar), l(e, "--base-menu-", a.components?.menu), l(e, "--base-panel-", a.components?.panel), l(e, "--base-input-", a.components?.input), Object.assign(e, aa(a)), o(e, "--ui-color-foreground-on-warning", v(a.colors.warning || a.colors.primary, "#ffffff")), e;
1878
+ }
1879
+ function T(n, a) {
1880
+ Object.entries(a).forEach(([e, r]) => {
1881
+ try {
1882
+ n.style.setProperty(e, r);
1883
+ } catch {
1884
+ }
1885
+ });
1886
+ }
1887
+ function wa(n, a = ":root") {
1888
+ const e = Object.entries(oa(n)).map(([r, i]) => ` ${r}: ${i};`).join(`
1889
+ `);
1890
+ return `${a} {
1891
+ ${e}
1892
+ }
1893
+ `;
1894
+ }
1895
+ function R(n) {
1896
+ return n === document ? document.documentElement : n instanceof ShadowRoot ? n.host : n;
1897
+ }
1898
+ function ca(n, a = typeof document < "u" ? document : null) {
1933
1899
  if (!a) return;
1934
- const r = L(e), i = a === document || a instanceof ShadowRoot;
1935
- let s;
1936
- if (a === document ? s = document.documentElement : a instanceof ShadowRoot ? s = a.host : s = a, E(s, r), i)
1937
- for (const n of I)
1900
+ const e = M(w(n)), r = a === document || a instanceof ShadowRoot, i = R(a);
1901
+ if (T(i, e), r)
1902
+ for (const t of D)
1938
1903
  try {
1939
- E(n, r);
1904
+ T(t, e);
1940
1905
  } catch {
1941
1906
  }
1942
1907
  }
1908
+ function ka(n = {}) {
1909
+ const a = n.root === void 0 ? typeof document < "u" ? document : null : n.root;
1910
+ if (!a) return () => {
1911
+ };
1912
+ const e = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(prefers-color-scheme: dark)") : null, r = (t) => {
1913
+ const s = t ? "dark" : "light";
1914
+ ca(w(t ? n.dark : n.light, { accentPalette: n.accentPalette, mode: s }), a);
1915
+ const c = R(a);
1916
+ c.setAttribute("data-ui-mode", s), c.style.setProperty("color-scheme", s);
1917
+ };
1918
+ if (r(!!e?.matches), !e) return () => {
1919
+ };
1920
+ const i = (t) => r(t.matches);
1921
+ return typeof e.addEventListener == "function" ? (e.addEventListener("change", i), () => e.removeEventListener("change", i)) : (e.addListener(i), () => e.removeListener(i));
1922
+ }
1943
1923
  export {
1944
- $ as A,
1945
- Z as D,
1946
- Y as a,
1947
- pa as b,
1948
- f as c,
1949
- G as d,
1950
- x as e,
1951
- q as f,
1952
- ra as g,
1953
- B as h,
1954
- U as i,
1955
- L as j,
1956
- na as k,
1957
- N as l,
1958
- K as m,
1959
- ea as n,
1960
- oa as o,
1961
- aa as p,
1962
- ta as q,
1963
- v as r,
1964
- ia as s,
1965
- sa as w
1924
+ V as A,
1925
+ W as D,
1926
+ da as a,
1927
+ ka as b,
1928
+ ca as c,
1929
+ f as d,
1930
+ ta as e,
1931
+ y as f,
1932
+ fa as g,
1933
+ xa as h,
1934
+ Z as i,
1935
+ G as j,
1936
+ w as k,
1937
+ ba as l,
1938
+ ra as m,
1939
+ aa as n,
1940
+ ia as o,
1941
+ ga as p,
1942
+ ha as q,
1943
+ ua as r,
1944
+ v as s,
1945
+ ya as t,
1946
+ ma as u,
1947
+ wa as v,
1948
+ oa as w,
1949
+ va as x
1966
1950
  };