@konstructio/ui 0.1.2-alpha.21 → 0.1.2-alpha.22
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/{Modal-B8jrP02v.js → Modal-Dpk-1N9W.js} +2 -2
- package/dist/chevron-down-DgT-uSF9.js +5 -0
- package/dist/chevron-right-DYvXLeql.js +7 -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 +2 -8
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +6 -7
- 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 +1 -1
- package/dist/components/Dropdown/components/List/List.js +1 -1
- package/dist/components/Dropdown/components/Wrapper.js +1 -13
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- 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/Loading/Loading.js +1 -7
- package/dist/components/Modal/Modal.js +1 -1
- 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 +3 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PieChart/PieChart.js +0 -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 +10 -11
- package/dist/components/Tabs/Tabs.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/TagSelect/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Toast/Toast.js +233 -210
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +64 -67
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +2 -2
- package/dist/components/VirtualizedTable/components/Body/Body.js +36 -22
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +40 -38
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +23 -16
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +52 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +263 -236
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
- package/dist/components/VirtualizedTable/components/index.js +8 -6
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +43 -42
- package/dist/components/index.js +1 -1
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-DGhJ8Z4k.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/{ellipsis-vertical-DpnVYRxI.js → ellipsis-vertical-BVPtjl5f.js} +1 -7
- package/dist/{index-N2OStZoU.js → index--V_ZsiQe.js} +0 -21
- package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
- package/dist/index-BtQfgaSF.js +60 -0
- package/dist/index-CIAmiWcw.js +200 -0
- package/dist/index-CSFe9uC5.js +14 -0
- package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
- package/dist/index-CigKKiZS.js +91 -0
- package/dist/index-DDByhzds.js +137 -0
- package/dist/{index-DQJhMz8c.js → index-DH2Fnov1.js} +11 -12
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/{index-CffpTFMi.js → index-Dbt2vBmS.js} +5 -6
- package/dist/{index-l3NwplN0.js → index-DpW9ExsS.js} +10 -11
- package/dist/index-DrWQH0QF.js +55 -0
- package/dist/{index-0XtjXVpJ.js → index-X4k_cU8k.js} +4 -4
- package/dist/index-kyuBfLcN.js +479 -0
- package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
- package/dist/{index-BAEWsOG1.js → index-ohdbKsws.js} +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -1
- package/dist/package.json +17 -17
- package/dist/styles.css +1 -1
- package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
- package/dist/{x-4F_5p77m.js → x-DPU9OdYH.js} +1 -1
- package/package.json +17 -17
- package/dist/chevron-down-J5nS1Tu0.js +0 -11
- package/dist/chevron-right-DeMVrnIg.js +0 -19
- package/dist/components/Skeleton/Skeleton.js +0 -42
- package/dist/index-BVRIAMfe.js +0 -36
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-Bn4c-gww.js +0 -131
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-DdXGVVBv.js +0 -15
- package/dist/index-amYX3uxF.js +0 -436
- package/dist/index-sp5ZfG6g.js +0 -31
package/dist/index-BfXxHr_2.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import * as c from "react";
|
|
2
|
-
import { jsx as x } from "react/jsx-runtime";
|
|
3
|
-
function R(e, s) {
|
|
4
|
-
const t = c.createContext(s), i = (u) => {
|
|
5
|
-
const { children: r, ...o } = u, l = c.useMemo(() => o, Object.values(o));
|
|
6
|
-
return /* @__PURE__ */ x(t.Provider, { value: l, children: r });
|
|
7
|
-
};
|
|
8
|
-
i.displayName = e + "Provider";
|
|
9
|
-
function n(u) {
|
|
10
|
-
const r = c.useContext(t);
|
|
11
|
-
if (r) return r;
|
|
12
|
-
if (s !== void 0) return s;
|
|
13
|
-
throw new Error(`\`${u}\` must be used within \`${e}\``);
|
|
14
|
-
}
|
|
15
|
-
return [i, n];
|
|
16
|
-
}
|
|
17
|
-
function g(e, s = []) {
|
|
18
|
-
let t = [];
|
|
19
|
-
function i(u, r) {
|
|
20
|
-
const o = c.createContext(r), l = t.length;
|
|
21
|
-
t = [...t, r];
|
|
22
|
-
const d = (f) => {
|
|
23
|
-
const { scope: m, children: p, ...v } = f, C = m?.[e]?.[l] || o, h = c.useMemo(() => v, Object.values(v));
|
|
24
|
-
return /* @__PURE__ */ x(C.Provider, { value: h, children: p });
|
|
25
|
-
};
|
|
26
|
-
d.displayName = u + "Provider";
|
|
27
|
-
function a(f, m) {
|
|
28
|
-
const p = m?.[e]?.[l] || o, v = c.useContext(p);
|
|
29
|
-
if (v) return v;
|
|
30
|
-
if (r !== void 0) return r;
|
|
31
|
-
throw new Error(`\`${f}\` must be used within \`${u}\``);
|
|
32
|
-
}
|
|
33
|
-
return [d, a];
|
|
34
|
-
}
|
|
35
|
-
const n = () => {
|
|
36
|
-
const u = t.map((r) => c.createContext(r));
|
|
37
|
-
return function(o) {
|
|
38
|
-
const l = o?.[e] || u;
|
|
39
|
-
return c.useMemo(
|
|
40
|
-
() => ({ [`__scope${e}`]: { ...o, [e]: l } }),
|
|
41
|
-
[o, l]
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
return n.scopeName = e, [i, S(n, ...s)];
|
|
46
|
-
}
|
|
47
|
-
function S(...e) {
|
|
48
|
-
const s = e[0];
|
|
49
|
-
if (e.length === 1) return s;
|
|
50
|
-
const t = () => {
|
|
51
|
-
const i = e.map((n) => ({
|
|
52
|
-
useScope: n(),
|
|
53
|
-
scopeName: n.scopeName
|
|
54
|
-
}));
|
|
55
|
-
return function(u) {
|
|
56
|
-
const r = i.reduce((o, { useScope: l, scopeName: d }) => {
|
|
57
|
-
const f = l(u)[`__scope${d}`];
|
|
58
|
-
return { ...o, ...f };
|
|
59
|
-
}, {});
|
|
60
|
-
return c.useMemo(() => ({ [`__scope${s.scopeName}`]: r }), [r]);
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
return t.scopeName = s.scopeName, t;
|
|
64
|
-
}
|
|
65
|
-
function _(e, s, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
66
|
-
return function(n) {
|
|
67
|
-
if (e?.(n), t === !1 || !n.defaultPrevented)
|
|
68
|
-
return s?.(n);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
var P = globalThis?.document ? c.useLayoutEffect : () => {
|
|
72
|
-
}, b = c[" useInsertionEffect ".trim().toString()] || P;
|
|
73
|
-
function y({
|
|
74
|
-
prop: e,
|
|
75
|
-
defaultProp: s,
|
|
76
|
-
onChange: t = () => {
|
|
77
|
-
},
|
|
78
|
-
caller: i
|
|
79
|
-
}) {
|
|
80
|
-
const [n, u, r] = w({
|
|
81
|
-
defaultProp: s,
|
|
82
|
-
onChange: t
|
|
83
|
-
}), o = e !== void 0, l = o ? e : n;
|
|
84
|
-
{
|
|
85
|
-
const a = c.useRef(e !== void 0);
|
|
86
|
-
c.useEffect(() => {
|
|
87
|
-
const f = a.current;
|
|
88
|
-
f !== o && console.warn(
|
|
89
|
-
`${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${o ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
90
|
-
), a.current = o;
|
|
91
|
-
}, [o, i]);
|
|
92
|
-
}
|
|
93
|
-
const d = c.useCallback(
|
|
94
|
-
(a) => {
|
|
95
|
-
if (o) {
|
|
96
|
-
const f = E(a) ? a(e) : a;
|
|
97
|
-
f !== e && r.current?.(f);
|
|
98
|
-
} else
|
|
99
|
-
u(a);
|
|
100
|
-
},
|
|
101
|
-
[o, e, u, r]
|
|
102
|
-
);
|
|
103
|
-
return [l, d];
|
|
104
|
-
}
|
|
105
|
-
function w({
|
|
106
|
-
defaultProp: e,
|
|
107
|
-
onChange: s
|
|
108
|
-
}) {
|
|
109
|
-
const [t, i] = c.useState(e), n = c.useRef(t), u = c.useRef(s);
|
|
110
|
-
return b(() => {
|
|
111
|
-
u.current = s;
|
|
112
|
-
}, [s]), c.useEffect(() => {
|
|
113
|
-
n.current !== t && (u.current?.(t), n.current = t);
|
|
114
|
-
}, [t, n]), [t, i, u];
|
|
115
|
-
}
|
|
116
|
-
function E(e) {
|
|
117
|
-
return typeof e == "function";
|
|
118
|
-
}
|
|
119
|
-
export {
|
|
120
|
-
y as a,
|
|
121
|
-
_ as b,
|
|
122
|
-
g as c,
|
|
123
|
-
R as d,
|
|
124
|
-
P as u
|
|
125
|
-
};
|
package/dist/index-Bn4c-gww.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as O } from "react/jsx-runtime";
|
|
2
|
-
import * as l from "react";
|
|
3
|
-
import { c as w, b as M } from "./index-BfXxHr_2.js";
|
|
4
|
-
import { u, b as x } from "./index-DQH6odE9.js";
|
|
5
|
-
import { c as A, R as I, P as $, O as L, W as F, C as G, T as W, d as j, b as v, e as B } from "./index-amYX3uxF.js";
|
|
6
|
-
import { Button as Y } from "./components/Button/Button.js";
|
|
7
|
-
import { cn as k } from "./utils/index.js";
|
|
8
|
-
var D = "AlertDialog", [q, le] = w(D, [
|
|
9
|
-
A
|
|
10
|
-
]), s = A(), f = (e) => {
|
|
11
|
-
const { __scopeAlertDialog: o, ...r } = e, a = s(o);
|
|
12
|
-
return /* @__PURE__ */ i(I, { ...a, ...r, modal: !0 });
|
|
13
|
-
};
|
|
14
|
-
f.displayName = D;
|
|
15
|
-
var H = "AlertDialogTrigger", m = l.forwardRef(
|
|
16
|
-
(e, o) => {
|
|
17
|
-
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
18
|
-
return /* @__PURE__ */ i(B, { ...t, ...a, ref: o });
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
m.displayName = H;
|
|
22
|
-
var V = "AlertDialogPortal", y = (e) => {
|
|
23
|
-
const { __scopeAlertDialog: o, ...r } = e, a = s(o);
|
|
24
|
-
return /* @__PURE__ */ i($, { ...a, ...r });
|
|
25
|
-
};
|
|
26
|
-
y.displayName = V;
|
|
27
|
-
var z = "AlertDialogOverlay", _ = l.forwardRef(
|
|
28
|
-
(e, o) => {
|
|
29
|
-
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
30
|
-
return /* @__PURE__ */ i(L, { ...t, ...a, ref: o });
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
_.displayName = z;
|
|
34
|
-
var n = "AlertDialogContent", [J, K] = q(n), Q = x("AlertDialogContent"), N = l.forwardRef(
|
|
35
|
-
(e, o) => {
|
|
36
|
-
const { __scopeAlertDialog: r, children: a, ...t } = e, d = s(r), p = l.useRef(null), b = u(o, p), g = l.useRef(null);
|
|
37
|
-
return /* @__PURE__ */ i(
|
|
38
|
-
F,
|
|
39
|
-
{
|
|
40
|
-
contentName: n,
|
|
41
|
-
titleName: h,
|
|
42
|
-
docsSlug: "alert-dialog",
|
|
43
|
-
children: /* @__PURE__ */ i(J, { scope: r, cancelRef: g, children: /* @__PURE__ */ O(
|
|
44
|
-
G,
|
|
45
|
-
{
|
|
46
|
-
role: "alertdialog",
|
|
47
|
-
...d,
|
|
48
|
-
...t,
|
|
49
|
-
ref: b,
|
|
50
|
-
onOpenAutoFocus: M(t.onOpenAutoFocus, (c) => {
|
|
51
|
-
c.preventDefault(), g.current?.focus({ preventScroll: !0 });
|
|
52
|
-
}),
|
|
53
|
-
onPointerDownOutside: (c) => c.preventDefault(),
|
|
54
|
-
onInteractOutside: (c) => c.preventDefault(),
|
|
55
|
-
children: [
|
|
56
|
-
/* @__PURE__ */ i(Q, { children: a }),
|
|
57
|
-
/* @__PURE__ */ i(X, { contentRef: p })
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
) })
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
N.displayName = n;
|
|
66
|
-
var h = "AlertDialogTitle", C = l.forwardRef(
|
|
67
|
-
(e, o) => {
|
|
68
|
-
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
69
|
-
return /* @__PURE__ */ i(W, { ...t, ...a, ref: o });
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
C.displayName = h;
|
|
73
|
-
var R = "AlertDialogDescription", E = l.forwardRef((e, o) => {
|
|
74
|
-
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
75
|
-
return /* @__PURE__ */ i(j, { ...t, ...a, ref: o });
|
|
76
|
-
});
|
|
77
|
-
E.displayName = R;
|
|
78
|
-
var U = "AlertDialogAction", P = l.forwardRef(
|
|
79
|
-
(e, o) => {
|
|
80
|
-
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
81
|
-
return /* @__PURE__ */ i(v, { ...t, ...a, ref: o });
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
P.displayName = U;
|
|
85
|
-
var S = "AlertDialogCancel", T = l.forwardRef(
|
|
86
|
-
(e, o) => {
|
|
87
|
-
const { __scopeAlertDialog: r, ...a } = e, { cancelRef: t } = K(S, r), d = s(r), p = u(o, t);
|
|
88
|
-
return /* @__PURE__ */ i(v, { ...d, ...a, ref: p });
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
T.displayName = S;
|
|
92
|
-
var X = ({ contentRef: e }) => {
|
|
93
|
-
const o = `\`${n}\` requires a description for the component to be accessible for screen reader users.
|
|
94
|
-
|
|
95
|
-
You can add a description to the \`${n}\` by passing a \`${R}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
96
|
-
|
|
97
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${n}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
98
|
-
|
|
99
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
100
|
-
return l.useEffect(() => {
|
|
101
|
-
document.getElementById(
|
|
102
|
-
e.current?.getAttribute("aria-describedby")
|
|
103
|
-
) || console.warn(o);
|
|
104
|
-
}, [o, e]), null;
|
|
105
|
-
}, se = f, Z = m, ne = y, ce = _, pe = N, de = P, ge = T, ue = C, Ae = E;
|
|
106
|
-
const ve = ({
|
|
107
|
-
"data-theme": e,
|
|
108
|
-
className: o,
|
|
109
|
-
text: r,
|
|
110
|
-
onOpen: a
|
|
111
|
-
}) => /* @__PURE__ */ i(Z, { asChild: !0, children: /* @__PURE__ */ i(
|
|
112
|
-
Y,
|
|
113
|
-
{
|
|
114
|
-
type: "button",
|
|
115
|
-
"data-theme": e,
|
|
116
|
-
className: k(o),
|
|
117
|
-
onClick: a,
|
|
118
|
-
children: r
|
|
119
|
-
}
|
|
120
|
-
) });
|
|
121
|
-
export {
|
|
122
|
-
ve as A,
|
|
123
|
-
pe as C,
|
|
124
|
-
Ae as D,
|
|
125
|
-
ce as O,
|
|
126
|
-
ne as P,
|
|
127
|
-
se as R,
|
|
128
|
-
ue as T,
|
|
129
|
-
ge as a,
|
|
130
|
-
de as b
|
|
131
|
-
};
|
package/dist/index-Cvx4lqTq.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
import { c as y } from "./index-BfXxHr_2.js";
|
|
3
|
-
import { u as M, c as x } from "./index-DQH6odE9.js";
|
|
4
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
5
|
-
function D(s) {
|
|
6
|
-
const f = s + "CollectionProvider", [A, N] = y(f), [_, m] = A(
|
|
7
|
-
f,
|
|
8
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
9
|
-
), p = (c) => {
|
|
10
|
-
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
|
11
|
-
return /* @__PURE__ */ d(_, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
12
|
-
};
|
|
13
|
-
p.displayName = f;
|
|
14
|
-
const a = s + "CollectionSlot", E = x(a), C = r.forwardRef(
|
|
15
|
-
(c, e) => {
|
|
16
|
-
const { scope: l, children: o } = c, t = m(a, l), n = M(e, t.collectionRef);
|
|
17
|
-
return /* @__PURE__ */ d(E, { ref: n, children: o });
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
C.displayName = a;
|
|
21
|
-
const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(u), I = r.forwardRef(
|
|
22
|
-
(c, e) => {
|
|
23
|
-
const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = m(u, l);
|
|
24
|
-
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d(T, { [R]: "", ref: S, children: o });
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
I.displayName = u;
|
|
28
|
-
function O(c) {
|
|
29
|
-
const e = m(s + "CollectionConsumer", c);
|
|
30
|
-
return r.useCallback(() => {
|
|
31
|
-
const o = e.collectionRef.current;
|
|
32
|
-
if (!o) return [];
|
|
33
|
-
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
34
|
-
return Array.from(e.itemMap.values()).sort(
|
|
35
|
-
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
|
36
|
-
);
|
|
37
|
-
}, [e.collectionRef, e.itemMap]);
|
|
38
|
-
}
|
|
39
|
-
return [
|
|
40
|
-
{ Provider: p, Slot: C, ItemSlot: I },
|
|
41
|
-
O,
|
|
42
|
-
N
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
D as c
|
|
47
|
-
};
|
package/dist/index-DQH6odE9.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { jsx as f, Fragment as g } from "react/jsx-runtime";
|
|
3
|
-
function d(e, n) {
|
|
4
|
-
if (typeof e == "function")
|
|
5
|
-
return e(n);
|
|
6
|
-
e != null && (e.current = n);
|
|
7
|
-
}
|
|
8
|
-
function m(...e) {
|
|
9
|
-
return (n) => {
|
|
10
|
-
let r = !1;
|
|
11
|
-
const o = e.map((t) => {
|
|
12
|
-
const l = d(t, n);
|
|
13
|
-
return !r && typeof l == "function" && (r = !0), l;
|
|
14
|
-
});
|
|
15
|
-
if (r)
|
|
16
|
-
return () => {
|
|
17
|
-
for (let t = 0; t < o.length; t++) {
|
|
18
|
-
const l = o[t];
|
|
19
|
-
typeof l == "function" ? l() : d(e[t], null);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function x(...e) {
|
|
25
|
-
return i.useCallback(m(...e), e);
|
|
26
|
-
}
|
|
27
|
-
// @__NO_SIDE_EFFECTS__
|
|
28
|
-
function C(e) {
|
|
29
|
-
const n = /* @__PURE__ */ b(e), r = i.forwardRef((o, t) => {
|
|
30
|
-
const { children: l, ...a } = o, s = i.Children.toArray(l), c = s.find(E);
|
|
31
|
-
if (c) {
|
|
32
|
-
const u = c.props.children, S = s.map((p) => p === c ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : p);
|
|
33
|
-
return /* @__PURE__ */ f(n, { ...a, ref: t, children: i.isValidElement(u) ? i.cloneElement(u, void 0, S) : null });
|
|
34
|
-
}
|
|
35
|
-
return /* @__PURE__ */ f(n, { ...a, ref: t, children: l });
|
|
36
|
-
});
|
|
37
|
-
return r.displayName = `${e}.Slot`, r;
|
|
38
|
-
}
|
|
39
|
-
var I = /* @__PURE__ */ C("Slot");
|
|
40
|
-
// @__NO_SIDE_EFFECTS__
|
|
41
|
-
function b(e) {
|
|
42
|
-
const n = i.forwardRef((r, o) => {
|
|
43
|
-
const { children: t, ...l } = r;
|
|
44
|
-
if (i.isValidElement(t)) {
|
|
45
|
-
const a = h(t), s = R(l, t.props);
|
|
46
|
-
return t.type !== i.Fragment && (s.ref = o ? m(o, a) : a), i.cloneElement(t, s);
|
|
47
|
-
}
|
|
48
|
-
return i.Children.count(t) > 1 ? i.Children.only(null) : null;
|
|
49
|
-
});
|
|
50
|
-
return n.displayName = `${e}.SlotClone`, n;
|
|
51
|
-
}
|
|
52
|
-
var y = Symbol("radix.slottable");
|
|
53
|
-
// @__NO_SIDE_EFFECTS__
|
|
54
|
-
function V(e) {
|
|
55
|
-
const n = ({ children: r }) => /* @__PURE__ */ f(g, { children: r });
|
|
56
|
-
return n.displayName = `${e}.Slottable`, n.__radixId = y, n;
|
|
57
|
-
}
|
|
58
|
-
function E(e) {
|
|
59
|
-
return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === y;
|
|
60
|
-
}
|
|
61
|
-
function R(e, n) {
|
|
62
|
-
const r = { ...n };
|
|
63
|
-
for (const o in n) {
|
|
64
|
-
const t = e[o], l = n[o];
|
|
65
|
-
/^on[A-Z]/.test(o) ? t && l ? r[o] = (...s) => {
|
|
66
|
-
const c = l(...s);
|
|
67
|
-
return t(...s), c;
|
|
68
|
-
} : t && (r[o] = t) : o === "style" ? r[o] = { ...t, ...l } : o === "className" && (r[o] = [t, l].filter(Boolean).join(" "));
|
|
69
|
-
}
|
|
70
|
-
return { ...e, ...r };
|
|
71
|
-
}
|
|
72
|
-
function h(e) {
|
|
73
|
-
let n = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning;
|
|
74
|
-
return r ? e.ref : (n = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
75
|
-
}
|
|
76
|
-
export {
|
|
77
|
-
I as S,
|
|
78
|
-
m as a,
|
|
79
|
-
V as b,
|
|
80
|
-
C as c,
|
|
81
|
-
x as u
|
|
82
|
-
};
|
package/dist/index-DdXGVVBv.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import n from "react-dom";
|
|
3
|
-
import { P as f } from "./index-BVRIAMfe.js";
|
|
4
|
-
import { u as c } from "./index-BfXxHr_2.js";
|
|
5
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
6
|
-
var u = "Portal", p = o.forwardRef((r, a) => {
|
|
7
|
-
const { container: e, ...s } = r, [i, m] = o.useState(!1);
|
|
8
|
-
c(() => m(!0), []);
|
|
9
|
-
const t = e || i && globalThis?.document?.body;
|
|
10
|
-
return t ? n.createPortal(/* @__PURE__ */ l(f.div, { ...s, ref: a }), t) : null;
|
|
11
|
-
});
|
|
12
|
-
p.displayName = u;
|
|
13
|
-
export {
|
|
14
|
-
p as P
|
|
15
|
-
};
|