@editora/ui-core 0.1.19 → 0.1.20

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 (299) hide show
  1. package/dist/{ElementBase-1b301e7f.js → ElementBase-EV6mVBUV.js} +1 -1
  2. package/dist/{ElementBase-909688f3.mjs → ElementBase-YlTLMsGk.mjs} +3 -3
  3. package/dist/accordion.cjs.js +3 -3
  4. package/dist/accordion.esm.js +39 -62
  5. package/dist/alert-dialog.cjs.js +19 -19
  6. package/dist/alert-dialog.esm.js +69 -87
  7. package/dist/alert.cjs.js +1 -1
  8. package/dist/alert.esm.js +4 -7
  9. package/dist/anchor.cjs.js +2 -2
  10. package/dist/anchor.esm.js +3 -3
  11. package/dist/animated-beam.cjs.js +83 -83
  12. package/dist/animated-beam.esm.js +250 -277
  13. package/dist/animated-list.cjs.js +4 -4
  14. package/dist/animated-list.esm.js +47 -61
  15. package/dist/animated-text.cjs.js +2 -2
  16. package/dist/animated-text.esm.js +13 -24
  17. package/dist/app-header.cjs.js +3 -3
  18. package/dist/app-header.esm.js +11 -13
  19. package/dist/aspect-ratio.cjs.js +1 -1
  20. package/dist/aspect-ratio.esm.js +4 -7
  21. package/dist/avatar.cjs.js +1 -1
  22. package/dist/avatar.esm.js +7 -13
  23. package/dist/badge.cjs.js +1 -1
  24. package/dist/badge.esm.js +4 -7
  25. package/dist/block-controls.cjs.js +2 -2
  26. package/dist/block-controls.esm.js +19 -35
  27. package/dist/box.cjs.js +1 -1
  28. package/dist/box.esm.js +8 -15
  29. package/dist/breadcrumb.cjs.js +2 -2
  30. package/dist/breadcrumb.esm.js +20 -37
  31. package/dist/button.cjs.js +1 -521
  32. package/dist/button.esm.js +2 -671
  33. package/dist/{calendar-2c11b824.mjs → calendar-DLY4acgn.mjs} +293 -342
  34. package/dist/{calendar-a8735e40.js → calendar-Dkof-FTK.js} +25 -25
  35. package/dist/calendar.cjs.js +1 -1
  36. package/dist/calendar.esm.js +8 -9
  37. package/dist/card.cjs.js +4 -4
  38. package/dist/card.esm.js +13 -19
  39. package/dist/chart.cjs.js +64 -64
  40. package/dist/chart.esm.js +223 -254
  41. package/dist/checkbox.cjs.js +1 -1
  42. package/dist/checkbox.esm.js +2 -3
  43. package/dist/collapsible.cjs.js +1 -1
  44. package/dist/collapsible.esm.js +5 -9
  45. package/dist/{collection-a1aac0c6.mjs → collection-C7URGjEI.mjs} +8 -14
  46. package/dist/collection.cjs.js +1 -1
  47. package/dist/collection.esm.js +4 -7
  48. package/dist/color-picker.cjs.js +9 -9
  49. package/dist/color-picker.esm.js +189 -252
  50. package/dist/combobox.cjs.js +13 -13
  51. package/dist/combobox.esm.js +93 -126
  52. package/dist/command-palette.cjs.js +3 -3
  53. package/dist/command-palette.esm.js +19 -30
  54. package/dist/command.cjs.js +4 -4
  55. package/dist/command.esm.js +41 -53
  56. package/dist/components/ui-orbiter.d.ts.map +1 -1
  57. package/dist/components/ui-skeleton.d.ts.map +1 -1
  58. package/dist/components/ui-split-button.d.ts +1 -0
  59. package/dist/components/ui-split-button.d.ts.map +1 -1
  60. package/dist/components/ui-time-picker.d.ts.map +1 -1
  61. package/dist/container.cjs.js +2 -2
  62. package/dist/container.esm.js +2 -3
  63. package/dist/context-menu.cjs.js +8 -8
  64. package/dist/context-menu.esm.js +157 -219
  65. package/dist/control-group.cjs.js +1 -1
  66. package/dist/control-group.esm.js +2 -3
  67. package/dist/data-table.cjs.js +4 -4
  68. package/dist/data-table.esm.js +299 -381
  69. package/dist/date-field.cjs.js +3 -3
  70. package/dist/date-field.esm.js +68 -80
  71. package/dist/date-picker.cjs.js +9 -9
  72. package/dist/date-picker.esm.js +69 -97
  73. package/dist/date-range-picker.cjs.js +3 -3
  74. package/dist/date-range-picker.esm.js +32 -56
  75. package/dist/date-range-time-picker.cjs.js +9 -9
  76. package/dist/date-range-time-picker.esm.js +111 -140
  77. package/dist/date-time-picker.cjs.js +4 -4
  78. package/dist/date-time-picker.esm.js +112 -144
  79. package/dist/date-time-utils-Dmost5Ee.js +1 -0
  80. package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
  81. package/dist/description.cjs.js +1 -1
  82. package/dist/description.esm.js +3 -5
  83. package/dist/dialog.cjs.js +12 -12
  84. package/dist/dialog.esm.js +44 -63
  85. package/dist/direction-provider.cjs.js +1 -1
  86. package/dist/direction-provider.esm.js +2 -3
  87. package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
  88. package/dist/dismissable-layer-DNfrKA20.js +1 -0
  89. package/dist/dismissable-layer.cjs.js +2 -2
  90. package/dist/dismissable-layer.esm.js +4 -6
  91. package/dist/dock.cjs.js +5 -5
  92. package/dist/dock.esm.js +134 -155
  93. package/dist/drawer.cjs.js +2 -2
  94. package/dist/drawer.esm.js +18 -35
  95. package/dist/dropdown.cjs.js +2 -2
  96. package/dist/dropdown.esm.js +119 -149
  97. package/dist/dropzone.cjs.js +1 -1
  98. package/dist/dropzone.esm.js +0 -1
  99. package/dist/empty-state.cjs.js +1 -1
  100. package/dist/empty-state.esm.js +1 -1
  101. package/dist/field-error.cjs.js +1 -1
  102. package/dist/field-error.esm.js +3 -5
  103. package/dist/field.cjs.js +5 -5
  104. package/dist/field.esm.js +27 -34
  105. package/dist/fieldset.cjs.js +4 -4
  106. package/dist/fieldset.esm.js +19 -24
  107. package/dist/file-upload.cjs.js +4 -4
  108. package/dist/file-upload.esm.js +69 -93
  109. package/dist/flex.cjs.js +1 -1
  110. package/dist/flex.esm.js +5 -9
  111. package/dist/floating-toolbar.cjs.js +4 -4
  112. package/dist/floating-toolbar.esm.js +60 -85
  113. package/dist/focus-scope-Bwug2gDv.js +1 -0
  114. package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
  115. package/dist/focus-scope.cjs.js +2 -2
  116. package/dist/focus-scope.esm.js +15 -20
  117. package/dist/form.cjs.js +2 -2
  118. package/dist/form.esm.js +26 -53
  119. package/dist/gantt.cjs.js +43 -43
  120. package/dist/gantt.esm.js +295 -322
  121. package/dist/grid.cjs.js +1 -1
  122. package/dist/grid.esm.js +5 -9
  123. package/dist/hover-card.cjs.js +4 -4
  124. package/dist/hover-card.esm.js +22 -28
  125. package/dist/icon-cloud.cjs.js +7 -7
  126. package/dist/icon-cloud.esm.js +48 -62
  127. package/dist/icon.cjs.js +1 -1
  128. package/dist/icon.esm.js +2 -4
  129. package/dist/index.cjs.js +1 -1
  130. package/dist/index.esm.js +378 -390
  131. package/dist/inline-edit.cjs.js +11 -11
  132. package/dist/inline-edit.esm.js +32 -36
  133. package/dist/input.cjs.js +17 -17
  134. package/dist/input.esm.js +50 -63
  135. package/dist/label.cjs.js +2 -2
  136. package/dist/label.esm.js +8 -17
  137. package/dist/layout.cjs.js +2 -2
  138. package/dist/layout.esm.js +20 -26
  139. package/dist/listbox-B6QgECax.js +46 -0
  140. package/dist/listbox-DJamVeFj.mjs +200 -0
  141. package/dist/listbox.cjs.js +1 -1
  142. package/dist/listbox.esm.js +2 -4
  143. package/dist/marquee.cjs.js +5 -5
  144. package/dist/marquee.esm.js +33 -50
  145. package/dist/masonry-grid.cjs.js +1 -1
  146. package/dist/masonry-grid.esm.js +5 -9
  147. package/dist/menu.cjs.js +3 -3
  148. package/dist/menu.esm.js +106 -126
  149. package/dist/menubar.cjs.js +5 -5
  150. package/dist/menubar.esm.js +118 -164
  151. package/dist/meter.cjs.js +2 -2
  152. package/dist/meter.esm.js +4 -4
  153. package/dist/multi-select.cjs.js +4 -4
  154. package/dist/multi-select.esm.js +120 -140
  155. package/dist/navigation-menu.cjs.js +4 -4
  156. package/dist/navigation-menu.esm.js +44 -55
  157. package/dist/number-field.cjs.js +2 -2
  158. package/dist/number-field.esm.js +73 -98
  159. package/dist/number-ticker.cjs.js +3 -3
  160. package/dist/number-ticker.esm.js +22 -43
  161. package/dist/odometer.cjs.js +1 -1
  162. package/dist/odometer.esm.js +5 -9
  163. package/dist/orbiter.cjs.js +13 -13
  164. package/dist/orbiter.esm.js +79 -90
  165. package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
  166. package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
  167. package/dist/pagination.cjs.js +2 -2
  168. package/dist/pagination.esm.js +14 -18
  169. package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
  170. package/dist/panel-group-CaD0_KQf.js +36 -0
  171. package/dist/panel-group.cjs.js +1 -1
  172. package/dist/panel-group.esm.js +2 -5
  173. package/dist/panel.cjs.js +4 -4
  174. package/dist/panel.esm.js +8 -10
  175. package/dist/password-field.cjs.js +9 -9
  176. package/dist/password-field.esm.js +62 -82
  177. package/dist/pin-input.cjs.js +3 -3
  178. package/dist/pin-input.esm.js +33 -39
  179. package/dist/placement-grid.cjs.js +4 -4
  180. package/dist/placement-grid.esm.js +108 -131
  181. package/dist/plugin-panel.cjs.js +7 -7
  182. package/dist/plugin-panel.esm.js +13 -15
  183. package/dist/popover.cjs.js +2 -2
  184. package/dist/popover.esm.js +21 -31
  185. package/dist/portal-DgpQ3Jo1.js +1 -0
  186. package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
  187. package/dist/portal.cjs.js +2 -2
  188. package/dist/portal.esm.js +10 -19
  189. package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
  190. package/dist/positioner-D_fqyx_j.js +1 -0
  191. package/dist/positioner.cjs.js +2 -2
  192. package/dist/positioner.esm.js +11 -18
  193. package/dist/presence.cjs.js +1 -1
  194. package/dist/presence.esm.js +7 -13
  195. package/dist/progress.cjs.js +1 -1
  196. package/dist/progress.esm.js +5 -9
  197. package/dist/quick-actions.cjs.js +6 -6
  198. package/dist/quick-actions.esm.js +52 -62
  199. package/dist/radio-group.cjs.js +13 -13
  200. package/dist/radio-group.esm.js +39 -51
  201. package/dist/radio.cjs.js +1 -1
  202. package/dist/radio.esm.js +5 -9
  203. package/dist/rating.cjs.js +1 -1
  204. package/dist/rating.esm.js +12 -23
  205. package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
  206. package/dist/roving-focus-group.cjs.js +1 -1
  207. package/dist/roving-focus-group.esm.js +3 -5
  208. package/dist/runtime-CTaOSmBj.js +1 -0
  209. package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
  210. package/dist/runtime.cjs.js +1 -1
  211. package/dist/runtime.esm.js +6 -6
  212. package/dist/scroll-area.cjs.js +3 -3
  213. package/dist/scroll-area.esm.js +38 -46
  214. package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
  215. package/dist/section.cjs.js +1 -1
  216. package/dist/section.esm.js +1 -1
  217. package/dist/select.cjs.js +7 -7
  218. package/dist/select.esm.js +67 -97
  219. package/dist/selection-popup.cjs.js +1 -1
  220. package/dist/selection-popup.esm.js +8 -15
  221. package/dist/separator.cjs.js +1 -1
  222. package/dist/separator.esm.js +1 -1
  223. package/dist/sidebar.cjs.js +18 -18
  224. package/dist/sidebar.esm.js +117 -139
  225. package/dist/skeleton.cjs.js +11 -11
  226. package/dist/skeleton.esm.js +27 -24
  227. package/dist/slider.cjs.js +1 -1
  228. package/dist/slider.esm.js +6 -11
  229. package/dist/slot.cjs.js +4 -4
  230. package/dist/slot.esm.js +16 -19
  231. package/dist/sortable.cjs.js +45 -45
  232. package/dist/sortable.esm.js +421 -524
  233. package/dist/spinning-text.cjs.js +12 -12
  234. package/dist/spinning-text.esm.js +80 -92
  235. package/dist/split-button.cjs.js +4 -4
  236. package/dist/split-button.esm.js +77 -62
  237. package/dist/splitter.cjs.js +1 -1
  238. package/dist/splitter.esm.js +1 -1
  239. package/dist/stepper.cjs.js +8 -8
  240. package/dist/stepper.esm.js +32 -52
  241. package/dist/switch.cjs.js +7 -7
  242. package/dist/switch.esm.js +23 -31
  243. package/dist/table.cjs.js +2 -2
  244. package/dist/table.esm.js +46 -56
  245. package/dist/tabs.cjs.js +3 -3
  246. package/dist/tabs.esm.js +35 -55
  247. package/dist/tags-input.cjs.js +4 -4
  248. package/dist/tags-input.esm.js +45 -62
  249. package/dist/textarea.cjs.js +6 -6
  250. package/dist/textarea.esm.js +32 -41
  251. package/dist/time-field.cjs.js +4 -4
  252. package/dist/time-field.esm.js +70 -84
  253. package/dist/time-picker.cjs.js +22 -22
  254. package/dist/time-picker.esm.js +88 -110
  255. package/dist/timeline.cjs.js +1 -1
  256. package/dist/timeline.esm.js +3 -5
  257. package/dist/toast.cjs.js +2 -2
  258. package/dist/toast.esm.js +33 -47
  259. package/dist/toggle-group.cjs.js +6 -6
  260. package/dist/toggle-group.esm.js +85 -105
  261. package/dist/toggle.cjs.js +1 -1
  262. package/dist/toggle.esm.js +3 -5
  263. package/dist/toolbar.cjs.js +1 -1
  264. package/dist/toolbar.esm.js +13 -24
  265. package/dist/tooltip.cjs.js +2 -2
  266. package/dist/tooltip.esm.js +31 -42
  267. package/dist/transfer-list.cjs.js +19 -19
  268. package/dist/transfer-list.esm.js +98 -111
  269. package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
  270. package/dist/tree-Dx_kv_ih.js +39 -0
  271. package/dist/tree-item.cjs.js +2 -2
  272. package/dist/tree-item.esm.js +2 -3
  273. package/dist/tree.cjs.js +1 -1
  274. package/dist/tree.esm.js +2 -5
  275. package/dist/ui-button-Q0GNNWKC.mjs +665 -0
  276. package/dist/ui-button-rXQOS9QJ.js +521 -0
  277. package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
  278. package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
  279. package/dist/visually-hidden.cjs.js +1 -1
  280. package/dist/visually-hidden.esm.js +1 -1
  281. package/dist/wizard.cjs.js +14 -14
  282. package/dist/wizard.esm.js +85 -105
  283. package/package.json +2 -2
  284. package/dist/date-time-utils-66480de4.js +0 -1
  285. package/dist/date-time-utils-a2c7af25.mjs +0 -307
  286. package/dist/dismissable-layer-193e3bed.js +0 -1
  287. package/dist/focus-scope-2b12b4e7.js +0 -1
  288. package/dist/listbox-308789a0.mjs +0 -210
  289. package/dist/listbox-ef2f708e.js +0 -46
  290. package/dist/panel-group-40254cdd.js +0 -36
  291. package/dist/portal-c69756c0.js +0 -1
  292. package/dist/positioner-33529bb8.js +0 -1
  293. package/dist/runtime-3f13807b.js +0 -1
  294. package/dist/tree-0a7a8d05.js +0 -39
  295. /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
  296. /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
  297. /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
  298. /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
  299. /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
