@drjoshcsimmons/scl 0.2.4 → 0.2.7
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 +12 -178
- package/dist/index101.js +5 -54
- package/dist/index102.js +25 -30
- package/dist/index103.js +55 -30
- package/dist/index104.js +30 -15
- package/dist/index105.js +219 -30
- package/dist/index106.js +7 -46
- package/dist/index107.js +29 -47
- package/dist/index108.js +177 -51
- package/dist/index109.js +650 -30
- package/dist/index11.js +2 -2
- package/dist/index110.js +30 -13
- package/dist/index111.js +44 -646
- package/dist/index112.js +46 -7
- package/dist/index113.js +6 -48
- package/dist/index115.js +47 -11
- package/dist/index116.js +10 -204
- package/dist/index117.js +20 -21
- package/dist/index118.js +9 -400
- package/dist/index119.js +32 -15
- package/dist/index12.js +1 -1
- package/dist/index120.js +12 -3
- package/dist/index121.js +206 -38
- package/dist/index122.js +22 -18
- package/dist/index123.js +400 -6
- package/dist/index125.js +2 -25
- package/dist/index126.js +53 -29
- package/dist/index127.js +65 -5
- package/dist/index128.js +25 -2
- package/dist/index129.js +29 -53
- package/dist/index13.js +2 -2
- package/dist/index130.js +5 -65
- package/dist/index131.js +2 -5
- package/dist/index132.js +2 -3
- package/dist/index133.js +5 -24
- package/dist/index134.js +3 -113
- package/dist/index135.js +23 -15
- package/dist/index136.js +107 -519
- package/dist/index137.js +14 -126
- package/dist/index138.js +516 -125
- package/dist/index139.js +128 -2
- package/dist/index14.js +2 -2
- package/dist/index140.js +134 -2
- package/dist/index141.js +1 -1
- package/dist/index145.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/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 +70 -57
- package/dist/index49.js +114 -107
- package/dist/index50.js +517 -112
- package/dist/index51.js +227 -402
- package/dist/index52.js +12 -860
- package/dist/index53.js +60 -9
- package/dist/index54.js +18 -9
- package/dist/index55.js +12 -130
- package/dist/index56.js +9 -530
- package/dist/index57.js +302 -153
- package/dist/index58.js +12 -82
- package/dist/index59.js +80 -16
- package/dist/index6.js +1 -1
- package/dist/index60.js +91 -197
- package/dist/index61.js +435 -11
- package/dist/index62.js +245 -27
- package/dist/index63.js +215 -300
- package/dist/index64.js +3 -4
- package/dist/index65.js +11 -260
- package/dist/index66.js +336 -12
- package/dist/index67.js +160 -21
- package/dist/index68.js +18 -221
- package/dist/index69.js +860 -11
- package/dist/index7.js +1 -1
- package/dist/index70.js +9 -241
- package/dist/index71.js +30 -72
- package/dist/index72.js +254 -12
- package/dist/index73.js +212 -225
- package/dist/index74.js +103 -321
- package/dist/index75.js +235 -248
- package/dist/index77.js +1 -1
- package/dist/index80.js +1 -1
- package/dist/index81.js +1 -1
- package/dist/index82.js +1 -1
- package/dist/index84.js +55 -4
- package/dist/index85.js +10 -68
- package/dist/index86.js +4 -9
- package/dist/index87.js +30 -4
- package/dist/index88.js +12 -5
- package/dist/index89.js +8 -24
- package/dist/index9.js +1 -1
- package/dist/index90.js +64 -120
- package/dist/index91.js +3 -14
- package/dist/index92.js +115 -125
- package/dist/index93.js +128 -212
- package/dist/index94.js +1 -1
- package/dist/index95.js +13 -46
- package/dist/index96.js +8 -10
- package/dist/index97.js +50 -30
- package/dist/index98.js +47 -49
- package/dist/index99.js +30 -9
- package/package.json +5 -3
package/dist/index85.js
CHANGED
|
@@ -1,71 +1,13 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
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;
|
|
34
|
-
}
|
|
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
|
-
}, [])
|
|
59
|
-
};
|
|
60
|
-
}
|
|
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);
|
|
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
|
+
}, []);
|
|
68
10
|
}
|
|
69
11
|
export {
|
|
70
|
-
|
|
12
|
+
o as useCallbackRef
|
|
71
13
|
};
|
package/dist/index86.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/index87.js
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import "react-dom";
|
|
3
|
+
import { createSlot as l } from "./index53.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
|
+
}, {});
|
|
4
30
|
export {
|
|
5
|
-
|
|
31
|
+
w as Primitive
|
|
6
32
|
};
|
package/dist/index88.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { s as r } from "./index113.js";
|
|
2
|
+
function s() {
|
|
3
|
+
return r.useSyncExternalStore(
|
|
4
|
+
e,
|
|
5
|
+
() => !0,
|
|
6
|
+
() => !1
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
function e() {
|
|
10
|
+
return () => {
|
|
11
|
+
};
|
|
5
12
|
}
|
|
6
13
|
export {
|
|
7
|
-
|
|
14
|
+
s as useIsHydrated
|
|
8
15
|
};
|
package/dist/index89.js
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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;
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx as e, Fragment as o } from "react/jsx-runtime";
|
|
3
|
+
var l = Symbol("radix.slottable");
|
|
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;
|
|
24
8
|
}
|
|
25
9
|
export {
|
|
26
|
-
|
|
10
|
+
n as createSlottable
|
|
27
11
|
};
|
package/dist/index9.js
CHANGED
package/dist/index90.js
CHANGED
|
@@ -1,127 +1,71 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { useEscapeKeydown as U } from "./index115.js";
|
|
7
|
-
import { jsx as T } from "react/jsx-runtime";
|
|
8
|
-
var z = "DismissableLayer", y = "dismissableLayer.update", H = "dismissableLayer.pointerDownOutside", M = "dismissableLayer.focusOutside", L, B = n.createContext({
|
|
9
|
-
layers: /* @__PURE__ */ new Set(),
|
|
10
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
11
|
-
branches: /* @__PURE__ */ new Set()
|
|
12
|
-
}), j = n.forwardRef(
|
|
13
|
-
(r, e) => {
|
|
14
|
-
const {
|
|
15
|
-
disableOutsidePointerEvents: i = !1,
|
|
16
|
-
onEscapeKeyDown: o,
|
|
17
|
-
onPointerDownOutside: t,
|
|
18
|
-
onFocusOutside: a,
|
|
19
|
-
onInteractOutside: l,
|
|
20
|
-
onDismiss: d,
|
|
21
|
-
...v
|
|
22
|
-
} = r, c = n.useContext(B), [u, S] = n.useState(null), f = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, F] = n.useState({}), W = R(e, (s) => S(s)), p = Array.from(c.layers), [A] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), N = p.indexOf(A), b = u ? p.indexOf(u) : -1, I = c.layersWithOutsidePointerEventsDisabled.size > 0, P = b >= N, _ = q((s) => {
|
|
23
|
-
const E = s.target, C = [...c.branches].some((h) => h.contains(E));
|
|
24
|
-
!P || C || (t == null || t(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
|
25
|
-
}, f), D = G((s) => {
|
|
26
|
-
const E = s.target;
|
|
27
|
-
[...c.branches].some((h) => h.contains(E)) || (a == null || a(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
|
28
|
-
}, f);
|
|
29
|
-
return U((s) => {
|
|
30
|
-
b === c.layers.size - 1 && (o == null || o(s), !s.defaultPrevented && d && (s.preventDefault(), d()));
|
|
31
|
-
}, f), n.useEffect(() => {
|
|
32
|
-
if (u)
|
|
33
|
-
return i && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (L = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), O(), () => {
|
|
34
|
-
i && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = L);
|
|
35
|
-
};
|
|
36
|
-
}, [u, f, i, c]), n.useEffect(() => () => {
|
|
37
|
-
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), O());
|
|
38
|
-
}, [u, c]), n.useEffect(() => {
|
|
39
|
-
const s = () => F({});
|
|
40
|
-
return document.addEventListener(y, s), () => document.removeEventListener(y, s);
|
|
41
|
-
}, []), /* @__PURE__ */ T(
|
|
42
|
-
g.div,
|
|
43
|
-
{
|
|
44
|
-
...v,
|
|
45
|
-
ref: W,
|
|
46
|
-
style: {
|
|
47
|
-
pointerEvents: I ? P ? "auto" : "none" : void 0,
|
|
48
|
-
...r.style
|
|
49
|
-
},
|
|
50
|
-
onFocusCapture: m(r.onFocusCapture, D.onFocusCapture),
|
|
51
|
-
onBlurCapture: m(r.onBlurCapture, D.onBlurCapture),
|
|
52
|
-
onPointerDownCapture: m(
|
|
53
|
-
r.onPointerDownCapture,
|
|
54
|
-
_.onPointerDownCapture
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
j.displayName = z;
|
|
61
|
-
var X = "DismissableLayerBranch", Y = n.forwardRef((r, e) => {
|
|
62
|
-
const i = n.useContext(B), o = n.useRef(null), t = R(e, o);
|
|
63
|
-
return n.useEffect(() => {
|
|
64
|
-
const a = o.current;
|
|
65
|
-
if (a)
|
|
66
|
-
return i.branches.add(a), () => {
|
|
67
|
-
i.branches.delete(a);
|
|
68
|
-
};
|
|
69
|
-
}, [i.branches]), /* @__PURE__ */ T(g.div, { ...r, ref: t });
|
|
70
|
-
});
|
|
71
|
-
Y.displayName = X;
|
|
72
|
-
function q(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
73
|
-
const i = w(r), o = n.useRef(!1), t = n.useRef(() => {
|
|
74
|
-
});
|
|
75
|
-
return n.useEffect(() => {
|
|
76
|
-
const a = (d) => {
|
|
77
|
-
if (d.target && !o.current) {
|
|
78
|
-
let v = function() {
|
|
79
|
-
x(
|
|
80
|
-
H,
|
|
81
|
-
i,
|
|
82
|
-
c,
|
|
83
|
-
{ discrete: !0 }
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
const c = { originalEvent: d };
|
|
87
|
-
d.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current = v, e.addEventListener("click", t.current, { once: !0 })) : v();
|
|
88
|
-
} else
|
|
89
|
-
e.removeEventListener("click", t.current);
|
|
90
|
-
o.current = !1;
|
|
91
|
-
}, l = window.setTimeout(() => {
|
|
92
|
-
e.addEventListener("pointerdown", a);
|
|
93
|
-
}, 0);
|
|
94
|
-
return () => {
|
|
95
|
-
window.clearTimeout(l), e.removeEventListener("pointerdown", a), e.removeEventListener("click", t.current);
|
|
96
|
-
};
|
|
97
|
-
}, [e, i]), {
|
|
98
|
-
// ensures we check React component tree (not just DOM tree)
|
|
99
|
-
onPointerDownCapture: () => o.current = !0
|
|
100
|
-
};
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { useComposedRefs as E } from "./index78.js";
|
|
3
|
+
import { useLayoutEffect as A } from "./index86.js";
|
|
4
|
+
function T(n, e) {
|
|
5
|
+
return a.useReducer((r, t) => e[r][t] ?? r, n);
|
|
101
6
|
}
|
|
102
|
-
|
|
103
|
-
const i =
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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;
|
|
34
|
+
}
|
|
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
|
+
}, [])
|
|
114
59
|
};
|
|
115
60
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
document.dispatchEvent(r);
|
|
61
|
+
function l(n) {
|
|
62
|
+
return (n == null ? void 0 : n.animationName) || "none";
|
|
119
63
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
122
|
-
e
|
|
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);
|
|
123
68
|
}
|
|
124
69
|
export {
|
|
125
|
-
|
|
126
|
-
Y as DismissableLayerBranch
|
|
70
|
+
R as Presence
|
|
127
71
|
};
|
package/dist/index91.js
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function a() {
|
|
4
|
-
r.useEffect(() => {
|
|
5
|
-
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
6
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? n()), document.body.insertAdjacentElement("beforeend", e[1] ?? n()), t++, () => {
|
|
7
|
-
t === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((o) => o.remove()), t--;
|
|
8
|
-
};
|
|
9
|
-
}, []);
|
|
10
|
-
}
|
|
11
|
-
function n() {
|
|
12
|
-
const e = document.createElement("span");
|
|
13
|
-
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
1
|
+
function m(t, [a, n]) {
|
|
2
|
+
return Math.min(n, Math.max(a, t));
|
|
14
3
|
}
|
|
15
4
|
export {
|
|
16
|
-
|
|
5
|
+
m as clamp
|
|
17
6
|
};
|