@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/index10.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import { cn as o } from "./index2.js";
|
|
4
|
-
const s = t.forwardRef(({ className:
|
|
4
|
+
const s = t.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ d(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
7
|
ref: e,
|
|
8
8
|
className: o(
|
|
9
|
-
"border-2 bg-card text-card-foreground",
|
|
10
|
-
|
|
9
|
+
"border-2 border-primary bg-card text-card-foreground",
|
|
10
|
+
r
|
|
11
11
|
),
|
|
12
|
-
...
|
|
12
|
+
...a
|
|
13
13
|
}
|
|
14
14
|
));
|
|
15
15
|
s.displayName = "Card";
|
|
16
|
-
const i = t.forwardRef(({ className:
|
|
16
|
+
const i = t.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ d(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
19
|
ref: e,
|
|
20
|
-
className: o("flex flex-col space-y-1.5",
|
|
21
|
-
...
|
|
20
|
+
className: o("flex flex-col space-y-1.5", r),
|
|
21
|
+
...a
|
|
22
22
|
}
|
|
23
23
|
));
|
|
24
24
|
i.displayName = "CardHeader";
|
|
25
|
-
const m = t.forwardRef(({ className:
|
|
25
|
+
const m = t.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ d(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
28
|
ref: e,
|
|
29
|
-
className: o("bg-primary text-primary-foreground px-2 py-1 text-sm font-semibold leading-none tracking-tight w-full",
|
|
30
|
-
...
|
|
29
|
+
className: o("bg-primary text-primary-foreground px-2 py-1 text-sm font-semibold leading-none tracking-tight w-full", r),
|
|
30
|
+
...a
|
|
31
31
|
}
|
|
32
32
|
));
|
|
33
33
|
m.displayName = "CardTitle";
|
|
34
|
-
const f = t.forwardRef(({ className:
|
|
34
|
+
const f = t.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ d(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
37
|
ref: e,
|
|
38
|
-
className: o("px-6 pt-2 text-sm text-muted-foreground",
|
|
39
|
-
...
|
|
38
|
+
className: o("px-6 pt-2 text-sm text-muted-foreground", r),
|
|
39
|
+
...a
|
|
40
40
|
}
|
|
41
41
|
));
|
|
42
42
|
f.displayName = "CardDescription";
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
const
|
|
43
|
+
const p = t.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ d("div", { ref: e, className: o("p-6", r), ...a }));
|
|
44
|
+
p.displayName = "CardContent";
|
|
45
|
+
const c = t.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ d(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
48
|
ref: e,
|
|
49
|
-
className: o("flex items-center p-6 pt-0",
|
|
50
|
-
...
|
|
49
|
+
className: o("flex items-center p-6 pt-0", r),
|
|
50
|
+
...a
|
|
51
51
|
}
|
|
52
52
|
));
|
|
53
|
-
|
|
53
|
+
c.displayName = "CardFooter";
|
|
54
54
|
export {
|
|
55
55
|
s as Card,
|
|
56
|
-
|
|
56
|
+
p as CardContent,
|
|
57
57
|
f as CardDescription,
|
|
58
|
-
|
|
58
|
+
c as CardFooter,
|
|
59
59
|
i as CardHeader,
|
|
60
60
|
m as CardTitle
|
|
61
61
|
};
|
package/dist/index100.js
CHANGED
|
@@ -1,16 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
u(()
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var S = function(r) {
|
|
2
|
+
if (typeof document > "u")
|
|
3
|
+
return null;
|
|
4
|
+
var u = Array.isArray(r) ? r[0] : r;
|
|
5
|
+
return u.ownerDocument.body;
|
|
6
|
+
}, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
|
|
7
|
+
return r && (r.host || W(r.parentNode));
|
|
8
|
+
}, D = function(r, u) {
|
|
9
|
+
return u.map(function(e) {
|
|
10
|
+
if (r.contains(e))
|
|
11
|
+
return e;
|
|
12
|
+
var n = W(e);
|
|
13
|
+
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
|
14
|
+
}).filter(function(e) {
|
|
15
|
+
return !!e;
|
|
16
|
+
});
|
|
17
|
+
}, E = function(r, u, e, n) {
|
|
18
|
+
var i = D(u, Array.isArray(r) ? r : [r]);
|
|
19
|
+
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
|
20
|
+
var s = p[e], l = [], o = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
|
21
|
+
!t || o.has(t) || (o.add(t), y(t.parentNode));
|
|
22
|
+
};
|
|
23
|
+
i.forEach(y);
|
|
24
|
+
var A = function(t) {
|
|
25
|
+
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
|
26
|
+
if (o.has(a))
|
|
27
|
+
A(a);
|
|
28
|
+
else
|
|
29
|
+
try {
|
|
30
|
+
var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (s.get(a) || 0) + 1;
|
|
31
|
+
f.set(a, d), s.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
|
32
|
+
} catch (k) {
|
|
33
|
+
console.error("aria-hidden: cannot operate on ", a, k);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
return A(u), o.clear(), h++, function() {
|
|
38
|
+
l.forEach(function(t) {
|
|
39
|
+
var a = f.get(t) - 1, c = s.get(t) - 1;
|
|
40
|
+
f.set(t, a), s.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
|
|
41
|
+
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
|
42
|
+
};
|
|
43
|
+
}, C = function(r, u, e) {
|
|
44
|
+
e === void 0 && (e = "data-aria-hidden");
|
|
45
|
+
var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
|
|
46
|
+
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live], script"))), E(n, i, e, "aria-hidden")) : function() {
|
|
47
|
+
return null;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
14
50
|
export {
|
|
15
|
-
|
|
51
|
+
C as hideOthers
|
|
16
52
|
};
|
package/dist/index102.js
CHANGED
|
@@ -1,52 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return
|
|
8
|
-
}
|
|
9
|
-
return u.map(function(e) {
|
|
10
|
-
if (r.contains(e))
|
|
11
|
-
return e;
|
|
12
|
-
var n = W(e);
|
|
13
|
-
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
|
14
|
-
}).filter(function(e) {
|
|
15
|
-
return !!e;
|
|
16
|
-
});
|
|
17
|
-
}, E = function(r, u, e, n) {
|
|
18
|
-
var i = D(u, Array.isArray(r) ? r : [r]);
|
|
19
|
-
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
|
20
|
-
var s = p[e], l = [], o = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
|
21
|
-
!t || o.has(t) || (o.add(t), y(t.parentNode));
|
|
22
|
-
};
|
|
23
|
-
i.forEach(y);
|
|
24
|
-
var A = function(t) {
|
|
25
|
-
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
|
26
|
-
if (o.has(a))
|
|
27
|
-
A(a);
|
|
28
|
-
else
|
|
29
|
-
try {
|
|
30
|
-
var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (s.get(a) || 0) + 1;
|
|
31
|
-
f.set(a, d), s.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
|
32
|
-
} catch (k) {
|
|
33
|
-
console.error("aria-hidden: cannot operate on ", a, k);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
return A(u), o.clear(), h++, function() {
|
|
38
|
-
l.forEach(function(t) {
|
|
39
|
-
var a = f.get(t) - 1, c = s.get(t) - 1;
|
|
40
|
-
f.set(t, a), s.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
|
|
41
|
-
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
|
42
|
-
};
|
|
43
|
-
}, C = function(r, u, e) {
|
|
44
|
-
e === void 0 && (e = "data-aria-hidden");
|
|
45
|
-
var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
|
|
46
|
-
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live], script"))), E(n, i, e, "aria-hidden")) : function() {
|
|
47
|
-
return null;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
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;
|
|
8
|
+
}
|
|
50
9
|
export {
|
|
51
|
-
|
|
10
|
+
n as createSlottable
|
|
52
11
|
};
|
package/dist/index103.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var m = 1, j = 0.9, k = 0.8, B = 0.17, v = 0.1, w = 0.999, D = 0.9999, G = 0.99, H = /[\\\/_+.#"@\[\(\{&]/, J = /[\\\/_+.#"@\[\(\{&]/g, K = /[\s-]/, A = /[\s-]/g;
|
|
2
|
+
function $(t, o, e, i, n, h, u) {
|
|
3
|
+
if (h === o.length) return n === t.length ? m : G;
|
|
4
|
+
var s = `${n},${h}`;
|
|
5
|
+
if (u[s] !== void 0) return u[s];
|
|
6
|
+
for (var d = i.charAt(h), a = e.indexOf(d, n), l = 0, r, g, c, p; a >= 0; ) r = $(t, o, e, i, a + 1, h + 1, u), r > l && (a === n ? r *= m : H.test(t.charAt(a - 1)) ? (r *= k, c = t.slice(n, a - 1).match(J), c && n > 0 && (r *= Math.pow(w, c.length))) : K.test(t.charAt(a - 1)) ? (r *= j, p = t.slice(n, a - 1).match(A), p && n > 0 && (r *= Math.pow(w, p.length))) : (r *= B, n > 0 && (r *= Math.pow(w, a - n))), t.charAt(a) !== o.charAt(h) && (r *= D)), (r < v && e.charAt(a - 1) === i.charAt(h + 1) || i.charAt(h + 1) === i.charAt(h) && e.charAt(a - 1) !== i.charAt(h)) && (g = $(t, o, e, i, a + 1, h + 2, u), g * v > r && (r = g * v)), r > l && (l = r), a = e.indexOf(d, a + 1);
|
|
7
|
+
return u[s] = l, l;
|
|
8
|
+
}
|
|
9
|
+
function x(t) {
|
|
10
|
+
return t.toLowerCase().replace(A, " ");
|
|
11
|
+
}
|
|
12
|
+
function M(t, o, e) {
|
|
13
|
+
return t = e && e.length > 0 ? `${t + " " + e.join(" ")}` : t, $(t, o, x(t), x(o), 0, 0, {});
|
|
14
|
+
}
|
|
9
15
|
export {
|
|
10
|
-
|
|
16
|
+
M as a
|
|
11
17
|
};
|
package/dist/index104.js
CHANGED
|
@@ -1,6 +1,221 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as p from "react";
|
|
2
|
+
import { useFloating as xe, offset as Pe, shift as ye, flip as Ae, size as ve, arrow as Ce, hide as be, limitShift as Se } from "./index121.js";
|
|
3
|
+
import { Root as Oe } from "./index122.js";
|
|
4
|
+
import { useComposedRefs as j } from "./index78.js";
|
|
5
|
+
import { createContextScope as Re } from "./index76.js";
|
|
6
|
+
import { Primitive as z } from "./index81.js";
|
|
7
|
+
import { useCallbackRef as Ee } from "./index90.js";
|
|
8
|
+
import { useLayoutEffect as T } from "./index84.js";
|
|
9
|
+
import { useSize as Ne } from "./index88.js";
|
|
10
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
11
|
+
import { autoUpdate as _e } from "./index123.js";
|
|
12
|
+
var N = "Popper", [L, Ue] = Re(N), [$e, Z] = L(N), U = (e) => {
|
|
13
|
+
const { __scopePopper: s, children: a } = e, [t, i] = p.useState(null);
|
|
14
|
+
return /* @__PURE__ */ f($e, { scope: s, anchor: t, onAnchorChange: i, children: a });
|
|
15
|
+
};
|
|
16
|
+
U.displayName = N;
|
|
17
|
+
var q = "PopperAnchor", G = p.forwardRef(
|
|
18
|
+
(e, s) => {
|
|
19
|
+
const { __scopePopper: a, virtualRef: t, ...i } = e, r = Z(q, a), o = p.useRef(null), w = j(s, o), n = p.useRef(null);
|
|
20
|
+
return p.useEffect(() => {
|
|
21
|
+
const c = n.current;
|
|
22
|
+
n.current = (t == null ? void 0 : t.current) || o.current, c !== n.current && r.onAnchorChange(n.current);
|
|
23
|
+
}), t ? null : /* @__PURE__ */ f(z.div, { ...i, ref: w });
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
G.displayName = q;
|
|
27
|
+
var _ = "PopperContent", [He, We] = L(_), J = p.forwardRef(
|
|
28
|
+
(e, s) => {
|
|
29
|
+
var Y, M, X, D, F, k;
|
|
30
|
+
const {
|
|
31
|
+
__scopePopper: a,
|
|
32
|
+
side: t = "bottom",
|
|
33
|
+
sideOffset: i = 0,
|
|
34
|
+
align: r = "center",
|
|
35
|
+
alignOffset: o = 0,
|
|
36
|
+
arrowPadding: w = 0,
|
|
37
|
+
avoidCollisions: n = !0,
|
|
38
|
+
collisionBoundary: c = [],
|
|
39
|
+
collisionPadding: x = 0,
|
|
40
|
+
sticky: m = "partial",
|
|
41
|
+
hideWhenDetached: y = !1,
|
|
42
|
+
updatePositionStrategy: A = "optimized",
|
|
43
|
+
onPlaced: l,
|
|
44
|
+
...d
|
|
45
|
+
} = e, v = Z(_, a), [h, C] = p.useState(null), ee = j(s, (P) => C(P)), [E, te] = p.useState(null), u = Ne(E), re = (u == null ? void 0 : u.width) ?? 0, $ = (u == null ? void 0 : u.height) ?? 0, oe = t + (r !== "center" ? "-" + r : ""), ne = typeof x == "number" ? x : { top: 0, right: 0, bottom: 0, left: 0, ...x }, H = Array.isArray(c) ? c : [c], ae = H.length > 0, b = {
|
|
46
|
+
padding: ne,
|
|
47
|
+
boundary: H.filter(Ye),
|
|
48
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
49
|
+
altBoundary: ae
|
|
50
|
+
}, { refs: ie, floatingStyles: W, placement: se, isPositioned: S, middlewareData: g } = xe({
|
|
51
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
52
|
+
strategy: "fixed",
|
|
53
|
+
placement: oe,
|
|
54
|
+
whileElementsMounted: (...P) => _e(...P, {
|
|
55
|
+
animationFrame: A === "always"
|
|
56
|
+
}),
|
|
57
|
+
elements: {
|
|
58
|
+
reference: v.anchor
|
|
59
|
+
},
|
|
60
|
+
middleware: [
|
|
61
|
+
Pe({ mainAxis: i + $, alignmentAxis: o }),
|
|
62
|
+
n && ye({
|
|
63
|
+
mainAxis: !0,
|
|
64
|
+
crossAxis: !1,
|
|
65
|
+
limiter: m === "partial" ? Se() : void 0,
|
|
66
|
+
...b
|
|
67
|
+
}),
|
|
68
|
+
n && Ae({ ...b }),
|
|
69
|
+
ve({
|
|
70
|
+
...b,
|
|
71
|
+
apply: ({ elements: P, rects: B, availableWidth: he, availableHeight: ue }) => {
|
|
72
|
+
const { width: ge, height: we } = B.reference, R = P.floating.style;
|
|
73
|
+
R.setProperty("--radix-popper-available-width", `${he}px`), R.setProperty("--radix-popper-available-height", `${ue}px`), R.setProperty("--radix-popper-anchor-width", `${ge}px`), R.setProperty("--radix-popper-anchor-height", `${we}px`);
|
|
74
|
+
}
|
|
75
|
+
}),
|
|
76
|
+
E && Ce({ element: E, padding: w }),
|
|
77
|
+
Me({ arrowWidth: re, arrowHeight: $ }),
|
|
78
|
+
y && be({ strategy: "referenceHidden", ...b })
|
|
79
|
+
]
|
|
80
|
+
}), [I, ce] = V(se), O = Ee(l);
|
|
81
|
+
T(() => {
|
|
82
|
+
S && (O == null || O());
|
|
83
|
+
}, [S, O]);
|
|
84
|
+
const pe = (Y = g.arrow) == null ? void 0 : Y.x, de = (M = g.arrow) == null ? void 0 : M.y, le = ((X = g.arrow) == null ? void 0 : X.centerOffset) !== 0, [fe, me] = p.useState();
|
|
85
|
+
return T(() => {
|
|
86
|
+
h && me(window.getComputedStyle(h).zIndex);
|
|
87
|
+
}, [h]), /* @__PURE__ */ f(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
ref: ie.setFloating,
|
|
91
|
+
"data-radix-popper-content-wrapper": "",
|
|
92
|
+
style: {
|
|
93
|
+
...W,
|
|
94
|
+
transform: S ? W.transform : "translate(0, -200%)",
|
|
95
|
+
// keep off the page when measuring
|
|
96
|
+
minWidth: "max-content",
|
|
97
|
+
zIndex: fe,
|
|
98
|
+
"--radix-popper-transform-origin": [
|
|
99
|
+
(D = g.transformOrigin) == null ? void 0 : D.x,
|
|
100
|
+
(F = g.transformOrigin) == null ? void 0 : F.y
|
|
101
|
+
].join(" "),
|
|
102
|
+
// hide the content if using the hide middleware and should be hidden
|
|
103
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
104
|
+
// as if the PopperContent isn't there at all
|
|
105
|
+
...((k = g.hide) == null ? void 0 : k.referenceHidden) && {
|
|
106
|
+
visibility: "hidden",
|
|
107
|
+
pointerEvents: "none"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
dir: e.dir,
|
|
111
|
+
children: /* @__PURE__ */ f(
|
|
112
|
+
He,
|
|
113
|
+
{
|
|
114
|
+
scope: a,
|
|
115
|
+
placedSide: I,
|
|
116
|
+
onArrowChange: te,
|
|
117
|
+
arrowX: pe,
|
|
118
|
+
arrowY: de,
|
|
119
|
+
shouldHideArrow: le,
|
|
120
|
+
children: /* @__PURE__ */ f(
|
|
121
|
+
z.div,
|
|
122
|
+
{
|
|
123
|
+
"data-side": I,
|
|
124
|
+
"data-align": ce,
|
|
125
|
+
...d,
|
|
126
|
+
ref: ee,
|
|
127
|
+
style: {
|
|
128
|
+
...d.style,
|
|
129
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
130
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
131
|
+
animation: S ? void 0 : "none"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
J.displayName = _;
|
|
142
|
+
var K = "PopperArrow", Ie = {
|
|
143
|
+
top: "bottom",
|
|
144
|
+
right: "left",
|
|
145
|
+
bottom: "top",
|
|
146
|
+
left: "right"
|
|
147
|
+
}, Q = p.forwardRef(function(s, a) {
|
|
148
|
+
const { __scopePopper: t, ...i } = s, r = We(K, t), o = Ie[r.placedSide];
|
|
149
|
+
return (
|
|
150
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
151
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
152
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
153
|
+
/* @__PURE__ */ f(
|
|
154
|
+
"span",
|
|
155
|
+
{
|
|
156
|
+
ref: r.onArrowChange,
|
|
157
|
+
style: {
|
|
158
|
+
position: "absolute",
|
|
159
|
+
left: r.arrowX,
|
|
160
|
+
top: r.arrowY,
|
|
161
|
+
[o]: 0,
|
|
162
|
+
transformOrigin: {
|
|
163
|
+
top: "",
|
|
164
|
+
right: "0 0",
|
|
165
|
+
bottom: "center 0",
|
|
166
|
+
left: "100% 0"
|
|
167
|
+
}[r.placedSide],
|
|
168
|
+
transform: {
|
|
169
|
+
top: "translateY(100%)",
|
|
170
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
171
|
+
bottom: "rotate(180deg)",
|
|
172
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
173
|
+
}[r.placedSide],
|
|
174
|
+
visibility: r.shouldHideArrow ? "hidden" : void 0
|
|
175
|
+
},
|
|
176
|
+
children: /* @__PURE__ */ f(
|
|
177
|
+
Oe,
|
|
178
|
+
{
|
|
179
|
+
...i,
|
|
180
|
+
ref: a,
|
|
181
|
+
style: {
|
|
182
|
+
...i.style,
|
|
183
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
184
|
+
display: "block"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
);
|
|
191
|
+
});
|
|
192
|
+
Q.displayName = K;
|
|
193
|
+
function Ye(e) {
|
|
194
|
+
return e !== null;
|
|
195
|
+
}
|
|
196
|
+
var Me = (e) => ({
|
|
197
|
+
name: "transformOrigin",
|
|
198
|
+
options: e,
|
|
199
|
+
fn(s) {
|
|
200
|
+
var v, h, C;
|
|
201
|
+
const { placement: a, rects: t, middlewareData: i } = s, o = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, w = o ? 0 : e.arrowWidth, n = o ? 0 : e.arrowHeight, [c, x] = V(a), m = { start: "0%", center: "50%", end: "100%" }[x], y = (((h = i.arrow) == null ? void 0 : h.x) ?? 0) + w / 2, A = (((C = i.arrow) == null ? void 0 : C.y) ?? 0) + n / 2;
|
|
202
|
+
let l = "", d = "";
|
|
203
|
+
return c === "bottom" ? (l = o ? m : `${y}px`, d = `${-n}px`) : c === "top" ? (l = o ? m : `${y}px`, d = `${t.floating.height + n}px`) : c === "right" ? (l = `${-n}px`, d = o ? m : `${A}px`) : c === "left" && (l = `${t.floating.width + n}px`, d = o ? m : `${A}px`), { data: { x: l, y: d } };
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
function V(e) {
|
|
207
|
+
const [s, a = "center"] = e.split("-");
|
|
208
|
+
return [s, a];
|
|
3
209
|
}
|
|
210
|
+
var qe = U, Ge = G, Je = J, Ke = Q;
|
|
4
211
|
export {
|
|
5
|
-
|
|
212
|
+
Ge as Anchor,
|
|
213
|
+
Ke as Arrow,
|
|
214
|
+
Je as Content,
|
|
215
|
+
U as Popper,
|
|
216
|
+
G as PopperAnchor,
|
|
217
|
+
Q as PopperArrow,
|
|
218
|
+
J as PopperContent,
|
|
219
|
+
qe as Root,
|
|
220
|
+
Ue as createPopperScope
|
|
6
221
|
};
|
package/dist/index105.js
CHANGED
|
@@ -1,50 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx as e, Fragment as o } from "react/jsx-runtime";
|
|
3
|
+
var l = Symbol("radix.slottable");
|
|
4
4
|
// @__NO_SIDE_EFFECTS__
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
if (a) {
|
|
9
|
-
const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
|
|
10
|
-
return /* @__PURE__ */ u(n, { ...c, ref: r, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
|
|
11
|
-
}
|
|
12
|
-
return /* @__PURE__ */ u(n, { ...c, ref: r, children: i });
|
|
13
|
-
});
|
|
14
|
-
return o.displayName = `${e}.Slot`, o;
|
|
15
|
-
}
|
|
16
|
-
// @__NO_SIDE_EFFECTS__
|
|
17
|
-
function y(e) {
|
|
18
|
-
const n = l.forwardRef((o, t) => {
|
|
19
|
-
const { children: r, ...i } = o;
|
|
20
|
-
if (l.isValidElement(r)) {
|
|
21
|
-
const c = S(r), s = C(i, r.props);
|
|
22
|
-
return r.type !== l.Fragment && (s.ref = t ? m(t, c) : c), l.cloneElement(r, s);
|
|
23
|
-
}
|
|
24
|
-
return l.Children.count(r) > 1 ? l.Children.only(null) : null;
|
|
25
|
-
});
|
|
26
|
-
return n.displayName = `${e}.SlotClone`, n;
|
|
27
|
-
}
|
|
28
|
-
var g = Symbol("radix.slottable");
|
|
29
|
-
function E(e) {
|
|
30
|
-
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
|
|
31
|
-
}
|
|
32
|
-
function C(e, n) {
|
|
33
|
-
const o = { ...n };
|
|
34
|
-
for (const t in n) {
|
|
35
|
-
const r = e[t], i = n[t];
|
|
36
|
-
/^on[A-Z]/.test(t) ? r && i ? o[t] = (...s) => {
|
|
37
|
-
const a = i(...s);
|
|
38
|
-
return r(...s), a;
|
|
39
|
-
} : r && (o[t] = r) : t === "style" ? o[t] = { ...r, ...i } : t === "className" && (o[t] = [r, i].filter(Boolean).join(" "));
|
|
40
|
-
}
|
|
41
|
-
return { ...e, ...o };
|
|
42
|
-
}
|
|
43
|
-
function S(e) {
|
|
44
|
-
var t, r;
|
|
45
|
-
let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, o = n && "isReactWarning" in n && n.isReactWarning;
|
|
46
|
-
return o ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = n && "isReactWarning" in n && n.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
5
|
+
function n(r) {
|
|
6
|
+
const t = ({ children: a }) => /* @__PURE__ */ e(o, { children: a });
|
|
7
|
+
return t.displayName = `${r}.Slottable`, t.__radixId = l, t;
|
|
47
8
|
}
|
|
48
9
|
export {
|
|
49
|
-
|
|
10
|
+
n as createSlottable
|
|
50
11
|
};
|
package/dist/index108.js
CHANGED
|
@@ -1,32 +1,50 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 });
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { composeRefs as m } from "./index78.js";
|
|
3
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
4
|
+
// @__NO_SIDE_EFFECTS__
|
|
5
|
+
function b(e) {
|
|
6
|
+
const n = /* @__PURE__ */ y(e), o = l.forwardRef((t, r) => {
|
|
7
|
+
const { children: i, ...c } = t, s = l.Children.toArray(i), a = s.find(E);
|
|
8
|
+
if (a) {
|
|
9
|
+
const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
|
|
10
|
+
return /* @__PURE__ */ u(n, { ...c, ref: r, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ u(n, { ...c, ref: r, children: i });
|
|
27
13
|
});
|
|
28
|
-
return
|
|
29
|
-
}
|
|
14
|
+
return o.displayName = `${e}.Slot`, o;
|
|
15
|
+
}
|
|
16
|
+
// @__NO_SIDE_EFFECTS__
|
|
17
|
+
function y(e) {
|
|
18
|
+
const n = l.forwardRef((o, t) => {
|
|
19
|
+
const { children: r, ...i } = o;
|
|
20
|
+
if (l.isValidElement(r)) {
|
|
21
|
+
const c = S(r), s = C(i, r.props);
|
|
22
|
+
return r.type !== l.Fragment && (s.ref = t ? m(t, c) : c), l.cloneElement(r, s);
|
|
23
|
+
}
|
|
24
|
+
return l.Children.count(r) > 1 ? l.Children.only(null) : null;
|
|
25
|
+
});
|
|
26
|
+
return n.displayName = `${e}.SlotClone`, n;
|
|
27
|
+
}
|
|
28
|
+
var g = Symbol("radix.slottable");
|
|
29
|
+
function E(e) {
|
|
30
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
|
|
31
|
+
}
|
|
32
|
+
function C(e, n) {
|
|
33
|
+
const o = { ...n };
|
|
34
|
+
for (const t in n) {
|
|
35
|
+
const r = e[t], i = n[t];
|
|
36
|
+
/^on[A-Z]/.test(t) ? r && i ? o[t] = (...s) => {
|
|
37
|
+
const a = i(...s);
|
|
38
|
+
return r(...s), a;
|
|
39
|
+
} : r && (o[t] = r) : t === "style" ? o[t] = { ...r, ...i } : t === "className" && (o[t] = [r, i].filter(Boolean).join(" "));
|
|
40
|
+
}
|
|
41
|
+
return { ...e, ...o };
|
|
42
|
+
}
|
|
43
|
+
function S(e) {
|
|
44
|
+
var t, r;
|
|
45
|
+
let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, o = n && "isReactWarning" in n && n.isReactWarning;
|
|
46
|
+
return o ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = n && "isReactWarning" in n && n.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
47
|
+
}
|
|
30
48
|
export {
|
|
31
|
-
|
|
49
|
+
b as createSlot
|
|
32
50
|
};
|