@drjoshcsimmons/scl 0.2.3 → 0.2.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 +205 -167
- package/dist/index101.js +14 -9
- package/dist/index102.js +47 -29
- package/dist/index103.js +49 -47
- package/dist/index104.js +9 -4
- package/dist/index105.js +1 -1
- package/dist/index106.js +649 -5
- package/dist/index107.js +12 -647
- package/dist/index108.js +4 -30
- package/dist/index109.js +9 -30
- package/dist/index11.js +2 -2
- package/dist/index110.js +30 -15
- package/dist/index111.js +47 -24
- package/dist/index112.js +30 -9
- package/dist/index113.js +48 -6
- package/dist/index114.js +6 -48
- package/dist/index115.js +1 -1
- package/dist/index116.js +1 -1
- package/dist/index118.js +1 -1
- package/dist/index12.js +1 -1
- package/dist/index124.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index142.js +1 -1
- package/dist/index143.js +1 -1
- 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 +124 -32
- package/dist/index46.js +33 -73
- package/dist/index47.js +244 -55
- package/dist/index48.js +9 -237
- package/dist/index49.js +73 -11
- package/dist/index5.js +1 -1
- package/dist/index50.js +210 -214
- package/dist/index51.js +11 -82
- package/dist/index52.js +52 -246
- package/dist/index53.js +12 -118
- package/dist/index54.js +16 -159
- package/dist/index55.js +103 -321
- package/dist/index56.js +71 -249
- package/dist/index57.js +241 -12
- package/dist/index58.js +204 -828
- package/dist/index59.js +5 -3
- package/dist/index6.js +1 -1
- package/dist/index60.js +130 -9
- package/dist/index61.js +248 -219
- package/dist/index62.js +260 -11
- package/dist/index63.js +5 -4
- package/dist/index64.js +225 -12
- package/dist/index65.js +11 -530
- package/dist/index66.js +27 -18
- package/dist/index67.js +5 -5
- package/dist/index69.js +530 -18
- package/dist/index7.js +1 -1
- package/dist/index70.js +855 -26
- package/dist/index71.js +9 -236
- package/dist/index72.js +308 -407
- package/dist/index73.js +402 -216
- package/dist/index74.js +147 -111
- package/dist/index75.js +21 -129
- package/dist/index76.js +24 -52
- package/dist/index77.js +67 -10
- package/dist/index78.js +7 -4
- package/dist/index79.js +52 -30
- package/dist/index8.js +1 -1
- package/dist/index80.js +5 -12
- package/dist/index81.js +24 -67
- package/dist/index82.js +66 -43
- package/dist/index83.js +32 -25
- package/dist/index84.js +8 -6
- package/dist/index85.js +52 -49
- package/dist/index86.js +10 -33
- package/dist/index87.js +4 -11
- package/dist/index88.js +30 -8
- package/dist/index89.js +11 -123
- package/dist/index9.js +2 -2
- package/dist/index90.js +45 -14
- package/dist/index91.js +10 -134
- package/dist/index92.js +7 -218
- package/dist/index93.js +30 -14
- package/dist/index94.js +51 -65
- package/dist/index95.js +29 -47
- package/dist/index96.js +179 -48
- package/dist/index97.js +124 -8
- package/dist/index98.js +12 -52
- package/dist/index99.js +134 -29
- package/package.json +1 -1
package/dist/index55.js
CHANGED
|
@@ -1,338 +1,120 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { composeEventHandlers as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { Root as ne } from "./index102.js";
|
|
14
|
-
import { jsx as f, jsxs as se } from "react/jsx-runtime";
|
|
15
|
-
var [D] = K("Tooltip", [
|
|
16
|
-
S
|
|
17
|
-
]), O = S(), j = "TooltipProvider", ie = 700, L = "tooltip.open", [ae, k] = D(j), F = (t) => {
|
|
18
|
-
const {
|
|
19
|
-
__scopeTooltip: o,
|
|
20
|
-
delayDuration: e = ie,
|
|
21
|
-
skipDelayDuration: r = 300,
|
|
22
|
-
disableHoverableContent: n = !1,
|
|
23
|
-
children: a
|
|
24
|
-
} = t, l = s.useRef(!0), v = s.useRef(!1), i = s.useRef(0);
|
|
25
|
-
return s.useEffect(() => {
|
|
26
|
-
const p = i.current;
|
|
27
|
-
return () => window.clearTimeout(p);
|
|
28
|
-
}, []), /* @__PURE__ */ f(
|
|
29
|
-
ae,
|
|
30
|
-
{
|
|
31
|
-
scope: o,
|
|
32
|
-
isOpenDelayedRef: l,
|
|
33
|
-
delayDuration: e,
|
|
34
|
-
onOpen: s.useCallback(() => {
|
|
35
|
-
window.clearTimeout(i.current), l.current = !1;
|
|
36
|
-
}, []),
|
|
37
|
-
onClose: s.useCallback(() => {
|
|
38
|
-
window.clearTimeout(i.current), i.current = window.setTimeout(
|
|
39
|
-
() => l.current = !0,
|
|
40
|
-
r
|
|
41
|
-
);
|
|
42
|
-
}, [r]),
|
|
43
|
-
isPointerInTransitRef: v,
|
|
44
|
-
onPointerInTransitChange: s.useCallback((p) => {
|
|
45
|
-
v.current = p;
|
|
46
|
-
}, []),
|
|
47
|
-
disableHoverableContent: n,
|
|
48
|
-
children: a
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
F.displayName = j;
|
|
53
|
-
var R = "Tooltip", [le, _] = D(R), B = (t) => {
|
|
54
|
-
const {
|
|
55
|
-
__scopeTooltip: o,
|
|
56
|
-
children: e,
|
|
57
|
-
open: r,
|
|
58
|
-
defaultOpen: n,
|
|
59
|
-
onOpenChange: a,
|
|
60
|
-
disableHoverableContent: l,
|
|
61
|
-
delayDuration: v
|
|
62
|
-
} = t, i = k(R, t.__scopeTooltip), p = O(o), [c, d] = s.useState(null), h = $(), u = s.useRef(0), m = l ?? i.disableHoverableContent, y = v ?? i.delayDuration, T = s.useRef(!1), [x, C] = re({
|
|
63
|
-
prop: r,
|
|
64
|
-
defaultProp: n ?? !1,
|
|
65
|
-
onChange: (H) => {
|
|
66
|
-
H ? (i.onOpen(), document.dispatchEvent(new CustomEvent(L))) : i.onClose(), a == null || a(H);
|
|
67
|
-
},
|
|
68
|
-
caller: R
|
|
69
|
-
}), w = s.useMemo(() => x ? T.current ? "delayed-open" : "instant-open" : "closed", [x]), P = s.useCallback(() => {
|
|
70
|
-
window.clearTimeout(u.current), u.current = 0, T.current = !1, C(!0);
|
|
71
|
-
}, [C]), E = s.useCallback(() => {
|
|
72
|
-
window.clearTimeout(u.current), u.current = 0, C(!1);
|
|
73
|
-
}, [C]), I = s.useCallback(() => {
|
|
74
|
-
window.clearTimeout(u.current), u.current = window.setTimeout(() => {
|
|
75
|
-
T.current = !0, C(!0), u.current = 0;
|
|
76
|
-
}, y);
|
|
77
|
-
}, [y, C]);
|
|
78
|
-
return s.useEffect(() => () => {
|
|
79
|
-
u.current && (window.clearTimeout(u.current), u.current = 0);
|
|
80
|
-
}, []), /* @__PURE__ */ f(z, { ...p, children: /* @__PURE__ */ f(
|
|
81
|
-
le,
|
|
82
|
-
{
|
|
83
|
-
scope: o,
|
|
84
|
-
contentId: h,
|
|
85
|
-
open: x,
|
|
86
|
-
stateAttribute: w,
|
|
87
|
-
trigger: c,
|
|
88
|
-
onTriggerChange: d,
|
|
89
|
-
onTriggerEnter: s.useCallback(() => {
|
|
90
|
-
i.isOpenDelayedRef.current ? I() : P();
|
|
91
|
-
}, [i.isOpenDelayedRef, I, P]),
|
|
92
|
-
onTriggerLeave: s.useCallback(() => {
|
|
93
|
-
m ? E() : (window.clearTimeout(u.current), u.current = 0);
|
|
94
|
-
}, [E, m]),
|
|
95
|
-
onOpen: P,
|
|
96
|
-
onClose: E,
|
|
97
|
-
disableHoverableContent: m,
|
|
98
|
-
children: e
|
|
99
|
-
}
|
|
100
|
-
) });
|
|
101
|
-
};
|
|
102
|
-
B.displayName = R;
|
|
103
|
-
var A = "TooltipTrigger", U = s.forwardRef(
|
|
104
|
-
(t, o) => {
|
|
105
|
-
const { __scopeTooltip: e, ...r } = t, n = _(A, e), a = k(A, e), l = O(e), v = s.useRef(null), i = N(o, v, n.onTriggerChange), p = s.useRef(!1), c = s.useRef(!1), d = s.useCallback(() => p.current = !1, []);
|
|
106
|
-
return s.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ f(J, { asChild: !0, ...l, children: /* @__PURE__ */ f(
|
|
107
|
-
te.button,
|
|
108
|
-
{
|
|
109
|
-
"aria-describedby": n.open ? n.contentId : void 0,
|
|
110
|
-
"data-state": n.stateAttribute,
|
|
111
|
-
...r,
|
|
112
|
-
ref: i,
|
|
113
|
-
onPointerMove: g(t.onPointerMove, (h) => {
|
|
114
|
-
h.pointerType !== "touch" && !c.current && !a.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
|
|
115
|
-
}),
|
|
116
|
-
onPointerLeave: g(t.onPointerLeave, () => {
|
|
117
|
-
n.onTriggerLeave(), c.current = !1;
|
|
118
|
-
}),
|
|
119
|
-
onPointerDown: g(t.onPointerDown, () => {
|
|
120
|
-
n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", d, { once: !0 });
|
|
121
|
-
}),
|
|
122
|
-
onFocus: g(t.onFocus, () => {
|
|
123
|
-
p.current || n.onOpen();
|
|
124
|
-
}),
|
|
125
|
-
onBlur: g(t.onBlur, n.onClose),
|
|
126
|
-
onClick: g(t.onClick, n.onClose)
|
|
127
|
-
}
|
|
128
|
-
) });
|
|
129
|
-
}
|
|
130
|
-
);
|
|
131
|
-
U.displayName = A;
|
|
132
|
-
var M = "TooltipPortal", [ce, ue] = D(M, {
|
|
133
|
-
forceMount: void 0
|
|
134
|
-
}), V = (t) => {
|
|
135
|
-
const { __scopeTooltip: o, forceMount: e, children: r, container: n } = t, a = _(M, o);
|
|
136
|
-
return /* @__PURE__ */ f(ce, { scope: o, forceMount: e, children: /* @__PURE__ */ f(G, { present: e || a.open, children: /* @__PURE__ */ f(ee, { asChild: !0, container: n, children: r }) }) });
|
|
137
|
-
};
|
|
138
|
-
V.displayName = M;
|
|
139
|
-
var b = "TooltipContent", Y = s.forwardRef(
|
|
140
|
-
(t, o) => {
|
|
141
|
-
const e = ue(b, t.__scopeTooltip), { forceMount: r = e.forceMount, side: n = "top", ...a } = t, l = _(b, t.__scopeTooltip);
|
|
142
|
-
return /* @__PURE__ */ f(G, { present: r || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ f(q, { side: n, ...a, ref: o }) : /* @__PURE__ */ f(pe, { side: n, ...a, ref: o }) });
|
|
143
|
-
}
|
|
144
|
-
), pe = s.forwardRef((t, o) => {
|
|
145
|
-
const e = _(b, t.__scopeTooltip), r = k(b, t.__scopeTooltip), n = s.useRef(null), a = N(o, n), [l, v] = s.useState(null), { trigger: i, onClose: p } = e, c = n.current, { onPointerInTransitChange: d } = r, h = s.useCallback(() => {
|
|
146
|
-
v(null), d(!1);
|
|
147
|
-
}, [d]), u = s.useCallback(
|
|
148
|
-
(m, y) => {
|
|
149
|
-
const T = m.currentTarget, x = { x: m.clientX, y: m.clientY }, C = me(x, T.getBoundingClientRect()), w = Te(x, C), P = ye(y.getBoundingClientRect()), E = xe([...w, ...P]);
|
|
150
|
-
v(E), d(!0);
|
|
151
|
-
},
|
|
152
|
-
[d]
|
|
153
|
-
);
|
|
154
|
-
return s.useEffect(() => () => h(), [h]), s.useEffect(() => {
|
|
155
|
-
if (i && c) {
|
|
156
|
-
const m = (T) => u(T, c), y = (T) => u(T, i);
|
|
157
|
-
return i.addEventListener("pointerleave", m), c.addEventListener("pointerleave", y), () => {
|
|
158
|
-
i.removeEventListener("pointerleave", m), c.removeEventListener("pointerleave", y);
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}, [i, c, u, h]), s.useEffect(() => {
|
|
162
|
-
if (l) {
|
|
163
|
-
const m = (y) => {
|
|
164
|
-
const T = y.target, x = { x: y.clientX, y: y.clientY }, C = (i == null ? void 0 : i.contains(T)) || (c == null ? void 0 : c.contains(T)), w = !Ce(x, l);
|
|
165
|
-
C ? h() : w && (h(), p());
|
|
166
|
-
};
|
|
167
|
-
return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
|
|
168
|
-
}
|
|
169
|
-
}, [i, c, l, p, h]), /* @__PURE__ */ f(q, { ...t, ref: a });
|
|
170
|
-
}), [de, fe] = D(R, { isInside: !1 }), ve = oe("TooltipContent"), q = s.forwardRef(
|
|
171
|
-
(t, o) => {
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { composeEventHandlers as T } from "./index78.js";
|
|
3
|
+
import { createContextScope as S } from "./index77.js";
|
|
4
|
+
import { useControllableState as D } from "./index79.js";
|
|
5
|
+
import { useLayoutEffect as L } from "./index87.js";
|
|
6
|
+
import { useComposedRefs as M } from "./index76.js";
|
|
7
|
+
import { Primitive as v } from "./index83.js";
|
|
8
|
+
import { Presence as k } from "./index82.js";
|
|
9
|
+
import { useId as F } from "./index91.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) => {
|
|
172
13
|
const {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
...
|
|
179
|
-
} =
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
}, [i.trigger, c]), /* @__PURE__ */ f(
|
|
189
|
-
W,
|
|
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,
|
|
190
28
|
{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
Q,
|
|
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,
|
|
199
36
|
{
|
|
200
|
-
"data-state":
|
|
201
|
-
|
|
202
|
-
...
|
|
203
|
-
ref:
|
|
204
|
-
style: {
|
|
205
|
-
...v.style,
|
|
206
|
-
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
207
|
-
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
208
|
-
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
209
|
-
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
210
|
-
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
211
|
-
},
|
|
212
|
-
children: [
|
|
213
|
-
/* @__PURE__ */ f(ve, { children: r }),
|
|
214
|
-
/* @__PURE__ */ f(de, { scope: e, isInside: !0, children: /* @__PURE__ */ f(ne, { id: i.contentId, role: "tooltip", children: n || r }) })
|
|
215
|
-
]
|
|
37
|
+
"data-state": h(d),
|
|
38
|
+
"data-disabled": l ? "" : void 0,
|
|
39
|
+
...m,
|
|
40
|
+
ref: a
|
|
216
41
|
}
|
|
217
42
|
)
|
|
218
43
|
}
|
|
219
44
|
);
|
|
220
45
|
}
|
|
221
46
|
);
|
|
222
|
-
|
|
223
|
-
var
|
|
224
|
-
(
|
|
225
|
-
const {
|
|
226
|
-
return
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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
|
+
);
|
|
230
65
|
}
|
|
231
66
|
);
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
return "left";
|
|
238
|
-
case n:
|
|
239
|
-
return "right";
|
|
240
|
-
case e:
|
|
241
|
-
return "top";
|
|
242
|
-
case r:
|
|
243
|
-
return "bottom";
|
|
244
|
-
default:
|
|
245
|
-
throw new Error("unreachable");
|
|
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 }) });
|
|
246
72
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
);
|
|
262
|
-
|
|
263
|
-
case "left":
|
|
264
|
-
r.push(
|
|
265
|
-
{ x: t.x + e, y: t.y - e },
|
|
266
|
-
{ x: t.x + e, y: t.y + e }
|
|
267
|
-
);
|
|
268
|
-
break;
|
|
269
|
-
case "right":
|
|
270
|
-
r.push(
|
|
271
|
-
{ x: t.x - e, y: t.y - e },
|
|
272
|
-
{ x: t.x - e, y: t.y + e }
|
|
273
|
-
);
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
return r;
|
|
277
|
-
}
|
|
278
|
-
function ye(t) {
|
|
279
|
-
const { top: o, right: e, bottom: r, left: n } = t;
|
|
280
|
-
return [
|
|
281
|
-
{ x: n, y: o },
|
|
282
|
-
{ x: e, y: o },
|
|
283
|
-
{ x: e, y: r },
|
|
284
|
-
{ x: n, y: r }
|
|
285
|
-
];
|
|
286
|
-
}
|
|
287
|
-
function Ce(t, o) {
|
|
288
|
-
const { x: e, y: r } = t;
|
|
289
|
-
let n = !1;
|
|
290
|
-
for (let a = 0, l = o.length - 1; a < o.length; l = a++) {
|
|
291
|
-
const v = o[a], i = o[l], p = v.x, c = v.y, d = i.x, h = i.y;
|
|
292
|
-
c > r != h > r && e < (d - p) * (r - c) / (h - c) + p && (n = !n);
|
|
293
|
-
}
|
|
294
|
-
return n;
|
|
295
|
-
}
|
|
296
|
-
function xe(t) {
|
|
297
|
-
const o = t.slice();
|
|
298
|
-
return o.sort((e, r) => e.x < r.x ? -1 : e.x > r.x ? 1 : e.y < r.y ? -1 : e.y > r.y ? 1 : 0), ge(o);
|
|
299
|
-
}
|
|
300
|
-
function ge(t) {
|
|
301
|
-
if (t.length <= 1) return t.slice();
|
|
302
|
-
const o = [];
|
|
303
|
-
for (let r = 0; r < t.length; r++) {
|
|
304
|
-
const n = t[r];
|
|
305
|
-
for (; o.length >= 2; ) {
|
|
306
|
-
const a = o[o.length - 1], l = o[o.length - 2];
|
|
307
|
-
if ((a.x - l.x) * (n.y - l.y) >= (a.y - l.y) * (n.x - l.x)) o.pop();
|
|
308
|
-
else break;
|
|
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);
|
|
309
89
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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
|
|
320
105
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
function h(e) {
|
|
109
|
+
return e ? "open" : "closed";
|
|
324
110
|
}
|
|
325
|
-
var
|
|
111
|
+
var X = w, Y = I, Z = O;
|
|
326
112
|
export {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
V as TooltipPortal,
|
|
335
|
-
F as TooltipProvider,
|
|
336
|
-
U as TooltipTrigger,
|
|
337
|
-
Se as Trigger
|
|
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
|
|
338
120
|
};
|