@drjoshcsimmons/scl 0.2.3 → 0.2.4
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 +9 -9
- package/dist/index101.js +54 -8
- package/dist/index102.js +30 -30
- package/dist/index103.js +29 -47
- package/dist/index104.js +14 -3
- package/dist/index105.js +29 -47
- package/dist/index106.js +47 -5
- package/dist/index107.js +44 -646
- package/dist/index108.js +55 -30
- package/dist/index109.js +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.js +11 -13
- package/dist/index111.js +649 -24
- package/dist/index113.js +48 -6
- package/dist/index114.js +1 -1
- package/dist/index115.js +11 -47
- package/dist/index116.js +204 -10
- package/dist/index117.js +20 -204
- package/dist/index118.js +399 -21
- package/dist/index119.js +20 -399
- package/dist/index12.js +1 -1
- package/dist/index120.js +3 -15
- package/dist/index121.js +32 -3
- package/dist/index122.js +12 -32
- package/dist/index123.js +6 -18
- package/dist/index124.js +1 -1
- package/dist/index125.js +25 -2
- package/dist/index126.js +29 -53
- package/dist/index127.js +5 -65
- package/dist/index128.js +2 -25
- package/dist/index129.js +53 -29
- package/dist/index13.js +2 -2
- package/dist/index130.js +65 -5
- package/dist/index131.js +5 -2
- package/dist/index132.js +3 -2
- package/dist/index133.js +24 -5
- package/dist/index134.js +113 -3
- package/dist/index135.js +15 -23
- package/dist/index136.js +519 -107
- package/dist/index137.js +126 -14
- package/dist/index138.js +125 -516
- package/dist/index139.js +2 -128
- package/dist/index14.js +2 -2
- package/dist/index140.js +2 -134
- package/dist/index141.js +69 -65
- package/dist/index142.js +8 -68
- package/dist/index143.js +14 -9
- package/dist/index144.js +66 -14
- package/dist/index145.js +64 -65
- package/dist/index148.js +11 -21
- package/dist/index149.js +26 -11
- package/dist/index15.js +2 -2
- package/dist/index150.js +4 -27
- package/dist/index151.js +22 -4
- 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/index36.js +2 -2
- package/dist/index37.js +1 -1
- package/dist/index4.js +2 -2
- package/dist/index45.js +237 -33
- package/dist/index46.js +11 -73
- package/dist/index47.js +33 -60
- package/dist/index48.js +57 -234
- package/dist/index49.js +118 -11
- package/dist/index5.js +1 -1
- package/dist/index50.js +109 -225
- package/dist/index51.js +417 -64
- package/dist/index52.js +848 -242
- package/dist/index53.js +9 -118
- package/dist/index54.js +9 -161
- package/dist/index55.js +119 -325
- package/dist/index56.js +507 -237
- package/dist/index57.js +161 -12
- package/dist/index58.js +68 -846
- package/dist/index59.js +18 -9
- package/dist/index6.js +1 -1
- package/dist/index60.js +236 -9
- package/dist/index61.js +11 -225
- package/dist/index62.js +31 -11
- package/dist/index63.js +310 -11
- package/dist/index64.js +5 -5
- package/dist/index65.js +237 -507
- package/dist/index66.js +12 -22
- package/dist/index67.js +20 -308
- package/dist/index68.js +225 -12
- package/dist/index69.js +11 -18
- package/dist/index7.js +1 -1
- package/dist/index70.js +238 -28
- package/dist/index71.js +60 -223
- package/dist/index72.js +12 -435
- package/dist/index73.js +8 -8
- package/dist/index74.js +318 -107
- package/dist/index75.js +250 -126
- package/dist/index76.js +53 -40
- package/dist/index77.js +45 -10
- package/dist/index78.js +27 -4
- package/dist/index79.js +7 -30
- package/dist/index8.js +1 -1
- package/dist/index80.js +49 -10
- package/dist/index81.js +33 -67
- package/dist/index82.js +10 -45
- package/dist/index83.js +7 -26
- package/dist/index84.js +4 -7
- package/dist/index85.js +65 -48
- package/dist/index86.js +8 -33
- package/dist/index87.js +3 -10
- package/dist/index88.js +5 -7
- package/dist/index89.js +23 -123
- package/dist/index9.js +2 -2
- package/dist/index90.js +122 -12
- package/dist/index91.js +14 -134
- package/dist/index92.js +128 -212
- package/dist/index93.js +218 -13
- package/dist/index94.js +14 -69
- package/dist/index95.js +1 -1
- package/dist/index96.js +11 -50
- package/dist/index97.js +30 -9
- package/dist/index98.js +48 -53
- package/dist/index99.js +9 -30
- package/package.json +1 -1
package/dist/index48.js
CHANGED
|
@@ -1,239 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
21
|
-
K.displayName = d;
|
|
22
|
-
var [L, se] = b(d), [z, de] = b(
|
|
23
|
-
d,
|
|
24
|
-
{ collapsible: !1 }
|
|
25
|
-
), pe = s.forwardRef(
|
|
26
|
-
(o, c) => {
|
|
27
|
-
const {
|
|
28
|
-
value: e,
|
|
29
|
-
defaultValue: t,
|
|
30
|
-
onValueChange: i = () => {
|
|
31
|
-
},
|
|
32
|
-
collapsible: r = !1,
|
|
33
|
-
...l
|
|
34
|
-
} = o, [a, p] = M({
|
|
35
|
-
prop: e,
|
|
36
|
-
defaultProp: t ?? "",
|
|
37
|
-
onChange: i,
|
|
38
|
-
caller: d
|
|
39
|
-
});
|
|
40
|
-
return /* @__PURE__ */ n(
|
|
41
|
-
L,
|
|
42
|
-
{
|
|
43
|
-
scope: o.__scopeAccordion,
|
|
44
|
-
value: s.useMemo(() => a ? [a] : [], [a]),
|
|
45
|
-
onItemOpen: p,
|
|
46
|
-
onItemClose: s.useCallback(() => r && p(""), [r, p]),
|
|
47
|
-
children: /* @__PURE__ */ n(z, { scope: o.__scopeAccordion, collapsible: r, children: /* @__PURE__ */ n(G, { ...l, ref: c }) })
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
), fe = s.forwardRef((o, c) => {
|
|
52
|
-
const {
|
|
53
|
-
value: e,
|
|
54
|
-
defaultValue: t,
|
|
55
|
-
onValueChange: i = () => {
|
|
56
|
-
},
|
|
57
|
-
...r
|
|
58
|
-
} = o, [l, a] = M({
|
|
59
|
-
prop: e,
|
|
60
|
-
defaultProp: t ?? [],
|
|
61
|
-
onChange: i,
|
|
62
|
-
caller: d
|
|
63
|
-
}), p = s.useCallback(
|
|
64
|
-
(v) => a((u = []) => [...u, v]),
|
|
65
|
-
[a]
|
|
66
|
-
), m = s.useCallback(
|
|
67
|
-
(v) => a((u = []) => u.filter((h) => h !== v)),
|
|
68
|
-
[a]
|
|
69
|
-
);
|
|
70
|
-
return /* @__PURE__ */ n(
|
|
71
|
-
L,
|
|
72
|
-
{
|
|
73
|
-
scope: o.__scopeAccordion,
|
|
74
|
-
value: l,
|
|
75
|
-
onItemOpen: p,
|
|
76
|
-
onItemClose: m,
|
|
77
|
-
children: /* @__PURE__ */ n(z, { scope: o.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ n(G, { ...r, ref: c }) })
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { composeRefs as S } from "./index78.js";
|
|
3
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
4
|
+
var E = Symbol.for("react.lazy"), p = o[" use ".trim().toString()];
|
|
5
|
+
function g(t) {
|
|
6
|
+
return typeof t == "object" && t !== null && "then" in t;
|
|
7
|
+
}
|
|
8
|
+
function d(t) {
|
|
9
|
+
return t != null && typeof t == "object" && "$$typeof" in t && t.$$typeof === E && "_payload" in t && g(t._payload);
|
|
10
|
+
}
|
|
11
|
+
// @__NO_SIDE_EFFECTS__
|
|
12
|
+
function C(t) {
|
|
13
|
+
const n = /* @__PURE__ */ R(t), i = o.forwardRef((e, r) => {
|
|
14
|
+
let { children: l, ...a } = e;
|
|
15
|
+
d(l) && typeof p == "function" && (l = p(l._payload));
|
|
16
|
+
const s = o.Children.toArray(l), f = s.find(b);
|
|
17
|
+
if (f) {
|
|
18
|
+
const c = f.props.children, m = s.map((u) => u === f ? o.Children.count(c) > 1 ? o.Children.only(null) : o.isValidElement(c) ? c.props.children : null : u);
|
|
19
|
+
return /* @__PURE__ */ y(n, { ...a, ref: r, children: o.isValidElement(c) ? o.cloneElement(c, void 0, m) : null });
|
|
78
20
|
}
|
|
79
|
-
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
r === "vertical" && R();
|
|
109
|
-
break;
|
|
110
|
-
case "ArrowLeft":
|
|
111
|
-
r === "horizontal" && (u ? P() : R());
|
|
112
|
-
break;
|
|
113
|
-
case "ArrowUp":
|
|
114
|
-
r === "vertical" && P();
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
const W = f % D;
|
|
118
|
-
(O = x[W].ref.current) == null || O.focus();
|
|
119
|
-
});
|
|
120
|
-
return /* @__PURE__ */ n(
|
|
121
|
-
ue,
|
|
122
|
-
{
|
|
123
|
-
scope: e,
|
|
124
|
-
disabled: t,
|
|
125
|
-
direction: i,
|
|
126
|
-
orientation: r,
|
|
127
|
-
children: /* @__PURE__ */ n(E.Slot, { scope: e, children: /* @__PURE__ */ n(
|
|
128
|
-
V.div,
|
|
129
|
-
{
|
|
130
|
-
...l,
|
|
131
|
-
"data-orientation": r,
|
|
132
|
-
ref: p,
|
|
133
|
-
onKeyDown: t ? void 0 : h
|
|
134
|
-
}
|
|
135
|
-
) })
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
), g = "AccordionItem", [me, k] = b(g), U = s.forwardRef(
|
|
140
|
-
(o, c) => {
|
|
141
|
-
const { __scopeAccordion: e, value: t, ...i } = o, r = I(g, e), l = se(g, e), a = S(e), p = ne(), m = t && l.value.includes(t) || !1, v = r.disabled || o.disabled;
|
|
142
|
-
return /* @__PURE__ */ n(
|
|
143
|
-
me,
|
|
144
|
-
{
|
|
145
|
-
scope: e,
|
|
146
|
-
open: m,
|
|
147
|
-
disabled: v,
|
|
148
|
-
triggerId: p,
|
|
149
|
-
children: /* @__PURE__ */ n(
|
|
150
|
-
re,
|
|
151
|
-
{
|
|
152
|
-
"data-orientation": r.orientation,
|
|
153
|
-
"data-state": J(m),
|
|
154
|
-
...a,
|
|
155
|
-
...i,
|
|
156
|
-
ref: c,
|
|
157
|
-
disabled: v,
|
|
158
|
-
open: m,
|
|
159
|
-
onOpenChange: (u) => {
|
|
160
|
-
u ? l.onItemOpen(t) : l.onItemClose(t);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
);
|
|
168
|
-
U.displayName = g;
|
|
169
|
-
var j = "AccordionHeader", Y = s.forwardRef(
|
|
170
|
-
(o, c) => {
|
|
171
|
-
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(j, e);
|
|
172
|
-
return /* @__PURE__ */ n(
|
|
173
|
-
V.h3,
|
|
174
|
-
{
|
|
175
|
-
"data-orientation": i.orientation,
|
|
176
|
-
"data-state": J(r.open),
|
|
177
|
-
"data-disabled": r.disabled ? "" : void 0,
|
|
178
|
-
...t,
|
|
179
|
-
ref: c
|
|
180
|
-
}
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
);
|
|
184
|
-
Y.displayName = j;
|
|
185
|
-
var y = "AccordionTrigger", q = s.forwardRef(
|
|
186
|
-
(o, c) => {
|
|
187
|
-
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(y, e), l = de(y, e), a = S(e);
|
|
188
|
-
return /* @__PURE__ */ n(E.ItemSlot, { scope: e, children: /* @__PURE__ */ n(
|
|
189
|
-
te,
|
|
190
|
-
{
|
|
191
|
-
"aria-disabled": r.open && !l.collapsible || void 0,
|
|
192
|
-
"data-orientation": i.orientation,
|
|
193
|
-
id: r.triggerId,
|
|
194
|
-
...a,
|
|
195
|
-
...t,
|
|
196
|
-
ref: c
|
|
197
|
-
}
|
|
198
|
-
) });
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
q.displayName = y;
|
|
202
|
-
var B = "AccordionContent", F = s.forwardRef(
|
|
203
|
-
(o, c) => {
|
|
204
|
-
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(B, e), l = S(e);
|
|
205
|
-
return /* @__PURE__ */ n(
|
|
206
|
-
oe,
|
|
207
|
-
{
|
|
208
|
-
role: "region",
|
|
209
|
-
"aria-labelledby": r.triggerId,
|
|
210
|
-
"data-orientation": i.orientation,
|
|
211
|
-
...l,
|
|
212
|
-
...t,
|
|
213
|
-
ref: c,
|
|
214
|
-
style: {
|
|
215
|
-
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
|
|
216
|
-
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
|
|
217
|
-
...o.style
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
);
|
|
21
|
+
return /* @__PURE__ */ y(n, { ...a, ref: r, children: l });
|
|
22
|
+
});
|
|
23
|
+
return i.displayName = `${t}.Slot`, i;
|
|
24
|
+
}
|
|
25
|
+
var V = /* @__PURE__ */ C("Slot");
|
|
26
|
+
// @__NO_SIDE_EFFECTS__
|
|
27
|
+
function R(t) {
|
|
28
|
+
const n = o.forwardRef((i, e) => {
|
|
29
|
+
let { children: r, ...l } = i;
|
|
30
|
+
if (d(r) && typeof p == "function" && (r = p(r._payload)), o.isValidElement(r)) {
|
|
31
|
+
const a = P(r), s = h(l, r.props);
|
|
32
|
+
return r.type !== o.Fragment && (s.ref = e ? S(e, a) : a), o.cloneElement(r, s);
|
|
33
|
+
}
|
|
34
|
+
return o.Children.count(r) > 1 ? o.Children.only(null) : null;
|
|
35
|
+
});
|
|
36
|
+
return n.displayName = `${t}.SlotClone`, n;
|
|
37
|
+
}
|
|
38
|
+
var _ = Symbol("radix.slottable");
|
|
39
|
+
function b(t) {
|
|
40
|
+
return o.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === _;
|
|
41
|
+
}
|
|
42
|
+
function h(t, n) {
|
|
43
|
+
const i = { ...n };
|
|
44
|
+
for (const e in n) {
|
|
45
|
+
const r = t[e], l = n[e];
|
|
46
|
+
/^on[A-Z]/.test(e) ? r && l ? i[e] = (...s) => {
|
|
47
|
+
const f = l(...s);
|
|
48
|
+
return r(...s), f;
|
|
49
|
+
} : r && (i[e] = r) : e === "style" ? i[e] = { ...r, ...l } : e === "className" && (i[e] = [r, l].filter(Boolean).join(" "));
|
|
221
50
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
function
|
|
225
|
-
|
|
51
|
+
return { ...t, ...i };
|
|
52
|
+
}
|
|
53
|
+
function P(t) {
|
|
54
|
+
var e, r;
|
|
55
|
+
let n = (e = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : e.get, i = n && "isReactWarning" in n && n.isReactWarning;
|
|
56
|
+
return i ? t.ref : (n = (r = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : r.get, i = n && "isReactWarning" in n && n.isReactWarning, i ? t.props.ref : t.props.ref || t.ref);
|
|
226
57
|
}
|
|
227
|
-
var Pe = K, Ne = U, ye = Y, Ee = q, Se = F;
|
|
228
58
|
export {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
U as AccordionItem,
|
|
233
|
-
q as AccordionTrigger,
|
|
234
|
-
Se as Content,
|
|
235
|
-
ye as Header,
|
|
236
|
-
Ne as Item,
|
|
237
|
-
Pe as Root,
|
|
238
|
-
Ee as Trigger
|
|
59
|
+
V as Root,
|
|
60
|
+
V as Slot,
|
|
61
|
+
C as createSlot
|
|
239
62
|
};
|
package/dist/index49.js
CHANGED
|
@@ -1,13 +1,120 @@
|
|
|
1
|
-
import o from "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { composeEventHandlers as T } from "./index79.js";
|
|
3
|
+
import { createContextScope as S } from "./index76.js";
|
|
4
|
+
import { useControllableState as D } from "./index80.js";
|
|
5
|
+
import { useLayoutEffect as L } from "./index84.js";
|
|
6
|
+
import { useComposedRefs as M } from "./index78.js";
|
|
7
|
+
import { Primitive as v } from "./index81.js";
|
|
8
|
+
import { Presence as k } from "./index85.js";
|
|
9
|
+
import { useId as F } from "./index82.js";
|
|
10
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
11
|
+
var u = "Collapsible", [B, W] = S(u), [G, g] = B(u), w = o.forwardRef(
|
|
12
|
+
(e, a) => {
|
|
13
|
+
const {
|
|
14
|
+
__scopeCollapsible: i,
|
|
15
|
+
open: r,
|
|
16
|
+
defaultOpen: t,
|
|
17
|
+
disabled: l,
|
|
18
|
+
onOpenChange: s,
|
|
19
|
+
...m
|
|
20
|
+
} = e, [d, p] = D({
|
|
21
|
+
prop: r,
|
|
22
|
+
defaultProp: t ?? !1,
|
|
23
|
+
onChange: s,
|
|
24
|
+
caller: u
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ c(
|
|
27
|
+
G,
|
|
28
|
+
{
|
|
29
|
+
scope: i,
|
|
30
|
+
disabled: l,
|
|
31
|
+
contentId: F(),
|
|
32
|
+
open: d,
|
|
33
|
+
onOpenToggle: o.useCallback(() => p((C) => !C), [p]),
|
|
34
|
+
children: /* @__PURE__ */ c(
|
|
35
|
+
v.div,
|
|
36
|
+
{
|
|
37
|
+
"data-state": h(d),
|
|
38
|
+
"data-disabled": l ? "" : void 0,
|
|
39
|
+
...m,
|
|
40
|
+
ref: a
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
w.displayName = u;
|
|
48
|
+
var A = "CollapsibleTrigger", I = o.forwardRef(
|
|
49
|
+
(e, a) => {
|
|
50
|
+
const { __scopeCollapsible: i, ...r } = e, t = g(A, i);
|
|
51
|
+
return /* @__PURE__ */ c(
|
|
52
|
+
v.button,
|
|
53
|
+
{
|
|
54
|
+
type: "button",
|
|
55
|
+
"aria-controls": t.contentId,
|
|
56
|
+
"aria-expanded": t.open || !1,
|
|
57
|
+
"data-state": h(t.open),
|
|
58
|
+
"data-disabled": t.disabled ? "" : void 0,
|
|
59
|
+
disabled: t.disabled,
|
|
60
|
+
...r,
|
|
61
|
+
ref: a,
|
|
62
|
+
onClick: T(e.onClick, t.onOpenToggle)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
I.displayName = A;
|
|
68
|
+
var R = "CollapsibleContent", O = o.forwardRef(
|
|
69
|
+
(e, a) => {
|
|
70
|
+
const { forceMount: i, ...r } = e, t = g(R, e.__scopeCollapsible);
|
|
71
|
+
return /* @__PURE__ */ c(k, { present: i || t.open, children: ({ present: l }) => /* @__PURE__ */ c($, { ...r, ref: a, present: l }) });
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
O.displayName = R;
|
|
75
|
+
var $ = o.forwardRef((e, a) => {
|
|
76
|
+
const { __scopeCollapsible: i, present: r, children: t, ...l } = e, s = g(R, i), [m, d] = o.useState(r), p = o.useRef(null), C = M(a, p), y = o.useRef(0), x = y.current, N = o.useRef(0), P = N.current, b = s.open || m, _ = o.useRef(b), f = o.useRef(void 0);
|
|
77
|
+
return o.useEffect(() => {
|
|
78
|
+
const n = requestAnimationFrame(() => _.current = !1);
|
|
79
|
+
return () => cancelAnimationFrame(n);
|
|
80
|
+
}, []), L(() => {
|
|
81
|
+
const n = p.current;
|
|
82
|
+
if (n) {
|
|
83
|
+
f.current = f.current || {
|
|
84
|
+
transitionDuration: n.style.transitionDuration,
|
|
85
|
+
animationName: n.style.animationName
|
|
86
|
+
}, n.style.transitionDuration = "0s", n.style.animationName = "none";
|
|
87
|
+
const E = n.getBoundingClientRect();
|
|
88
|
+
y.current = E.height, N.current = E.width, _.current || (n.style.transitionDuration = f.current.transitionDuration, n.style.animationName = f.current.animationName), d(r);
|
|
89
|
+
}
|
|
90
|
+
}, [s.open, r]), /* @__PURE__ */ c(
|
|
91
|
+
v.div,
|
|
92
|
+
{
|
|
93
|
+
"data-state": h(s.open),
|
|
94
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
95
|
+
id: s.contentId,
|
|
96
|
+
hidden: !b,
|
|
97
|
+
...l,
|
|
98
|
+
ref: C,
|
|
99
|
+
style: {
|
|
100
|
+
"--radix-collapsible-content-height": x ? `${x}px` : void 0,
|
|
101
|
+
"--radix-collapsible-content-width": P ? `${P}px` : void 0,
|
|
102
|
+
...e.style
|
|
103
|
+
},
|
|
104
|
+
children: b && t
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
function h(e) {
|
|
109
|
+
return e ? "open" : "closed";
|
|
110
|
+
}
|
|
111
|
+
var X = w, Y = I, Z = O;
|
|
11
112
|
export {
|
|
12
|
-
|
|
113
|
+
w as Collapsible,
|
|
114
|
+
O as CollapsibleContent,
|
|
115
|
+
I as CollapsibleTrigger,
|
|
116
|
+
Z as Content,
|
|
117
|
+
X as Root,
|
|
118
|
+
Y as Trigger,
|
|
119
|
+
W as createCollapsibleScope
|
|
13
120
|
};
|
package/dist/index5.js
CHANGED