@drjoshcsimmons/scl 0.3.1 → 0.4.1

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 (141) hide show
  1. package/dist/components/ui/accordion/accordion.d.ts +1 -0
  2. package/dist/components/ui/accordion/accordion.d.ts.map +1 -1
  3. package/dist/components/ui/badge/badge.d.ts +5 -1
  4. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  5. package/dist/components/ui/button/button.d.ts +7 -0
  6. package/dist/components/ui/button/button.d.ts.map +1 -1
  7. package/dist/components/ui/input/input.d.ts +6 -1
  8. package/dist/components/ui/input/input.d.ts.map +1 -1
  9. package/dist/components/ui/skeleton/skeleton.d.ts +5 -2
  10. package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
  11. package/dist/components/ui/textarea/textarea.d.ts +6 -1
  12. package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
  13. package/dist/globals.css +45 -0
  14. package/dist/hooks/use-font-loaded.d.ts +2 -0
  15. package/dist/hooks/use-font-loaded.d.ts.map +1 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +116 -114
  19. package/dist/index10.js +33 -28
  20. package/dist/index100.js +3 -5
  21. package/dist/index101.js +2 -2
  22. package/dist/index102.js +5 -54
  23. package/dist/index103.js +25 -30
  24. package/dist/index104.js +47 -29
  25. package/dist/index105.js +30 -4
  26. package/dist/index106.js +45 -216
  27. package/dist/index107.js +7 -46
  28. package/dist/index108.js +178 -27
  29. package/dist/index109.js +51 -44
  30. package/dist/index11.js +28 -5
  31. package/dist/index110.js +30 -9
  32. package/dist/index111.js +30 -6
  33. package/dist/index112.js +6 -48
  34. package/dist/index114.js +200 -42
  35. package/dist/index115.js +20 -204
  36. package/dist/index116.js +399 -21
  37. package/dist/index117.js +40 -392
  38. package/dist/index118.js +48 -2
  39. package/dist/index119.js +23 -51
  40. package/dist/index12.js +5 -79
  41. package/dist/index120.js +29 -65
  42. package/dist/index121.js +5 -25
  43. package/dist/index122.js +2 -29
  44. package/dist/index123.js +53 -5
  45. package/dist/index124.js +65 -2
  46. package/dist/index125.js +2 -2
  47. package/dist/index126.js +2 -5
  48. package/dist/index127.js +5 -3
  49. package/dist/index128.js +3 -24
  50. package/dist/index129.js +22 -111
  51. package/dist/index13.js +75 -12
  52. package/dist/index130.js +111 -14
  53. package/dist/index131.js +14 -523
  54. package/dist/index132.js +511 -114
  55. package/dist/index133.js +111 -117
  56. package/dist/index134.js +130 -61
  57. package/dist/index135.js +65 -69
  58. package/dist/index136.js +68 -8
  59. package/dist/index137.js +9 -14
  60. package/dist/index138.js +14 -66
  61. package/dist/index139.js +66 -4
  62. package/dist/index14.js +17 -14
  63. package/dist/index140.js +3 -22
  64. package/dist/index141.js +23 -13
  65. package/dist/index142.js +20 -25
  66. package/dist/index143.js +12 -4
  67. package/dist/index144.js +25 -20
  68. package/dist/index145.js +7 -0
  69. package/dist/index15.js +12 -17
  70. package/dist/index16.js +18 -31
  71. package/dist/index17.js +32 -25
  72. package/dist/index18.js +19 -31
  73. package/dist/index19.js +28 -129
  74. package/dist/index20.js +136 -18
  75. package/dist/index21.js +19 -11
  76. package/dist/index22.js +11 -20
  77. package/dist/index23.js +23 -15
  78. package/dist/index24.js +15 -31
  79. package/dist/index25.js +31 -35
  80. package/dist/index26.js +35 -15
  81. package/dist/index27.js +15 -13
  82. package/dist/index28.js +11 -20
  83. package/dist/index29.js +23 -99
  84. package/dist/index3.js +10 -22
  85. package/dist/index30.js +99 -38
  86. package/dist/index31.js +38 -10
  87. package/dist/index32.js +10 -48
  88. package/dist/index33.js +47 -64
  89. package/dist/index34.js +66 -236
  90. package/dist/{index63.js → index38.js} +14 -14
  91. package/dist/index4.js +22 -53
  92. package/dist/index40.js +239 -0
  93. package/dist/{index59.js → index42.js} +1 -1
  94. package/dist/index45.js +507 -236
  95. package/dist/index47.js +860 -18
  96. package/dist/index5.js +52 -24
  97. package/dist/index50.js +91 -197
  98. package/dist/{index65.js → index53.js} +8 -8
  99. package/dist/index55.js +221 -822
  100. package/dist/{index67.js → index58.js} +6 -6
  101. package/dist/index6.js +24 -34
  102. package/dist/index61.js +310 -504
  103. package/dist/{index43.js → index64.js} +7 -7
  104. package/dist/{index57.js → index66.js} +2 -2
  105. package/dist/{index52.js → index68.js} +3 -3
  106. package/dist/index7.js +34 -6
  107. package/dist/index70.js +238 -0
  108. package/dist/{index69.js → index72.js} +7 -7
  109. package/dist/{index36.js → index74.js} +1 -1
  110. package/dist/index76.js +20 -0
  111. package/dist/index8.js +6 -21
  112. package/dist/index81.js +1 -1
  113. package/dist/index82.js +1 -1
  114. package/dist/index83.js +7 -30
  115. package/dist/index84.js +25 -5
  116. package/dist/index86.js +114 -170
  117. package/dist/index87.js +13 -67
  118. package/dist/index88.js +133 -32
  119. package/dist/index89.js +10 -7
  120. package/dist/index9.js +27 -32
  121. package/dist/index90.js +215 -48
  122. package/dist/index91.js +14 -11
  123. package/dist/index92.js +64 -120
  124. package/dist/index93.js +32 -133
  125. package/dist/index94.js +48 -14
  126. package/dist/index95.js +50 -13
  127. package/dist/index96.js +50 -9
  128. package/dist/index97.js +9 -50
  129. package/dist/index98.js +29 -47
  130. package/dist/index99.js +7 -24
  131. package/dist/tokens/index.d.ts +9 -8
  132. package/dist/tokens/index.d.ts.map +1 -1
  133. package/dist/tokens/spacing.d.ts +11 -8
  134. package/dist/tokens/spacing.d.ts.map +1 -1
  135. package/dist/tokens/typography.d.ts +1 -0
  136. package/dist/tokens/typography.d.ts.map +1 -1
  137. package/package.json +4 -5
  138. package/dist/index71.js +0 -338
  139. package/dist/index73.js +0 -132
  140. package/dist/index77.js +0 -29
  141. /package/dist/{index41.js → index35.js} +0 -0
