@drjoshcsimmons/scl 0.1.9 → 0.1.10
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 +50 -14
- package/dist/index102.js +9 -50
- package/dist/index103.js +15 -9
- package/dist/index104.js +218 -3
- package/dist/index105.js +7 -46
- package/dist/index108.js +47 -29
- package/dist/index109.js +30 -181
- package/dist/index11.js +2 -2
- package/dist/index110.js +54 -8
- package/dist/index111.js +30 -650
- package/dist/index112.js +13 -30
- package/dist/index115.js +48 -6
- 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/index124.js +6 -48
- package/dist/index125.js +25 -2
- package/dist/index126.js +29 -53
- package/dist/index127.js +5 -65
- package/dist/index128.js +2 -2
- package/dist/index129.js +53 -2
- package/dist/index13.js +2 -2
- package/dist/index130.js +63 -23
- package/dist/index131.js +5 -29
- package/dist/index132.js +3 -5
- package/dist/index133.js +24 -5
- package/dist/index134.js +113 -3
- package/dist/index135.js +15 -23
- package/dist/index136.js +2 -113
- package/dist/index137.js +2 -16
- package/dist/index14.js +2 -2
- package/dist/index141.js +1 -1
- package/dist/index142.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 +1 -1
- 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 +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/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 +12 -73
- package/dist/index49.js +9 -125
- package/dist/index50.js +55 -244
- package/dist/index51.js +118 -9
- package/dist/index52.js +237 -298
- package/dist/index53.js +22 -12
- package/dist/index54.js +234 -58
- package/dist/index55.js +4 -5
- package/dist/index56.js +506 -94
- package/dist/index57.js +215 -72
- package/dist/index58.js +11 -241
- package/dist/index59.js +68 -846
- package/dist/index6.js +1 -1
- package/dist/index60.js +260 -9
- package/dist/index61.js +12 -254
- package/dist/index62.js +402 -227
- package/dist/index63.js +125 -12
- package/dist/index64.js +30 -434
- package/dist/index65.js +308 -16
- package/dist/index66.js +12 -130
- package/dist/index67.js +310 -504
- package/dist/index68.js +248 -219
- package/dist/index69.js +241 -11
- package/dist/index7.js +1 -1
- package/dist/index70.js +860 -11
- package/dist/index71.js +9 -236
- package/dist/index72.js +16 -334
- package/dist/index73.js +130 -31
- package/dist/index74.js +2 -2
- package/dist/index75.js +71 -20
- package/dist/index80.js +1 -1
- package/dist/index82.js +1 -1
- package/dist/index84.js +4 -9
- package/dist/index85.js +65 -51
- package/dist/index86.js +30 -11
- package/dist/index87.js +6 -4
- package/dist/index88.js +25 -30
- package/dist/index89.js +178 -10
- package/dist/index9.js +1 -1
- package/dist/index90.js +10 -5
- package/dist/index91.js +3 -24
- package/dist/index92.js +643 -62
- package/dist/index93.js +53 -13
- package/dist/index94.js +30 -55
- package/dist/index95.js +124 -29
- package/dist/index96.js +125 -115
- package/dist/index97.js +13 -14
- package/dist/index98.js +14 -134
- package/dist/index99.js +8 -218
- package/package.json +1 -1
package/dist/index73.js
CHANGED
|
@@ -1,33 +1,132 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { composeEventHandlers as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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 "./index87.js";
|
|
7
|
+
import { useSize as j } from "./index88.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) => {
|
|
12
|
+
const {
|
|
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
|
|
28
|
+
});
|
|
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
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
);
|
|
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,
|
|
71
|
+
{
|
|
72
|
+
"data-state": g(o.checked),
|
|
73
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
74
|
+
...c,
|
|
75
|
+
ref: a
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
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);
|
|
100
|
+
}
|
|
101
|
+
}, [p, e, c]), /* @__PURE__ */ m(
|
|
102
|
+
"input",
|
|
103
|
+
{
|
|
104
|
+
type: "checkbox",
|
|
105
|
+
"aria-hidden": !0,
|
|
106
|
+
defaultChecked: e,
|
|
107
|
+
...o,
|
|
108
|
+
tabIndex: -1,
|
|
109
|
+
ref: n,
|
|
110
|
+
style: {
|
|
111
|
+
...o.style,
|
|
112
|
+
...w,
|
|
113
|
+
position: "absolute",
|
|
114
|
+
pointerEvents: "none",
|
|
115
|
+
opacity: 0,
|
|
116
|
+
margin: 0
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
x.displayName = L;
|
|
123
|
+
function g(t) {
|
|
124
|
+
return t ? "checked" : "unchecked";
|
|
125
|
+
}
|
|
126
|
+
var Q = R, V = _;
|
|
30
127
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
128
|
+
Q as Root,
|
|
129
|
+
R as Switch,
|
|
130
|
+
_ as SwitchThumb,
|
|
131
|
+
V as Thumb
|
|
33
132
|
};
|
package/dist/index74.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as v from "react";
|
|
2
2
|
import { composeEventHandlers as g } from "./index79.js";
|
|
3
3
|
import { createContextScope as x } from "./index76.js";
|
|
4
|
-
import { createRovingFocusGroupScope as C, Root as E, Item as F } from "./
|
|
5
|
-
import { Presence as w } from "./
|
|
4
|
+
import { createRovingFocusGroupScope as C, Root as E, Item as F } from "./index89.js";
|
|
5
|
+
import { Presence as w } from "./index85.js";
|
|
6
6
|
import { Primitive as b } from "./index81.js";
|
|
7
7
|
import { useDirection as D } from "./index83.js";
|
|
8
8
|
import { useControllableState as V } from "./index80.js";
|
package/dist/index75.js
CHANGED
|
@@ -1,24 +1,75 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { createContextScope as C } from "./index110.js";
|
|
3
|
+
import { useCallbackRef as h } from "./index90.js";
|
|
4
|
+
import { useLayoutEffect as f } from "./index84.js";
|
|
5
|
+
import { Primitive as m } from "./index111.js";
|
|
6
|
+
import { useIsHydrated as _ } from "./index112.js";
|
|
7
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
8
|
+
var v = "Avatar", [y] = C(v), [x, A] = y(v), L = i.forwardRef(
|
|
9
|
+
(t, e) => {
|
|
10
|
+
const { __scopeAvatar: o, ...r } = t, [n, a] = i.useState("idle");
|
|
11
|
+
return /* @__PURE__ */ l(
|
|
12
|
+
x,
|
|
13
|
+
{
|
|
14
|
+
scope: o,
|
|
15
|
+
imageLoadingStatus: n,
|
|
16
|
+
onImageLoadingStatusChange: a,
|
|
17
|
+
children: /* @__PURE__ */ l(m.span, { ...r, ref: e })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
L.displayName = v;
|
|
23
|
+
var S = "AvatarImage", E = i.forwardRef(
|
|
24
|
+
(t, e) => {
|
|
25
|
+
const { __scopeAvatar: o, src: r, onLoadingStatusChange: n = () => {
|
|
26
|
+
}, ...a } = t, u = A(S, o), s = N(r, a), d = h((c) => {
|
|
27
|
+
n(c), u.onImageLoadingStatusChange(c);
|
|
28
|
+
});
|
|
29
|
+
return f(() => {
|
|
30
|
+
s !== "idle" && d(s);
|
|
31
|
+
}, [s, d]), s === "loaded" ? /* @__PURE__ */ l(m.img, { ...a, ref: e, src: r }) : null;
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
E.displayName = S;
|
|
35
|
+
var I = "AvatarFallback", R = i.forwardRef(
|
|
36
|
+
(t, e) => {
|
|
37
|
+
const { __scopeAvatar: o, delayMs: r, ...n } = t, a = A(I, o), [u, s] = i.useState(r === void 0);
|
|
38
|
+
return i.useEffect(() => {
|
|
39
|
+
if (r !== void 0) {
|
|
40
|
+
const d = window.setTimeout(() => s(!0), r);
|
|
41
|
+
return () => window.clearTimeout(d);
|
|
42
|
+
}
|
|
43
|
+
}, [r]), u && a.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ l(m.span, { ...n, ref: e }) : null;
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
R.displayName = I;
|
|
47
|
+
function p(t, e) {
|
|
48
|
+
return t ? e ? (t.src !== e && (t.src = e), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
49
|
+
}
|
|
50
|
+
function N(t, { referrerPolicy: e, crossOrigin: o }) {
|
|
51
|
+
const r = _(), n = i.useRef(null), a = r ? (n.current || (n.current = new window.Image()), n.current) : null, [u, s] = i.useState(
|
|
52
|
+
() => p(a, t)
|
|
14
53
|
);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
54
|
+
return f(() => {
|
|
55
|
+
s(p(a, t));
|
|
56
|
+
}, [a, t]), f(() => {
|
|
57
|
+
const d = (w) => () => {
|
|
58
|
+
s(w);
|
|
59
|
+
};
|
|
60
|
+
if (!a) return;
|
|
61
|
+
const c = d("loaded"), g = d("error");
|
|
62
|
+
return a.addEventListener("load", c), a.addEventListener("error", g), e && (a.referrerPolicy = e), typeof o == "string" && (a.crossOrigin = o), () => {
|
|
63
|
+
a.removeEventListener("load", c), a.removeEventListener("error", g);
|
|
64
|
+
};
|
|
65
|
+
}, [a, o, e]), u;
|
|
19
66
|
}
|
|
20
|
-
var
|
|
67
|
+
var H = L, j = E, B = R;
|
|
21
68
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
69
|
+
L as Avatar,
|
|
70
|
+
R as AvatarFallback,
|
|
71
|
+
E as AvatarImage,
|
|
72
|
+
B as Fallback,
|
|
73
|
+
j as Image,
|
|
74
|
+
H as Root
|
|
24
75
|
};
|
package/dist/index80.js
CHANGED
package/dist/index82.js
CHANGED
package/dist/index84.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// @__NO_SIDE_EFFECTS__
|
|
5
|
-
function n(r) {
|
|
6
|
-
const t = ({ children: a }) => /* @__PURE__ */ e(o, { children: a });
|
|
7
|
-
return t.displayName = `${r}.Slottable`, t.__radixId = l, t;
|
|
8
|
-
}
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
var e = globalThis != null && globalThis.document ? t.useLayoutEffect : () => {
|
|
3
|
+
};
|
|
9
4
|
export {
|
|
10
|
-
|
|
5
|
+
e as useLayoutEffect
|
|
11
6
|
};
|
package/dist/index85.js
CHANGED
|
@@ -1,57 +1,71 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { useComposedRefs as E } from "./index78.js";
|
|
3
|
+
import { useLayoutEffect as A } from "./index84.js";
|
|
4
|
+
function T(n, e) {
|
|
5
|
+
return a.useReducer((r, t) => e[r][t] ?? r, n);
|
|
6
|
+
}
|
|
7
|
+
var R = (n) => {
|
|
8
|
+
const { present: e, children: r } = n, t = v(e), i = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), c = E(t.ref, P(i));
|
|
9
|
+
return typeof r == "function" || t.isPresent ? a.cloneElement(i, { ref: c }) : null;
|
|
10
|
+
};
|
|
11
|
+
R.displayName = "Presence";
|
|
12
|
+
function v(n) {
|
|
13
|
+
const [e, r] = a.useState(), t = a.useRef(null), i = a.useRef(n), c = a.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = T(p, {
|
|
14
|
+
mounted: {
|
|
15
|
+
UNMOUNT: "unmounted",
|
|
16
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
17
|
+
},
|
|
18
|
+
unmountSuspended: {
|
|
19
|
+
MOUNT: "mounted",
|
|
20
|
+
ANIMATION_END: "unmounted"
|
|
21
|
+
},
|
|
22
|
+
unmounted: {
|
|
23
|
+
MOUNT: "mounted"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return a.useEffect(() => {
|
|
27
|
+
const o = l(t.current);
|
|
28
|
+
c.current = N === "mounted" ? o : "none";
|
|
29
|
+
}, [N]), A(() => {
|
|
30
|
+
const o = t.current, m = i.current;
|
|
31
|
+
if (m !== n) {
|
|
32
|
+
const f = c.current, u = l(o);
|
|
33
|
+
n ? s("MOUNT") : u === "none" || (o == null ? void 0 : o.display) === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), i.current = n;
|
|
22
34
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
}, [n, s]), A(() => {
|
|
36
|
+
if (e) {
|
|
37
|
+
let o;
|
|
38
|
+
const m = e.ownerDocument.defaultView ?? window, d = (u) => {
|
|
39
|
+
const g = l(t.current).includes(CSS.escape(u.animationName));
|
|
40
|
+
if (u.target === e && g && (s("ANIMATION_END"), !i.current)) {
|
|
41
|
+
const O = e.style.animationFillMode;
|
|
42
|
+
e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
|
|
43
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}, f = (u) => {
|
|
47
|
+
u.target === e && (c.current = l(t.current));
|
|
48
|
+
};
|
|
49
|
+
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
|
|
50
|
+
m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
|
|
51
|
+
};
|
|
52
|
+
} else
|
|
53
|
+
s("ANIMATION_END");
|
|
54
|
+
}, [e, s]), {
|
|
55
|
+
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
56
|
+
ref: a.useCallback((o) => {
|
|
57
|
+
t.current = o ? getComputedStyle(o) : null, r(o);
|
|
58
|
+
}, [])
|
|
34
59
|
};
|
|
35
|
-
return u.scopeName = e, [f, h(u, ...x)];
|
|
36
60
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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;
|
|
61
|
+
function l(n) {
|
|
62
|
+
return (n == null ? void 0 : n.animationName) || "none";
|
|
63
|
+
}
|
|
64
|
+
function P(n) {
|
|
65
|
+
var t, i;
|
|
66
|
+
let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
|
|
67
|
+
return r ? n.ref : (e = (i = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : i.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
|
|
54
68
|
}
|
|
55
69
|
export {
|
|
56
|
-
|
|
70
|
+
R as Presence
|
|
57
71
|
};
|
package/dist/index86.js
CHANGED
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import "react-dom";
|
|
3
|
+
import { createSlot as l } from "./index50.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
|
+
}, {});
|
|
11
30
|
export {
|
|
12
|
-
|
|
31
|
+
w as Primitive
|
|
13
32
|
};
|
package/dist/index87.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
};
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
function t(r) {
|
|
3
|
+
const e = u.useRef({ value: r, previous: r });
|
|
4
|
+
return u.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
|
|
5
|
+
}
|
|
4
6
|
export {
|
|
5
|
-
|
|
7
|
+
t as usePrevious
|
|
6
8
|
};
|
package/dist/index88.js
CHANGED
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
}, {});
|
|
1
|
+
import * as h from "react";
|
|
2
|
+
import { useLayoutEffect as z } from "./index84.js";
|
|
3
|
+
function c(r) {
|
|
4
|
+
const [d, e] = h.useState(void 0);
|
|
5
|
+
return z(() => {
|
|
6
|
+
if (r) {
|
|
7
|
+
e({ width: r.offsetWidth, height: r.offsetHeight });
|
|
8
|
+
const f = new ResizeObserver((i) => {
|
|
9
|
+
if (!Array.isArray(i) || !i.length)
|
|
10
|
+
return;
|
|
11
|
+
const b = i[0];
|
|
12
|
+
let o, t;
|
|
13
|
+
if ("borderBoxSize" in b) {
|
|
14
|
+
const s = b.borderBoxSize, u = Array.isArray(s) ? s[0] : s;
|
|
15
|
+
o = u.inlineSize, t = u.blockSize;
|
|
16
|
+
} else
|
|
17
|
+
o = r.offsetWidth, t = r.offsetHeight;
|
|
18
|
+
e({ width: o, height: t });
|
|
19
|
+
});
|
|
20
|
+
return f.observe(r, { box: "border-box" }), () => f.unobserve(r);
|
|
21
|
+
} else
|
|
22
|
+
e(void 0);
|
|
23
|
+
}, [r]), d;
|
|
24
|
+
}
|
|
30
25
|
export {
|
|
31
|
-
|
|
26
|
+
c as useSize
|
|
32
27
|
};
|