@drjoshcsimmons/scl 0.1.0 → 0.1.1
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 +9 -30
- package/dist/index101.js +50 -15
- package/dist/index102.js +212 -128
- package/dist/index103.js +4 -50
- package/dist/index104.js +30 -9
- package/dist/index105.js +6 -4
- package/dist/index106.js +19 -179
- package/dist/index107.js +9 -650
- package/dist/index108.js +38 -107
- package/dist/index109.js +17 -90
- package/dist/index11.js +13 -13
- package/dist/index110.js +11 -66
- 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 +2 -1611
- package/dist/index118.js +2 -298
- package/dist/index119.js +22 -632
- package/dist/index12.js +1 -1
- package/dist/index120.js +29 -144
- package/dist/index121.js +5 -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 +33 -11
- package/dist/index46.js +116 -64
- package/dist/index47.js +207 -219
- package/dist/index48.js +5 -3
- package/dist/index49.js +54 -330
- package/dist/index5.js +23 -23
- package/dist/index50.js +244 -55
- package/dist/index51.js +9 -241
- package/dist/index52.js +60 -847
- package/dist/index53.js +236 -9
- package/dist/index54.js +11 -118
- package/dist/index55.js +300 -215
- package/dist/index56.js +4 -3
- package/dist/index57.js +225 -11
- package/dist/index58.js +11 -236
- package/dist/index59.js +27 -256
- package/dist/index6.js +12 -12
- package/dist/index60.js +260 -12
- package/dist/index61.js +12 -22
- package/dist/index62.js +94 -506
- package/dist/index63.js +12 -6155
- package/dist/index64.js +20 -2631
- package/dist/index65.js +16 -296
- package/dist/index66.js +232 -663
- package/dist/index67.js +125 -825
- package/dist/index68.js +159 -23
- package/dist/index69.js +241 -315
- package/dist/index7.js +22 -22
- package/dist/index70.js +72 -4889
- package/dist/index71.js +503 -802
- package/dist/index72.js +412 -1235
- package/dist/index73.js +323 -521
- package/dist/index74.js +839 -104
- package/dist/index75.js +9 -161
- package/dist/index76.js +67 -30
- package/dist/index77.js +22 -430
- package/dist/index78.js +6 -129
- package/dist/index79.js +48 -75
- package/dist/index8.js +17 -18
- package/dist/index80.js +42 -64
- package/dist/index81.js +50 -44
- package/dist/index82.js +32 -25
- package/dist/index83.js +10 -6
- package/dist/index84.js +7 -51
- package/dist/index85.js +5 -33
- package/dist/index86.js +24 -10
- package/dist/index87.js +68 -7
- package/dist/index88.js +55 -30
- package/dist/index89.js +10 -54
- package/dist/index9.js +23 -31
- package/dist/index90.js +4 -11
- package/dist/index91.js +30 -4
- package/dist/index92.js +1 -1
- package/dist/index93.js +180 -5
- package/dist/index94.js +14 -24
- package/dist/index95.js +643 -62
- package/dist/index96.js +5 -5
- package/dist/index97.js +128 -212
- package/dist/index98.js +2 -2
- package/dist/index99.js +13 -52
- 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 +26 -22
- 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,56 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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)}%`;
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { composeRefs as y } from "./index77.js";
|
|
3
|
+
import { jsx as p, Fragment as S } from "react/jsx-runtime";
|
|
4
|
+
// @__NO_SIDE_EFFECTS__
|
|
5
|
+
function _(e) {
|
|
6
|
+
const r = /* @__PURE__ */ g(e), o = l.forwardRef((n, t) => {
|
|
7
|
+
const { children: i, ...a } = n, s = l.Children.toArray(i), c = s.find(E);
|
|
8
|
+
if (c) {
|
|
9
|
+
const f = c.props.children, m = s.map((u) => u === c ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : u);
|
|
10
|
+
return /* @__PURE__ */ p(r, { ...a, ref: t, children: l.isValidElement(f) ? l.cloneElement(f, void 0, m) : null });
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ p(r, { ...a, ref: t, children: i });
|
|
13
|
+
});
|
|
14
|
+
return o.displayName = `${e}.Slot`, o;
|
|
54
15
|
}
|
|
55
|
-
|
|
56
|
-
|
|
16
|
+
// @__NO_SIDE_EFFECTS__
|
|
17
|
+
function g(e) {
|
|
18
|
+
const r = l.forwardRef((o, n) => {
|
|
19
|
+
const { children: t, ...i } = o;
|
|
20
|
+
if (l.isValidElement(t)) {
|
|
21
|
+
const a = b(t), s = C(i, t.props);
|
|
22
|
+
return t.type !== l.Fragment && (s.ref = n ? y(n, a) : a), l.cloneElement(t, s);
|
|
23
|
+
}
|
|
24
|
+
return l.Children.count(t) > 1 ? l.Children.only(null) : null;
|
|
25
|
+
});
|
|
26
|
+
return r.displayName = `${e}.SlotClone`, r;
|
|
57
27
|
}
|
|
58
|
-
|
|
59
|
-
|
|
28
|
+
var d = Symbol("radix.slottable");
|
|
29
|
+
// @__NO_SIDE_EFFECTS__
|
|
30
|
+
function x(e) {
|
|
31
|
+
const r = ({ children: o }) => /* @__PURE__ */ p(S, { children: o });
|
|
32
|
+
return r.displayName = `${e}.Slottable`, r.__radixId = d, r;
|
|
60
33
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
34
|
+
function E(e) {
|
|
35
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
|
|
63
36
|
}
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
37
|
+
function C(e, r) {
|
|
38
|
+
const o = { ...r };
|
|
39
|
+
for (const n in r) {
|
|
40
|
+
const t = e[n], i = r[n];
|
|
41
|
+
/^on[A-Z]/.test(n) ? t && i ? o[n] = (...s) => {
|
|
42
|
+
const c = i(...s);
|
|
43
|
+
return t(...s), c;
|
|
44
|
+
} : t && (o[n] = t) : n === "style" ? o[n] = { ...t, ...i } : n === "className" && (o[n] = [t, i].filter(Boolean).join(" "));
|
|
45
|
+
}
|
|
46
|
+
return { ...e, ...o };
|
|
69
47
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
75
|
-
|
|
76
|
-
Defaulting to \`null\`.`;
|
|
48
|
+
function b(e) {
|
|
49
|
+
var n, t;
|
|
50
|
+
let r = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = r && "isReactWarning" in r && r.isReactWarning;
|
|
51
|
+
return o ? e.ref : (r = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, o = r && "isReactWarning" in r && r.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
77
52
|
}
|
|
78
|
-
var D = f;
|
|
79
53
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
D as Root
|
|
54
|
+
_ as createSlot,
|
|
55
|
+
x as createSlottable
|
|
83
56
|
};
|
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 "./index45.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,48 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import r from "react";
|
|
2
|
+
import { createContextScope as y } from "./index76.js";
|
|
3
|
+
import { useComposedRefs as M } from "./index77.js";
|
|
4
|
+
import { createSlot as x } from "./index79.js";
|
|
5
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
6
|
+
function g(s) {
|
|
7
|
+
const m = s + "CollectionProvider", [A, N] = y(m), [_, f] = A(
|
|
8
|
+
m,
|
|
9
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
10
|
+
), p = (c) => {
|
|
11
|
+
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
|
12
|
+
return /* @__PURE__ */ u(_, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
7
13
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
throw new Error(`\`${r}\` must be used within \`${e}\``);
|
|
14
|
-
}
|
|
15
|
-
return [a, i];
|
|
16
|
-
}
|
|
17
|
-
function _(e, c = []) {
|
|
18
|
-
let o = [];
|
|
19
|
-
function a(r, t) {
|
|
20
|
-
const n = u.createContext(t), s = o.length;
|
|
21
|
-
o = [...o, t];
|
|
22
|
-
const p = (d) => {
|
|
23
|
-
var S;
|
|
24
|
-
const { scope: x, children: C, ...m } = d, v = ((S = x == null ? void 0 : x[e]) == null ? void 0 : S[s]) || n, P = u.useMemo(() => m, Object.values(m));
|
|
25
|
-
return /* @__PURE__ */ h(v.Provider, { value: P, children: C });
|
|
26
|
-
};
|
|
27
|
-
p.displayName = r + "Provider";
|
|
28
|
-
function f(d, x) {
|
|
29
|
-
var v;
|
|
30
|
-
const C = ((v = x == null ? void 0 : x[e]) == null ? void 0 : v[s]) || n, m = u.useContext(C);
|
|
31
|
-
if (m) return m;
|
|
32
|
-
if (t !== void 0) return t;
|
|
33
|
-
throw new Error(`\`${d}\` must be used within \`${r}\``);
|
|
14
|
+
p.displayName = m;
|
|
15
|
+
const a = s + "CollectionSlot", E = x(a), C = r.forwardRef(
|
|
16
|
+
(c, e) => {
|
|
17
|
+
const { scope: l, children: o } = c, t = f(a, l), n = M(e, t.collectionRef);
|
|
18
|
+
return /* @__PURE__ */ u(E, { ref: n, children: o });
|
|
34
19
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
);
|
|
21
|
+
C.displayName = a;
|
|
22
|
+
const d = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(d), I = r.forwardRef(
|
|
23
|
+
(c, e) => {
|
|
24
|
+
const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = f(d, l);
|
|
25
|
+
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ u(T, { [R]: "", ref: S, children: o });
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
I.displayName = d;
|
|
29
|
+
function O(c) {
|
|
30
|
+
const e = f(s + "CollectionConsumer", c);
|
|
31
|
+
return r.useCallback(() => {
|
|
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)
|
|
44
37
|
);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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;
|
|
38
|
+
}, [e.collectionRef, e.itemMap]);
|
|
39
|
+
}
|
|
40
|
+
return [
|
|
41
|
+
{ Provider: p, Slot: C, ItemSlot: I },
|
|
42
|
+
O,
|
|
43
|
+
N
|
|
44
|
+
];
|
|
66
45
|
}
|
|
67
46
|
export {
|
|
68
|
-
|
|
69
|
-
_ as createContextScope
|
|
47
|
+
g as createCollection
|
|
70
48
|
};
|
package/dist/index81.js
CHANGED
|
@@ -1,48 +1,54 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(c, e) => {
|
|
24
|
-
const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = f(d, l);
|
|
25
|
-
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ u(T, { [R]: "", ref: S, children: o });
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
I.displayName = d;
|
|
29
|
-
function O(c) {
|
|
30
|
-
const e = f(s + "CollectionConsumer", c);
|
|
31
|
-
return r.useCallback(() => {
|
|
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]);
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { useLayoutEffect as v } from "./index90.js";
|
|
3
|
+
var E = n[" useInsertionEffect ".trim().toString()] || v;
|
|
4
|
+
function y({
|
|
5
|
+
prop: t,
|
|
6
|
+
defaultProp: u,
|
|
7
|
+
onChange: o = () => {
|
|
8
|
+
},
|
|
9
|
+
caller: i
|
|
10
|
+
}) {
|
|
11
|
+
const [l, e, r] = w({
|
|
12
|
+
defaultProp: u,
|
|
13
|
+
onChange: o
|
|
14
|
+
}), c = t !== void 0, a = c ? t : l;
|
|
15
|
+
{
|
|
16
|
+
const s = n.useRef(t !== void 0);
|
|
17
|
+
n.useEffect(() => {
|
|
18
|
+
const f = s.current;
|
|
19
|
+
f !== c && console.warn(
|
|
20
|
+
`${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "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.`
|
|
21
|
+
), s.current = c;
|
|
22
|
+
}, [c, i]);
|
|
39
23
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
24
|
+
const m = n.useCallback(
|
|
25
|
+
(s) => {
|
|
26
|
+
var f;
|
|
27
|
+
if (c) {
|
|
28
|
+
const d = R(s) ? s(t) : s;
|
|
29
|
+
d !== t && ((f = r.current) == null || f.call(r, d));
|
|
30
|
+
} else
|
|
31
|
+
e(s);
|
|
32
|
+
},
|
|
33
|
+
[c, t, e, r]
|
|
34
|
+
);
|
|
35
|
+
return [a, m];
|
|
36
|
+
}
|
|
37
|
+
function w({
|
|
38
|
+
defaultProp: t,
|
|
39
|
+
onChange: u
|
|
40
|
+
}) {
|
|
41
|
+
const [o, i] = n.useState(t), l = n.useRef(o), e = n.useRef(u);
|
|
42
|
+
return E(() => {
|
|
43
|
+
e.current = u;
|
|
44
|
+
}, [u]), n.useEffect(() => {
|
|
45
|
+
var r;
|
|
46
|
+
l.current !== o && ((r = e.current) == null || r.call(e, o), l.current = o);
|
|
47
|
+
}, [o, l]), [o, i, e];
|
|
48
|
+
}
|
|
49
|
+
function R(t) {
|
|
50
|
+
return typeof t == "function";
|
|
45
51
|
}
|
|
46
52
|
export {
|
|
47
|
-
|
|
53
|
+
y as useControllableState
|
|
48
54
|
};
|
package/dist/index82.js
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
import * as f from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
import * as p from "react-dom";
|
|
3
|
+
import { createSlot as c } from "./index79.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));
|
|
25
32
|
}
|
|
26
33
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
h as Primitive,
|
|
35
|
+
w as dispatchDiscreteCustomEvent
|
|
29
36
|
};
|
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 "./index90.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,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
onChange: o = () => {
|
|
8
|
-
},
|
|
9
|
-
caller: i
|
|
10
|
-
}) {
|
|
11
|
-
const [l, e, r] = w({
|
|
12
|
-
defaultProp: u,
|
|
13
|
-
onChange: o
|
|
14
|
-
}), c = t !== void 0, a = c ? t : l;
|
|
15
|
-
{
|
|
16
|
-
const s = n.useRef(t !== void 0);
|
|
17
|
-
n.useEffect(() => {
|
|
18
|
-
const f = s.current;
|
|
19
|
-
f !== c && console.warn(
|
|
20
|
-
`${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "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.`
|
|
21
|
-
), s.current = c;
|
|
22
|
-
}, [c, i]);
|
|
23
|
-
}
|
|
24
|
-
const m = n.useCallback(
|
|
25
|
-
(s) => {
|
|
26
|
-
var f;
|
|
27
|
-
if (c) {
|
|
28
|
-
const d = R(s) ? s(t) : s;
|
|
29
|
-
d !== t && ((f = r.current) == null || f.call(r, d));
|
|
30
|
-
} else
|
|
31
|
-
e(s);
|
|
32
|
-
},
|
|
33
|
-
[c, t, e, r]
|
|
34
|
-
);
|
|
35
|
-
return [a, m];
|
|
36
|
-
}
|
|
37
|
-
function w({
|
|
38
|
-
defaultProp: t,
|
|
39
|
-
onChange: u
|
|
40
|
-
}) {
|
|
41
|
-
const [o, i] = n.useState(t), l = n.useRef(o), e = n.useRef(u);
|
|
42
|
-
return E(() => {
|
|
43
|
-
e.current = u;
|
|
44
|
-
}, [u]), n.useEffect(() => {
|
|
45
|
-
var r;
|
|
46
|
-
l.current !== o && ((r = e.current) == null || r.call(e, o), l.current = o);
|
|
47
|
-
}, [o, l]), [o, i, e];
|
|
48
|
-
}
|
|
49
|
-
function R(t) {
|
|
50
|
-
return typeof t == "function";
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
var r = t.createContext(void 0);
|
|
4
|
+
function n(o) {
|
|
5
|
+
const e = t.useContext(r);
|
|
6
|
+
return o || e || "ltr";
|
|
51
7
|
}
|
|
52
8
|
export {
|
|
53
|
-
|
|
9
|
+
n as useDirection
|
|
54
10
|
};
|
package/dist/index85.js
CHANGED
|
@@ -1,36 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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));
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
function t(r) {
|
|
3
|
+
const e = u.useRef({ value: r, previous: r });
|
|
4
|
+
return u.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
|
|
32
5
|
}
|
|
33
6
|
export {
|
|
34
|
-
|
|
35
|
-
w as dispatchDiscreteCustomEvent
|
|
7
|
+
t as usePrevious
|
|
36
8
|
};
|
package/dist/index86.js
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useLayoutEffect as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import * as h from "react";
|
|
2
|
+
import { useLayoutEffect as z } from "./index90.js";
|
|
3
|
+
function c(r) {
|
|
4
|
+
const [d, e] = h.useState(void 0);
|
|
5
|
+
return z(() => {
|
|
6
|
+
if (r) {
|
|
7
|
+
e({ width: r.offsetWidth, height: r.offsetHeight });
|
|
8
|
+
const f = new ResizeObserver((i) => {
|
|
9
|
+
if (!Array.isArray(i) || !i.length)
|
|
10
|
+
return;
|
|
11
|
+
const b = i[0];
|
|
12
|
+
let o, t;
|
|
13
|
+
if ("borderBoxSize" in b) {
|
|
14
|
+
const s = b.borderBoxSize, u = Array.isArray(s) ? s[0] : s;
|
|
15
|
+
o = u.inlineSize, t = u.blockSize;
|
|
16
|
+
} else
|
|
17
|
+
o = r.offsetWidth, t = r.offsetHeight;
|
|
18
|
+
e({ width: o, height: t });
|
|
19
|
+
});
|
|
20
|
+
return f.observe(r, { box: "border-box" }), () => f.unobserve(r);
|
|
21
|
+
} else
|
|
22
|
+
e(void 0);
|
|
23
|
+
}, [r]), d;
|
|
10
24
|
}
|
|
11
25
|
export {
|
|
12
|
-
|
|
26
|
+
c as useSize
|
|
13
27
|
};
|