@drjoshcsimmons/scl 0.1.15 → 0.2.2

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.
Files changed (237) hide show
  1. package/LICENSE +1 -1
  2. package/dist/components/ui/accordion/accordion.d.ts +1 -1
  3. package/dist/components/ui/accordion/accordion.d.ts.map +1 -1
  4. package/dist/components/ui/accordion/index.d.ts +1 -1
  5. package/dist/components/ui/accordion/index.d.ts.map +1 -1
  6. package/dist/components/ui/alert/alert.d.ts.map +1 -1
  7. package/dist/components/ui/alert/index.d.ts +1 -1
  8. package/dist/components/ui/alert/index.d.ts.map +1 -1
  9. package/dist/components/ui/alert-dialog/alert-dialog.d.ts +2 -2
  10. package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -1
  11. package/dist/components/ui/alert-dialog/index.d.ts +1 -1
  12. package/dist/components/ui/alert-dialog/index.d.ts.map +1 -1
  13. package/dist/components/ui/avatar/avatar.d.ts +1 -1
  14. package/dist/components/ui/avatar/avatar.d.ts.map +1 -1
  15. package/dist/components/ui/avatar/index.d.ts +1 -1
  16. package/dist/components/ui/avatar/index.d.ts.map +1 -1
  17. package/dist/components/ui/badge/badge.d.ts +1 -1
  18. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  19. package/dist/components/ui/badge/index.d.ts +1 -1
  20. package/dist/components/ui/badge/index.d.ts.map +1 -1
  21. package/dist/components/ui/button/button.d.ts.map +1 -1
  22. package/dist/components/ui/button/index.d.ts +1 -1
  23. package/dist/components/ui/button/index.d.ts.map +1 -1
  24. package/dist/components/ui/card/card.d.ts.map +1 -1
  25. package/dist/components/ui/card/index.d.ts +1 -1
  26. package/dist/components/ui/card/index.d.ts.map +1 -1
  27. package/dist/components/ui/checkbox/checkbox.d.ts +1 -1
  28. package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
  29. package/dist/components/ui/checkbox/index.d.ts.map +1 -1
  30. package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -1
  31. package/dist/components/ui/collapsible/index.d.ts +1 -1
  32. package/dist/components/ui/collapsible/index.d.ts.map +1 -1
  33. package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
  34. package/dist/components/ui/combobox/index.d.ts +1 -1
  35. package/dist/components/ui/combobox/index.d.ts.map +1 -1
  36. package/dist/components/ui/command/command.d.ts.map +1 -1
  37. package/dist/components/ui/command/index.d.ts +1 -1
  38. package/dist/components/ui/command/index.d.ts.map +1 -1
  39. package/dist/components/ui/dialog/dialog.d.ts +1 -1
  40. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  41. package/dist/components/ui/dialog/index.d.ts +1 -1
  42. package/dist/components/ui/dialog/index.d.ts.map +1 -1
  43. package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -1
  44. package/dist/components/ui/dithered-image/index.d.ts +1 -1
  45. package/dist/components/ui/dithered-image/index.d.ts.map +1 -1
  46. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +1 -1
  47. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  48. package/dist/components/ui/dropdown-menu/index.d.ts +1 -1
  49. package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -1
  50. package/dist/components/ui/form/form.d.ts +1 -1
  51. package/dist/components/ui/form/form.d.ts.map +1 -1
  52. package/dist/components/ui/form/index.d.ts +1 -1
  53. package/dist/components/ui/form/index.d.ts.map +1 -1
  54. package/dist/components/ui/input/index.d.ts.map +1 -1
  55. package/dist/components/ui/input/input.d.ts.map +1 -1
  56. package/dist/components/ui/label/index.d.ts.map +1 -1
  57. package/dist/components/ui/label/label.d.ts +1 -1
  58. package/dist/components/ui/label/label.d.ts.map +1 -1
  59. package/dist/components/ui/popover/index.d.ts +1 -1
  60. package/dist/components/ui/popover/index.d.ts.map +1 -1
  61. package/dist/components/ui/popover/popover.d.ts +1 -1
  62. package/dist/components/ui/popover/popover.d.ts.map +1 -1
  63. package/dist/components/ui/progress/index.d.ts.map +1 -1
  64. package/dist/components/ui/progress/progress.d.ts +1 -1
  65. package/dist/components/ui/progress/progress.d.ts.map +1 -1
  66. package/dist/components/ui/radio-group/index.d.ts.map +1 -1
  67. package/dist/components/ui/radio-group/radio-group.d.ts +1 -1
  68. package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
  69. package/dist/components/ui/scroll-area/index.d.ts.map +1 -1
  70. package/dist/components/ui/scroll-area/scroll-area.d.ts +1 -1
  71. package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
  72. package/dist/components/ui/select/index.d.ts +1 -1
  73. package/dist/components/ui/select/index.d.ts.map +1 -1
  74. package/dist/components/ui/select/select.d.ts +1 -1
  75. package/dist/components/ui/select/select.d.ts.map +1 -1
  76. package/dist/components/ui/separator/index.d.ts.map +1 -1
  77. package/dist/components/ui/separator/separator.d.ts +1 -1
  78. package/dist/components/ui/separator/separator.d.ts.map +1 -1
  79. package/dist/components/ui/sheet/index.d.ts +1 -1
  80. package/dist/components/ui/sheet/index.d.ts.map +1 -1
  81. package/dist/components/ui/sheet/sheet.d.ts +2 -2
  82. package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
  83. package/dist/components/ui/skeleton/index.d.ts.map +1 -1
  84. package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
  85. package/dist/components/ui/slider/index.d.ts.map +1 -1
  86. package/dist/components/ui/slider/slider.d.ts +1 -1
  87. package/dist/components/ui/slider/slider.d.ts.map +1 -1
  88. package/dist/components/ui/statusline/index.d.ts.map +1 -1
  89. package/dist/components/ui/statusline/statusline.d.ts.map +1 -1
  90. package/dist/components/ui/switch/index.d.ts.map +1 -1
  91. package/dist/components/ui/switch/switch.d.ts +1 -1
  92. package/dist/components/ui/switch/switch.d.ts.map +1 -1
  93. package/dist/components/ui/table/index.d.ts +1 -1
  94. package/dist/components/ui/table/index.d.ts.map +1 -1
  95. package/dist/components/ui/table/table.d.ts +1 -1
  96. package/dist/components/ui/table/table.d.ts.map +1 -1
  97. package/dist/components/ui/tabs/index.d.ts +1 -1
  98. package/dist/components/ui/tabs/index.d.ts.map +1 -1
  99. package/dist/components/ui/tabs/tabs.d.ts +1 -1
  100. package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
  101. package/dist/components/ui/terminal-textarea/index.d.ts.map +1 -1
  102. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +1 -7
  103. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
  104. package/dist/components/ui/textarea/index.d.ts.map +1 -1
  105. package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
  106. package/dist/components/ui/toggle/index.d.ts.map +1 -1
  107. package/dist/components/ui/toggle/toggle.d.ts +1 -1
  108. package/dist/components/ui/toggle/toggle.d.ts.map +1 -1
  109. package/dist/components/ui/tooltip/index.d.ts +1 -1
  110. package/dist/components/ui/tooltip/index.d.ts.map +1 -1
  111. package/dist/components/ui/tooltip/tooltip.d.ts +1 -1
  112. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  113. package/dist/index.d.ts.map +1 -1
  114. package/dist/index.js +12 -12
  115. package/dist/index10.js +42 -44
  116. package/dist/index100.js +9 -25
  117. package/dist/index101.js +3 -8
  118. package/dist/index102.js +628 -159
  119. package/dist/index103.js +5 -47
  120. package/dist/index104.js +25 -30
  121. package/dist/index105.js +30 -55
  122. package/dist/index106.js +1 -1
  123. package/dist/index107.js +15 -30
  124. package/dist/index108.js +159 -628
  125. package/dist/index109.js +1 -1
  126. package/dist/index11.js +5 -11
  127. package/dist/index110.js +54 -29
  128. package/dist/index111.js +30 -9
  129. package/dist/index112.js +45 -12
  130. package/dist/index114.js +1 -1
  131. package/dist/index115.js +1 -1
  132. package/dist/index116.js +1 -1
  133. package/dist/index118.js +1 -1
  134. package/dist/index12.js +2 -2
  135. package/dist/index120.js +48 -21
  136. package/dist/index121.js +15 -3
  137. package/dist/index122.js +3 -32
  138. package/dist/index123.js +32 -12
  139. package/dist/index124.js +18 -48
  140. package/dist/index13.js +2 -2
  141. package/dist/index14.js +5 -14
  142. package/dist/index15.js +15 -39
  143. package/dist/index16.js +3 -30
  144. package/dist/index17.js +24 -28
  145. package/dist/index18.js +11 -13
  146. package/dist/index20.js +5 -12
  147. package/dist/index21.js +3 -3
  148. package/dist/index22.js +10 -13
  149. package/dist/index23.js +7 -14
  150. package/dist/index24.js +8 -8
  151. package/dist/index25.js +24 -30
  152. package/dist/index26.js +15 -17
  153. package/dist/index27.js +50 -44
  154. package/dist/index28.js +2 -10
  155. package/dist/index29.js +6 -9
  156. package/dist/index3.js +18 -18
  157. package/dist/index30.js +27 -60
  158. package/dist/index31.js +4 -4
  159. package/dist/index32.js +16 -39
  160. package/dist/index33.js +7 -7
  161. package/dist/index34.js +19 -20
  162. package/dist/index36.js +5 -5
  163. package/dist/index37.js +7 -4
  164. package/dist/index38.js +99 -38
  165. package/dist/index39.js +37 -64
  166. package/dist/index4.js +7 -14
  167. package/dist/index40.js +10 -48
  168. package/dist/index41.js +48 -99
  169. package/dist/index42.js +65 -10
  170. package/dist/index45.js +33 -237
  171. package/dist/index46.js +125 -11
  172. package/dist/index47.js +237 -33
  173. package/dist/index48.js +11 -73
  174. package/dist/index49.js +57 -238
  175. package/dist/index5.js +13 -26
  176. package/dist/index50.js +61 -423
  177. package/dist/index51.js +224 -108
  178. package/dist/index52.js +311 -224
  179. package/dist/index53.js +530 -9
  180. package/dist/index54.js +209 -102
  181. package/dist/index55.js +9 -130
  182. package/dist/index56.js +11 -236
  183. package/dist/index57.js +4 -4
  184. package/dist/index58.js +128 -58
  185. package/dist/index59.js +298 -242
  186. package/dist/index6.js +44 -14
  187. package/dist/index60.js +12 -260
  188. package/dist/index61.js +18 -12
  189. package/dist/index62.js +18 -526
  190. package/dist/index63.js +252 -16
  191. package/dist/index64.js +98 -141
  192. package/dist/index65.js +146 -67
  193. package/dist/index66.js +256 -18
  194. package/dist/index67.js +12 -860
  195. package/dist/index68.js +82 -9
  196. package/dist/index69.js +828 -193
  197. package/dist/index7.js +5 -5
  198. package/dist/index70.js +3 -5
  199. package/dist/index71.js +28 -333
  200. package/dist/index72.js +237 -298
  201. package/dist/index73.js +236 -12
  202. package/dist/index74.js +12 -31
  203. package/dist/index75.js +435 -12
  204. package/dist/index77.js +25 -44
  205. package/dist/index78.js +5 -25
  206. package/dist/index79.js +8 -6
  207. package/dist/index8.js +1 -1
  208. package/dist/index80.js +44 -50
  209. package/dist/index81.js +51 -33
  210. package/dist/index82.js +33 -10
  211. package/dist/index83.js +10 -7
  212. package/dist/index84.js +7 -54
  213. package/dist/index85.js +54 -10
  214. package/dist/index86.js +11 -4
  215. package/dist/index87.js +4 -30
  216. package/dist/index88.js +30 -13
  217. package/dist/index89.js +11 -123
  218. package/dist/index9.js +6 -13
  219. package/dist/index90.js +122 -12
  220. package/dist/index91.js +212 -128
  221. package/dist/index92.js +13 -218
  222. package/dist/index93.js +69 -14
  223. package/dist/index94.js +8 -68
  224. package/dist/index95.js +29 -47
  225. package/dist/index96.js +15 -50
  226. package/dist/index97.js +134 -8
  227. package/dist/index98.js +47 -3
  228. package/dist/index99.js +50 -6
  229. package/dist/lib/utils.d.ts.map +1 -1
  230. package/dist/tokens/animations.d.ts.map +1 -1
  231. package/dist/tokens/colors.d.ts.map +1 -1
  232. package/dist/tokens/index.d.ts +3 -3
  233. package/dist/tokens/index.d.ts.map +1 -1
  234. package/dist/tokens/shadows.d.ts.map +1 -1
  235. package/dist/tokens/spacing.d.ts.map +1 -1
  236. package/dist/tokens/typography.d.ts.map +1 -1
  237. package/package.json +19 -9
