@drjoshcsimmons/scl 0.1.0 → 0.1.2
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/components/ui/alert/alert.d.ts +1 -1
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/badge/badge.d.ts +1 -1
- package/dist/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts +31 -0
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox/index.d.ts +3 -0
- package/dist/components/ui/combobox/index.d.ts.map +1 -0
- package/dist/components/ui/command/command.d.ts +85 -0
- package/dist/components/ui/command/command.d.ts.map +1 -0
- package/dist/components/ui/command/index.d.ts +2 -0
- package/dist/components/ui/command/index.d.ts.map +1 -0
- package/dist/components/ui/dithered-image/dithered-image.d.ts +6 -2
- package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -1
- package/dist/components/ui/dithered-image/index.d.ts +1 -1
- package/dist/components/ui/dithered-image/index.d.ts.map +1 -1
- package/dist/components/ui/form/form.d.ts +24 -0
- package/dist/components/ui/form/form.d.ts.map +1 -0
- package/dist/components/ui/form/index.d.ts +2 -0
- package/dist/components/ui/form/index.d.ts.map +1 -0
- package/dist/components/ui/progress/progress.d.ts +0 -6
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/skeleton/skeleton.d.ts +4 -1
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/ui/statusline/statusline.d.ts.map +1 -1
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +0 -5
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +166 -143
- package/dist/index10.js +30 -30
- package/dist/index100.js +218 -29
- package/dist/index101.js +646 -11
- package/dist/index102.js +173 -127
- package/dist/index103.js +4 -50
- package/dist/index104.js +30 -9
- package/dist/index105.js +6 -4
- package/dist/index106.js +11 -180
- package/dist/index107.js +19 -648
- package/dist/index108.js +9 -107
- package/dist/index109.js +38 -91
- package/dist/index11.js +13 -13
- package/dist/index110.js +18 -67
- package/dist/index111.js +201 -154
- package/dist/index112.js +20 -395
- package/dist/index113.js +395 -1675
- package/dist/index114.js +2 -278
- package/dist/index115.js +49 -128
- package/dist/index116.js +65 -32
- package/dist/index117.js +19 -1605
- package/dist/index118.js +28 -297
- package/dist/index119.js +5 -635
- package/dist/index12.js +1 -1
- package/dist/index120.js +2 -144
- package/dist/index121.js +2 -21
- package/dist/index122.js +5 -9
- package/dist/index123.js +3 -38
- package/dist/index124.js +24 -18
- package/dist/index125.js +113 -6
- package/dist/index126.js +15 -11
- package/dist/index127.js +513 -194
- package/dist/index128.js +128 -22
- package/dist/index129.js +114 -380
- package/dist/index13.js +132 -93
- package/dist/index130.js +59 -1300
- package/dist/index131.js +63 -612
- package/dist/index132.js +9 -2
- package/dist/index133.js +13 -52
- package/dist/index134.js +64 -63
- package/dist/index135.js +3 -24
- package/dist/index136.js +23 -29
- package/dist/index137.js +23 -5
- package/dist/index138.js +13 -2
- package/dist/index139.js +28 -2
- package/dist/index14.js +106 -220
- package/dist/index140.js +5 -5
- package/dist/index15.js +79 -125
- package/dist/index16.js +280 -17
- package/dist/index17.js +139 -12
- package/dist/index18.js +92 -22
- package/dist/index19.js +18 -55
- package/dist/index2.js +2 -2
- package/dist/index20.js +14 -26
- package/dist/index21.js +19 -33
- package/dist/index22.js +38 -121
- package/dist/index23.js +29 -22
- package/dist/index24.js +31 -64
- package/dist/index25.js +121 -15
- package/dist/index26.js +19 -29
- package/dist/index27.js +68 -77
- package/dist/index28.js +20 -25
- package/dist/index29.js +32 -88
- package/dist/index3.js +11 -9
- package/dist/index30.js +138 -38
- package/dist/index31.js +20 -227
- package/dist/index32.js +88 -18
- package/dist/index33.js +37 -28
- package/dist/index34.js +86 -22
- package/dist/index35.js +17 -102
- package/dist/index36.js +34 -65
- package/dist/index37.js +23 -49
- package/dist/index38.js +38 -99
- package/dist/index39.js +65 -10
- package/dist/index4.js +6 -6
- package/dist/index40.js +49 -15
- package/dist/index41.js +93 -2256
- package/dist/index42.js +10 -32
- package/dist/index43.js +15 -18
- package/dist/index44.js +2251 -225
- package/dist/index45.js +237 -11
- package/dist/index46.js +11 -73
- package/dist/index47.js +33 -249
- package/dist/index48.js +118 -9
- package/dist/index49.js +63 -326
- package/dist/index5.js +23 -23
- package/dist/index50.js +307 -57
- package/dist/index51.js +12 -241
- package/dist/index52.js +222 -822
- package/dist/index53.js +6 -3
- package/dist/index54.js +56 -114
- package/dist/index55.js +248 -219
- package/dist/index56.js +249 -11
- package/dist/index57.js +3 -5
- package/dist/index58.js +110 -221
- package/dist/index59.js +12 -260
- package/dist/index6.js +12 -12
- package/dist/index60.js +18 -12
- package/dist/index61.js +221 -18
- package/dist/index62.js +11 -530
- package/dist/index63.js +11 -6155
- package/dist/index64.js +234 -2626
- package/dist/index65.js +230 -292
- package/dist/index66.js +504 -646
- package/dist/index67.js +155 -824
- package/dist/index68.js +128 -23
- package/dist/index69.js +319 -311
- package/dist/index7.js +22 -22
- package/dist/index70.js +72 -4889
- package/dist/index71.js +408 -802
- package/dist/index72.js +18 -1254
- package/dist/index73.js +844 -518
- package/dist/index74.js +9 -125
- package/dist/index75.js +31 -161
- package/dist/index76.js +7 -31
- package/dist/index77.js +62 -429
- package/dist/index78.js +50 -128
- package/dist/index79.js +4 -81
- package/dist/index8.js +17 -18
- package/dist/index80.js +23 -64
- package/dist/index81.js +33 -45
- package/dist/index82.js +63 -21
- package/dist/index83.js +10 -6
- package/dist/index84.js +52 -49
- package/dist/index85.js +10 -33
- package/dist/index86.js +30 -11
- package/dist/index87.js +12 -7
- package/dist/index88.js +46 -30
- package/dist/index89.js +7 -54
- package/dist/index9.js +23 -31
- package/dist/index90.js +14 -10
- package/dist/index91.js +125 -4
- package/dist/index92.js +131 -9
- package/dist/index93.js +14 -6
- package/dist/index94.js +14 -24
- package/dist/index95.js +9 -69
- package/dist/index96.js +47 -122
- package/dist/index97.js +51 -216
- package/dist/index98.js +6 -14
- package/dist/index99.js +24 -53
- package/dist/tokens/colors.d.ts +26 -86
- package/dist/tokens/colors.d.ts.map +1 -1
- package/dist/tokens/index.d.ts +12 -84
- package/dist/tokens/index.d.ts.map +1 -1
- package/package.json +28 -23
- package/dist/index141.js +0 -5
- package/dist/index142.js +0 -26
- package/dist/index143.js +0 -115
- package/dist/index144.js +0 -18
- package/dist/index145.js +0 -527
- package/dist/index146.js +0 -130
- package/dist/index147.js +0 -136
- package/dist/index148.js +0 -67
- package/dist/index149.js +0 -71
- package/dist/index150.js +0 -11
- package/dist/index151.js +0 -16
- package/dist/index152.js +0 -68
- package/dist/index153.js +0 -6
- package/dist/index154.js +0 -25
- package/dist/index155.js +0 -25
- package/dist/index156.js +0 -15
- package/dist/index157.js +0 -30
- package/dist/index158.js +0 -7
package/dist/index79.js
CHANGED
|
@@ -1,83 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
-
var u = "Progress", d = 100, [I] = $(u), [h, R] = I(u), f = m.forwardRef(
|
|
6
|
-
(r, e) => {
|
|
7
|
-
const {
|
|
8
|
-
__scopeProgress: i,
|
|
9
|
-
value: o = null,
|
|
10
|
-
max: a,
|
|
11
|
-
getValueLabel: P = E,
|
|
12
|
-
...N
|
|
13
|
-
} = r;
|
|
14
|
-
(a || a === 0) && !v(a) && console.error(M(`${a}`, "Progress"));
|
|
15
|
-
const t = v(a) ? a : d;
|
|
16
|
-
o !== null && !p(o, t) && console.error(V(`${o}`, "Progress"));
|
|
17
|
-
const n = p(o, t) ? o : null, b = s(n) ? P(n, t) : void 0;
|
|
18
|
-
return /* @__PURE__ */ l(h, { scope: i, value: n, max: t, children: /* @__PURE__ */ l(
|
|
19
|
-
c.div,
|
|
20
|
-
{
|
|
21
|
-
"aria-valuemax": t,
|
|
22
|
-
"aria-valuemin": 0,
|
|
23
|
-
"aria-valuenow": s(n) ? n : void 0,
|
|
24
|
-
"aria-valuetext": b,
|
|
25
|
-
role: "progressbar",
|
|
26
|
-
"data-state": x(n, t),
|
|
27
|
-
"data-value": n ?? void 0,
|
|
28
|
-
"data-max": t,
|
|
29
|
-
...N,
|
|
30
|
-
ref: e
|
|
31
|
-
}
|
|
32
|
-
) });
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
f.displayName = u;
|
|
36
|
-
var g = "ProgressIndicator", _ = m.forwardRef(
|
|
37
|
-
(r, e) => {
|
|
38
|
-
const { __scopeProgress: i, ...o } = r, a = R(g, i);
|
|
39
|
-
return /* @__PURE__ */ l(
|
|
40
|
-
c.div,
|
|
41
|
-
{
|
|
42
|
-
"data-state": x(a.value, a.max),
|
|
43
|
-
"data-value": a.value ?? void 0,
|
|
44
|
-
"data-max": a.max,
|
|
45
|
-
...o,
|
|
46
|
-
ref: e
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
_.displayName = g;
|
|
52
|
-
function E(r, e) {
|
|
53
|
-
return `${Math.round(r / e * 100)}%`;
|
|
54
|
-
}
|
|
55
|
-
function x(r, e) {
|
|
56
|
-
return r == null ? "indeterminate" : r === e ? "complete" : "loading";
|
|
57
|
-
}
|
|
58
|
-
function s(r) {
|
|
59
|
-
return typeof r == "number";
|
|
60
|
-
}
|
|
61
|
-
function v(r) {
|
|
62
|
-
return s(r) && !isNaN(r) && r > 0;
|
|
63
|
-
}
|
|
64
|
-
function p(r, e) {
|
|
65
|
-
return s(r) && !isNaN(r) && r <= e && r >= 0;
|
|
66
|
-
}
|
|
67
|
-
function M(r, e) {
|
|
68
|
-
return `Invalid prop \`max\` of value \`${r}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${d}\`.`;
|
|
69
|
-
}
|
|
70
|
-
function V(r, e) {
|
|
71
|
-
return `Invalid prop \`value\` of value \`${r}\` supplied to \`${e}\`. The \`value\` prop must be:
|
|
72
|
-
- a positive number
|
|
73
|
-
- less than the value passed to \`max\` (or ${d} if no \`max\` prop is set)
|
|
74
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
75
|
-
|
|
76
|
-
Defaulting to \`null\`.`;
|
|
77
|
-
}
|
|
78
|
-
var D = f;
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
var e = globalThis != null && globalThis.document ? t.useLayoutEffect : () => {
|
|
3
|
+
};
|
|
79
4
|
export {
|
|
80
|
-
|
|
81
|
-
_ as ProgressIndicator,
|
|
82
|
-
D as Root
|
|
5
|
+
e as useLayoutEffect
|
|
83
6
|
};
|
package/dist/index8.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cva as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
"inline-flex items-center border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cva as n } from "./index47.js";
|
|
3
|
+
import { cn as a } from "./index2.js";
|
|
4
|
+
const i = n(
|
|
5
|
+
"inline-flex items-center border-2 px-2.5 py-0.5 text-xs font-semibold uppercase tracking-wider transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
6
6
|
{
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
blue: "border-[#0000ff] bg-[#0000ff] text-white hover:bg-black hover:text-[#0000ff] hover:border-[#0000ff]"
|
|
9
|
+
// Filled variants (color bg, black text)
|
|
10
|
+
default: "border-primary bg-primary text-primary-foreground",
|
|
11
|
+
secondary: "border-secondary bg-secondary text-secondary-foreground",
|
|
12
|
+
destructive: "border-destructive bg-destructive text-destructive-foreground",
|
|
13
|
+
// Outline variants (transparent bg, color text/border)
|
|
14
|
+
outline: "border-primary bg-transparent text-primary",
|
|
15
|
+
"secondary-outline": "border-secondary bg-transparent text-secondary",
|
|
16
|
+
"destructive-outline": "border-destructive bg-transparent text-destructive"
|
|
18
17
|
}
|
|
19
18
|
},
|
|
20
19
|
defaultVariants: {
|
|
@@ -22,10 +21,10 @@ const a = o(
|
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
);
|
|
25
|
-
function
|
|
26
|
-
return /* @__PURE__ */
|
|
24
|
+
function u({ className: r, variant: e, ...t }) {
|
|
25
|
+
return /* @__PURE__ */ o("div", { className: a(i({ variant: e }), r), ...t });
|
|
27
26
|
}
|
|
28
27
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
u as Badge,
|
|
29
|
+
i as badgeVariants
|
|
31
30
|
};
|
package/dist/index80.js
CHANGED
|
@@ -1,70 +1,29 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return /* @__PURE__ */ h(o.Provider, { value: s, children: t });
|
|
7
|
-
};
|
|
8
|
-
a.displayName = e + "Provider";
|
|
9
|
-
function i(r) {
|
|
10
|
-
const t = u.useContext(o);
|
|
11
|
-
if (t) return t;
|
|
12
|
-
if (c !== void 0) return c;
|
|
13
|
-
throw new Error(`\`${r}\` must be used within \`${e}\``);
|
|
14
|
-
}
|
|
15
|
-
return [a, i];
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
function l(n, o) {
|
|
3
|
+
if (typeof n == "function")
|
|
4
|
+
return n(o);
|
|
5
|
+
n != null && (n.current = o);
|
|
16
6
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (m) return m;
|
|
32
|
-
if (t !== void 0) return t;
|
|
33
|
-
throw new Error(`\`${d}\` must be used within \`${r}\``);
|
|
34
|
-
}
|
|
35
|
-
return [p, f];
|
|
36
|
-
}
|
|
37
|
-
const i = () => {
|
|
38
|
-
const r = o.map((t) => u.createContext(t));
|
|
39
|
-
return function(n) {
|
|
40
|
-
const s = (n == null ? void 0 : n[e]) || r;
|
|
41
|
-
return u.useMemo(
|
|
42
|
-
() => ({ [`__scope${e}`]: { ...n, [e]: s } }),
|
|
43
|
-
[n, s]
|
|
44
|
-
);
|
|
45
|
-
};
|
|
7
|
+
function i(...n) {
|
|
8
|
+
return (o) => {
|
|
9
|
+
let u = !1;
|
|
10
|
+
const c = n.map((t) => {
|
|
11
|
+
const e = l(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() : l(n[t], null);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
46
21
|
};
|
|
47
|
-
return i.scopeName = e, [a, l(i, ...c)];
|
|
48
22
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
if (e.length === 1) return c;
|
|
52
|
-
const o = () => {
|
|
53
|
-
const a = e.map((i) => ({
|
|
54
|
-
useScope: i(),
|
|
55
|
-
scopeName: i.scopeName
|
|
56
|
-
}));
|
|
57
|
-
return function(r) {
|
|
58
|
-
const t = a.reduce((n, { useScope: s, scopeName: p }) => {
|
|
59
|
-
const d = s(r)[`__scope${p}`];
|
|
60
|
-
return { ...n, ...d };
|
|
61
|
-
}, {});
|
|
62
|
-
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
return o.scopeName = c.scopeName, o;
|
|
23
|
+
function s(...n) {
|
|
24
|
+
return f.useCallback(i(...n), n);
|
|
66
25
|
}
|
|
67
26
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
27
|
+
i as composeRefs,
|
|
28
|
+
s as useComposedRefs
|
|
70
29
|
};
|
package/dist/index81.js
CHANGED
|
@@ -1,48 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const o = e.collectionRef.current;
|
|
33
|
-
if (!o) return [];
|
|
34
|
-
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
35
|
-
return Array.from(e.itemMap.values()).sort(
|
|
36
|
-
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
|
37
|
-
);
|
|
38
|
-
}, [e.collectionRef, e.itemMap]);
|
|
39
|
-
}
|
|
40
|
-
return [
|
|
41
|
-
{ Provider: p, Slot: C, ItemSlot: I },
|
|
42
|
-
O,
|
|
43
|
-
N
|
|
44
|
-
];
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import * as p from "react-dom";
|
|
3
|
+
import { createSlot as c } from "./index97.js";
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
var u = [
|
|
6
|
+
"a",
|
|
7
|
+
"button",
|
|
8
|
+
"div",
|
|
9
|
+
"form",
|
|
10
|
+
"h2",
|
|
11
|
+
"h3",
|
|
12
|
+
"img",
|
|
13
|
+
"input",
|
|
14
|
+
"label",
|
|
15
|
+
"li",
|
|
16
|
+
"nav",
|
|
17
|
+
"ol",
|
|
18
|
+
"p",
|
|
19
|
+
"select",
|
|
20
|
+
"span",
|
|
21
|
+
"svg",
|
|
22
|
+
"ul"
|
|
23
|
+
], h = u.reduce((t, i) => {
|
|
24
|
+
const o = c(`Primitive.${i}`), r = f.forwardRef((e, m) => {
|
|
25
|
+
const { asChild: s, ...a } = e, n = s ? o : i;
|
|
26
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...a, ref: m });
|
|
27
|
+
});
|
|
28
|
+
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
29
|
+
}, {});
|
|
30
|
+
function w(t, i) {
|
|
31
|
+
t && p.flushSync(() => t.dispatchEvent(i));
|
|
45
32
|
}
|
|
46
33
|
export {
|
|
47
|
-
|
|
34
|
+
h as Primitive,
|
|
35
|
+
w as dispatchDiscreteCustomEvent
|
|
48
36
|
};
|
package/dist/index82.js
CHANGED
|
@@ -1,29 +1,71 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { useComposedRefs as E } from "./index80.js";
|
|
3
|
+
import { useLayoutEffect as A } from "./index79.js";
|
|
4
|
+
function T(n, e) {
|
|
5
|
+
return a.useReducer((r, t) => e[r][t] ?? r, n);
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
var R = (n) => {
|
|
8
|
+
const { present: e, children: r } = n, t = v(e), i = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), c = E(t.ref, P(i));
|
|
9
|
+
return typeof r == "function" || t.isPresent ? a.cloneElement(i, { ref: c }) : null;
|
|
10
|
+
};
|
|
11
|
+
R.displayName = "Presence";
|
|
12
|
+
function v(n) {
|
|
13
|
+
const [e, r] = a.useState(), t = a.useRef(null), i = a.useRef(n), c = a.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = T(p, {
|
|
14
|
+
mounted: {
|
|
15
|
+
UNMOUNT: "unmounted",
|
|
16
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
17
|
+
},
|
|
18
|
+
unmountSuspended: {
|
|
19
|
+
MOUNT: "mounted",
|
|
20
|
+
ANIMATION_END: "unmounted"
|
|
21
|
+
},
|
|
22
|
+
unmounted: {
|
|
23
|
+
MOUNT: "mounted"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return a.useEffect(() => {
|
|
27
|
+
const o = l(t.current);
|
|
28
|
+
c.current = N === "mounted" ? o : "none";
|
|
29
|
+
}, [N]), A(() => {
|
|
30
|
+
const o = t.current, m = i.current;
|
|
31
|
+
if (m !== n) {
|
|
32
|
+
const f = c.current, u = l(o);
|
|
33
|
+
n ? s("MOUNT") : u === "none" || (o == null ? void 0 : o.display) === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), i.current = n;
|
|
34
|
+
}
|
|
35
|
+
}, [n, s]), A(() => {
|
|
36
|
+
if (e) {
|
|
37
|
+
let o;
|
|
38
|
+
const m = e.ownerDocument.defaultView ?? window, d = (u) => {
|
|
39
|
+
const g = l(t.current).includes(CSS.escape(u.animationName));
|
|
40
|
+
if (u.target === e && g && (s("ANIMATION_END"), !i.current)) {
|
|
41
|
+
const O = e.style.animationFillMode;
|
|
42
|
+
e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
|
|
43
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
|
|
44
|
+
});
|
|
19
45
|
}
|
|
46
|
+
}, f = (u) => {
|
|
47
|
+
u.target === e && (c.current = l(t.current));
|
|
48
|
+
};
|
|
49
|
+
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
|
|
50
|
+
m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
|
|
20
51
|
};
|
|
52
|
+
} else
|
|
53
|
+
s("ANIMATION_END");
|
|
54
|
+
}, [e, s]), {
|
|
55
|
+
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
56
|
+
ref: a.useCallback((o) => {
|
|
57
|
+
t.current = o ? getComputedStyle(o) : null, r(o);
|
|
58
|
+
}, [])
|
|
21
59
|
};
|
|
22
60
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
61
|
+
function l(n) {
|
|
62
|
+
return (n == null ? void 0 : n.animationName) || "none";
|
|
63
|
+
}
|
|
64
|
+
function P(n) {
|
|
65
|
+
var t, i;
|
|
66
|
+
let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
|
|
67
|
+
return r ? n.ref : (e = (i = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : i.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
|
|
25
68
|
}
|
|
26
69
|
export {
|
|
27
|
-
|
|
28
|
-
s as useComposedRefs
|
|
70
|
+
R as Presence
|
|
29
71
|
};
|
package/dist/index83.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { useLayoutEffect as a } from "./index79.js";
|
|
3
|
+
var s = o[" useId ".trim().toString()] || (() => {
|
|
4
|
+
}), f = 0;
|
|
5
|
+
function i(t) {
|
|
6
|
+
const [e, r] = o.useState(s());
|
|
7
|
+
return a(() => {
|
|
8
|
+
r((u) => u ?? String(f++));
|
|
9
|
+
}, [t]), t || (e ? `radix-${e}` : "");
|
|
6
10
|
}
|
|
7
11
|
export {
|
|
8
|
-
|
|
12
|
+
i as useId
|
|
9
13
|
};
|
package/dist/index84.js
CHANGED
|
@@ -1,54 +1,57 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
+
function $(e, x = []) {
|
|
4
|
+
let o = [];
|
|
5
|
+
function f(r, n) {
|
|
6
|
+
const t = i.createContext(n);
|
|
7
|
+
t.displayName = r + "Context";
|
|
8
|
+
const c = o.length;
|
|
9
|
+
o = [...o, n];
|
|
10
|
+
const m = (a) => {
|
|
11
|
+
var l;
|
|
12
|
+
const { scope: s, children: C, ...p } = a, d = ((l = s == null ? void 0 : s[e]) == null ? void 0 : l[c]) || t, v = i.useMemo(() => p, Object.values(p));
|
|
13
|
+
return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
|
|
14
|
+
};
|
|
15
|
+
m.displayName = r + "Provider";
|
|
16
|
+
function S(a, s) {
|
|
17
|
+
var d;
|
|
18
|
+
const C = ((d = s == null ? void 0 : s[e]) == null ? void 0 : d[c]) || t, p = i.useContext(C);
|
|
19
|
+
if (p) return p;
|
|
20
|
+
if (n !== void 0) return n;
|
|
21
|
+
throw new Error(`\`${a}\` must be used within \`${r}\``);
|
|
22
|
+
}
|
|
23
|
+
return [m, S];
|
|
23
24
|
}
|
|
24
|
-
const
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
);
|
|
35
|
-
return [a, m];
|
|
25
|
+
const u = () => {
|
|
26
|
+
const r = o.map((n) => i.createContext(n));
|
|
27
|
+
return function(t) {
|
|
28
|
+
const c = (t == null ? void 0 : t[e]) || r;
|
|
29
|
+
return i.useMemo(
|
|
30
|
+
() => ({ [`__scope${e}`]: { ...t, [e]: c } }),
|
|
31
|
+
[t, c]
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
return u.scopeName = e, [f, h(u, ...x)];
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
function h(...e) {
|
|
38
|
+
const x = e[0];
|
|
39
|
+
if (e.length === 1) return x;
|
|
40
|
+
const o = () => {
|
|
41
|
+
const f = e.map((u) => ({
|
|
42
|
+
useScope: u(),
|
|
43
|
+
scopeName: u.scopeName
|
|
44
|
+
}));
|
|
45
|
+
return function(r) {
|
|
46
|
+
const n = f.reduce((t, { useScope: c, scopeName: m }) => {
|
|
47
|
+
const a = c(r)[`__scope${m}`];
|
|
48
|
+
return { ...t, ...a };
|
|
49
|
+
}, {});
|
|
50
|
+
return i.useMemo(() => ({ [`__scope${x.scopeName}`]: n }), [n]);
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
return o.scopeName = x.scopeName, o;
|
|
51
54
|
}
|
|
52
55
|
export {
|
|
53
|
-
|
|
56
|
+
$ as createContextScope
|
|
54
57
|
};
|
package/dist/index85.js
CHANGED
|
@@ -1,36 +1,13 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"h2",
|
|
11
|
-
"h3",
|
|
12
|
-
"img",
|
|
13
|
-
"input",
|
|
14
|
-
"label",
|
|
15
|
-
"li",
|
|
16
|
-
"nav",
|
|
17
|
-
"ol",
|
|
18
|
-
"p",
|
|
19
|
-
"select",
|
|
20
|
-
"span",
|
|
21
|
-
"svg",
|
|
22
|
-
"ul"
|
|
23
|
-
], h = u.reduce((t, i) => {
|
|
24
|
-
const o = c(`Primitive.${i}`), r = f.forwardRef((e, m) => {
|
|
25
|
-
const { asChild: s, ...a } = e, n = s ? o : i;
|
|
26
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...a, ref: m });
|
|
27
|
-
});
|
|
28
|
-
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
29
|
-
}, {});
|
|
30
|
-
function w(t, i) {
|
|
31
|
-
t && p.flushSync(() => t.dispatchEvent(i));
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
function o(t) {
|
|
3
|
+
const e = r.useRef(t);
|
|
4
|
+
return r.useEffect(() => {
|
|
5
|
+
e.current = t;
|
|
6
|
+
}), r.useMemo(() => (...n) => {
|
|
7
|
+
var u;
|
|
8
|
+
return (u = e.current) == null ? void 0 : u.call(e, ...n);
|
|
9
|
+
}, []);
|
|
32
10
|
}
|
|
33
11
|
export {
|
|
34
|
-
|
|
35
|
-
w as dispatchDiscreteCustomEvent
|
|
12
|
+
o as useCallbackRef
|
|
36
13
|
};
|
package/dist/index86.js
CHANGED
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import "react-dom";
|
|
3
|
+
import { createSlot as l } from "./index54.js";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
var u = [
|
|
6
|
+
"a",
|
|
7
|
+
"button",
|
|
8
|
+
"div",
|
|
9
|
+
"form",
|
|
10
|
+
"h2",
|
|
11
|
+
"h3",
|
|
12
|
+
"img",
|
|
13
|
+
"input",
|
|
14
|
+
"label",
|
|
15
|
+
"li",
|
|
16
|
+
"nav",
|
|
17
|
+
"ol",
|
|
18
|
+
"p",
|
|
19
|
+
"select",
|
|
20
|
+
"span",
|
|
21
|
+
"svg",
|
|
22
|
+
"ul"
|
|
23
|
+
], w = u.reduce((t, i) => {
|
|
24
|
+
const o = l(`Primitive.${i}`), r = f.forwardRef((e, m) => {
|
|
25
|
+
const { asChild: a, ...p } = e, s = a ? o : i;
|
|
26
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, { ...p, ref: m });
|
|
27
|
+
});
|
|
28
|
+
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
29
|
+
}, {});
|
|
11
30
|
export {
|
|
12
|
-
|
|
31
|
+
w as Primitive
|
|
13
32
|
};
|
package/dist/index87.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { s as r } from "./index105.js";
|
|
2
|
+
function s() {
|
|
3
|
+
return r.useSyncExternalStore(
|
|
4
|
+
e,
|
|
5
|
+
() => !0,
|
|
6
|
+
() => !1
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
function e() {
|
|
10
|
+
return () => {
|
|
11
|
+
};
|
|
7
12
|
}
|
|
8
13
|
export {
|
|
9
|
-
|
|
14
|
+
s as useIsHydrated
|
|
10
15
|
};
|