@drjoshcsimmons/scl 0.2.1 → 0.2.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 (118) hide show
  1. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +1 -7
  2. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
  3. package/dist/index100.js +180 -3
  4. package/dist/index101.js +9 -30
  5. package/dist/index102.js +30 -13
  6. package/dist/index103.js +44 -646
  7. package/dist/index104.js +4 -30
  8. package/dist/index105.js +47 -3
  9. package/dist/index106.js +5 -47
  10. package/dist/index107.js +647 -27
  11. package/dist/index108.js +30 -55
  12. package/dist/index109.js +1 -1
  13. package/dist/index11.js +2 -2
  14. package/dist/index110.js +12 -45
  15. package/dist/index111.js +24 -8
  16. package/dist/index112.js +8 -14
  17. package/dist/index113.js +6 -48
  18. package/dist/index114.js +1 -1
  19. package/dist/index115.js +47 -11
  20. package/dist/index116.js +10 -204
  21. package/dist/index117.js +204 -20
  22. package/dist/index118.js +21 -399
  23. package/dist/index119.js +400 -6
  24. package/dist/index12.js +1 -1
  25. package/dist/index120.js +21 -48
  26. package/dist/index121.js +3 -15
  27. package/dist/index122.js +32 -3
  28. package/dist/index123.js +12 -32
  29. package/dist/index124.js +48 -18
  30. package/dist/index125.js +2 -25
  31. package/dist/index126.js +53 -29
  32. package/dist/index127.js +65 -5
  33. package/dist/index128.js +25 -2
  34. package/dist/index129.js +29 -53
  35. package/dist/index13.js +2 -2
  36. package/dist/index130.js +5 -65
  37. package/dist/index136.js +1 -1
  38. package/dist/index137.js +1 -1
  39. package/dist/index14.js +2 -2
  40. package/dist/index141.js +1 -1
  41. package/dist/index15.js +2 -2
  42. package/dist/index17.js +4 -4
  43. package/dist/index18.js +2 -2
  44. package/dist/index20.js +2 -2
  45. package/dist/index21.js +1 -1
  46. package/dist/index22.js +1 -1
  47. package/dist/index23.js +2 -2
  48. package/dist/index24.js +1 -1
  49. package/dist/index25.js +4 -4
  50. package/dist/index26.js +1 -1
  51. package/dist/index27.js +3 -3
  52. package/dist/index29.js +1 -1
  53. package/dist/index31.js +1 -1
  54. package/dist/index33.js +1 -1
  55. package/dist/index34.js +18 -16
  56. package/dist/index36.js +2 -2
  57. package/dist/index37.js +1 -1
  58. package/dist/index4.js +2 -2
  59. package/dist/index45.js +33 -237
  60. package/dist/index46.js +73 -11
  61. package/dist/index47.js +60 -33
  62. package/dist/index48.js +210 -214
  63. package/dist/index49.js +11 -18
  64. package/dist/index5.js +1 -1
  65. package/dist/index50.js +225 -109
  66. package/dist/index51.js +82 -31
  67. package/dist/index52.js +247 -66
  68. package/dist/index53.js +100 -218
  69. package/dist/index54.js +161 -11
  70. package/dist/index55.js +330 -54
  71. package/dist/index56.js +254 -248
  72. package/dist/index57.js +12 -225
  73. package/dist/index58.js +860 -9
  74. package/dist/index59.js +3 -5
  75. package/dist/index6.js +1 -1
  76. package/dist/index60.js +9 -130
  77. package/dist/index61.js +221 -18
  78. package/dist/index62.js +11 -860
  79. package/dist/index63.js +5 -3
  80. package/dist/index64.js +12 -82
  81. package/dist/index65.js +507 -237
  82. package/dist/index66.js +22 -12
  83. package/dist/index67.js +298 -237
  84. package/dist/index68.js +12 -118
  85. package/dist/index69.js +18 -530
  86. package/dist/index7.js +1 -1
  87. package/dist/index70.js +31 -12
  88. package/dist/index71.js +210 -409
  89. package/dist/index72.js +407 -308
  90. package/dist/index73.js +237 -298
  91. package/dist/index74.js +125 -12
  92. package/dist/index75.js +112 -143
  93. package/dist/index76.js +40 -53
  94. package/dist/index77.js +10 -45
  95. package/dist/index78.js +4 -27
  96. package/dist/index79.js +30 -7
  97. package/dist/index8.js +1 -1
  98. package/dist/index80.js +10 -49
  99. package/dist/index81.js +67 -33
  100. package/dist/index82.js +45 -10
  101. package/dist/index83.js +26 -7
  102. package/dist/index84.js +5 -123
  103. package/dist/index85.js +50 -13
  104. package/dist/index86.js +32 -133
  105. package/dist/index87.js +10 -218
  106. package/dist/index88.js +8 -14
  107. package/dist/index89.js +120 -64
  108. package/dist/index9.js +2 -2
  109. package/dist/index90.js +13 -46
  110. package/dist/index91.js +133 -48
  111. package/dist/index92.js +218 -8
  112. package/dist/index93.js +14 -30
  113. package/dist/index94.js +68 -8
  114. package/dist/index95.js +43 -176
  115. package/dist/index96.js +50 -25
  116. package/dist/index97.js +9 -6
  117. package/dist/index99.js +30 -11
  118. package/package.json +1 -1