package/dist/index97.js CHANGED
@@ -1,11 +1,137 @@
1
- import { __assign as m } from "./index128.js";
2
- import * as r from "react";
3
- import { RemoveScroll as e } from "./index129.js";
4
- import t from "./index130.js";
5
- var s = r.forwardRef(function(a, o) {
6
- return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
1
+ import * as d from "react";
2
+ import { useComposedRefs as R } from "./index77.js";
3
+ import { Primitive as M } from "./index82.js";
4
+ import { useCallbackRef as y } from "./index86.js";
5
+ import { jsx as _ } from "react/jsx-runtime";
6
+ var F = "focusScope.autoFocusOnMount", T = "focusScope.autoFocusOnUnmount", N = { bubbles: !1, cancelable: !0 }, K = "FocusScope", k = d.forwardRef((e, n) => {
7
+ const {
8
+ loop: t = !1,
9
+ trapped: u = !1,
10
+ onMountAutoFocus: p,
11
+ onUnmountAutoFocus: L,
12
+ ...g
13
+ } = e, [o, U] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), A = R(n, (s) => U(s)), a = d.useRef({
14
+ paused: !1,
15
+ pause() {
16
+ this.paused = !0;
17
+ },
18
+ resume() {
19
+ this.paused = !1;
20
+ }
21
+ }).current;
22
+ d.useEffect(() => {
23
+ if (u) {
24
+ let s = function(i) {
25
+ if (a.paused || !o) return;
26
+ const c = i.target;
27
+ o.contains(c) ? b.current = c : f(b.current, { select: !0 });
28
+ }, l = function(i) {
29
+ if (a.paused || !o) return;
30
+ const c = i.relatedTarget;
31
+ c !== null && (o.contains(c) || f(b.current, { select: !0 }));
32
+ }, r = function(i) {
33
+ if (document.activeElement === document.body)
34
+ for (const h of i)
35
+ h.removedNodes.length > 0 && f(o);
36
+ };
37
+ document.addEventListener("focusin", s), document.addEventListener("focusout", l);
38
+ const m = new MutationObserver(r);
39
+ return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
40
+ document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
41
+ };
42
+ }
43
+ }, [u, o, a.paused]), d.useEffect(() => {
44
+ if (o) {
45
+ S.add(a);
46
+ const s = document.activeElement;
47
+ if (!o.contains(s)) {
48
+ const r = new CustomEvent(F, N);
49
+ o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(W(I(o)), { select: !0 }), document.activeElement === s && f(o));
50
+ }
51
+ return () => {
52
+ o.removeEventListener(F, E), setTimeout(() => {
53
+ const r = new CustomEvent(T, N);
54
+ o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), S.remove(a);
55
+ }, 0);
56
+ };
57
+ }
58
+ }, [o, E, v, a]);
59
+ const P = d.useCallback(
60
+ (s) => {
61
+ if (!t && !u || a.paused) return;
62
+ const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
63
+ if (l && r) {
64
+ const m = s.currentTarget, [i, c] = x(m);
65
+ i && c ? !s.shiftKey && r === c ? (s.preventDefault(), t && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), t && f(c, { select: !0 })) : r === m && s.preventDefault();
66
+ }
67
+ },
68
+ [t, u, a.paused]
69
+ );
70
+ return /* @__PURE__ */ _(M.div, { tabIndex: -1, ...g, ref: A, onKeyDown: P });
7
71
  });
