@drjoshcsimmons/scl 0.1.4 → 0.1.5
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/index100.js +8 -14
- package/dist/index101.js +50 -9
- package/dist/index102.js +218 -49
- package/dist/index103.js +29 -218
- package/dist/index104.js +178 -27
- package/dist/index11.js +2 -2
- package/dist/index110.js +1 -1
- package/dist/index112.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index131.js +1 -1
- package/dist/index132.js +1 -1
- package/dist/index137.js +11 -21
- package/dist/index138.js +26 -11
- package/dist/index139.js +4 -27
- package/dist/index14.js +2 -2
- package/dist/index140.js +22 -4
- package/dist/index15.js +2 -2
- package/dist/index17.js +1 -1
- 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 +1 -1
- package/dist/index24.js +1 -1
- package/dist/index25.js +3 -3
- 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/index36.js +2 -2
- package/dist/index37.js +1 -1
- package/dist/index45.js +7 -7
- package/dist/index47.js +33 -435
- package/dist/index48.js +111 -147
- package/dist/index49.js +65 -302
- package/dist/index5.js +1 -1
- package/dist/index50.js +60 -12
- package/dist/index51.js +253 -32
- package/dist/index52.js +7 -7
- package/dist/index53.js +302 -65
- package/dist/index54.js +4 -4
- package/dist/index55.js +4 -1
- package/dist/index56.js +9 -249
- package/dist/index57.js +432 -57
- package/dist/index58.js +6 -6
- package/dist/index6.js +1 -1
- package/dist/index61.js +234 -99
- package/dist/index62.js +12 -260
- package/dist/index63.js +860 -12
- package/dist/index64.js +9 -82
- package/dist/index65.js +505 -211
- package/dist/index66.js +138 -507
- package/dist/index67.js +17 -21
- package/dist/index68.js +16 -854
- package/dist/index69.js +336 -9
- package/dist/index7.js +1 -1
- package/dist/index70.js +126 -250
- package/dist/index71.js +82 -31
- package/dist/index72.js +216 -311
- package/dist/index73.js +222 -214
- package/dist/index74.js +30 -17
- package/dist/index75.js +197 -91
- package/dist/index77.js +25 -44
- package/dist/index78.js +5 -25
- package/dist/index79.js +53 -6
- package/dist/index8.js +1 -1
- package/dist/index80.js +52 -49
- package/dist/index81.js +10 -33
- package/dist/index82.js +4 -11
- package/dist/index83.js +30 -8
- package/dist/index84.js +12 -3
- package/dist/index85.js +51 -5
- package/dist/index86.js +33 -24
- package/dist/index87.js +65 -177
- package/dist/index88.js +10 -68
- package/dist/index9.js +2 -2
- package/dist/index90.js +46 -30
- package/dist/index91.js +7 -54
- package/dist/index92.js +3 -10
- package/dist/index93.js +6 -4
- package/dist/index94.js +24 -12
- package/dist/index95.js +647 -51
- package/dist/index96.js +112 -637
- package/dist/index97.js +126 -116
- package/dist/index98.js +13 -134
- package/dist/index99.js +14 -13
- package/package.json +1 -1
package/dist/index75.js
CHANGED
|
@@ -1,115 +1,111 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { composeEventHandlers as
|
|
3
|
-
import { useComposedRefs as
|
|
4
|
-
import { createContextScope as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { composeEventHandlers as I } from "./index78.js";
|
|
3
|
+
import { useComposedRefs as E } from "./index77.js";
|
|
4
|
+
import { createContextScope as w } from "./index76.js";
|
|
5
|
+
import { Primitive as b } from "./index86.js";
|
|
6
|
+
import { createRovingFocusGroupScope as P, Root as B, Item as q } from "./index104.js";
|
|
7
|
+
import { useControllableState as K } from "./index85.js";
|
|
8
|
+
import { useDirection as T } from "./index91.js";
|
|
9
|
+
import { useSize as U } from "./index94.js";
|
|
10
|
+
import { usePrevious as V } from "./index93.js";
|
|
11
|
+
import { Presence as j } from "./index87.js";
|
|
12
|
+
import { jsx as p, jsxs as z } from "react/jsx-runtime";
|
|
13
|
+
var _ = "Radio", [H, g] = w(_), [W, X] = H(_), k = i.forwardRef(
|
|
14
|
+
(a, d) => {
|
|
12
15
|
const {
|
|
13
|
-
|
|
14
|
-
name:
|
|
15
|
-
checked:
|
|
16
|
-
|
|
17
|
-
required: i,
|
|
16
|
+
__scopeRadio: o,
|
|
17
|
+
name: s,
|
|
18
|
+
checked: e = !1,
|
|
19
|
+
required: r,
|
|
18
20
|
disabled: n,
|
|
19
|
-
value:
|
|
20
|
-
|
|
21
|
-
form:
|
|
22
|
-
...
|
|
23
|
-
} =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
caller: h
|
|
28
|
-
});
|
|
29
|
-
return /* @__PURE__ */ A(q, { scope: e, checked: l, disabled: n, children: [
|
|
30
|
-
/* @__PURE__ */ m(
|
|
31
|
-
y.button,
|
|
21
|
+
value: f = "on",
|
|
22
|
+
onCheck: c,
|
|
23
|
+
form: m,
|
|
24
|
+
...R
|
|
25
|
+
} = a, [l, v] = i.useState(null), t = E(d, (y) => v(y)), u = i.useRef(!1), h = l ? m || !!l.closest("form") : !0;
|
|
26
|
+
return /* @__PURE__ */ z(W, { scope: o, checked: e, disabled: n, children: [
|
|
27
|
+
/* @__PURE__ */ p(
|
|
28
|
+
b.button,
|
|
32
29
|
{
|
|
33
30
|
type: "button",
|
|
34
|
-
role: "
|
|
35
|
-
"aria-checked":
|
|
36
|
-
"
|
|
37
|
-
"data-state": g(l),
|
|
31
|
+
role: "radio",
|
|
32
|
+
"aria-checked": e,
|
|
33
|
+
"data-state": N(e),
|
|
38
34
|
"data-disabled": n ? "" : void 0,
|
|
39
35
|
disabled: n,
|
|
40
|
-
value:
|
|
41
|
-
...
|
|
42
|
-
ref:
|
|
43
|
-
onClick:
|
|
44
|
-
|
|
36
|
+
value: f,
|
|
37
|
+
...R,
|
|
38
|
+
ref: t,
|
|
39
|
+
onClick: I(a.onClick, (y) => {
|
|
40
|
+
e || c == null || c(), h && (u.current = y.isPropagationStopped(), u.current || y.stopPropagation());
|
|
45
41
|
})
|
|
46
42
|
}
|
|
47
43
|
),
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
h && /* @__PURE__ */ p(
|
|
45
|
+
A,
|
|
50
46
|
{
|
|
51
|
-
control:
|
|
52
|
-
bubbles: !
|
|
53
|
-
name:
|
|
54
|
-
value:
|
|
55
|
-
checked:
|
|
56
|
-
required:
|
|
47
|
+
control: l,
|
|
48
|
+
bubbles: !u.current,
|
|
49
|
+
name: s,
|
|
50
|
+
value: f,
|
|
51
|
+
checked: e,
|
|
52
|
+
required: r,
|
|
57
53
|
disabled: n,
|
|
58
|
-
form:
|
|
54
|
+
form: m,
|
|
59
55
|
style: { transform: "translateX(-100%)" }
|
|
60
56
|
}
|
|
61
57
|
)
|
|
62
58
|
] });
|
|
63
59
|
}
|
|
64
60
|
);
|
|
65
|
-
|
|
66
|
-
var
|
|
67
|
-
(
|
|
68
|
-
const {
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
|
|
61
|
+
k.displayName = _;
|
|
62
|
+
var G = "RadioIndicator", S = i.forwardRef(
|
|
63
|
+
(a, d) => {
|
|
64
|
+
const { __scopeRadio: o, forceMount: s, ...e } = a, r = X(G, o);
|
|
65
|
+
return /* @__PURE__ */ p(j, { present: s || r.checked, children: /* @__PURE__ */ p(
|
|
66
|
+
b.span,
|
|
71
67
|
{
|
|
72
|
-
"data-state":
|
|
73
|
-
"data-disabled":
|
|
74
|
-
...
|
|
75
|
-
ref:
|
|
68
|
+
"data-state": N(r.checked),
|
|
69
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
70
|
+
...e,
|
|
71
|
+
ref: d
|
|
76
72
|
}
|
|
77
|
-
);
|
|
73
|
+
) });
|
|
78
74
|
}
|
|
79
75
|
);
|
|
80
|
-
|
|
81
|
-
var
|
|
76
|
+
S.displayName = G;
|
|
77
|
+
var Y = "RadioBubbleInput", A = i.forwardRef(
|
|
82
78
|
({
|
|
83
|
-
|
|
84
|
-
control:
|
|
85
|
-
checked:
|
|
86
|
-
bubbles:
|
|
87
|
-
...
|
|
88
|
-
},
|
|
89
|
-
const
|
|
90
|
-
return
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
93
|
-
const
|
|
94
|
-
|
|
79
|
+
__scopeRadio: a,
|
|
80
|
+
control: d,
|
|
81
|
+
checked: o,
|
|
82
|
+
bubbles: s = !0,
|
|
83
|
+
...e
|
|
84
|
+
}, r) => {
|
|
85
|
+
const n = i.useRef(null), f = E(n, r), c = V(o), m = U(d);
|
|
86
|
+
return i.useEffect(() => {
|
|
87
|
+
const R = n.current;
|
|
88
|
+
if (!R) return;
|
|
89
|
+
const l = window.HTMLInputElement.prototype, t = Object.getOwnPropertyDescriptor(
|
|
90
|
+
l,
|
|
95
91
|
"checked"
|
|
96
92
|
).set;
|
|
97
|
-
if (
|
|
98
|
-
const
|
|
99
|
-
|
|
93
|
+
if (c !== o && t) {
|
|
94
|
+
const u = new Event("click", { bubbles: s });
|
|
95
|
+
t.call(R, o), R.dispatchEvent(u);
|
|
100
96
|
}
|
|
101
|
-
}, [
|
|
102
|
-
|
|
97
|
+
}, [c, o, s]), /* @__PURE__ */ p(
|
|
98
|
+
b.input,
|
|
103
99
|
{
|
|
104
|
-
type: "
|
|
100
|
+
type: "radio",
|
|
105
101
|
"aria-hidden": !0,
|
|
106
|
-
defaultChecked:
|
|
107
|
-
...
|
|
102
|
+
defaultChecked: o,
|
|
103
|
+
...e,
|
|
108
104
|
tabIndex: -1,
|
|
109
|
-
ref:
|
|
105
|
+
ref: f,
|
|
110
106
|
style: {
|
|
111
|
-
...
|
|
112
|
-
...
|
|
107
|
+
...e.style,
|
|
108
|
+
...m,
|
|
113
109
|
position: "absolute",
|
|
114
110
|
pointerEvents: "none",
|
|
115
111
|
opacity: 0,
|
|
@@ -119,14 +115,124 @@ var L = "SwitchBubbleInput", x = r.forwardRef(
|
|
|
119
115
|
);
|
|
120
116
|
}
|
|
121
117
|
);
|
|
122
|
-
|
|
123
|
-
function
|
|
124
|
-
return
|
|
118
|
+
A.displayName = Y;
|
|
119
|
+
function N(a) {
|
|
120
|
+
return a ? "checked" : "unchecked";
|
|
125
121
|
}
|
|
126
|
-
var
|
|
122
|
+
var J = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], C = "RadioGroup", [Q] = w(C, [
|
|
123
|
+
P,
|
|
124
|
+
g
|
|
125
|
+
]), x = P(), D = g(), [Z, $] = Q(C), M = i.forwardRef(
|
|
126
|
+
(a, d) => {
|
|
127
|
+
const {
|
|
128
|
+
__scopeRadioGroup: o,
|
|
129
|
+
name: s,
|
|
130
|
+
defaultValue: e,
|
|
131
|
+
value: r,
|
|
132
|
+
required: n = !1,
|
|
133
|
+
disabled: f = !1,
|
|
134
|
+
orientation: c,
|
|
135
|
+
dir: m,
|
|
136
|
+
loop: R = !0,
|
|
137
|
+
onValueChange: l,
|
|
138
|
+
...v
|
|
139
|
+
} = a, t = x(o), u = T(m), [h, y] = K({
|
|
140
|
+
prop: r,
|
|
141
|
+
defaultProp: e ?? null,
|
|
142
|
+
onChange: l,
|
|
143
|
+
caller: C
|
|
144
|
+
});
|
|
145
|
+
return /* @__PURE__ */ p(
|
|
146
|
+
Z,
|
|
147
|
+
{
|
|
148
|
+
scope: o,
|
|
149
|
+
name: s,
|
|
150
|
+
required: n,
|
|
151
|
+
disabled: f,
|
|
152
|
+
value: h,
|
|
153
|
+
onValueChange: y,
|
|
154
|
+
children: /* @__PURE__ */ p(
|
|
155
|
+
B,
|
|
156
|
+
{
|
|
157
|
+
asChild: !0,
|
|
158
|
+
...t,
|
|
159
|
+
orientation: c,
|
|
160
|
+
dir: u,
|
|
161
|
+
loop: R,
|
|
162
|
+
children: /* @__PURE__ */ p(
|
|
163
|
+
b.div,
|
|
164
|
+
{
|
|
165
|
+
role: "radiogroup",
|
|
166
|
+
"aria-required": n,
|
|
167
|
+
"aria-orientation": c,
|
|
168
|
+
"data-disabled": f ? "" : void 0,
|
|
169
|
+
dir: u,
|
|
170
|
+
...v,
|
|
171
|
+
ref: d
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
M.displayName = C;
|
|
181
|
+
var O = "RadioGroupItem", F = i.forwardRef(
|
|
182
|
+
(a, d) => {
|
|
183
|
+
const { __scopeRadioGroup: o, disabled: s, ...e } = a, r = $(O, o), n = r.disabled || s, f = x(o), c = D(o), m = i.useRef(null), R = E(d, m), l = r.value === e.value, v = i.useRef(!1);
|
|
184
|
+
return i.useEffect(() => {
|
|
185
|
+
const t = (h) => {
|
|
186
|
+
J.includes(h.key) && (v.current = !0);
|
|
187
|
+
}, u = () => v.current = !1;
|
|
188
|
+
return document.addEventListener("keydown", t), document.addEventListener("keyup", u), () => {
|
|
189
|
+
document.removeEventListener("keydown", t), document.removeEventListener("keyup", u);
|
|
190
|
+
};
|
|
191
|
+
}, []), /* @__PURE__ */ p(
|
|
192
|
+
q,
|
|
193
|
+
{
|
|
194
|
+
asChild: !0,
|
|
195
|
+
...f,
|
|
196
|
+
focusable: !n,
|
|
197
|
+
active: l,
|
|
198
|
+
children: /* @__PURE__ */ p(
|
|
199
|
+
k,
|
|
200
|
+
{
|
|
201
|
+
disabled: n,
|
|
202
|
+
required: r.required,
|
|
203
|
+
checked: l,
|
|
204
|
+
...c,
|
|
205
|
+
...e,
|
|
206
|
+
name: r.name,
|
|
207
|
+
ref: R,
|
|
208
|
+
onCheck: () => r.onValueChange(e.value),
|
|
209
|
+
onKeyDown: I((t) => {
|
|
210
|
+
t.key === "Enter" && t.preventDefault();
|
|
211
|
+
}),
|
|
212
|
+
onFocus: I(e.onFocus, () => {
|
|
213
|
+
var t;
|
|
214
|
+
v.current && ((t = m.current) == null || t.click());
|
|
215
|
+
})
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
F.displayName = O;
|
|
223
|
+
var ee = "RadioGroupIndicator", L = i.forwardRef(
|
|
224
|
+
(a, d) => {
|
|
225
|
+
const { __scopeRadioGroup: o, ...s } = a, e = D(o);
|
|
226
|
+
return /* @__PURE__ */ p(S, { ...e, ...s, ref: d });
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
L.displayName = ee;
|
|
230
|
+
var le = M, fe = F, me = L;
|
|
127
231
|
export {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
232
|
+
me as Indicator,
|
|
233
|
+
fe as Item,
|
|
234
|
+
M as RadioGroup,
|
|
235
|
+
L as RadioGroupIndicator,
|
|
236
|
+
F as RadioGroupItem,
|
|
237
|
+
le as Root
|
|
132
238
|
};
|
package/dist/index77.js
CHANGED
|
@@ -1,48 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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);
|
|
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
|
+
};
|
|
13
21
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
];
|
|
22
|
+
}
|
|
23
|
+
function s(...n) {
|
|
24
|
+
return f.useCallback(i(...n), n);
|
|
45
25
|
}
|
|
46
26
|
export {
|
|
47
|
-
|
|
27
|
+
i as composeRefs,
|
|
28
|
+
s as useComposedRefs
|
|
48
29
|
};
|
package/dist/index78.js
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
};
|
|
1
|
+
function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
|
|
2
|
+
return function(s) {
|
|
3
|
+
if (f == null || f(s), p === !1 || !s.defaultPrevented)
|
|
4
|
+
return c == null ? void 0 : c(s);
|
|
21
5
|
};
|
|
22
6
|
}
|
|
23
|
-
function s(...n) {
|
|
24
|
-
return f.useCallback(i(...n), n);
|
|
25
|
-
}
|
|
26
7
|
export {
|
|
27
|
-
|
|
28
|
-
s as useComposedRefs
|
|
8
|
+
h as composeEventHandlers
|
|
29
9
|
};
|
package/dist/index79.js
CHANGED
|
@@ -1,9 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
15
|
+
}
|
|
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;
|
|
27
|
+
}
|
|
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;
|
|
33
|
+
}
|
|
34
|
+
function E(e) {
|
|
35
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
|
|
36
|
+
}
|
|
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 };
|
|
47
|
+
}
|
|
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);
|
|
6
52
|
}
|
|
7
53
|
export {
|
|
8
|
-
|
|
54
|
+
_ as createSlot,
|
|
55
|
+
x as createSlottable
|
|
9
56
|
};
|
package/dist/index8.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { cva as n } from "./
|
|
2
|
+
import { cva as n } from "./index47.js";
|
|
3
3
|
import { cn as a } from "./index2.js";
|
|
4
4
|
const i = n(
|
|
5
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",
|
package/dist/index80.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/index81.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
|
};
|