package/dist/index94.js CHANGED
@@ -1,16 +1,50 @@
1
- import * as r from "react";
2
- import s from "react-dom";
3
- import { Primitive as c } from "./index88.js";
4
- import { useLayoutEffect as u } from "./index80.js";
5
- import { jsx as l } from "react/jsx-runtime";
6
- var p = "Portal", d = r.forwardRef((e, a) => {
7
- var o;
8
- const { container: f, ...i } = e, [m, n] = r.useState(!1);
9
- u(() => n(!0), []);
10
- const t = f || m && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
11
- return t ? s.createPortal(/* @__PURE__ */ l(c.div, { ...i, ref: a }), t) : null;
12
- });
13
- d.displayName = p;
1
+ import * as l from "react";
2
+ import { composeRefs as m } from "./index84.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);
47
+ }
14
48
  export {
15
- d as Portal
49
+ b as createSlot
16
50
  };
package/dist/index95.js CHANGED
@@ -1,17 +1,54 @@
1
- import * as r from "react";
2
- var t = 0;
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
- }, []);
1
+ import * as n from "react";
2
+ import { useLayoutEffect as v } from "./index80.js";
3
+ var E = n[" useInsertionEffect ".trim().toString()] || v;
4
+ function y({
5
+ prop: t,
6
+ defaultProp: u,
7
+ onChange: o = () => {
8
+ },
9
+ caller: i
10
+ }) {
11
+ const [l, e, r] = w({
12
+ defaultProp: u,
13
+ onChange: o
14
+ }), c = t !== void 0, a = c ? t : l;
15
+ {
16
+ const s = n.useRef(t !== void 0);
17
+ n.useEffect(() => {
18
+ const f = s.current;
19
+ f !== c && console.warn(
20
+ `${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
21
+ ), s.current = c;
22
+ }, [c, i]);
23
+ }
24
+ const m = n.useCallback(
25
+ (s) => {
26
+ var f;
27
+ if (c) {
28
+ const d = R(s) ? s(t) : s;
29
+ d !== t && ((f = r.current) == null || f.call(r, d));
30
+ } else
31
+ e(s);
32
+ },
33
+ [c, t, e, r]
34
+ );
35
+ return [a, m];
10
36
  }
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;
37
+ function w({
38
+ defaultProp: t,
39
+ onChange: u
40
+ }) {
41
+ const [o, i] = n.useState(t), l = n.useRef(o), e = n.useRef(u);
42
+ return E(() => {
43
+ e.current = u;
44
+ }, [u]), n.useEffect(() => {
45
+ var r;
46
+ l.current !== o && ((r = e.current) == null || r.call(e, o), l.current = o);
47
+ }, [o, l]), [o, i, e];
48
+ }
49
+ function R(t) {
50
+ return typeof t == "function";
14
51
  }
15
52
  export {
16
- a as useFocusGuards
53
+ y as useControllableState
17
54
  };
package/dist/index96.js CHANGED
@@ -1,11 +1,52 @@
1
- import { __assign as m } from "./index121.js";
2
- import * as r from "react";
3
- import { RemoveScroll as e } from "./index122.js";
4
- import t from "./index123.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;
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
+ };
9
50
  export {
10
- s as default
51
+ C as hideOthers
11
52
  };
package/dist/index97.js CHANGED
@@ -1,52 +1,11 @@
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
- };
1
+ import { __assign as m } from "./index119.js";
2
+ import * as r from "react";
3
+ import { RemoveScroll as e } from "./index120.js";
4
+ import t from "./index121.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;
50
9
  export {
51
- C as hideOthers
10
+ s as default
52
11
  };
package/dist/index98.js CHANGED
@@ -1,50 +1,32 @@
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 });
1
+ import * as f from "react";
2
+ import "react-dom";
3
+ import { createSlot as l } from "./index74.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 });
13
27
  });
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
- }
28
+ return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
29
+ }, {});
48
30
  export {
49
- b as createSlot
31
+ w as Primitive
50
32
  };
package/dist/index99.js CHANGED
@@ -1,27 +1,10 @@
1
- import * as h from "react";
2
- import { useLayoutEffect as z } from "./index80.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;
1
+ import * as t from "react";
2
+ import "react/jsx-runtime";
3
+ var r = t.createContext(void 0);
4
+ function n(o) {
5
+ const e = t.useContext(r);
6
+ return o || e || "ltr";
24
7
  }
25
8
  export {
26
- c as useSize
9
+ n as useDirection
27
10
  };
@@ -28,6 +28,7 @@ export declare const theme: {
28
28
  };
29
29
  readonly typography: {
30
30
  readonly fontFamily: {
31
+ readonly terminal: readonly ["BigBlueTerm437", "monospace"];
31
32
  readonly sans: readonly ["ui-sans-serif", "system-ui", "sans-serif", "\"Apple Color Emoji\"", "\"Segoe UI Emoji\"", "\"Segoe UI Symbol\"", "\"Noto Color Emoji\""];
32
33
  readonly mono: readonly ["ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", "\"Liberation Mono\"", "\"Courier New\"", "monospace"];
33
34
  };
@@ -139,14 +140,14 @@ export declare const theme: {
139
140
  };
140
141
  readonly borderRadius: {
141
142
  readonly none: "0px";
142
- readonly sm: "calc(var(--radius) - 4px)";
143
- readonly md: "calc(var(--radius) - 2px)";
144
- readonly DEFAULT: "var(--radius)";
145
- readonly lg: "var(--radius)";
146
- readonly xl: "calc(var(--radius) + 4px)";
147
- readonly '2xl': "calc(var(--radius) + 8px)";
148
- readonly '3xl': "calc(var(--radius) + 16px)";
149
- readonly full: "9999px";
143
+ readonly sm: "0px";
144
+ readonly md: "0px";
145
+ readonly DEFAULT: "0px";
146
+ readonly lg: "0px";
147
+ readonly xl: "0px";
148
+ readonly '2xl': "0px";
149
+ readonly '3xl': "0px";
150
+ readonly full: "0px";
150
151
  };
151
152
  readonly animations: {
152
153
  readonly keyframes: {
@@ -1 +1 @@
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
+ {"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"}
@@ -39,16 +39,19 @@ export declare const spacing: {
39
39
  readonly 80: "20rem";
40
40
  readonly 96: "24rem";
41
41
  };
42
+ /**
43
+ * Border radius tokens. All values are 0px — SCL enforces sharp corners everywhere.
44
+ */
42
45
  export declare const borderRadius: {
43
46
  readonly none: "0px";
44
- readonly sm: "calc(var(--radius) - 4px)";
45
- readonly md: "calc(var(--radius) - 2px)";
46
- readonly DEFAULT: "var(--radius)";
47
- readonly lg: "var(--radius)";
48
- readonly xl: "calc(var(--radius) + 4px)";
49
- readonly '2xl': "calc(var(--radius) + 8px)";
50
- readonly '3xl': "calc(var(--radius) + 16px)";
51
- readonly full: "9999px";
47
+ readonly sm: "0px";
48
+ readonly md: "0px";
49
+ readonly DEFAULT: "0px";
50
+ readonly lg: "0px";
51
+ readonly xl: "0px";
52
+ readonly '2xl': "0px";
53
+ readonly '3xl': "0px";
54
+ readonly full: "0px";
52
55
  };
53
56
  export type SpacingTokens = typeof spacing;
54
57
  export type BorderRadiusTokens = typeof borderRadius;
@@ -1 +1 @@
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
+ {"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/tokens/spacing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCV,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,OAAO,CAAC;AAC3C,MAAM,MAAM,kBAAkB,GAAG,OAAO,YAAY,CAAC"}
@@ -4,6 +4,7 @@
4
4
  */
5
5
  export declare const typography: {
6
6
  readonly fontFamily: {
7
+ readonly terminal: readonly ["BigBlueTerm437", "monospace"];
7
8
  readonly sans: readonly ["ui-sans-serif", "system-ui", "sans-serif", "\"Apple Color Emoji\"", "\"Segoe UI Emoji\"", "\"Segoe UI Symbol\"", "\"Noto Color Emoji\""];
8
9
  readonly mono: readonly ["ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", "\"Liberation Mono\"", "\"Courier New\"", "monospace"];
9
10
  };
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/tokens/typography.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEb,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drjoshcsimmons/scl",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "A retro terminal-themed React component library built on Radix primitives with vanilla CSS",
5
5
  "keywords": [
6
6
  "react",
@@ -97,9 +97,8 @@
97
97
  "typescript": "^5.6.0",
98
98
  "vite": "^5.4.0",
99
99
  "vite-plugin-dts": "^4.3.0",
100
- "vitest": "^2.1.0"
101
- },
102
- "dependencies": {
100
+ "vitest": "^2.1.0",
103
101
  "@vercel/analytics": "^1.6.1"
104
- }
102
+ },
103
+ "dependencies": {}
105
104
  }