@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/index69.js CHANGED
@@ -1,24 +1,120 @@
1
- import * as p from "react";
2
- import { Primitive as v } from "./index107.js";
3
- import { jsx as m } from "react/jsx-runtime";
4
- var d = "Separator", a = "horizontal", l = ["horizontal", "vertical"], i = p.forwardRef((r, n) => {
5
- const { decorative: e, orientation: t = a, ...s } = r, o = f(t) ? t : a, c = e ? { role: "none" } : { "aria-orientation": o === "vertical" ? o : void 0, role: "separator" };
6
- return /* @__PURE__ */ m(
1
+ import * as o from "react";
2
+ import { composeEventHandlers as T } from "./index81.js";
3
+ import { createContextScope as S } from "./index78.js";
4
+ import { useControllableState as D } from "./index82.js";
5
+ import { useLayoutEffect as L } from "./index88.js";
6
+ import { useComposedRefs as M } from "./index80.js";
7
+ import { Primitive as v } from "./index83.js";
8
+ import { Presence as k } from "./index93.js";
9
+ import { useId as F } from "./index84.js";
10
+ import { jsx as c } from "react/jsx-runtime";
11
+ var u = "Collapsible", [B, W] = S(u), [G, g] = B(u), w = o.forwardRef(
12
+ (e, a) => {
13
+ const {
14
+ __scopeCollapsible: i,
15
+ open: r,
16
+ defaultOpen: t,
17
+ disabled: l,
18
+ onOpenChange: s,
19
+ ...m
20
+ } = e, [d, p] = D({
21
+ prop: r,
22
+ defaultProp: t ?? !1,
23
+ onChange: s,
24
+ caller: u
25
+ });
26
+ return /* @__PURE__ */ c(
27
+ G,
28
+ {
29
+ scope: i,
30
+ disabled: l,
31
+ contentId: F(),
32
+ open: d,
33
+ onOpenToggle: o.useCallback(() => p((C) => !C), [p]),
34
+ children: /* @__PURE__ */ c(
35
+ v.div,
36
+ {
37
+ "data-state": h(d),
38
+ "data-disabled": l ? "" : void 0,
39
+ ...m,
40
+ ref: a
41
+ }
42
+ )
43
+ }
44
+ );
45
+ }
46
+ );
47
+ w.displayName = u;
48
+ var A = "CollapsibleTrigger", I = o.forwardRef(
49
+ (e, a) => {
50
+ const { __scopeCollapsible: i, ...r } = e, t = g(A, i);
51
+ return /* @__PURE__ */ c(
52
+ v.button,
53
+ {
54
+ type: "button",
55
+ "aria-controls": t.contentId,
56
+ "aria-expanded": t.open || !1,
57
+ "data-state": h(t.open),
58
+ "data-disabled": t.disabled ? "" : void 0,
59
+ disabled: t.disabled,
60
+ ...r,
61
+ ref: a,
62
+ onClick: T(e.onClick, t.onOpenToggle)
63
+ }
64
+ );
65
+ }
66
+ );
67
+ I.displayName = A;
68
+ var R = "CollapsibleContent", O = o.forwardRef(
69
+ (e, a) => {
70
+ const { forceMount: i, ...r } = e, t = g(R, e.__scopeCollapsible);
71
+ return /* @__PURE__ */ c(k, { present: i || t.open, children: ({ present: l }) => /* @__PURE__ */ c($, { ...r, ref: a, present: l }) });
72
+ }
73
+ );
74
+ O.displayName = R;
75
+ var $ = o.forwardRef((e, a) => {
76
+ const { __scopeCollapsible: i, present: r, children: t, ...l } = e, s = g(R, i), [m, d] = o.useState(r), p = o.useRef(null), C = M(a, p), y = o.useRef(0), x = y.current, N = o.useRef(0), P = N.current, b = s.open || m, _ = o.useRef(b), f = o.useRef(void 0);
77
+ return o.useEffect(() => {
78
+ const n = requestAnimationFrame(() => _.current = !1);
79
+ return () => cancelAnimationFrame(n);
80
+ }, []), L(() => {
81
+ const n = p.current;
82
+ if (n) {
83
+ f.current = f.current || {
84
+ transitionDuration: n.style.transitionDuration,
85
+ animationName: n.style.animationName
86
+ }, n.style.transitionDuration = "0s", n.style.animationName = "none";
87
+ const E = n.getBoundingClientRect();
88
+ y.current = E.height, N.current = E.width, _.current || (n.style.transitionDuration = f.current.transitionDuration, n.style.animationName = f.current.animationName), d(r);
89
+ }
90
+ }, [s.open, r]), /* @__PURE__ */ c(
7
91
  v.div,
8
92
  {
9
- "data-orientation": o,
10
- ...c,
11
- ...s,
12
- ref: n
93
+ "data-state": h(s.open),
94
+ "data-disabled": s.disabled ? "" : void 0,
95
+ id: s.contentId,
96
+ hidden: !b,
97
+ ...l,
98
+ ref: C,
99
+ style: {
100
+ "--radix-collapsible-content-height": x ? `${x}px` : void 0,
101
+ "--radix-collapsible-content-width": P ? `${P}px` : void 0,
102
+ ...e.style
103
+ },
104
+ children: b && t
13
105
  }
14
106
  );
15
107
  });
16
- i.displayName = d;
17
- function f(r) {
18
- return l.includes(r);
108
+ function h(e) {
109
+ return e ? "open" : "closed";
19
110
  }
20
- var T = i;
111
+ var X = w, Y = I, Z = O;
21
112
  export {
22
- T as Root,
23
- i as Separator
113
+ w as Collapsible,
114
+ O as CollapsibleContent,
115
+ I as CollapsibleTrigger,
116
+ Z as Content,
117
+ X as Root,
118
+ Y as Trigger,
119
+ W as createCollapsibleScope
24
120
  };
package/dist/index7.js CHANGED
@@ -1,42 +1,37 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { Root as s, Fallback as t, Image as d } from "./index60.js";
3
- import * as o from "react";
4
- import { cn as m } from "./index2.js";
5
- const f = o.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ l(
6
- s,
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { Root as e, Fallback as t, Image as c } from "./index38.js";
3
+ import * as l from "react";
4
+ import { cx as o } from "./index2.js";
5
+ /* empty css */
6
+ const i = l.forwardRef(({ className: a, ...r }, m) => /* @__PURE__ */ s(
7
+ e,
7
8
  {
8
- ref: e,
9
- className: m(
10
- "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border border-primary",
11
- a
12
- ),
9
+ ref: m,
10
+ className: o("scl-avatar", a),
13
11
  ...r
14
12
  }
15
13
  ));
16
- f.displayName = s.displayName;
17
- const i = o.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ l(
18
- d,
14
+ i.displayName = e.displayName;
15
+ const p = l.forwardRef(({ className: a, ...r }, m) => /* @__PURE__ */ s(
16
+ c,
19
17
  {
20
- ref: e,
21
- className: m("aspect-square h-full w-full", a),
18
+ ref: m,
19
+ className: o("scl-avatar__image", a),
22
20
  ...r
23
21
  }
24
22
  ));
25
- i.displayName = d.displayName;
26
- const p = o.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ l(
23
+ p.displayName = c.displayName;
24
+ const f = l.forwardRef(({ className: a, ...r }, m) => /* @__PURE__ */ s(
27
25
  t,
28
26
  {
29
- ref: e,
30
- className: m(
31
- "flex h-full w-full items-center justify-center rounded-full bg-background border border-primary text-primary",
32
- a
33
- ),
27
+ ref: m,
28
+ className: o("scl-avatar__fallback", a),
34
29
  ...r
35
30
  }
36
31
  ));
37
- p.displayName = t.displayName;
32
+ f.displayName = t.displayName;
38
33
  export {
39
- f as Avatar,
40
- p as AvatarFallback,
41
- i as AvatarImage
34
+ i as Avatar,
35
+ f as AvatarFallback,
36
+ p as AvatarImage
42
37
  };
package/dist/index71.js CHANGED
@@ -1,84 +1,163 @@
1
- import * as m from "react";
2
- import { createContextScope as $ } from "./index110.js";
3
- import { Primitive as c } from "./index111.js";
1
+ import * as v from "react";
2
+ import { composeEventHandlers as g } from "./index81.js";
3
+ import { createContextScope as x } from "./index78.js";
4
+ import { createRovingFocusGroupScope as C, Root as E, Item as F } from "./index105.js";
5
+ import { Presence as w } from "./index93.js";
6
+ import { Primitive as b } from "./index83.js";
7
+ import { useDirection as D } from "./index85.js";
8
+ import { useControllableState as V } from "./index82.js";
9
+ import { useId as G } from "./index84.js";
4
10
  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) => {
11
+ var p = "Tabs", [L] = x(p, [
12
+ C
13
+ ]), h = C(), [$, T] = L(p), I = v.forwardRef(
14
+ (e, r) => {
7
15
  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,
16
+ __scopeTabs: s,
17
+ value: t,
18
+ onValueChange: n,
19
+ defaultValue: c,
20
+ orientation: o = "horizontal",
21
+ dir: d,
22
+ activationMode: f = "automatic",
23
+ ...m
24
+ } = e, i = D(d), [a, u] = V({
25
+ prop: t,
26
+ onChange: n,
27
+ defaultProp: c ?? "",
28
+ caller: p
29
+ });
30
+ return /* @__PURE__ */ l(
31
+ $,
20
32
  {
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
33
+ scope: s,
34
+ baseId: G(),
35
+ value: a,
36
+ onValueChange: u,
37
+ orientation: o,
38
+ dir: i,
39
+ activationMode: f,
40
+ children: /* @__PURE__ */ l(
41
+ b.div,
42
+ {
43
+ dir: i,
44
+ "data-orientation": o,
45
+ ...m,
46
+ ref: r
47
+ }
48
+ )
31
49
  }
32
- ) });
50
+ );
33
51
  }
34
52
  );
35
- f.displayName = u;
36
- var g = "ProgressIndicator", x = m.forwardRef(
37
- (r, e) => {
38
- const { __scopeProgress: i, ...o } = r, a = _(g, i);
53
+ I.displayName = p;
54
+ var R = "TabsList", _ = v.forwardRef(
55
+ (e, r) => {
56
+ const { __scopeTabs: s, loop: t = !0, ...n } = e, c = T(R, s), o = h(s);
39
57
  return /* @__PURE__ */ l(
40
- c.div,
58
+ E,
41
59
  {
42
- "data-state": P(a.value, a.max),
43
- "data-value": a.value ?? void 0,
44
- "data-max": a.max,
60
+ asChild: !0,
45
61
  ...o,
46
- ref: e
62
+ orientation: c.orientation,
63
+ dir: c.dir,
64
+ loop: t,
65
+ children: /* @__PURE__ */ l(
66
+ b.div,
67
+ {
68
+ role: "tablist",
69
+ "aria-orientation": c.orientation,
70
+ ...n,
71
+ ref: r
72
+ }
73
+ )
47
74
  }
48
75
  );
49
76
  }
50
77
  );
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}\`.`;
78
+ _.displayName = R;
79
+ var y = "TabsTrigger", A = v.forwardRef(
80
+ (e, r) => {
81
+ const { __scopeTabs: s, value: t, disabled: n = !1, ...c } = e, o = T(y, s), d = h(s), f = P(o.baseId, t), m = S(o.baseId, t), i = t === o.value;
82
+ return /* @__PURE__ */ l(
83
+ F,
84
+ {
85
+ asChild: !0,
86
+ ...d,
87
+ focusable: !n,
88
+ active: i,
89
+ children: /* @__PURE__ */ l(
90
+ b.button,
91
+ {
92
+ type: "button",
93
+ role: "tab",
94
+ "aria-selected": i,
95
+ "aria-controls": m,
96
+ "data-state": i ? "active" : "inactive",
97
+ "data-disabled": n ? "" : void 0,
98
+ disabled: n,
99
+ id: f,
100
+ ...c,
101
+ ref: r,
102
+ onMouseDown: g(e.onMouseDown, (a) => {
103
+ !n && a.button === 0 && a.ctrlKey === !1 ? o.onValueChange(t) : a.preventDefault();
104
+ }),
105
+ onKeyDown: g(e.onKeyDown, (a) => {
106
+ [" ", "Enter"].includes(a.key) && o.onValueChange(t);
107
+ }),
108
+ onFocus: g(e.onFocus, () => {
109
+ const a = o.activationMode !== "manual";
110
+ !i && !n && a && o.onValueChange(t);
111
+ })
112
+ }
113
+ )
114
+ }
115
+ );
116
+ }
117
+ );
118
+ A.displayName = y;
119
+ var M = "TabsContent", N = v.forwardRef(
120
+ (e, r) => {
121
+ const { __scopeTabs: s, value: t, forceMount: n, children: c, ...o } = e, d = T(M, s), f = P(d.baseId, t), m = S(d.baseId, t), i = t === d.value, a = v.useRef(i);
122
+ return v.useEffect(() => {
123
+ const u = requestAnimationFrame(() => a.current = !1);
124
+ return () => cancelAnimationFrame(u);
125
+ }, []), /* @__PURE__ */ l(w, { present: n || i, children: ({ present: u }) => /* @__PURE__ */ l(
126
+ b.div,
127
+ {
128
+ "data-state": i ? "active" : "inactive",
129
+ "data-orientation": d.orientation,
130
+ role: "tabpanel",
131
+ "aria-labelledby": f,
132
+ hidden: !u,
133
+ id: m,
134
+ tabIndex: 0,
135
+ ...o,
136
+ ref: r,
137
+ style: {
138
+ ...e.style,
139
+ animationDuration: a.current ? "0s" : void 0
140
+ },
141
+ children: u && c
142
+ }
143
+ ) });
144
+ }
145
+ );
146
+ N.displayName = M;
147
+ function P(e, r) {
148
+ return `${e}-trigger-${r}`;
69
149
  }
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\`.`;
150
+ function S(e, r) {
151
+ return `${e}-content-${r}`;
77
152
  }
78
- var D = f, L = x;
153
+ var Q = I, U = _, W = A, X = N;
79
154
  export {
80
- L as Indicator,
81
- f as Progress,
82
- x as ProgressIndicator,
83
- D as Root
155
+ X as Content,
156
+ U as List,
157
+ Q as Root,
158
+ I as Tabs,
159
+ N as TabsContent,
160
+ _ as TabsList,
161
+ A as TabsTrigger,
162
+ W as Trigger
84
163
  };