@drjoshcsimmons/scl 0.1.5 → 0.1.6
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/globals.css +300 -0
- package/dist/index100.js +4 -9
- package/dist/index101.js +15 -50
- package/dist/index102.js +29 -218
- package/dist/index103.js +178 -27
- package/dist/index104.js +628 -159
- package/dist/index105.js +12 -6
- package/dist/index106.js +206 -21
- package/dist/index107.js +22 -9
- package/dist/index108.js +400 -38
- package/dist/index109.js +6 -18
- package/dist/index11.js +2 -2
- package/dist/index110.js +21 -12
- package/dist/index111.js +9 -206
- package/dist/index112.js +37 -21
- package/dist/index113.js +17 -399
- package/dist/index114.js +25 -2
- package/dist/index115.js +29 -53
- package/dist/index116.js +5 -65
- package/dist/index117.js +2 -2
- package/dist/index118.js +53 -2
- package/dist/index119.js +63 -23
- package/dist/index12.js +1 -1
- package/dist/index120.js +2 -29
- package/dist/index121.js +2 -5
- package/dist/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index130.js +1 -1
- package/dist/index131.js +1 -1
- package/dist/index132.js +1 -1
- package/dist/index137.js +21 -11
- package/dist/index138.js +11 -26
- package/dist/index139.js +27 -4
- package/dist/index14.js +2 -2
- package/dist/index140.js +4 -22
- package/dist/index15.js +2 -2
- 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 +33 -237
- package/dist/index46.js +241 -11
- package/dist/index47.js +249 -33
- package/dist/index48.js +9 -125
- package/dist/index49.js +12 -73
- package/dist/index5.js +1 -1
- package/dist/index50.js +257 -57
- package/dist/index51.js +12 -254
- package/dist/index52.js +62 -107
- package/dist/index53.js +224 -297
- package/dist/index54.js +4 -5
- package/dist/index55.js +530 -12
- package/dist/index56.js +125 -9
- package/dist/index57.js +285 -410
- package/dist/index58.js +12 -225
- package/dist/index59.js +435 -11
- package/dist/index6.js +1 -1
- package/dist/index60.js +60 -11
- package/dist/index61.js +248 -254
- package/dist/index62.js +130 -12
- package/dist/index63.js +68 -846
- package/dist/index64.js +22 -9
- package/dist/index65.js +25 -524
- package/dist/index66.js +16 -159
- package/dist/index67.js +234 -16
- package/dist/index68.js +11 -22
- package/dist/index69.js +143 -318
- package/dist/index7.js +1 -1
- package/dist/index70.js +325 -119
- package/dist/index71.js +215 -72
- package/dist/index72.js +11 -241
- package/dist/index73.js +823 -212
- package/dist/index74.js +9 -31
- package/dist/index75.js +100 -218
- package/dist/index76.js +5 -66
- package/dist/index78.js +66 -5
- package/dist/index79.js +120 -49
- package/dist/index8.js +1 -1
- package/dist/index80.js +12 -52
- package/dist/index81.js +134 -10
- package/dist/index82.js +11 -4
- package/dist/index83.js +219 -30
- package/dist/index84.js +14 -13
- package/dist/index85.js +65 -48
- package/dist/index86.js +1 -1
- package/dist/index87.js +48 -63
- package/dist/index88.js +51 -10
- package/dist/index89.js +50 -15
- package/dist/index9.js +2 -2
- package/dist/index90.js +9 -46
- package/dist/index91.js +5 -7
- package/dist/index92.js +24 -3
- package/dist/index93.js +54 -5
- package/dist/index94.js +10 -24
- package/dist/index95.js +3 -649
- package/dist/index96.js +29 -124
- package/dist/index97.js +9 -131
- package/dist/index98.js +46 -14
- package/dist/index99.js +7 -14
- package/package.json +19 -11
package/dist/index89.js
CHANGED
|
@@ -1,17 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
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
|
+
};
|
|
15
50
|
export {
|
|
16
|
-
|
|
51
|
+
C as hideOthers
|
|
17
52
|
};
|
package/dist/index9.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { Root as d } from "./
|
|
4
|
-
import { cva as b } from "./
|
|
3
|
+
import { Root as d } from "./index60.js";
|
|
4
|
+
import { cva as b } from "./index45.js";
|
|
5
5
|
import { cn as c } from "./index2.js";
|
|
6
6
|
const p = b(
|
|
7
7
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap font-mono font-bold uppercase tracking-wider transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-30 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
package/dist/index90.js
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
10
|
-
), p = (c) => {
|
|
11
|
-
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
|
12
|
-
return /* @__PURE__ */ u(_, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
13
|
-
};
|
|
14
|
-
p.displayName = m;
|
|
15
|
-
const a = s + "CollectionSlot", E = x(a), C = r.forwardRef(
|
|
16
|
-
(c, e) => {
|
|
17
|
-
const { scope: l, children: o } = c, t = f(a, l), n = M(e, t.collectionRef);
|
|
18
|
-
return /* @__PURE__ */ u(E, { ref: n, children: o });
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
C.displayName = a;
|
|
22
|
-
const d = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(d), I = r.forwardRef(
|
|
23
|
-
(c, e) => {
|
|
24
|
-
const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = f(d, l);
|
|
25
|
-
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ u(T, { [R]: "", ref: S, children: o });
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
I.displayName = d;
|
|
29
|
-
function O(c) {
|
|
30
|
-
const e = f(s + "CollectionConsumer", c);
|
|
31
|
-
return r.useCallback(() => {
|
|
32
|
-
const o = e.collectionRef.current;
|
|
33
|
-
if (!o) return [];
|
|
34
|
-
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
35
|
-
return Array.from(e.itemMap.values()).sort(
|
|
36
|
-
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
|
37
|
-
);
|
|
38
|
-
}, [e.collectionRef, e.itemMap]);
|
|
39
|
-
}
|
|
40
|
-
return [
|
|
41
|
-
{ Provider: p, Slot: C, ItemSlot: I },
|
|
42
|
-
O,
|
|
43
|
-
N
|
|
44
|
-
];
|
|
45
|
-
}
|
|
1
|
+
import { __assign as m } from "./index114.js";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { RemoveScroll as e } from "./index115.js";
|
|
4
|
+
import t from "./index116.js";
|
|
5
|
+
var s = r.forwardRef(function(a, o) {
|
|
6
|
+
return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
|
|
7
|
+
});
|
|
8
|
+
s.classNames = e.classNames;
|
|
46
9
|
export {
|
|
47
|
-
|
|
10
|
+
s as default
|
|
48
11
|
};
|
package/dist/index91.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const e = t.useContext(r);
|
|
6
|
-
return o || e || "ltr";
|
|
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]);
|
|
7
5
|
}
|
|
8
6
|
export {
|
|
9
|
-
|
|
7
|
+
t as usePrevious
|
|
10
8
|
};
|
package/dist/index92.js
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as h from "react";
|
|
2
|
+
import { useLayoutEffect as z } from "./index95.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;
|
|
3
24
|
}
|
|
4
25
|
export {
|
|
5
|
-
|
|
26
|
+
c as useSize
|
|
6
27
|
};
|
package/dist/index93.js
CHANGED
|
@@ -1,8 +1,57 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
+
function $(e, x = []) {
|
|
4
|
+
let o = [];
|
|
5
|
+
function f(r, n) {
|
|
6
|
+
const t = i.createContext(n);
|
|
7
|
+
t.displayName = r + "Context";
|
|
8
|
+
const c = o.length;
|
|
9
|
+
o = [...o, n];
|
|
10
|
+
const m = (a) => {
|
|
11
|
+
var l;
|
|
12
|
+
const { scope: s, children: C, ...p } = a, d = ((l = s == null ? void 0 : s[e]) == null ? void 0 : l[c]) || t, v = i.useMemo(() => p, Object.values(p));
|
|
13
|
+
return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
|
|
14
|
+
};
|
|
15
|
+
m.displayName = r + "Provider";
|
|
16
|
+
function S(a, s) {
|
|
17
|
+
var d;
|
|
18
|
+
const C = ((d = s == null ? void 0 : s[e]) == null ? void 0 : d[c]) || t, p = i.useContext(C);
|
|
19
|
+
if (p) return p;
|
|
20
|
+
if (n !== void 0) return n;
|
|
21
|
+
throw new Error(`\`${a}\` must be used within \`${r}\``);
|
|
22
|
+
}
|
|
23
|
+
return [m, S];
|
|
24
|
+
}
|
|
25
|
+
const u = () => {
|
|
26
|
+
const r = o.map((n) => i.createContext(n));
|
|
27
|
+
return function(t) {
|
|
28
|
+
const c = (t == null ? void 0 : t[e]) || r;
|
|
29
|
+
return i.useMemo(
|
|
30
|
+
() => ({ [`__scope${e}`]: { ...t, [e]: c } }),
|
|
31
|
+
[t, c]
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
return u.scopeName = e, [f, h(u, ...x)];
|
|
36
|
+
}
|
|
37
|
+
function h(...e) {
|
|
38
|
+
const x = e[0];
|
|
39
|
+
if (e.length === 1) return x;
|
|
40
|
+
const o = () => {
|
|
41
|
+
const f = e.map((u) => ({
|
|
42
|
+
useScope: u(),
|
|
43
|
+
scopeName: u.scopeName
|
|
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;
|
|
5
54
|
}
|
|
6
55
|
export {
|
|
7
|
-
|
|
56
|
+
$ as createContextScope
|
|
8
57
|
};
|
package/dist/index94.js
CHANGED
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 * 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
|
+
}, []);
|
|
24
10
|
}
|
|
25
11
|
export {
|
|
26
|
-
|
|
12
|
+
o as useCallbackRef
|
|
27
13
|
};
|