8
- s.classNames = e.classNames;
72
+ k.displayName = K;
73
+ function w(e, { select: n = !1 } = {}) {
74
+ const t = document.activeElement;
75
+ for (const u of e)
76
+ if (f(u, { select: n }), document.activeElement !== t) return;
77
+ }
78
+ function x(e) {
79
+ const n = I(e), t = O(n, e), u = O(n.reverse(), e);
80
+ return [t, u];
81
+ }
82
+ function I(e) {
83
+ const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
84
+ acceptNode: (u) => {
85
+ const p = u.tagName === "INPUT" && u.type === "hidden";
86
+ return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
87
+ }
88
+ });
89
+ for (; t.nextNode(); ) n.push(t.currentNode);
90
+ return n;
91
+ }
92
+ function O(e, n) {
93
+ for (const t of e)
94
+ if (!D(t, { upTo: n })) return t;
95
+ }
96
+ function D(e, { upTo: n }) {
97
+ if (getComputedStyle(e).visibility === "hidden") return !0;
98
+ for (; e; ) {
99
+ if (n !== void 0 && e === n) return !1;
100
+ if (getComputedStyle(e).display === "none") return !0;
101
+ e = e.parentElement;
102
+ }
103
+ return !1;
104
+ }
105
+ function H(e) {
106
+ return e instanceof HTMLInputElement && "select" in e;
107
+ }
108
+ function f(e, { select: n = !1 } = {}) {
109
+ if (e && e.focus) {
110
+ const t = document.activeElement;
111
+ e.focus({ preventScroll: !0 }), e !== t && H(e) && n && e.select();
112
+ }
113
+ }
114
+ var S = V();
115
+ function V() {
116
+ let e = [];
117
+ return {
118
+ add(n) {
119
+ const t = e[0];
120
+ n !== t && (t == null || t.pause()), e = C(e, n), e.unshift(n);
121
+ },
122
+ remove(n) {
123
+ var t;
124
+ e = C(e, n), (t = e[0]) == null || t.resume();
125
+ }
126
+ };
127
+ }
128
+ function C(e, n) {
129
+ const t = [...e], u = t.indexOf(n);
130
+ return u !== -1 && t.splice(u, 1), t;
131
+ }
132
+ function W(e) {
133
+ return e.filter((n) => n.tagName !== "A");
134
+ }
9
135
  export {
10
- s as default
136
+ k as FocusScope
11
137
  };
