@konstructio/ui 0.1.0-alpha.2 → 0.1.0-alpha.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.
- package/dist/{Combination-b348x__d.js → Combination-VYaRRJBZ.js} +155 -157
- package/dist/DatePicker.css +1 -0
- package/dist/Modal-CrG0m703.js +98 -0
- package/dist/assets/icons/components/Search.js +26 -0
- package/dist/assets/icons/components/Warning.js +22 -0
- package/dist/assets/icons/components/index.js +6 -0
- package/dist/chevron-down-3QGcvbP_.js +11 -0
- package/dist/{chevron-up-DgLBQCKD.js → chevron-up-RLP4nX7V.js} +1 -1
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +55 -41
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +14 -14
- package/dist/components/Badge/Badge.variants.js +18 -17
- package/dist/components/Breadcrumb/Breadcrumb.js +44 -53
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +10 -41
- package/dist/components/Breadcrumb/components/Item/Item.js +27 -27
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +43 -56
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +30 -26
- package/dist/components/Button/Button.variants.js +116 -29
- package/dist/components/Checkbox/Checkbox.js +300 -185
- package/dist/components/Checkbox/Checkbox.variants.js +12 -15
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +2728 -0
- package/dist/components/Datepicker/DatePicker.variants.js +5 -0
- package/dist/components/Dropdown/components/List/List.js +55 -18
- package/dist/components/Dropdown/components/List/List.variants.js +5 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.js +28 -22
- package/dist/components/Dropdown/components/Wrapper.js +110 -86
- package/dist/components/Dropdown/contexts/dropdown.context.js +6 -2
- package/dist/components/Dropdown/contexts/dropdown.hook.js +5 -3
- package/dist/components/Dropdown/contexts/dropdown.provider.js +18 -11
- package/dist/components/DropdownButton/DropdownButton.js +136 -0
- package/dist/components/Filter/Filter.js +20 -0
- package/dist/components/Filter/Filter.variants.js +22 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +86 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +95 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +87 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +90 -0
- package/dist/components/Filter/components/ResetButton/ResetButton.js +24 -0
- package/dist/components/Filter/components/index.js +8 -0
- package/dist/components/Filter/events/index.js +12 -0
- package/dist/components/Input/Input.js +134 -163
- package/dist/components/Input/Input.variants.js +15 -13
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -4
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +4 -6
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PieChart/PieChart.js +5130 -0
- package/dist/components/Radio/Radio.js +64 -49
- package/dist/components/Radio/Radio.variants.js +14 -12
- package/dist/components/RadioCard/RadioCard.js +23 -21
- package/dist/components/RadioCardGroup/RadioCardGroup.js +18 -18
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +141 -126
- package/dist/components/Tabs/Tabs.js +27 -0
- package/dist/components/Tabs/Tabs.variants.js +58 -0
- package/dist/components/Tabs/components/Content.js +19 -0
- package/dist/components/Tabs/components/List.js +20 -0
- package/dist/components/Tabs/components/Trigger.js +26 -0
- package/dist/components/Tabs/components/index.js +8 -0
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/TimePicker/TimePicker.js +8 -0
- package/dist/components/TimePicker/TimePicker.variants.js +62 -0
- package/dist/components/TimePicker/components/HoursList/HoursList.js +93 -0
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +68 -0
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +60 -0
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +96 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +51 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +16 -0
- package/dist/components/TimePicker/components/index.js +4 -0
- package/dist/components/TimePicker/contexts/index.js +8 -0
- package/dist/components/TimePicker/contexts/time-picker.context.js +22 -0
- package/dist/components/TimePicker/contexts/time-picker.hook.js +13 -0
- package/dist/components/TimePicker/contexts/time-picker.provider.js +46 -0
- package/dist/components/TimePicker/utils/index.js +6 -0
- package/dist/components/Toast/Toast.js +38 -36
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Typography/Typography.js +14 -16
- package/dist/components/index.js +90 -66
- package/dist/createLucideIcon-B7yPYScZ.js +94 -0
- package/dist/index--EmNlyHx.js +31 -0
- package/dist/{index-Bk324h27.js → index-B5MIi2tR.js} +6 -5
- package/dist/{index-g-TFwd6Y.js → index-BCGvACM9.js} +2 -1
- package/dist/{index-AM3avohj.js → index-BNU3RH-3.js} +3 -3
- package/dist/{index-Bry5AFQ2.js → index-Bc1LNrRD.js} +1 -1
- package/dist/index-BdMNhZnh.js +9 -0
- package/dist/index-BvCZBMfr.js +432 -0
- package/dist/index-Cq1I1cG9.js +129 -0
- package/dist/index-Cs8Lv8Wj.js +13 -0
- package/dist/index-CvfCCTEO.js +323 -0
- package/dist/{index-DvFiic6N.js → index-DLYwlPRZ.js} +96 -102
- package/dist/{index-YaQrdkGE.js → index-DNRcvRTB.js} +31 -30
- package/dist/{index-dRxIWVBr.js → index-Dkt8F6CZ.js} +6 -5
- package/dist/{index-G_6jG4Qc.js → index-Dm-ooN_M.js} +18 -18
- package/dist/index-DwYXX2sM.js +13 -0
- package/dist/{index-C5psggHV.js → index-h-Ul0anl.js} +1 -2
- package/dist/{index-D9BbbgUq.js → index-rUBNhTeF.js} +2 -2
- package/dist/index.d.ts +263 -18
- package/dist/index.js +96 -72
- package/dist/package.json +42 -40
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +263 -0
- package/dist/ui/kubefirst-theme.css +1 -1
- package/dist/ui/theme.css +11 -0
- package/dist/useBreadcrumb-DMERrNkJ.js +1280 -0
- package/dist/utils/index.js +4 -4
- package/dist/{x-DU-Zw-L_.js → x-BPcqkRZd.js} +1 -1
- package/package.json +42 -40
- package/dist/Modal-i7eolhYH.js +0 -926
- package/dist/createLucideIcon-CoF3ywd5.js +0 -89
- package/dist/index-BOx5P4tS.js +0 -423
- package/dist/index-CWKdynYu.js +0 -32
- package/dist/index-bYyfdsls.js +0 -118
- package/dist/useBreadcrumb-BsIeMoR1.js +0 -1279
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { u as S, c as
|
|
4
|
-
import {
|
|
5
|
-
import { P as
|
|
2
|
+
import { a as Ee, c as he, b as _, d as ye } from "./index-Cq1I1cG9.js";
|
|
3
|
+
import { u as S, c as De } from "./index-B5MIi2tR.js";
|
|
4
|
+
import { u as w } from "./index-Cs8Lv8Wj.js";
|
|
5
|
+
import { P as be, D as Ce } from "./index-DNRcvRTB.js";
|
|
6
|
+
import { P as N } from "./index-BCGvACM9.js";
|
|
7
|
+
import { u as j } from "./index-DwYXX2sM.js";
|
|
6
8
|
import { jsx as f, jsxs as q, Fragment as B } from "react/jsx-runtime";
|
|
7
|
-
import { P as
|
|
8
|
-
import { R as Ae } from "./Combination-
|
|
9
|
-
var
|
|
10
|
-
}), Oe = 0;
|
|
11
|
-
function M(e) {
|
|
12
|
-
const [n, t] = i.useState(Ne());
|
|
13
|
-
return Ee(() => {
|
|
14
|
-
t((o) => o ?? String(Oe++));
|
|
15
|
-
}, [e]), n ? `radix-${n}` : "";
|
|
16
|
-
}
|
|
17
|
-
var x = "focusScope.autoFocusOnMount", w = "focusScope.autoFocusOnUnmount", V = { bubbles: !1, cancelable: !0 }, _e = "FocusScope", Q = i.forwardRef((e, n) => {
|
|
9
|
+
import { P as U } from "./index-Dm-ooN_M.js";
|
|
10
|
+
import { R as Ae } from "./Combination-VYaRRJBZ.js";
|
|
11
|
+
var x = "focusScope.autoFocusOnMount", L = "focusScope.autoFocusOnUnmount", V = { bubbles: !1, cancelable: !0 }, Re = "FocusScope", Q = i.forwardRef((e, n) => {
|
|
18
12
|
const {
|
|
19
13
|
loop: t = !1,
|
|
20
14
|
trapped: o = !1,
|
|
@@ -42,8 +36,8 @@ var x = "focusScope.autoFocusOnMount", w = "focusScope.autoFocusOnUnmount", V =
|
|
|
42
36
|
y !== null && (s.contains(y) || C(u.current, { select: !0 }));
|
|
43
37
|
}, v = function(D) {
|
|
44
38
|
if (document.activeElement === document.body)
|
|
45
|
-
for (const
|
|
46
|
-
|
|
39
|
+
for (const $ of D)
|
|
40
|
+
$.removedNodes.length > 0 && C(s);
|
|
47
41
|
};
|
|
48
42
|
document.addEventListener("focusin", l), document.addEventListener("focusout", b);
|
|
49
43
|
const O = new MutationObserver(v);
|
|
@@ -57,36 +51,36 @@ var x = "focusScope.autoFocusOnMount", w = "focusScope.autoFocusOnUnmount", V =
|
|
|
57
51
|
const l = document.activeElement;
|
|
58
52
|
if (!s.contains(l)) {
|
|
59
53
|
const v = new CustomEvent(x, V);
|
|
60
|
-
s.addEventListener(x, m), s.dispatchEvent(v), v.defaultPrevented || (Ie(
|
|
54
|
+
s.addEventListener(x, m), s.dispatchEvent(v), v.defaultPrevented || (Ne(Ie(X(s)), { select: !0 }), document.activeElement === l && C(s));
|
|
61
55
|
}
|
|
62
56
|
return () => {
|
|
63
57
|
s.removeEventListener(x, m), setTimeout(() => {
|
|
64
|
-
const v = new CustomEvent(
|
|
65
|
-
s.addEventListener(
|
|
58
|
+
const v = new CustomEvent(L, V);
|
|
59
|
+
s.addEventListener(L, h), s.dispatchEvent(v), v.defaultPrevented || C(l ?? document.body, { select: !0 }), s.removeEventListener(L, h), Z.remove(p);
|
|
66
60
|
}, 0);
|
|
67
61
|
};
|
|
68
62
|
}
|
|
69
63
|
}, [s, m, h, p]);
|
|
70
|
-
const
|
|
64
|
+
const P = i.useCallback(
|
|
71
65
|
(l) => {
|
|
72
66
|
if (!t && !o || p.paused) return;
|
|
73
67
|
const b = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, v = document.activeElement;
|
|
74
68
|
if (b && v) {
|
|
75
|
-
const O = l.currentTarget, [D, y] =
|
|
69
|
+
const O = l.currentTarget, [D, y] = Oe(O);
|
|
76
70
|
D && y ? !l.shiftKey && v === y ? (l.preventDefault(), t && C(D, { select: !0 })) : l.shiftKey && v === D && (l.preventDefault(), t && C(y, { select: !0 })) : v === O && l.preventDefault();
|
|
77
71
|
}
|
|
78
72
|
},
|
|
79
73
|
[t, o, p.paused]
|
|
80
74
|
);
|
|
81
|
-
return /* @__PURE__ */ f(N.div, { tabIndex: -1, ...c, ref: d, onKeyDown:
|
|
75
|
+
return /* @__PURE__ */ f(N.div, { tabIndex: -1, ...c, ref: d, onKeyDown: P });
|
|
82
76
|
});
|
|
83
|
-
Q.displayName =
|
|
84
|
-
function
|
|
77
|
+
Q.displayName = Re;
|
|
78
|
+
function Ne(e, { select: n = !1 } = {}) {
|
|
85
79
|
const t = document.activeElement;
|
|
86
80
|
for (const o of e)
|
|
87
81
|
if (C(o, { select: n }), document.activeElement !== t) return;
|
|
88
82
|
}
|
|
89
|
-
function
|
|
83
|
+
function Oe(e) {
|
|
90
84
|
const n = X(e), t = Y(n, e), o = Y(n.reverse(), e);
|
|
91
85
|
return [t, o];
|
|
92
86
|
}
|
|
@@ -102,9 +96,9 @@ function X(e) {
|
|
|
102
96
|
}
|
|
103
97
|
function Y(e, n) {
|
|
104
98
|
for (const t of e)
|
|
105
|
-
if (!
|
|
99
|
+
if (!_e(t, { upTo: n })) return t;
|
|
106
100
|
}
|
|
107
|
-
function
|
|
101
|
+
function _e(e, { upTo: n }) {
|
|
108
102
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
109
103
|
for (; e; ) {
|
|
110
104
|
if (n !== void 0 && e === n) return !1;
|
|
@@ -113,17 +107,17 @@ function Te(e, { upTo: n }) {
|
|
|
113
107
|
}
|
|
114
108
|
return !1;
|
|
115
109
|
}
|
|
116
|
-
function
|
|
110
|
+
function Pe(e) {
|
|
117
111
|
return e instanceof HTMLInputElement && "select" in e;
|
|
118
112
|
}
|
|
119
113
|
function C(e, { select: n = !1 } = {}) {
|
|
120
114
|
if (e && e.focus) {
|
|
121
115
|
const t = document.activeElement;
|
|
122
|
-
e.focus({ preventScroll: !0 }), e !== t &&
|
|
116
|
+
e.focus({ preventScroll: !0 }), e !== t && Pe(e) && n && e.select();
|
|
123
117
|
}
|
|
124
118
|
}
|
|
125
|
-
var Z =
|
|
126
|
-
function
|
|
119
|
+
var Z = Te();
|
|
120
|
+
function Te() {
|
|
127
121
|
let e = [];
|
|
128
122
|
return {
|
|
129
123
|
add(n) {
|
|
@@ -140,15 +134,15 @@ function z(e, n) {
|
|
|
140
134
|
const t = [...e], o = t.indexOf(n);
|
|
141
135
|
return o !== -1 && t.splice(o, 1), t;
|
|
142
136
|
}
|
|
143
|
-
function
|
|
137
|
+
function Ie(e) {
|
|
144
138
|
return e.filter((n) => n.tagName !== "A");
|
|
145
139
|
}
|
|
146
|
-
var
|
|
147
|
-
function
|
|
140
|
+
var k = 0;
|
|
141
|
+
function Fe() {
|
|
148
142
|
i.useEffect(() => {
|
|
149
143
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
150
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? J()), document.body.insertAdjacentElement("beforeend", e[1] ?? J()),
|
|
151
|
-
|
|
144
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? J()), document.body.insertAdjacentElement("beforeend", e[1] ?? J()), k++, () => {
|
|
145
|
+
k === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((n) => n.remove()), k--;
|
|
152
146
|
};
|
|
153
147
|
}, []);
|
|
154
148
|
}
|
|
@@ -156,14 +150,14 @@ function J() {
|
|
|
156
150
|
const e = document.createElement("span");
|
|
157
151
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
158
152
|
}
|
|
159
|
-
var
|
|
153
|
+
var Se = function(e) {
|
|
160
154
|
if (typeof document > "u")
|
|
161
155
|
return null;
|
|
162
156
|
var n = Array.isArray(e) ? e[0] : e;
|
|
163
157
|
return n.ownerDocument.body;
|
|
164
|
-
},
|
|
158
|
+
}, R = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), I = {}, W = 0, ee = function(e) {
|
|
165
159
|
return e && (e.host || ee(e.parentNode));
|
|
166
|
-
},
|
|
160
|
+
}, Me = function(e, n) {
|
|
167
161
|
return n.map(function(t) {
|
|
168
162
|
if (e.contains(t))
|
|
169
163
|
return t;
|
|
@@ -172,10 +166,10 @@ var we = function(e) {
|
|
|
172
166
|
}).filter(function(t) {
|
|
173
167
|
return !!t;
|
|
174
168
|
});
|
|
175
|
-
},
|
|
176
|
-
var a =
|
|
177
|
-
|
|
178
|
-
var r =
|
|
169
|
+
}, we = function(e, n, t, o) {
|
|
170
|
+
var a = Me(n, Array.isArray(e) ? e : [e]);
|
|
171
|
+
I[t] || (I[t] = /* @__PURE__ */ new WeakMap());
|
|
172
|
+
var r = I[t], c = [], s = /* @__PURE__ */ new Set(), g = new Set(a), m = function(u) {
|
|
179
173
|
!u || s.has(u) || (s.add(u), m(u.parentNode));
|
|
180
174
|
};
|
|
181
175
|
a.forEach(m);
|
|
@@ -185,26 +179,26 @@ var we = function(e) {
|
|
|
185
179
|
h(d);
|
|
186
180
|
else
|
|
187
181
|
try {
|
|
188
|
-
var p = d.getAttribute(o),
|
|
189
|
-
|
|
182
|
+
var p = d.getAttribute(o), P = p !== null && p !== "false", l = (R.get(d) || 0) + 1, b = (r.get(d) || 0) + 1;
|
|
183
|
+
R.set(d, l), r.set(d, b), c.push(d), l === 1 && P && T.set(d, !0), b === 1 && d.setAttribute(t, "true"), P || d.setAttribute(o, "true");
|
|
190
184
|
} catch (v) {
|
|
191
185
|
console.error("aria-hidden: cannot operate on ", d, v);
|
|
192
186
|
}
|
|
193
187
|
});
|
|
194
188
|
};
|
|
195
|
-
return h(n), s.clear(),
|
|
189
|
+
return h(n), s.clear(), W++, function() {
|
|
196
190
|
c.forEach(function(u) {
|
|
197
|
-
var d =
|
|
198
|
-
|
|
199
|
-
}),
|
|
191
|
+
var d = R.get(u) - 1, p = r.get(u) - 1;
|
|
192
|
+
R.set(u, d), r.set(u, p), d || (T.has(u) || u.removeAttribute(o), T.delete(u)), p || u.removeAttribute(t);
|
|
193
|
+
}), W--, W || (R = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), I = {});
|
|
200
194
|
};
|
|
201
|
-
},
|
|
195
|
+
}, xe = function(e, n, t) {
|
|
202
196
|
t === void 0 && (t = "data-aria-hidden");
|
|
203
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
204
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))),
|
|
197
|
+
var o = Array.from(Array.isArray(e) ? e : [e]), a = Se(e);
|
|
198
|
+
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), we(o, a, t, "aria-hidden")) : function() {
|
|
205
199
|
return null;
|
|
206
200
|
};
|
|
207
|
-
},
|
|
201
|
+
}, M = "Dialog", [te, et] = he(M), [Le, E] = te(M), ne = (e) => {
|
|
208
202
|
const {
|
|
209
203
|
__scopeDialog: n,
|
|
210
204
|
children: t,
|
|
@@ -212,20 +206,21 @@ var we = function(e) {
|
|
|
212
206
|
defaultOpen: a,
|
|
213
207
|
onOpenChange: r,
|
|
214
208
|
modal: c = !0
|
|
215
|
-
} = e, s = i.useRef(null), g = i.useRef(null), [m
|
|
209
|
+
} = e, s = i.useRef(null), g = i.useRef(null), [m, h] = Ee({
|
|
216
210
|
prop: o,
|
|
217
|
-
defaultProp: a,
|
|
218
|
-
onChange: r
|
|
211
|
+
defaultProp: a ?? !1,
|
|
212
|
+
onChange: r,
|
|
213
|
+
caller: M
|
|
219
214
|
});
|
|
220
215
|
return /* @__PURE__ */ f(
|
|
221
|
-
|
|
216
|
+
Le,
|
|
222
217
|
{
|
|
223
218
|
scope: n,
|
|
224
219
|
triggerRef: s,
|
|
225
220
|
contentRef: g,
|
|
226
|
-
contentId:
|
|
227
|
-
titleId:
|
|
228
|
-
descriptionId:
|
|
221
|
+
contentId: w(),
|
|
222
|
+
titleId: w(),
|
|
223
|
+
descriptionId: w(),
|
|
229
224
|
open: m,
|
|
230
225
|
onOpenChange: h,
|
|
231
226
|
onOpenToggle: i.useCallback(() => h((u) => !u), [h]),
|
|
@@ -234,7 +229,7 @@ var we = function(e) {
|
|
|
234
229
|
}
|
|
235
230
|
);
|
|
236
231
|
};
|
|
237
|
-
ne.displayName =
|
|
232
|
+
ne.displayName = M;
|
|
238
233
|
var oe = "DialogTrigger", re = i.forwardRef(
|
|
239
234
|
(e, n) => {
|
|
240
235
|
const { __scopeDialog: t, ...o } = e, a = E(oe, t), r = S(n, a.triggerRef);
|
|
@@ -245,7 +240,7 @@ var oe = "DialogTrigger", re = i.forwardRef(
|
|
|
245
240
|
"aria-haspopup": "dialog",
|
|
246
241
|
"aria-expanded": a.open,
|
|
247
242
|
"aria-controls": a.contentId,
|
|
248
|
-
"data-state":
|
|
243
|
+
"data-state": H(a.open),
|
|
249
244
|
...o,
|
|
250
245
|
ref: r,
|
|
251
246
|
onClick: _(e.onClick, a.onOpenToggle)
|
|
@@ -254,30 +249,30 @@ var oe = "DialogTrigger", re = i.forwardRef(
|
|
|
254
249
|
}
|
|
255
250
|
);
|
|
256
251
|
re.displayName = oe;
|
|
257
|
-
var K = "DialogPortal", [
|
|
252
|
+
var K = "DialogPortal", [ke, ae] = te(K, {
|
|
258
253
|
forceMount: void 0
|
|
259
254
|
}), se = (e) => {
|
|
260
255
|
const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = E(K, n);
|
|
261
|
-
return /* @__PURE__ */ f(
|
|
256
|
+
return /* @__PURE__ */ f(ke, { scope: n, forceMount: t, children: i.Children.map(o, (c) => /* @__PURE__ */ f(U, { present: t || r.open, children: /* @__PURE__ */ f(be, { asChild: !0, container: a, children: c }) })) });
|
|
262
257
|
};
|
|
263
258
|
se.displayName = K;
|
|
264
259
|
var F = "DialogOverlay", ie = i.forwardRef(
|
|
265
260
|
(e, n) => {
|
|
266
261
|
const t = ae(F, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = E(F, e.__scopeDialog);
|
|
267
|
-
return r.modal ? /* @__PURE__ */ f(
|
|
262
|
+
return r.modal ? /* @__PURE__ */ f(U, { present: o || r.open, children: /* @__PURE__ */ f(Ue, { ...a, ref: n }) }) : null;
|
|
268
263
|
}
|
|
269
264
|
);
|
|
270
265
|
ie.displayName = F;
|
|
271
|
-
var
|
|
266
|
+
var We = De("DialogOverlay.RemoveScroll"), Ue = i.forwardRef(
|
|
272
267
|
(e, n) => {
|
|
273
268
|
const { __scopeDialog: t, ...o } = e, a = E(F, t);
|
|
274
269
|
return (
|
|
275
270
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
276
271
|
// ie. when `Overlay` and `Content` are siblings
|
|
277
|
-
/* @__PURE__ */ f(Ae, { as:
|
|
272
|
+
/* @__PURE__ */ f(Ae, { as: We, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
|
|
278
273
|
N.div,
|
|
279
274
|
{
|
|
280
|
-
"data-state":
|
|
275
|
+
"data-state": H(a.open),
|
|
281
276
|
...o,
|
|
282
277
|
ref: n,
|
|
283
278
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -285,19 +280,19 @@ var Ge = be("DialogOverlay.RemoveScroll"), $e = i.forwardRef(
|
|
|
285
280
|
) })
|
|
286
281
|
);
|
|
287
282
|
}
|
|
288
|
-
),
|
|
283
|
+
), A = "DialogContent", ce = i.forwardRef(
|
|
289
284
|
(e, n) => {
|
|
290
|
-
const t = ae(
|
|
291
|
-
return /* @__PURE__ */ f(
|
|
285
|
+
const t = ae(A, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = E(A, e.__scopeDialog);
|
|
286
|
+
return /* @__PURE__ */ f(U, { present: o || r.open, children: r.modal ? /* @__PURE__ */ f(Ke, { ...a, ref: n }) : /* @__PURE__ */ f(Ge, { ...a, ref: n }) });
|
|
292
287
|
}
|
|
293
288
|
);
|
|
294
|
-
ce.displayName =
|
|
295
|
-
var
|
|
289
|
+
ce.displayName = A;
|
|
290
|
+
var Ke = i.forwardRef(
|
|
296
291
|
(e, n) => {
|
|
297
|
-
const t = E(
|
|
292
|
+
const t = E(A, e.__scopeDialog), o = i.useRef(null), a = S(n, t.contentRef, o);
|
|
298
293
|
return i.useEffect(() => {
|
|
299
294
|
const r = o.current;
|
|
300
|
-
if (r) return
|
|
295
|
+
if (r) return xe(r);
|
|
301
296
|
}, []), /* @__PURE__ */ f(
|
|
302
297
|
ue,
|
|
303
298
|
{
|
|
@@ -320,9 +315,9 @@ var He = i.forwardRef(
|
|
|
320
315
|
}
|
|
321
316
|
);
|
|
322
317
|
}
|
|
323
|
-
),
|
|
318
|
+
), Ge = i.forwardRef(
|
|
324
319
|
(e, n) => {
|
|
325
|
-
const t = E(
|
|
320
|
+
const t = E(A, e.__scopeDialog), o = i.useRef(!1), a = i.useRef(!1);
|
|
326
321
|
return /* @__PURE__ */ f(
|
|
327
322
|
ue,
|
|
328
323
|
{
|
|
@@ -345,8 +340,8 @@ var He = i.forwardRef(
|
|
|
345
340
|
}
|
|
346
341
|
), ue = i.forwardRef(
|
|
347
342
|
(e, n) => {
|
|
348
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...c } = e, s = E(
|
|
349
|
-
return
|
|
343
|
+
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...c } = e, s = E(A, t), g = i.useRef(null), m = S(n, g);
|
|
344
|
+
return Fe(), /* @__PURE__ */ q(B, { children: [
|
|
350
345
|
/* @__PURE__ */ f(
|
|
351
346
|
Q,
|
|
352
347
|
{
|
|
@@ -356,13 +351,13 @@ var He = i.forwardRef(
|
|
|
356
351
|
onMountAutoFocus: a,
|
|
357
352
|
onUnmountAutoFocus: r,
|
|
358
353
|
children: /* @__PURE__ */ f(
|
|
359
|
-
|
|
354
|
+
Ce,
|
|
360
355
|
{
|
|
361
356
|
role: "dialog",
|
|
362
357
|
id: s.contentId,
|
|
363
358
|
"aria-describedby": s.descriptionId,
|
|
364
359
|
"aria-labelledby": s.titleId,
|
|
365
|
-
"data-state":
|
|
360
|
+
"data-state": H(s.open),
|
|
366
361
|
...c,
|
|
367
362
|
ref: m,
|
|
368
363
|
onDismiss: () => s.onOpenChange(!1)
|
|
@@ -371,8 +366,8 @@ var He = i.forwardRef(
|
|
|
371
366
|
}
|
|
372
367
|
),
|
|
373
368
|
/* @__PURE__ */ q(B, { children: [
|
|
374
|
-
/* @__PURE__ */ f(
|
|
375
|
-
/* @__PURE__ */ f(
|
|
369
|
+
/* @__PURE__ */ f(He, { titleId: s.titleId }),
|
|
370
|
+
/* @__PURE__ */ f(je, { contentRef: g, descriptionId: s.descriptionId })
|
|
376
371
|
] })
|
|
377
372
|
] });
|
|
378
373
|
}
|
|
@@ -405,14 +400,14 @@ var pe = "DialogClose", ve = i.forwardRef(
|
|
|
405
400
|
}
|
|
406
401
|
);
|
|
407
402
|
ve.displayName = pe;
|
|
408
|
-
function
|
|
403
|
+
function H(e) {
|
|
409
404
|
return e ? "open" : "closed";
|
|
410
405
|
}
|
|
411
|
-
var me = "DialogTitleWarning", [
|
|
412
|
-
contentName:
|
|
406
|
+
var me = "DialogTitleWarning", [tt, ge] = ye(me, {
|
|
407
|
+
contentName: A,
|
|
413
408
|
titleName: G,
|
|
414
409
|
docsSlug: "dialog"
|
|
415
|
-
}),
|
|
410
|
+
}), He = ({ titleId: e }) => {
|
|
416
411
|
const n = ge(me), t = `\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
417
412
|
|
|
418
413
|
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -421,26 +416,25 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
|
|
|
421
416
|
return i.useEffect(() => {
|
|
422
417
|
e && (document.getElementById(e) || console.error(t));
|
|
423
418
|
}, [t, e]), null;
|
|
424
|
-
},
|
|
425
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ge(
|
|
419
|
+
}, $e = "DialogDescriptionWarning", je = ({ contentRef: e, descriptionId: n }) => {
|
|
420
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ge($e).contentName}}.`;
|
|
426
421
|
return i.useEffect(() => {
|
|
427
422
|
var r;
|
|
428
423
|
const a = (r = e.current) == null ? void 0 : r.getAttribute("aria-describedby");
|
|
429
424
|
n && a && (document.getElementById(n) || console.warn(o));
|
|
430
425
|
}, [o, e, n]), null;
|
|
431
|
-
},
|
|
426
|
+
}, nt = ne, ot = re, rt = se, at = ie, st = ce, it = le, ct = de, ut = ve;
|
|
432
427
|
export {
|
|
433
|
-
|
|
428
|
+
st as C,
|
|
434
429
|
le as D,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
430
|
+
at as O,
|
|
431
|
+
rt as P,
|
|
432
|
+
nt as R,
|
|
433
|
+
it as T,
|
|
434
|
+
tt as W,
|
|
440
435
|
se as a,
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
M as u
|
|
436
|
+
ut as b,
|
|
437
|
+
et as c,
|
|
438
|
+
ct as d,
|
|
439
|
+
ot as e
|
|
446
440
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { P as m, d as z, R as H } from "./index-
|
|
4
|
-
import { u as T } from "./index-
|
|
2
|
+
import { b as h, u as U } from "./index-Cq1I1cG9.js";
|
|
3
|
+
import { P as m, d as z, R as H } from "./index-BCGvACM9.js";
|
|
4
|
+
import { u as T } from "./index-B5MIi2tR.js";
|
|
5
|
+
import { u as b } from "./index-DwYXX2sM.js";
|
|
5
6
|
import { jsx as P } from "react/jsx-runtime";
|
|
6
7
|
function K(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
7
8
|
const s = b(r);
|
|
@@ -22,19 +23,19 @@ var j = "DismissableLayer", p = "dismissableLayer.update", X = "dismissableLayer
|
|
|
22
23
|
disableOutsidePointerEvents: s = !1,
|
|
23
24
|
onEscapeKeyDown: n,
|
|
24
25
|
onPointerDownOutside: t,
|
|
25
|
-
onFocusOutside:
|
|
26
|
+
onFocusOutside: o,
|
|
26
27
|
onInteractOutside: l,
|
|
27
28
|
onDismiss: u,
|
|
28
29
|
...v
|
|
29
|
-
} = r, c = i.useContext(B), [d, N] = i.useState(null), f = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, F] = i.useState({}), W = T(e, (
|
|
30
|
-
const E =
|
|
31
|
-
!C || R || (t == null || t(
|
|
32
|
-
}, f), O = J((
|
|
33
|
-
const E =
|
|
34
|
-
[...c.branches].some((y) => y.contains(E)) || (
|
|
30
|
+
} = r, c = i.useContext(B), [d, N] = i.useState(null), f = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, F] = i.useState({}), W = T(e, (a) => N(a)), D = Array.from(c.layers), [k] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), I = D.indexOf(k), L = d ? D.indexOf(d) : -1, _ = c.layersWithOutsidePointerEventsDisabled.size > 0, C = L >= I, M = G((a) => {
|
|
31
|
+
const E = a.target, R = [...c.branches].some((y) => y.contains(E));
|
|
32
|
+
!C || R || (t == null || t(a), l == null || l(a), a.defaultPrevented || u == null || u());
|
|
33
|
+
}, f), O = J((a) => {
|
|
34
|
+
const E = a.target;
|
|
35
|
+
[...c.branches].some((y) => y.contains(E)) || (o == null || o(a), l == null || l(a), a.defaultPrevented || u == null || u());
|
|
35
36
|
}, f);
|
|
36
|
-
return K((
|
|
37
|
-
L === c.layers.size - 1 && (n == null || n(
|
|
37
|
+
return K((a) => {
|
|
38
|
+
L === c.layers.size - 1 && (n == null || n(a), !a.defaultPrevented && u && (a.preventDefault(), u()));
|
|
38
39
|
}, f), i.useEffect(() => {
|
|
39
40
|
if (d)
|
|
40
41
|
return s && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (g = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), w(), () => {
|
|
@@ -43,8 +44,8 @@ var j = "DismissableLayer", p = "dismissableLayer.update", X = "dismissableLayer
|
|
|
43
44
|
}, [d, f, s, c]), i.useEffect(() => () => {
|
|
44
45
|
d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), w());
|
|
45
46
|
}, [d, c]), i.useEffect(() => {
|
|
46
|
-
const
|
|
47
|
-
return document.addEventListener(p,
|
|
47
|
+
const a = () => F({});
|
|
48
|
+
return document.addEventListener(p, a), () => document.removeEventListener(p, a);
|
|
48
49
|
}, []), /* @__PURE__ */ P(
|
|
49
50
|
m.div,
|
|
50
51
|
{
|
|
@@ -68,10 +69,10 @@ x.displayName = j;
|
|
|
68
69
|
var q = "DismissableLayerBranch", S = i.forwardRef((r, e) => {
|
|
69
70
|
const s = i.useContext(B), n = i.useRef(null), t = T(e, n);
|
|
70
71
|
return i.useEffect(() => {
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
return s.branches.add(
|
|
74
|
-
s.branches.delete(
|
|
72
|
+
const o = n.current;
|
|
73
|
+
if (o)
|
|
74
|
+
return s.branches.add(o), () => {
|
|
75
|
+
s.branches.delete(o);
|
|
75
76
|
};
|
|
76
77
|
}, [s.branches]), /* @__PURE__ */ P(m.div, { ...r, ref: t });
|
|
77
78
|
});
|
|
@@ -80,7 +81,7 @@ function G(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
|
80
81
|
const s = b(r), n = i.useRef(!1), t = i.useRef(() => {
|
|
81
82
|
});
|
|
82
83
|
return i.useEffect(() => {
|
|
83
|
-
const
|
|
84
|
+
const o = (u) => {
|
|
84
85
|
if (u.target && !n.current) {
|
|
85
86
|
let v = function() {
|
|
86
87
|
A(
|
|
@@ -96,10 +97,10 @@ function G(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
|
96
97
|
e.removeEventListener("click", t.current);
|
|
97
98
|
n.current = !1;
|
|
98
99
|
}, l = window.setTimeout(() => {
|
|
99
|
-
e.addEventListener("pointerdown",
|
|
100
|
+
e.addEventListener("pointerdown", o);
|
|
100
101
|
}, 0);
|
|
101
102
|
return () => {
|
|
102
|
-
window.clearTimeout(l), e.removeEventListener("pointerdown",
|
|
103
|
+
window.clearTimeout(l), e.removeEventListener("pointerdown", o), e.removeEventListener("click", t.current);
|
|
103
104
|
};
|
|
104
105
|
}, [e, s]), {
|
|
105
106
|
// ensures we check React component tree (not just DOM tree)
|
|
@@ -109,8 +110,8 @@ function G(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
|
109
110
|
function J(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
110
111
|
const s = b(r), n = i.useRef(!1);
|
|
111
112
|
return i.useEffect(() => {
|
|
112
|
-
const t = (
|
|
113
|
-
|
|
113
|
+
const t = (o) => {
|
|
114
|
+
o.target && !n.current && A(Y, s, { originalEvent: o }, {
|
|
114
115
|
discrete: !1
|
|
115
116
|
});
|
|
116
117
|
};
|
|
@@ -125,20 +126,20 @@ function w() {
|
|
|
125
126
|
document.dispatchEvent(r);
|
|
126
127
|
}
|
|
127
128
|
function A(r, e, s, { discrete: n }) {
|
|
128
|
-
const t = s.originalEvent.target,
|
|
129
|
-
e && t.addEventListener(r, e, { once: !0 }), n ? z(t,
|
|
129
|
+
const t = s.originalEvent.target, o = new CustomEvent(r, { bubbles: !1, cancelable: !0, detail: s });
|
|
130
|
+
e && t.addEventListener(r, e, { once: !0 }), n ? z(t, o) : t.dispatchEvent(o);
|
|
130
131
|
}
|
|
131
|
-
var
|
|
132
|
+
var ne = x, re = S, Q = "Portal", V = i.forwardRef((r, e) => {
|
|
132
133
|
var u;
|
|
133
|
-
const { container: s, ...n } = r, [t,
|
|
134
|
-
U(() =>
|
|
134
|
+
const { container: s, ...n } = r, [t, o] = i.useState(!1);
|
|
135
|
+
U(() => o(!0), []);
|
|
135
136
|
const l = s || t && ((u = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : u.body);
|
|
136
137
|
return l ? H.createPortal(/* @__PURE__ */ P(m.div, { ...n, ref: e }), l) : null;
|
|
137
138
|
});
|
|
138
139
|
V.displayName = Q;
|
|
139
140
|
export {
|
|
140
|
-
|
|
141
|
+
re as B,
|
|
141
142
|
x as D,
|
|
142
143
|
V as P,
|
|
143
|
-
|
|
144
|
+
ne as R
|
|
144
145
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { R as Ee, P as ke, O as Se, C as Ie } from "./index-DLYwlPRZ.js";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import { P as C } from "./index-
|
|
4
|
-
import {
|
|
3
|
+
import { P as C } from "./index-BCGvACM9.js";
|
|
4
|
+
import { u as P } from "./index-Cs8Lv8Wj.js";
|
|
5
|
+
import { a as j } from "./index-B5MIi2tR.js";
|
|
5
6
|
var de = 1, xe = 0.9, Re = 0.8, Ce = 0.17, Q = 0.1, Z = 0.999, Ae = 0.9999, Me = 0.99, $e = /[\\\/_+.#"@\[\(\{&]/, De = /[\\\/_+.#"@\[\(\{&]/g, Fe = /[\s-]/, me = /[\s-]/g;
|
|
6
7
|
function ee(t, l, r, f, u, c, d) {
|
|
7
8
|
if (c === l.length) return u === t.length ? de : Me;
|
|
@@ -248,7 +249,7 @@ var V = '[cmdk-group=""]', _ = '[cmdk-group-items=""]', Pe = '[cmdk-group-headin
|
|
|
248
249
|
}), Ue = n.forwardRef((t, l) => R((r) => r.filtered.count === 0) ? n.createElement(C.div, { ref: l, ...t, "cmdk-empty": "", role: "presentation" }) : null), He = n.forwardRef((t, l) => {
|
|
249
250
|
let { progress: r, children: f, label: u = "Loading...", ...c } = t;
|
|
250
251
|
return n.createElement(C.div, { ref: l, ...c, "cmdk-loading": "", role: "progressbar", "aria-valuenow": r, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": u }, z(t, (d) => n.createElement("div", { "aria-hidden": !0 }, d)));
|
|
251
|
-
}),
|
|
252
|
+
}), _e = Object.assign(be, { List: Be, Item: Ve, Input: Oe, Group: je, Separator: Le, Dialog: ze, Empty: Ue, Loading: He });
|
|
252
253
|
function Ne(t, l) {
|
|
253
254
|
let r = t.nextElementSibling;
|
|
254
255
|
for (; r; ) {
|
|
@@ -309,5 +310,5 @@ function z({ asChild: t, children: l }, r) {
|
|
|
309
310
|
}
|
|
310
311
|
var Je = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
311
312
|
export {
|
|
312
|
-
|
|
313
|
+
_e as _
|
|
313
314
|
};
|