@drjoshcsimmons/scl 0.2.1 → 0.2.3
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/terminal-textarea/terminal-textarea.d.ts +1 -7
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
- package/dist/index100.js +180 -3
- package/dist/index101.js +9 -30
- package/dist/index102.js +30 -13
- package/dist/index103.js +44 -646
- package/dist/index104.js +4 -30
- package/dist/index105.js +47 -3
- package/dist/index106.js +5 -47
- package/dist/index107.js +647 -27
- package/dist/index108.js +30 -55
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index110.js +12 -45
- package/dist/index111.js +24 -8
- package/dist/index112.js +8 -14
- package/dist/index113.js +6 -48
- package/dist/index114.js +1 -1
- package/dist/index115.js +47 -11
- package/dist/index116.js +10 -204
- package/dist/index117.js +204 -20
- package/dist/index118.js +21 -399
- package/dist/index119.js +400 -6
- package/dist/index12.js +1 -1
- package/dist/index120.js +21 -48
- package/dist/index121.js +3 -15
- package/dist/index122.js +32 -3
- package/dist/index123.js +12 -32
- package/dist/index124.js +48 -18
- package/dist/index125.js +2 -25
- package/dist/index126.js +53 -29
- package/dist/index127.js +65 -5
- package/dist/index128.js +25 -2
- package/dist/index129.js +29 -53
- package/dist/index13.js +2 -2
- package/dist/index130.js +5 -65
- package/dist/index136.js +1 -1
- package/dist/index137.js +1 -1
- package/dist/index14.js +2 -2
- package/dist/index141.js +1 -1
- package/dist/index15.js +2 -2
- package/dist/index17.js +4 -4
- package/dist/index18.js +2 -2
- package/dist/index20.js +2 -2
- package/dist/index21.js +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.js +2 -2
- package/dist/index24.js +1 -1
- package/dist/index25.js +4 -4
- package/dist/index26.js +1 -1
- package/dist/index27.js +3 -3
- package/dist/index29.js +1 -1
- package/dist/index31.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index34.js +18 -16
- package/dist/index36.js +2 -2
- package/dist/index37.js +1 -1
- package/dist/index4.js +2 -2
- package/dist/index45.js +33 -237
- package/dist/index46.js +73 -11
- package/dist/index47.js +60 -33
- package/dist/index48.js +210 -214
- package/dist/index49.js +11 -18
- package/dist/index5.js +1 -1
- package/dist/index50.js +225 -109
- package/dist/index51.js +82 -31
- package/dist/index52.js +247 -66
- package/dist/index53.js +100 -218
- package/dist/index54.js +161 -11
- package/dist/index55.js +330 -54
- package/dist/index56.js +254 -248
- package/dist/index57.js +12 -225
- package/dist/index58.js +860 -9
- package/dist/index59.js +3 -5
- package/dist/index6.js +1 -1
- package/dist/index60.js +9 -130
- package/dist/index61.js +221 -18
- package/dist/index62.js +11 -860
- package/dist/index63.js +5 -3
- package/dist/index64.js +12 -82
- package/dist/index65.js +507 -237
- package/dist/index66.js +22 -12
- package/dist/index67.js +298 -237
- package/dist/index68.js +12 -118
- package/dist/index69.js +18 -530
- package/dist/index7.js +1 -1
- package/dist/index70.js +31 -12
- package/dist/index71.js +210 -409
- package/dist/index72.js +407 -308
- package/dist/index73.js +237 -298
- package/dist/index74.js +125 -12
- package/dist/index75.js +112 -143
- package/dist/index76.js +40 -53
- package/dist/index77.js +10 -45
- package/dist/index78.js +4 -27
- package/dist/index79.js +30 -7
- package/dist/index8.js +1 -1
- package/dist/index80.js +10 -49
- package/dist/index81.js +67 -33
- package/dist/index82.js +45 -10
- package/dist/index83.js +26 -7
- package/dist/index84.js +5 -123
- package/dist/index85.js +50 -13
- package/dist/index86.js +32 -133
- package/dist/index87.js +10 -218
- package/dist/index88.js +8 -14
- package/dist/index89.js +120 -64
- package/dist/index9.js +2 -2
- package/dist/index90.js +13 -46
- package/dist/index91.js +133 -48
- package/dist/index92.js +218 -8
- package/dist/index93.js +14 -30
- package/dist/index94.js +68 -8
- package/dist/index95.js +43 -176
- package/dist/index96.js +50 -25
- package/dist/index97.js +9 -6
- package/dist/index99.js +30 -11
- package/package.json +1 -1
package/dist/index74.js
CHANGED
|
@@ -1,14 +1,127 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { createContextScope as w } from "./index81.js";
|
|
3
|
+
import { useComposedRefs as v } from "./index83.js";
|
|
4
|
+
import { createDialogScope as A, Root as M, Portal as x, Trigger as I, Close as f, WarningProvider as L, Content as $, Description as F, Overlay as G, Title as j } from "./index56.js";
|
|
5
|
+
import { composeEventHandlers as W } from "./index84.js";
|
|
6
|
+
import { createSlottable as Y } from "./index112.js";
|
|
7
|
+
import { jsx as i, jsxs as q } from "react/jsx-runtime";
|
|
8
|
+
var D = "AlertDialog", [B] = w(D, [
|
|
9
|
+
A
|
|
10
|
+
]), n = A(), m = (e) => {
|
|
11
|
+
const { __scopeAlertDialog: o, ...r } = e, t = n(o);
|
|
12
|
+
return /* @__PURE__ */ i(M, { ...t, ...r, modal: !0 });
|
|
13
|
+
};
|
|
14
|
+
m.displayName = D;
|
|
15
|
+
var H = "AlertDialogTrigger", y = l.forwardRef(
|
|
16
|
+
(e, o) => {
|
|
17
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
18
|
+
return /* @__PURE__ */ i(I, { ...a, ...t, ref: o });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
y.displayName = H;
|
|
22
|
+
var V = "AlertDialogPortal", _ = (e) => {
|
|
23
|
+
const { __scopeAlertDialog: o, ...r } = e, t = n(o);
|
|
24
|
+
return /* @__PURE__ */ i(x, { ...t, ...r });
|
|
25
|
+
};
|
|
26
|
+
_.displayName = V;
|
|
27
|
+
var k = "AlertDialogOverlay", N = l.forwardRef(
|
|
28
|
+
(e, o) => {
|
|
29
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
30
|
+
return /* @__PURE__ */ i(G, { ...a, ...t, ref: o });
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
N.displayName = k;
|
|
34
|
+
var s = "AlertDialogContent", [z, J] = B(s), K = Y("AlertDialogContent"), R = l.forwardRef(
|
|
35
|
+
(e, o) => {
|
|
36
|
+
const { __scopeAlertDialog: r, children: t, ...a } = e, g = n(r), p = l.useRef(null), b = v(o, p), d = l.useRef(null);
|
|
37
|
+
return /* @__PURE__ */ i(
|
|
38
|
+
L,
|
|
39
|
+
{
|
|
40
|
+
contentName: s,
|
|
41
|
+
titleName: C,
|
|
42
|
+
docsSlug: "alert-dialog",
|
|
43
|
+
children: /* @__PURE__ */ i(z, { scope: r, cancelRef: d, children: /* @__PURE__ */ q(
|
|
44
|
+
$,
|
|
45
|
+
{
|
|
46
|
+
role: "alertdialog",
|
|
47
|
+
...g,
|
|
48
|
+
...a,
|
|
49
|
+
ref: b,
|
|
50
|
+
onOpenAutoFocus: W(a.onOpenAutoFocus, (c) => {
|
|
51
|
+
var u;
|
|
52
|
+
c.preventDefault(), (u = d.current) == null || u.focus({ preventScroll: !0 });
|
|
53
|
+
}),
|
|
54
|
+
onPointerDownOutside: (c) => c.preventDefault(),
|
|
55
|
+
onInteractOutside: (c) => c.preventDefault(),
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ i(K, { children: t }),
|
|
58
|
+
/* @__PURE__ */ i(U, { contentRef: p })
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
) })
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
R.displayName = s;
|
|
67
|
+
var C = "AlertDialogTitle", h = l.forwardRef(
|
|
68
|
+
(e, o) => {
|
|
69
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
70
|
+
return /* @__PURE__ */ i(j, { ...a, ...t, ref: o });
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
h.displayName = C;
|
|
74
|
+
var E = "AlertDialogDescription", P = l.forwardRef((e, o) => {
|
|
75
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
76
|
+
return /* @__PURE__ */ i(F, { ...a, ...t, ref: o });
|
|
77
|
+
});
|
|
78
|
+
P.displayName = E;
|
|
79
|
+
var Q = "AlertDialogAction", S = l.forwardRef(
|
|
80
|
+
(e, o) => {
|
|
81
|
+
const { __scopeAlertDialog: r, ...t } = e, a = n(r);
|
|
82
|
+
return /* @__PURE__ */ i(f, { ...a, ...t, ref: o });
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
S.displayName = Q;
|
|
86
|
+
var T = "AlertDialogCancel", O = l.forwardRef(
|
|
87
|
+
(e, o) => {
|
|
88
|
+
const { __scopeAlertDialog: r, ...t } = e, { cancelRef: a } = J(T, r), g = n(r), p = v(o, a);
|
|
89
|
+
return /* @__PURE__ */ i(f, { ...g, ...t, ref: p });
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
O.displayName = T;
|
|
93
|
+
var U = ({ contentRef: e }) => {
|
|
94
|
+
const o = `\`${s}\` requires a description for the component to be accessible for screen reader users.
|
|
95
|
+
|
|
96
|
+
You can add a description to the \`${s}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
97
|
+
|
|
98
|
+
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 \`${s}\`. 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.
|
|
99
|
+
|
|
100
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
101
|
+
return l.useEffect(() => {
|
|
102
|
+
var t;
|
|
103
|
+
document.getElementById(
|
|
104
|
+
(t = e.current) == null ? void 0 : t.getAttribute("aria-describedby")
|
|
105
|
+
) || console.warn(o);
|
|
106
|
+
}, [o, e]), null;
|
|
107
|
+
}, ae = m, ie = y, le = _, ne = N, se = R, ce = S, pe = O, ge = h, de = P;
|
|
12
108
|
export {
|
|
13
|
-
|
|
109
|
+
ce as Action,
|
|
110
|
+
m as AlertDialog,
|
|
111
|
+
S as AlertDialogAction,
|
|
112
|
+
O as AlertDialogCancel,
|
|
113
|
+
R as AlertDialogContent,
|
|
114
|
+
P as AlertDialogDescription,
|
|
115
|
+
N as AlertDialogOverlay,
|
|
116
|
+
_ as AlertDialogPortal,
|
|
117
|
+
h as AlertDialogTitle,
|
|
118
|
+
y as AlertDialogTrigger,
|
|
119
|
+
pe as Cancel,
|
|
120
|
+
se as Content,
|
|
121
|
+
de as Description,
|
|
122
|
+
ne as Overlay,
|
|
123
|
+
le as Portal,
|
|
124
|
+
ae as Root,
|
|
125
|
+
ge as Title,
|
|
126
|
+
ie as Trigger
|
|
14
127
|
};
|
package/dist/index75.js
CHANGED
|
@@ -1,163 +1,132 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { composeEventHandlers as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
C
|
|
13
|
-
]), h = C(), [$, T] = L(p), I = v.forwardRef(
|
|
14
|
-
(e, r) => {
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { composeEventHandlers as T } from "./index84.js";
|
|
3
|
+
import { useComposedRefs as P } from "./index83.js";
|
|
4
|
+
import { createContextScope as I } from "./index81.js";
|
|
5
|
+
import { useControllableState as M } from "./index85.js";
|
|
6
|
+
import { usePrevious as H } from "./index106.js";
|
|
7
|
+
import { useSize as j } from "./index111.js";
|
|
8
|
+
import { Primitive as y } from "./index86.js";
|
|
9
|
+
import { jsxs as A, jsx as m } from "react/jsx-runtime";
|
|
10
|
+
var h = "Switch", [U] = I(h), [q, z] = U(h), R = r.forwardRef(
|
|
11
|
+
(t, a) => {
|
|
15
12
|
const {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
__scopeSwitch: e,
|
|
14
|
+
name: c,
|
|
15
|
+
checked: o,
|
|
16
|
+
defaultChecked: v,
|
|
17
|
+
required: i,
|
|
18
|
+
disabled: n,
|
|
19
|
+
value: p = "on",
|
|
20
|
+
onCheckedChange: w,
|
|
21
|
+
form: s,
|
|
22
|
+
...S
|
|
23
|
+
} = t, [d, u] = r.useState(null), b = P(a, (f) => u(f)), C = r.useRef(!1), k = d ? s || !!d.closest("form") : !0, [l, B] = M({
|
|
24
|
+
prop: o,
|
|
25
|
+
defaultProp: v ?? !1,
|
|
26
|
+
onChange: w,
|
|
27
|
+
caller: h
|
|
29
28
|
});
|
|
30
|
-
return /* @__PURE__ */ l
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
return /* @__PURE__ */ A(q, { scope: e, checked: l, disabled: n, children: [
|
|
30
|
+
/* @__PURE__ */ m(
|
|
31
|
+
y.button,
|
|
32
|
+
{
|
|
33
|
+
type: "button",
|
|
34
|
+
role: "switch",
|
|
35
|
+
"aria-checked": l,
|
|
36
|
+
"aria-required": i,
|
|
37
|
+
"data-state": g(l),
|
|
38
|
+
"data-disabled": n ? "" : void 0,
|
|
39
|
+
disabled: n,
|
|
40
|
+
value: p,
|
|
41
|
+
...S,
|
|
42
|
+
ref: b,
|
|
43
|
+
onClick: T(t.onClick, (f) => {
|
|
44
|
+
B((N) => !N), k && (C.current = f.isPropagationStopped(), C.current || f.stopPropagation());
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
k && /* @__PURE__ */ m(
|
|
49
|
+
x,
|
|
50
|
+
{
|
|
51
|
+
control: d,
|
|
52
|
+
bubbles: !C.current,
|
|
53
|
+
name: c,
|
|
54
|
+
value: p,
|
|
55
|
+
checked: l,
|
|
56
|
+
required: i,
|
|
57
|
+
disabled: n,
|
|
58
|
+
form: s,
|
|
59
|
+
style: { transform: "translateX(-100%)" }
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
51
63
|
}
|
|
52
64
|
);
|
|
53
|
-
|
|
54
|
-
var
|
|
55
|
-
(
|
|
56
|
-
const {
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
|
|
65
|
+
R.displayName = h;
|
|
66
|
+
var E = "SwitchThumb", _ = r.forwardRef(
|
|
67
|
+
(t, a) => {
|
|
68
|
+
const { __scopeSwitch: e, ...c } = t, o = z(E, e);
|
|
69
|
+
return /* @__PURE__ */ m(
|
|
70
|
+
y.span,
|
|
59
71
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
loop: t,
|
|
65
|
-
children: /* @__PURE__ */ l(
|
|
66
|
-
b.div,
|
|
67
|
-
{
|
|
68
|
-
role: "tablist",
|
|
69
|
-
"aria-orientation": c.orientation,
|
|
70
|
-
...n,
|
|
71
|
-
ref: r
|
|
72
|
-
}
|
|
73
|
-
)
|
|
72
|
+
"data-state": g(o.checked),
|
|
73
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
74
|
+
...c,
|
|
75
|
+
ref: a
|
|
74
76
|
}
|
|
75
77
|
);
|
|
76
78
|
}
|
|
77
79
|
);
|
|
78
|
-
_.displayName =
|
|
79
|
-
var
|
|
80
|
-
(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
disabled: n,
|
|
99
|
-
id: f,
|
|
100
|
-
...c,
|
|
101
|
-
ref: r,
|
|
102
|
-
onMouseDown: g(e.onMouseDown, (a) => {
|
|
103
|
-
!n && a.button === 0 && a.ctrlKey === !1 ? o.onValueChange(t) : a.preventDefault();
|
|
104
|
-
}),
|
|
105
|
-
onKeyDown: g(e.onKeyDown, (a) => {
|
|
106
|
-
[" ", "Enter"].includes(a.key) && o.onValueChange(t);
|
|
107
|
-
}),
|
|
108
|
-
onFocus: g(e.onFocus, () => {
|
|
109
|
-
const a = o.activationMode !== "manual";
|
|
110
|
-
!i && !n && a && o.onValueChange(t);
|
|
111
|
-
})
|
|
112
|
-
}
|
|
113
|
-
)
|
|
80
|
+
_.displayName = E;
|
|
81
|
+
var L = "SwitchBubbleInput", x = r.forwardRef(
|
|
82
|
+
({
|
|
83
|
+
__scopeSwitch: t,
|
|
84
|
+
control: a,
|
|
85
|
+
checked: e,
|
|
86
|
+
bubbles: c = !0,
|
|
87
|
+
...o
|
|
88
|
+
}, v) => {
|
|
89
|
+
const i = r.useRef(null), n = P(i, v), p = H(e), w = j(a);
|
|
90
|
+
return r.useEffect(() => {
|
|
91
|
+
const s = i.current;
|
|
92
|
+
if (!s) return;
|
|
93
|
+
const S = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(
|
|
94
|
+
S,
|
|
95
|
+
"checked"
|
|
96
|
+
).set;
|
|
97
|
+
if (p !== e && u) {
|
|
98
|
+
const b = new Event("click", { bubbles: c });
|
|
99
|
+
u.call(s, e), s.dispatchEvent(b);
|
|
114
100
|
}
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
);
|
|
118
|
-
A.displayName = y;
|
|
119
|
-
var M = "TabsContent", N = v.forwardRef(
|
|
120
|
-
(e, r) => {
|
|
121
|
-
const { __scopeTabs: s, value: t, forceMount: n, children: c, ...o } = e, d = T(M, s), f = P(d.baseId, t), m = S(d.baseId, t), i = t === d.value, a = v.useRef(i);
|
|
122
|
-
return v.useEffect(() => {
|
|
123
|
-
const u = requestAnimationFrame(() => a.current = !1);
|
|
124
|
-
return () => cancelAnimationFrame(u);
|
|
125
|
-
}, []), /* @__PURE__ */ l(w, { present: n || i, children: ({ present: u }) => /* @__PURE__ */ l(
|
|
126
|
-
b.div,
|
|
101
|
+
}, [p, e, c]), /* @__PURE__ */ m(
|
|
102
|
+
"input",
|
|
127
103
|
{
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
"aria-labelledby": f,
|
|
132
|
-
hidden: !u,
|
|
133
|
-
id: m,
|
|
134
|
-
tabIndex: 0,
|
|
104
|
+
type: "checkbox",
|
|
105
|
+
"aria-hidden": !0,
|
|
106
|
+
defaultChecked: e,
|
|
135
107
|
...o,
|
|
136
|
-
|
|
108
|
+
tabIndex: -1,
|
|
109
|
+
ref: n,
|
|
137
110
|
style: {
|
|
138
|
-
...
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
111
|
+
...o.style,
|
|
112
|
+
...w,
|
|
113
|
+
position: "absolute",
|
|
114
|
+
pointerEvents: "none",
|
|
115
|
+
opacity: 0,
|
|
116
|
+
margin: 0
|
|
117
|
+
}
|
|
142
118
|
}
|
|
143
|
-
)
|
|
119
|
+
);
|
|
144
120
|
}
|
|
145
121
|
);
|
|
146
|
-
|
|
147
|
-
function
|
|
148
|
-
return
|
|
149
|
-
}
|
|
150
|
-
function S(e, r) {
|
|
151
|
-
return `${e}-content-${r}`;
|
|
122
|
+
x.displayName = L;
|
|
123
|
+
function g(t) {
|
|
124
|
+
return t ? "checked" : "unchecked";
|
|
152
125
|
}
|
|
153
|
-
var Q =
|
|
126
|
+
var Q = R, V = _;
|
|
154
127
|
export {
|
|
155
|
-
X as Content,
|
|
156
|
-
U as List,
|
|
157
128
|
Q as Root,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
A as TabsTrigger,
|
|
162
|
-
W as Trigger
|
|
129
|
+
R as Switch,
|
|
130
|
+
_ as SwitchThumb,
|
|
131
|
+
V as Thumb
|
|
163
132
|
};
|
package/dist/index76.js
CHANGED
|
@@ -1,70 +1,57 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { jsx as
|
|
3
|
-
function
|
|
4
|
-
const o = u.createContext(c), a = (r) => {
|
|
5
|
-
const { children: t, ...n } = r, s = u.useMemo(() => n, Object.values(n));
|
|
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];
|
|
16
|
-
}
|
|
17
|
-
function _(e, c = []) {
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
+
function $(e, x = []) {
|
|
18
4
|
let o = [];
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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 });
|
|
26
14
|
};
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
var
|
|
30
|
-
const C = ((
|
|
31
|
-
if (
|
|
32
|
-
if (
|
|
33
|
-
throw new Error(`\`${
|
|
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}\``);
|
|
34
22
|
}
|
|
35
|
-
return [
|
|
23
|
+
return [m, S];
|
|
36
24
|
}
|
|
37
|
-
const
|
|
38
|
-
const r = o.map((
|
|
39
|
-
return function(
|
|
40
|
-
const
|
|
41
|
-
return
|
|
42
|
-
() => ({ [`__scope${e}`]: { ...
|
|
43
|
-
[
|
|
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]
|
|
44
32
|
);
|
|
45
33
|
};
|
|
46
34
|
};
|
|
47
|
-
return
|
|
35
|
+
return u.scopeName = e, [f, h(u, ...x)];
|
|
48
36
|
}
|
|
49
|
-
function
|
|
50
|
-
const
|
|
51
|
-
if (e.length === 1) return
|
|
37
|
+
function h(...e) {
|
|
38
|
+
const x = e[0];
|
|
39
|
+
if (e.length === 1) return x;
|
|
52
40
|
const o = () => {
|
|
53
|
-
const
|
|
54
|
-
useScope:
|
|
55
|
-
scopeName:
|
|
41
|
+
const f = e.map((u) => ({
|
|
42
|
+
useScope: u(),
|
|
43
|
+
scopeName: u.scopeName
|
|
56
44
|
}));
|
|
57
45
|
return function(r) {
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
return { ...
|
|
46
|
+
const n = f.reduce((t, { useScope: c, scopeName: m }) => {
|
|
47
|
+
const a = c(r)[`__scope${m}`];
|
|
48
|
+
return { ...t, ...a };
|
|
61
49
|
}, {});
|
|
62
|
-
return
|
|
50
|
+
return i.useMemo(() => ({ [`__scope${x.scopeName}`]: n }), [n]);
|
|
63
51
|
};
|
|
64
52
|
};
|
|
65
|
-
return o.scopeName =
|
|
53
|
+
return o.scopeName = x.scopeName, o;
|
|
66
54
|
}
|
|
67
55
|
export {
|
|
68
|
-
|
|
69
|
-
_ as createContextScope
|
|
56
|
+
$ as createContextScope
|
|
70
57
|
};
|
package/dist/index77.js
CHANGED
|
@@ -1,48 +1,13 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 });
|
|
13
|
-
};
|
|
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 });
|
|
19
|
-
}
|
|
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)
|
|
37
|
-
);
|
|
38
|
-
}, [e.collectionRef, e.itemMap]);
|
|
39
|
-
}
|
|
40
|
-
return [
|
|
41
|
-
{ Provider: p, Slot: C, ItemSlot: I },
|
|
42
|
-
O,
|
|
43
|
-
N
|
|
44
|
-
];
|
|
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
|
+
}, []);
|
|
45
10
|
}
|
|
46
11
|
export {
|
|
47
|
-
|
|
12
|
+
o as useCallbackRef
|
|
48
13
|
};
|
package/dist/index78.js
CHANGED
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return n(o);
|
|
5
|
-
n != null && (n.current = o);
|
|
6
|
-
}
|
|
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
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function s(...n) {
|
|
24
|
-
return f.useCallback(i(...n), n);
|
|
25
|
-
}
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
var e = globalThis != null && globalThis.document ? t.useLayoutEffect : () => {
|
|
3
|
+
};
|
|
26
4
|
export {
|
|
27
|
-
|
|
28
|
-
s as useComposedRefs
|
|
5
|
+
e as useLayoutEffect
|
|
29
6
|
};
|
package/dist/index79.js
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import "react-dom";
|
|
3
|
+
import { createSlot as l } from "./index47.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
|
+
}, {});
|
|
7
30
|
export {
|
|
8
|
-
|
|
31
|
+
w as Primitive
|
|
9
32
|
};
|
package/dist/index8.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { cva as o } from "./
|
|
2
|
+
import { cva as o } from "./index45.js";
|
|
3
3
|
import { cn as a } from "./index2.js";
|
|
4
4
|
const i = o(
|
|
5
5
|
"inline-flex items-center border-2 px-2.5 py-0.5 text-xs font-semibold uppercase tracking-wider focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|