@drjoshcsimmons/scl 0.2.7 → 0.2.8

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 (118) hide show
  1. package/dist/index100.js +30 -15
  2. package/dist/index101.js +12 -5
  3. package/dist/index102.js +5 -24
  4. package/dist/index103.js +24 -54
  5. package/dist/index104.js +9 -30
  6. package/dist/index105.js +166 -204
  7. package/dist/index106.js +3 -8
  8. package/dist/index107.js +30 -30
  9. package/dist/index108.js +8 -180
  10. package/dist/index109.js +27 -647
  11. package/dist/index11.js +2 -2
  12. package/dist/index110.js +55 -30
  13. package/dist/index111.js +29 -47
  14. package/dist/index113.js +48 -6
  15. package/dist/index115.js +11 -47
  16. package/dist/index116.js +204 -10
  17. package/dist/index117.js +21 -20
  18. package/dist/index118.js +400 -9
  19. package/dist/index119.js +48 -38
  20. package/dist/index12.js +1 -1
  21. package/dist/index120.js +6 -18
  22. package/dist/index121.js +21 -206
  23. package/dist/index122.js +9 -22
  24. package/dist/index123.js +38 -400
  25. package/dist/index124.js +18 -48
  26. package/dist/index125.js +25 -2
  27. package/dist/index126.js +29 -53
  28. package/dist/index127.js +5 -65
  29. package/dist/index128.js +2 -25
  30. package/dist/index129.js +53 -29
  31. package/dist/index13.js +2 -2
  32. package/dist/index130.js +65 -5
  33. package/dist/index134.js +1 -1
  34. package/dist/index136.js +5 -5
  35. package/dist/index137.js +1 -1
  36. package/dist/index14.js +2 -2
  37. package/dist/index141.js +65 -69
  38. package/dist/index142.js +68 -8
  39. package/dist/index143.js +9 -14
  40. package/dist/index144.js +14 -66
  41. package/dist/index145.js +65 -64
  42. package/dist/index148.js +21 -11
  43. package/dist/index149.js +11 -26
  44. package/dist/index15.js +2 -2
  45. package/dist/index150.js +27 -4
  46. package/dist/index151.js +4 -22
  47. package/dist/index17.js +4 -4
  48. package/dist/index18.js +2 -2
  49. package/dist/index20.js +2 -2
  50. package/dist/index21.js +1 -1
  51. package/dist/index22.js +1 -1
  52. package/dist/index23.js +2 -2
  53. package/dist/index24.js +1 -1
  54. package/dist/index25.js +3 -3
  55. package/dist/index26.js +1 -1
  56. package/dist/index27.js +3 -3
  57. package/dist/index29.js +1 -1
  58. package/dist/index31.js +1 -1
  59. package/dist/index33.js +1 -1
  60. package/dist/index36.js +2 -2
  61. package/dist/index37.js +1 -1
  62. package/dist/index45.js +1 -1
  63. package/dist/index46.js +1 -1
  64. package/dist/index47.js +224 -32
  65. package/dist/index48.js +9 -73
  66. package/dist/index49.js +11 -125
  67. package/dist/index5.js +1 -1
  68. package/dist/index50.js +11 -530
  69. package/dist/index51.js +198 -217
  70. package/dist/index52.js +310 -12
  71. package/dist/index53.js +12 -60
  72. package/dist/index54.js +117 -17
  73. package/dist/index55.js +18 -12
  74. package/dist/index56.js +33 -9
  75. package/dist/index57.js +245 -295
  76. package/dist/index58.js +5 -5
  77. package/dist/index59.js +12 -82
  78. package/dist/index6.js +1 -1
  79. package/dist/index60.js +64 -121
  80. package/dist/index61.js +111 -416
  81. package/dist/index62.js +55 -244
  82. package/dist/index63.js +110 -210
  83. package/dist/index64.js +254 -11
  84. package/dist/index65.js +236 -11
  85. package/dist/index66.js +504 -310
  86. package/dist/index67.js +317 -142
  87. package/dist/index68.js +245 -18
  88. package/dist/index69.js +16 -854
  89. package/dist/index7.js +1 -1
  90. package/dist/index70.js +161 -9
  91. package/dist/index71.js +82 -31
  92. package/dist/index72.js +29 -252
  93. package/dist/index73.js +409 -210
  94. package/dist/index74.js +839 -97
  95. package/dist/index75.js +9 -241
  96. package/dist/index77.js +1 -1
  97. package/dist/index8.js +1 -1
  98. package/dist/index80.js +1 -1
  99. package/dist/index81.js +1 -1
  100. package/dist/index82.js +1 -1
  101. package/dist/index84.js +118 -48
  102. package/dist/index85.js +12 -8
  103. package/dist/index86.js +135 -4
  104. package/dist/index87.js +219 -30
  105. package/dist/index88.js +14 -13
  106. package/dist/index89.js +68 -8
  107. package/dist/index9.js +2 -2
  108. package/dist/index90.js +42 -63
  109. package/dist/index91.js +50 -4
  110. package/dist/index92.js +8 -124
  111. package/dist/index93.js +4 -135
  112. package/dist/index94.js +649 -13
  113. package/dist/index95.js +13 -13
  114. package/dist/index96.js +30 -9
  115. package/dist/index97.js +47 -49
  116. package/dist/index98.js +51 -44
  117. package/dist/index99.js +11 -30
  118. package/package.json +1 -1
