@drjoshcsimmons/scl 0.1.9 → 0.1.11
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/index10.js +21 -21
- package/dist/index100.js +48 -14
- package/dist/index101.js +51 -44
- package/dist/index102.js +29 -49
- package/dist/index103.js +4 -9
- package/dist/index104.js +218 -3
- package/dist/index107.js +7 -46
- package/dist/index108.js +181 -30
- package/dist/index109.js +43 -176
- package/dist/index11.js +2 -2
- package/dist/index110.js +30 -9
- package/dist/index111.js +8 -8
- package/dist/index112.js +1 -1
- package/dist/index116.js +12 -21
- package/dist/index117.js +15 -3
- package/dist/index118.js +3 -32
- package/dist/index119.js +32 -12
- package/dist/index12.js +1 -1
- package/dist/index120.js +18 -12
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index128.js +25 -2
- package/dist/index129.js +29 -2
- package/dist/index13.js +2 -2
- package/dist/index130.js +5 -25
- package/dist/index131.js +2 -29
- package/dist/index132.js +2 -5
- 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 +1 -1
- package/dist/index18.js +2 -2
- package/dist/index20.js +1 -1
- 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 +2 -2
- package/dist/index29.js +1 -1
- package/dist/index31.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index36.js +1 -1
- package/dist/index37.js +1 -1
- package/dist/index45.js +1 -1
- package/dist/index46.js +1 -1
- package/dist/index48.js +302 -65
- package/dist/index49.js +12 -125
- package/dist/index50.js +112 -236
- package/dist/index51.js +73 -9
- package/dist/index52.js +57 -307
- package/dist/index53.js +260 -12
- package/dist/index54.js +12 -60
- package/dist/index55.js +249 -12
- package/dist/index56.js +9 -118
- package/dist/index57.js +107 -71
- package/dist/index58.js +12 -241
- package/dist/index59.js +26 -855
- package/dist/index6.js +1 -1
- package/dist/index60.js +82 -9
- package/dist/index61.js +848 -242
- package/dist/index62.js +9 -260
- package/dist/index63.js +161 -12
- package/dist/index64.js +308 -407
- package/dist/index65.js +433 -16
- package/dist/index66.js +224 -113
- package/dist/index67.js +18 -526
- package/dist/index69.js +1 -1
- package/dist/index7.js +1 -1
- package/dist/index70.js +1 -1
- package/dist/index71.js +91 -197
- package/dist/index72.js +216 -316
- package/dist/index73.js +524 -25
- package/dist/index74.js +16 -159
- package/dist/index75.js +252 -20
- package/dist/index84.js +14 -8
- package/dist/index88.js +1 -1
- package/dist/index9.js +1 -1
- package/dist/index90.js +8 -5
- package/dist/index91.js +5 -24
- package/dist/index92.js +23 -67
- package/dist/index93.js +66 -12
- package/dist/index94.js +118 -48
- package/dist/index95.js +134 -29
- package/dist/index96.js +13 -124
- package/dist/index98.js +8 -134
- package/dist/index99.js +49 -218
- package/package.json +1 -1
package/dist/index71.js
CHANGED
|
@@ -1,111 +1,115 @@
|
|
|
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
|
-
|
|
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) => {
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { composeEventHandlers as T } from "./index79.js";
|
|
3
|
+
import { useComposedRefs as P } from "./index78.js";
|
|
4
|
+
import { createContextScope as I } from "./index76.js";
|
|
5
|
+
import { useControllableState as M } from "./index80.js";
|
|
6
|
+
import { usePrevious as H } from "./index91.js";
|
|
7
|
+
import { useSize as j } from "./index92.js";
|
|
8
|
+
import { Primitive as y } from "./index81.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
|
-
name:
|
|
18
|
-
checked:
|
|
19
|
-
|
|
13
|
+
__scopeSwitch: e,
|
|
14
|
+
name: c,
|
|
15
|
+
checked: o,
|
|
16
|
+
defaultChecked: v,
|
|
17
|
+
required: i,
|
|
20
18
|
disabled: n,
|
|
21
|
-
value:
|
|
22
|
-
|
|
23
|
-
form:
|
|
24
|
-
...
|
|
25
|
-
} =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ A(q, { scope: e, checked: l, disabled: n, children: [
|
|
30
|
+
/* @__PURE__ */ m(
|
|
31
|
+
y.button,
|
|
29
32
|
{
|
|
30
33
|
type: "button",
|
|
31
|
-
role: "
|
|
32
|
-
"aria-checked":
|
|
33
|
-
"
|
|
34
|
+
role: "switch",
|
|
35
|
+
"aria-checked": l,
|
|
36
|
+
"aria-required": i,
|
|
37
|
+
"data-state": g(l),
|
|
34
38
|
"data-disabled": n ? "" : void 0,
|
|
35
39
|
disabled: n,
|
|
36
|
-
value:
|
|
37
|
-
...
|
|
38
|
-
ref:
|
|
39
|
-
onClick:
|
|
40
|
-
|
|
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());
|
|
41
45
|
})
|
|
42
46
|
}
|
|
43
47
|
),
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
k && /* @__PURE__ */ m(
|
|
49
|
+
x,
|
|
46
50
|
{
|
|
47
|
-
control:
|
|
48
|
-
bubbles: !
|
|
49
|
-
name:
|
|
50
|
-
value:
|
|
51
|
-
checked:
|
|
52
|
-
required:
|
|
51
|
+
control: d,
|
|
52
|
+
bubbles: !C.current,
|
|
53
|
+
name: c,
|
|
54
|
+
value: p,
|
|
55
|
+
checked: l,
|
|
56
|
+
required: i,
|
|
53
57
|
disabled: n,
|
|
54
|
-
form:
|
|
58
|
+
form: s,
|
|
55
59
|
style: { transform: "translateX(-100%)" }
|
|
56
60
|
}
|
|
57
61
|
)
|
|
58
62
|
] });
|
|
59
63
|
}
|
|
60
64
|
);
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
(
|
|
64
|
-
const {
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
-
|
|
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,
|
|
67
71
|
{
|
|
68
|
-
"data-state":
|
|
69
|
-
"data-disabled":
|
|
70
|
-
...
|
|
71
|
-
ref:
|
|
72
|
+
"data-state": g(o.checked),
|
|
73
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
74
|
+
...c,
|
|
75
|
+
ref: a
|
|
72
76
|
}
|
|
73
|
-
)
|
|
77
|
+
);
|
|
74
78
|
}
|
|
75
79
|
);
|
|
76
|
-
|
|
77
|
-
var
|
|
80
|
+
_.displayName = E;
|
|
81
|
+
var L = "SwitchBubbleInput", x = r.forwardRef(
|
|
78
82
|
({
|
|
79
|
-
|
|
80
|
-
control:
|
|
81
|
-
checked:
|
|
82
|
-
bubbles:
|
|
83
|
-
...
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
-
return
|
|
87
|
-
const
|
|
88
|
-
if (!
|
|
89
|
-
const
|
|
90
|
-
|
|
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,
|
|
91
95
|
"checked"
|
|
92
96
|
).set;
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
|
|
97
|
+
if (p !== e && u) {
|
|
98
|
+
const b = new Event("click", { bubbles: c });
|
|
99
|
+
u.call(s, e), s.dispatchEvent(b);
|
|
96
100
|
}
|
|
97
|
-
}, [
|
|
98
|
-
|
|
101
|
+
}, [p, e, c]), /* @__PURE__ */ m(
|
|
102
|
+
"input",
|
|
99
103
|
{
|
|
100
|
-
type: "
|
|
104
|
+
type: "checkbox",
|
|
101
105
|
"aria-hidden": !0,
|
|
102
|
-
defaultChecked:
|
|
103
|
-
...
|
|
106
|
+
defaultChecked: e,
|
|
107
|
+
...o,
|
|
104
108
|
tabIndex: -1,
|
|
105
|
-
ref:
|
|
109
|
+
ref: n,
|
|
106
110
|
style: {
|
|
107
|
-
...
|
|
108
|
-
...
|
|
111
|
+
...o.style,
|
|
112
|
+
...w,
|
|
109
113
|
position: "absolute",
|
|
110
114
|
pointerEvents: "none",
|
|
111
115
|
opacity: 0,
|
|
@@ -115,124 +119,14 @@ var Y = "RadioBubbleInput", A = i.forwardRef(
|
|
|
115
119
|
);
|
|
116
120
|
}
|
|
117
121
|
);
|
|
118
|
-
|
|
119
|
-
function
|
|
120
|
-
return
|
|
122
|
+
x.displayName = L;
|
|
123
|
+
function g(t) {
|
|
124
|
+
return t ? "checked" : "unchecked";
|
|
121
125
|
}
|
|
122
|
-
var
|
|
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;
|
|
126
|
+
var Q = R, V = _;
|
|
231
127
|
export {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
F as RadioGroupItem,
|
|
237
|
-
le as Root
|
|
128
|
+
Q as Root,
|
|
129
|
+
R as Switch,
|
|
130
|
+
_ as SwitchThumb,
|
|
131
|
+
V as Thumb
|
|
238
132
|
};
|