package/dist/index34.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsxs as w, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as S, jsx as i } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
3
  import { cn as f } from "./index2.js";
4
- const S = m.forwardRef(
4
+ const B = m.forwardRef(
5
5
  ({
6
6
  className: p,
7
7
  visibleLines: h = 10,
@@ -10,29 +10,30 @@ const S = m.forwardRef(
10
10
  onChange: l,
11
11
  onCursorChange: u,
12
12
  placeholder: b,
13
- readOnly: x = !1
14
- }, y) => {
13
+ readOnly: x = !1,
14
+ ...y
15
+ }, k) => {
15
16
  const e = m.useRef(null), n = m.useRef(null), o = d.split(`
16
- `).length, k = () => {
17
+ `).length, N = () => {
17
18
  e.current && n.current && (n.current.scrollTop = e.current.scrollTop);
18
19
  }, s = () => {
19
20
  if (e.current && u) {
20
21
  const t = e.current, a = t.value.substring(0, t.selectionStart).split(`
21
- `), T = a.length, v = a[a.length - 1].length + 1;
22
- u(T, v);
22
+ `), v = a.length, w = a[a.length - 1].length + 1;
23
+ u(v, w);
23
24
  }
24
- }, N = (t) => {
25
+ }, R = (t) => {
25
26
  l == null || l(t.target.value);
26
- }, c = 1.5, R = h * c;
27
- return /* @__PURE__ */ w(
27
+ }, c = 1.5, T = h * c;
28
+ return /* @__PURE__ */ S(
28
29
  "div",
29
30
  {
30
- ref: y,
31
+ ref: k,
31
32
  className: f(
32
33
  "flex font-mono text-sm bg-black border-2 border-primary overflow-hidden",
33
34
  p
34
35
  ),
35
- style: { height: `${R}rem` },
36
+ style: { height: `${T}rem` },
36
37
  children: [
37
38
  g && /* @__PURE__ */ i(
38
39
  "div",
@@ -54,10 +55,11 @@ const S = m.forwardRef(
54
55
  /* @__PURE__ */ i(
55
56
  "textarea",
56
57
  {
58
+ ...y,
57
59
  ref: e,
58
60
  value: d,
59
- onChange: N,
60
- onScroll: k,
61
+ onChange: R,
62
+ onScroll: N,
61
63
  onSelect: s,
62
64
  onKeyUp: s,
63
65
  onClick: s,
@@ -80,7 +82,7 @@ const S = m.forwardRef(
80
82
  );
81
83
  }
82
84
  );
83
- S.displayName = "TerminalTextarea";
85
+ B.displayName = "TerminalTextarea";
84
86
  export {
85
- S as TerminalTextarea
87
+ B as TerminalTextarea
86
88
  };
package/dist/index36.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { Root as e } from "./index51.js";
3
- import { cva as s } from "./index47.js";
2
+ import { Root as e } from "./index70.js";
3
+ import { cva as s } from "./index45.js";
4
4
  import * as m from "react";
5
5
  import { cn as p } from "./index2.js";
6
6
  const f = s(
package/dist/index37.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { Root as p, Trigger as n, Portal as s, Content as i, Provider as l } from "./index72.js";
2
+ import { Root as p, Trigger as n, Portal as s, Content as i, Provider as l } from "./index55.js";
3
3
  import * as m from "react";
4
4
  import { cn as d } from "./index2.js";
5
5
  const c = ({
package/dist/index4.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
- import { Root as c, Content as n, Item as l, Header as f, Trigger as d } from "./index45.js";
2
+ import { Root as c, Content as n, Item as l, Header as f, Trigger as d } from "./index48.js";
3
3
  import * as s from "react";
4
4
  import { cn as i } from "./index2.js";
5
- import p from "./index46.js";
5
+ import p from "./index49.js";
6
6
  const v = c, N = s.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ r(l, { ref: o, className: i("border-b-2 w-full", e), ...t }));
7
7
  N.displayName = "AccordionItem";
8
8
  const x = s.forwardRef(({ className: e, children: t, ...o }, a) => /* @__PURE__ */ r(f, { className: "flex", children: /* @__PURE__ */ m(
package/dist/index45.js CHANGED
@@ -1,239 +1,35 @@
1
- import s from "react";
2
- import { createContextScope as X } from "./index76.js";
3
- import { createCollection as Z } from "./index77.js";
4
- import { useComposedRefs as $ } from "./index78.js";
5
- import { composeEventHandlers as ee } from "./index79.js";
6
- import { useControllableState as M } from "./index80.js";
7
- import { Primitive as V } from "./index81.js";
8
- import { createCollapsibleScope as H, Content as oe, Root as re, Trigger as te } from "./index68.js";
9
- import { useId as ne } from "./index82.js";
10
- import { useDirection as ce } from "./index83.js";
11
- import { jsx as n } from "react/jsx-runtime";
12
- var d = "Accordion", ie = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [E, ae, le] = Z(d), [b] = X(d, [
13
- le,
14
- H
15
- ]), S = H(), K = s.forwardRef(
16
- (o, c) => {
17
- const { type: e, ...t } = o, i = t, r = t;
18
- return /* @__PURE__ */ n(E.Provider, { scope: o.__scopeAccordion, children: e === "multiple" ? /* @__PURE__ */ n(fe, { ...r, ref: c }) : /* @__PURE__ */ n(pe, { ...i, ref: c }) });
19
- }
20
- );
21
- K.displayName = d;
22
- var [L, se] = b(d), [z, de] = b(
23
- d,
24
- { collapsible: !1 }
25
- ), pe = s.forwardRef(
26
- (o, c) => {
27
- const {
28
- value: e,
29
- defaultValue: t,
30
- onValueChange: i = () => {
31
- },
32
- collapsible: r = !1,
33
- ...l
34
- } = o, [a, p] = M({
35
- prop: e,
36
- defaultProp: t ?? "",
37
- onChange: i,
38
- caller: d
39
- });
40
- return /* @__PURE__ */ n(
41
- L,
42
- {
43
- scope: o.__scopeAccordion,
44
- value: s.useMemo(() => a ? [a] : [], [a]),
45
- onItemOpen: p,
46
- onItemClose: s.useCallback(() => r && p(""), [r, p]),
47
- children: /* @__PURE__ */ n(z, { scope: o.__scopeAccordion, collapsible: r, children: /* @__PURE__ */ n(G, { ...l, ref: c }) })
48
- }
49
- );
50
- }
51
- ), fe = s.forwardRef((o, c) => {
52
- const {
53
- value: e,
54
- defaultValue: t,
55
- onValueChange: i = () => {
56
- },
57
- ...r
58
- } = o, [l, a] = M({
59
- prop: e,
60
- defaultProp: t ?? [],
61
- onChange: i,
62
- caller: d
63
- }), p = s.useCallback(
64
- (v) => a((u = []) => [...u, v]),
65
- [a]
66
- ), m = s.useCallback(
67
- (v) => a((u = []) => u.filter((h) => h !== v)),
68
- [a]
69
- );
70
- return /* @__PURE__ */ n(
71
- L,
72
- {
73
- scope: o.__scopeAccordion,
74
- value: l,
75
- onItemOpen: p,
76
- onItemClose: m,
77
- children: /* @__PURE__ */ n(z, { scope: o.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ n(G, { ...r, ref: c }) })
78
- }
79
- );
80
- }), [ue, I] = b(d), G = s.forwardRef(
81
- (o, c) => {
82
- const { __scopeAccordion: e, disabled: t, dir: i, orientation: r = "vertical", ...l } = o, a = s.useRef(null), p = $(a, c), m = ae(e), u = ce(i) === "ltr", h = ee(o.onKeyDown, (C) => {
83
- var O;
84
- if (!ie.includes(C.key)) return;
85
- const Q = C.target, x = m().filter((N) => {
86
- var T;
87
- return !((T = N.ref.current) != null && T.disabled);
88
- }), A = x.findIndex((N) => N.ref.current === Q), D = x.length;
89
- if (A === -1) return;
90
- C.preventDefault();
91
- let f = A;
92
- const _ = 0, w = D - 1, R = () => {
93
- f = A + 1, f > w && (f = _);
94
- }, P = () => {
95
- f = A - 1, f < _ && (f = w);
96
- };
97
- switch (C.key) {
98
- case "Home":
99
- f = _;
100
- break;
101
- case "End":
102
- f = w;
103
- break;
104
- case "ArrowRight":
105
- r === "horizontal" && (u ? R() : P());
106
- break;
107
- case "ArrowDown":
108
- r === "vertical" && R();
109
- break;
110
- case "ArrowLeft":
111
- r === "horizontal" && (u ? P() : R());
112
- break;
113
- case "ArrowUp":
114
- r === "vertical" && P();
115
- break;
116
- }
117
- const W = f % D;
118
- (O = x[W].ref.current) == null || O.focus();
119
- });
120
- return /* @__PURE__ */ n(
121
- ue,
122
- {
123
- scope: e,
124
- disabled: t,
125
- direction: i,
126
- orientation: r,
127
- children: /* @__PURE__ */ n(E.Slot, { scope: e, children: /* @__PURE__ */ n(
128
- V.div,
129
- {
130
- ...l,
131
- "data-orientation": r,
132
- ref: p,
133
- onKeyDown: t ? void 0 : h
134
- }
135
- ) })
136
- }
137
- );
138
- }
139
- ), g = "AccordionItem", [me, k] = b(g), U = s.forwardRef(
140
- (o, c) => {
141
- const { __scopeAccordion: e, value: t, ...i } = o, r = I(g, e), l = se(g, e), a = S(e), p = ne(), m = t && l.value.includes(t) || !1, v = r.disabled || o.disabled;
142
- return /* @__PURE__ */ n(
143
- me,
144
- {
145
- scope: e,
146
- open: m,
147
- disabled: v,
148
- triggerId: p,
149
- children: /* @__PURE__ */ n(
150
- re,
151
- {
152
- "data-orientation": r.orientation,
153
- "data-state": J(m),
154
- ...a,
155
- ...i,
156
- ref: c,
157
- disabled: v,
158
- open: m,
159
- onOpenChange: (u) => {
160
- u ? l.onItemOpen(t) : l.onItemClose(t);
161
- }
162
- }
163
- )
164
- }
165
- );
166
- }
167
- );
168
- U.displayName = g;
169
- var j = "AccordionHeader", Y = s.forwardRef(
170
- (o, c) => {
171
- const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(j, e);
172
- return /* @__PURE__ */ n(
173
- V.h3,
174
- {
175
- "data-orientation": i.orientation,
176
- "data-state": J(r.open),
177
- "data-disabled": r.disabled ? "" : void 0,
178
- ...t,
179
- ref: c
180
- }
181
- );
182
- }
183
- );
184
- Y.displayName = j;
185
- var y = "AccordionTrigger", q = s.forwardRef(
186
- (o, c) => {
187
- const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(y, e), l = de(y, e), a = S(e);
188
- return /* @__PURE__ */ n(E.ItemSlot, { scope: e, children: /* @__PURE__ */ n(
189
- te,
190
- {
191
- "aria-disabled": r.open && !l.collapsible || void 0,
192
- "data-orientation": i.orientation,
193
- id: r.triggerId,
194
- ...a,
195
- ...t,
196
- ref: c
197
- }
198
- ) });
199
- }
200
- );
201
- q.displayName = y;
202
- var B = "AccordionContent", F = s.forwardRef(
203
- (o, c) => {
204
- const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(B, e), l = S(e);
205
- return /* @__PURE__ */ n(
206
- oe,
207
- {
208
- role: "region",
209
- "aria-labelledby": r.triggerId,
210
- "data-orientation": i.orientation,
211
- ...l,
212
- ...t,
213
- ref: c,
214
- style: {
215
- "--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
216
- "--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
217
- ...o.style
218
- }
219
- }
220
- );
221
- }
222
- );
223
- F.displayName = B;
224
- function J(o) {
225
- return o ? "open" : "closed";
226
- }
227
- var Pe = K, Ne = U, ye = Y, Ee = q, Se = F;
1
+ import { clsx as O } from "./index43.js";
2
+ const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
+ var s;
4
+ if ((l == null ? void 0 : l.variants) == null) return y(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
5
+ const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
6
+ const a = n == null ? void 0 : n[t], u = d == null ? void 0 : d[t];
7
+ if (a === null) return null;
8
+ const i = m(a) || m(u);
9
+ return r[t][i];
10
+ }), v = n && Object.entries(n).reduce((t, a) => {
11
+ let [u, i] = a;
12
+ return i === void 0 || (t[u] = i), t;
13
+ }, {}), N = l == null || (s = l.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((t, a) => {
14
+ let { class: u, className: i, ...f } = a;
15
+ return Object.entries(f).every((C) => {
16
+ let [c, o] = C;
17
+ return Array.isArray(o) ? o.includes({
18
+ ...d,
19
+ ...v
20
+ }[c]) : {
21
+ ...d,
22
+ ...v
23
+ }[c] === o;
24
+ }) ? [
25
+ ...t,
26
+ u,
27
+ i
28
+ ] : t;
29
+ }, []);
30
+ return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
31
+ };
228
32
  export {
229
- K as Accordion,
230
- F as AccordionContent,
231
- Y as AccordionHeader,
232
- U as AccordionItem,
233
- q as AccordionTrigger,
234
- Se as Content,
235
- ye as Header,
236
- Ne as Item,
237
- Pe as Root,
238
- Ee as Trigger
33
+ j as cva,
34
+ y as cx
239
35
  };
package/dist/index46.js CHANGED
@@ -1,13 +1,75 @@
1
- import o 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 n = o("ChevronDown", [
9
- ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
10
- ]);
1
+ import * as i from "react";
2
+ import { createContextScope as C } from "./index76.js";
3
+ import { useCallbackRef as h } from "./index77.js";
4
+ import { useLayoutEffect as f } from "./index78.js";
5
+ import { Primitive as m } from "./index79.js";
6
+ import { useIsHydrated as _ } from "./index80.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,
13
+ {
14
+ scope: o,
15
+ imageLoadingStatus: n,
16
+ onImageLoadingStatusChange: a,
17
+ children: /* @__PURE__ */ l(m.span, { ...r, ref: e })
18
+ }
19
+ );
20
+ }
21
+ );
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);
42
+ }
43
+ }, [r]), u && a.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ l(m.span, { ...n, ref: e }) : null;
44
+ }
45
+ );
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;
66
+ }
67
+ var H = L, j = E, B = R;
11
68
  export {
12
- n as default
69
+ L as Avatar,
70
+ R as AvatarFallback,
71
+ E as AvatarImage,
72
+ B as Fallback,
73
+ j as Image,
74
+ H as Root
13
75
  };
package/dist/index47.js CHANGED
@@ -1,35 +1,62 @@
1
- import { clsx as O } from "./index43.js";
2
- const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
- var s;
4
- if ((l == null ? void 0 : l.variants) == null) return y(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
5
- const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
6
- const a = n == null ? void 0 : n[t], u = d == null ? void 0 : d[t];
7
- if (a === null) return null;
8
- const i = m(a) || m(u);
9
- return r[t][i];
10
- }), v = n && Object.entries(n).reduce((t, a) => {
11
- let [u, i] = a;
12
- return i === void 0 || (t[u] = i), t;
13
- }, {}), N = l == null || (s = l.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((t, a) => {
14
- let { class: u, className: i, ...f } = a;
15
- return Object.entries(f).every((C) => {
16
- let [c, o] = C;
17
- return Array.isArray(o) ? o.includes({
18
- ...d,
19
- ...v
20
- }[c]) : {
21
- ...d,
22
- ...v
23
- }[c] === o;
24
- }) ? [
25
- ...t,
26
- u,
27
- i
28
- ] : t;
29
- }, []);
30
- return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
31
- };
1
+ import * as o from "react";
2
+ import { composeRefs as S } from "./index83.js";
3
+ import { jsx as y } from "react/jsx-runtime";
4
+ var E = Symbol.for("react.lazy"), p = o[" use ".trim().toString()];
5
+ function g(t) {
6
+ return typeof t == "object" && t !== null && "then" in t;
7
+ }
8
+ function d(t) {
9
+ return t != null && typeof t == "object" && "$$typeof" in t && t.$$typeof === E && "_payload" in t && g(t._payload);
10
+ }
11
+ // @__NO_SIDE_EFFECTS__
12
+ function C(t) {
13
+ const n = /* @__PURE__ */ R(t), i = o.forwardRef((e, r) => {
14
+ let { children: l, ...a } = e;
15
+ d(l) && typeof p == "function" && (l = p(l._payload));
16
+ const s = o.Children.toArray(l), f = s.find(b);
17
+ if (f) {
18
+ const c = f.props.children, m = s.map((u) => u === f ? o.Children.count(c) > 1 ? o.Children.only(null) : o.isValidElement(c) ? c.props.children : null : u);
19
+ return /* @__PURE__ */ y(n, { ...a, ref: r, children: o.isValidElement(c) ? o.cloneElement(c, void 0, m) : null });
20
+ }
21
+ return /* @__PURE__ */ y(n, { ...a, ref: r, children: l });
22
+ });
23
+ return i.displayName = `${t}.Slot`, i;
24
+ }
25
+ var V = /* @__PURE__ */ C("Slot");
26
+ // @__NO_SIDE_EFFECTS__
27
+ function R(t) {
28
+ const n = o.forwardRef((i, e) => {
29
+ let { children: r, ...l } = i;
30
+ if (d(r) && typeof p == "function" && (r = p(r._payload)), o.isValidElement(r)) {
31
+ const a = P(r), s = h(l, r.props);
32
+ return r.type !== o.Fragment && (s.ref = e ? S(e, a) : a), o.cloneElement(r, s);
33
+ }
34
+ return o.Children.count(r) > 1 ? o.Children.only(null) : null;
35
+ });
36
+ return n.displayName = `${t}.SlotClone`, n;
37
+ }
38
+ var _ = Symbol("radix.slottable");
39
+ function b(t) {
40
+ return o.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === _;
41
+ }
42
+ function h(t, n) {
43
+ const i = { ...n };
44
+ for (const e in n) {
45
+ const r = t[e], l = n[e];
46
+ /^on[A-Z]/.test(e) ? r && l ? i[e] = (...s) => {
47
+ const f = l(...s);
48
+ return r(...s), f;
49
+ } : r && (i[e] = r) : e === "style" ? i[e] = { ...r, ...l } : e === "className" && (i[e] = [r, l].filter(Boolean).join(" "));
50
+ }
51
+ return { ...t, ...i };
52
+ }
53
+ function P(t) {
54
+ var e, r;
55
+ let n = (e = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : e.get, i = n && "isReactWarning" in n && n.isReactWarning;
56
+ return i ? t.ref : (n = (r = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : r.get, i = n && "isReactWarning" in n && n.isReactWarning, i ? t.props.ref : t.props.ref || t.ref);
57
+ }
32
58
  export {
33
- j as cva,
34
- y as cx
59
+ V as Root,
60
+ V as Slot,
61
+ C as createSlot
35
62
  };