@editora/ui-core 0.1.19 → 0.1.21
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.
- package/dist/{ElementBase-1b301e7f.js → ElementBase-EV6mVBUV.js} +1 -1
- package/dist/{ElementBase-909688f3.mjs → ElementBase-YlTLMsGk.mjs} +3 -3
- package/dist/accordion.cjs.js +3 -3
- package/dist/accordion.esm.js +39 -62
- package/dist/alert-dialog.cjs.js +19 -19
- package/dist/alert-dialog.esm.js +69 -87
- package/dist/alert.cjs.js +1 -1
- package/dist/alert.esm.js +4 -7
- package/dist/anchor.cjs.js +2 -2
- package/dist/anchor.esm.js +3 -3
- package/dist/animated-beam.cjs.js +83 -83
- package/dist/animated-beam.esm.js +250 -277
- package/dist/animated-list.cjs.js +4 -4
- package/dist/animated-list.esm.js +47 -61
- package/dist/animated-text.cjs.js +2 -2
- package/dist/animated-text.esm.js +13 -24
- package/dist/app-header.cjs.js +3 -3
- package/dist/app-header.esm.js +11 -13
- package/dist/aspect-ratio.cjs.js +1 -1
- package/dist/aspect-ratio.esm.js +4 -7
- package/dist/avatar.cjs.js +1 -1
- package/dist/avatar.esm.js +7 -13
- package/dist/badge.cjs.js +1 -1
- package/dist/badge.esm.js +4 -7
- package/dist/block-controls.cjs.js +2 -2
- package/dist/block-controls.esm.js +19 -35
- package/dist/box.cjs.js +1 -1
- package/dist/box.esm.js +8 -15
- package/dist/breadcrumb.cjs.js +2 -2
- package/dist/breadcrumb.esm.js +20 -37
- package/dist/button.cjs.js +1 -521
- package/dist/button.esm.js +2 -671
- package/dist/{calendar-2c11b824.mjs → calendar-DLY4acgn.mjs} +293 -342
- package/dist/{calendar-a8735e40.js → calendar-Dkof-FTK.js} +25 -25
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +8 -9
- package/dist/card.cjs.js +4 -4
- package/dist/card.esm.js +13 -19
- package/dist/chart.cjs.js +64 -64
- package/dist/chart.esm.js +223 -254
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.esm.js +2 -3
- package/dist/collapsible.cjs.js +1 -1
- package/dist/collapsible.esm.js +5 -9
- package/dist/{collection-a1aac0c6.mjs → collection-C7URGjEI.mjs} +8 -14
- package/dist/collection.cjs.js +1 -1
- package/dist/collection.esm.js +30 -29
- package/dist/color-picker.cjs.js +10 -10
- package/dist/color-picker.esm.js +190 -253
- package/dist/combobox.cjs.js +13 -13
- package/dist/combobox.esm.js +93 -126
- package/dist/command-palette.cjs.js +3 -3
- package/dist/command-palette.esm.js +19 -30
- package/dist/command.cjs.js +4 -4
- package/dist/command.esm.js +41 -53
- package/dist/components/ui-collection.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-orbiter.d.ts.map +1 -1
- package/dist/components/ui-portal.d.ts.map +1 -1
- package/dist/components/ui-positioner.d.ts.map +1 -1
- package/dist/components/ui-skeleton.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts +8 -0
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/components/ui-split-button.d.ts +1 -0
- package/dist/components/ui-split-button.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-textarea.d.ts.map +1 -1
- package/dist/components/ui-time-picker.d.ts.map +1 -1
- package/dist/container.cjs.js +2 -2
- package/dist/container.esm.js +2 -3
- package/dist/context-menu.cjs.js +8 -8
- package/dist/context-menu.esm.js +157 -219
- package/dist/control-group.cjs.js +1 -1
- package/dist/control-group.esm.js +2 -3
- package/dist/data-table.cjs.js +4 -4
- package/dist/data-table.esm.js +299 -381
- package/dist/date-field.cjs.js +3 -3
- package/dist/date-field.esm.js +68 -80
- package/dist/date-picker.cjs.js +9 -9
- package/dist/date-picker.esm.js +69 -97
- package/dist/date-range-picker.cjs.js +3 -3
- package/dist/date-range-picker.esm.js +32 -56
- package/dist/date-range-time-picker.cjs.js +9 -9
- package/dist/date-range-time-picker.esm.js +111 -140
- package/dist/date-time-picker.cjs.js +7 -7
- package/dist/date-time-picker.esm.js +115 -147
- package/dist/date-time-utils-Dmost5Ee.js +1 -0
- package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
- package/dist/description.cjs.js +1 -1
- package/dist/description.esm.js +3 -5
- package/dist/dialog.cjs.js +12 -12
- package/dist/dialog.esm.js +44 -63
- package/dist/direction-provider.cjs.js +1 -1
- package/dist/direction-provider.esm.js +2 -3
- package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
- package/dist/dismissable-layer-DNfrKA20.js +1 -0
- package/dist/dismissable-layer.cjs.js +2 -2
- package/dist/dismissable-layer.esm.js +4 -6
- package/dist/dock.cjs.js +5 -5
- package/dist/dock.esm.js +134 -155
- package/dist/drawer.cjs.js +2 -2
- package/dist/drawer.esm.js +18 -35
- package/dist/dropdown.cjs.js +2 -2
- package/dist/dropdown.esm.js +119 -149
- package/dist/dropzone.cjs.js +1 -1
- package/dist/dropzone.esm.js +0 -1
- package/dist/empty-state.cjs.js +1 -1
- package/dist/empty-state.esm.js +1 -1
- package/dist/field-error.cjs.js +1 -1
- package/dist/field-error.esm.js +3 -5
- package/dist/field.cjs.js +5 -5
- package/dist/field.esm.js +27 -34
- package/dist/fieldset.cjs.js +4 -4
- package/dist/fieldset.esm.js +19 -24
- package/dist/file-upload.cjs.js +4 -4
- package/dist/file-upload.esm.js +69 -93
- package/dist/flex.cjs.js +1 -1
- package/dist/flex.esm.js +5 -9
- package/dist/floating-toolbar.cjs.js +4 -4
- package/dist/floating-toolbar.esm.js +60 -85
- package/dist/focus-scope-Bwug2gDv.js +1 -0
- package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
- package/dist/focus-scope.cjs.js +2 -2
- package/dist/focus-scope.esm.js +15 -20
- package/dist/form.cjs.js +2 -2
- package/dist/form.esm.js +26 -53
- package/dist/gantt.cjs.js +43 -43
- package/dist/gantt.esm.js +295 -322
- package/dist/grid.cjs.js +1 -1
- package/dist/grid.esm.js +5 -9
- package/dist/hover-card.cjs.js +4 -4
- package/dist/hover-card.esm.js +22 -28
- package/dist/icon-cloud.cjs.js +7 -7
- package/dist/icon-cloud.esm.js +48 -62
- package/dist/icon.cjs.js +1 -1
- package/dist/icon.esm.js +2 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +378 -390
- package/dist/inline-edit.cjs.js +11 -11
- package/dist/inline-edit.esm.js +32 -36
- package/dist/input.cjs.js +17 -17
- package/dist/input.esm.js +50 -63
- package/dist/label.cjs.js +2 -2
- package/dist/label.esm.js +8 -17
- package/dist/layout.cjs.js +2 -2
- package/dist/layout.esm.js +20 -26
- package/dist/listbox-B6QgECax.js +46 -0
- package/dist/listbox-DJamVeFj.mjs +200 -0
- package/dist/listbox.cjs.js +1 -1
- package/dist/listbox.esm.js +2 -4
- package/dist/marquee.cjs.js +5 -5
- package/dist/marquee.esm.js +33 -50
- package/dist/masonry-grid.cjs.js +1 -1
- package/dist/masonry-grid.esm.js +5 -9
- package/dist/menu.cjs.js +3 -3
- package/dist/menu.esm.js +106 -126
- package/dist/menubar.cjs.js +5 -5
- package/dist/menubar.esm.js +118 -164
- package/dist/meter.cjs.js +2 -2
- package/dist/meter.esm.js +4 -4
- package/dist/multi-select.cjs.js +5 -5
- package/dist/multi-select.esm.js +125 -137
- package/dist/navigation-menu.cjs.js +4 -4
- package/dist/navigation-menu.esm.js +44 -55
- package/dist/number-field.cjs.js +2 -2
- package/dist/number-field.esm.js +73 -98
- package/dist/number-ticker.cjs.js +3 -3
- package/dist/number-ticker.esm.js +22 -43
- package/dist/odometer.cjs.js +1 -1
- package/dist/odometer.esm.js +5 -9
- package/dist/orbiter.cjs.js +13 -13
- package/dist/orbiter.esm.js +79 -90
- package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
- package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
- package/dist/pagination.cjs.js +2 -2
- package/dist/pagination.esm.js +14 -18
- package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
- package/dist/panel-group-CaD0_KQf.js +36 -0
- package/dist/panel-group.cjs.js +1 -1
- package/dist/panel-group.esm.js +2 -5
- package/dist/panel.cjs.js +4 -4
- package/dist/panel.esm.js +8 -10
- package/dist/password-field.cjs.js +9 -9
- package/dist/password-field.esm.js +62 -82
- package/dist/pin-input.cjs.js +3 -3
- package/dist/pin-input.esm.js +33 -39
- package/dist/placement-grid.cjs.js +4 -4
- package/dist/placement-grid.esm.js +108 -131
- package/dist/plugin-panel.cjs.js +7 -7
- package/dist/plugin-panel.esm.js +13 -15
- package/dist/popover.cjs.js +2 -2
- package/dist/popover.esm.js +21 -31
- package/dist/portal-DgpQ3Jo1.js +1 -0
- package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
- package/dist/portal.cjs.js +3 -3
- package/dist/portal.esm.js +20 -28
- package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
- package/dist/positioner-D_fqyx_j.js +1 -0
- package/dist/positioner.cjs.js +2 -2
- package/dist/positioner.esm.js +22 -28
- package/dist/presence.cjs.js +1 -1
- package/dist/presence.esm.js +7 -13
- package/dist/primitives/auto-scroll.d.ts +9 -0
- package/dist/primitives/auto-scroll.d.ts.map +1 -0
- package/dist/primitives/selector.d.ts +4 -0
- package/dist/primitives/selector.d.ts.map +1 -0
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.esm.js +5 -9
- package/dist/quick-actions.cjs.js +6 -6
- package/dist/quick-actions.esm.js +52 -62
- package/dist/radio-group.cjs.js +13 -13
- package/dist/radio-group.esm.js +39 -51
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +5 -9
- package/dist/rating.cjs.js +1 -1
- package/dist/rating.esm.js +12 -23
- package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
- package/dist/roving-focus-group.cjs.js +1 -1
- package/dist/roving-focus-group.esm.js +3 -5
- package/dist/runtime-CTaOSmBj.js +1 -0
- package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +6 -6
- package/dist/scroll-area.cjs.js +3 -3
- package/dist/scroll-area.esm.js +38 -46
- package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
- package/dist/section.cjs.js +1 -1
- package/dist/section.esm.js +1 -1
- package/dist/select.cjs.js +7 -7
- package/dist/select.esm.js +67 -97
- package/dist/selection-popup.cjs.js +1 -1
- package/dist/selection-popup.esm.js +8 -15
- package/dist/selector-BvAh35ve.js +1 -0
- package/dist/selector-WI8pD7YO.mjs +18 -0
- package/dist/separator.cjs.js +1 -1
- package/dist/separator.esm.js +1 -1
- package/dist/sidebar.cjs.js +18 -18
- package/dist/sidebar.esm.js +117 -139
- package/dist/skeleton.cjs.js +11 -11
- package/dist/skeleton.esm.js +27 -24
- package/dist/slider.cjs.js +1 -1
- package/dist/slider.esm.js +6 -11
- package/dist/slot.cjs.js +4 -4
- package/dist/slot.esm.js +16 -19
- package/dist/sortable.cjs.js +79 -65
- package/dist/sortable.esm.js +714 -734
- package/dist/spinning-text.cjs.js +12 -12
- package/dist/spinning-text.esm.js +80 -92
- package/dist/split-button.cjs.js +4 -4
- package/dist/split-button.esm.js +77 -62
- package/dist/splitter.cjs.js +1 -1
- package/dist/splitter.esm.js +1 -1
- package/dist/stepper.cjs.js +8 -8
- package/dist/stepper.esm.js +32 -52
- package/dist/switch.cjs.js +7 -7
- package/dist/switch.esm.js +23 -31
- package/dist/table.cjs.js +2 -2
- package/dist/table.esm.js +46 -56
- package/dist/tabs.cjs.js +8 -8
- package/dist/tabs.esm.js +89 -109
- package/dist/tags-input.cjs.js +4 -4
- package/dist/tags-input.esm.js +45 -62
- package/dist/textarea.cjs.js +10 -10
- package/dist/textarea.esm.js +49 -52
- package/dist/time-field.cjs.js +4 -4
- package/dist/time-field.esm.js +70 -84
- package/dist/time-picker.cjs.js +22 -22
- package/dist/time-picker.esm.js +88 -110
- package/dist/timeline.cjs.js +1 -1
- package/dist/timeline.esm.js +3 -5
- package/dist/toast.cjs.js +2 -2
- package/dist/toast.esm.js +33 -47
- package/dist/toggle-group.cjs.js +6 -6
- package/dist/toggle-group.esm.js +85 -105
- package/dist/toggle.cjs.js +1 -1
- package/dist/toggle.esm.js +3 -5
- package/dist/toolbar.cjs.js +1 -1
- package/dist/toolbar.esm.js +13 -24
- package/dist/tooltip.cjs.js +2 -2
- package/dist/tooltip.esm.js +31 -42
- package/dist/transfer-list.cjs.js +31 -31
- package/dist/transfer-list.esm.js +114 -127
- package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
- package/dist/tree-Dx_kv_ih.js +39 -0
- package/dist/tree-item.cjs.js +2 -2
- package/dist/tree-item.esm.js +2 -3
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +2 -5
- package/dist/ui-button-Q0GNNWKC.mjs +665 -0
- package/dist/ui-button-rXQOS9QJ.js +521 -0
- package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
- package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
- package/dist/visually-hidden.cjs.js +1 -1
- package/dist/visually-hidden.esm.js +1 -1
- package/dist/wizard.cjs.js +14 -14
- package/dist/wizard.esm.js +85 -105
- package/package.json +2 -2
- package/dist/date-time-utils-66480de4.js +0 -1
- package/dist/date-time-utils-a2c7af25.mjs +0 -307
- package/dist/dismissable-layer-193e3bed.js +0 -1
- package/dist/focus-scope-2b12b4e7.js +0 -1
- package/dist/listbox-308789a0.mjs +0 -210
- package/dist/listbox-ef2f708e.js +0 -46
- package/dist/panel-group-40254cdd.js +0 -36
- package/dist/portal-c69756c0.js +0 -1
- package/dist/positioner-33529bb8.js +0 -1
- package/dist/runtime-3f13807b.js +0 -1
- package/dist/tree-0a7a8d05.js +0 -39
- /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
- /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
- /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
- /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
- /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import "./portal-
|
|
2
|
-
import "./positioner-
|
|
3
|
-
function
|
|
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
|
|
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
|
|
9
|
+
function L(e) {
|
|
10
10
|
return e === "replace" || e === "stack" ? e : "queue";
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function w(e) {
|
|
13
13
|
return `ui-alert-dialog-${e}`;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
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
|
|
18
|
+
const s = e.dialog?.getInputValue() ?? e.value ?? "";
|
|
20
19
|
return {
|
|
21
20
|
id: e.id,
|
|
22
|
-
action:
|
|
23
|
-
value:
|
|
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:
|
|
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
|
|
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:
|
|
44
|
-
checked:
|
|
41
|
+
value: e.dialog?.getInputValue() ?? e.value ?? "",
|
|
42
|
+
checked: e.dialog?.getChecked(),
|
|
45
43
|
source: a,
|
|
46
|
-
reason:
|
|
44
|
+
reason: r
|
|
47
45
|
} : {
|
|
48
46
|
id: e.id,
|
|
49
47
|
action: "dismiss",
|
|
50
48
|
value: e.value,
|
|
51
|
-
checked:
|
|
49
|
+
checked: e.dialog?.getChecked(),
|
|
52
50
|
source: a,
|
|
53
|
-
reason:
|
|
51
|
+
reason: r
|
|
54
52
|
};
|
|
55
53
|
}
|
|
56
|
-
function
|
|
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
|
|
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
|
|
78
|
+
const r = [...this._active, ...this._queue];
|
|
81
79
|
this._queue = [];
|
|
82
|
-
for (const i of
|
|
83
|
-
this._settle(i,
|
|
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,
|
|
87
|
-
const i = this._mergeOptions(
|
|
88
|
-
if (!
|
|
89
|
-
const
|
|
90
|
-
id: i.id ||
|
|
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(
|
|
92
|
+
return Promise.resolve(l);
|
|
95
93
|
}
|
|
96
|
-
const
|
|
97
|
-
return new Promise((
|
|
98
|
-
|
|
99
|
-
|
|
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:
|
|
99
|
+
mode: n,
|
|
103
100
|
options: i,
|
|
104
101
|
settled: !1,
|
|
105
102
|
processing: !1,
|
|
106
|
-
resolve:
|
|
103
|
+
resolve: l,
|
|
107
104
|
cleanup: []
|
|
108
105
|
};
|
|
109
|
-
if (
|
|
110
|
-
this._settle(
|
|
106
|
+
if (i.signal?.aborted) {
|
|
107
|
+
this._settle(d, h(d, "abort"), !1);
|
|
111
108
|
return;
|
|
112
109
|
}
|
|
113
|
-
if (
|
|
114
|
-
const
|
|
115
|
-
|
|
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 (
|
|
119
|
-
this._open(
|
|
115
|
+
if (n === "stack") {
|
|
116
|
+
this._open(d);
|
|
120
117
|
return;
|
|
121
118
|
}
|
|
122
119
|
if (this._active.length > 0) {
|
|
123
|
-
this._queue.push(
|
|
120
|
+
this._queue.push(d);
|
|
124
121
|
return;
|
|
125
122
|
}
|
|
126
|
-
this._open(
|
|
123
|
+
this._open(d);
|
|
127
124
|
});
|
|
128
125
|
}
|
|
129
126
|
_open(a) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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 = !!
|
|
138
|
-
const
|
|
139
|
-
i.dialogId = a.id, i.config =
|
|
140
|
-
const
|
|
141
|
-
if (a.settled)
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
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((
|
|
165
|
-
a.processing = !1, i.state = "error", i.setError(
|
|
159
|
+
}).catch((I) => {
|
|
160
|
+
a.processing = !1, i.state = "error", i.setError(P(I));
|
|
166
161
|
});
|
|
167
|
-
},
|
|
162
|
+
}, l = () => {
|
|
168
163
|
a.settled || (a.value = i.getInputValue(), a.checked = i.getChecked(), i.state === "error" && i.clearError());
|
|
169
|
-
},
|
|
170
|
-
if (a.settled)
|
|
171
|
-
|
|
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",
|
|
176
|
-
const
|
|
177
|
-
a.settled || this._settle(a,
|
|
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",
|
|
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),
|
|
175
|
+
this._active.push(a), r.appendChild(i), i.open = !0, this._updateStackZIndex();
|
|
185
176
|
}
|
|
186
177
|
_validatePrompt(a) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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,
|
|
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((
|
|
196
|
-
const
|
|
197
|
-
if (!i &&
|
|
198
|
-
const
|
|
199
|
-
|
|
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
|
-
|
|
190
|
+
n.parentElement && n.parentElement.removeChild(n);
|
|
202
191
|
}
|
|
203
|
-
a.resolve(
|
|
192
|
+
a.resolve(r), this._updateStackZIndex(), !this._disposed && s && this._drainQueue();
|
|
204
193
|
}
|
|
205
194
|
}
|
|
206
195
|
_cleanupRequest(a) {
|
|
207
|
-
for (const
|
|
196
|
+
for (const r of a.cleanup.splice(0))
|
|
208
197
|
try {
|
|
209
|
-
|
|
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
|
-
|
|
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:
|
|
225
|
-
description:
|
|
226
|
-
confirmText:
|
|
227
|
-
cancelText:
|
|
228
|
-
loadingText:
|
|
229
|
-
errorMessage:
|
|
230
|
-
dismissible:
|
|
231
|
-
closeOnEsc:
|
|
232
|
-
closeOnBackdrop:
|
|
233
|
-
lockWhileLoading:
|
|
234
|
-
role:
|
|
235
|
-
tone:
|
|
236
|
-
size:
|
|
237
|
-
variant:
|
|
238
|
-
radius:
|
|
239
|
-
elevation:
|
|
240
|
-
indicator:
|
|
241
|
-
initialFocus:
|
|
242
|
-
ariaLabel:
|
|
243
|
-
ariaLabelledby:
|
|
244
|
-
ariaDescribedby:
|
|
245
|
-
headless:
|
|
246
|
-
showCancel: !
|
|
247
|
-
showClose:
|
|
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:
|
|
251
|
-
placeholder:
|
|
252
|
-
value:
|
|
253
|
-
required:
|
|
237
|
+
label: n?.label,
|
|
238
|
+
placeholder: n?.placeholder,
|
|
239
|
+
value: n?.defaultValue || "",
|
|
240
|
+
required: n?.required
|
|
254
241
|
},
|
|
255
242
|
checkbox: {
|
|
256
|
-
enabled: !!
|
|
257
|
-
label:
|
|
258
|
-
checked:
|
|
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:
|
|
267
|
-
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,
|
|
273
|
-
const i =
|
|
274
|
-
if (
|
|
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 (
|
|
266
|
+
if (r.action === "dismiss" && a.options.onDismiss) {
|
|
281
267
|
Promise.resolve(
|
|
282
268
|
a.options.onDismiss({
|
|
283
269
|
...this._buildLifecycleContext(a),
|
|
284
|
-
source:
|
|
285
|
-
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
|
|
281
|
+
const r = this._defaults;
|
|
296
282
|
return {
|
|
297
|
-
...
|
|
283
|
+
...r,
|
|
298
284
|
...a,
|
|
299
285
|
checkbox: {
|
|
300
|
-
...
|
|
286
|
+
...r.checkbox || {},
|
|
301
287
|
...a.checkbox || {}
|
|
302
288
|
}
|
|
303
289
|
};
|
|
304
290
|
}
|
|
305
291
|
_ensureContainer() {
|
|
306
|
-
if (!
|
|
307
|
-
|
|
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
|
|
316
|
-
|
|
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
|
|
321
|
-
function
|
|
322
|
-
return new
|
|
304
|
+
let m = null;
|
|
305
|
+
function H(e = {}) {
|
|
306
|
+
return new R(e.container ?? null);
|
|
323
307
|
}
|
|
324
|
-
function
|
|
325
|
-
return
|
|
308
|
+
function b() {
|
|
309
|
+
return m || (m = H()), m;
|
|
326
310
|
}
|
|
327
|
-
function
|
|
328
|
-
return
|
|
311
|
+
function N(e = {}) {
|
|
312
|
+
return b().alert(e);
|
|
329
313
|
}
|
|
330
|
-
function
|
|
331
|
-
return
|
|
314
|
+
function G(e = {}) {
|
|
315
|
+
return b().confirm(e);
|
|
332
316
|
}
|
|
333
|
-
function
|
|
334
|
-
return
|
|
317
|
+
function K(e = {}) {
|
|
318
|
+
return b().prompt(e);
|
|
335
319
|
}
|
|
336
|
-
function
|
|
337
|
-
|
|
320
|
+
function J(e = "programmatic") {
|
|
321
|
+
m && (m.destroy(e), m = null);
|
|
338
322
|
}
|
|
339
|
-
function
|
|
323
|
+
function k() {
|
|
340
324
|
return typeof window < "u" && typeof document < "u";
|
|
341
325
|
}
|
|
342
|
-
function
|
|
326
|
+
function F(e) {
|
|
343
327
|
return e === "replace" || e === "stack" ? e : "queue";
|
|
344
328
|
}
|
|
345
|
-
function
|
|
329
|
+
function _(e) {
|
|
346
330
|
return `ui-dialog-${e}`;
|
|
347
331
|
}
|
|
348
|
-
function
|
|
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
|
|
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
|
|
350
|
+
const r = [...this._active, ...this._queue];
|
|
367
351
|
this._queue = [];
|
|
368
|
-
for (const i of
|
|
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 (!
|
|
362
|
+
if (!k() || this._disposed)
|
|
379
363
|
return Promise.resolve({
|
|
380
|
-
id: a.id ||
|
|
364
|
+
id: a.id || _(++this._seed),
|
|
381
365
|
action: "dismiss",
|
|
382
366
|
source: "unmount"
|
|
383
367
|
});
|
|
384
|
-
const
|
|
385
|
-
return new Promise((
|
|
386
|
-
|
|
387
|
-
|
|
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:
|
|
375
|
+
resolve: s,
|
|
393
376
|
cleanup: []
|
|
394
377
|
};
|
|
395
|
-
if (
|
|
396
|
-
this._settle(
|
|
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(
|
|
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(
|
|
388
|
+
this._open(n);
|
|
406
389
|
return;
|
|
407
390
|
}
|
|
408
391
|
if (this._active.length > 0) {
|
|
409
|
-
this._queue.push(
|
|
392
|
+
this._queue.push(n);
|
|
410
393
|
return;
|
|
411
394
|
}
|
|
412
|
-
this._open(
|
|
395
|
+
this._open(n);
|
|
413
396
|
});
|
|
414
397
|
}
|
|
415
398
|
_open(a) {
|
|
416
|
-
const
|
|
417
|
-
if (!
|
|
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
|
|
428
|
-
i.dialogId = a.id, i.config =
|
|
429
|
-
const
|
|
430
|
-
if (a.settled)
|
|
431
|
-
|
|
432
|
-
|
|
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
|
-
|
|
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:
|
|
424
|
+
formData: c?.formData
|
|
443
425
|
})
|
|
444
426
|
).then(() => {
|
|
445
427
|
a.settled || (i.state = "idle", i.clearError(), i.close("submit"));
|
|
446
|
-
}).catch((
|
|
447
|
-
i.state = "error", i.setError(
|
|
428
|
+
}).catch((u) => {
|
|
429
|
+
i.state = "error", i.setError(B(u));
|
|
448
430
|
});
|
|
449
|
-
},
|
|
450
|
-
if (a.settled)
|
|
451
|
-
|
|
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:
|
|
456
|
-
source:
|
|
457
|
-
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",
|
|
462
|
-
const
|
|
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",
|
|
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),
|
|
452
|
+
this._active.push(a), r.appendChild(i), i.openDialog(), this._updateStackZIndex();
|
|
475
453
|
}
|
|
476
|
-
_settle(a,
|
|
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((
|
|
479
|
-
const
|
|
480
|
-
!i &&
|
|
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(
|
|
460
|
+
a.resolve(r), this._updateStackZIndex(), !this._disposed && s && this._drainQueue();
|
|
483
461
|
}
|
|
484
462
|
}
|
|
485
463
|
_cleanupRequest(a) {
|
|
486
|
-
for (const
|
|
464
|
+
for (const r of a.cleanup.splice(0))
|
|
487
465
|
try {
|
|
488
|
-
|
|
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,
|
|
475
|
+
_buildConfig(a, r) {
|
|
499
476
|
return {
|
|
500
|
-
id:
|
|
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 (!
|
|
524
|
-
|
|
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
|
|
533
|
-
|
|
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
|
|
538
|
-
function
|
|
539
|
-
return new
|
|
512
|
+
let g = null;
|
|
513
|
+
function V(e = {}) {
|
|
514
|
+
return new $(e.container ?? null);
|
|
540
515
|
}
|
|
541
|
-
function
|
|
542
|
-
return
|
|
516
|
+
function C() {
|
|
517
|
+
return g || (g = V()), g;
|
|
543
518
|
}
|
|
544
|
-
function
|
|
545
|
-
return
|
|
519
|
+
function X(e = {}) {
|
|
520
|
+
return C().open(e);
|
|
546
521
|
}
|
|
547
|
-
function
|
|
548
|
-
return
|
|
522
|
+
function Y(e = {}) {
|
|
523
|
+
return C().confirm(e);
|
|
549
524
|
}
|
|
550
|
-
function
|
|
551
|
-
|
|
525
|
+
function q(e = "programmatic") {
|
|
526
|
+
g && (g.destroy(e), g = null);
|
|
552
527
|
}
|
|
553
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
|
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
|
|
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:
|
|
1584
|
-
whiteAlpha:
|
|
1558
|
+
blackAlpha: z,
|
|
1559
|
+
whiteAlpha: E,
|
|
1585
1560
|
accent: {
|
|
1586
|
-
...
|
|
1561
|
+
...f.amber.light.scale
|
|
1587
1562
|
},
|
|
1588
1563
|
accentAlpha: {
|
|
1589
|
-
...
|
|
1564
|
+
...f.amber.light.alphaScale
|
|
1590
1565
|
},
|
|
1591
|
-
accentContrast:
|
|
1592
|
-
accentSurface:
|
|
1593
|
-
accentIndicator:
|
|
1594
|
-
accentTrack:
|
|
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:
|
|
1667
|
+
components: j,
|
|
1693
1668
|
zIndex: { modal: 1e3, overlay: 900, toast: 1100 },
|
|
1694
1669
|
breakpoints: { sm: "640px", md: "768px", lg: "1024px" }
|
|
1695
|
-
},
|
|
1696
|
-
...
|
|
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
|
-
...
|
|
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:
|
|
1743
|
-
whiteAlpha:
|
|
1717
|
+
blackAlpha: z,
|
|
1718
|
+
whiteAlpha: E,
|
|
1744
1719
|
accent: {
|
|
1745
|
-
...
|
|
1720
|
+
...f.amber.dark.scale
|
|
1746
1721
|
},
|
|
1747
1722
|
accentAlpha: {
|
|
1748
|
-
...
|
|
1723
|
+
...f.amber.dark.alphaScale
|
|
1749
1724
|
},
|
|
1750
|
-
accentContrast:
|
|
1751
|
-
accentSurface:
|
|
1752
|
-
accentIndicator:
|
|
1753
|
-
accentTrack:
|
|
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:
|
|
1776
|
-
},
|
|
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
|
|
1782
|
-
|
|
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
|
-
...
|
|
1759
|
+
...A(n)
|
|
1786
1760
|
},
|
|
1787
1761
|
palette: {
|
|
1788
|
-
accent:
|
|
1789
|
-
accentAlpha:
|
|
1790
|
-
accentContrast:
|
|
1791
|
-
accentSurface:
|
|
1792
|
-
accentIndicator:
|
|
1793
|
-
accentTrack:
|
|
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
|
-
...
|
|
1802
|
-
...
|
|
1775
|
+
...l?.colors || {},
|
|
1776
|
+
...e?.colors || {}
|
|
1803
1777
|
},
|
|
1804
1778
|
palette: {
|
|
1805
1779
|
...i.palette || {},
|
|
1806
|
-
...
|
|
1807
|
-
...
|
|
1808
|
-
gray: p(
|
|
1809
|
-
grayAlpha: p(
|
|
1810
|
-
blackAlpha: p(
|
|
1811
|
-
whiteAlpha: p(
|
|
1812
|
-
accent: p(
|
|
1813
|
-
accentAlpha: p(
|
|
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
|
-
...
|
|
1791
|
+
...e?.surfaces || {}
|
|
1818
1792
|
},
|
|
1819
1793
|
shadows: {
|
|
1820
1794
|
...i.shadows || {},
|
|
1821
|
-
...
|
|
1795
|
+
...e?.shadows || {}
|
|
1822
1796
|
},
|
|
1823
1797
|
spacing: {
|
|
1824
1798
|
...i.spacing || {},
|
|
1825
|
-
...
|
|
1799
|
+
...e?.spacing || {}
|
|
1826
1800
|
},
|
|
1827
|
-
spaceScale: p(i.spaceScale, e
|
|
1828
|
-
radiusScale: p(i.radiusScale, e
|
|
1801
|
+
spaceScale: p(i.spaceScale, e?.spaceScale),
|
|
1802
|
+
radiusScale: p(i.radiusScale, e?.radiusScale),
|
|
1829
1803
|
typography: {
|
|
1830
1804
|
...i.typography || {},
|
|
1831
|
-
...
|
|
1805
|
+
...e?.typography || {},
|
|
1832
1806
|
size: {
|
|
1833
|
-
...
|
|
1834
|
-
...
|
|
1807
|
+
...i.typography?.size || {},
|
|
1808
|
+
...e?.typography?.size || {}
|
|
1835
1809
|
},
|
|
1836
|
-
fontScale: p(
|
|
1837
|
-
lineHeight: p(
|
|
1838
|
-
letterSpacing: p(
|
|
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
|
-
...
|
|
1816
|
+
...e?.motion || {}
|
|
1843
1817
|
},
|
|
1844
1818
|
effects: {
|
|
1845
1819
|
...i.effects || {},
|
|
1846
|
-
...
|
|
1820
|
+
...e?.effects || {}
|
|
1847
1821
|
},
|
|
1848
1822
|
components: {
|
|
1849
1823
|
...i.components || {},
|
|
1850
|
-
...
|
|
1851
|
-
button: p(
|
|
1852
|
-
badge: p(
|
|
1853
|
-
dropdown: p(
|
|
1854
|
-
select: p(
|
|
1855
|
-
sidebar: p(
|
|
1856
|
-
card: p(
|
|
1857
|
-
navigationMenu: p(
|
|
1858
|
-
blockControls: p(
|
|
1859
|
-
box: p(
|
|
1860
|
-
breadcrumb: p(
|
|
1861
|
-
contextMenu: p(
|
|
1862
|
-
menubar: p(
|
|
1863
|
-
alert: p(
|
|
1864
|
-
alertDialog: p(
|
|
1865
|
-
appHeader: p(
|
|
1866
|
-
aspectRatio: p(
|
|
1867
|
-
avatar: p(
|
|
1868
|
-
menu: p(
|
|
1869
|
-
multiSelect: p(
|
|
1870
|
-
panel: p(
|
|
1871
|
-
input: p(
|
|
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
|
-
...
|
|
1849
|
+
...e?.zIndex || {}
|
|
1876
1850
|
},
|
|
1877
1851
|
breakpoints: {
|
|
1878
1852
|
...i.breakpoints || {},
|
|
1879
|
-
...
|
|
1853
|
+
...e?.breakpoints || {}
|
|
1880
1854
|
}
|
|
1881
1855
|
};
|
|
1882
1856
|
}
|
|
1883
|
-
function
|
|
1884
|
-
const i =
|
|
1885
|
-
return
|
|
1857
|
+
function ea(e, a, r = "light") {
|
|
1858
|
+
const i = f[a][r], s = e;
|
|
1859
|
+
return T(
|
|
1886
1860
|
{
|
|
1887
|
-
...
|
|
1861
|
+
...s,
|
|
1888
1862
|
colors: {
|
|
1889
|
-
...
|
|
1890
|
-
...
|
|
1863
|
+
...s.colors || {},
|
|
1864
|
+
...A(i)
|
|
1891
1865
|
},
|
|
1892
1866
|
palette: {
|
|
1893
|
-
...
|
|
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:
|
|
1876
|
+
{ mode: r }
|
|
1903
1877
|
);
|
|
1904
1878
|
}
|
|
1905
|
-
function
|
|
1879
|
+
function o(e, a, r) {
|
|
1906
1880
|
try {
|
|
1907
|
-
e.style.setProperty(a,
|
|
1881
|
+
e.style.setProperty(a, r);
|
|
1908
1882
|
} catch {
|
|
1909
1883
|
}
|
|
1910
1884
|
}
|
|
1911
|
-
function
|
|
1912
|
-
|
|
1913
|
-
typeof
|
|
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
|
|
1917
|
-
e &&
|
|
1890
|
+
function ia(e) {
|
|
1891
|
+
e && D.add(e);
|
|
1918
1892
|
}
|
|
1919
|
-
function
|
|
1920
|
-
|
|
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
|
|
1924
|
-
if (!a)
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
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
|
-
|
|
1903
|
+
S(n, r);
|
|
1932
1904
|
} catch {
|
|
1933
1905
|
}
|
|
1934
1906
|
}
|
|
1935
1907
|
export {
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
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
|
};
|