@gv-tech/ui-web 2.19.0 → 2.21.0

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 (287) hide show
  1. package/dist/accordion-Be1vGv6M.js +1 -0
  2. package/dist/accordion-DXnU0LgU.mjs +221 -0
  3. package/dist/accordion.cjs +1 -1
  4. package/dist/accordion.mjs +3 -259
  5. package/dist/alert-dialog-BXRY0Ghq.js +7 -0
  6. package/dist/alert-dialog-fcZ-sL7h.mjs +164 -0
  7. package/dist/alert-dialog.cjs +1 -7
  8. package/dist/alert-dialog.mjs +4 -171
  9. package/dist/alert.cjs +1 -1
  10. package/dist/alert.mjs +35 -32
  11. package/dist/aspect-ratio-BP5HarYZ.js +1 -0
  12. package/dist/aspect-ratio-Bp8HMg-1.mjs +33 -0
  13. package/dist/aspect-ratio.cjs +1 -1
  14. package/dist/aspect-ratio.mjs +3 -43
  15. package/dist/avatar-klFl8Sqa.js +1 -0
  16. package/dist/avatar-vGm9JN1a.mjs +184 -0
  17. package/dist/avatar.cjs +1 -1
  18. package/dist/avatar.mjs +3 -205
  19. package/dist/badge.cjs +1 -1
  20. package/dist/badge.mjs +21 -24
  21. package/dist/breadcrumb.cjs +1 -1
  22. package/dist/breadcrumb.mjs +60 -68
  23. package/dist/button.cjs +1 -1
  24. package/dist/button.mjs +40 -40
  25. package/dist/calendar-aIuSXzs7.js +1 -0
  26. package/dist/calendar-oitID53a.mjs +3154 -0
  27. package/dist/calendar.cjs +1 -1
  28. package/dist/calendar.mjs +4 -2976
  29. package/dist/card.cjs +1 -1
  30. package/dist/card.mjs +42 -32
  31. package/dist/carousel-BjTSkVh9.js +1 -0
  32. package/dist/carousel-CENzZCXN.mjs +1178 -0
  33. package/dist/carousel.cjs +1 -1
  34. package/dist/carousel.mjs +4 -1403
  35. package/dist/chart.cjs +4 -4
  36. package/dist/chart.d.ts +3 -35
  37. package/dist/chart.mjs +123 -182
  38. package/dist/checkbox-Bwq7mXA2.mjs +170 -0
  39. package/dist/checkbox-DzEO1q4R.js +1 -0
  40. package/dist/checkbox.cjs +1 -1
  41. package/dist/checkbox.mjs +3 -258
  42. package/dist/collapsible.cjs +1 -1
  43. package/dist/collapsible.mjs +6 -7
  44. package/dist/command-D7hksKY6.js +1 -0
  45. package/dist/command-Ws_iF1hM.mjs +531 -0
  46. package/dist/command.cjs +1 -1
  47. package/dist/command.mjs +3 -396
  48. package/dist/context-menu-DJbgNJ7N.js +1 -0
  49. package/dist/context-menu-fu39gePi.mjs +292 -0
  50. package/dist/context-menu.cjs +1 -1
  51. package/dist/context-menu.mjs +3 -328
  52. package/dist/dialog.cjs +1 -1
  53. package/dist/dialog.mjs +50 -66
  54. package/dist/dist-0FXx-pUX.js +1 -0
  55. package/dist/dist-4A0ut6a8.mjs +10 -0
  56. package/dist/dist-ALQAoSGx.mjs +10 -0
  57. package/dist/dist-B4N_7Tps.js +1 -0
  58. package/dist/dist-B5776DvK.js +5 -0
  59. package/dist/dist-B57mzJP3.mjs +28 -0
  60. package/dist/dist-B5VmV2K7.js +1 -0
  61. package/dist/dist-BBRD-Qfb.js +1 -0
  62. package/dist/dist-BC_VB6JL.mjs +25 -0
  63. package/dist/dist-BKFtvTm8.mjs +6 -0
  64. package/dist/dist-BUS_s_6N.js +1 -0
  65. package/dist/dist-BVKPqhkg.js +1 -0
  66. package/dist/dist-Ba7mQG9D.mjs +117 -0
  67. package/dist/dist-BeFCyPgD.js +1 -0
  68. package/dist/dist-Bf4P28CV.js +1 -0
  69. package/dist/dist-BfFVoFJN.js +1 -0
  70. package/dist/dist-BhtQH_6Z.js +1 -0
  71. package/dist/dist-BmjFh8i_.mjs +5 -0
  72. package/dist/dist-BrCTkQXt.mjs +62 -0
  73. package/dist/dist-BxmpAHsT.mjs +219 -0
  74. package/dist/dist-C2ArLRnq.js +1 -0
  75. package/dist/dist-C2pRTcV_.mjs +62 -0
  76. package/dist/dist-C9wnUiS4.mjs +27 -0
  77. package/dist/dist-CIRItnqs.js +1 -0
  78. package/dist/dist-CL1DhkaL.js +1 -0
  79. package/dist/dist-CRe7xawr.js +1 -0
  80. package/dist/dist-CUFjt0cI.js +1 -0
  81. package/dist/dist-CaaGWewc.mjs +557 -0
  82. package/dist/dist-Ci2whnVp.js +1 -0
  83. package/dist/dist-CmBtqW5f.js +1 -0
  84. package/dist/dist-CsEsK2jW.js +1 -0
  85. package/dist/dist-CscAxhT8.js +1 -0
  86. package/dist/dist-CvtF5JdF.mjs +95 -0
  87. package/dist/dist-Cvwtowos.mjs +77 -0
  88. package/dist/dist-D2f83VMO.mjs +73 -0
  89. package/dist/dist-Dh_jWJh-.mjs +11 -0
  90. package/dist/dist-DikyKBU3.mjs +12 -0
  91. package/dist/dist-DmmUjo_P.js +1 -0
  92. package/dist/dist-DqvQ5UFr.mjs +38 -0
  93. package/dist/dist-FGQAMrhH.mjs +29 -0
  94. package/dist/dist-Jtk3jeb9.mjs +18 -0
  95. package/dist/dist-Kqk0oQYU.js +1 -0
  96. package/dist/dist-VI9bl_Wk.mjs +45 -0
  97. package/dist/dist-Z7lEV5Nx.mjs +1282 -0
  98. package/dist/dist-_Osar3kp.js +1 -0
  99. package/dist/dist-bDoR0CBU.mjs +112 -0
  100. package/dist/dist-cRjbOZRf.js +1 -0
  101. package/dist/dist-d_pecHgw.mjs +66 -0
  102. package/dist/dist-r36zVVcK.js +1 -0
  103. package/dist/dist-sRlXdzvf.mjs +152 -0
  104. package/dist/drawer.cjs +1 -1
  105. package/dist/drawer.mjs +48 -54
  106. package/dist/dropdown-menu-BGkQXJ-r.mjs +288 -0
  107. package/dist/dropdown-menu-uGMnmGL-.js +1 -0
  108. package/dist/dropdown-menu.cjs +1 -1
  109. package/dist/dropdown-menu.mjs +3 -316
  110. package/dist/es2015-Cx0gpR1a.js +41 -0
  111. package/dist/es2015-a1b8kENC.mjs +701 -0
  112. package/dist/form.cjs +1 -1
  113. package/dist/form.mjs +76 -67
  114. package/dist/hover-card-DdIYJP-Q.mjs +167 -0
  115. package/dist/hover-card-Ua-2KlY-.js +1 -0
  116. package/dist/hover-card.cjs +1 -1
  117. package/dist/hover-card.mjs +3 -188
  118. package/dist/index.cjs +1 -1
  119. package/dist/index.d.ts +3 -35
  120. package/dist/index.mjs +56 -296
  121. package/dist/input.cjs +1 -1
  122. package/dist/input.mjs +14 -19
  123. package/dist/jsx-runtime-CN3qjQQx.js +6 -0
  124. package/dist/jsx-runtime-CW53Uo-e.mjs +189 -0
  125. package/dist/label-8YSUv4kt.js +1 -0
  126. package/dist/label-Bur66PVg.mjs +22 -0
  127. package/dist/label.cjs +1 -1
  128. package/dist/label.mjs +3 -22
  129. package/dist/menubar-Bq1Sfbf5.js +1 -0
  130. package/dist/menubar-D2fY6zkQ.mjs +410 -0
  131. package/dist/menubar.cjs +1 -1
  132. package/dist/menubar.mjs +3 -473
  133. package/dist/navigation-menu-BuOakbgA.mjs +602 -0
  134. package/dist/navigation-menu-so6EvLAY.js +1 -0
  135. package/dist/navigation-menu.cjs +1 -1
  136. package/dist/navigation-menu.mjs +3 -673
  137. package/dist/pagination.cjs +1 -1
  138. package/dist/pagination.mjs +63 -68
  139. package/dist/popover-BUADXRkO.mjs +201 -0
  140. package/dist/popover-nBrSPqHk.js +1 -0
  141. package/dist/popover.cjs +1 -1
  142. package/dist/popover.mjs +3 -242
  143. package/dist/progress-BTApMbqg.js +6 -0
  144. package/dist/progress-BbN-RNvs.mjs +81 -0
  145. package/dist/progress.cjs +1 -6
  146. package/dist/progress.mjs +3 -99
  147. package/dist/radio-group-C5oprOrt.mjs +193 -0
  148. package/dist/radio-group-FDXr6VLM.js +1 -0
  149. package/dist/radio-group.cjs +1 -1
  150. package/dist/radio-group.mjs +3 -253
  151. package/dist/resizable-ChdgCzzx.mjs +1534 -0
  152. package/dist/resizable-ztiFzq_y.js +1 -0
  153. package/dist/resizable.cjs +1 -1
  154. package/dist/resizable.mjs +3 -1990
  155. package/dist/scroll-area-3o0-cc3n.mjs +520 -0
  156. package/dist/scroll-area-DXZqIKXN.js +1 -0
  157. package/dist/scroll-area.cjs +1 -1
  158. package/dist/scroll-area.mjs +3 -546
  159. package/dist/scroll-to-top.cjs +1 -1
  160. package/dist/scroll-to-top.mjs +71 -84
  161. package/dist/search.cjs +1 -1
  162. package/dist/search.mjs +53 -63
  163. package/dist/select-B2qM503G.mjs +744 -0
  164. package/dist/select-BHCeW-MD.js +1 -0
  165. package/dist/select.cjs +1 -1
  166. package/dist/select.mjs +3 -908
  167. package/dist/separator-BZJ-SDvg.js +1 -0
  168. package/dist/separator-DJ_IwKUQ.mjs +31 -0
  169. package/dist/separator.cjs +1 -1
  170. package/dist/separator.mjs +3 -35
  171. package/dist/sheet.cjs +1 -1
  172. package/dist/sheet.mjs +59 -66
  173. package/dist/skeleton.cjs +1 -1
  174. package/dist/skeleton.mjs +13 -7
  175. package/dist/slider-CJJPQ0fH.mjs +366 -0
  176. package/dist/slider-DHccqrW2.js +1 -0
  177. package/dist/slider.cjs +1 -1
  178. package/dist/slider.mjs +3 -442
  179. package/dist/sonner.cjs +1 -1
  180. package/dist/sonner.mjs +21 -24
  181. package/dist/support-fab.cjs +1 -1
  182. package/dist/support-fab.mjs +81 -117
  183. package/dist/switch-BbcAUYjl.mjs +103 -0
  184. package/dist/switch-DZfRzgWs.js +1 -0
  185. package/dist/switch.cjs +1 -1
  186. package/dist/switch.mjs +3 -149
  187. package/dist/table-of-contents.cjs +1 -1
  188. package/dist/table-of-contents.mjs +159 -155
  189. package/dist/table.cjs +1 -1
  190. package/dist/table.mjs +58 -57
  191. package/dist/tabs-BEy0IIV0.js +1 -0
  192. package/dist/tabs-DqAKyl9T.mjs +136 -0
  193. package/dist/tabs.cjs +1 -1
  194. package/dist/tabs.mjs +3 -195
  195. package/dist/text.cjs +1 -1
  196. package/dist/text.mjs +41 -42
  197. package/dist/textarea.cjs +1 -1
  198. package/dist/textarea.mjs +12 -17
  199. package/dist/theme-provider.cjs +1 -1
  200. package/dist/theme-provider.mjs +15 -7
  201. package/dist/theme-toggle-DKQmD-FO.js +1 -0
  202. package/dist/theme-toggle-dQbFWNI8.mjs +65 -0
  203. package/dist/theme-toggle.cjs +1 -1
  204. package/dist/theme-toggle.mjs +3 -8
  205. package/dist/toast-C84Cpidq.js +1 -0
  206. package/dist/toast-CQbUslcw.mjs +427 -0
  207. package/dist/toast.cjs +1 -1
  208. package/dist/toast.mjs +3 -494
  209. package/dist/toaster-BpcpNRz1.js +1 -0
  210. package/dist/toaster-i6giQYiq.mjs +126 -0
  211. package/dist/toaster.cjs +1 -1
  212. package/dist/toaster.mjs +3 -6
  213. package/dist/toggle-group-B2S7fkhA.mjs +155 -0
  214. package/dist/toggle-group-BNn6MNiJ.js +1 -0
  215. package/dist/toggle-group.cjs +1 -1
  216. package/dist/toggle-group.mjs +3 -170
  217. package/dist/toggle.cjs +1 -1
  218. package/dist/toggle.mjs +19 -14
  219. package/dist/tooltip-CElrNodA.js +1 -0
  220. package/dist/tooltip-oKfTBTbv.mjs +364 -0
  221. package/dist/tooltip.cjs +1 -1
  222. package/dist/tooltip.mjs +3 -342
  223. package/dist/utils-BxDanjP7.js +1 -0
  224. package/dist/utils-yc5uc46c.mjs +11 -0
  225. package/package.json +2 -2
  226. package/src/chart.tsx +7 -7
  227. package/src/setupTests.ts +5 -4
  228. package/dist/index-0ioNhtNM.mjs +0 -10
  229. package/dist/index-3j-XAIXT.mjs +0 -55
  230. package/dist/index-B2XtpfGY.js +0 -1
  231. package/dist/index-B39Lzq0v.js +0 -1
  232. package/dist/index-B7n6fy75.js +0 -1
  233. package/dist/index-B8dxbSWX.js +0 -41
  234. package/dist/index-BGIK9FQF.js +0 -1
  235. package/dist/index-BZPx6jYI.mjs +0 -8
  236. package/dist/index-BoNjHhm4.js +0 -1
  237. package/dist/index-BtZvtDmp.js +0 -1
  238. package/dist/index-Bv7qrYW6.mjs +0 -180
  239. package/dist/index-ByiPJW53.js +0 -5
  240. package/dist/index-C0dlIQIi.js +0 -1
  241. package/dist/index-C1qb0595.mjs +0 -27
  242. package/dist/index-C7HEunrh.mjs +0 -15
  243. package/dist/index-C8ni3LLa.js +0 -1
  244. package/dist/index-CCKe-Mpx.mjs +0 -6
  245. package/dist/index-CD6_IrA-.mjs +0 -10
  246. package/dist/index-CRyCZJLa.mjs +0 -677
  247. package/dist/index-CVx1AgNG.mjs +0 -615
  248. package/dist/index-Ce5TOFAK.js +0 -1
  249. package/dist/index-CeSLNJ60.mjs +0 -32
  250. package/dist/index-CefEQe_4.js +0 -1
  251. package/dist/index-Cj5hzyBi.js +0 -1
  252. package/dist/index-Cjj_rUPu.js +0 -1
  253. package/dist/index-Cl3G0jzM.js +0 -1
  254. package/dist/index-CwfE56Ep.mjs +0 -1545
  255. package/dist/index-CwyAfCwY.js +0 -1
  256. package/dist/index-CzY-WZXL.js +0 -1
  257. package/dist/index-D2HnlO3y.js +0 -1
  258. package/dist/index-DFdF7K7v.mjs +0 -50
  259. package/dist/index-DIsg7zU7.js +0 -1
  260. package/dist/index-DKN_vhyX.mjs +0 -32
  261. package/dist/index-DLcqcWxM.mjs +0 -29
  262. package/dist/index-DSxf1gN6.mjs +0 -118
  263. package/dist/index-DYxWvftI.js +0 -1
  264. package/dist/index-DaILh3TV.mjs +0 -32
  265. package/dist/index-Dfzl8TxY.mjs +0 -136
  266. package/dist/index-Dko2XdTk.js +0 -1
  267. package/dist/index-DlY82G31.mjs +0 -245
  268. package/dist/index-DnFcfnA9.mjs +0 -13
  269. package/dist/index-IZ2gq03c.mjs +0 -68
  270. package/dist/index-K9FzbxYw.mjs +0 -93
  271. package/dist/index-Le8p9oP4.mjs +0 -60
  272. package/dist/index-MQ0c3ZX_.js +0 -1
  273. package/dist/index-_XxjJPRD.js +0 -1
  274. package/dist/index-_wdrnYim.js +0 -1
  275. package/dist/index-jv3B4mTd.js +0 -1
  276. package/dist/index-kaM0u2Q1.js +0 -1
  277. package/dist/index-p6xVFRb4.mjs +0 -52
  278. package/dist/index-rKs9bXHr.mjs +0 -6
  279. package/dist/index-vuPgkS0V.mjs +0 -70
  280. package/dist/jsx-runtime-nZSsnGb7.js +0 -6
  281. package/dist/jsx-runtime-tc70JA_2.mjs +0 -264
  282. package/dist/theme-toggle-DXQGNfCe.js +0 -1
  283. package/dist/theme-toggle-tHXIbr8W.mjs +0 -79
  284. package/dist/toaster-C_S9hnXa.js +0 -1
  285. package/dist/toaster-k5DnQSsh.mjs +0 -118
  286. package/dist/utils-DY6fhrgS.mjs +0 -12
  287. package/dist/utils-cdbZV8DZ.js +0 -1
