@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.
Files changed (234) hide show
  1. package/dist/components/ui/accordion/accordion.d.ts.map +1 -1
  2. package/dist/components/ui/alert/alert.d.ts +5 -4
  3. package/dist/components/ui/alert/alert.d.ts.map +1 -1
  4. package/dist/components/ui/alert/index.d.ts +1 -1
  5. package/dist/components/ui/alert/index.d.ts.map +1 -1
  6. package/dist/components/ui/avatar/avatar.d.ts.map +1 -1
  7. package/dist/components/ui/badge/badge.d.ts +4 -6
  8. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  9. package/dist/components/ui/badge/index.d.ts +1 -1
  10. package/dist/components/ui/badge/index.d.ts.map +1 -1
  11. package/dist/components/ui/button/button.d.ts +6 -7
  12. package/dist/components/ui/button/button.d.ts.map +1 -1
  13. package/dist/components/ui/button/index.d.ts +1 -1
  14. package/dist/components/ui/button/index.d.ts.map +1 -1
  15. package/dist/components/ui/card/card.d.ts.map +1 -1
  16. package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
  17. package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -1
  18. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  19. package/dist/components/ui/input/input.d.ts.map +1 -1
  20. package/dist/components/ui/label/label.d.ts +1 -2
  21. package/dist/components/ui/label/label.d.ts.map +1 -1
  22. package/dist/components/ui/popover/popover.d.ts.map +1 -1
  23. package/dist/components/ui/progress/progress.d.ts +0 -3
  24. package/dist/components/ui/progress/progress.d.ts.map +1 -1
  25. package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
  26. package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
  27. package/dist/components/ui/select/select.d.ts.map +1 -1
  28. package/dist/components/ui/separator/separator.d.ts.map +1 -1
  29. package/dist/components/ui/skeleton/skeleton.d.ts +1 -0
  30. package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
  31. package/dist/components/ui/slider/slider.d.ts.map +1 -1
  32. package/dist/components/ui/switch/switch.d.ts.map +1 -1
  33. package/dist/components/ui/table/table.d.ts.map +1 -1
  34. package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
  35. package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
  36. package/dist/components/ui/toggle/index.d.ts +1 -1
  37. package/dist/components/ui/toggle/index.d.ts.map +1 -1
  38. package/dist/components/ui/toggle/toggle.d.ts +6 -10
  39. package/dist/components/ui/toggle/toggle.d.ts.map +1 -1
  40. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  41. package/dist/globals.css +223 -287
  42. package/dist/hooks/use-font-loaded.d.ts +2 -0
  43. package/dist/hooks/use-font-loaded.d.ts.map +1 -0
  44. package/dist/index.d.ts +2 -10
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +118 -185
  47. package/dist/index10.js +28 -51
  48. package/dist/index100.js +14 -30
  49. package/dist/index101.js +47 -12
  50. package/dist/index102.js +50 -6
  51. package/dist/index103.js +9 -25
  52. package/dist/index104.js +30 -9
  53. package/dist/index105.js +9 -9
  54. package/dist/index106.js +8 -3
  55. package/dist/index107.js +30 -30
  56. package/dist/index108.js +54 -8
  57. package/dist/index109.js +30 -30
  58. package/dist/index11.js +26 -16
  59. package/dist/index110.js +44 -51
  60. package/dist/index111.js +47 -29
  61. package/dist/index112.js +1 -1
  62. package/dist/index113.js +1 -1
  63. package/dist/index114.js +6 -48
  64. package/dist/index115.js +1 -1
  65. package/dist/index117.js +1 -1
  66. package/dist/index118.js +3 -3
  67. package/dist/index119.js +2 -48
  68. package/dist/index12.js +6 -5
  69. package/dist/index120.js +53 -6
  70. package/dist/index121.js +62 -18
  71. package/dist/index122.js +25 -9
  72. package/dist/index123.js +29 -38
  73. package/dist/index124.js +5 -18
  74. package/dist/index125.js +2 -25
  75. package/dist/index126.js +2 -29
  76. package/dist/index127.js +5 -5
  77. package/dist/index128.js +3 -2
  78. package/dist/index129.js +22 -51
  79. package/dist/index13.js +77 -134
  80. package/dist/index130.js +108 -60
  81. package/dist/index131.js +16 -2
  82. package/dist/index132.js +525 -2
  83. package/dist/index133.js +128 -5
  84. package/dist/index134.js +134 -3
  85. package/dist/index135.js +63 -22
  86. package/dist/index136.js +66 -110
  87. package/dist/index137.js +8 -15
  88. package/dist/index138.js +11 -522
  89. package/dist/index139.js +65 -127
  90. package/dist/index14.js +13 -97
  91. package/dist/index140.js +3 -133
  92. package/dist/index141.js +19 -61
  93. package/dist/index142.js +22 -68
  94. package/dist/index143.js +11 -7
  95. package/dist/index144.js +28 -14
  96. package/dist/index145.js +4 -65
  97. package/dist/index15.js +12 -71
  98. package/dist/index16.js +19 -254
  99. package/dist/index17.js +32 -138
  100. package/dist/index18.js +25 -89
  101. package/dist/index19.js +37 -18
  102. package/dist/index2.js +5 -5
  103. package/dist/index20.js +139 -10
  104. package/dist/index21.js +18 -19
  105. package/dist/index22.js +13 -35
  106. package/dist/index23.js +24 -22
  107. package/dist/index24.js +13 -34
  108. package/dist/index25.js +31 -114
  109. package/dist/index26.js +32 -16
  110. package/dist/index27.js +14 -74
  111. package/dist/index28.js +15 -12
  112. package/dist/index29.js +24 -29
  113. package/dist/index3.js +10 -22
  114. package/dist/index30.js +97 -108
  115. package/dist/index31.js +39 -25
  116. package/dist/index32.js +11 -65
  117. package/dist/index33.js +49 -44
  118. package/dist/index34.js +65 -85
  119. package/dist/index35.js +234 -15
  120. package/dist/index38.js +71 -98
  121. package/dist/index4.js +22 -37
  122. package/dist/index43.js +58 -13
  123. package/dist/index45.js +219 -207
  124. package/dist/index48.js +530 -9
  125. package/dist/index5.js +51 -34
  126. package/dist/index50.js +18 -11
  127. package/dist/index52.js +229 -298
  128. package/dist/index54.js +218 -100
  129. package/dist/index57.js +115 -245
  130. package/dist/index59.js +22 -12
  131. package/dist/index6.js +21 -75
  132. package/dist/index61.js +325 -119
  133. package/dist/index63.js +74 -117
  134. package/dist/index65.js +409 -210
  135. package/dist/index67.js +234 -311
  136. package/dist/index69.js +112 -16
  137. package/dist/index7.js +22 -27
  138. package/dist/index71.js +146 -67
  139. package/dist/index73.js +30 -434
  140. package/dist/index76.js +854 -62
  141. package/dist/index78.js +64 -23
  142. package/dist/index79.js +44 -5
  143. package/dist/index8.js +6 -27
  144. package/dist/index80.js +24 -49
  145. package/dist/index81.js +6 -33
  146. package/dist/index82.js +51 -10
  147. package/dist/index83.js +33 -7
  148. package/dist/index84.js +10 -124
  149. package/dist/index85.js +7 -14
  150. package/dist/index86.js +50 -130
  151. package/dist/index87.js +10 -218
  152. package/dist/index88.js +4 -14
  153. package/dist/index89.js +29 -68
  154. package/dist/index9.js +19 -34
  155. package/dist/index90.js +12 -47
  156. package/dist/index91.js +6 -50
  157. package/dist/index92.js +25 -9
  158. package/dist/index93.js +68 -3
  159. package/dist/index94.js +3 -649
  160. package/dist/index95.js +30 -15
  161. package/dist/index96.js +124 -29
  162. package/dist/index97.js +13 -46
  163. package/dist/index98.js +130 -50
  164. package/dist/index99.js +218 -10
  165. package/dist/lib/utils.d.ts +8 -8
  166. package/dist/lib/utils.d.ts.map +1 -1
  167. package/package.json +5 -46
  168. package/dist/components/ui/alert-dialog/alert-dialog.d.ts +0 -21
  169. package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +0 -1
  170. package/dist/components/ui/alert-dialog/index.d.ts +0 -2
  171. package/dist/components/ui/alert-dialog/index.d.ts.map +0 -1
  172. package/dist/components/ui/combobox/combobox.d.ts +0 -31
  173. package/dist/components/ui/combobox/combobox.d.ts.map +0 -1
  174. package/dist/components/ui/combobox/index.d.ts +0 -3
  175. package/dist/components/ui/combobox/index.d.ts.map +0 -1
  176. package/dist/components/ui/command/command.d.ts +0 -85
  177. package/dist/components/ui/command/command.d.ts.map +0 -1
  178. package/dist/components/ui/command/index.d.ts +0 -2
  179. package/dist/components/ui/command/index.d.ts.map +0 -1
  180. package/dist/components/ui/dithered-image/dithered-image.d.ts +0 -21
  181. package/dist/components/ui/dithered-image/dithered-image.d.ts.map +0 -1
  182. package/dist/components/ui/dithered-image/index.d.ts +0 -3
  183. package/dist/components/ui/dithered-image/index.d.ts.map +0 -1
  184. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +0 -28
  185. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +0 -1
  186. package/dist/components/ui/dropdown-menu/index.d.ts +0 -2
  187. package/dist/components/ui/dropdown-menu/index.d.ts.map +0 -1
  188. package/dist/components/ui/form/form.d.ts +0 -24
  189. package/dist/components/ui/form/form.d.ts.map +0 -1
  190. package/dist/components/ui/form/index.d.ts +0 -2
  191. package/dist/components/ui/form/index.d.ts.map +0 -1
  192. package/dist/components/ui/sheet/index.d.ts +0 -2
  193. package/dist/components/ui/sheet/index.d.ts.map +0 -1
  194. package/dist/components/ui/sheet/sheet.d.ts +0 -26
  195. package/dist/components/ui/sheet/sheet.d.ts.map +0 -1
  196. package/dist/components/ui/statusline/index.d.ts +0 -2
  197. package/dist/components/ui/statusline/index.d.ts.map +0 -1
  198. package/dist/components/ui/statusline/statusline.d.ts +0 -40
  199. package/dist/components/ui/statusline/statusline.d.ts.map +0 -1
  200. package/dist/components/ui/terminal-textarea/index.d.ts +0 -2
  201. package/dist/components/ui/terminal-textarea/index.d.ts.map +0 -1
  202. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +0 -16
  203. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +0 -1
  204. package/dist/index146.js +0 -6
  205. package/dist/index147.js +0 -25
  206. package/dist/index148.js +0 -25
  207. package/dist/index149.js +0 -15
  208. package/dist/index150.js +0 -30
  209. package/dist/index151.js +0 -7
  210. package/dist/index36.js +0 -37
  211. package/dist/index37.js +0 -28
  212. package/dist/index39.js +0 -41
  213. package/dist/index40.js +0 -13
  214. package/dist/index41.js +0 -51
  215. package/dist/index42.js +0 -68
  216. package/dist/index44.js +0 -2265
  217. package/dist/index46.js +0 -13
  218. package/dist/index47.js +0 -227
  219. package/dist/index49.js +0 -13
  220. package/dist/index51.js +0 -243
  221. package/dist/index53.js +0 -14
  222. package/dist/index55.js +0 -20
  223. package/dist/index56.js +0 -35
  224. package/dist/index58.js +0 -14
  225. package/dist/index60.js +0 -75
  226. package/dist/index62.js +0 -62
  227. package/dist/index64.js +0 -256
  228. package/dist/index66.js +0 -532
  229. package/dist/index68.js +0 -251
  230. package/dist/index70.js +0 -163
  231. package/dist/index72.js +0 -33
  232. package/dist/index74.js +0 -862
  233. package/dist/index75.js +0 -11
  234. package/dist/index77.js +0 -48
package/dist/index91.js CHANGED
@@ -1,52 +1,8 @@
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 * 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
- C as hideOthers
7
+ t as usePrevious
52
8
  };
package/dist/index92.js CHANGED
@@ -1,11 +1,27 @@
1
- import { __assign as m } from "./index125.js";
2
- import * as r from "react";
3
- import { RemoveScroll as e } from "./index126.js";
4
- import t from "./index127.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
+ 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
- s as default
26
+ c as useSize
11
27
  };
package/dist/index93.js CHANGED
@@ -1,6 +1,71 @@
1
- import * as t from "react";
2
- var e = globalThis != null && globalThis.document ? t.useLayoutEffect : () => {
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
- e as useLayoutEffect
70
+ R as Presence
6
71
  };