@konstructio/ui 0.1.2-alpha.4 → 0.1.2-alpha.41
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-VYaRRJBZ.js → Combination-BtmnusWq.js} +141 -138
- package/dist/DatePicker.css +1 -1
- package/dist/Modal-CtAG97Ts.js +99 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/chevron-down-DgT-uSF9.js +5 -0
- package/dist/chevron-left-C4LEg1fH.js +7 -0
- package/dist/chevron-up-CRyLc5Ml.js +54 -0
- package/dist/chevron-up-DrQr2Fwd.js +5 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +42 -44
- package/dist/components/Badge/Badge.variants.js +8 -6
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.variants.js +1 -1
- package/dist/components/Card/Card.variants.js +5 -9
- package/dist/components/Checkbox/Checkbox.js +6 -6
- 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 +1243 -1191
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +37 -31
- package/dist/components/Dropdown/Dropdown.variants.js +9 -4
- package/dist/components/Dropdown/components/List/List.js +128 -59
- package/dist/components/Dropdown/components/ListItem/ListItem.js +90 -39
- package/dist/components/Dropdown/components/Wrapper.js +141 -134
- package/dist/components/Dropdown/constants/index.js +4 -0
- package/dist/components/Dropdown/constants/pagination.js +4 -0
- package/dist/components/Dropdown/contexts/dropdown.context.js +17 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.js +48 -20
- package/dist/components/Dropdown/hooks/useDropdown.js +74 -29
- package/dist/components/Dropdown/hooks/useNavigationList.js +27 -39
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.variants.js +2 -2
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.js +2 -1
- package/dist/components/Loading/Loading.js +1 -7
- 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/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +34 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +34 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +38 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
- package/dist/components/MultiSelectDropdown/components/List/List.js +37 -0
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +23 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +105 -0
- package/dist/components/MultiSelectDropdown/components/index.js +8 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +21 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +13 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +138 -0
- package/dist/components/MultiSelectDropdown/contexts/index.js +6 -0
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +32 -0
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +46 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +27 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +629 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +36 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +625 -0
- package/dist/components/PhoneNumberInput/components/index.js +6 -0
- package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6144 -0
- package/dist/components/PhoneNumberInput/utils/index.js +11 -0
- package/dist/components/PieChart/PieChart.js +647 -664
- package/dist/components/RadioCard/RadioCard.variants.js +1 -6
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Sidebar/Sidebar.variants.js +2 -2
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +8 -8
- package/dist/components/Switch/Switch.variants.js +4 -4
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.variants.js +1 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +49 -98
- package/dist/components/TimePicker/TimePicker.variants.js +2 -2
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Toast/Toast.js +283 -255
- package/dist/components/Toast/Toast.variants.js +37 -24
- package/dist/components/Tooltip/Tooltip.js +15 -14
- package/dist/components/Tooltip/Tooltip.variants.js +5 -4
- package/dist/components/Typography/Typography.variants.js +18 -23
- package/dist/components/VirtualizedTable/VirtualizedTable.js +121 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
- package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
- package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
- package/dist/components/VirtualizedTable/assets/index.js +6 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +72 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +51 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +93 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
- package/dist/components/VirtualizedTable/components/Header/Header.js +84 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +53 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +67 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +34 -0
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
- package/dist/components/VirtualizedTable/components/index.js +16 -0
- package/dist/components/VirtualizedTable/constants/index.js +5 -0
- package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
- package/dist/components/VirtualizedTable/contexts/index.js +8 -0
- package/dist/components/VirtualizedTable/contexts/table.context.js +32 -0
- package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +85 -0
- package/dist/components/index.js +88 -80
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/debounce-BFejQm9P.js +200 -0
- package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
- package/dist/{index-h-Ul0anl.js → index--V_ZsiQe.js} +1 -22
- package/dist/index-2hB40Iuc.js +1873 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
- package/dist/index-BtQfgaSF.js +60 -0
- package/dist/index-C3tHPg8y.js +662 -0
- package/dist/index-C65LtGuU.js +137 -0
- package/dist/index-CIAmiWcw.js +200 -0
- package/dist/index-CSFe9uC5.js +14 -0
- package/dist/index-CSWGJT-v.js +1722 -0
- package/dist/{index-D3xzCzcO.js → index-CdwPV0FE.js} +4 -4
- package/dist/index-CigKKiZS.js +91 -0
- package/dist/{index-BAraV3ai.js → index-DH2Fnov1.js} +11 -12
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/index-Dbt2vBmS.js +136 -0
- package/dist/{index-DB2XhXHn.js → index-DpW9ExsS.js} +7 -7
- package/dist/index-DrWQH0QF.js +55 -0
- package/dist/index-Ds6U2x4Z.js +479 -0
- package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
- package/dist/index-ohdbKsws.js +27 -0
- package/dist/index.d.ts +232 -23
- package/dist/index.js +112 -102
- package/dist/libphonenumber-_7ZyKWA7.js +11549 -0
- package/dist/loader-juvMSJ9L.js +5 -0
- package/dist/package.json +48 -34
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +191 -167
- package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
- package/dist/utils/index.js +534 -501
- package/dist/{x-BPcqkRZd.js → x-DPU9OdYH.js} +1 -1
- package/package.json +48 -34
- package/dist/Modal-V67Uz78z.js +0 -98
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/chevron-down-BLZPftpV.js +0 -11
- package/dist/index-BXuxPoz7.js +0 -435
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-C9T9HQaa.js +0 -423
- package/dist/index-CZnD2QxM.js +0 -32
- package/dist/index-CrBonFvu.js +0 -144
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-Oq5GlCHP.js +0 -131
- package/dist/index-iXyXtdgP.js +0 -31
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { R as Ee, P as ke, O as Se, C as Ie } from "./index-
|
|
1
|
+
import { R as Ee, P as ke, O as Se, C as Ie } from "./index-Ds6U2x4Z.js";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import { P as C } from "./index-
|
|
4
|
-
import { u as P } from "./index-
|
|
5
|
-
import {
|
|
3
|
+
import { P as C } from "./index-CIAmiWcw.js";
|
|
4
|
+
import { u as P } from "./index-BbQkJE5L.js";
|
|
5
|
+
import { c as j } from "./index-DLcqcWxM.js";
|
|
6
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;
|
|
7
7
|
function ee(t, l, r, f, u, c, d) {
|
|
8
8
|
if (c === l.length) return u === t.length ? de : Me;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import R from "react";
|
|
3
|
+
import { c as T } from "./index-CIAmiWcw.js";
|
|
4
|
+
import { c as P, u as A } from "./index-DLcqcWxM.js";
|
|
5
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
6
|
+
// @__NO_SIDE_EFFECTS__
|
|
7
|
+
function M(e) {
|
|
8
|
+
const t = /* @__PURE__ */ v(e), n = l.forwardRef((r, o) => {
|
|
9
|
+
const { children: c, ...a } = r, s = l.Children.toArray(c), d = s.find(w);
|
|
10
|
+
if (d) {
|
|
11
|
+
const f = d.props.children, y = s.map((I) => I === d ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : I);
|
|
12
|
+
return /* @__PURE__ */ E(t, { ...a, ref: o, children: l.isValidElement(f) ? l.cloneElement(f, void 0, y) : null });
|
|
13
|
+
}
|
|
14
|
+
return /* @__PURE__ */ E(t, { ...a, ref: o, children: c });
|
|
15
|
+
});
|
|
16
|
+
return n.displayName = `${e}.Slot`, n;
|
|
17
|
+
}
|
|
18
|
+
// @__NO_SIDE_EFFECTS__
|
|
19
|
+
function v(e) {
|
|
20
|
+
const t = l.forwardRef((n, r) => {
|
|
21
|
+
const { children: o, ...c } = n;
|
|
22
|
+
if (l.isValidElement(o)) {
|
|
23
|
+
const a = D(o), s = V(c, o.props);
|
|
24
|
+
return o.type !== l.Fragment && (s.ref = r ? P(r, a) : a), l.cloneElement(o, s);
|
|
25
|
+
}
|
|
26
|
+
return l.Children.count(o) > 1 ? l.Children.only(null) : null;
|
|
27
|
+
});
|
|
28
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
29
|
+
}
|
|
30
|
+
var b = Symbol("radix.slottable");
|
|
31
|
+
function w(e) {
|
|
32
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === b;
|
|
33
|
+
}
|
|
34
|
+
function V(e, t) {
|
|
35
|
+
const n = { ...t };
|
|
36
|
+
for (const r in t) {
|
|
37
|
+
const o = e[r], c = t[r];
|
|
38
|
+
/^on[A-Z]/.test(r) ? o && c ? n[r] = (...s) => {
|
|
39
|
+
const d = c(...s);
|
|
40
|
+
return o(...s), d;
|
|
41
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...c } : r === "className" && (n[r] = [o, c].filter(Boolean).join(" "));
|
|
42
|
+
}
|
|
43
|
+
return { ...e, ...n };
|
|
44
|
+
}
|
|
45
|
+
function D(e) {
|
|
46
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
47
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
48
|
+
}
|
|
49
|
+
function B(e) {
|
|
50
|
+
const t = e + "CollectionProvider", [n, r] = T(t), [o, c] = n(
|
|
51
|
+
t,
|
|
52
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
53
|
+
), a = (m) => {
|
|
54
|
+
const { scope: i, children: S } = m, u = R.useRef(null), p = R.useRef(/* @__PURE__ */ new Map()).current;
|
|
55
|
+
return /* @__PURE__ */ E(o, { scope: i, itemMap: p, collectionRef: u, children: S });
|
|
56
|
+
};
|
|
57
|
+
a.displayName = t;
|
|
58
|
+
const s = e + "CollectionSlot", d = /* @__PURE__ */ M(s), f = R.forwardRef(
|
|
59
|
+
(m, i) => {
|
|
60
|
+
const { scope: S, children: u } = m, p = c(s, S), C = A(i, p.collectionRef);
|
|
61
|
+
return /* @__PURE__ */ E(d, { ref: C, children: u });
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
f.displayName = s;
|
|
65
|
+
const y = e + "CollectionItemSlot", I = "data-radix-collection-item", N = /* @__PURE__ */ M(y), _ = R.forwardRef(
|
|
66
|
+
(m, i) => {
|
|
67
|
+
const { scope: S, children: u, ...p } = m, C = R.useRef(null), g = A(i, C), x = c(y, S);
|
|
68
|
+
return R.useEffect(() => (x.itemMap.set(C, { ref: C, ...p }), () => void x.itemMap.delete(C))), /* @__PURE__ */ E(N, { [I]: "", ref: g, children: u });
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
_.displayName = y;
|
|
72
|
+
function O(m) {
|
|
73
|
+
const i = c(e + "CollectionConsumer", m);
|
|
74
|
+
return R.useCallback(() => {
|
|
75
|
+
const u = i.collectionRef.current;
|
|
76
|
+
if (!u) return [];
|
|
77
|
+
const p = Array.from(u.querySelectorAll(`[${I}]`));
|
|
78
|
+
return Array.from(i.itemMap.values()).sort(
|
|
79
|
+
(x, h) => p.indexOf(x.ref.current) - p.indexOf(h.ref.current)
|
|
80
|
+
);
|
|
81
|
+
}, [i.collectionRef, i.itemMap]);
|
|
82
|
+
}
|
|
83
|
+
return [
|
|
84
|
+
{ Provider: a, Slot: f, ItemSlot: _ },
|
|
85
|
+
O,
|
|
86
|
+
r
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
B as c
|
|
91
|
+
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as s from "react";
|
|
2
|
-
import { c as K, b as I, a as L } from "./index-
|
|
3
|
-
import { c as ce } from "./index-
|
|
4
|
-
import { u as ie } from "./index-
|
|
5
|
-
import { u as O } from "./index-
|
|
6
|
-
import { P as C } from "./index-C9T9HQaa.js";
|
|
2
|
+
import { c as K, P as C, b as I, a as L } from "./index-CIAmiWcw.js";
|
|
3
|
+
import { c as ce } from "./index-CigKKiZS.js";
|
|
4
|
+
import { u as ie } from "./index-DLcqcWxM.js";
|
|
5
|
+
import { u as O } from "./index-BbQkJE5L.js";
|
|
7
6
|
import { u as ue } from "./index-0ioNhtNM.js";
|
|
8
7
|
import { u as k } from "./index-BdMNhZnh.js";
|
|
9
8
|
import { jsx as l } from "react/jsx-runtime";
|
|
10
|
-
import { P as le } from "./index-
|
|
9
|
+
import { P as le } from "./index-mPY_8Y5v.js";
|
|
11
10
|
var N = "rovingFocusGroup.onEntryFocus", de = { bubbles: !1, cancelable: !0 }, h = "RovingFocusGroup", [D, V, fe] = ce(h), [ve, U] = K(
|
|
12
11
|
h,
|
|
13
12
|
[fe]
|
|
@@ -172,7 +171,7 @@ function z(e, o = !1) {
|
|
|
172
171
|
function Fe(e, o) {
|
|
173
172
|
return e.map((n, t) => e[(o + t) % e.length]);
|
|
174
173
|
}
|
|
175
|
-
var Re = B, Ce = Y, _ = "Tabs", [he,
|
|
174
|
+
var Re = B, Ce = Y, _ = "Tabs", [he, Me] = K(_, [
|
|
176
175
|
U
|
|
177
176
|
]), H = U(), [Ee, x] = he(_), j = s.forwardRef(
|
|
178
177
|
(e, o) => {
|
|
@@ -314,10 +313,10 @@ function ee(e, o) {
|
|
|
314
313
|
function te(e, o) {
|
|
315
314
|
return `${e}-content-${o}`;
|
|
316
315
|
}
|
|
317
|
-
var
|
|
316
|
+
var Ge = j, Ke = J, Le = W, Oe = Z;
|
|
318
317
|
export {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
318
|
+
Oe as C,
|
|
319
|
+
Ke as L,
|
|
320
|
+
Ge as R,
|
|
321
|
+
Le as T
|
|
323
322
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
function s(n, o) {
|
|
3
|
+
if (typeof n == "function")
|
|
4
|
+
return n(o);
|
|
5
|
+
n != null && (n.current = o);
|
|
6
|
+
}
|
|
7
|
+
function f(...n) {
|
|
8
|
+
return (o) => {
|
|
9
|
+
let u = !1;
|
|
10
|
+
const c = n.map((t) => {
|
|
11
|
+
const e = s(t, o);
|
|
12
|
+
return !u && typeof e == "function" && (u = !0), e;
|
|
13
|
+
});
|
|
14
|
+
if (u)
|
|
15
|
+
return () => {
|
|
16
|
+
for (let t = 0; t < c.length; t++) {
|
|
17
|
+
const e = c[t];
|
|
18
|
+
typeof e == "function" ? e() : s(n[t], null);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function i(...n) {
|
|
24
|
+
return l.useCallback(f(...n), n);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
f as c,
|
|
28
|
+
i as u
|
|
29
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { P as R, b as h, d as z } from "./index-CIAmiWcw.js";
|
|
3
|
+
import { u as g } from "./index-DLcqcWxM.js";
|
|
4
|
+
import { u as m } from "./index-0ioNhtNM.js";
|
|
5
|
+
import { jsx as B } from "react/jsx-runtime";
|
|
6
|
+
function H(n, e = globalThis?.document) {
|
|
7
|
+
const t = m(n);
|
|
8
|
+
i.useEffect(() => {
|
|
9
|
+
const o = (s) => {
|
|
10
|
+
s.key === "Escape" && t(s);
|
|
11
|
+
};
|
|
12
|
+
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
|
13
|
+
}, [t, e]);
|
|
14
|
+
}
|
|
15
|
+
var K = "DismissableLayer", p = "dismissableLayer.update", M = "dismissableLayer.pointerDownOutside", j = "dismissableLayer.focusOutside", C, T = i.createContext({
|
|
16
|
+
layers: /* @__PURE__ */ new Set(),
|
|
17
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
18
|
+
branches: /* @__PURE__ */ new Set()
|
|
19
|
+
}), x = i.forwardRef(
|
|
20
|
+
(n, e) => {
|
|
21
|
+
const {
|
|
22
|
+
disableOutsidePointerEvents: t = !1,
|
|
23
|
+
onEscapeKeyDown: o,
|
|
24
|
+
onPointerDownOutside: s,
|
|
25
|
+
onFocusOutside: c,
|
|
26
|
+
onInteractOutside: f,
|
|
27
|
+
onDismiss: d,
|
|
28
|
+
...E
|
|
29
|
+
} = n, a = i.useContext(T), [u, S] = i.useState(null), l = u?.ownerDocument ?? globalThis?.document, [, W] = i.useState({}), k = g(e, (r) => S(r)), b = Array.from(a.layers), [A] = [...a.layersWithOutsidePointerEventsDisabled].slice(-1), N = b.indexOf(A), D = u ? b.indexOf(u) : -1, _ = a.layersWithOutsidePointerEventsDisabled.size > 0, P = D >= N, U = Y((r) => {
|
|
30
|
+
const v = r.target, L = [...a.branches].some((y) => y.contains(v));
|
|
31
|
+
!P || L || (s?.(r), f?.(r), r.defaultPrevented || d?.());
|
|
32
|
+
}, l), O = q((r) => {
|
|
33
|
+
const v = r.target;
|
|
34
|
+
[...a.branches].some((y) => y.contains(v)) || (c?.(r), f?.(r), r.defaultPrevented || d?.());
|
|
35
|
+
}, l);
|
|
36
|
+
return H((r) => {
|
|
37
|
+
D === a.layers.size - 1 && (o?.(r), !r.defaultPrevented && d && (r.preventDefault(), d()));
|
|
38
|
+
}, l), i.useEffect(() => {
|
|
39
|
+
if (u)
|
|
40
|
+
return t && (a.layersWithOutsidePointerEventsDisabled.size === 0 && (C = l.body.style.pointerEvents, l.body.style.pointerEvents = "none"), a.layersWithOutsidePointerEventsDisabled.add(u)), a.layers.add(u), w(), () => {
|
|
41
|
+
t && a.layersWithOutsidePointerEventsDisabled.size === 1 && (l.body.style.pointerEvents = C);
|
|
42
|
+
};
|
|
43
|
+
}, [u, l, t, a]), i.useEffect(() => () => {
|
|
44
|
+
u && (a.layers.delete(u), a.layersWithOutsidePointerEventsDisabled.delete(u), w());
|
|
45
|
+
}, [u, a]), i.useEffect(() => {
|
|
46
|
+
const r = () => W({});
|
|
47
|
+
return document.addEventListener(p, r), () => document.removeEventListener(p, r);
|
|
48
|
+
}, []), /* @__PURE__ */ B(
|
|
49
|
+
R.div,
|
|
50
|
+
{
|
|
51
|
+
...E,
|
|
52
|
+
ref: k,
|
|
53
|
+
style: {
|
|
54
|
+
pointerEvents: _ ? P ? "auto" : "none" : void 0,
|
|
55
|
+
...n.style
|
|
56
|
+
},
|
|
57
|
+
onFocusCapture: h(n.onFocusCapture, O.onFocusCapture),
|
|
58
|
+
onBlurCapture: h(n.onBlurCapture, O.onBlurCapture),
|
|
59
|
+
onPointerDownCapture: h(
|
|
60
|
+
n.onPointerDownCapture,
|
|
61
|
+
U.onPointerDownCapture
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
x.displayName = K;
|
|
68
|
+
var X = "DismissableLayerBranch", F = i.forwardRef((n, e) => {
|
|
69
|
+
const t = i.useContext(T), o = i.useRef(null), s = g(e, o);
|
|
70
|
+
return i.useEffect(() => {
|
|
71
|
+
const c = o.current;
|
|
72
|
+
if (c)
|
|
73
|
+
return t.branches.add(c), () => {
|
|
74
|
+
t.branches.delete(c);
|
|
75
|
+
};
|
|
76
|
+
}, [t.branches]), /* @__PURE__ */ B(R.div, { ...n, ref: s });
|
|
77
|
+
});
|
|
78
|
+
F.displayName = X;
|
|
79
|
+
function Y(n, e = globalThis?.document) {
|
|
80
|
+
const t = m(n), o = i.useRef(!1), s = i.useRef(() => {
|
|
81
|
+
});
|
|
82
|
+
return i.useEffect(() => {
|
|
83
|
+
const c = (d) => {
|
|
84
|
+
if (d.target && !o.current) {
|
|
85
|
+
let E = function() {
|
|
86
|
+
I(
|
|
87
|
+
M,
|
|
88
|
+
t,
|
|
89
|
+
a,
|
|
90
|
+
{ discrete: !0 }
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
const a = { originalEvent: d };
|
|
94
|
+
d.pointerType === "touch" ? (e.removeEventListener("click", s.current), s.current = E, e.addEventListener("click", s.current, { once: !0 })) : E();
|
|
95
|
+
} else
|
|
96
|
+
e.removeEventListener("click", s.current);
|
|
97
|
+
o.current = !1;
|
|
98
|
+
}, f = window.setTimeout(() => {
|
|
99
|
+
e.addEventListener("pointerdown", c);
|
|
100
|
+
}, 0);
|
|
101
|
+
return () => {
|
|
102
|
+
window.clearTimeout(f), e.removeEventListener("pointerdown", c), e.removeEventListener("click", s.current);
|
|
103
|
+
};
|
|
104
|
+
}, [e, t]), {
|
|
105
|
+
// ensures we check React component tree (not just DOM tree)
|
|
106
|
+
onPointerDownCapture: () => o.current = !0
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function q(n, e = globalThis?.document) {
|
|
110
|
+
const t = m(n), o = i.useRef(!1);
|
|
111
|
+
return i.useEffect(() => {
|
|
112
|
+
const s = (c) => {
|
|
113
|
+
c.target && !o.current && I(j, t, { originalEvent: c }, {
|
|
114
|
+
discrete: !1
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
return e.addEventListener("focusin", s), () => e.removeEventListener("focusin", s);
|
|
118
|
+
}, [e, t]), {
|
|
119
|
+
onFocusCapture: () => o.current = !0,
|
|
120
|
+
onBlurCapture: () => o.current = !1
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function w() {
|
|
124
|
+
const n = new CustomEvent(p);
|
|
125
|
+
document.dispatchEvent(n);
|
|
126
|
+
}
|
|
127
|
+
function I(n, e, t, { discrete: o }) {
|
|
128
|
+
const s = t.originalEvent.target, c = new CustomEvent(n, { bubbles: !1, cancelable: !0, detail: t });
|
|
129
|
+
e && s.addEventListener(n, e, { once: !0 }), o ? z(s, c) : s.dispatchEvent(c);
|
|
130
|
+
}
|
|
131
|
+
var Z = x, $ = F;
|
|
132
|
+
export {
|
|
133
|
+
$ as B,
|
|
134
|
+
x as D,
|
|
135
|
+
Z as R
|
|
136
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as l from "react";
|
|
2
|
-
import { a as ce, c as le, b as _ } from "./index-
|
|
3
|
-
import { u as M } from "./index-
|
|
2
|
+
import { a as ce, c as le, b as _, P as T } from "./index-CIAmiWcw.js";
|
|
3
|
+
import { u as M } from "./index-DLcqcWxM.js";
|
|
4
4
|
import { u as de } from "./index-BdMNhZnh.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { c as me } from "./index-
|
|
5
|
+
import { u as ue } from "./index-BZPx6jYI.js";
|
|
6
|
+
import { u as fe } from "./index-ohdbKsws.js";
|
|
7
|
+
import { c as me } from "./index-CigKKiZS.js";
|
|
8
8
|
import { jsx as g, jsxs as Se } from "react/jsx-runtime";
|
|
9
9
|
function $(e, [t, n]) {
|
|
10
10
|
return Math.min(n, Math.max(t, e));
|
|
@@ -305,7 +305,7 @@ var O = "SliderThumb", oe = l.forwardRef(
|
|
|
305
305
|
}
|
|
306
306
|
), be = l.forwardRef(
|
|
307
307
|
(e, t) => {
|
|
308
|
-
const { __scopeSlider: n, index: o, name: s, ...c } = e, r = V(O, n), a = Q(O, n), [u, w] = l.useState(null), p = M(t, (D) => w(D)), i = u ? r.form || !!u.closest("form") : !0, d =
|
|
308
|
+
const { __scopeSlider: n, index: o, name: s, ...c } = e, r = V(O, n), a = Q(O, n), [u, w] = l.useState(null), p = M(t, (D) => w(D)), i = u ? r.form || !!u.closest("form") : !0, d = fe(u), v = r.values[o], y = v === void 0 ? 0 : ie(v, r.min, r.max), h = Pe(o, r.values.length), m = d?.[a.size], f = m ? De(m, y, a.direction) : 0;
|
|
309
309
|
return l.useEffect(() => {
|
|
310
310
|
if (u)
|
|
311
311
|
return r.thumbs.add(u), () => {
|
|
@@ -357,7 +357,7 @@ var O = "SliderThumb", oe = l.forwardRef(
|
|
|
357
357
|
oe.displayName = O;
|
|
358
358
|
var Re = "RadioBubbleInput", re = l.forwardRef(
|
|
359
359
|
({ __scopeSlider: e, value: t, ...n }, o) => {
|
|
360
|
-
const s = l.useRef(null), c = M(s, o), r =
|
|
360
|
+
const s = l.useRef(null), c = M(s, o), r = ue(t);
|
|
361
361
|
return l.useEffect(() => {
|
|
362
362
|
const a = s.current;
|
|
363
363
|
if (!a) return;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import { c as f } from "./index-BtQfgaSF.js";
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
var v = [
|
|
5
|
+
"a",
|
|
6
|
+
"button",
|
|
7
|
+
"div",
|
|
8
|
+
"form",
|
|
9
|
+
"h2",
|
|
10
|
+
"h3",
|
|
11
|
+
"img",
|
|
12
|
+
"input",
|
|
13
|
+
"label",
|
|
14
|
+
"li",
|
|
15
|
+
"nav",
|
|
16
|
+
"ol",
|
|
17
|
+
"p",
|
|
18
|
+
"select",
|
|
19
|
+
"span",
|
|
20
|
+
"svg",
|
|
21
|
+
"ul"
|
|
22
|
+
], c = v.reduce((i, r) => {
|
|
23
|
+
const l = f(`Primitive.${r}`), e = t.forwardRef((s, d) => {
|
|
24
|
+
const { asChild: n, ...m } = s, p = n ? l : r;
|
|
25
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ a(p, { ...m, ref: d });
|
|
26
|
+
});
|
|
27
|
+
return e.displayName = `Primitive.${r}`, { ...i, [r]: e };
|
|
28
|
+
}, {}), u = Object.freeze({
|
|
29
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
30
|
+
position: "absolute",
|
|
31
|
+
border: 0,
|
|
32
|
+
width: 1,
|
|
33
|
+
height: 1,
|
|
34
|
+
padding: 0,
|
|
35
|
+
margin: -1,
|
|
36
|
+
overflow: "hidden",
|
|
37
|
+
clip: "rect(0, 0, 0, 0)",
|
|
38
|
+
whiteSpace: "nowrap",
|
|
39
|
+
wordWrap: "normal"
|
|
40
|
+
}), w = "VisuallyHidden", o = t.forwardRef(
|
|
41
|
+
(i, r) => /* @__PURE__ */ a(
|
|
42
|
+
c.span,
|
|
43
|
+
{
|
|
44
|
+
...i,
|
|
45
|
+
ref: r,
|
|
46
|
+
style: { ...u, ...i.style }
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
o.displayName = w;
|
|
51
|
+
var S = o;
|
|
52
|
+
export {
|
|
53
|
+
S as R,
|
|
54
|
+
o as V
|
|
55
|
+
};
|