package/dist/index98.js CHANGED
@@ -1,6 +1,50 @@
1
- function m(t, [a, n]) {
2
- return Math.min(n, Math.max(a, t));
1
+ import * as l from "react";
2
+ import { composeRefs as m } from "./index77.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 });
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);
3
47
  }
4
48
  export {
5
- m as clamp
49
+ b as createSlot
6
50
  };
package/dist/index99.js CHANGED
@@ -1,8 +1,52 @@
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
- }
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
+ };
6
50
  export {
7
- t as usePrevious
51
+ C as hideOthers
8
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;;GAUG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;;;;;;;;GAUG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../src/tokens/animations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGb,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG,OAAO,UAAU,CAAA"}
1
+ {"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../src/tokens/animations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGb,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,OAAO,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/tokens/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;CAUV,CAAA;AAEV,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAoBT,CAAA;AAEV,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAA;AACpC,MAAM,MAAM,WAAW,GAAG,OAAO,MAAM,CAAA"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/tokens/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;CAUV,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAoBT,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC;AACrC,MAAM,MAAM,WAAW,GAAG,OAAO,MAAM,CAAC"}
@@ -2,11 +2,11 @@
2
2
  * Design tokens for the @drj/ui component library.
3
3
  * Export all tokens and theme configuration.
4
4
  */
5
- export * from './colors';
6
- export * from './typography';
7
- export * from './spacing';
8
5
  export * from './animations';
6
+ export * from './colors';
9
7
  export * from './shadows';
8
+ export * from './spacing';
9
+ export * from './typography';
10
10
  /**
11
11
  * Complete theme configuration object.
12
12
  * Use this to access all design tokens programmatically.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AAQzB;;;GAGG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOR,CAAA;AAEV,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAQ7B;;;GAGG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOR,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../src/tokens/shadows.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;CASV,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,OAAO,OAAO,CAAA"}
1
+ {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../src/tokens/shadows.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;CASV,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/tokens/spacing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCV,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,OAAO,OAAO,CAAA;AAC1C,MAAM,MAAM,kBAAkB,GAAG,OAAO,YAAY,CAAA"}
1
+ {"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/tokens/spacing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCV,CAAC;AAEX,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,OAAO,CAAC;AAC3C,MAAM,MAAM,kBAAkB,GAAG,OAAO,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/tokens/typography.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEb,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,OAAO,UAAU,CAAA"}
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/tokens/typography.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEb,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,20 @@
1
1
  {
2
2
  "name": "@drjoshcsimmons/scl",
3
- "version": "0.1.15",
3
+ "version": "0.2.2",
4
+ "description": "A retro terminal-themed React component library built on Radix and Tailwind",
5
+ "keywords": [
6
+ "react",
7
+ "components",
8
+ "ui",
9
+ "terminal",
10
+ "retro",
11
+ "radix",
12
+ "tailwind",
13
+ "shadcn"
14
+ ],
15
+ "homepage": "https://jcpsimmons.github.io/scl/",
16
+ "author": "Josh Simmons",
17
+ "license": "MIT",
4
18
  "type": "module",
5
19
  "repository": {
6
20
  "type": "git",
@@ -28,7 +42,9 @@
28
42
  "build:storybook": "storybook build -o storybook-static",
29
43
  "test": "vitest",
30
44
  "test:coverage": "vitest --coverage",
31
- "lint": "eslint src --ext .ts,.tsx",
45
+ "lint": "biome lint src",
46
+ "format": "biome format --write src",
47
+ "check": "biome check --write src",
32
48
  "typecheck": "tsc --noEmit",
33
49
  "prepublishOnly": "npm run build"
34
50
  },
@@ -37,6 +53,7 @@
37
53
  "react-dom": "^18.0.0 || ^19.0.0"
38
54
  },
39
55
  "devDependencies": {
56
+ "@biomejs/biome": "2.3.10",
40
57
  "@hookform/resolvers": "^3.9.0",
41
58
  "@radix-ui/react-accordion": "^1.2.0",
42
59
  "@radix-ui/react-alert-dialog": "^1.1.0",
@@ -87,12 +104,6 @@
87
104
  "cmdk": "^1.0.0",
88
105
  "date-fns": "^3.6.0",
89
106
  "embla-carousel-react": "^8.3.0",
90
- "eslint": "^9.0.0",
91
- "eslint-config-prettier": "^10.1.8",
92
- "eslint-plugin-prettier": "^5.5.4",
93
- "eslint-plugin-react-hooks": "^7.0.1",
94
- "eslint-plugin-react-refresh": "^0.4.26",
95
- "globals": "^16.5.0",
96
107
  "input-otp": "^1.4.0",
97
108
  "jsdom": "^25.0.0",
98
109
  "lucide-react": "^0.460.0",
@@ -109,7 +120,6 @@
109
120
  "tailwindcss": "^3.4.0",
110
121
  "tailwindcss-animate": "^1.0.0",
111
122
  "typescript": "^5.6.0",
112
- "typescript-eslint": "^8.50.0",
113
123
  "vaul": "^1.1.0",
114
124
  "vite": "^5.4.0",
115
125
  "vite-plugin-dts": "^4.3.0",