@@ -0,0 +1,81 @@
1
+ import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
2
+ import { t } from "./utils-yc5uc46c.mjs";
3
+ import { t as n } from "./dist-DqvQ5UFr.mjs";
4
+ import { t as r } from "./dist-C2pRTcV_.mjs";
5
+ import * as i from "react";
6
+ //#region ../../node_modules/.bun/@radix-ui+react-progress@1.1.8+2d3f272c3a65784a/node_modules/@radix-ui/react-progress/dist/index.mjs
7
+ var a = e(), o = "Progress", s = 100, [c, l] = r(o), [u, d] = c(o), f = i.forwardRef((e, t) => {
8
+ let { __scopeProgress: r, value: i = null, max: o, getValueLabel: c = h, ...l } = e;
9
+ (o || o === 0) && !v(o) && console.error(b(`${o}`, "Progress"));
10
+ let d = v(o) ? o : s;
11
+ i !== null && !y(i, d) && console.error(x(`${i}`, "Progress"));
12
+ let f = y(i, d) ? i : null, p = _(f) ? c(f, d) : void 0;
13
+ return /* @__PURE__ */ (0, a.jsx)(u, {
14
+ scope: r,
15
+ value: f,
16
+ max: d,
17
+ children: /* @__PURE__ */ (0, a.jsx)(n.div, {
18
+ "aria-valuemax": d,
19
+ "aria-valuemin": 0,
20
+ "aria-valuenow": _(f) ? f : void 0,
21
+ "aria-valuetext": p,
22
+ role: "progressbar",
23
+ "data-state": g(f, d),
24
+ "data-value": f ?? void 0,
25
+ "data-max": d,
26
+ ...l,
27
+ ref: t
28
+ })
29
+ });
30
+ });
31
+ f.displayName = o;
32
+ var p = "ProgressIndicator", m = i.forwardRef((e, t) => {
33
+ let { __scopeProgress: r, ...i } = e, o = d(p, r);
34
+ return /* @__PURE__ */ (0, a.jsx)(n.div, {
35
+ "data-state": g(o.value, o.max),
36
+ "data-value": o.value ?? void 0,
37
+ "data-max": o.max,
38
+ ...i,
39
+ ref: t
40
+ });
41
+ });
42
+ m.displayName = p;
43
+ function h(e, t) {
44
+ return `${Math.round(e / t * 100)}%`;
45
+ }
46
+ function g(e, t) {
47
+ return e == null ? "indeterminate" : e === t ? "complete" : "loading";
48
+ }
49
+ function _(e) {
50
+ return typeof e == "number";
51
+ }
52
+ function v(e) {
53
+ return _(e) && !isNaN(e) && e > 0;
54
+ }
55
+ function y(e, t) {
56
+ return _(e) && !isNaN(e) && e <= t && e >= 0;
57
+ }
58
+ function b(e, t) {
59
+ return `Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${s}\`.`;
60
+ }
61
+ function x(e, t) {
62
+ return `Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
63
+ - a positive number
64
+ - less than the value passed to \`max\` (or ${s} if no \`max\` prop is set)
65
+ - \`null\` or \`undefined\` if the progress is indeterminate.
66
+
67
+ Defaulting to \`null\`.`;
68
+ }
69
+ var S = f, C = m, w = i.forwardRef(({ className: e, value: n, ...r }, i) => /* @__PURE__ */ (0, a.jsx)(S, {
70
+ ref: i,
71
+ className: t("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", e),
72
+ value: n,
73
+ ...r,
74
+ children: /* @__PURE__ */ (0, a.jsx)(C, {
75
+ className: "bg-primary h-full w-full flex-1 transition-all",
76
+ style: { transform: `translateX(-${100 - (n || 0)}%)` }
77
+ })
78
+ }));
79
+ w.displayName = S?.displayName || "Progress";
80
+ //#endregion
81
+ export { w as t };
package/dist/progress.cjs CHANGED
@@ -1,6 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./jsx-runtime-nZSsnGb7.js"),$=require("react"),h=require("./index-_wdrnYim.js"),m=require("./index-B39Lzq0v.js"),E=require("./utils-cdbZV8DZ.js");function _(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,t.get?t:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const u=_($);var c="Progress",d=100,[I]=h.createContextScope(c),[O,w]=I(c),v=u.forwardRef((e,r)=>{const{__scopeProgress:o,value:t=null,max:a,getValueLabel:j=M,...R}=e;(a||a===0)&&!p(a)&&console.error(S(`${a}`,"Progress"));const s=p(a)?a:d;t!==null&&!f(t,s)&&console.error(D(`${t}`,"Progress"));const n=f(t,s)?t:null,y=l(n)?j(n,s):void 0;return i.jsxRuntimeExports.jsx(O,{scope:o,value:n,max:s,children:i.jsxRuntimeExports.jsx(m.Primitive.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":l(n)?n:void 0,"aria-valuetext":y,role:"progressbar","data-state":P(n,s),"data-value":n??void 0,"data-max":s,...R,ref:r})})});v.displayName=c;var x="ProgressIndicator",g=u.forwardRef((e,r)=>{const{__scopeProgress:o,...t}=e,a=w(x,o);return i.jsxRuntimeExports.jsx(m.Primitive.div,{"data-state":P(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...t,ref:r})});g.displayName=x;function M(e,r){return`${Math.round(e/r*100)}%`}function P(e,r){return e==null?"indeterminate":e===r?"complete":"loading"}function l(e){return typeof e=="number"}function p(e){return l(e)&&!isNaN(e)&&e>0}function f(e,r){return l(e)&&!isNaN(e)&&e<=r&&e>=0}function S(e,r){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${d}\`.`}function D(e,r){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${r}\`. The \`value\` prop must be:
2
- - a positive number
3
- - less than the value passed to \`max\` (or ${d} if no \`max\` prop is set)
4
- - \`null\` or \`undefined\` if the progress is indeterminate.
5
-
6
- Defaulting to \`null\`.`}var b=v,V=g;const N=u.forwardRef(({className:e,value:r,...o},t)=>i.jsxRuntimeExports.jsx(b,{ref:t,className:E.cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),value:r,...o,children:i.jsxRuntimeExports.jsx(V,{className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(r||0)}%)`}})}));N.displayName=b?.displayName||"Progress";exports.Progress=N;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./progress-BTApMbqg.js`);exports.Progress=e.t;
package/dist/progress.mjs CHANGED
@@ -1,100 +1,4 @@
1
1
  "use client";
2
- import { j as i } from "./jsx-runtime-tc70JA_2.mjs";
3
- import * as u from "react";
4
- import { c as y } from "./index-3j-XAIXT.mjs";
5
- import { P as v } from "./index-DaILh3TV.mjs";
6
- import { c as I } from "./utils-DY6fhrgS.mjs";
7
- var d = "Progress", m = 100, [R] = y(d), [j, w] = R(d), c = u.forwardRef(
8
- (r, e) => {
9
- const {
10
- __scopeProgress: n,
11
- value: o = null,
12
- max: a,
13
- getValueLabel: b = E,
14
- ...h
15
- } = r;
16
- (a || a === 0) && !p(a) && console.error(_(`${a}`, "Progress"));
17
- const t = p(a) ? a : m;
18
- o !== null && !f(o, t) && console.error(M(`${o}`, "Progress"));
19
- const s = f(o, t) ? o : null, $ = l(s) ? b(s, t) : void 0;
20
- return /* @__PURE__ */ i.jsx(j, { scope: n, value: s, max: t, children: /* @__PURE__ */ i.jsx(
21
- v.div,
22
- {
23
- "aria-valuemax": t,
24
- "aria-valuemin": 0,
25
- "aria-valuenow": l(s) ? s : void 0,
26
- "aria-valuetext": $,
27
- role: "progressbar",
28
- "data-state": P(s, t),
29
- "data-value": s ?? void 0,
30
- "data-max": t,
31
- ...h,
32
- ref: e
33
- }
34
- ) });
35
- }
36
- );
37
- c.displayName = d;
38
- var g = "ProgressIndicator", x = u.forwardRef(
39
- (r, e) => {
40
- const { __scopeProgress: n, ...o } = r, a = w(g, n);
41
- return /* @__PURE__ */ i.jsx(
42
- v.div,
43
- {
44
- "data-state": P(a.value, a.max),
45
- "data-value": a.value ?? void 0,
46
- "data-max": a.max,
47
- ...o,
48
- ref: e
49
- }
50
- );
51
- }
52
- );
53
- x.displayName = g;
54
- function E(r, e) {
55
- return `${Math.round(r / e * 100)}%`;
56
- }
57
- function P(r, e) {
58
- return r == null ? "indeterminate" : r === e ? "complete" : "loading";
59
- }
60
- function l(r) {
61
- return typeof r == "number";
62
- }
63
- function p(r) {
64
- return l(r) && !isNaN(r) && r > 0;
65
- }
66
- function f(r, e) {
67
- return l(r) && !isNaN(r) && r <= e && r >= 0;
68
- }
69
- function _(r, e) {
70
- return `Invalid prop \`max\` of value \`${r}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${m}\`.`;
71
- }
72
- function M(r, e) {
73
- return `Invalid prop \`value\` of value \`${r}\` supplied to \`${e}\`. The \`value\` prop must be:
74
- - a positive number
75
- - less than the value passed to \`max\` (or ${m} if no \`max\` prop is set)
76
- - \`null\` or \`undefined\` if the progress is indeterminate.
77
-
78
- Defaulting to \`null\`.`;
79
- }
80
- var N = c, V = x;
81
- const A = u.forwardRef(({ className: r, value: e, ...n }, o) => /* @__PURE__ */ i.jsx(
82
- N,
83
- {
84
- ref: o,
85
- className: I("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", r),
86
- value: e,
87
- ...n,
88
- children: /* @__PURE__ */ i.jsx(
89
- V,
90
- {
91
- className: "bg-primary h-full w-full flex-1 transition-all",
92
- style: { transform: `translateX(-${100 - (e || 0)}%)` }
93
- }
94
- )
95
- }
96
- ));
97
- A.displayName = N?.displayName || "Progress";
98
- export {
99
- A as Progress
100
- };
2
+ "use client";
3
+ import { t as e } from "./progress-BbN-RNvs.mjs";
4
+ export { e as Progress };
@@ -0,0 +1,193 @@
1
+ import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
2
+ import { t } from "./utils-yc5uc46c.mjs";
3
+ import { n } from "./dist-Cvwtowos.mjs";
4
+ import { n as r } from "./dist-BC_VB6JL.mjs";
5
+ import { r as i, t as a } from "./dist-bDoR0CBU.mjs";
6
+ import { t as o } from "./dist-VI9bl_Wk.mjs";
7
+ import { t as s } from "./dist-d_pecHgw.mjs";
8
+ import { t as c } from "./dist-4A0ut6a8.mjs";
9
+ import { t as l } from "./dist-Dh_jWJh-.mjs";
10
+ import { t as u } from "./dist-FGQAMrhH.mjs";
11
+ import { n as d, r as f, t as p } from "./dist-sRlXdzvf.mjs";
12
+ import * as m from "react";
13
+ import { Circle as h } from "lucide-react";
14
+ //#region ../../node_modules/.bun/@radix-ui+react-radio-group@1.3.8+2d3f272c3a65784a/node_modules/@radix-ui/react-radio-group/dist/index.mjs
15
+ var g = e(), _ = "Radio", [v, y] = n(_), [b, x] = v(_), S = m.forwardRef((e, t) => {
16
+ let { __scopeRadio: n, name: o, checked: s = !1, required: c, disabled: l, value: u = "on", onCheck: d, form: f, ...p } = e, [h, _] = m.useState(null), v = r(t, (e) => _(e)), y = m.useRef(!1), x = h ? f || !!h.closest("form") : !0;
17
+ return /* @__PURE__ */ (0, g.jsxs)(b, {
18
+ scope: n,
19
+ checked: s,
20
+ disabled: l,
21
+ children: [/* @__PURE__ */ (0, g.jsx)(a.button, {
22
+ type: "button",
23
+ role: "radio",
24
+ "aria-checked": s,
25
+ "data-state": D(s),
26
+ "data-disabled": l ? "" : void 0,
27
+ disabled: l,
28
+ value: u,
29
+ ...p,
30
+ ref: v,
31
+ onClick: i(e.onClick, (e) => {
32
+ s || d?.(), x && (y.current = e.isPropagationStopped(), y.current || e.stopPropagation());
33
+ })
34
+ }), x && /* @__PURE__ */ (0, g.jsx)(E, {
35
+ control: h,
36
+ bubbles: !y.current,
37
+ name: o,
38
+ value: u,
39
+ checked: s,
40
+ required: c,
41
+ disabled: l,
42
+ form: f,
43
+ style: { transform: "translateX(-100%)" }
44
+ })]
45
+ });
46
+ });
47
+ S.displayName = _;
48
+ var C = "RadioIndicator", w = m.forwardRef((e, t) => {
49
+ let { __scopeRadio: n, forceMount: r, ...i } = e, o = x(C, n);
50
+ return /* @__PURE__ */ (0, g.jsx)(s, {
51
+ present: r || o.checked,
52
+ children: /* @__PURE__ */ (0, g.jsx)(a.span, {
53
+ "data-state": D(o.checked),
54
+ "data-disabled": o.disabled ? "" : void 0,
55
+ ...i,
56
+ ref: t
57
+ })
58
+ });
59
+ });
60
+ w.displayName = C;
61
+ var T = "RadioBubbleInput", E = m.forwardRef(({ __scopeRadio: e, control: t, checked: n, bubbles: i = !0, ...o }, s) => {
62
+ let c = m.useRef(null), d = r(c, s), f = l(n), p = u(t);
63
+ return m.useEffect(() => {
64
+ let e = c.current;
65
+ if (!e) return;
66
+ let t = window.HTMLInputElement.prototype, r = Object.getOwnPropertyDescriptor(t, "checked").set;
67
+ if (f !== n && r) {
68
+ let t = new Event("click", { bubbles: i });
69
+ r.call(e, n), e.dispatchEvent(t);
70
+ }
71
+ }, [
72
+ f,
73
+ n,
74
+ i
75
+ ]), /* @__PURE__ */ (0, g.jsx)(a.input, {
76
+ type: "radio",
77
+ "aria-hidden": !0,
78
+ defaultChecked: n,
79
+ ...o,
80
+ tabIndex: -1,
81
+ ref: d,
82
+ style: {
83
+ ...o.style,
84
+ ...p,
85
+ position: "absolute",
86
+ pointerEvents: "none",
87
+ opacity: 0,
88
+ margin: 0
89
+ }
90
+ });
91
+ });
92
+ E.displayName = T;
93
+ function D(e) {
94
+ return e ? "checked" : "unchecked";
95
+ }
96
+ var O = [
97
+ "ArrowUp",
98
+ "ArrowDown",
99
+ "ArrowLeft",
100
+ "ArrowRight"
101
+ ], k = "RadioGroup", [A, j] = n(k, [f, y]), M = f(), N = y(), [P, F] = A(k), I = m.forwardRef((e, t) => {
102
+ let { __scopeRadioGroup: n, name: r, defaultValue: i, value: s, required: l = !1, disabled: u = !1, orientation: f, dir: p, loop: m = !0, onValueChange: h, ..._ } = e, v = M(n), y = c(p), [b, x] = o({
103
+ prop: s,
104
+ defaultProp: i ?? null,
105
+ onChange: h,
106
+ caller: k
107
+ });
108
+ return /* @__PURE__ */ (0, g.jsx)(P, {
109
+ scope: n,
110
+ name: r,
111
+ required: l,
112
+ disabled: u,
113
+ value: b,
114
+ onValueChange: x,
115
+ children: /* @__PURE__ */ (0, g.jsx)(d, {
116
+ asChild: !0,
117
+ ...v,
118
+ orientation: f,
119
+ dir: y,
120
+ loop: m,
121
+ children: /* @__PURE__ */ (0, g.jsx)(a.div, {
122
+ role: "radiogroup",
123
+ "aria-required": l,
124
+ "aria-orientation": f,
125
+ "data-disabled": u ? "" : void 0,
126
+ dir: y,
127
+ ..._,
128
+ ref: t
129
+ })
130
+ })
131
+ });
132
+ });
133
+ I.displayName = k;
134
+ var L = "RadioGroupItem", R = m.forwardRef((e, t) => {
135
+ let { __scopeRadioGroup: n, disabled: a, ...o } = e, s = F(L, n), c = s.disabled || a, l = M(n), u = N(n), d = m.useRef(null), f = r(t, d), h = s.value === o.value, _ = m.useRef(!1);
136
+ return m.useEffect(() => {
137
+ let e = (e) => {
138
+ O.includes(e.key) && (_.current = !0);
139
+ }, t = () => _.current = !1;
140
+ return document.addEventListener("keydown", e), document.addEventListener("keyup", t), () => {
141
+ document.removeEventListener("keydown", e), document.removeEventListener("keyup", t);
142
+ };
143
+ }, []), /* @__PURE__ */ (0, g.jsx)(p, {
144
+ asChild: !0,
145
+ ...l,
146
+ focusable: !c,
147
+ active: h,
148
+ children: /* @__PURE__ */ (0, g.jsx)(S, {
149
+ disabled: c,
150
+ required: s.required,
151
+ checked: h,
152
+ ...u,
153
+ ...o,
154
+ name: s.name,
155
+ ref: f,
156
+ onCheck: () => s.onValueChange(o.value),
157
+ onKeyDown: i((e) => {
158
+ e.key === "Enter" && e.preventDefault();
159
+ }),
160
+ onFocus: i(o.onFocus, () => {
161
+ _.current && d.current?.click();
162
+ })
163
+ })
164
+ });
165
+ });
166
+ R.displayName = L;
167
+ var z = "RadioGroupIndicator", B = m.forwardRef((e, t) => {
168
+ let { __scopeRadioGroup: n, ...r } = e;
169
+ return /* @__PURE__ */ (0, g.jsx)(w, {
170
+ ...N(n),
171
+ ...r,
172
+ ref: t
173
+ });
174
+ });
175
+ B.displayName = z;
176
+ var V = I, H = R, U = B, W = m.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, g.jsx)(V, {
177
+ className: t("grid gap-2", e),
178
+ ...n,
179
+ ref: r
180
+ }));
181
+ W.displayName = V?.displayName || "RadioGroup";
182
+ var G = m.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, g.jsx)(H, {
183
+ ref: r,
184
+ className: t("border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50", e),
185
+ ...n,
186
+ children: /* @__PURE__ */ (0, g.jsx)(U, {
187
+ className: "flex items-center justify-center",
188
+ children: /* @__PURE__ */ (0, g.jsx)(h, { className: "fill-primary h-3.5 w-3.5" })
189
+ })
190
+ }));
191
+ G.displayName = H?.displayName || "RadioGroupItem";
192
+ //#endregion
193
+ export { G as n, W as t };
@@ -0,0 +1 @@
1
+ const e=require(`./jsx-runtime-CN3qjQQx.js`),t=require(`./utils-BxDanjP7.js`),n=require(`./dist-Kqk0oQYU.js`),r=require(`./dist-CsEsK2jW.js`),i=require(`./dist-DmmUjo_P.js`),a=require(`./dist-B5VmV2K7.js`),o=require(`./dist-_Osar3kp.js`),s=require(`./dist-BeFCyPgD.js`),c=require(`./dist-0FXx-pUX.js`),l=require(`./dist-BVKPqhkg.js`),u=require(`./dist-B4N_7Tps.js`);let d=require(`react`),f=e.i(d,1);d=e.i(d);let p=require(`lucide-react`);var m=e.t(),h=`Radio`,[g,_]=n.n(h),[v,y]=g(h),b=f.forwardRef((e,t)=>{let{__scopeRadio:n,name:a,checked:o=!1,required:s,disabled:c,value:l=`on`,onCheck:u,form:d,...p}=e,[h,g]=f.useState(null),_=r.n(t,e=>g(e)),y=f.useRef(!1),b=h?d||!!h.closest(`form`):!0;return(0,m.jsxs)(v,{scope:n,checked:o,disabled:c,children:[(0,m.jsx)(i.t.button,{type:`button`,role:`radio`,"aria-checked":o,"data-state":T(o),"data-disabled":c?``:void 0,disabled:c,value:l,...p,ref:_,onClick:i.r(e.onClick,e=>{o||u?.(),b&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),b&&(0,m.jsx)(w,{control:h,bubbles:!y.current,name:a,value:l,checked:o,required:s,disabled:c,form:d,style:{transform:`translateX(-100%)`}})]})});b.displayName=h;var x=`RadioIndicator`,S=f.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...a}=e,s=y(x,n);return(0,m.jsx)(o.t,{present:r||s.checked,children:(0,m.jsx)(i.t.span,{"data-state":T(s.checked),"data-disabled":s.disabled?``:void 0,...a,ref:t})})});S.displayName=x;var C=`RadioBubbleInput`,w=f.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:a=!0,...o},s)=>{let u=f.useRef(null),d=r.n(u,s),p=c.t(n),h=l.t(t);return f.useEffect(()=>{let e=u.current;if(!e)return;let t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,`checked`).set;if(p!==n&&r){let t=new Event(`click`,{bubbles:a});r.call(e,n),e.dispatchEvent(t)}},[p,n,a]),(0,m.jsx)(i.t.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:d,style:{...o.style,...h,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});w.displayName=C;function T(e){return e?`checked`:`unchecked`}var E=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],D=`RadioGroup`,[O,k]=n.n(D,[u.r,_]),A=u.r(),j=_(),[M,N]=O(D),P=f.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:o,value:c,required:l=!1,disabled:d=!1,orientation:f,dir:p,loop:h=!0,onValueChange:g,..._}=e,v=A(n),y=s.t(p),[b,x]=a.t({prop:c,defaultProp:o??null,onChange:g,caller:D});return(0,m.jsx)(M,{scope:n,name:r,required:l,disabled:d,value:b,onValueChange:x,children:(0,m.jsx)(u.n,{asChild:!0,...v,orientation:f,dir:y,loop:h,children:(0,m.jsx)(i.t.div,{role:`radiogroup`,"aria-required":l,"aria-orientation":f,"data-disabled":d?``:void 0,dir:y,..._,ref:t})})})});P.displayName=D;var F=`RadioGroupItem`,I=f.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:a,...o}=e,s=N(F,n),c=s.disabled||a,l=A(n),d=j(n),p=f.useRef(null),h=r.n(t,p),g=s.value===o.value,_=f.useRef(!1);return f.useEffect(()=>{let e=e=>{E.includes(e.key)&&(_.current=!0)},t=()=>_.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,m.jsx)(u.t,{asChild:!0,...l,focusable:!c,active:g,children:(0,m.jsx)(b,{disabled:c,required:s.required,checked:g,...d,...o,name:s.name,ref:h,onCheck:()=>s.onValueChange(o.value),onKeyDown:i.r(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:i.r(o.onFocus,()=>{_.current&&p.current?.click()})})})});I.displayName=F;var L=`RadioGroupIndicator`,R=f.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,m.jsx)(S,{...j(n),...r,ref:t})});R.displayName=L;var z=P,B=I,V=R,H=d.forwardRef(({className:e,...n},r)=>(0,m.jsx)(z,{className:t.t(`grid gap-2`,e),...n,ref:r}));H.displayName=z?.displayName||`RadioGroup`;var U=d.forwardRef(({className:e,...n},r)=>(0,m.jsx)(B,{ref:r,className:t.t(`border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:(0,m.jsx)(V,{className:`flex items-center justify-center`,children:(0,m.jsx)(p.Circle,{className:`fill-primary h-3.5 w-3.5`})})}));U.displayName=B?.displayName||`RadioGroupItem`,Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return H}});
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-nZSsnGb7.js"),B=require("react"),v=require("./index-BtZvtDmp.js"),h=require("./index-_XxjJPRD.js"),C=require("./index-D2HnlO3y.js"),y=require("./index-DIsg7zU7.js"),K=require("./index-Ce5TOFAK.js"),U=require("./index-Dko2XdTk.js"),V=require("./index-Cjj_rUPu.js"),H=require("./index-DYxWvftI.js"),z=require("./index-B2XtpfGY.js"),W=require("lucide-react"),w=require("./utils-cdbZV8DZ.js");function X(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>o[e]})}}return r.default=o,Object.freeze(r)}const a=X(B);var g="Radio",[Y,P]=C.createContextScope(g),[J,Q]=Y(g),G=a.forwardRef((o,r)=>{const{__scopeRadio:e,name:n,checked:t=!1,required:i,disabled:c,value:l="on",onCheck:R,form:f,...m}=o,[p,x]=a.useState(null),u=h.useComposedRefs(r,E=>x(E)),d=a.useRef(!1),j=p?f||!!p.closest("form"):!0;return s.jsxRuntimeExports.jsxs(J,{scope:e,checked:t,disabled:c,children:[s.jsxRuntimeExports.jsx(v.Primitive.button,{type:"button",role:"radio","aria-checked":t,"data-state":S(t),"data-disabled":c?"":void 0,disabled:c,value:l,...m,ref:u,onClick:v.composeEventHandlers(o.onClick,E=>{t||R?.(),j&&(d.current=E.isPropagationStopped(),d.current||E.stopPropagation())})}),j&&s.jsxRuntimeExports.jsx(_,{control:p,bubbles:!d.current,name:n,value:l,checked:t,required:i,disabled:c,form:f,style:{transform:"translateX(-100%)"}})]})});G.displayName=g;var I="RadioIndicator",N=a.forwardRef((o,r)=>{const{__scopeRadio:e,forceMount:n,...t}=o,i=Q(I,e);return s.jsxRuntimeExports.jsx(z.Presence,{present:n||i.checked,children:s.jsxRuntimeExports.jsx(v.Primitive.span,{"data-state":S(i.checked),"data-disabled":i.disabled?"":void 0,...t,ref:r})})});N.displayName=I;var Z="RadioBubbleInput",_=a.forwardRef(({__scopeRadio:o,control:r,checked:e,bubbles:n=!0,...t},i)=>{const c=a.useRef(null),l=h.useComposedRefs(c,i),R=H.usePrevious(e),f=V.useSize(r);return a.useEffect(()=>{const m=c.current;if(!m)return;const p=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(p,"checked").set;if(R!==e&&u){const d=new Event("click",{bubbles:n});u.call(m,e),m.dispatchEvent(d)}},[R,e,n]),s.jsxRuntimeExports.jsx(v.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:e,...t,tabIndex:-1,ref:l,style:{...t.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=Z;function S(o){return o?"checked":"unchecked"}var ee=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],b="RadioGroup",[oe]=C.createContextScope(b,[y.createRovingFocusGroupScope,P]),k=y.createRovingFocusGroupScope(),q=P(),[re,te]=oe(b),A=a.forwardRef((o,r)=>{const{__scopeRadioGroup:e,name:n,defaultValue:t,value:i,required:c=!1,disabled:l=!1,orientation:R,dir:f,loop:m=!0,onValueChange:p,...x}=o,u=k(e),d=U.useDirection(f),[j,E]=K.useControllableState({prop:i,defaultProp:t??null,onChange:p,caller:b});return s.jsxRuntimeExports.jsx(re,{scope:e,name:n,required:c,disabled:l,value:j,onValueChange:E,children:s.jsxRuntimeExports.jsx(y.Root,{asChild:!0,...u,orientation:R,dir:d,loop:m,children:s.jsxRuntimeExports.jsx(v.Primitive.div,{role:"radiogroup","aria-required":c,"aria-orientation":R,"data-disabled":l?"":void 0,dir:d,...x,ref:r})})})});A.displayName=b;var O="RadioGroupItem",D=a.forwardRef((o,r)=>{const{__scopeRadioGroup:e,disabled:n,...t}=o,i=te(O,e),c=i.disabled||n,l=k(e),R=q(e),f=a.useRef(null),m=h.useComposedRefs(r,f),p=i.value===t.value,x=a.useRef(!1);return a.useEffect(()=>{const u=j=>{ee.includes(j.key)&&(x.current=!0)},d=()=>x.current=!1;return document.addEventListener("keydown",u),document.addEventListener("keyup",d),()=>{document.removeEventListener("keydown",u),document.removeEventListener("keyup",d)}},[]),s.jsxRuntimeExports.jsx(y.Item,{asChild:!0,...l,focusable:!c,active:p,children:s.jsxRuntimeExports.jsx(G,{disabled:c,required:i.required,checked:p,...R,...t,name:i.name,ref:m,onCheck:()=>i.onValueChange(t.value),onKeyDown:v.composeEventHandlers(u=>{u.key==="Enter"&&u.preventDefault()}),onFocus:v.composeEventHandlers(t.onFocus,()=>{x.current&&f.current?.click()})})})});D.displayName=O;var se="RadioGroupIndicator",M=a.forwardRef((o,r)=>{const{__scopeRadioGroup:e,...n}=o,t=q(e);return s.jsxRuntimeExports.jsx(N,{...t,...n,ref:r})});M.displayName=se;var $=A,F=D,ne=M;const L=a.forwardRef(({className:o,...r},e)=>s.jsxRuntimeExports.jsx($,{className:w.cn("grid gap-2",o),...r,ref:e}));L.displayName=$?.displayName||"RadioGroup";const T=a.forwardRef(({className:o,...r},e)=>s.jsxRuntimeExports.jsx(F,{ref:e,className:w.cn("border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",o),...r,children:s.jsxRuntimeExports.jsx(ne,{className:"flex items-center justify-center",children:s.jsxRuntimeExports.jsx(W.Circle,{className:"fill-primary h-3.5 w-3.5"})})}));T.displayName=F?.displayName||"RadioGroupItem";exports.RadioGroup=L;exports.RadioGroupItem=T;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./radio-group-FDXr6VLM.js`);exports.RadioGroup=e.t,exports.RadioGroupItem=e.n;
@@ -1,254 +1,4 @@
1
1
  "use client";
2
- import { j as t } from "./jsx-runtime-tc70JA_2.mjs";
3
- import * as i from "react";
4
- import { P as x, c as w } from "./index-K9FzbxYw.mjs";
5
- import { u as C } from "./index-DLcqcWxM.mjs";
6
- import { c as N } from "./index-IZ2gq03c.mjs";
7
- import { R as K, I as T, c as g } from "./index-Bv7qrYW6.mjs";
8
- import { u as U } from "./index-p6xVFRb4.mjs";
9
- import { u as V } from "./index-CD6_IrA-.mjs";
10
- import { u as z } from "./index-C1qb0595.mjs";
11
- import { u as H } from "./index-BZPx6jYI.mjs";
12
- import { P as $ } from "./index-vuPgkS0V.mjs";
13
- import { Circle as W } from "lucide-react";
14
- import { c as E } from "./utils-DY6fhrgS.mjs";
15
- var I = "Radio", [X, P] = N(I), [Y, J] = X(I), G = i.forwardRef(
16
- (r, a) => {
17
- const {
18
- __scopeRadio: e,
19
- name: d,
20
- checked: o = !1,
21
- required: s,
22
- disabled: n,
23
- value: l = "on",
24
- onCheck: f,
25
- form: m,
26
- ...R
27
- } = r, [p, v] = i.useState(null), c = C(a, (h) => v(h)), u = i.useRef(!1), y = p ? m || !!p.closest("form") : !0;
28
- return /* @__PURE__ */ t.jsxs(Y, { scope: e, checked: o, disabled: n, children: [
29
- /* @__PURE__ */ t.jsx(
30
- x.button,
31
- {
32
- type: "button",
33
- role: "radio",
34
- "aria-checked": o,
35
- "data-state": S(o),
36
- "data-disabled": n ? "" : void 0,
37
- disabled: n,
38
- value: l,
39
- ...R,
40
- ref: c,
41
- onClick: w(r.onClick, (h) => {
42
- o || f?.(), y && (u.current = h.isPropagationStopped(), u.current || h.stopPropagation());
43
- })
44
- }
45
- ),
46
- y && /* @__PURE__ */ t.jsx(
47
- k,
48
- {
49
- control: p,
50
- bubbles: !u.current,
51
- name: d,
52
- value: l,
53
- checked: o,
54
- required: s,
55
- disabled: n,
56
- form: m,
57
- style: { transform: "translateX(-100%)" }
58
- }
59
- )
60
- ] });
61
- }
62
- );
63
- G.displayName = I;
64
- var _ = "RadioIndicator", j = i.forwardRef(
65
- (r, a) => {
66
- const { __scopeRadio: e, forceMount: d, ...o } = r, s = J(_, e);
67
- return /* @__PURE__ */ t.jsx($, { present: d || s.checked, children: /* @__PURE__ */ t.jsx(
68
- x.span,
69
- {
70
- "data-state": S(s.checked),
71
- "data-disabled": s.disabled ? "" : void 0,
72
- ...o,
73
- ref: a
74
- }
75
- ) });
76
- }
77
- );
78
- j.displayName = _;
79
- var Q = "RadioBubbleInput", k = i.forwardRef(
80
- ({
81
- __scopeRadio: r,
82
- control: a,
83
- checked: e,
84
- bubbles: d = !0,
85
- ...o
86
- }, s) => {
87
- const n = i.useRef(null), l = C(n, s), f = H(e), m = z(a);
88
- return i.useEffect(() => {
89
- const R = n.current;
90
- if (!R) return;
91
- const p = window.HTMLInputElement.prototype, c = Object.getOwnPropertyDescriptor(
92
- p,
93
- "checked"
94
- ).set;
95
- if (f !== e && c) {
96
- const u = new Event("click", { bubbles: d });
97
- c.call(R, e), R.dispatchEvent(u);
98
- }
99
- }, [f, e, d]), /* @__PURE__ */ t.jsx(
100
- x.input,
101
- {
102
- type: "radio",
103
- "aria-hidden": !0,
104
- defaultChecked: e,
105
- ...o,
106
- tabIndex: -1,
107
- ref: l,
108
- style: {
109
- ...o.style,
110
- ...m,
111
- position: "absolute",
112
- pointerEvents: "none",
113
- opacity: 0,
114
- margin: 0
115
- }
116
- }
117
- );
118
- }
119
- );
120
- k.displayName = Q;
121
- function S(r) {
122
- return r ? "checked" : "unchecked";
123
- }
124
- var Z = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], b = "RadioGroup", [ee] = N(b, [
125
- g,
126
- P
127
- ]), A = g(), D = P(), [oe, re] = ee(b), M = i.forwardRef(
128
- (r, a) => {
129
- const {
130
- __scopeRadioGroup: e,
131
- name: d,
132
- defaultValue: o,
133
- value: s,
134
- required: n = !1,
135
- disabled: l = !1,
136
- orientation: f,
137
- dir: m,
138
- loop: R = !0,
139
- onValueChange: p,
140
- ...v
141
- } = r, c = A(e), u = V(m), [y, h] = U({
142
- prop: s,
143
- defaultProp: o ?? null,
144
- onChange: p,
145
- caller: b
146
- });
147
- return /* @__PURE__ */ t.jsx(
148
- oe,
149
- {
150
- scope: e,
151
- name: d,
152
- required: n,
153
- disabled: l,
154
- value: y,
155
- onValueChange: h,
156
- children: /* @__PURE__ */ t.jsx(
157
- K,
158
- {
159
- asChild: !0,
160
- ...c,
161
- orientation: f,
162
- dir: u,
163
- loop: R,
164
- children: /* @__PURE__ */ t.jsx(
165
- x.div,
166
- {
167
- role: "radiogroup",
168
- "aria-required": n,
169
- "aria-orientation": f,
170
- "data-disabled": l ? "" : void 0,
171
- dir: u,
172
- ...v,
173
- ref: a
174
- }
175
- )
176
- }
177
- )
178
- }
179
- );
180
- }
181
- );
182
- M.displayName = b;
183
- var O = "RadioGroupItem", F = i.forwardRef(
184
- (r, a) => {
185
- const { __scopeRadioGroup: e, disabled: d, ...o } = r, s = re(O, e), n = s.disabled || d, l = A(e), f = D(e), m = i.useRef(null), R = C(a, m), p = s.value === o.value, v = i.useRef(!1);
186
- return i.useEffect(() => {
187
- const c = (y) => {
188
- Z.includes(y.key) && (v.current = !0);
189
- }, u = () => v.current = !1;
190
- return document.addEventListener("keydown", c), document.addEventListener("keyup", u), () => {
191
- document.removeEventListener("keydown", c), document.removeEventListener("keyup", u);
192
- };
193
- }, []), /* @__PURE__ */ t.jsx(
194
- T,
195
- {
196
- asChild: !0,
197
- ...l,
198
- focusable: !n,
199
- active: p,
200
- children: /* @__PURE__ */ t.jsx(
201
- G,
202
- {
203
- disabled: n,
204
- required: s.required,
205
- checked: p,
206
- ...f,
207
- ...o,
208
- name: s.name,
209
- ref: R,
210
- onCheck: () => s.onValueChange(o.value),
211
- onKeyDown: w((c) => {
212
- c.key === "Enter" && c.preventDefault();
213
- }),
214
- onFocus: w(o.onFocus, () => {
215
- v.current && m.current?.click();
216
- })
217
- }
218
- )
219
- }
220
- );
221
- }
222
- );
223
- F.displayName = O;
224
- var te = "RadioGroupIndicator", L = i.forwardRef(
225
- (r, a) => {
226
- const { __scopeRadioGroup: e, ...d } = r, o = D(e);
227
- return /* @__PURE__ */ t.jsx(j, { ...o, ...d, ref: a });
228
- }
229
- );
230
- L.displayName = te;
231
- var q = M, B = F, ae = L;
232
- const se = i.forwardRef(
233
- ({ className: r, ...a }, e) => /* @__PURE__ */ t.jsx(q, { className: E("grid gap-2", r), ...a, ref: e })
234
- );
235
- se.displayName = q?.displayName || "RadioGroup";
236
- const ie = i.forwardRef(
237
- ({ className: r, ...a }, e) => /* @__PURE__ */ t.jsx(
238
- B,
239
- {
240
- ref: e,
241
- className: E(
242
- "border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",
243
- r
244
- ),
245
- ...a,
246
- children: /* @__PURE__ */ t.jsx(ae, { className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(W, { className: "fill-primary h-3.5 w-3.5" }) })
247
- }
248
- )
249
- );
250
- ie.displayName = B?.displayName || "RadioGroupItem";
251
- export {
252
- se as RadioGroup,
253
- ie as RadioGroupItem
254
- };
2
+ "use client";
3
+ import { n as e, t } from "./radio-group-C5oprOrt.mjs";
4
+ export { t as RadioGroup, e as RadioGroupItem };