@drjoshcsimmons/scl 0.2.8 → 0.3.3
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/components/ui/accordion/accordion.d.ts.map +1 -1
- package/dist/components/ui/alert/alert.d.ts +5 -4
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/alert/index.d.ts +1 -1
- package/dist/components/ui/alert/index.d.ts.map +1 -1
- package/dist/components/ui/avatar/avatar.d.ts.map +1 -1
- package/dist/components/ui/badge/badge.d.ts +4 -6
- package/dist/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts +6 -7
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/button/index.d.ts.map +1 -1
- package/dist/components/ui/card/card.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/input/input.d.ts.map +1 -1
- package/dist/components/ui/label/label.d.ts +1 -2
- package/dist/components/ui/label/label.d.ts.map +1 -1
- package/dist/components/ui/popover/popover.d.ts.map +1 -1
- package/dist/components/ui/progress/progress.d.ts +0 -3
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/separator/separator.d.ts.map +1 -1
- package/dist/components/ui/skeleton/skeleton.d.ts +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/ui/slider/slider.d.ts.map +1 -1
- package/dist/components/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/ui/table/table.d.ts.map +1 -1
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
- package/dist/components/ui/toggle/index.d.ts +1 -1
- package/dist/components/ui/toggle/index.d.ts.map +1 -1
- package/dist/components/ui/toggle/toggle.d.ts +6 -10
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/globals.css +223 -287
- package/dist/hooks/use-font-loaded.d.ts +2 -0
- package/dist/hooks/use-font-loaded.d.ts.map +1 -0
- package/dist/index.d.ts +2 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +118 -185
- package/dist/index10.js +28 -51
- package/dist/index100.js +14 -30
- package/dist/index101.js +47 -12
- package/dist/index102.js +50 -6
- package/dist/index103.js +9 -25
- package/dist/index104.js +30 -9
- package/dist/index105.js +9 -9
- package/dist/index106.js +8 -3
- package/dist/index107.js +30 -30
- package/dist/index108.js +54 -8
- package/dist/index109.js +30 -30
- package/dist/index11.js +26 -16
- package/dist/index110.js +44 -51
- package/dist/index111.js +47 -29
- package/dist/index112.js +1 -1
- package/dist/index113.js +1 -1
- package/dist/index114.js +6 -48
- package/dist/index115.js +1 -1
- package/dist/index117.js +1 -1
- package/dist/index118.js +3 -3
- package/dist/index119.js +2 -48
- package/dist/index12.js +6 -5
- package/dist/index120.js +53 -6
- package/dist/index121.js +62 -18
- package/dist/index122.js +25 -9
- package/dist/index123.js +29 -38
- package/dist/index124.js +5 -18
- package/dist/index125.js +2 -25
- package/dist/index126.js +2 -29
- package/dist/index127.js +5 -5
- package/dist/index128.js +3 -2
- package/dist/index129.js +22 -51
- package/dist/index13.js +77 -134
- package/dist/index130.js +108 -60
- package/dist/index131.js +16 -2
- package/dist/index132.js +525 -2
- package/dist/index133.js +128 -5
- package/dist/index134.js +134 -3
- package/dist/index135.js +63 -22
- package/dist/index136.js +66 -110
- package/dist/index137.js +8 -15
- package/dist/index138.js +11 -522
- package/dist/index139.js +65 -127
- package/dist/index14.js +13 -97
- package/dist/index140.js +3 -133
- package/dist/index141.js +19 -61
- package/dist/index142.js +22 -68
- package/dist/index143.js +11 -7
- package/dist/index144.js +28 -14
- package/dist/index145.js +4 -65
- package/dist/index15.js +12 -71
- package/dist/index16.js +19 -254
- package/dist/index17.js +32 -138
- package/dist/index18.js +25 -89
- package/dist/index19.js +37 -18
- package/dist/index2.js +5 -5
- package/dist/index20.js +139 -10
- package/dist/index21.js +18 -19
- package/dist/index22.js +13 -35
- package/dist/index23.js +24 -22
- package/dist/index24.js +13 -34
- package/dist/index25.js +31 -114
- package/dist/index26.js +32 -16
- package/dist/index27.js +14 -74
- package/dist/index28.js +15 -12
- package/dist/index29.js +24 -29
- package/dist/index3.js +10 -22
- package/dist/index30.js +97 -108
- package/dist/index31.js +39 -25
- package/dist/index32.js +11 -65
- package/dist/index33.js +49 -44
- package/dist/index34.js +65 -85
- package/dist/index35.js +234 -15
- package/dist/index38.js +71 -98
- package/dist/index4.js +22 -37
- package/dist/index43.js +58 -13
- package/dist/index45.js +219 -207
- package/dist/index48.js +530 -9
- package/dist/index5.js +51 -34
- package/dist/index50.js +18 -11
- package/dist/index52.js +229 -298
- package/dist/index54.js +218 -100
- package/dist/index57.js +115 -245
- package/dist/index59.js +22 -12
- package/dist/index6.js +21 -75
- package/dist/index61.js +325 -119
- package/dist/index63.js +74 -117
- package/dist/index65.js +409 -210
- package/dist/index67.js +234 -311
- package/dist/index69.js +112 -16
- package/dist/index7.js +22 -27
- package/dist/index71.js +146 -67
- package/dist/index73.js +30 -434
- package/dist/index76.js +854 -62
- package/dist/index78.js +64 -23
- package/dist/index79.js +44 -5
- package/dist/index8.js +6 -27
- package/dist/index80.js +24 -49
- package/dist/index81.js +6 -33
- package/dist/index82.js +51 -10
- package/dist/index83.js +33 -7
- package/dist/index84.js +10 -124
- package/dist/index85.js +7 -14
- package/dist/index86.js +50 -130
- package/dist/index87.js +10 -218
- package/dist/index88.js +4 -14
- package/dist/index89.js +29 -68
- package/dist/index9.js +19 -34
- package/dist/index90.js +12 -47
- package/dist/index91.js +6 -50
- package/dist/index92.js +25 -9
- package/dist/index93.js +68 -3
- package/dist/index94.js +3 -649
- package/dist/index95.js +30 -15
- package/dist/index96.js +124 -29
- package/dist/index97.js +13 -46
- package/dist/index98.js +130 -50
- package/dist/index99.js +218 -10
- package/dist/lib/utils.d.ts +8 -8
- package/dist/lib/utils.d.ts.map +1 -1
- package/package.json +5 -46
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +0 -21
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +0 -1
- package/dist/components/ui/alert-dialog/index.d.ts +0 -2
- package/dist/components/ui/alert-dialog/index.d.ts.map +0 -1
- package/dist/components/ui/combobox/combobox.d.ts +0 -31
- package/dist/components/ui/combobox/combobox.d.ts.map +0 -1
- package/dist/components/ui/combobox/index.d.ts +0 -3
- package/dist/components/ui/combobox/index.d.ts.map +0 -1
- package/dist/components/ui/command/command.d.ts +0 -85
- package/dist/components/ui/command/command.d.ts.map +0 -1
- package/dist/components/ui/command/index.d.ts +0 -2
- package/dist/components/ui/command/index.d.ts.map +0 -1
- package/dist/components/ui/dithered-image/dithered-image.d.ts +0 -21
- package/dist/components/ui/dithered-image/dithered-image.d.ts.map +0 -1
- package/dist/components/ui/dithered-image/index.d.ts +0 -3
- package/dist/components/ui/dithered-image/index.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +0 -28
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +0 -2
- package/dist/components/ui/dropdown-menu/index.d.ts.map +0 -1
- package/dist/components/ui/form/form.d.ts +0 -24
- package/dist/components/ui/form/form.d.ts.map +0 -1
- package/dist/components/ui/form/index.d.ts +0 -2
- package/dist/components/ui/form/index.d.ts.map +0 -1
- package/dist/components/ui/sheet/index.d.ts +0 -2
- package/dist/components/ui/sheet/index.d.ts.map +0 -1
- package/dist/components/ui/sheet/sheet.d.ts +0 -26
- package/dist/components/ui/sheet/sheet.d.ts.map +0 -1
- package/dist/components/ui/statusline/index.d.ts +0 -2
- package/dist/components/ui/statusline/index.d.ts.map +0 -1
- package/dist/components/ui/statusline/statusline.d.ts +0 -40
- package/dist/components/ui/statusline/statusline.d.ts.map +0 -1
- package/dist/components/ui/terminal-textarea/index.d.ts +0 -2
- package/dist/components/ui/terminal-textarea/index.d.ts.map +0 -1
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +0 -16
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +0 -1
- package/dist/index146.js +0 -6
- package/dist/index147.js +0 -25
- package/dist/index148.js +0 -25
- package/dist/index149.js +0 -15
- package/dist/index150.js +0 -30
- package/dist/index151.js +0 -7
- package/dist/index36.js +0 -37
- package/dist/index37.js +0 -28
- package/dist/index39.js +0 -41
- package/dist/index40.js +0 -13
- package/dist/index41.js +0 -51
- package/dist/index42.js +0 -68
- package/dist/index44.js +0 -2265
- package/dist/index46.js +0 -13
- package/dist/index47.js +0 -227
- package/dist/index49.js +0 -13
- package/dist/index51.js +0 -243
- package/dist/index53.js +0 -14
- package/dist/index55.js +0 -20
- package/dist/index56.js +0 -35
- package/dist/index58.js +0 -14
- package/dist/index60.js +0 -75
- package/dist/index62.js +0 -62
- package/dist/index64.js +0 -256
- package/dist/index66.js +0 -532
- package/dist/index68.js +0 -251
- package/dist/index70.js +0 -163
- package/dist/index72.js +0 -33
- package/dist/index74.js +0 -862
- package/dist/index75.js +0 -11
- package/dist/index77.js +0 -48
package/dist/index91.js
CHANGED
|
@@ -1,52 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
};
|
|
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
|
+
}
|
|
50
6
|
export {
|
|
51
|
-
|
|
7
|
+
t as usePrevious
|
|
52
8
|
};
|
package/dist/index92.js
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
|
|
1
|
+
import * as h from "react";
|
|
2
|
+
import { useLayoutEffect as z } from "./index88.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
|
+
}
|
|
9
25
|
export {
|
|
10
|
-
|
|
26
|
+
c as useSize
|
|
11
27
|
};
|
package/dist/index93.js
CHANGED
|
@@ -1,6 +1,71 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { useComposedRefs as E } from "./index80.js";
|
|
3
|
+
import { useLayoutEffect as A } from "./index88.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;
|
|
3
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);
|
|
68
|
+
}
|
|
4
69
|
export {
|
|
5
|
-
|
|
70
|
+
R as Presence
|
|
6
71
|
};
|