@@ -1,26 +1,25 @@
1
- import "./portal-fe73e5cc.mjs";
2
- import "./positioner-e9770c66.mjs";
3
- function ja() {
1
+ import "./portal-bR42gHvG.mjs";
2
+ import "./positioner-D0VGxtYU.mjs";
3
+ function y() {
4
4
  return typeof window < "u" && typeof document < "u";
5
5
  }
6
- function qa(e) {
6
+ function P(e) {
7
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.";
8
8
  }
9
- function ae(e) {
9
+ function L(e) {
10
10
  return e === "replace" || e === "stack" ? e : "queue";
11
11
  }
12
- function Za(e) {
12
+ function w(e) {
13
13
  return `ui-alert-dialog-${e}`;
14
14
  }
15
- function ee(e, a) {
16
- var r, o;
17
- const n = e.kind === "alert" && a.action === "cancel" ? "dismiss" : a.action, i = (r = e.dialog) == null ? void 0 : r.getChecked();
15
+ function M(e, a) {
16
+ const r = e.kind === "alert" && a.action === "cancel" ? "dismiss" : a.action, i = e.dialog?.getChecked();
18
17
  if (e.kind === "prompt") {
19
- const c = ((o = e.dialog) == null ? void 0 : o.getInputValue()) ?? e.value ?? "";
18
+ const s = e.dialog?.getInputValue() ?? e.value ?? "";
20
19
  return {
21
20
  id: e.id,
22
- action: n,
23
- value: c,
21
+ action: r,
22
+ value: s,
24
23
  checked: i,
25
24
  source: a.source,
26
25
  reason: a.reason
@@ -28,35 +27,34 @@ function ee(e, a) {
28
27
  }
29
28
  return {
30
29
  id: e.id,
31
- action: n,
30
+ action: r,
32
31
  value: e.value,
33
32
  checked: i,
34
33
  source: a.source,
35
34
  reason: a.reason
36
35
  };
37
36
  }
38
- function ka(e, a, n) {
39
- var i, r, o;
37
+ function h(e, a, r) {
40
38
  return e.kind === "prompt" ? {
41
39
  id: e.id,
42
40
  action: "dismiss",
43
- value: ((i = e.dialog) == null ? void 0 : i.getInputValue()) ?? e.value ?? "",
44
- checked: (r = e.dialog) == null ? void 0 : r.getChecked(),
41
+ value: e.dialog?.getInputValue() ?? e.value ?? "",
42
+ checked: e.dialog?.getChecked(),
45
43
  source: a,
46
- reason: n
44
+ reason: r
47
45
  } : {
48
46
  id: e.id,
49
47
  action: "dismiss",
50
48
  value: e.value,
51
- checked: (o = e.dialog) == null ? void 0 : o.getChecked(),
49
+ checked: e.dialog?.getChecked(),
52
50
  source: a,
53
- reason: n
51
+ reason: r
54
52
  };
55
53
  }
56
- function ie(e) {
54
+ function O(e) {
57
55
  return e === "esc" || e === "backdrop" || e === "close-icon" || e === "abort" || e === "unmount" || e === "replace" || e === "programmatic" ? e : "abort";
58
56
  }
59
- class ne {
57
+ class R {
60
58
  constructor(a) {
61
59
  this._container = null, this._ownsContainer = !1, this._queue = [], this._active = [], this._disposed = !1, this._seed = 0, this._defaults = {}, this._container = a ?? null;
62
60
  }
@@ -77,81 +75,78 @@ class ne {
77
75
  }
78
76
  destroy(a = "unmount") {
79
77
  this._disposed = !0;
80
- const n = [...this._active, ...this._queue];
78
+ const r = [...this._active, ...this._queue];
81
79
  this._queue = [];
82
- for (const i of n)
83
- this._settle(i, ka(i, a), !1);
80
+ for (const i of r)
81
+ this._settle(i, h(i, a), !1);
84
82
  this._active = [], this._ownsContainer && this._container && this._container.parentElement && this._container.parentElement.removeChild(this._container), this._container = null, this._ownsContainer = !1;
85
83
  }
86
- _enqueue(a, n) {
87
- const i = this._mergeOptions(n);
88
- if (!ja() || this._disposed) {
89
- const c = {
90
- id: i.id || Za(++this._seed),
84
+ _enqueue(a, r) {
85
+ const i = this._mergeOptions(r);
86
+ if (!y() || this._disposed) {
87
+ const l = {
88
+ id: i.id || w(++this._seed),
91
89
  action: "dismiss",
92
90
  source: "unmount"
93
91
  };
94
- return Promise.resolve(c);
92
+ return Promise.resolve(l);
95
93
  }
96
- const r = i.id || Za(++this._seed), o = ae(i.mode);
97
- return new Promise((c) => {
98
- var d;
99
- const l = {
100
- id: r,
94
+ const s = i.id || w(++this._seed), n = L(i.mode);
95
+ return new Promise((l) => {
96
+ const d = {
97
+ id: s,
101
98
  kind: a,
102
- mode: o,
99
+ mode: n,
103
100
  options: i,
104
101
  settled: !1,
105
102
  processing: !1,
106
- resolve: c,
103
+ resolve: l,
107
104
  cleanup: []
108
105
  };
109
- if ((d = i.signal) != null && d.aborted) {
110
- this._settle(l, ka(l, "abort"), !1);
106
+ if (i.signal?.aborted) {
107
+ this._settle(d, h(d, "abort"), !1);
111
108
  return;
112
109
  }
113
- if (o === "replace") {
114
- const f = this._active[this._active.length - 1];
115
- f && this._settle(f, ka(f, "replace", "replace"), !1, !1), this._open(l);
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);
116
113
  return;
117
114
  }
118
- if (o === "stack") {
119
- this._open(l);
115
+ if (n === "stack") {
116
+ this._open(d);
120
117
  return;
121
118
  }
122
119
  if (this._active.length > 0) {
123
- this._queue.push(l);
120
+ this._queue.push(d);
124
121
  return;
125
122
  }
126
- this._open(l);
123
+ this._open(d);
127
124
  });
128
125
  }
129
126
  _open(a) {
130
- var d;
131
- const n = this._ensureContainer();
132
- if (!n) {
133
- this._settle(a, ka(a, "unmount"), !1);
127
+ const r = this._ensureContainer();
128
+ if (!r) {
129
+ this._settle(a, h(a, "unmount"), !1);
134
130
  return;
135
131
  }
136
132
  const i = document.createElement("ui-alert-dialog");
137
- a.dialog = i, a.checked = !!((d = a.options.checkbox) != null && d.defaultChecked);
138
- const r = this._buildConfig(a);
139
- i.dialogId = a.id, i.config = r;
140
- const o = (f) => {
141
- if (a.settled)
142
- return;
143
- const u = f.detail;
144
- a.value = u == null ? void 0 : u.inputValue, a.checked = u == null ? void 0 : u.checked;
145
- const m = this._validatePrompt(a);
146
- if (m) {
147
- f.preventDefault(), i.setError(m);
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) => {
137
+ if (a.settled) return;
138
+ const u = c.detail;
139
+ a.value = u?.inputValue, a.checked = u?.checked;
140
+ const v = this._validatePrompt(a);
141
+ if (v) {
142
+ c.preventDefault(), i.setError(v);
148
143
  return;
149
144
  }
150
145
  if (!a.options.onConfirm) {
151
146
  i.clearError();
152
147
  return;
153
148
  }
154
- f.preventDefault(), a.processing = !0, i.state = "loading", i.clearError(), Promise.resolve(
149
+ c.preventDefault(), a.processing = !0, i.state = "loading", i.clearError(), Promise.resolve(
155
150
  a.options.onConfirm({
156
151
  id: a.id,
157
152
  value: a.value,
@@ -161,128 +156,119 @@ class ne {
161
156
  })
162
157
  ).then(() => {
163
158
  a.processing = !1, i.state = "idle", i.clearError(), a.settled || i.close("confirm");
164
- }).catch((h) => {
165
- a.processing = !1, i.state = "error", i.setError(qa(h));
159
+ }).catch((I) => {
160
+ a.processing = !1, i.state = "error", i.setError(P(I));
166
161
  });
167
- }, c = () => {
162
+ }, l = () => {
168
163
  a.settled || (a.value = i.getInputValue(), a.checked = i.getChecked(), i.state === "error" && i.clearError());
169
- }, l = (f) => {
170
- if (a.settled)
171
- return;
172
- const u = f.detail;
164
+ }, d = (c) => {
165
+ if (a.settled) return;
166
+ const u = c.detail;
173
167
  this._handleClose(a, u);
174
168
  };
175
- if (i.addEventListener("ui-confirm", o), i.addEventListener("ui-change", c), i.addEventListener("ui-close", l), a.cleanup.push(() => i.removeEventListener("ui-confirm", o)), a.cleanup.push(() => i.removeEventListener("ui-change", c)), a.cleanup.push(() => i.removeEventListener("ui-close", l)), a.options.signal) {
176
- const f = () => {
177
- a.settled || this._settle(a, ka(a, "abort"), !1);
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 = () => {
171
+ a.settled || this._settle(a, h(a, "abort"), !1);
178
172
  };
179
- a.options.signal.addEventListener("abort", f, { once: !0 }), a.cleanup.push(() => {
180
- var u;
181
- return (u = a.options.signal) == null ? void 0 : u.removeEventListener("abort", f);
182
- });
173
+ a.options.signal.addEventListener("abort", c, { once: !0 }), a.cleanup.push(() => a.options.signal?.removeEventListener("abort", c));
183
174
  }
184
- this._active.push(a), n.appendChild(i), i.open = !0, this._updateStackZIndex();
175
+ this._active.push(a), r.appendChild(i), i.open = !0, this._updateStackZIndex();
185
176
  }
186
177
  _validatePrompt(a) {
187
- var o;
188
- if (a.kind !== "prompt")
189
- return null;
190
- const i = a.options.input, r = ((o = a.dialog) == null ? void 0 : o.getInputValue()) ?? a.value ?? "";
191
- return i != null && i.required && !r.trim() ? "Please enter a value." : i != null && i.validate ? i.validate(r) : null;
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;
192
181
  }
193
- _settle(a, n, i, r = !0) {
182
+ _settle(a, r, i, s = !0) {
194
183
  if (!a.settled) {
195
- if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((o) => o !== a), this._queue = this._queue.filter((o) => o !== a), a.dialog) {
196
- const o = a.dialog;
197
- if (!i && o.open) {
198
- const c = ie(n.source);
199
- o.close("dismiss", c, n.reason);
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 = O(r.source);
188
+ n.close("dismiss", l, r.reason);
200
189
  }
201
- o.parentElement && o.parentElement.removeChild(o);
190
+ n.parentElement && n.parentElement.removeChild(n);
202
191
  }
203
- a.resolve(n), this._updateStackZIndex(), !this._disposed && r && this._drainQueue();
192
+ a.resolve(r), this._updateStackZIndex(), !this._disposed && s && this._drainQueue();
204
193
  }
205
194
  }
206
195
  _cleanupRequest(a) {
207
- for (const n of a.cleanup.splice(0))
196
+ for (const r of a.cleanup.splice(0))
208
197
  try {
209
- n();
198
+ r();
210
199
  } catch {
211
200
  }
212
201
  }
213
202
  _drainQueue() {
214
- if (this._active.length > 0)
215
- return;
203
+ if (this._active.length > 0) return;
216
204
  const a = this._queue.shift();
217
205
  a && this._open(a);
218
206
  }
219
207
  _buildConfig(a) {
220
- var c, l, d;
221
- const n = a.options, i = a.kind === "prompt", r = a.kind === "alert", o = i ? n.input : void 0;
208
+ const r = a.options, i = a.kind === "prompt", s = a.kind === "alert", n = i ? r.input : void 0;
222
209
  return {
223
210
  id: a.id,
224
- title: n.title,
225
- description: n.description,
226
- confirmText: n.confirmText || (r ? "OK" : "Confirm"),
227
- cancelText: n.cancelText || "Cancel",
228
- loadingText: n.loadingText,
229
- errorMessage: n.errorMessage,
230
- dismissible: n.dismissible ?? !0,
231
- closeOnEsc: n.closeOnEsc,
232
- closeOnBackdrop: n.closeOnBackdrop,
233
- lockWhileLoading: n.lockWhileLoading ?? !0,
234
- role: n.role || "alertdialog",
235
- tone: n.tone || (r ? "info" : i ? "neutral" : "warning"),
236
- size: n.size || "md",
237
- variant: n.variant || "surface",
238
- radius: n.radius,
239
- elevation: n.elevation || "low",
240
- indicator: n.indicator || "line",
241
- initialFocus: n.initialFocus,
242
- ariaLabel: n.ariaLabel,
243
- ariaLabelledby: n.ariaLabelledby,
244
- ariaDescribedby: n.ariaDescribedby,
245
- headless: n.headless,
246
- showCancel: !r,
247
- showClose: n.dismissible ?? !0,
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,
248
235
  input: {
249
236
  enabled: i,
250
- label: o == null ? void 0 : o.label,
251
- placeholder: o == null ? void 0 : o.placeholder,
252
- value: (o == null ? void 0 : o.defaultValue) || "",
253
- required: o == null ? void 0 : o.required
237
+ label: n?.label,
238
+ placeholder: n?.placeholder,
239
+ value: n?.defaultValue || "",
240
+ required: n?.required
254
241
  },
255
242
  checkbox: {
256
- enabled: !!((c = n.checkbox) != null && c.enabled),
257
- label: (l = n.checkbox) == null ? void 0 : l.label,
258
- checked: (d = n.checkbox) == null ? void 0 : d.defaultChecked
243
+ enabled: !!r.checkbox?.enabled,
244
+ label: r.checkbox?.label,
245
+ checked: r.checkbox?.defaultChecked
259
246
  }
260
247
  };
261
248
  }
262
249
  _buildLifecycleContext(a) {
263
- var n, i;
264
250
  return {
265
251
  id: a.id,
266
- value: ((n = a.dialog) == null ? void 0 : n.getInputValue()) ?? a.value,
267
- checked: ((i = a.dialog) == null ? void 0 : i.getChecked()) ?? a.checked,
252
+ value: a.dialog?.getInputValue() ?? a.value,
253
+ checked: a.dialog?.getChecked() ?? a.checked,
268
254
  dialog: a.dialog,
269
255
  signal: a.options.signal
270
256
  };
271
257
  }
272
- _handleClose(a, n) {
273
- const i = ee(a, n);
274
- if (n.action === "cancel" && a.options.onCancel) {
258
+ _handleClose(a, r) {
259
+ const i = M(a, r);
260
+ if (r.action === "cancel" && a.options.onCancel) {
275
261
  Promise.resolve(a.options.onCancel(this._buildLifecycleContext(a))).finally(() => {
276
262
  this._settle(a, i, !0);
277
263
  });
278
264
  return;
279
265
  }
280
- if (n.action === "dismiss" && a.options.onDismiss) {
266
+ if (r.action === "dismiss" && a.options.onDismiss) {
281
267
  Promise.resolve(
282
268
  a.options.onDismiss({
283
269
  ...this._buildLifecycleContext(a),
284
- source: n.source || "programmatic",
285
- reason: n.reason
270
+ source: r.source || "programmatic",
271
+ reason: r.reason
286
272
  })
287
273
  ).finally(() => {
288
274
  this._settle(a, i, !0);
@@ -292,63 +278,61 @@ class ne {
292
278
  this._settle(a, i, !0);
293
279
  }
294
280
  _mergeOptions(a) {
295
- const n = this._defaults;
281
+ const r = this._defaults;
296
282
  return {
297
- ...n,
283
+ ...r,
298
284
  ...a,
299
285
  checkbox: {
300
- ...n.checkbox || {},
286
+ ...r.checkbox || {},
301
287
  ...a.checkbox || {}
302
288
  }
303
289
  };
304
290
  }
305
291
  _ensureContainer() {
306
- if (!ja())
307
- return null;
308
- if (this._container && this._container.isConnected)
309
- return this._container;
292
+ if (!y()) return null;
293
+ if (this._container && this._container.isConnected) return this._container;
310
294
  let a = document.querySelector('[data-ui-alert-dialog-host="true"]');
311
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;
312
296
  }
313
297
  _updateStackZIndex() {
314
298
  for (let a = 0; a < this._active.length; a += 1) {
315
- const n = this._active[a];
316
- n.dialog && (n.dialog.style.setProperty("--ui-alert-backdrop-z", String(1e3 + a * 2)), n.dialog.style.setProperty("--ui-alert-z", String(1001 + a * 2)));
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)));
317
301
  }
318
302
  }
319
303
  }
320
- let x = null;
321
- function oe(e = {}) {
322
- return new ne(e.container ?? null);
304
+ let m = null;
305
+ function H(e = {}) {
306
+ return new R(e.container ?? null);
323
307
  }
324
- function Sa() {
325
- return x || (x = oe()), x;
308
+ function b() {
309
+ return m || (m = H()), m;
326
310
  }
327
- function ge(e = {}) {
328
- return Sa().alert(e);
311
+ function N(e = {}) {
312
+ return b().alert(e);
329
313
  }
330
- function me(e = {}) {
331
- return Sa().confirm(e);
314
+ function G(e = {}) {
315
+ return b().confirm(e);
332
316
  }
333
- function he(e = {}) {
334
- return Sa().prompt(e);
317
+ function K(e = {}) {
318
+ return b().prompt(e);
335
319
  }
336
- function xe(e = "programmatic") {
337
- x && (x.destroy(e), x = null);
320
+ function J(e = "programmatic") {
321
+ m && (m.destroy(e), m = null);
338
322
  }
339
- function Ua() {
323
+ function k() {
340
324
  return typeof window < "u" && typeof document < "u";
341
325
  }
342
- function te(e) {
326
+ function F(e) {
343
327
  return e === "replace" || e === "stack" ? e : "queue";
344
328
  }
345
- function Qa(e) {
329
+ function _(e) {
346
330
  return `ui-dialog-${e}`;
347
331
  }
348
- function re(e) {
332
+ function B(e) {
349
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.";
350
334
  }
351
- class se {
335
+ class $ {
352
336
  constructor(a) {
353
337
  this._container = null, this._ownsContainer = !1, this._queue = [], this._active = [], this._disposed = !1, this._seed = 0, this._container = a ?? null;
354
338
  }
@@ -363,9 +347,9 @@ class se {
363
347
  }
364
348
  destroy(a = "unmount") {
365
349
  this._disposed = !0;
366
- const n = [...this._active, ...this._queue];
350
+ const r = [...this._active, ...this._queue];
367
351
  this._queue = [];
368
- for (const i of n)
352
+ for (const i of r)
369
353
  this._settle(i, {
370
354
  id: i.id,
371
355
  action: "dismiss",
@@ -375,46 +359,45 @@ class se {
375
359
  this._active = [], this._ownsContainer && this._container && this._container.parentElement && this._container.parentElement.removeChild(this._container), this._container = null, this._ownsContainer = !1;
376
360
  }
377
361
  _enqueue(a) {
378
- if (!Ua() || this._disposed)
362
+ if (!k() || this._disposed)
379
363
  return Promise.resolve({
380
- id: a.id || Qa(++this._seed),
364
+ id: a.id || _(++this._seed),
381
365
  action: "dismiss",
382
366
  source: "unmount"
383
367
  });
384
- const n = a.id || Qa(++this._seed), i = te(a.mode);
385
- return new Promise((r) => {
386
- var c;
387
- const o = {
388
- id: n,
368
+ const r = a.id || _(++this._seed), i = F(a.mode);
369
+ return new Promise((s) => {
370
+ const n = {
371
+ id: r,
389
372
  mode: i,
390
373
  options: a,
391
374
  settled: !1,
392
- resolve: r,
375
+ resolve: s,
393
376
  cleanup: []
394
377
  };
395
- if ((c = a.signal) != null && c.aborted) {
396
- this._settle(o, { id: n, action: "dismiss", source: "abort" }, !1);
378
+ if (a.signal?.aborted) {
379
+ this._settle(n, { id: r, action: "dismiss", source: "abort" }, !1);
397
380
  return;
398
381
  }
399
382
  if (i === "replace") {
400
383
  const l = this._active[this._active.length - 1];
401
- l && this._settle(l, { id: l.id, action: "dismiss", source: "replace", reason: "replace" }, !1, !1), this._open(o);
384
+ l && this._settle(l, { id: l.id, action: "dismiss", source: "replace", reason: "replace" }, !1, !1), this._open(n);
402
385
  return;
403
386
  }
404
387
  if (i === "stack") {
405
- this._open(o);
388
+ this._open(n);
406
389
  return;
407
390
  }
408
391
  if (this._active.length > 0) {
409
- this._queue.push(o);
392
+ this._queue.push(n);
410
393
  return;
411
394
  }
412
- this._open(o);
395
+ this._open(n);
413
396
  });
414
397
  }
415
398
  _open(a) {
416
- const n = this._ensureContainer();
417
- if (!n) {
399
+ const r = this._ensureContainer();
400
+ if (!r) {
418
401
  this._settle(a, {
419
402
  id: a.id,
420
403
  action: "dismiss",
@@ -424,80 +407,74 @@ class se {
424
407
  }
425
408
  const i = document.createElement("ui-dialog");
426
409
  a.dialog = i;
427
- const r = this._buildConfig(a.options, a.id);
428
- i.dialogId = a.id, i.config = r;
429
- const o = (l) => {
430
- if (a.settled)
431
- return;
432
- const d = l.detail;
433
- if (a.resultFormData = d == null ? void 0 : d.formData, !a.options.onSubmit) {
410
+ const s = this._buildConfig(a.options, a.id);
411
+ i.dialogId = a.id, i.config = s;
412
+ const n = (d) => {
413
+ if (a.settled) return;
414
+ const c = d.detail;
415
+ if (a.resultFormData = c?.formData, !a.options.onSubmit) {
434
416
  i.clearError();
435
417
  return;
436
418
  }
437
- l.preventDefault(), i.state = "loading", i.clearError(), Promise.resolve(
419
+ d.preventDefault(), i.state = "loading", i.clearError(), Promise.resolve(
438
420
  a.options.onSubmit({
439
421
  id: a.id,
440
422
  dialog: i,
441
423
  signal: a.options.signal,
442
- formData: d == null ? void 0 : d.formData
424
+ formData: c?.formData
443
425
  })
444
426
  ).then(() => {
445
427
  a.settled || (i.state = "idle", i.clearError(), i.close("submit"));
446
- }).catch((f) => {
447
- i.state = "error", i.setError(re(f));
428
+ }).catch((u) => {
429
+ i.state = "error", i.setError(B(u));
448
430
  });
449
- }, c = (l) => {
450
- if (a.settled)
451
- return;
452
- const d = l.detail;
431
+ }, l = (d) => {
432
+ if (a.settled) return;
433
+ const c = d.detail;
453
434
  this._settle(a, {
454
435
  id: a.id,
455
- action: d.action,
456
- source: d.source,
457
- reason: d.reason,
436
+ action: c.action,
437
+ source: c.source,
438
+ reason: c.reason,
458
439
  formData: a.resultFormData
459
440
  }, !0);
460
441
  };
461
- if (i.addEventListener("ui-submit", o), i.addEventListener("ui-close", c), a.cleanup.push(() => i.removeEventListener("ui-submit", o)), a.cleanup.push(() => i.removeEventListener("ui-close", c)), a.options.signal) {
462
- const l = () => {
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 = () => {
463
444
  a.settled || this._settle(a, {
464
445
  id: a.id,
465
446
  action: "dismiss",
466
447
  source: "abort"
467
448
  }, !1);
468
449
  };
469
- a.options.signal.addEventListener("abort", l, { once: !0 }), a.cleanup.push(() => {
470
- var d;
471
- return (d = a.options.signal) == null ? void 0 : d.removeEventListener("abort", l);
472
- });
450
+ a.options.signal.addEventListener("abort", d, { once: !0 }), a.cleanup.push(() => a.options.signal?.removeEventListener("abort", d));
473
451
  }
474
- this._active.push(a), n.appendChild(i), i.openDialog(), this._updateStackZIndex();
452
+ this._active.push(a), r.appendChild(i), i.openDialog(), this._updateStackZIndex();
475
453
  }
476
- _settle(a, n, i, r = !0) {
454
+ _settle(a, r, i, s = !0) {
477
455
  if (!a.settled) {
478
- if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((o) => o !== a), this._queue = this._queue.filter((o) => o !== a), a.dialog) {
479
- const o = a.dialog;
480
- !i && o.open && o.close("dismiss", n.source || "abort", n.reason), o.parentElement && o.parentElement.removeChild(o);
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);
481
459
  }
482
- a.resolve(n), this._updateStackZIndex(), !this._disposed && r && this._drainQueue();
460
+ a.resolve(r), this._updateStackZIndex(), !this._disposed && s && this._drainQueue();
483
461
  }
484
462
  }
485
463
  _cleanupRequest(a) {
486
- for (const n of a.cleanup.splice(0))
464
+ for (const r of a.cleanup.splice(0))
487
465
  try {
488
- n();
466
+ r();
489
467
  } catch {
490
468
  }
491
469
  }
492
470
  _drainQueue() {
493
- if (this._active.length > 0)
494
- return;
471
+ if (this._active.length > 0) return;
495
472
  const a = this._queue.shift();
496
473
  a && this._open(a);
497
474
  }
498
- _buildConfig(a, n) {
475
+ _buildConfig(a, r) {
499
476
  return {
500
- id: n,
477
+ id: r,
501
478
  title: a.title,
502
479
  description: a.description,
503
480
  submitText: a.submitText || "Submit",
@@ -520,37 +497,35 @@ class se {
520
497
  };
521
498
  }
522
499
  _ensureContainer() {
523
- if (!Ua())
524
- return null;
525
- if (this._container && this._container.isConnected)
526
- return this._container;
500
+ if (!k()) return null;
501
+ if (this._container && this._container.isConnected) return this._container;
527
502
  let a = document.querySelector('[data-ui-dialog-host="true"]');
528
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;
529
504
  }
530
505
  _updateStackZIndex() {
531
506
  for (let a = 0; a < this._active.length; a += 1) {
532
- const n = this._active[a];
533
- n.dialog && (n.dialog.style.setProperty("--ui-dialog-backdrop-z", String(1200 + a * 2)), n.dialog.style.setProperty("--ui-dialog-z", String(1201 + a * 2)));
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)));
534
509
  }
535
510
  }
536
511
  }
537
- let b = null;
538
- function pe(e = {}) {
539
- return new se(e.container ?? null);
512
+ let g = null;
513
+ function V(e = {}) {
514
+ return new $(e.container ?? null);
540
515
  }
541
- function Na() {
542
- return b || (b = pe()), b;
516
+ function C() {
517
+ return g || (g = V()), g;
543
518
  }
544
- function be(e = {}) {
545
- return Na().open(e);
519
+ function X(e = {}) {
520
+ return C().open(e);
546
521
  }
547
- function ye(e = {}) {
548
- return Na().confirm(e);
522
+ function Y(e = {}) {
523
+ return C().confirm(e);
549
524
  }
550
- function we(e = "programmatic") {
551
- b && (b.destroy(e), b = null);
525
+ function q(e = "programmatic") {
526
+ g && (g.destroy(e), g = null);
552
527
  }
553
- const Ga = {
528
+ const z = {
554
529
  1: "#0000000d",
555
530
  2: "#0000001a",
556
531
  3: "#00000026",
@@ -563,7 +538,7 @@ const Ga = {
563
538
  10: "#000c",
564
539
  11: "#000000e6",
565
540
  12: "#000000f2"
566
- }, Ka = {
541
+ }, E = {
567
542
  1: "#ffffff0d",
568
543
  2: "#ffffff1a",
569
544
  3: "#ffffff26",
@@ -576,7 +551,7 @@ const Ga = {
576
551
  10: "#fffc",
577
552
  11: "#ffffffe6",
578
553
  12: "#fffffff2"
579
- }, g = {
554
+ }, f = {
580
555
  amber: {
581
556
  light: {
582
557
  scale: {
@@ -927,7 +902,7 @@ const Ga = {
927
902
  track: "#7b7b7b"
928
903
  }
929
904
  }
930
- }, ce = {
905
+ }, j = {
931
906
  button: {
932
907
  "height-sm": "32px",
933
908
  "height-md": "36px",
@@ -1226,7 +1201,7 @@ const Ga = {
1226
1201
  border: "1px solid color-mix(in srgb, var(--gray-a5) 84%, transparent)",
1227
1202
  "focus-ring": "0 0 0 3px color-mix(in srgb, var(--accent-a5) 48%, transparent)"
1228
1203
  }
1229
- }, le = {
1204
+ }, Z = {
1230
1205
  button: {
1231
1206
  "height-sm": "32px",
1232
1207
  "height-md": "36px",
@@ -1526,7 +1501,7 @@ const Ga = {
1526
1501
  "focus-ring": "0 0 0 3px color-mix(in srgb, var(--accent-a6) 42%, transparent)"
1527
1502
  }
1528
1503
  };
1529
- function Ja(e) {
1504
+ function A(e) {
1530
1505
  return {
1531
1506
  primary: e.scale[9],
1532
1507
  primaryHover: e.scale[10] || e.scale[9],
@@ -1535,7 +1510,7 @@ function Ja(e) {
1535
1510
  warning: e.scale[9]
1536
1511
  };
1537
1512
  }
1538
- const _a = {
1513
+ const x = {
1539
1514
  colors: {
1540
1515
  primary: "#ffc53d",
1541
1516
  primaryHover: "#ffba18",
@@ -1580,18 +1555,18 @@ const _a = {
1580
1555
  11: "#0000009b",
1581
1556
  12: "#000000df"
1582
1557
  },
1583
- blackAlpha: Ga,
1584
- whiteAlpha: Ka,
1558
+ blackAlpha: z,
1559
+ whiteAlpha: E,
1585
1560
  accent: {
1586
- ...g.amber.light.scale
1561
+ ...f.amber.light.scale
1587
1562
  },
1588
1563
  accentAlpha: {
1589
- ...g.amber.light.alphaScale
1564
+ ...f.amber.light.alphaScale
1590
1565
  },
1591
- accentContrast: g.amber.light.contrast,
1592
- accentSurface: g.amber.light.surface,
1593
- accentIndicator: g.amber.light.indicator,
1594
- accentTrack: g.amber.light.track
1566
+ accentContrast: f.amber.light.contrast,
1567
+ accentSurface: f.amber.light.surface,
1568
+ accentIndicator: f.amber.light.indicator,
1569
+ accentTrack: f.amber.light.track
1595
1570
  },
1596
1571
  surfaces: {
1597
1572
  background: "#ffffff",
@@ -1689,11 +1664,11 @@ const _a = {
1689
1664
  effects: {
1690
1665
  backdropFilterPanel: "blur(64px)"
1691
1666
  },
1692
- components: ce,
1667
+ components: j,
1693
1668
  zIndex: { modal: 1e3, overlay: 900, toast: 1100 },
1694
1669
  breakpoints: { sm: "640px", md: "768px", lg: "1024px" }
1695
- }, de = {
1696
- ..._a,
1670
+ }, U = {
1671
+ ...x,
1697
1672
  colors: {
1698
1673
  primary: "#ffc53d",
1699
1674
  primaryHover: "#ffd60a",
@@ -1710,7 +1685,7 @@ const _a = {
1710
1685
  warning: "#ffc53d"
1711
1686
  },
1712
1687
  palette: {
1713
- ..._a.palette,
1688
+ ...x.palette,
1714
1689
  gray: {
1715
1690
  1: "#111",
1716
1691
  2: "#191919",
@@ -1739,18 +1714,18 @@ const _a = {
1739
1714
  11: "#ffffffaf",
1740
1715
  12: "#ffffffed"
1741
1716
  },
1742
- blackAlpha: Ga,
1743
- whiteAlpha: Ka,
1717
+ blackAlpha: z,
1718
+ whiteAlpha: E,
1744
1719
  accent: {
1745
- ...g.amber.dark.scale
1720
+ ...f.amber.dark.scale
1746
1721
  },
1747
1722
  accentAlpha: {
1748
- ...g.amber.dark.alphaScale
1723
+ ...f.amber.dark.alphaScale
1749
1724
  },
1750
- accentContrast: g.amber.dark.contrast,
1751
- accentSurface: g.amber.dark.surface,
1752
- accentIndicator: g.amber.dark.indicator,
1753
- accentTrack: g.amber.dark.track
1725
+ accentContrast: f.amber.dark.contrast,
1726
+ accentSurface: f.amber.dark.surface,
1727
+ accentIndicator: f.amber.dark.indicator,
1728
+ accentTrack: f.amber.dark.track
1754
1729
  },
1755
1730
  surfaces: {
1756
1731
  background: "#111111",
@@ -1772,25 +1747,24 @@ const _a = {
1772
1747
  5: "0 0 0 1px var(--gray-a6),0 12px 60px var(--black-a5),0 12px 32px -16px var(--black-a7)",
1773
1748
  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
1749
  },
1775
- components: le
1776
- }, ve = _a, Xa = /* @__PURE__ */ new Set();
1750
+ components: Z
1751
+ }, aa = x, D = /* @__PURE__ */ new Set();
1777
1752
  function p(e, a) {
1778
1753
  if (!(!e && !a))
1779
1754
  return { ...e || {}, ...a || {} };
1780
1755
  }
1781
- function Ya(e, a) {
1782
- var d, f, u, m, h, y, w, v, k, _, S, C, z, E, A, D, T, I, L, M, P, R, H, F, O, B, $, V, j, Z, U, Q, W, N, G, K, J, X, Y, q, aa, ea, ia, na, oa, ta, ra, sa, pa, ca, la, da, fa, ua, ga, ma, ha, xa, ba, ya, wa, va;
1783
- const n = (a == null ? void 0 : a.mode) || "light", i = n === "dark" ? de : _a, r = a == null ? void 0 : a.accentPalette, o = r ? g[r][n] : null, c = o ? {
1756
+ function T(e, a) {
1757
+ const r = a?.mode || "light", i = r === "dark" ? U : x, s = a?.accentPalette, n = s ? f[s][r] : null, l = n ? {
1784
1758
  colors: {
1785
- ...Ja(o)
1759
+ ...A(n)
1786
1760
  },
1787
1761
  palette: {
1788
- accent: o.scale,
1789
- accentAlpha: o.alphaScale,
1790
- accentContrast: o.contrast,
1791
- accentSurface: o.surface,
1792
- accentIndicator: o.indicator,
1793
- accentTrack: o.track
1762
+ accent: n.scale,
1763
+ accentAlpha: n.alphaScale,
1764
+ accentContrast: n.contrast,
1765
+ accentSurface: n.surface,
1766
+ accentIndicator: n.indicator,
1767
+ accentTrack: n.track
1794
1768
  }
1795
1769
  } : null;
1796
1770
  return {
@@ -1798,99 +1772,99 @@ function Ya(e, a) {
1798
1772
  ...e,
1799
1773
  colors: {
1800
1774
  ...i.colors,
1801
- ...(c == null ? void 0 : c.colors) || {},
1802
- ...(e == null ? void 0 : e.colors) || {}
1775
+ ...l?.colors || {},
1776
+ ...e?.colors || {}
1803
1777
  },
1804
1778
  palette: {
1805
1779
  ...i.palette || {},
1806
- ...(c == null ? void 0 : c.palette) || {},
1807
- ...(e == null ? void 0 : e.palette) || {},
1808
- gray: p((d = i.palette) == null ? void 0 : d.gray, (f = e == null ? void 0 : e.palette) == null ? void 0 : f.gray),
1809
- grayAlpha: p((u = i.palette) == null ? void 0 : u.grayAlpha, (m = e == null ? void 0 : e.palette) == null ? void 0 : m.grayAlpha),
1810
- blackAlpha: p((h = i.palette) == null ? void 0 : h.blackAlpha, (y = e == null ? void 0 : e.palette) == null ? void 0 : y.blackAlpha),
1811
- whiteAlpha: p((w = i.palette) == null ? void 0 : w.whiteAlpha, (v = e == null ? void 0 : e.palette) == null ? void 0 : v.whiteAlpha),
1812
- accent: p((o == null ? void 0 : o.scale) || ((k = i.palette) == null ? void 0 : k.accent), (_ = e == null ? void 0 : e.palette) == null ? void 0 : _.accent),
1813
- accentAlpha: p((o == null ? void 0 : o.alphaScale) || ((S = i.palette) == null ? void 0 : S.accentAlpha), (C = e == null ? void 0 : e.palette) == null ? void 0 : C.accentAlpha)
1780
+ ...l?.palette || {},
1781
+ ...e?.palette || {},
1782
+ gray: p(i.palette?.gray, e?.palette?.gray),
1783
+ grayAlpha: p(i.palette?.grayAlpha, e?.palette?.grayAlpha),
1784
+ blackAlpha: p(i.palette?.blackAlpha, e?.palette?.blackAlpha),
1785
+ whiteAlpha: p(i.palette?.whiteAlpha, e?.palette?.whiteAlpha),
1786
+ accent: p(n?.scale || i.palette?.accent, e?.palette?.accent),
1787
+ accentAlpha: p(n?.alphaScale || i.palette?.accentAlpha, e?.palette?.accentAlpha)
1814
1788
  },
1815
1789
  surfaces: {
1816
1790
  ...i.surfaces || {},
1817
- ...(e == null ? void 0 : e.surfaces) || {}
1791
+ ...e?.surfaces || {}
1818
1792
  },
1819
1793
  shadows: {
1820
1794
  ...i.shadows || {},
1821
- ...(e == null ? void 0 : e.shadows) || {}
1795
+ ...e?.shadows || {}
1822
1796
  },
1823
1797
  spacing: {
1824
1798
  ...i.spacing || {},
1825
- ...(e == null ? void 0 : e.spacing) || {}
1799
+ ...e?.spacing || {}
1826
1800
  },
1827
- spaceScale: p(i.spaceScale, e == null ? void 0 : e.spaceScale),
1828
- radiusScale: p(i.radiusScale, e == null ? void 0 : e.radiusScale),
1801
+ spaceScale: p(i.spaceScale, e?.spaceScale),
1802
+ radiusScale: p(i.radiusScale, e?.radiusScale),
1829
1803
  typography: {
1830
1804
  ...i.typography || {},
1831
- ...(e == null ? void 0 : e.typography) || {},
1805
+ ...e?.typography || {},
1832
1806
  size: {
1833
- ...((z = i.typography) == null ? void 0 : z.size) || {},
1834
- ...((E = e == null ? void 0 : e.typography) == null ? void 0 : E.size) || {}
1807
+ ...i.typography?.size || {},
1808
+ ...e?.typography?.size || {}
1835
1809
  },
1836
- fontScale: p((A = i.typography) == null ? void 0 : A.fontScale, (D = e == null ? void 0 : e.typography) == null ? void 0 : D.fontScale),
1837
- lineHeight: p((T = i.typography) == null ? void 0 : T.lineHeight, (I = e == null ? void 0 : e.typography) == null ? void 0 : I.lineHeight),
1838
- letterSpacing: p((L = i.typography) == null ? void 0 : L.letterSpacing, (M = e == null ? void 0 : e.typography) == null ? void 0 : M.letterSpacing)
1810
+ fontScale: p(i.typography?.fontScale, e?.typography?.fontScale),
1811
+ lineHeight: p(i.typography?.lineHeight, e?.typography?.lineHeight),
1812
+ letterSpacing: p(i.typography?.letterSpacing, e?.typography?.letterSpacing)
1839
1813
  },
1840
1814
  motion: {
1841
1815
  ...i.motion || {},
1842
- ...(e == null ? void 0 : e.motion) || {}
1816
+ ...e?.motion || {}
1843
1817
  },
1844
1818
  effects: {
1845
1819
  ...i.effects || {},
1846
- ...(e == null ? void 0 : e.effects) || {}
1820
+ ...e?.effects || {}
1847
1821
  },
1848
1822
  components: {
1849
1823
  ...i.components || {},
1850
- ...(e == null ? void 0 : e.components) || {},
1851
- button: p((P = i.components) == null ? void 0 : P.button, (R = e == null ? void 0 : e.components) == null ? void 0 : R.button),
1852
- badge: p((H = i.components) == null ? void 0 : H.badge, (F = e == null ? void 0 : e.components) == null ? void 0 : F.badge),
1853
- dropdown: p((O = i.components) == null ? void 0 : O.dropdown, (B = e == null ? void 0 : e.components) == null ? void 0 : B.dropdown),
1854
- select: p(($ = i.components) == null ? void 0 : $.select, (V = e == null ? void 0 : e.components) == null ? void 0 : V.select),
1855
- sidebar: p((j = i.components) == null ? void 0 : j.sidebar, (Z = e == null ? void 0 : e.components) == null ? void 0 : Z.sidebar),
1856
- card: p((U = i.components) == null ? void 0 : U.card, (Q = e == null ? void 0 : e.components) == null ? void 0 : Q.card),
1857
- navigationMenu: p((W = i.components) == null ? void 0 : W.navigationMenu, (N = e == null ? void 0 : e.components) == null ? void 0 : N.navigationMenu),
1858
- blockControls: p((G = i.components) == null ? void 0 : G.blockControls, (K = e == null ? void 0 : e.components) == null ? void 0 : K.blockControls),
1859
- box: p((J = i.components) == null ? void 0 : J.box, (X = e == null ? void 0 : e.components) == null ? void 0 : X.box),
1860
- breadcrumb: p((Y = i.components) == null ? void 0 : Y.breadcrumb, (q = e == null ? void 0 : e.components) == null ? void 0 : q.breadcrumb),
1861
- contextMenu: p((aa = i.components) == null ? void 0 : aa.contextMenu, (ea = e == null ? void 0 : e.components) == null ? void 0 : ea.contextMenu),
1862
- menubar: p((ia = i.components) == null ? void 0 : ia.menubar, (na = e == null ? void 0 : e.components) == null ? void 0 : na.menubar),
1863
- alert: p((oa = i.components) == null ? void 0 : oa.alert, (ta = e == null ? void 0 : e.components) == null ? void 0 : ta.alert),
1864
- alertDialog: p((ra = i.components) == null ? void 0 : ra.alertDialog, (sa = e == null ? void 0 : e.components) == null ? void 0 : sa.alertDialog),
1865
- appHeader: p((pa = i.components) == null ? void 0 : pa.appHeader, (ca = e == null ? void 0 : e.components) == null ? void 0 : ca.appHeader),
1866
- aspectRatio: p((la = i.components) == null ? void 0 : la.aspectRatio, (da = e == null ? void 0 : e.components) == null ? void 0 : da.aspectRatio),
1867
- avatar: p((fa = i.components) == null ? void 0 : fa.avatar, (ua = e == null ? void 0 : e.components) == null ? void 0 : ua.avatar),
1868
- menu: p((ga = i.components) == null ? void 0 : ga.menu, (ma = e == null ? void 0 : e.components) == null ? void 0 : ma.menu),
1869
- multiSelect: p((ha = i.components) == null ? void 0 : ha.multiSelect, (xa = e == null ? void 0 : e.components) == null ? void 0 : xa.multiSelect),
1870
- panel: p((ba = i.components) == null ? void 0 : ba.panel, (ya = e == null ? void 0 : e.components) == null ? void 0 : ya.panel),
1871
- input: p((wa = i.components) == null ? void 0 : wa.input, (va = e == null ? void 0 : e.components) == null ? void 0 : va.input)
1824
+ ...e?.components || {},
1825
+ button: p(i.components?.button, e?.components?.button),
1826
+ badge: p(i.components?.badge, e?.components?.badge),
1827
+ dropdown: p(i.components?.dropdown, e?.components?.dropdown),
1828
+ select: p(i.components?.select, e?.components?.select),
1829
+ sidebar: p(i.components?.sidebar, e?.components?.sidebar),
1830
+ card: p(i.components?.card, e?.components?.card),
1831
+ navigationMenu: p(i.components?.navigationMenu, e?.components?.navigationMenu),
1832
+ blockControls: p(i.components?.blockControls, e?.components?.blockControls),
1833
+ box: p(i.components?.box, e?.components?.box),
1834
+ breadcrumb: p(i.components?.breadcrumb, e?.components?.breadcrumb),
1835
+ contextMenu: p(i.components?.contextMenu, e?.components?.contextMenu),
1836
+ menubar: p(i.components?.menubar, e?.components?.menubar),
1837
+ alert: p(i.components?.alert, e?.components?.alert),
1838
+ alertDialog: p(i.components?.alertDialog, e?.components?.alertDialog),
1839
+ appHeader: p(i.components?.appHeader, e?.components?.appHeader),
1840
+ aspectRatio: p(i.components?.aspectRatio, e?.components?.aspectRatio),
1841
+ avatar: p(i.components?.avatar, e?.components?.avatar),
1842
+ menu: p(i.components?.menu, e?.components?.menu),
1843
+ multiSelect: p(i.components?.multiSelect, e?.components?.multiSelect),
1844
+ panel: p(i.components?.panel, e?.components?.panel),
1845
+ input: p(i.components?.input, e?.components?.input)
1872
1846
  },
1873
1847
  zIndex: {
1874
1848
  ...i.zIndex || {},
1875
- ...(e == null ? void 0 : e.zIndex) || {}
1849
+ ...e?.zIndex || {}
1876
1850
  },
1877
1851
  breakpoints: {
1878
1852
  ...i.breakpoints || {},
1879
- ...(e == null ? void 0 : e.breakpoints) || {}
1853
+ ...e?.breakpoints || {}
1880
1854
  }
1881
1855
  };
1882
1856
  }
1883
- function ke(e, a, n = "light") {
1884
- const i = g[a][n], r = e;
1885
- return Ya(
1857
+ function ea(e, a, r = "light") {
1858
+ const i = f[a][r], s = e;
1859
+ return T(
1886
1860
  {
1887
- ...r,
1861
+ ...s,
1888
1862
  colors: {
1889
- ...r.colors || {},
1890
- ...Ja(i)
1863
+ ...s.colors || {},
1864
+ ...A(i)
1891
1865
  },
1892
1866
  palette: {
1893
- ...r.palette || {},
1867
+ ...s.palette || {},
1894
1868
  accent: i.scale,
1895
1869
  accentAlpha: i.alphaScale,
1896
1870
  accentContrast: i.contrast,
@@ -1899,57 +1873,55 @@ function ke(e, a, n = "light") {
1899
1873
  accentTrack: i.track
1900
1874
  }
1901
1875
  },
1902
- { mode: n }
1876
+ { mode: r }
1903
1877
  );
1904
1878
  }
1905
- function t(e, a, n) {
1879
+ function o(e, a, r) {
1906
1880
  try {
1907
- e.style.setProperty(a, n);
1881
+ e.style.setProperty(a, r);
1908
1882
  } catch {
1909
1883
  }
1910
1884
  }
1911
- function s(e, a, n) {
1912
- n && Object.entries(n).forEach(([i, r]) => {
1913
- typeof r == "string" && r && e.style.setProperty(`${a}${i}`, r);
1885
+ function t(e, a, r) {
1886
+ r && Object.entries(r).forEach(([i, s]) => {
1887
+ typeof s == "string" && s && e.style.setProperty(`${a}${i}`, s);
1914
1888
  });
1915
1889
  }
1916
- function _e(e) {
1917
- e && Xa.add(e);
1890
+ function ia(e) {
1891
+ e && D.add(e);
1918
1892
  }
1919
- function Wa(e, a) {
1920
- var n, i, r, o, c, l, d, f, u, m, h, y, w, v, k, _, S, C, z, E, A, D, T, I, L, M, P, R, H, F, O, B, $, V, j, Z, U, Q, W, N, G, K, J, X, Y, q, aa, ea, ia, na, oa, ta, ra, sa, pa, ca, la, da, fa, ua, ga, ma, ha, xa, ba, ya, wa, va, Ca, za, Ea, Aa, Da, Ta, Ia, La, Ma, Pa, Ra, Ha, Fa, Oa, Ba, $a, Va;
1921
- t(e, "--ui-color-primary", a.colors.primary), t(e, "--ui-color-primary-hover", a.colors.primaryHover || a.colors.primary), t(e, "--ui-color-foreground-on-primary", a.colors.foregroundOnPrimary || "#ffffff"), t(e, "--ui-color-background", a.colors.background || "#ffffff"), t(e, "--ui-color-surface", a.colors.surface || a.colors.background || "#ffffff"), t(e, "--ui-color-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), t(e, "--ui-color-text", a.colors.text || "#202020"), t(e, "--ui-color-muted", a.colors.muted || "#646464"), t(e, "--ui-color-border", a.colors.border || "#0000001f"), t(e, "--ui-color-focus-ring", a.colors.focusRing || a.colors.primary), t(e, "--ui-color-success", a.colors.success || "#30a46c"), t(e, "--ui-color-danger", a.colors.danger || "#e5484d"), t(e, "--ui-color-warning", a.colors.warning || a.colors.primary), t(e, "--ui-primary", a.colors.primary), t(e, "--ui-primary-hover", a.colors.primaryHover || a.colors.primary), t(e, "--ui-foreground", a.colors.foregroundOnPrimary || "#ffffff"), t(e, "--ui-background", a.colors.background || "#ffffff"), t(e, "--ui-surface", a.colors.surface || a.colors.background || "#ffffff"), t(e, "--ui-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), t(e, "--ui-text", a.colors.text || "#202020"), t(e, "--ui-muted", a.colors.muted || "#646464"), t(e, "--ui-border", a.colors.border || "#0000001f"), t(e, "--ui-focus-ring", a.colors.focusRing || a.colors.primary), t(e, "--ui-success", a.colors.success || "#30a46c"), t(e, "--ui-error", a.colors.danger || "#e5484d"), t(e, "--ui-warning", a.colors.warning || a.colors.primary), t(e, "--ui-radius", a.radius || "4px"), t(e, "--ui-space-xs", ((n = a.spacing) == null ? void 0 : n.xs) || "4px"), t(e, "--ui-space-sm", ((i = a.spacing) == null ? void 0 : i.sm) || "8px"), t(e, "--ui-space-md", ((r = a.spacing) == null ? void 0 : r.md) || "12px"), t(e, "--ui-space-lg", ((o = a.spacing) == null ? void 0 : o.lg) || "24px"), t(e, "--ui-space-xl", ((c = a.spacing) == null ? void 0 : c.xl) || "32px"), t(e, "--ui-space-xxl", ((l = a.spacing) == null ? void 0 : l.xxl) || "48px"), t(e, "--ui-default-gap", ((d = a.spacing) == null ? void 0 : d.sm) || ((f = a.spaceScale) == null ? void 0 : f["2"]) || "8px"), t(e, "--ui-shadow-sm", ((u = a.shadows) == null ? void 0 : u.sm) || ((m = a.shadows) == null ? void 0 : m["2"]) || "none"), t(e, "--ui-shadow-md", ((h = a.shadows) == null ? void 0 : h.md) || ((y = a.shadows) == null ? void 0 : y["3"]) || "none"), t(e, "--ui-shadow-lg", ((w = a.shadows) == null ? void 0 : w.lg) || ((v = a.shadows) == null ? void 0 : v["4"]) || "none"), t(e, "--ui-font-family", ((k = a.typography) == null ? void 0 : k.family) || "system-ui, sans-serif"), t(e, "--ui-font-family-heading", ((_ = a.typography) == null ? void 0 : _.headingFamily) || ((S = a.typography) == null ? void 0 : S.family) || "system-ui, sans-serif"), t(e, "--ui-font-family-code", ((C = a.typography) == null ? void 0 : C.codeFamily) || "monospace"), t(e, "--ui-font-size-sm", ((E = (z = a.typography) == null ? void 0 : z.size) == null ? void 0 : E.sm) || "12px"), t(e, "--ui-font-size-md", ((D = (A = a.typography) == null ? void 0 : A.size) == null ? void 0 : D.md) || "14px"), t(e, "--ui-font-size-lg", ((I = (T = a.typography) == null ? void 0 : T.size) == null ? void 0 : I.lg) || "16px"), t(e, "--ui-default-font-size", ((M = (L = a.typography) == null ? void 0 : L.size) == null ? void 0 : M.md) || ((R = (P = a.typography) == null ? void 0 : P.fontScale) == null ? void 0 : R["2"]) || "14px"), t(e, "--ui-default-line-height", ((F = (H = a.typography) == null ? void 0 : H.lineHeight) == null ? void 0 : F["2"]) || "20px"), t(e, "--ui-default-letter-spacing", ((B = (O = a.typography) == null ? void 0 : O.letterSpacing) == null ? void 0 : B["2"]) || "0em"), t(e, "--ui-motion-short", (($ = a.motion) == null ? void 0 : $.durationShort) || "120ms"), t(e, "--ui-motion-base", ((V = a.motion) == null ? void 0 : V.durationBase) || "180ms"), t(e, "--ui-motion-long", ((j = a.motion) == null ? void 0 : j.durationLong) || "260ms"), t(e, "--ui-motion-easing", ((Z = a.motion) == null ? void 0 : Z.easing) || "cubic-bezier(0.2, 0.8, 0.2, 1)"), t(e, "--ui-z-modal", String(((U = a.zIndex) == null ? void 0 : U.modal) ?? 1e3)), t(e, "--ui-z-overlay", String(((Q = a.zIndex) == null ? void 0 : Q.overlay) ?? 900)), t(e, "--ui-z-toast", String(((W = a.zIndex) == null ? void 0 : W.toast) ?? 1100)), t(e, "--ui-breakpoint-sm", ((N = a.breakpoints) == null ? void 0 : N.sm) || "640px"), t(e, "--ui-breakpoint-md", ((G = a.breakpoints) == null ? void 0 : G.md) || "768px"), t(e, "--ui-breakpoint-lg", ((K = a.breakpoints) == null ? void 0 : K.lg) || "1024px"), t(e, "--color-background", ((J = a.surfaces) == null ? void 0 : J.background) || a.colors.background || "#ffffff"), t(e, "--color-surface", ((X = a.surfaces) == null ? void 0 : X.surface) || a.colors.surface || "#fcfcfc"), t(e, "--color-panel", ((Y = a.surfaces) == null ? void 0 : Y.panel) || ((q = a.surfaces) == null ? void 0 : q.panelTranslucent) || "#ffffffcc"), t(e, "--color-panel-solid", ((aa = a.surfaces) == null ? void 0 : aa.panelSolid) || a.colors.surface || "#ffffff"), t(e, "--color-panel-translucent", ((ea = a.surfaces) == null ? void 0 : ea.panelTranslucent) || "#ffffffcc"), t(e, "--color-overlay", ((ia = a.surfaces) == null ? void 0 : ia.overlay) || "rgba(2, 6, 23, 0.52)"), t(e, "--color-transparent", ((na = a.surfaces) == null ? void 0 : na.transparent) || "transparent"), t(e, "--backdrop-filter-panel", ((oa = a.effects) == null ? void 0 : oa.backdropFilterPanel) || "blur(64px)"), (ta = a.palette) != null && ta.accentContrast && t(e, "--accent-contrast", a.palette.accentContrast), (ra = a.palette) != null && ra.accentSurface && t(e, "--accent-surface", a.palette.accentSurface), (sa = a.palette) != null && sa.accentIndicator && t(e, "--accent-indicator", a.palette.accentIndicator), (pa = a.palette) != null && pa.accentTrack && t(e, "--accent-track", a.palette.accentTrack), s(e, "--gray-", (ca = a.palette) == null ? void 0 : ca.gray), s(e, "--gray-a", (la = a.palette) == null ? void 0 : la.grayAlpha), s(e, "--black-a", (da = a.palette) == null ? void 0 : da.blackAlpha), s(e, "--white-a", (fa = a.palette) == null ? void 0 : fa.whiteAlpha), s(e, "--accent-", (ua = a.palette) == null ? void 0 : ua.accent), s(e, "--accent-a", (ga = a.palette) == null ? void 0 : ga.accentAlpha), s(e, "--space-", a.spaceScale), s(e, "--radius-", a.radiusScale), s(e, "--font-size-", (ma = a.typography) == null ? void 0 : ma.fontScale), s(e, "--line-height-", (ha = a.typography) == null ? void 0 : ha.lineHeight), s(e, "--letter-spacing-", (xa = a.typography) == null ? void 0 : xa.letterSpacing), s(e, "--shadow-", a.shadows), s(e, "--base-button-", (ba = a.components) == null ? void 0 : ba.button), s(e, "--base-badge-", (ya = a.components) == null ? void 0 : ya.badge), s(e, "--base-dropdown-", (wa = a.components) == null ? void 0 : wa.dropdown), s(e, "--base-select-", (va = a.components) == null ? void 0 : va.select), s(e, "--base-sidebar-", (Ca = a.components) == null ? void 0 : Ca.sidebar), s(e, "--base-block-controls-", (za = a.components) == null ? void 0 : za.blockControls), s(e, "--base-box-", (Ea = a.components) == null ? void 0 : Ea.box), s(e, "--base-breadcrumb-", (Aa = a.components) == null ? void 0 : Aa.breadcrumb), s(e, "--base-card-", (Da = a.components) == null ? void 0 : Da.card), s(e, "--base-multi-select-", (Ta = a.components) == null ? void 0 : Ta.multiSelect), s(e, "--base-navigation-menu-", (Ia = a.components) == null ? void 0 : Ia.navigationMenu), s(e, "--base-menubar-", (La = a.components) == null ? void 0 : La.menubar), s(e, "--base-context-menu-", (Ma = a.components) == null ? void 0 : Ma.contextMenu), s(e, "--base-alert-", (Pa = a.components) == null ? void 0 : Pa.alert), s(e, "--base-alert-dialog-", (Ra = a.components) == null ? void 0 : Ra.alertDialog), s(e, "--base-app-header-", (Ha = a.components) == null ? void 0 : Ha.appHeader), s(e, "--base-aspect-ratio-", (Fa = a.components) == null ? void 0 : Fa.aspectRatio), s(e, "--base-avatar-", (Oa = a.components) == null ? void 0 : Oa.avatar), s(e, "--base-menu-", (Ba = a.components) == null ? void 0 : Ba.menu), s(e, "--base-panel-", ($a = a.components) == null ? void 0 : $a.panel), s(e, "--base-input-", (Va = a.components) == null ? void 0 : Va.input);
1893
+ function S(e, a) {
1894
+ 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);
1922
1895
  }
1923
- function Se(e, a = typeof document < "u" ? document : null) {
1924
- if (!a)
1925
- return;
1926
- const n = Ya(e), i = a === document || a instanceof ShadowRoot;
1927
- let r;
1928
- if (a === document ? r = document.documentElement : a instanceof ShadowRoot ? r = a.host : r = a, Wa(r, n), i)
1929
- for (const o of Xa)
1896
+ function ra(e, a = typeof document < "u" ? document : null) {
1897
+ if (!a) return;
1898
+ const r = T(e), i = a === document || a instanceof ShadowRoot;
1899
+ let s;
1900
+ if (a === document ? s = document.documentElement : a instanceof ShadowRoot ? s = a.host : s = a, S(s, r), i)
1901
+ for (const n of D)
1930
1902
  try {
1931
- Wa(o, n);
1903
+ S(n, r);
1932
1904
  } catch {
1933
1905
  }
1934
1906
  }
1935
1907
  export {
1936
- ne as A,
1937
- se as D,
1938
- ge as a,
1939
- me as b,
1940
- oe as c,
1941
- xe as d,
1942
- pe as e,
1943
- ye as f,
1944
- we as g,
1945
- g as h,
1946
- _a as i,
1947
- de as j,
1948
- ve as k,
1949
- Ya as l,
1950
- Se as m,
1951
- he as p,
1952
- _e as r,
1953
- be as s,
1954
- ke as w
1908
+ R as A,
1909
+ $ as D,
1910
+ N as a,
1911
+ ra as b,
1912
+ f as c,
1913
+ U as d,
1914
+ x as e,
1915
+ G as f,
1916
+ Y as g,
1917
+ H as h,
1918
+ V as i,
1919
+ T as j,
1920
+ aa as k,
1921
+ J as l,
1922
+ q as m,
1923
+ K as p,
1924
+ ia as r,
1925
+ X as s,
1926
+ ea as w
1955
1927
  };