package/dist/index59.js CHANGED
@@ -1,84 +1,14 @@
1
- import * as m from "react";
2
- import { createContextScope as $ } from "./index103.js";
3
- import { Primitive as c } from "./index104.js";
4
- import { jsx as l } from "react/jsx-runtime";
5
- var u = "Progress", d = 100, [h] = $(u), [R, _] = h(u), f = m.forwardRef(
6
- (r, e) => {
7
- const {
8
- __scopeProgress: i,
9
- value: o = null,
10
- max: a,
11
- getValueLabel: N = E,
12
- ...b
13
- } = r;
14
- (a || a === 0) && !v(a) && console.error(M(`${a}`, "Progress"));
15
- const t = v(a) ? a : d;
16
- o !== null && !p(o, t) && console.error(V(`${o}`, "Progress"));
17
- const n = p(o, t) ? o : null, I = s(n) ? N(n, t) : void 0;
18
- return /* @__PURE__ */ l(R, { scope: i, value: n, max: t, children: /* @__PURE__ */ l(
19
- c.div,
20
- {
21
- "aria-valuemax": t,
22
- "aria-valuemin": 0,
23
- "aria-valuenow": s(n) ? n : void 0,
24
- "aria-valuetext": I,
25
- role: "progressbar",
26
- "data-state": P(n, t),
27
- "data-value": n ?? void 0,
28
- "data-max": t,
29
- ...b,
30
- ref: e
31
- }
32
- ) });
33
- }
34
- );
35
- f.displayName = u;
36
- var g = "ProgressIndicator", x = m.forwardRef(
37
- (r, e) => {
38
- const { __scopeProgress: i, ...o } = r, a = _(g, i);
39
- return /* @__PURE__ */ l(
40
- c.div,
41
- {
42
- "data-state": P(a.value, a.max),
43
- "data-value": a.value ?? void 0,
44
- "data-max": a.max,
45
- ...o,
46
- ref: e
47
- }
48
- );
49
- }
50
- );
51
- x.displayName = g;
52
- function E(r, e) {
53
- return `${Math.round(r / e * 100)}%`;
54
- }
55
- function P(r, e) {
56
- return r == null ? "indeterminate" : r === e ? "complete" : "loading";
57
- }
58
- function s(r) {
59
- return typeof r == "number";
60
- }
61
- function v(r) {
62
- return s(r) && !isNaN(r) && r > 0;
63
- }
64
- function p(r, e) {
65
- return s(r) && !isNaN(r) && r <= e && r >= 0;
66
- }
67
- function M(r, e) {
68
- return `Invalid prop \`max\` of value \`${r}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${d}\`.`;
69
- }
70
- function V(r, e) {
71
- return `Invalid prop \`value\` of value \`${r}\` supplied to \`${e}\`. The \`value\` prop must be:
72
- - a positive number
73
- - less than the value passed to \`max\` (or ${d} if no \`max\` prop is set)
74
- - \`null\` or \`undefined\` if the progress is indeterminate.
75
-
76
- Defaulting to \`null\`.`;
77
- }
78
- var D = f, L = x;
1
+ import e from "./index121.js";
2
+ /**
3
+ * @license lucide-react v0.460.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const t = e("ChevronsUpDown", [
9
+ ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
10
+ ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
11
+ ]);
79
12
  export {
80
- L as Indicator,
81
- f as Progress,
82
- x as ProgressIndicator,
83
- D as Root
13
+ t as default
84
14
  };
package/dist/index6.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as l, jsxs as g } from "react/jsx-runtime";
2
- import { Root as N, Portal as y, Trigger as x, Action as r, Cancel as i, Content as m, Description as n, Overlay as c, Title as d } from "./index49.js";
2
+ import { Root as N, Portal as y, Trigger as x, Action as r, Cancel as i, Content as m, Description as n, Overlay as c, Title as d } from "./index63.js";
3
3
  import * as s from "react";
4
4
  import { cn as o } from "./index2.js";
5
5
  import { buttonVariants as f } from "./index9.js";
package/dist/index60.js CHANGED
@@ -1,132 +1,75 @@
1
- import * as r from "react";
2
- import { composeEventHandlers as T } from "./index79.js";
3
- import { useComposedRefs as P } from "./index78.js";
4
- import { createContextScope as I } from "./index76.js";
5
- import { useControllableState as M } from "./index80.js";
6
- import { usePrevious as H } from "./index101.js";
7
- import { useSize as j } from "./index102.js";
8
- import { Primitive as y } from "./index81.js";
9
- import { jsxs as A, jsx as m } from "react/jsx-runtime";
10
- var h = "Switch", [U] = I(h), [q, z] = U(h), R = r.forwardRef(
11
- (t, a) => {
12
- const {
13
- __scopeSwitch: e,
14
- name: c,
15
- checked: o,
16
- defaultChecked: v,
17
- required: i,
18
- disabled: n,
19
- value: p = "on",
20
- onCheckedChange: w,
21
- form: s,
22
- ...S
23
- } = t, [d, u] = r.useState(null), b = P(a, (f) => u(f)), C = r.useRef(!1), k = d ? s || !!d.closest("form") : !0, [l, B] = M({
24
- prop: o,
25
- defaultProp: v ?? !1,
26
- onChange: w,
27
- caller: h
28
- });
29
- return /* @__PURE__ */ A(q, { scope: e, checked: l, disabled: n, children: [
30
- /* @__PURE__ */ m(
31
- y.button,
32
- {
33
- type: "button",
34
- role: "switch",
35
- "aria-checked": l,
36
- "aria-required": i,
37
- "data-state": g(l),
38
- "data-disabled": n ? "" : void 0,
39
- disabled: n,
40
- value: p,
41
- ...S,
42
- ref: b,
43
- onClick: T(t.onClick, (f) => {
44
- B((N) => !N), k && (C.current = f.isPropagationStopped(), C.current || f.stopPropagation());
45
- })
46
- }
47
- ),
48
- k && /* @__PURE__ */ m(
49
- x,
50
- {
51
- control: d,
52
- bubbles: !C.current,
53
- name: c,
54
- value: p,
55
- checked: l,
56
- required: i,
57
- disabled: n,
58
- form: s,
59
- style: { transform: "translateX(-100%)" }
60
- }
61
- )
62
- ] });
63
- }
64
- );
65
- R.displayName = h;
66
- var E = "SwitchThumb", _ = r.forwardRef(
67
- (t, a) => {
68
- const { __scopeSwitch: e, ...c } = t, o = z(E, e);
69
- return /* @__PURE__ */ m(
70
- y.span,
1
+ import * as i from "react";
2
+ import { createContextScope as C } from "./index98.js";
3
+ import { useCallbackRef as h } from "./index99.js";
4
+ import { useLayoutEffect as f } from "./index93.js";
5
+ import { Primitive as m } from "./index100.js";
6
+ import { useIsHydrated as _ } from "./index101.js";
7
+ import { jsx as l } from "react/jsx-runtime";
8
+ var v = "Avatar", [y] = C(v), [x, A] = y(v), L = i.forwardRef(
9
+ (t, e) => {
10
+ const { __scopeAvatar: o, ...r } = t, [n, a] = i.useState("idle");
11
+ return /* @__PURE__ */ l(
12
+ x,
71
13
  {
72
- "data-state": g(o.checked),
73
- "data-disabled": o.disabled ? "" : void 0,
74
- ...c,
75
- ref: a
14
+ scope: o,
15
+ imageLoadingStatus: n,
16
+ onImageLoadingStatusChange: a,
17
+ children: /* @__PURE__ */ l(m.span, { ...r, ref: e })
76
18
  }
77
19
  );
78
20
  }
79
21
  );
80
- _.displayName = E;
81
- var L = "SwitchBubbleInput", x = r.forwardRef(
82
- ({
83
- __scopeSwitch: t,
84
- control: a,
85
- checked: e,
86
- bubbles: c = !0,
87
- ...o
88
- }, v) => {
89
- const i = r.useRef(null), n = P(i, v), p = H(e), w = j(a);
90
- return r.useEffect(() => {
91
- const s = i.current;
92
- if (!s) return;
93
- const S = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(
94
- S,
95
- "checked"
96
- ).set;
97
- if (p !== e && u) {
98
- const b = new Event("click", { bubbles: c });
99
- u.call(s, e), s.dispatchEvent(b);
100
- }
101
- }, [p, e, c]), /* @__PURE__ */ m(
102
- "input",
103
- {
104
- type: "checkbox",
105
- "aria-hidden": !0,
106
- defaultChecked: e,
107
- ...o,
108
- tabIndex: -1,
109
- ref: n,
110
- style: {
111
- ...o.style,
112
- ...w,
113
- position: "absolute",
114
- pointerEvents: "none",
115
- opacity: 0,
116
- margin: 0
117
- }
22
+ L.displayName = v;
23
+ var S = "AvatarImage", E = i.forwardRef(
24
+ (t, e) => {
25
+ const { __scopeAvatar: o, src: r, onLoadingStatusChange: n = () => {
26
+ }, ...a } = t, u = A(S, o), s = N(r, a), d = h((c) => {
27
+ n(c), u.onImageLoadingStatusChange(c);
28
+ });
29
+ return f(() => {
30
+ s !== "idle" && d(s);
31
+ }, [s, d]), s === "loaded" ? /* @__PURE__ */ l(m.img, { ...a, ref: e, src: r }) : null;
32
+ }
33
+ );
34
+ E.displayName = S;
35
+ var I = "AvatarFallback", R = i.forwardRef(
36
+ (t, e) => {
37
+ const { __scopeAvatar: o, delayMs: r, ...n } = t, a = A(I, o), [u, s] = i.useState(r === void 0);
38
+ return i.useEffect(() => {
39
+ if (r !== void 0) {
40
+ const d = window.setTimeout(() => s(!0), r);
41
+ return () => window.clearTimeout(d);
118
42
  }
119
- );
43
+ }, [r]), u && a.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ l(m.span, { ...n, ref: e }) : null;
120
44
  }
121
45
  );
122
- x.displayName = L;
123
- function g(t) {
124
- return t ? "checked" : "unchecked";
46
+ R.displayName = I;
47
+ function p(t, e) {
48
+ return t ? e ? (t.src !== e && (t.src = e), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
49
+ }
50
+ function N(t, { referrerPolicy: e, crossOrigin: o }) {
51
+ const r = _(), n = i.useRef(null), a = r ? (n.current || (n.current = new window.Image()), n.current) : null, [u, s] = i.useState(
52
+ () => p(a, t)
53
+ );
54
+ return f(() => {
55
+ s(p(a, t));
56
+ }, [a, t]), f(() => {
57
+ const d = (w) => () => {
58
+ s(w);
59
+ };
60
+ if (!a) return;
61
+ const c = d("loaded"), g = d("error");
62
+ return a.addEventListener("load", c), a.addEventListener("error", g), e && (a.referrerPolicy = e), typeof o == "string" && (a.crossOrigin = o), () => {
63
+ a.removeEventListener("load", c), a.removeEventListener("error", g);
64
+ };
65
+ }, [a, o, e]), u;
125
66
  }
126
- var Q = R, V = _;
67
+ var H = L, j = E, B = R;
127
68
  export {
128
- Q as Root,
129
- R as Switch,
130
- _ as SwitchThumb,
131
- V as Thumb
69
+ L as Avatar,
70
+ R as AvatarFallback,
71
+ E as AvatarImage,
72
+ B as Fallback,
73
+ j as Image,
74
+ H as Root
132
75
  };