@codefast/ui 0.0.40 → 0.0.42

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 (387) hide show
  1. package/dist/{chunk-EVN2IB57.js → chunk-6EAQQBWG.js} +2 -2
  2. package/dist/chunk-6EAQQBWG.js.map +1 -0
  3. package/dist/{chunk-YR36SVVG.mjs → chunk-7HJV22OF.mjs} +1 -1
  4. package/dist/chunk-7HJV22OF.mjs.map +1 -0
  5. package/dist/{chunk-5WJB3UAO.js → chunk-CERSQE5J.js} +1 -1
  6. package/dist/chunk-CERSQE5J.js.map +1 -0
  7. package/dist/{chunk-UPZHCTQV.js → chunk-ELWITZPX.js} +2 -2
  8. package/dist/chunk-ELWITZPX.js.map +1 -0
  9. package/dist/{chunk-WLMYX3C7.mjs → chunk-GDMHMSJ2.mjs} +2 -2
  10. package/dist/chunk-GDMHMSJ2.mjs.map +1 -0
  11. package/dist/{chunk-UJJZZCAC.js → chunk-HQ4AUOQM.js} +1 -1
  12. package/dist/{chunk-UJJZZCAC.js.map → chunk-HQ4AUOQM.js.map} +1 -1
  13. package/dist/{chunk-HLXU3SQI.mjs → chunk-HWEFQSTC.mjs} +1 -1
  14. package/dist/chunk-HWEFQSTC.mjs.map +1 -0
  15. package/dist/{chunk-JTAXNFUM.mjs → chunk-HX5YKP4E.mjs} +2 -2
  16. package/dist/chunk-HX5YKP4E.mjs.map +1 -0
  17. package/dist/{chunk-PLX35IKX.mjs → chunk-I6QCJDIF.mjs} +1 -1
  18. package/dist/chunk-I6QCJDIF.mjs.map +1 -0
  19. package/dist/{chunk-466PAJCA.mjs → chunk-LEUB3C3L.mjs} +1 -1
  20. package/dist/chunk-LEUB3C3L.mjs.map +1 -0
  21. package/dist/{chunk-KJ77RPJ4.mjs → chunk-M5UKNISJ.mjs} +2 -2
  22. package/dist/chunk-M5UKNISJ.mjs.map +1 -0
  23. package/dist/{chunk-EYERINEJ.js → chunk-MZJL73RI.js} +1 -1
  24. package/dist/chunk-MZJL73RI.js.map +1 -0
  25. package/dist/{chunk-JCMRDCFT.js → chunk-NH6X3FON.js} +1 -1
  26. package/dist/{chunk-JCMRDCFT.js.map → chunk-NH6X3FON.js.map} +1 -1
  27. package/dist/{chunk-UDNWQQ3I.js → chunk-NSK74YTM.js} +2 -2
  28. package/dist/chunk-NSK74YTM.js.map +1 -0
  29. package/dist/{chunk-N6QGG4WS.mjs → chunk-P5AV3QU7.mjs} +2 -2
  30. package/dist/chunk-P5AV3QU7.mjs.map +1 -0
  31. package/dist/{chunk-GRQGCS7U.mjs → chunk-PWF46YXQ.mjs} +2 -2
  32. package/dist/chunk-PWF46YXQ.mjs.map +1 -0
  33. package/dist/{chunk-ZWGC5M4G.js → chunk-SCJ3W2VO.js} +2 -2
  34. package/dist/chunk-SCJ3W2VO.js.map +1 -0
  35. package/dist/{chunk-MSHUAEXI.js → chunk-SCPFGC2X.js} +2 -2
  36. package/dist/chunk-SCPFGC2X.js.map +1 -0
  37. package/dist/{chunk-JIHHUXA5.js → chunk-VXPAGNPJ.js} +2 -2
  38. package/dist/chunk-VXPAGNPJ.js.map +1 -0
  39. package/dist/{chunk-6B2PU2GG.mjs → chunk-WL65TBKJ.mjs} +2 -2
  40. package/dist/chunk-WL65TBKJ.mjs.map +1 -0
  41. package/dist/{chunk-4TJBMO2Y.mjs → chunk-WYYOCZNI.mjs} +2 -2
  42. package/dist/chunk-WYYOCZNI.mjs.map +1 -0
  43. package/dist/{chunk-FEE6PNWV.js → chunk-XM4Y2S5E.js} +2 -2
  44. package/dist/chunk-XM4Y2S5E.js.map +1 -0
  45. package/dist/{chunk-7PJR4WFR.mjs → chunk-ZEYIBYZP.mjs} +2 -2
  46. package/dist/chunk-ZEYIBYZP.mjs.map +1 -0
  47. package/dist/{chunk-AEWLL6A2.js → chunk-ZTEJNUH6.js} +2 -2
  48. package/dist/chunk-ZTEJNUH6.js.map +1 -0
  49. package/dist/lib/utils.js +1 -1
  50. package/dist/lib/utils.mjs +1 -1
  51. package/dist/plugin/animate.plugin.js +1 -1
  52. package/dist/plugin/animate.plugin.mjs +1 -1
  53. package/dist/plugin/base.plugin.js +1 -1
  54. package/dist/plugin/base.plugin.mjs +1 -1
  55. package/dist/plugin/perspective.plugin.js +1 -1
  56. package/dist/plugin/perspective.plugin.mjs +1 -1
  57. package/dist/react/accordion.js +1 -1
  58. package/dist/react/accordion.js.map +1 -1
  59. package/dist/react/accordion.mjs +1 -1
  60. package/dist/react/accordion.mjs.map +1 -1
  61. package/dist/react/alert-dialog.js +1 -1
  62. package/dist/react/alert-dialog.js.map +1 -1
  63. package/dist/react/alert-dialog.mjs +1 -1
  64. package/dist/react/alert-dialog.mjs.map +1 -1
  65. package/dist/react/alert.js +1 -1
  66. package/dist/react/alert.js.map +1 -1
  67. package/dist/react/alert.mjs +1 -1
  68. package/dist/react/alert.mjs.map +1 -1
  69. package/dist/react/aspect-ratio.js.map +1 -1
  70. package/dist/react/aspect-ratio.mjs.map +1 -1
  71. package/dist/react/avatar.js +1 -1
  72. package/dist/react/avatar.js.map +1 -1
  73. package/dist/react/avatar.mjs +1 -1
  74. package/dist/react/avatar.mjs.map +1 -1
  75. package/dist/react/badge.js +1 -1
  76. package/dist/react/badge.js.map +1 -1
  77. package/dist/react/badge.mjs +1 -1
  78. package/dist/react/badge.mjs.map +1 -1
  79. package/dist/react/blockquote.js.map +1 -1
  80. package/dist/react/blockquote.mjs.map +1 -1
  81. package/dist/react/box.d.mts +2 -2
  82. package/dist/react/box.d.ts +2 -2
  83. package/dist/react/box.js.map +1 -1
  84. package/dist/react/box.mjs.map +1 -1
  85. package/dist/react/breadcrumb.js +1 -1
  86. package/dist/react/breadcrumb.js.map +1 -1
  87. package/dist/react/breadcrumb.mjs +1 -1
  88. package/dist/react/breadcrumb.mjs.map +1 -1
  89. package/dist/react/button.js +1 -1
  90. package/dist/react/button.mjs +1 -1
  91. package/dist/react/calendar.js +1 -1
  92. package/dist/react/calendar.js.map +1 -1
  93. package/dist/react/calendar.mjs +1 -1
  94. package/dist/react/calendar.mjs.map +1 -1
  95. package/dist/react/card.js +1 -1
  96. package/dist/react/card.js.map +1 -1
  97. package/dist/react/card.mjs +1 -1
  98. package/dist/react/card.mjs.map +1 -1
  99. package/dist/react/carousel.d.mts +1 -1
  100. package/dist/react/carousel.d.ts +1 -1
  101. package/dist/react/carousel.js +1 -1
  102. package/dist/react/carousel.js.map +1 -1
  103. package/dist/react/carousel.mjs +1 -1
  104. package/dist/react/carousel.mjs.map +1 -1
  105. package/dist/react/checkbox-cards.js +1 -1
  106. package/dist/react/checkbox-cards.js.map +1 -1
  107. package/dist/react/checkbox-cards.mjs +1 -1
  108. package/dist/react/checkbox-cards.mjs.map +1 -1
  109. package/dist/react/checkbox-group.js +1 -1
  110. package/dist/react/checkbox-group.js.map +1 -1
  111. package/dist/react/checkbox-group.mjs +1 -1
  112. package/dist/react/checkbox-group.mjs.map +1 -1
  113. package/dist/react/checkbox-group.primitive.d.mts +8 -8
  114. package/dist/react/checkbox-group.primitive.d.ts +8 -8
  115. package/dist/react/checkbox-group.primitive.js +1 -1
  116. package/dist/react/checkbox-group.primitive.mjs +1 -1
  117. package/dist/react/checkbox.js +1 -1
  118. package/dist/react/checkbox.js.map +1 -1
  119. package/dist/react/checkbox.mjs +1 -1
  120. package/dist/react/checkbox.mjs.map +1 -1
  121. package/dist/react/code.js.map +1 -1
  122. package/dist/react/code.mjs.map +1 -1
  123. package/dist/react/collapsible.js +1 -1
  124. package/dist/react/collapsible.js.map +1 -1
  125. package/dist/react/collapsible.mjs +1 -1
  126. package/dist/react/collapsible.mjs.map +1 -1
  127. package/dist/react/command.js +1 -1
  128. package/dist/react/command.js.map +1 -1
  129. package/dist/react/command.mjs +1 -1
  130. package/dist/react/command.mjs.map +1 -1
  131. package/dist/react/container.js +1 -1
  132. package/dist/react/container.js.map +1 -1
  133. package/dist/react/container.mjs +1 -1
  134. package/dist/react/container.mjs.map +1 -1
  135. package/dist/react/context-menu.js +1 -1
  136. package/dist/react/context-menu.js.map +1 -1
  137. package/dist/react/context-menu.mjs +1 -1
  138. package/dist/react/context-menu.mjs.map +1 -1
  139. package/dist/react/data-table.d.mts +1 -1
  140. package/dist/react/data-table.d.ts +1 -1
  141. package/dist/react/data-table.js +1 -1
  142. package/dist/react/data-table.js.map +1 -1
  143. package/dist/react/data-table.mjs +1 -1
  144. package/dist/react/data-table.mjs.map +1 -1
  145. package/dist/react/dialog.js +1 -1
  146. package/dist/react/dialog.mjs +1 -1
  147. package/dist/react/drawer.js +1 -1
  148. package/dist/react/drawer.js.map +1 -1
  149. package/dist/react/drawer.mjs +1 -1
  150. package/dist/react/drawer.mjs.map +1 -1
  151. package/dist/react/dropdown-menu.js +1 -1
  152. package/dist/react/dropdown-menu.mjs +1 -1
  153. package/dist/react/em.js.map +1 -1
  154. package/dist/react/em.mjs.map +1 -1
  155. package/dist/react/form.js +1 -1
  156. package/dist/react/form.js.map +1 -1
  157. package/dist/react/form.mjs +1 -1
  158. package/dist/react/form.mjs.map +1 -1
  159. package/dist/react/heading.d.mts +1 -1
  160. package/dist/react/heading.d.ts +1 -1
  161. package/dist/react/heading.js.map +1 -1
  162. package/dist/react/heading.mjs.map +1 -1
  163. package/dist/react/hover-card.js +1 -1
  164. package/dist/react/hover-card.js.map +1 -1
  165. package/dist/react/hover-card.mjs +1 -1
  166. package/dist/react/hover-card.mjs.map +1 -1
  167. package/dist/react/input-otp.js +1 -1
  168. package/dist/react/input-otp.js.map +1 -1
  169. package/dist/react/input-otp.mjs +1 -1
  170. package/dist/react/input-otp.mjs.map +1 -1
  171. package/dist/react/input.js +1 -1
  172. package/dist/react/input.js.map +1 -1
  173. package/dist/react/input.mjs +1 -1
  174. package/dist/react/input.mjs.map +1 -1
  175. package/dist/react/kbd.js +1 -1
  176. package/dist/react/kbd.js.map +1 -1
  177. package/dist/react/kbd.mjs +1 -1
  178. package/dist/react/kbd.mjs.map +1 -1
  179. package/dist/react/label.js +1 -1
  180. package/dist/react/label.mjs +1 -1
  181. package/dist/react/menubar.js +1 -1
  182. package/dist/react/menubar.js.map +1 -1
  183. package/dist/react/menubar.mjs +1 -1
  184. package/dist/react/menubar.mjs.map +1 -1
  185. package/dist/react/navigation-menu.js +1 -1
  186. package/dist/react/navigation-menu.js.map +1 -1
  187. package/dist/react/navigation-menu.mjs +1 -1
  188. package/dist/react/navigation-menu.mjs.map +1 -1
  189. package/dist/react/pagination.d.mts +1 -1
  190. package/dist/react/pagination.d.ts +1 -1
  191. package/dist/react/pagination.js +1 -1
  192. package/dist/react/pagination.js.map +1 -1
  193. package/dist/react/pagination.mjs +1 -1
  194. package/dist/react/pagination.mjs.map +1 -1
  195. package/dist/react/popover.js +1 -1
  196. package/dist/react/popover.js.map +1 -1
  197. package/dist/react/popover.mjs +1 -1
  198. package/dist/react/popover.mjs.map +1 -1
  199. package/dist/react/pre.js.map +1 -1
  200. package/dist/react/pre.mjs.map +1 -1
  201. package/dist/react/progress.js +1 -1
  202. package/dist/react/progress.js.map +1 -1
  203. package/dist/react/progress.mjs +1 -1
  204. package/dist/react/progress.mjs.map +1 -1
  205. package/dist/react/quote.js.map +1 -1
  206. package/dist/react/quote.mjs.map +1 -1
  207. package/dist/react/radio-cards.js +1 -1
  208. package/dist/react/radio-cards.js.map +1 -1
  209. package/dist/react/radio-cards.mjs +1 -1
  210. package/dist/react/radio-cards.mjs.map +1 -1
  211. package/dist/react/radio-group.js +1 -1
  212. package/dist/react/radio-group.js.map +1 -1
  213. package/dist/react/radio-group.mjs +1 -1
  214. package/dist/react/radio-group.mjs.map +1 -1
  215. package/dist/react/radio.js +1 -1
  216. package/dist/react/radio.js.map +1 -1
  217. package/dist/react/radio.mjs +1 -1
  218. package/dist/react/radio.mjs.map +1 -1
  219. package/dist/react/resizable.js +1 -1
  220. package/dist/react/resizable.js.map +1 -1
  221. package/dist/react/resizable.mjs +1 -1
  222. package/dist/react/resizable.mjs.map +1 -1
  223. package/dist/react/scroll-area.js +1 -1
  224. package/dist/react/scroll-area.js.map +1 -1
  225. package/dist/react/scroll-area.mjs +1 -1
  226. package/dist/react/scroll-area.mjs.map +1 -1
  227. package/dist/react/section.js.map +1 -1
  228. package/dist/react/section.mjs.map +1 -1
  229. package/dist/react/select.js +1 -1
  230. package/dist/react/select.mjs +1 -1
  231. package/dist/react/separator.js +1 -1
  232. package/dist/react/separator.js.map +1 -1
  233. package/dist/react/separator.mjs +1 -1
  234. package/dist/react/separator.mjs.map +1 -1
  235. package/dist/react/sheet.js +1 -1
  236. package/dist/react/sheet.js.map +1 -1
  237. package/dist/react/sheet.mjs +1 -1
  238. package/dist/react/sheet.mjs.map +1 -1
  239. package/dist/react/skeleton.js +1 -1
  240. package/dist/react/skeleton.js.map +1 -1
  241. package/dist/react/skeleton.mjs +1 -1
  242. package/dist/react/skeleton.mjs.map +1 -1
  243. package/dist/react/slider.js +1 -1
  244. package/dist/react/slider.js.map +1 -1
  245. package/dist/react/slider.mjs +1 -1
  246. package/dist/react/slider.mjs.map +1 -1
  247. package/dist/react/sonner.js.map +1 -1
  248. package/dist/react/sonner.mjs.map +1 -1
  249. package/dist/react/spinner.js +1 -1
  250. package/dist/react/spinner.mjs +1 -1
  251. package/dist/react/strong.js.map +1 -1
  252. package/dist/react/strong.mjs.map +1 -1
  253. package/dist/react/switch.js +1 -1
  254. package/dist/react/switch.js.map +1 -1
  255. package/dist/react/switch.mjs +1 -1
  256. package/dist/react/switch.mjs.map +1 -1
  257. package/dist/react/table.js +1 -1
  258. package/dist/react/table.js.map +1 -1
  259. package/dist/react/table.mjs +1 -1
  260. package/dist/react/table.mjs.map +1 -1
  261. package/dist/react/tabs.js +1 -1
  262. package/dist/react/tabs.js.map +1 -1
  263. package/dist/react/tabs.mjs +1 -1
  264. package/dist/react/tabs.mjs.map +1 -1
  265. package/dist/react/text.d.mts +2 -2
  266. package/dist/react/text.d.ts +2 -2
  267. package/dist/react/text.js.map +1 -1
  268. package/dist/react/text.mjs.map +1 -1
  269. package/dist/react/textarea.js +1 -1
  270. package/dist/react/textarea.js.map +1 -1
  271. package/dist/react/textarea.mjs +1 -1
  272. package/dist/react/textarea.mjs.map +1 -1
  273. package/dist/react/toggle-group.js +1 -1
  274. package/dist/react/toggle-group.js.map +1 -1
  275. package/dist/react/toggle-group.mjs +1 -1
  276. package/dist/react/toggle-group.mjs.map +1 -1
  277. package/dist/react/toggle.js +1 -1
  278. package/dist/react/toggle.mjs +1 -1
  279. package/dist/react/tooltip.js +1 -1
  280. package/dist/react/tooltip.js.map +1 -1
  281. package/dist/react/tooltip.mjs +1 -1
  282. package/dist/react/tooltip.mjs.map +1 -1
  283. package/dist/styles.css +1 -1
  284. package/dist/styles.css.map +1 -1
  285. package/dist/tailwind.config.js +1 -1
  286. package/dist/tailwind.config.js.map +1 -1
  287. package/dist/tailwind.config.mjs +1 -1
  288. package/dist/tailwind.config.mjs.map +1 -1
  289. package/package.json +7 -7
  290. package/plugin/animate.plugin.ts +114 -111
  291. package/plugin/base.plugin.ts +10 -7
  292. package/plugin/perspective.plugin.ts +1 -1
  293. package/src/lib/utils.ts +2 -2
  294. package/src/react/accordion.tsx +65 -41
  295. package/src/react/alert-dialog.tsx +130 -62
  296. package/src/react/alert.tsx +50 -24
  297. package/src/react/aspect-ratio.tsx +6 -4
  298. package/src/react/avatar.tsx +47 -19
  299. package/src/react/badge.tsx +15 -10
  300. package/src/react/blockquote.tsx +11 -8
  301. package/src/react/box.tsx +11 -9
  302. package/src/react/breadcrumb.tsx +62 -29
  303. package/src/react/button.tsx +47 -31
  304. package/src/react/calendar.tsx +54 -37
  305. package/src/react/card.tsx +64 -30
  306. package/src/react/carousel.tsx +101 -43
  307. package/src/react/checkbox-cards.tsx +60 -33
  308. package/src/react/checkbox-group.primitive.tsx +93 -38
  309. package/src/react/checkbox-group.tsx +57 -34
  310. package/src/react/checkbox.tsx +24 -20
  311. package/src/react/code.tsx +9 -7
  312. package/src/react/collapsible.tsx +33 -23
  313. package/src/react/command.tsx +140 -75
  314. package/src/react/container.tsx +12 -8
  315. package/src/react/context-menu.tsx +228 -150
  316. package/src/react/data-table.tsx +51 -21
  317. package/src/react/dialog.tsx +95 -50
  318. package/src/react/drawer.tsx +96 -49
  319. package/src/react/dropdown-menu.tsx +199 -131
  320. package/src/react/em.tsx +9 -7
  321. package/src/react/form.tsx +96 -61
  322. package/src/react/heading.tsx +10 -8
  323. package/src/react/hover-card.tsx +42 -26
  324. package/src/react/input-otp.tsx +48 -37
  325. package/src/react/input.tsx +25 -15
  326. package/src/react/kbd.tsx +21 -19
  327. package/src/react/label.tsx +16 -14
  328. package/src/react/menubar.tsx +214 -135
  329. package/src/react/navigation-menu.tsx +153 -111
  330. package/src/react/pagination.tsx +59 -26
  331. package/src/react/popover.tsx +44 -29
  332. package/src/react/pre.tsx +9 -7
  333. package/src/react/progress.tsx +26 -19
  334. package/src/react/quote.tsx +9 -7
  335. package/src/react/radio-cards.tsx +32 -12
  336. package/src/react/radio-group.tsx +32 -12
  337. package/src/react/radio.tsx +24 -20
  338. package/src/react/resizable.tsx +13 -8
  339. package/src/react/scroll-area.tsx +56 -34
  340. package/src/react/section.tsx +9 -7
  341. package/src/react/select.tsx +167 -114
  342. package/src/react/separator.tsx +16 -7
  343. package/src/react/sheet.tsx +84 -34
  344. package/src/react/skeleton.tsx +8 -3
  345. package/src/react/slider.tsx +31 -24
  346. package/src/react/sonner.tsx +12 -10
  347. package/src/react/spinner.tsx +14 -9
  348. package/src/react/strong.tsx +9 -7
  349. package/src/react/switch.tsx +18 -16
  350. package/src/react/table.tsx +97 -52
  351. package/src/react/tabs.tsx +48 -38
  352. package/src/react/text.tsx +13 -10
  353. package/src/react/textarea.tsx +17 -15
  354. package/src/react/toggle-group.tsx +66 -23
  355. package/src/react/toggle.tsx +26 -18
  356. package/src/react/tooltip.tsx +43 -28
  357. package/tailwind.config.ts +62 -62
  358. package/dist/chunk-466PAJCA.mjs.map +0 -1
  359. package/dist/chunk-4TJBMO2Y.mjs.map +0 -1
  360. package/dist/chunk-5WJB3UAO.js.map +0 -1
  361. package/dist/chunk-6B2PU2GG.mjs.map +0 -1
  362. package/dist/chunk-7PJR4WFR.mjs.map +0 -1
  363. package/dist/chunk-AEWLL6A2.js.map +0 -1
  364. package/dist/chunk-EVN2IB57.js.map +0 -1
  365. package/dist/chunk-EYERINEJ.js.map +0 -1
  366. package/dist/chunk-FEE6PNWV.js.map +0 -1
  367. package/dist/chunk-GRQGCS7U.mjs.map +0 -1
  368. package/dist/chunk-HLXU3SQI.mjs.map +0 -1
  369. package/dist/chunk-JIHHUXA5.js.map +0 -1
  370. package/dist/chunk-JTAXNFUM.mjs.map +0 -1
  371. package/dist/chunk-KJ77RPJ4.mjs.map +0 -1
  372. package/dist/chunk-MSHUAEXI.js.map +0 -1
  373. package/dist/chunk-N6QGG4WS.mjs.map +0 -1
  374. package/dist/chunk-PLX35IKX.mjs.map +0 -1
  375. package/dist/chunk-UDNWQQ3I.js.map +0 -1
  376. package/dist/chunk-UPZHCTQV.js.map +0 -1
  377. package/dist/chunk-WLMYX3C7.mjs.map +0 -1
  378. package/dist/chunk-YR36SVVG.mjs.map +0 -1
  379. package/dist/chunk-ZWGC5M4G.js.map +0 -1
  380. package/dist/plugin/animate.plugin.d.mts +0 -9
  381. package/dist/plugin/animate.plugin.d.ts +0 -9
  382. package/dist/plugin/base.plugin.d.mts +0 -8
  383. package/dist/plugin/base.plugin.d.ts +0 -8
  384. package/dist/plugin/perspective.plugin.d.mts +0 -8
  385. package/dist/plugin/perspective.plugin.d.ts +0 -8
  386. package/dist/tailwind.config.d.mts +0 -5
  387. package/dist/tailwind.config.d.ts +0 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/data-table.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as ReactTable from \"@tanstack/react-table\";\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"../lib/utils\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./dropdown-menu\";\nimport { Button } from \"./button\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"./select\";\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"sm\" className=\"ml-auto hidden h-8 lg:flex\">\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== \"undefined\" && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn(\"flex items-center justify-between px-2\", className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.previousPage();\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.nextPage();\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn(\"flex items-center space-x-2\", className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"xs\" className=\"data-[state=open]:bg-accent -ml-3\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | ReactTable.SortDirection }): React.JSX.Element {\n switch (sorted) {\n case \"desc\":\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n case \"asc\":\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"],"mappings":"yRAIA,OACE,iBAAAA,EACA,eAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,oBAAAC,EACA,uBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,uBAAAC,MACK,wBA0BC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAJR,SAASC,EAA4B,CAAE,MAAAC,CAAM,EAAwD,CACnG,OACEF,EAACG,EAAA,CACC,UAAAJ,EAACK,EAAA,CAAoB,QAAO,GAC1B,SAAAJ,EAACK,EAAA,CAAO,QAAQ,UAAU,KAAK,KAAK,UAAU,6BAC5C,UAAAN,EAACO,EAAA,CAAoB,UAAU,cAAc,EAAE,QAEjD,EACF,EACAN,EAACO,EAAA,CAAoB,MAAM,MAAM,UAAU,OACzC,UAAAR,EAACS,EAAA,CAAkB,0BAAc,EACjCT,EAACU,EAAA,EAAsB,EACtBP,EACE,cAAc,EACd,OAAQQ,GAAW,OAAOA,EAAO,WAAe,KAAeA,EAAO,WAAW,CAAC,EAClF,IAAKA,GAEFX,EAACY,EAAA,CAEC,UAAU,aACV,QAASD,EAAO,aAAa,EAC7B,gBAAkBE,GAAU,CAC1BF,EAAO,iBAAiB,EAAQE,CAAM,CACxC,EAEC,SAAAF,EAAO,IAPHA,EAAO,EAQd,CAEH,GACL,GACF,CAEJ,CAUA,SAASG,EAA2B,CAClC,MAAAX,EACA,UAAAY,EACA,GAAGC,CACL,EAAuD,CACrD,OACEf,EAAC,OAAI,UAAWgB,EAAG,yCAA0CF,CAAS,EAAI,GAAGC,EAC3E,UAAAf,EAAC,OAAI,UAAU,uCACZ,UAAAE,EAAM,4BAA4B,EAAE,KAAK,OAAO,OAAKA,EAAM,oBAAoB,EAAE,KAAK,OAAO,qBAChG,EACAF,EAAC,OAAI,UAAU,2CACb,UAAAA,EAAC,OAAI,UAAU,8BACb,UAAAD,EAAC,KAAE,UAAU,sBAAsB,yBAAa,EAChDC,EAACiB,EAAA,CACC,MAAO,OAAOf,EAAM,SAAS,EAAE,WAAW,QAAQ,EAClD,cAAgBU,GAAU,CACxBV,EAAM,YAAY,OAAOU,CAAK,CAAC,CACjC,EAEA,UAAAb,EAACmB,EAAA,CAAc,UAAU,WACvB,SAAAnB,EAACoB,EAAA,CAAY,YAAajB,EAAM,SAAS,EAAE,WAAW,SAAU,EAClE,EACAH,EAACqB,EAAA,CAAc,KAAK,MACjB,UAAC,GAAI,GAAI,GAAI,GAAI,EAAE,EAAE,IAAKC,GACzBtB,EAACuB,EAAA,CAA0B,MAAO,OAAOD,CAAQ,EAC9C,SAAAA,GADcA,CAEjB,CACD,EACH,GACF,GACF,EACArB,EAAC,OAAI,UAAU,4DAA4D,kBACnEE,EAAM,SAAS,EAAE,WAAW,UAAY,EAAE,OAAKA,EAAM,aAAa,GAC1E,EACAF,EAAC,OAAI,UAAU,8BACb,UAAAA,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,UACL,UAAU,kBACV,QAAS,IAAM,CACbH,EAAM,aAAa,CAAC,CACtB,EACA,SAAU,CAACA,EAAM,mBAAmB,EAEpC,UAAAH,EAAC,QAAK,UAAU,UAAU,4BAAgB,EAC1CA,EAACwB,EAAA,CAAoB,UAAU,SAAS,GAC1C,EACAvB,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,UACL,QAAS,IAAM,CACbH,EAAM,aAAa,CACrB,EACA,SAAU,CAACA,EAAM,mBAAmB,EAEpC,UAAAH,EAAC,QAAK,UAAU,UAAU,+BAAmB,EAC7CA,EAACyB,EAAA,CAAgB,UAAU,SAAS,GACtC,EACAxB,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,UACL,QAAS,IAAM,CACbH,EAAM,SAAS,CACjB,EACA,SAAU,CAACA,EAAM,eAAe,EAEhC,UAAAH,EAAC,QAAK,UAAU,UAAU,2BAAe,EACzCA,EAAC0B,EAAA,CAAiB,UAAU,SAAS,GACvC,EACAzB,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,UACL,UAAU,kBACV,QAAS,IAAM,CACbH,EAAM,aAAaA,EAAM,aAAa,EAAI,CAAC,CAC7C,EACA,SAAU,CAACA,EAAM,eAAe,EAEhC,UAAAH,EAAC,QAAK,UAAU,UAAU,2BAAe,EACzCA,EAAC2B,EAAA,CAAqB,UAAU,SAAS,GAC3C,GACF,GACF,GACF,CAEJ,CAWA,SAASC,EAAqC,CAC5C,OAAAjB,EACA,MAAAkB,EACA,UAAAd,CACF,EAAiE,CAC/D,OAAKJ,EAAO,WAAW,EAKrBX,EAAC,OAAI,UAAWiB,EAAG,8BAA+BF,CAAS,EACzD,SAAAd,EAACG,EAAA,CACC,UAAAJ,EAACK,EAAA,CAAoB,QAAO,GAC1B,SAAAJ,EAACK,EAAA,CAAO,QAAQ,QAAQ,KAAK,KAAK,UAAU,oCAC1C,UAAAN,EAAC,QAAM,SAAA6B,EAAM,EACb7B,EAAC8B,EAAA,CAAS,OAAQnB,EAAO,YAAY,EAAG,GAC1C,EACF,EACAV,EAACO,EAAA,CAAoB,MAAM,QACzB,UAAAP,EAAC8B,EAAA,CACC,QAAS,IAAM,CACbpB,EAAO,cAAc,EAAK,CAC5B,EAEA,UAAAX,EAACgC,EAAA,CAAY,UAAU,yCAAyC,EAAE,OAEpE,EACA/B,EAAC8B,EAAA,CACC,QAAS,IAAM,CACbpB,EAAO,cAAc,EAAI,CAC3B,EAEA,UAAAX,EAACiC,EAAA,CAAc,UAAU,yCAAyC,EAAE,QAEtE,EACAjC,EAACU,EAAA,EAAsB,EACvBT,EAAC8B,EAAA,CACC,QAAS,IAAM,CACbpB,EAAO,iBAAiB,EAAK,CAC/B,EAEA,UAAAX,EAACkC,EAAA,CAAY,UAAU,yCAAyC,EAAE,QAEpE,GACF,GACF,EACF,EAxCOlC,EAAC,OAAI,UAAWe,EAAY,SAAAc,EAAM,CA0C7C,CAEA,SAASC,EAAS,CAAE,OAAAK,CAAO,EAAoE,CAC7F,OAAQA,EAAQ,CACd,IAAK,OACH,OAAOnC,EAACiC,EAAA,CAAc,UAAU,cAAc,EAChD,IAAK,MACH,OAAOjC,EAACgC,EAAA,CAAY,UAAU,cAAc,EAC9C,QACE,OAAOhC,EAACoC,EAAA,CAAc,UAAU,cAAc,CAClD,CACF","names":["ArrowDownIcon","ArrowUpIcon","CaretSortIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowLeftIcon","DoubleArrowRightIcon","EyeNoneIcon","MixerHorizontalIcon","jsx","jsxs","DataTableViewOptions","table","DropdownMenu","DropdownMenuTrigger","Button","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"]}
1
+ {"version":3,"sources":["../../src/react/data-table.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type * as ReactTable from '@tanstack/react-table';\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from './dropdown-menu';\nimport { Button } from './button';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from './select';\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({\n table,\n}: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"ml-auto hidden h-8 lg:flex\"\n >\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter(\n (column) =>\n typeof column.accessorFn !== 'undefined' && column.getCanHide(),\n )\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData>\n extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div\n className={cn('flex items-center justify-between px-2', className)}\n {...props}\n >\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of{' '}\n {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of{' '}\n {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.previousPage();\n }}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n onClick={() => {\n table.nextPage();\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-xs\"\n className=\"hidden lg:flex\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue>\n extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"xs\"\n className=\"data-[state=open]:bg-accent -ml-3\"\n >\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({\n sorted,\n}: {\n sorted: false | ReactTable.SortDirection;\n}): React.JSX.Element {\n switch (sorted) {\n case 'desc':\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n case 'asc':\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"],"mappings":"yRAIA,OACE,iBAAAA,EACA,eAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,oBAAAC,EACA,uBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,uBAAAC,MACK,wBAkCC,OAKE,OAAAC,EALF,QAAAC,MAAA,oBANR,SAASC,EAA4B,CACnC,MAAAC,CACF,EAAwD,CACtD,OACEF,EAACG,EAAA,CACC,UAAAJ,EAACK,EAAA,CAAoB,QAAO,GAC1B,SAAAJ,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,KACL,UAAU,6BAEV,UAAAN,EAACO,EAAA,CAAoB,UAAU,cAAc,EAAE,QAEjD,EACF,EACAN,EAACO,EAAA,CAAoB,MAAM,MAAM,UAAU,OACzC,UAAAR,EAACS,EAAA,CAAkB,0BAAc,EACjCT,EAACU,EAAA,EAAsB,EACtBP,EACE,cAAc,EACd,OACEQ,GACC,OAAOA,EAAO,WAAe,KAAeA,EAAO,WAAW,CAClE,EACC,IAAKA,GAEFX,EAACY,EAAA,CAEC,UAAU,aACV,QAASD,EAAO,aAAa,EAC7B,gBAAkBE,GAAU,CAC1BF,EAAO,iBAAiB,EAAQE,CAAM,CACxC,EAEC,SAAAF,EAAO,IAPHA,EAAO,EAQd,CAEH,GACL,GACF,CAEJ,CAWA,SAASG,EAA2B,CAClC,MAAAX,EACA,UAAAY,EACA,GAAGC,CACL,EAAuD,CACrD,OACEf,EAAC,OACC,UAAWgB,EAAG,yCAA0CF,CAAS,EAChE,GAAGC,EAEJ,UAAAf,EAAC,OAAI,UAAU,uCACZ,UAAAE,EAAM,4BAA4B,EAAE,KAAK,OAAO,MAAI,IACpDA,EAAM,oBAAoB,EAAE,KAAK,OAAO,qBAC3C,EACAF,EAAC,OAAI,UAAU,2CACb,UAAAA,EAAC,OAAI,UAAU,8BACb,UAAAD,EAAC,KAAE,UAAU,sBAAsB,yBAAa,EAChDC,EAACiB,EAAA,CACC,MAAO,OAAOf,EAAM,SAAS,EAAE,WAAW,QAAQ,EAClD,cAAgBU,GAAU,CACxBV,EAAM,YAAY,OAAOU,CAAK,CAAC,CACjC,EAEA,UAAAb,EAACmB,EAAA,CAAc,UAAU,WACvB,SAAAnB,EAACoB,EAAA,CAAY,YAAajB,EAAM,SAAS,EAAE,WAAW,SAAU,EAClE,EACAH,EAACqB,EAAA,CAAc,KAAK,MACjB,UAAC,GAAI,GAAI,GAAI,GAAI,EAAE,EAAE,IAAKC,GACzBtB,EAACuB,EAAA,CAA0B,MAAO,OAAOD,CAAQ,EAC9C,SAAAA,GADcA,CAEjB,CACD,EACH,GACF,GACF,EACArB,EAAC,OAAI,UAAU,4DAA4D,kBACnEE,EAAM,SAAS,EAAE,WAAW,UAAY,EAAE,MAAI,IACnDA,EAAM,aAAa,GACtB,EACAF,EAAC,OAAI,UAAU,8BACb,UAAAA,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,UACL,UAAU,kBACV,QAAS,IAAM,CACbH,EAAM,aAAa,CAAC,CACtB,EACA,SAAU,CAACA,EAAM,mBAAmB,EAEpC,UAAAH,EAAC,QAAK,UAAU,UAAU,4BAAgB,EAC1CA,EAACwB,EAAA,CAAoB,UAAU,SAAS,GAC1C,EACAvB,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,UACL,QAAS,IAAM,CACbH,EAAM,aAAa,CACrB,EACA,SAAU,CAACA,EAAM,mBAAmB,EAEpC,UAAAH,EAAC,QAAK,UAAU,UAAU,+BAAmB,EAC7CA,EAACyB,EAAA,CAAgB,UAAU,SAAS,GACtC,EACAxB,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,UACL,QAAS,IAAM,CACbH,EAAM,SAAS,CACjB,EACA,SAAU,CAACA,EAAM,eAAe,EAEhC,UAAAH,EAAC,QAAK,UAAU,UAAU,2BAAe,EACzCA,EAAC0B,EAAA,CAAiB,UAAU,SAAS,GACvC,EACAzB,EAACK,EAAA,CACC,QAAQ,UACR,KAAK,UACL,UAAU,kBACV,QAAS,IAAM,CACbH,EAAM,aAAaA,EAAM,aAAa,EAAI,CAAC,CAC7C,EACA,SAAU,CAACA,EAAM,eAAe,EAEhC,UAAAH,EAAC,QAAK,UAAU,UAAU,2BAAe,EACzCA,EAAC2B,EAAA,CAAqB,UAAU,SAAS,GAC3C,GACF,GACF,GACF,CAEJ,CAYA,SAASC,EAAqC,CAC5C,OAAAjB,EACA,MAAAkB,EACA,UAAAd,CACF,EAAiE,CAC/D,OAAKJ,EAAO,WAAW,EAKrBX,EAAC,OAAI,UAAWiB,EAAG,8BAA+BF,CAAS,EACzD,SAAAd,EAACG,EAAA,CACC,UAAAJ,EAACK,EAAA,CAAoB,QAAO,GAC1B,SAAAJ,EAACK,EAAA,CACC,QAAQ,QACR,KAAK,KACL,UAAU,oCAEV,UAAAN,EAAC,QAAM,SAAA6B,EAAM,EACb7B,EAAC8B,EAAA,CAAS,OAAQnB,EAAO,YAAY,EAAG,GAC1C,EACF,EACAV,EAACO,EAAA,CAAoB,MAAM,QACzB,UAAAP,EAAC8B,EAAA,CACC,QAAS,IAAM,CACbpB,EAAO,cAAc,EAAK,CAC5B,EAEA,UAAAX,EAACgC,EAAA,CAAY,UAAU,yCAAyC,EAAE,OAEpE,EACA/B,EAAC8B,EAAA,CACC,QAAS,IAAM,CACbpB,EAAO,cAAc,EAAI,CAC3B,EAEA,UAAAX,EAACiC,EAAA,CAAc,UAAU,yCAAyC,EAAE,QAEtE,EACAjC,EAACU,EAAA,EAAsB,EACvBT,EAAC8B,EAAA,CACC,QAAS,IAAM,CACbpB,EAAO,iBAAiB,EAAK,CAC/B,EAEA,UAAAX,EAACkC,EAAA,CAAY,UAAU,yCAAyC,EAAE,QAEpE,GACF,GACF,EACF,EA5COlC,EAAC,OAAI,UAAWe,EAAY,SAAAc,EAAM,CA8C7C,CAEA,SAASC,EAAS,CAChB,OAAAK,CACF,EAEsB,CACpB,OAAQA,EAAQ,CACd,IAAK,OACH,OAAOnC,EAACiC,EAAA,CAAc,UAAU,cAAc,EAChD,IAAK,MACH,OAAOjC,EAACgC,EAAA,CAAY,UAAU,cAAc,EAC9C,QACE,OAAOhC,EAACoC,EAAA,CAAc,UAAU,cAAc,CAClD,CACF","names":["ArrowDownIcon","ArrowUpIcon","CaretSortIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowLeftIcon","DoubleArrowRightIcon","EyeNoneIcon","MixerHorizontalIcon","jsx","jsxs","DataTableViewOptions","table","DropdownMenu","DropdownMenuTrigger","Button","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkJIHHUXA5js = require('../chunk-JIHHUXA5.js');require('../chunk-UJJZZCAC.js');exports.Dialog = _chunkJIHHUXA5js.a; exports.DialogClose = _chunkJIHHUXA5js.c; exports.DialogContent = _chunkJIHHUXA5js.d; exports.DialogDescription = _chunkJIHHUXA5js.h; exports.DialogFooter = _chunkJIHHUXA5js.f; exports.DialogHeader = _chunkJIHHUXA5js.e; exports.DialogTitle = _chunkJIHHUXA5js.g; exports.DialogTrigger = _chunkJIHHUXA5js.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkVXPAGNPJjs = require('../chunk-VXPAGNPJ.js');require('../chunk-HQ4AUOQM.js');exports.Dialog = _chunkVXPAGNPJjs.a; exports.DialogClose = _chunkVXPAGNPJjs.c; exports.DialogContent = _chunkVXPAGNPJjs.d; exports.DialogDescription = _chunkVXPAGNPJjs.h; exports.DialogFooter = _chunkVXPAGNPJjs.f; exports.DialogHeader = _chunkVXPAGNPJjs.e; exports.DialogTitle = _chunkVXPAGNPJjs.g; exports.DialogTrigger = _chunkVXPAGNPJjs.b;
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1,2 +1,2 @@
1
- "use client";import{a,b,c,d,e,f,g,h}from"../chunk-GRQGCS7U.mjs";import"../chunk-466PAJCA.mjs";export{a as Dialog,c as DialogClose,d as DialogContent,h as DialogDescription,f as DialogFooter,e as DialogHeader,g as DialogTitle,b as DialogTrigger};
1
+ "use client";import{a,b,c,d,e,f,g,h}from"../chunk-PWF46YXQ.mjs";import"../chunk-LEUB3C3L.mjs";export{a as Dialog,c as DialogClose,d as DialogContent,h as DialogDescription,f as DialogFooter,e as DialogHeader,g as DialogTitle,b as DialogTrigger};
2
2
  //# sourceMappingURL=dialog.mjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkUJJZZCACjs = require('../chunk-UJJZZCAC.js');var _react = require('react'); var n = _interopRequireWildcard(_react);var _vaul = require('vaul');var _jsxruntime = require('react/jsx-runtime');function f({shouldScaleBackground:e=!0,...r}){return _jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{shouldScaleBackground:e,...r})}var P=_vaul.Drawer.Trigger,y= exports.DrawerClose =_vaul.Drawer.Close,D= exports.DrawerContent =n.forwardRef(({children:e,className:r,...i},s)=>_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{ref:s,className:_chunkUJJZZCACjs.b.call(void 0, "bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",r),...i,children:[_jsxruntime.jsx.call(void 0, "div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),e]})]}));D.displayName="DrawerContent";function d({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkUJJZZCACjs.b.call(void 0, "grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function R({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkUJJZZCACjs.b.call(void 0, "mt-auto flex flex-col gap-2 p-4",e),...r})}var l=n.forwardRef(({className:e,...r},i)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Title,{ref:i,className:_chunkUJJZZCACjs.b.call(void 0, "text-lg font-semibold leading-none tracking-tight",e),...r}));l.displayName=_vaul.Drawer.Title.displayName;var m=n.forwardRef(({className:e,...r},i)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Description,{ref:i,className:_chunkUJJZZCACjs.b.call(void 0, "text-muted-foreground text-sm",e),...r}));m.displayName=_vaul.Drawer.Description.displayName;exports.Drawer = f; exports.DrawerClose = y; exports.DrawerContent = D; exports.DrawerDescription = m; exports.DrawerFooter = R; exports.DrawerHeader = d; exports.DrawerTitle = l; exports.DrawerTrigger = P;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var n = _interopRequireWildcard(_react);var _vaul = require('vaul');var _jsxruntime = require('react/jsx-runtime');function f({shouldScaleBackground:e=!0,...r}){return _jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{shouldScaleBackground:e,...r})}var P=_vaul.Drawer.Trigger,y= exports.DrawerClose =_vaul.Drawer.Close,D= exports.DrawerContent =n.forwardRef(({children:e,className:r,...i},s)=>_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{ref:s,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",r),...i,children:[_jsxruntime.jsx.call(void 0, "div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),e]})]}));D.displayName="DrawerContent";function d({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function R({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "mt-auto flex flex-col gap-2 p-4",e),...r})}var l=n.forwardRef(({className:e,...r},i)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Title,{ref:i,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-lg font-semibold leading-none tracking-tight",e),...r}));l.displayName=_vaul.Drawer.Title.displayName;var m=n.forwardRef(({className:e,...r},i)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Description,{ref:i,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-muted-foreground text-sm",e),...r}));m.displayName=_vaul.Drawer.Description.displayName;exports.Drawer = f; exports.DrawerClose = y; exports.DrawerContent = D; exports.DrawerDescription = m; exports.DrawerFooter = R; exports.DrawerHeader = d; exports.DrawerTitle = l; exports.DrawerTrigger = P;
2
2
  //# sourceMappingURL=drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/drawer.tsx"],"names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerTrigger","DrawerClose","DrawerContent","children","className","ref","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAUjC,cAAAC,EA4BH,QAAAC,MA5BG,oBADT,SAASC,EAAO,CAAE,sBAAAC,EAAwB,GAAM,GAAGC,CAAM,EAAmC,CAC1F,OAAOJ,EAACD,EAAgB,KAAhB,CAAqB,sBAAuBI,EAAwB,GAAGC,EAAO,CACxF,CAOA,IAAMC,EAAgBN,EAAgB,QAOhCO,EAAcP,EAAgB,MAS9BQ,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGL,CAAM,EAAGM,IAClCT,EAACF,EAAgB,OAAhB,CACC,UAAAC,EAACD,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEE,EAACF,EAAgB,QAAhB,CACC,IAAKW,EACL,UAAWC,EACT,6FACAF,CACF,EACC,GAAGL,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DQ,GACH,GACF,CAEJ,EAEAD,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CAAE,UAAAH,EAAW,GAAGL,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWW,EAAG,4CAA6CF,CAAS,EAAI,GAAGL,EAAO,CAChG,CAQA,SAASS,EAAa,CAAE,UAAAJ,EAAW,GAAGL,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWW,EAAG,kCAAmCF,CAAS,EAAI,GAAGL,EAAO,CACtF,CASA,IAAMU,EAAoB,aAAiD,CAAC,CAAE,UAAAL,EAAW,GAAGL,CAAM,EAAGM,IACnGV,EAACD,EAAgB,MAAhB,CACC,IAAKW,EACL,UAAWC,EAAG,oDAAqDF,CAAS,EAC3E,GAAGL,EACN,CACD,EAEDU,EAAY,YAAcf,EAAgB,MAAM,YAShD,IAAMgB,EAA0B,aAC9B,CAAC,CAAE,UAAAN,EAAW,GAAGL,CAAM,EAAGM,IACxBV,EAACD,EAAgB,YAAhB,CAA4B,IAAKW,EAAK,UAAWC,EAAG,gCAAiCF,CAAS,EAAI,GAAGL,EAAO,CAEjH,EAEAW,EAAkB,YAAchB,EAAgB,YAAY","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"../lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ children, className, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/drawer.tsx"],"names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerTrigger","DrawerClose","DrawerContent","children","className","ref","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OActC,cAAAC,EAwCA,QAAAC,MAxCA,oBALJ,SAASC,EAAO,CACd,sBAAAC,EAAwB,GACxB,GAAGC,CACL,EAAmC,CACjC,OACEJ,EAACD,EAAgB,KAAhB,CACC,sBAAuBI,EACtB,GAAGC,EACN,CAEJ,CASA,IAAMC,EAAgBN,EAAgB,QAShCO,EAAcP,EAAgB,MAW9BQ,EAAsB,aAG1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGL,CAAM,EAAGM,IACpCT,EAACF,EAAgB,OAAhB,CACC,UAAAC,EAACD,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEE,EAACF,EAAgB,QAAhB,CACC,IAAKW,EACL,UAAWC,EACT,6FACAF,CACF,EACC,GAAGL,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DQ,GACH,GACF,CACD,EAEDD,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CACpB,UAAAH,EACA,GAAGL,CACL,EAAyC,CACvC,OACEJ,EAAC,OACC,UAAWW,EAAG,4CAA6CF,CAAS,EACnE,GAAGL,EACN,CAEJ,CAQA,SAASS,EAAa,CACpB,UAAAJ,EACA,GAAGL,CACL,EAAyC,CACvC,OACEJ,EAAC,OACC,UAAWW,EAAG,kCAAmCF,CAAS,EACzD,GAAGL,EACN,CAEJ,CAWA,IAAMU,EAAoB,aACxB,CAAC,CAAE,UAAAL,EAAW,GAAGL,CAAM,EAAGM,IACxBV,EAACD,EAAgB,MAAhB,CACC,IAAKW,EACL,UAAWC,EACT,oDACAF,CACF,EACC,GAAGL,EACN,CAEJ,EAEAU,EAAY,YAAcf,EAAgB,MAAM,YAahD,IAAMgB,EAA0B,aAG9B,CAAC,CAAE,UAAAN,EAAW,GAAGL,CAAM,EAAGM,IAC1BV,EAACD,EAAgB,YAAhB,CACC,IAAKW,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGL,EACN,CACD,EAEDW,EAAkB,YAAchB,EAAgB,YAAY","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: DrawerProps): React.JSX.Element {\n return (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Trigger\n>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Close\n>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Content\n>;\n\nconst DrawerContent = React.forwardRef<\n DrawerContentElement,\n DrawerContentProps\n>(({ children, className, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n));\n\nDrawerContent.displayName = 'DrawerContent';\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({\n className,\n ...props\n}: DrawerHeaderProps): React.JSX.Element {\n return (\n <div\n className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({\n className,\n ...props\n}: DrawerFooterProps): React.JSX.Element {\n return (\n <div\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Title\n>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n 'text-lg font-semibold leading-none tracking-tight',\n className,\n )}\n {...props}\n />\n ),\n);\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<\n typeof DrawerPrimitive.Description\n>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Description\n>;\n\nconst DrawerDescription = React.forwardRef<\n DrawerDescriptionElement,\n DrawerDescriptionProps\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n));\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{b as a}from"../chunk-466PAJCA.mjs";import*as n from"react";import{Drawer as t}from"vaul";import{jsx as o,jsxs as p}from"react/jsx-runtime";function f({shouldScaleBackground:e=!0,...r}){return o(t.Root,{shouldScaleBackground:e,...r})}var P=t.Trigger,y=t.Close,D=n.forwardRef(({children:e,className:r,...i},s)=>p(t.Portal,{children:[o(t.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),p(t.Content,{ref:s,className:a("bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",r),...i,children:[o("div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),e]})]}));D.displayName="DrawerContent";function d({className:e,...r}){return o("div",{className:a("grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function R({className:e,...r}){return o("div",{className:a("mt-auto flex flex-col gap-2 p-4",e),...r})}var l=n.forwardRef(({className:e,...r},i)=>o(t.Title,{ref:i,className:a("text-lg font-semibold leading-none tracking-tight",e),...r}));l.displayName=t.Title.displayName;var m=n.forwardRef(({className:e,...r},i)=>o(t.Description,{ref:i,className:a("text-muted-foreground text-sm",e),...r}));m.displayName=t.Description.displayName;export{f as Drawer,y as DrawerClose,D as DrawerContent,m as DrawerDescription,R as DrawerFooter,d as DrawerHeader,l as DrawerTitle,P as DrawerTrigger};
1
+ "use client";import{b as a}from"../chunk-LEUB3C3L.mjs";import*as n from"react";import{Drawer as t}from"vaul";import{jsx as o,jsxs as p}from"react/jsx-runtime";function f({shouldScaleBackground:e=!0,...r}){return o(t.Root,{shouldScaleBackground:e,...r})}var P=t.Trigger,y=t.Close,D=n.forwardRef(({children:e,className:r,...i},s)=>p(t.Portal,{children:[o(t.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),p(t.Content,{ref:s,className:a("bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",r),...i,children:[o("div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),e]})]}));D.displayName="DrawerContent";function d({className:e,...r}){return o("div",{className:a("grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function R({className:e,...r}){return o("div",{className:a("mt-auto flex flex-col gap-2 p-4",e),...r})}var l=n.forwardRef(({className:e,...r},i)=>o(t.Title,{ref:i,className:a("text-lg font-semibold leading-none tracking-tight",e),...r}));l.displayName=t.Title.displayName;var m=n.forwardRef(({className:e,...r},i)=>o(t.Description,{ref:i,className:a("text-muted-foreground text-sm",e),...r}));m.displayName=t.Description.displayName;export{f as Drawer,y as DrawerClose,D as DrawerContent,m as DrawerDescription,R as DrawerFooter,d as DrawerHeader,l as DrawerTitle,P as DrawerTrigger};
2
2
  //# sourceMappingURL=drawer.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"../lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ children, className, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAUjC,cAAAC,EA4BH,QAAAC,MA5BG,oBADT,SAASC,EAAO,CAAE,sBAAAC,EAAwB,GAAM,GAAGC,CAAM,EAAmC,CAC1F,OAAOJ,EAACK,EAAgB,KAAhB,CAAqB,sBAAuBF,EAAwB,GAAGC,EAAO,CACxF,CAOA,IAAME,EAAgBD,EAAgB,QAOhCE,EAAcF,EAAgB,MAS9BG,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGN,CAAM,EAAGO,IAClCV,EAACI,EAAgB,OAAhB,CACC,UAAAL,EAACK,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEJ,EAACI,EAAgB,QAAhB,CACC,IAAKM,EACL,UAAWC,EACT,6FACAF,CACF,EACC,GAAGN,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DS,GACH,GACF,CAEJ,EAEAD,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CAAE,UAAAH,EAAW,GAAGN,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWY,EAAG,4CAA6CF,CAAS,EAAI,GAAGN,EAAO,CAChG,CAQA,SAASU,EAAa,CAAE,UAAAJ,EAAW,GAAGN,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWY,EAAG,kCAAmCF,CAAS,EAAI,GAAGN,EAAO,CACtF,CASA,IAAMW,EAAoB,aAAiD,CAAC,CAAE,UAAAL,EAAW,GAAGN,CAAM,EAAGO,IACnGX,EAACK,EAAgB,MAAhB,CACC,IAAKM,EACL,UAAWC,EAAG,oDAAqDF,CAAS,EAC3E,GAAGN,EACN,CACD,EAEDW,EAAY,YAAcV,EAAgB,MAAM,YAShD,IAAMW,EAA0B,aAC9B,CAAC,CAAE,UAAAN,EAAW,GAAGN,CAAM,EAAGO,IACxBX,EAACK,EAAgB,YAAhB,CAA4B,IAAKM,EAAK,UAAWC,EAAG,gCAAiCF,CAAS,EAAI,GAAGN,EAAO,CAEjH,EAEAY,EAAkB,YAAcX,EAAgB,YAAY","names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerClose","DrawerContent","children","className","ref","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"]}
1
+ {"version":3,"sources":["../../src/react/drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: DrawerProps): React.JSX.Element {\n return (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Trigger\n>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Close\n>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Content\n>;\n\nconst DrawerContent = React.forwardRef<\n DrawerContentElement,\n DrawerContentProps\n>(({ children, className, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n));\n\nDrawerContent.displayName = 'DrawerContent';\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({\n className,\n ...props\n}: DrawerHeaderProps): React.JSX.Element {\n return (\n <div\n className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({\n className,\n ...props\n}: DrawerFooterProps): React.JSX.Element {\n return (\n <div\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Title\n>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n 'text-lg font-semibold leading-none tracking-tight',\n className,\n )}\n {...props}\n />\n ),\n);\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<\n typeof DrawerPrimitive.Description\n>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<\n typeof DrawerPrimitive.Description\n>;\n\nconst DrawerDescription = React.forwardRef<\n DrawerDescriptionElement,\n DrawerDescriptionProps\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n));\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OActC,cAAAC,EAwCA,QAAAC,MAxCA,oBALJ,SAASC,EAAO,CACd,sBAAAC,EAAwB,GACxB,GAAGC,CACL,EAAmC,CACjC,OACEJ,EAACK,EAAgB,KAAhB,CACC,sBAAuBF,EACtB,GAAGC,EACN,CAEJ,CASA,IAAME,EAAgBD,EAAgB,QAShCE,EAAcF,EAAgB,MAW9BG,EAAsB,aAG1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGN,CAAM,EAAGO,IACpCV,EAACI,EAAgB,OAAhB,CACC,UAAAL,EAACK,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEJ,EAACI,EAAgB,QAAhB,CACC,IAAKM,EACL,UAAWC,EACT,6FACAF,CACF,EACC,GAAGN,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DS,GACH,GACF,CACD,EAEDD,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CACpB,UAAAH,EACA,GAAGN,CACL,EAAyC,CACvC,OACEJ,EAAC,OACC,UAAWY,EAAG,4CAA6CF,CAAS,EACnE,GAAGN,EACN,CAEJ,CAQA,SAASU,EAAa,CACpB,UAAAJ,EACA,GAAGN,CACL,EAAyC,CACvC,OACEJ,EAAC,OACC,UAAWY,EAAG,kCAAmCF,CAAS,EACzD,GAAGN,EACN,CAEJ,CAWA,IAAMW,EAAoB,aACxB,CAAC,CAAE,UAAAL,EAAW,GAAGN,CAAM,EAAGO,IACxBX,EAACK,EAAgB,MAAhB,CACC,IAAKM,EACL,UAAWC,EACT,oDACAF,CACF,EACC,GAAGN,EACN,CAEJ,EAEAW,EAAY,YAAcV,EAAgB,MAAM,YAahD,IAAMW,EAA0B,aAG9B,CAAC,CAAE,UAAAN,EAAW,GAAGN,CAAM,EAAGO,IAC1BX,EAACK,EAAgB,YAAhB,CACC,IAAKM,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGN,EACN,CACD,EAEDY,EAAkB,YAAcX,EAAgB,YAAY","names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerClose","DrawerContent","children","className","ref","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkUDNWQQ3Ijs = require('../chunk-UDNWQQ3I.js');require('../chunk-UJJZZCAC.js');exports.DropdownMenu = _chunkUDNWQQ3Ijs.a; exports.DropdownMenuCheckboxItem = _chunkUDNWQQ3Ijs.j; exports.DropdownMenuContent = _chunkUDNWQQ3Ijs.h; exports.DropdownMenuGroup = _chunkUDNWQQ3Ijs.c; exports.DropdownMenuItem = _chunkUDNWQQ3Ijs.i; exports.DropdownMenuLabel = _chunkUDNWQQ3Ijs.l; exports.DropdownMenuRadioGroup = _chunkUDNWQQ3Ijs.e; exports.DropdownMenuRadioItem = _chunkUDNWQQ3Ijs.k; exports.DropdownMenuSeparator = _chunkUDNWQQ3Ijs.m; exports.DropdownMenuShortcut = _chunkUDNWQQ3Ijs.n; exports.DropdownMenuSub = _chunkUDNWQQ3Ijs.d; exports.DropdownMenuSubContent = _chunkUDNWQQ3Ijs.g; exports.DropdownMenuSubTrigger = _chunkUDNWQQ3Ijs.f; exports.DropdownMenuTrigger = _chunkUDNWQQ3Ijs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkNSK74YTMjs = require('../chunk-NSK74YTM.js');require('../chunk-HQ4AUOQM.js');exports.DropdownMenu = _chunkNSK74YTMjs.a; exports.DropdownMenuCheckboxItem = _chunkNSK74YTMjs.j; exports.DropdownMenuContent = _chunkNSK74YTMjs.h; exports.DropdownMenuGroup = _chunkNSK74YTMjs.c; exports.DropdownMenuItem = _chunkNSK74YTMjs.i; exports.DropdownMenuLabel = _chunkNSK74YTMjs.l; exports.DropdownMenuRadioGroup = _chunkNSK74YTMjs.e; exports.DropdownMenuRadioItem = _chunkNSK74YTMjs.k; exports.DropdownMenuSeparator = _chunkNSK74YTMjs.m; exports.DropdownMenuShortcut = _chunkNSK74YTMjs.n; exports.DropdownMenuSub = _chunkNSK74YTMjs.d; exports.DropdownMenuSubContent = _chunkNSK74YTMjs.g; exports.DropdownMenuSubTrigger = _chunkNSK74YTMjs.f; exports.DropdownMenuTrigger = _chunkNSK74YTMjs.b;
2
2
  //# sourceMappingURL=dropdown-menu.js.map
@@ -1,2 +1,2 @@
1
- "use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-JTAXNFUM.mjs";import"../chunk-466PAJCA.mjs";export{a as DropdownMenu,j as DropdownMenuCheckboxItem,h as DropdownMenuContent,c as DropdownMenuGroup,i as DropdownMenuItem,l as DropdownMenuLabel,e as DropdownMenuRadioGroup,k as DropdownMenuRadioItem,m as DropdownMenuSeparator,n as DropdownMenuShortcut,d as DropdownMenuSub,g as DropdownMenuSubContent,f as DropdownMenuSubTrigger,b as DropdownMenuTrigger};
1
+ "use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-HX5YKP4E.mjs";import"../chunk-LEUB3C3L.mjs";export{a as DropdownMenu,j as DropdownMenuCheckboxItem,h as DropdownMenuContent,c as DropdownMenuGroup,i as DropdownMenuItem,l as DropdownMenuLabel,e as DropdownMenuRadioGroup,k as DropdownMenuRadioItem,m as DropdownMenuSeparator,n as DropdownMenuShortcut,d as DropdownMenuSub,g as DropdownMenuSubContent,f as DropdownMenuSubTrigger,b as DropdownMenuTrigger};
2
2
  //# sourceMappingURL=dropdown-menu.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/em.tsx"],"names":["React","Slot","jsx","Em","asChild","props","ref"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAeZ,cAAAC,MAAA,oBAHT,IAAMC,EAAW,aAA+B,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/DJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAM,GAAGD,EAAO,CACxC,EAEDF,EAAG,YAAc","sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, ref) => {\n const Component = asChild ? Slot : \"em\";\n\n return <Component ref={ref} {...props} />;\n});\n\nEm.displayName = \"Em\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"]}
1
+ {"version":3,"sources":["../../src/react/em.tsx"],"names":["React","Slot","jsx","Em","asChild","props","ref"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAgBV,cAAAC,MAAA,oBAJX,IAAMC,EAAW,aACf,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAGfJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAM,GAAGD,EAAO,CAE3C,EAEAF,EAAG,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(\n ({ asChild, ...props }, ref) => {\n const Component = asChild ? Slot : 'em';\n\n return <Component ref={ref} {...props} />;\n },\n);\n\nEm.displayName = 'Em';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/em.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, ref) => {\n const Component = asChild ? Slot : \"em\";\n\n return <Component ref={ref} {...props} />;\n});\n\nEm.displayName = \"Em\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAeZ,cAAAC,MAAA,oBAHT,IAAMC,EAAW,aAA+B,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/DJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAM,GAAGD,EAAO,CACxC,EAEDF,EAAG,YAAc","names":["React","Slot","jsx","Em","asChild","props","ref"]}
1
+ {"version":3,"sources":["../../src/react/em.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(\n ({ asChild, ...props }, ref) => {\n const Component = asChild ? Slot : 'em';\n\n return <Component ref={ref} {...props} />;\n },\n);\n\nEm.displayName = 'Em';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAgBV,cAAAC,MAAA,oBAJX,IAAMC,EAAW,aACf,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAGfJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAM,GAAGD,EAAO,CAE3C,EAEAF,EAAG,YAAc","names":["React","Slot","jsx","Em","asChild","props","ref"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkFEE6PNWVjs = require('../chunk-FEE6PNWV.js');var _chunkUJJZZCACjs = require('../chunk-UJJZZCAC.js');var _react = require('react'); var t = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reacthookform = require('react-hook-form');var _jsxruntime = require('react/jsx-runtime');var p=t.createContext(null),c=t.createContext(null),n= exports.useFormField =()=>{let e=t.useContext(p),o=t.useContext(c),{getFieldState:r,formState:m}=_reacthookform.useFormContext.call(void 0, );if(!e||!o)throw new Error("useFormField should be used within <FormField>");let s=r(e.name,m),{id:a}=o;return{id:a,name:e.name,formItemId:`form-item-${a}`,formDescriptionId:`form-item-description-${a}`,formMessageId:`form-item-message-${a}`,...s}},M= exports.Form =_reacthookform.FormProvider;function h({...e}){return _jsxruntime.jsx.call(void 0, p.Provider,{value:{name:e.name},children:_jsxruntime.jsx.call(void 0, _reacthookform.Controller,{...e})})}var R=t.forwardRef(({className:e,...o},r)=>{let m=t.useId();return _jsxruntime.jsx.call(void 0, c.Provider,{value:{id:m},children:_jsxruntime.jsx.call(void 0, "div",{ref:r,className:_chunkUJJZZCACjs.b.call(void 0, "space-y-2",e),...o})})});R.displayName="FormItem";var x=t.forwardRef(({className:e,...o},r)=>{let{error:m,formItemId:s}=n();return _jsxruntime.jsx.call(void 0, _chunkFEE6PNWVjs.a,{ref:r,className:_chunkUJJZZCACjs.b.call(void 0, m&&"text-destructive",e),htmlFor:s,...o})});x.displayName="FormLabel";var C=t.forwardRef(({...e},o)=>{let{error:r,formItemId:m,formDescriptionId:s,formMessageId:a}=n();return _jsxruntime.jsx.call(void 0, _reactslot.Slot,{ref:o,id:m,"aria-describedby":r?`${s} ${a}`:s,"aria-invalid":!!r,...e})});C.displayName="FormControl";var I=t.forwardRef(({className:e,...o},r)=>{let{formDescriptionId:m}=n();return _jsxruntime.jsx.call(void 0, "p",{ref:r,id:m,className:_chunkUJJZZCACjs.b.call(void 0, "text-muted-foreground text-xs",e),...o})});I.displayName="FormDescription";var g=t.forwardRef(({children:e,className:o,...r},m)=>{let{error:s,formMessageId:a}=n(),d=_optionalChain([s, 'optionalAccess', _ => _.message])?s.message:e;return d?_jsxruntime.jsx.call(void 0, "p",{ref:m,id:a,className:_chunkUJJZZCACjs.b.call(void 0, "text-destructive text-xs font-medium",o),...r,children:d}):null});g.displayName="FormMessage";exports.Form = M; exports.FormControl = C; exports.FormDescription = I; exports.FormField = h; exports.FormItem = R; exports.FormLabel = x; exports.FormMessage = g; exports.useFormField = n;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkXM4Y2S5Ejs = require('../chunk-XM4Y2S5E.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var t = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reacthookform = require('react-hook-form');var _jsxruntime = require('react/jsx-runtime');var p=t.createContext(null),c=t.createContext(null),n= exports.useFormField =()=>{let e=t.useContext(p),o=t.useContext(c),{getFieldState:r,formState:m}=_reacthookform.useFormContext.call(void 0, );if(!e||!o)throw new Error("useFormField should be used within <FormField>");let s=r(e.name,m),{id:a}=o;return{id:a,name:e.name,formItemId:`form-item-${a}`,formDescriptionId:`form-item-description-${a}`,formMessageId:`form-item-message-${a}`,...s}},M= exports.Form =_reacthookform.FormProvider;function h({...e}){return _jsxruntime.jsx.call(void 0, p.Provider,{value:{name:e.name},children:_jsxruntime.jsx.call(void 0, _reacthookform.Controller,{...e})})}var R=t.forwardRef(({className:e,...o},r)=>{let m=t.useId();return _jsxruntime.jsx.call(void 0, c.Provider,{value:{id:m},children:_jsxruntime.jsx.call(void 0, "div",{ref:r,className:_chunkHQ4AUOQMjs.b.call(void 0, "space-y-2",e),...o})})});R.displayName="FormItem";var x=t.forwardRef(({className:e,...o},r)=>{let{error:m,formItemId:s}=n();return _jsxruntime.jsx.call(void 0, _chunkXM4Y2S5Ejs.a,{ref:r,className:_chunkHQ4AUOQMjs.b.call(void 0, m&&"text-destructive",e),htmlFor:s,...o})});x.displayName="FormLabel";var C=t.forwardRef(({...e},o)=>{let{error:r,formItemId:m,formDescriptionId:s,formMessageId:a}=n();return _jsxruntime.jsx.call(void 0, _reactslot.Slot,{ref:o,id:m,"aria-describedby":r?`${s} ${a}`:s,"aria-invalid":!!r,...e})});C.displayName="FormControl";var I=t.forwardRef(({className:e,...o},r)=>{let{formDescriptionId:m}=n();return _jsxruntime.jsx.call(void 0, "p",{ref:r,id:m,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-muted-foreground text-xs",e),...o})});I.displayName="FormDescription";var g=t.forwardRef(({children:e,className:o,...r},m)=>{let{error:s,formMessageId:a}=n(),d=_optionalChain([s, 'optionalAccess', _ => _.message])?s.message:e;return d?_jsxruntime.jsx.call(void 0, "p",{ref:m,id:a,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-destructive text-xs font-medium",o),...r,children:d}):null});g.displayName="FormMessage";exports.Form = M; exports.FormControl = C; exports.FormDescription = I; exports.FormField = h; exports.FormItem = R; exports.FormLabel = x; exports.FormMessage = g; exports.useFormField = n;
2
2
  //# sourceMappingURL=form.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/form.tsx"],"names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","fieldState","id","Form","FormField","props","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","FormDescription","FormMessage","children","body"],"mappings":"+FAEA,UAAYA,MAAW,QAEvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAKA,gBAAAC,EACA,kBAAAC,MACK,kBA+ED,cAAAC,MAAA,oBA5DN,IAAMC,EAAyB,gBAA4C,IAAI,EAEzEC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIR,EAAe,EAEpD,GAAI,CAACK,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMG,EAAaF,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAE,CAAG,EAAIJ,EAEf,MAAO,CACL,GAAAI,EACA,KAAML,EAAa,KACnB,WAAY,aAAaK,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOZ,EAWb,SAASa,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEZ,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMW,EAAM,IAAK,EACnD,SAAAZ,EAACH,EAAA,CAAY,GAAGe,EAAO,EACzB,CAEJ,CASA,IAAMC,EAAiB,aAA2C,CAAC,CAAE,UAAAC,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAClG,IAAMN,EAAW,QAAM,EAEvB,OACET,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAO,CAAG,EACpC,SAAAT,EAAC,OAAI,IAAKe,EAAK,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGF,EAAO,EACnE,CAEJ,CAAC,EAEDC,EAAS,YAAc,WASvB,IAAMI,EAAkB,aAA6C,CAAC,CAAE,UAAAH,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CACrG,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAIhB,EAAa,EAE3C,OAAOH,EAACoB,EAAA,CAAM,IAAKL,EAAK,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EAAG,QAASK,EAAa,GAAGP,EAAO,CACjH,CAAC,EAEDK,EAAU,YAAc,YASxB,IAAMI,EAAoB,aAAiD,CAAC,CAAE,GAAGT,CAAM,EAAGG,IAAQ,CAChG,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAAIpB,EAAa,EAE7E,OACEH,EAACJ,EAAA,CACC,IAAKmB,EACL,GAAII,EACJ,mBAAmBD,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAC3B,eAAc,EAAQJ,EACrB,GAAGN,EACN,CAEJ,CAAC,EAEDS,EAAY,YAAc,cAS1B,IAAMG,EAAwB,aAC5B,CAAC,CAAE,UAAAV,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAChC,GAAM,CAAE,kBAAAO,CAAkB,EAAInB,EAAa,EAE3C,OAAOH,EAAC,KAAE,IAAKe,EAAK,GAAIO,EAAmB,UAAWN,EAAG,gCAAiCF,CAAS,EAAI,GAAGF,EAAO,CACnH,CACF,EAEAY,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aAAiD,CAAC,CAAE,SAAAC,EAAU,UAAAZ,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CACrH,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIpB,EAAa,EACxCwB,EAAOT,GAAO,QAAUA,EAAM,QAAUQ,EAE9C,OAAKC,EAKH3B,EAAC,KAAE,IAAKe,EAAK,GAAIQ,EAAe,UAAWP,EAAG,uCAAwCF,CAAS,EAAI,GAAGF,EACnG,SAAAe,EACH,EANO,IAQX,CAAC,EAEDF,EAAY,YAAc","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n} from \"react-hook-form\";\nimport { cn } from \"../lib/utils\";\nimport { Label } from \"./label\";\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n error?: FieldError | undefined;\n id: string;\n name: string;\n formItemId: string;\n formDescriptionId: string;\n formMessageId: string;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error(\"useFormField should be used within <FormField>\");\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = \"FormItem\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && \"text-destructive\", className)} htmlFor={formItemId} {...props} />;\n});\n\nFormLabel.displayName = \"FormLabel\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n});\n\nFormControl.displayName = \"FormControl\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return <p ref={ref} id={formDescriptionId} className={cn(\"text-muted-foreground text-xs\", className)} {...props} />;\n },\n);\n\nFormDescription.displayName = \"FormDescription\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? error.message : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn(\"text-destructive text-xs font-medium\", className)} {...props}>\n {body}\n </p>\n );\n});\n\nFormMessage.displayName = \"FormMessage\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/form.tsx"],"names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","fieldState","id","Form","FormField","props","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","FormDescription","FormMessage","children","body"],"mappings":"+FAEA,UAAYA,MAAW,QAEvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAKA,gBAAAC,EACA,kBAAAC,MACK,kBAiFD,cAAAC,MAAA,oBA9DN,IAAMC,EAAyB,gBAC7B,IACF,EAEMC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIR,EAAe,EAEpD,GAAI,CAACK,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMG,EAAaF,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAE,CAAG,EAAIJ,EAEf,MAAO,CACL,GAAAI,EACA,KAAML,EAAa,KACnB,WAAY,aAAaK,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOZ,EAWb,SAASa,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEZ,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMW,EAAM,IAAK,EACnD,SAAAZ,EAACH,EAAA,CAAY,GAAGe,EAAO,EACzB,CAEJ,CASA,IAAMC,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAChC,IAAMN,EAAW,QAAM,EAEvB,OACET,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAO,CAAG,EACpC,SAAAT,EAAC,OAAI,IAAKe,EAAK,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGF,EAAO,EACnE,CAEJ,CACF,EAEAC,EAAS,YAAc,WAWvB,IAAMI,EAAkB,aACtB,CAAC,CAAE,UAAAH,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAChC,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAIhB,EAAa,EAE3C,OACEH,EAACoB,EAAA,CACC,IAAKL,EACL,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EACpD,QAASK,EACR,GAAGP,EACN,CAEJ,CACF,EAEAK,EAAU,YAAc,YASxB,IAAMI,EAAoB,aACxB,CAAC,CAAE,GAAGT,CAAM,EAAGG,IAAQ,CACrB,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAC1DpB,EAAa,EAEf,OACEH,EAACJ,EAAA,CACC,IAAKmB,EACL,GAAII,EACJ,mBACGD,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAEX,eAAc,EAAQJ,EACrB,GAAGN,EACN,CAEJ,CACF,EAEAS,EAAY,YAAc,cAS1B,IAAMG,EAAwB,aAG5B,CAAC,CAAE,UAAAV,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAClC,GAAM,CAAE,kBAAAO,CAAkB,EAAInB,EAAa,EAE3C,OACEH,EAAC,KACC,IAAKe,EACL,GAAIO,EACJ,UAAWN,EAAG,gCAAiCF,CAAS,EACvD,GAAGF,EACN,CAEJ,CAAC,EAEDY,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aACxB,CAAC,CAAE,SAAAC,EAAU,UAAAZ,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAC1C,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIpB,EAAa,EACxCwB,EAAOT,GAAO,QAAUA,EAAM,QAAUQ,EAE9C,OAAKC,EAKH3B,EAAC,KACC,IAAKe,EACL,GAAIQ,EACJ,UAAWP,EAAG,uCAAwCF,CAAS,EAC9D,GAAGF,EAEH,SAAAe,EACH,EAXO,IAaX,CACF,EAEAF,EAAY,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n} from 'react-hook-form';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(\n null,\n);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n error?: FieldError | undefined;\n id: string;\n name: string;\n formItemId: string;\n formDescriptionId: string;\n formMessageId: string;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(\n ({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n },\n);\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<\n typeof LabelPrimitive.Root\n>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(\n ({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n ref={ref}\n className={cn(error && 'text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(\n ({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={\n !error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n },\n);\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<\n FormDescriptionElement,\n FormDescriptionProps\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-muted-foreground text-xs', className)}\n {...props}\n />\n );\n});\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(\n ({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? error.message : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn('text-destructive text-xs font-medium', className)}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as F}from"../chunk-KJ77RPJ4.mjs";import{b as l}from"../chunk-466PAJCA.mjs";import*as t from"react";import{Slot as u}from"@radix-ui/react-slot";import{Controller as f,FormProvider as P,useFormContext as y}from"react-hook-form";import{jsx as i}from"react/jsx-runtime";var p=t.createContext(null),c=t.createContext(null),n=()=>{let e=t.useContext(p),o=t.useContext(c),{getFieldState:r,formState:m}=y();if(!e||!o)throw new Error("useFormField should be used within <FormField>");let s=r(e.name,m),{id:a}=o;return{id:a,name:e.name,formItemId:`form-item-${a}`,formDescriptionId:`form-item-description-${a}`,formMessageId:`form-item-message-${a}`,...s}},M=P;function h({...e}){return i(p.Provider,{value:{name:e.name},children:i(f,{...e})})}var R=t.forwardRef(({className:e,...o},r)=>{let m=t.useId();return i(c.Provider,{value:{id:m},children:i("div",{ref:r,className:l("space-y-2",e),...o})})});R.displayName="FormItem";var x=t.forwardRef(({className:e,...o},r)=>{let{error:m,formItemId:s}=n();return i(F,{ref:r,className:l(m&&"text-destructive",e),htmlFor:s,...o})});x.displayName="FormLabel";var C=t.forwardRef(({...e},o)=>{let{error:r,formItemId:m,formDescriptionId:s,formMessageId:a}=n();return i(u,{ref:o,id:m,"aria-describedby":r?`${s} ${a}`:s,"aria-invalid":!!r,...e})});C.displayName="FormControl";var I=t.forwardRef(({className:e,...o},r)=>{let{formDescriptionId:m}=n();return i("p",{ref:r,id:m,className:l("text-muted-foreground text-xs",e),...o})});I.displayName="FormDescription";var g=t.forwardRef(({children:e,className:o,...r},m)=>{let{error:s,formMessageId:a}=n(),d=s?.message?s.message:e;return d?i("p",{ref:m,id:a,className:l("text-destructive text-xs font-medium",o),...r,children:d}):null});g.displayName="FormMessage";export{M as Form,C as FormControl,I as FormDescription,h as FormField,R as FormItem,x as FormLabel,g as FormMessage,n as useFormField};
1
+ "use client";import{a as F}from"../chunk-M5UKNISJ.mjs";import{b as l}from"../chunk-LEUB3C3L.mjs";import*as t from"react";import{Slot as u}from"@radix-ui/react-slot";import{Controller as f,FormProvider as P,useFormContext as y}from"react-hook-form";import{jsx as i}from"react/jsx-runtime";var p=t.createContext(null),c=t.createContext(null),n=()=>{let e=t.useContext(p),o=t.useContext(c),{getFieldState:r,formState:m}=y();if(!e||!o)throw new Error("useFormField should be used within <FormField>");let s=r(e.name,m),{id:a}=o;return{id:a,name:e.name,formItemId:`form-item-${a}`,formDescriptionId:`form-item-description-${a}`,formMessageId:`form-item-message-${a}`,...s}},M=P;function h({...e}){return i(p.Provider,{value:{name:e.name},children:i(f,{...e})})}var R=t.forwardRef(({className:e,...o},r)=>{let m=t.useId();return i(c.Provider,{value:{id:m},children:i("div",{ref:r,className:l("space-y-2",e),...o})})});R.displayName="FormItem";var x=t.forwardRef(({className:e,...o},r)=>{let{error:m,formItemId:s}=n();return i(F,{ref:r,className:l(m&&"text-destructive",e),htmlFor:s,...o})});x.displayName="FormLabel";var C=t.forwardRef(({...e},o)=>{let{error:r,formItemId:m,formDescriptionId:s,formMessageId:a}=n();return i(u,{ref:o,id:m,"aria-describedby":r?`${s} ${a}`:s,"aria-invalid":!!r,...e})});C.displayName="FormControl";var I=t.forwardRef(({className:e,...o},r)=>{let{formDescriptionId:m}=n();return i("p",{ref:r,id:m,className:l("text-muted-foreground text-xs",e),...o})});I.displayName="FormDescription";var g=t.forwardRef(({children:e,className:o,...r},m)=>{let{error:s,formMessageId:a}=n(),d=s?.message?s.message:e;return d?i("p",{ref:m,id:a,className:l("text-destructive text-xs font-medium",o),...r,children:d}):null});g.displayName="FormMessage";export{M as Form,C as FormControl,I as FormDescription,h as FormField,R as FormItem,x as FormLabel,g as FormMessage,n as useFormField};
2
2
  //# sourceMappingURL=form.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/form.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n} from \"react-hook-form\";\nimport { cn } from \"../lib/utils\";\nimport { Label } from \"./label\";\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n error?: FieldError | undefined;\n id: string;\n name: string;\n formItemId: string;\n formDescriptionId: string;\n formMessageId: string;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error(\"useFormField should be used within <FormField>\");\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = \"FormItem\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && \"text-destructive\", className)} htmlFor={formItemId} {...props} />;\n});\n\nFormLabel.displayName = \"FormLabel\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n});\n\nFormControl.displayName = \"FormControl\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return <p ref={ref} id={formDescriptionId} className={cn(\"text-muted-foreground text-xs\", className)} {...props} />;\n },\n);\n\nFormDescription.displayName = \"FormDescription\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? error.message : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn(\"text-destructive text-xs font-medium\", className)} {...props}>\n {body}\n </p>\n );\n});\n\nFormMessage.displayName = \"FormMessage\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"],"mappings":"iGAEA,UAAYA,MAAW,QAEvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAKA,gBAAAC,EACA,kBAAAC,MACK,kBA+ED,cAAAC,MAAA,oBA5DN,IAAMC,EAAyB,gBAA4C,IAAI,EAEzEC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIC,EAAe,EAEpD,GAAI,CAACJ,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMI,EAAaH,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAG,CAAG,EAAIL,EAEf,MAAO,CACL,GAAAK,EACA,KAAMN,EAAa,KACnB,WAAY,aAAaM,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOC,EAWb,SAASC,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEd,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMa,EAAM,IAAK,EACnD,SAAAd,EAACe,EAAA,CAAY,GAAGD,EAAO,EACzB,CAEJ,CASA,IAAME,EAAiB,aAA2C,CAAC,CAAE,UAAAC,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAClG,IAAMR,EAAW,QAAM,EAEvB,OACEV,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAQ,CAAG,EACpC,SAAAV,EAAC,OAAI,IAAKkB,EAAK,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGH,EAAO,EACnE,CAEJ,CAAC,EAEDE,EAAS,YAAc,WASvB,IAAMI,EAAkB,aAA6C,CAAC,CAAE,UAAAH,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CACrG,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAInB,EAAa,EAE3C,OAAOH,EAACuB,EAAA,CAAM,IAAKL,EAAK,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EAAG,QAASK,EAAa,GAAGR,EAAO,CACjH,CAAC,EAEDM,EAAU,YAAc,YASxB,IAAMI,EAAoB,aAAiD,CAAC,CAAE,GAAGV,CAAM,EAAGI,IAAQ,CAChG,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAAIvB,EAAa,EAE7E,OACEH,EAAC2B,EAAA,CACC,IAAKT,EACL,GAAII,EACJ,mBAAmBD,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAC3B,eAAc,EAAQJ,EACrB,GAAGP,EACN,CAEJ,CAAC,EAEDU,EAAY,YAAc,cAS1B,IAAMI,EAAwB,aAC5B,CAAC,CAAE,UAAAX,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAChC,GAAM,CAAE,kBAAAO,CAAkB,EAAItB,EAAa,EAE3C,OAAOH,EAAC,KAAE,IAAKkB,EAAK,GAAIO,EAAmB,UAAWN,EAAG,gCAAiCF,CAAS,EAAI,GAAGH,EAAO,CACnH,CACF,EAEAc,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aAAiD,CAAC,CAAE,SAAAC,EAAU,UAAAb,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CACrH,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIvB,EAAa,EACxC4B,EAAOV,GAAO,QAAUA,EAAM,QAAUS,EAE9C,OAAKC,EAKH/B,EAAC,KAAE,IAAKkB,EAAK,GAAIQ,EAAe,UAAWP,EAAG,uCAAwCF,CAAS,EAAI,GAAGH,EACnG,SAAAiB,EACH,EANO,IAQX,CAAC,EAEDF,EAAY,YAAc","names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","useFormContext","fieldState","id","Form","FormProvider","FormField","props","Controller","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body"]}
1
+ {"version":3,"sources":["../../src/react/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n} from 'react-hook-form';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(\n null,\n);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n error?: FieldError | undefined;\n id: string;\n name: string;\n formItemId: string;\n formDescriptionId: string;\n formMessageId: string;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(\n ({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n },\n);\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<\n typeof LabelPrimitive.Root\n>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(\n ({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n ref={ref}\n className={cn(error && 'text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(\n ({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={\n !error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n },\n);\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<\n FormDescriptionElement,\n FormDescriptionProps\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-muted-foreground text-xs', className)}\n {...props}\n />\n );\n});\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(\n ({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? error.message : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn('text-destructive text-xs font-medium', className)}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"],"mappings":"iGAEA,UAAYA,MAAW,QAEvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAKA,gBAAAC,EACA,kBAAAC,MACK,kBAiFD,cAAAC,MAAA,oBA9DN,IAAMC,EAAyB,gBAC7B,IACF,EAEMC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIC,EAAe,EAEpD,GAAI,CAACJ,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMI,EAAaH,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAG,CAAG,EAAIL,EAEf,MAAO,CACL,GAAAK,EACA,KAAMN,EAAa,KACnB,WAAY,aAAaM,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOC,EAWb,SAASC,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEd,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMa,EAAM,IAAK,EACnD,SAAAd,EAACe,EAAA,CAAY,GAAGD,EAAO,EACzB,CAEJ,CASA,IAAME,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAChC,IAAMR,EAAW,QAAM,EAEvB,OACEV,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAQ,CAAG,EACpC,SAAAV,EAAC,OAAI,IAAKkB,EAAK,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGH,EAAO,EACnE,CAEJ,CACF,EAEAE,EAAS,YAAc,WAWvB,IAAMI,EAAkB,aACtB,CAAC,CAAE,UAAAH,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAChC,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAInB,EAAa,EAE3C,OACEH,EAACuB,EAAA,CACC,IAAKL,EACL,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EACpD,QAASK,EACR,GAAGR,EACN,CAEJ,CACF,EAEAM,EAAU,YAAc,YASxB,IAAMI,EAAoB,aACxB,CAAC,CAAE,GAAGV,CAAM,EAAGI,IAAQ,CACrB,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAC1DvB,EAAa,EAEf,OACEH,EAAC2B,EAAA,CACC,IAAKT,EACL,GAAII,EACJ,mBACGD,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAEX,eAAc,EAAQJ,EACrB,GAAGP,EACN,CAEJ,CACF,EAEAU,EAAY,YAAc,cAS1B,IAAMI,EAAwB,aAG5B,CAAC,CAAE,UAAAX,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAClC,GAAM,CAAE,kBAAAO,CAAkB,EAAItB,EAAa,EAE3C,OACEH,EAAC,KACC,IAAKkB,EACL,GAAIO,EACJ,UAAWN,EAAG,gCAAiCF,CAAS,EACvD,GAAGH,EACN,CAEJ,CAAC,EAEDc,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aACxB,CAAC,CAAE,SAAAC,EAAU,UAAAb,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAC1C,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIvB,EAAa,EACxC4B,EAAOV,GAAO,QAAUA,EAAM,QAAUS,EAE9C,OAAKC,EAKH/B,EAAC,KACC,IAAKkB,EACL,GAAIQ,EACJ,UAAWP,EAAG,uCAAwCF,CAAS,EAC9D,GAAGH,EAEH,SAAAiB,EACH,EAXO,IAaX,CACF,EAEAF,EAAY,YAAc","names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","useFormContext","fieldState","id","Form","FormProvider","FormField","props","Controller","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body"]}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
 
3
3
  interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
4
- as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
5
5
  asChild?: boolean;
6
6
  }
7
7
  declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
 
3
3
  interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
4
- as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
5
5
  asChild?: boolean;
6
6
  }
7
7
  declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/heading.tsx"],"names":["React","Slot","jsx","Heading","asChild","Tag","props","ref"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAgBZ,cAAAC,MAAA,oBAHT,IAAMC,EAAgB,aAAyC,CAAC,CAAE,QAAAC,EAAS,GAAIC,EAAM,KAAM,GAAGC,CAAM,EAAGC,IAG9FL,EAFWE,EAAUH,EAAOI,EAE3B,CAAU,IAAKE,EAAM,GAAGD,EAAO,CACxC,EAEDH,EAAQ,YAAc","sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Heading\n * -------------------------------------------------------------------------- */\n\ntype HeadingElement = HTMLHeadingElement;\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n asChild?: boolean;\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>(({ asChild, as: Tag = \"h1\", ...props }, ref) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={ref} {...props} />;\n});\n\nHeading.displayName = \"Heading\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Heading, type HeadingProps };\n"]}
1
+ {"version":3,"sources":["../../src/react/heading.tsx"],"names":["React","Slot","jsx","Heading","asChild","Tag","props","ref"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAiBV,cAAAC,MAAA,oBAJX,IAAMC,EAAgB,aACpB,CAAC,CAAE,QAAAC,EAAS,GAAIC,EAAM,KAAM,GAAGC,CAAM,EAAGC,IAG/BL,EAFWE,EAAUH,EAAOI,EAE3B,CAAU,IAAKE,EAAM,GAAGD,EAAO,CAE3C,EAEAH,EAAQ,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Heading\n * -------------------------------------------------------------------------- */\n\ntype HeadingElement = HTMLHeadingElement;\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n asChild?: boolean;\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>(\n ({ asChild, as: Tag = 'h1', ...props }, ref) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={ref} {...props} />;\n },\n);\n\nHeading.displayName = 'Heading';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Heading, type HeadingProps };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/heading.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Heading\n * -------------------------------------------------------------------------- */\n\ntype HeadingElement = HTMLHeadingElement;\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n asChild?: boolean;\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>(({ asChild, as: Tag = \"h1\", ...props }, ref) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={ref} {...props} />;\n});\n\nHeading.displayName = \"Heading\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Heading, type HeadingProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAgBZ,cAAAC,MAAA,oBAHT,IAAMC,EAAgB,aAAyC,CAAC,CAAE,QAAAC,EAAS,GAAIC,EAAM,KAAM,GAAGC,CAAM,EAAGC,IAG9FL,EAFWE,EAAUH,EAAOI,EAE3B,CAAU,IAAKE,EAAM,GAAGD,EAAO,CACxC,EAEDH,EAAQ,YAAc","names":["React","Slot","jsx","Heading","asChild","Tag","props","ref"]}
1
+ {"version":3,"sources":["../../src/react/heading.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Heading\n * -------------------------------------------------------------------------- */\n\ntype HeadingElement = HTMLHeadingElement;\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n asChild?: boolean;\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>(\n ({ asChild, as: Tag = 'h1', ...props }, ref) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={ref} {...props} />;\n },\n);\n\nHeading.displayName = 'Heading';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Heading, type HeadingProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAiBV,cAAAC,MAAA,oBAJX,IAAMC,EAAgB,aACpB,CAAC,CAAE,QAAAC,EAAS,GAAIC,EAAM,KAAM,GAAGC,CAAM,EAAGC,IAG/BL,EAFWE,EAAUH,EAAOI,EAE3B,CAAU,IAAKE,EAAM,GAAGD,EAAO,CAE3C,EAEAH,EAAQ,YAAc","names":["React","Slot","jsx","Heading","asChild","Tag","props","ref"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkUJJZZCACjs = require('../chunk-UJJZZCAC.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _reacthovercard = require('@radix-ui/react-hover-card'); var e = _interopRequireWildcard(_reacthovercard);var _jsxruntime = require('react/jsx-runtime');var C=e.Root,l= exports.HoverCardTrigger =e.Trigger,p= exports.HoverCardContent =i.forwardRef(({className:t,align:o="center",sideOffset:r=6,...s},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Content,{ref:n,align:o,sideOffset:r,className:_chunkUJJZZCACjs.b.call(void 0, "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md",t),...s})}));p.displayName=e.Content.displayName;var m=i.forwardRef(({className:t,...o},r)=>_jsxruntime.jsx.call(void 0, e.Arrow,{ref:r,className:_chunkUJJZZCACjs.b.call(void 0, "fill-popover",t),...o}));m.displayName=e.Arrow.displayName;exports.HoverCard = C; exports.HoverCardArrow = m; exports.HoverCardContent = p; exports.HoverCardTrigger = l;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _reacthovercard = require('@radix-ui/react-hover-card'); var e = _interopRequireWildcard(_reacthovercard);var _jsxruntime = require('react/jsx-runtime');var C=e.Root,l= exports.HoverCardTrigger =e.Trigger,p= exports.HoverCardContent =i.forwardRef(({className:t,align:o="center",sideOffset:r=6,...s},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Content,{ref:n,align:o,sideOffset:r,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md",t),...s})}));p.displayName=e.Content.displayName;var m=i.forwardRef(({className:t,...o},r)=>_jsxruntime.jsx.call(void 0, e.Arrow,{ref:r,className:_chunkHQ4AUOQMjs.b.call(void 0, "fill-popover",t),...o}));m.displayName=e.Arrow.displayName;exports.HoverCard = C; exports.HoverCardArrow = m; exports.HoverCardContent = p; exports.HoverCardTrigger = l;
2
2
  //# sourceMappingURL=hover-card.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/hover-card.tsx"],"names":["React","HoverCardPrimitive","jsx","HoverCard","HoverCardTrigger","HoverCardContent","className","align","sideOffset","props","ref","cn","HoverCardArrow"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAwB,6BA2B9B,cAAAC,MAAA,oBAnBN,IAAMC,EAA+B,OAO/BC,EAAsC,UAStCC,EAAyB,aAC7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC1DR,EAAoB,SAAnB,CACC,SAAAA,EAAoB,UAAnB,CACC,IAAKQ,EACL,MAAOH,EACP,WAAYC,EACZ,UAAWG,EACT,gtBACAL,CACF,EACC,GAAGG,EACN,EACF,CAEJ,EAEAJ,EAAiB,YAAiC,UAAQ,YAS1D,IAAMO,EAAuB,aAAuD,CAAC,CAAE,UAAAN,EAAW,GAAGG,CAAM,EAAGC,IAC5GR,EAAoB,QAAnB,CAAyB,IAAKQ,EAAK,UAAWC,EAAG,eAAgBL,CAAS,EAAI,GAAGG,EAAO,CAC1F,EAEDG,EAAe,YAAiC,QAAM","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\nimport { cn } from \"../lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCard\n * -------------------------------------------------------------------------- */\n\ntype HoverCardProps = React.ComponentProps<typeof HoverCardPrimitive.Root>;\nconst HoverCard = HoverCardPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardTrigger\n * -------------------------------------------------------------------------- */\n\ntype HoverCardTriggerProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Trigger>;\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardContent\n * -------------------------------------------------------------------------- */\n\ntype HoverCardContentElement = React.ElementRef<typeof HoverCardPrimitive.Content>;\ntype HoverCardContentProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>;\n\nconst HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(\n ({ className, align = \"center\", sideOffset = 6, ...props }, ref) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md\",\n className,\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n ),\n);\n\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardArrow\n * -------------------------------------------------------------------------- */\n\ntype HoverCardArrowElement = React.ElementRef<typeof HoverCardPrimitive.Arrow>;\ntype HoverCardArrowProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Arrow>;\n\nconst HoverCardArrow = React.forwardRef<HoverCardArrowElement, HoverCardArrowProps>(({ className, ...props }, ref) => (\n <HoverCardPrimitive.Arrow ref={ref} className={cn(\"fill-popover\", className)} {...props} />\n));\n\nHoverCardArrow.displayName = HoverCardPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n HoverCard,\n HoverCardTrigger,\n HoverCardContent,\n HoverCardArrow,\n type HoverCardProps,\n type HoverCardTriggerProps,\n type HoverCardContentProps,\n type HoverCardArrowProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/hover-card.tsx"],"names":["React","HoverCardPrimitive","jsx","HoverCard","HoverCardTrigger","HoverCardContent","className","align","sideOffset","props","ref","cn","HoverCardArrow"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAwB,6BAmChC,cAAAC,MAAA,oBA3BJ,IAAMC,EAA+B,OAS/BC,EAAsC,UAatCC,EAAyB,aAG7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC5DR,EAAoB,SAAnB,CACC,SAAAA,EAAoB,UAAnB,CACC,IAAKQ,EACL,MAAOH,EACP,WAAYC,EACZ,UAAWG,EACT,gtBACAL,CACF,EACC,GAAGG,EACN,EACF,CACD,EAEDJ,EAAiB,YAAiC,UAAQ,YAW1D,IAAMO,EAAuB,aAG3B,CAAC,CAAE,UAAAN,EAAW,GAAGG,CAAM,EAAGC,IAC1BR,EAAoB,QAAnB,CACC,IAAKQ,EACL,UAAWC,EAAG,eAAgBL,CAAS,EACtC,GAAGG,EACN,CACD,EAEDG,EAAe,YAAiC,QAAM","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCard\n * -------------------------------------------------------------------------- */\n\ntype HoverCardProps = React.ComponentProps<typeof HoverCardPrimitive.Root>;\nconst HoverCard = HoverCardPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardTrigger\n * -------------------------------------------------------------------------- */\n\ntype HoverCardTriggerProps = React.ComponentPropsWithoutRef<\n typeof HoverCardPrimitive.Trigger\n>;\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardContent\n * -------------------------------------------------------------------------- */\n\ntype HoverCardContentElement = React.ElementRef<\n typeof HoverCardPrimitive.Content\n>;\ntype HoverCardContentProps = React.ComponentPropsWithoutRef<\n typeof HoverCardPrimitive.Content\n>;\n\nconst HoverCardContent = React.forwardRef<\n HoverCardContentElement,\n HoverCardContentProps\n>(({ className, align = 'center', sideOffset = 6, ...props }, ref) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md',\n className,\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n));\n\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardArrow\n * -------------------------------------------------------------------------- */\n\ntype HoverCardArrowElement = React.ElementRef<typeof HoverCardPrimitive.Arrow>;\ntype HoverCardArrowProps = React.ComponentPropsWithoutRef<\n typeof HoverCardPrimitive.Arrow\n>;\n\nconst HoverCardArrow = React.forwardRef<\n HoverCardArrowElement,\n HoverCardArrowProps\n>(({ className, ...props }, ref) => (\n <HoverCardPrimitive.Arrow\n ref={ref}\n className={cn('fill-popover', className)}\n {...props}\n />\n));\n\nHoverCardArrow.displayName = HoverCardPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n HoverCard,\n HoverCardTrigger,\n HoverCardContent,\n HoverCardArrow,\n type HoverCardProps,\n type HoverCardTriggerProps,\n type HoverCardContentProps,\n type HoverCardArrowProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{b as a}from"../chunk-466PAJCA.mjs";import*as i from"react";import*as e from"@radix-ui/react-hover-card";import{jsx as d}from"react/jsx-runtime";var C=e.Root,l=e.Trigger,p=i.forwardRef(({className:t,align:o="center",sideOffset:r=6,...s},n)=>d(e.Portal,{children:d(e.Content,{ref:n,align:o,sideOffset:r,className:a("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md",t),...s})}));p.displayName=e.Content.displayName;var m=i.forwardRef(({className:t,...o},r)=>d(e.Arrow,{ref:r,className:a("fill-popover",t),...o}));m.displayName=e.Arrow.displayName;export{C as HoverCard,m as HoverCardArrow,p as HoverCardContent,l as HoverCardTrigger};
1
+ "use client";import{b as a}from"../chunk-LEUB3C3L.mjs";import*as i from"react";import*as e from"@radix-ui/react-hover-card";import{jsx as d}from"react/jsx-runtime";var C=e.Root,l=e.Trigger,p=i.forwardRef(({className:t,align:o="center",sideOffset:r=6,...s},n)=>d(e.Portal,{children:d(e.Content,{ref:n,align:o,sideOffset:r,className:a("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md",t),...s})}));p.displayName=e.Content.displayName;var m=i.forwardRef(({className:t,...o},r)=>d(e.Arrow,{ref:r,className:a("fill-popover",t),...o}));m.displayName=e.Arrow.displayName;export{C as HoverCard,m as HoverCardArrow,p as HoverCardContent,l as HoverCardTrigger};
2
2
  //# sourceMappingURL=hover-card.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/hover-card.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\nimport { cn } from \"../lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCard\n * -------------------------------------------------------------------------- */\n\ntype HoverCardProps = React.ComponentProps<typeof HoverCardPrimitive.Root>;\nconst HoverCard = HoverCardPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardTrigger\n * -------------------------------------------------------------------------- */\n\ntype HoverCardTriggerProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Trigger>;\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardContent\n * -------------------------------------------------------------------------- */\n\ntype HoverCardContentElement = React.ElementRef<typeof HoverCardPrimitive.Content>;\ntype HoverCardContentProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>;\n\nconst HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(\n ({ className, align = \"center\", sideOffset = 6, ...props }, ref) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md\",\n className,\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n ),\n);\n\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardArrow\n * -------------------------------------------------------------------------- */\n\ntype HoverCardArrowElement = React.ElementRef<typeof HoverCardPrimitive.Arrow>;\ntype HoverCardArrowProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Arrow>;\n\nconst HoverCardArrow = React.forwardRef<HoverCardArrowElement, HoverCardArrowProps>(({ className, ...props }, ref) => (\n <HoverCardPrimitive.Arrow ref={ref} className={cn(\"fill-popover\", className)} {...props} />\n));\n\nHoverCardArrow.displayName = HoverCardPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n HoverCard,\n HoverCardTrigger,\n HoverCardContent,\n HoverCardArrow,\n type HoverCardProps,\n type HoverCardTriggerProps,\n type HoverCardContentProps,\n type HoverCardArrowProps,\n};\n"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAwB,6BA2B9B,cAAAC,MAAA,oBAnBN,IAAMC,EAA+B,OAO/BC,EAAsC,UAStCC,EAAyB,aAC7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC1DR,EAAoB,SAAnB,CACC,SAAAA,EAAoB,UAAnB,CACC,IAAKQ,EACL,MAAOH,EACP,WAAYC,EACZ,UAAWG,EACT,gtBACAL,CACF,EACC,GAAGG,EACN,EACF,CAEJ,EAEAJ,EAAiB,YAAiC,UAAQ,YAS1D,IAAMO,EAAuB,aAAuD,CAAC,CAAE,UAAAN,EAAW,GAAGG,CAAM,EAAGC,IAC5GR,EAAoB,QAAnB,CAAyB,IAAKQ,EAAK,UAAWC,EAAG,eAAgBL,CAAS,EAAI,GAAGG,EAAO,CAC1F,EAEDG,EAAe,YAAiC,QAAM","names":["React","HoverCardPrimitive","jsx","HoverCard","HoverCardTrigger","HoverCardContent","className","align","sideOffset","props","ref","cn","HoverCardArrow"]}
1
+ {"version":3,"sources":["../../src/react/hover-card.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCard\n * -------------------------------------------------------------------------- */\n\ntype HoverCardProps = React.ComponentProps<typeof HoverCardPrimitive.Root>;\nconst HoverCard = HoverCardPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardTrigger\n * -------------------------------------------------------------------------- */\n\ntype HoverCardTriggerProps = React.ComponentPropsWithoutRef<\n typeof HoverCardPrimitive.Trigger\n>;\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardContent\n * -------------------------------------------------------------------------- */\n\ntype HoverCardContentElement = React.ElementRef<\n typeof HoverCardPrimitive.Content\n>;\ntype HoverCardContentProps = React.ComponentPropsWithoutRef<\n typeof HoverCardPrimitive.Content\n>;\n\nconst HoverCardContent = React.forwardRef<\n HoverCardContentElement,\n HoverCardContentProps\n>(({ className, align = 'center', sideOffset = 6, ...props }, ref) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md',\n className,\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n));\n\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardArrow\n * -------------------------------------------------------------------------- */\n\ntype HoverCardArrowElement = React.ElementRef<typeof HoverCardPrimitive.Arrow>;\ntype HoverCardArrowProps = React.ComponentPropsWithoutRef<\n typeof HoverCardPrimitive.Arrow\n>;\n\nconst HoverCardArrow = React.forwardRef<\n HoverCardArrowElement,\n HoverCardArrowProps\n>(({ className, ...props }, ref) => (\n <HoverCardPrimitive.Arrow\n ref={ref}\n className={cn('fill-popover', className)}\n {...props}\n />\n));\n\nHoverCardArrow.displayName = HoverCardPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n HoverCard,\n HoverCardTrigger,\n HoverCardContent,\n HoverCardArrow,\n type HoverCardProps,\n type HoverCardTriggerProps,\n type HoverCardContentProps,\n type HoverCardArrowProps,\n};\n"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAwB,6BAmChC,cAAAC,MAAA,oBA3BJ,IAAMC,EAA+B,OAS/BC,EAAsC,UAatCC,EAAyB,aAG7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC5DR,EAAoB,SAAnB,CACC,SAAAA,EAAoB,UAAnB,CACC,IAAKQ,EACL,MAAOH,EACP,WAAYC,EACZ,UAAWG,EACT,gtBACAL,CACF,EACC,GAAGG,EACN,EACF,CACD,EAEDJ,EAAiB,YAAiC,UAAQ,YAW1D,IAAMO,EAAuB,aAG3B,CAAC,CAAE,UAAAN,EAAW,GAAGG,CAAM,EAAGC,IAC1BR,EAAoB,QAAnB,CACC,IAAKQ,EACL,UAAWC,EAAG,eAAgBL,CAAS,EACtC,GAAGG,EACN,CACD,EAEDG,EAAe,YAAiC,QAAM","names":["React","HoverCardPrimitive","jsx","HoverCard","HoverCardTrigger","HoverCardContent","className","align","sideOffset","props","ref","cn","HoverCardArrow"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkUJJZZCACjs = require('../chunk-UJJZZCAC.js');var _react = require('react'); var n = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _inputotp = require('input-otp');var _jsxruntime = require('react/jsx-runtime');var P=n.forwardRef(({className:t,containerClassName:e,...p},a)=>_jsxruntime.jsx.call(void 0, _inputotp.OTPInput,{ref:a,containerClassName:_chunkUJJZZCACjs.b.call(void 0, "flex items-center gap-2 has-[:disabled]:opacity-50",e),className:_chunkUJJZZCACjs.b.call(void 0, "disabled:cursor-not-allowed",t),...p}));P.displayName="InputOTP";var T=n.forwardRef(({className:t,...e},p)=>_jsxruntime.jsx.call(void 0, "div",{ref:p,className:_chunkUJJZZCACjs.b.call(void 0, "flex items-center",t),...e}));T.displayName="InputOTPGroup";var m=n.forwardRef(({index:t,className:e,...p},a)=>{let s=n.useContext(_inputotp.OTPInputContext).slots[t];return _jsxruntime.jsxs.call(void 0, "div",{ref:a,className:_chunkUJJZZCACjs.b.call(void 0, "border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",_optionalChain([s, 'optionalAccess', _ => _.isActive])&&"z-10 outline outline-2",e),...p,children:[_optionalChain([s, 'optionalAccess', _2 => _2.char]),_optionalChain([s, 'optionalAccess', _3 => _3.hasFakeCaret])?_jsxruntime.jsx.call(void 0, "div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:_jsxruntime.jsx.call(void 0, "div",{className:"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px"})}):null]})});m.displayName="InputOTPSlot";var c=n.forwardRef(({...t},e)=>_jsxruntime.jsx.call(void 0, "div",{ref:e,role:"separator",...t,children:_jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon,{})}));c.displayName="InputOTPSeparator";exports.InputOTP = P; exports.InputOTPGroup = T; exports.InputOTPSeparator = c; exports.InputOTPSlot = m; exports.REGEXP_ONLY_CHARS = _inputotp.REGEXP_ONLY_CHARS; exports.REGEXP_ONLY_DIGITS = _inputotp.REGEXP_ONLY_DIGITS; exports.REGEXP_ONLY_DIGITS_AND_CHARS = _inputotp.REGEXP_ONLY_DIGITS_AND_CHARS;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var n = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _inputotp = require('input-otp');var _jsxruntime = require('react/jsx-runtime');var P=n.forwardRef(({className:t,containerClassName:e,...p},a)=>_jsxruntime.jsx.call(void 0, _inputotp.OTPInput,{ref:a,containerClassName:_chunkHQ4AUOQMjs.b.call(void 0, "flex items-center gap-2 has-[:disabled]:opacity-50",e),className:_chunkHQ4AUOQMjs.b.call(void 0, "disabled:cursor-not-allowed",t),...p}));P.displayName="InputOTP";var T=n.forwardRef(({className:t,...e},p)=>_jsxruntime.jsx.call(void 0, "div",{ref:p,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex items-center",t),...e}));T.displayName="InputOTPGroup";var m=n.forwardRef(({index:t,className:e,...p},a)=>{let s=n.useContext(_inputotp.OTPInputContext).slots[t];return _jsxruntime.jsxs.call(void 0, "div",{ref:a,className:_chunkHQ4AUOQMjs.b.call(void 0, "border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",_optionalChain([s, 'optionalAccess', _ => _.isActive])&&"z-10 outline outline-2",e),...p,children:[_optionalChain([s, 'optionalAccess', _2 => _2.char]),_optionalChain([s, 'optionalAccess', _3 => _3.hasFakeCaret])?_jsxruntime.jsx.call(void 0, "div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:_jsxruntime.jsx.call(void 0, "div",{className:"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px"})}):null]})});m.displayName="InputOTPSlot";var c=n.forwardRef(({...t},e)=>_jsxruntime.jsx.call(void 0, "div",{ref:e,role:"separator",...t,children:_jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon,{})}));c.displayName="InputOTPSeparator";exports.InputOTP = P; exports.InputOTPGroup = T; exports.InputOTPSeparator = c; exports.InputOTPSlot = m; exports.REGEXP_ONLY_CHARS = _inputotp.REGEXP_ONLY_CHARS; exports.REGEXP_ONLY_DIGITS = _inputotp.REGEXP_ONLY_DIGITS; exports.REGEXP_ONLY_DIGITS_AND_CHARS = _inputotp.REGEXP_ONLY_DIGITS_AND_CHARS;
2
2
  //# sourceMappingURL=input-otp.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/input-otp.tsx"],"names":["React","DotFilledIcon","OTPInput","OTPInputContext","REGEXP_ONLY_CHARS","REGEXP_ONLY_DIGITS","REGEXP_ONLY_DIGITS_AND_CHARS","jsx","jsxs","InputOTP","className","containerClassName","props","ref","cn","InputOTPGroup","InputOTPSlot","index","slot","InputOTPSeparator"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,iBAAAC,MAAqB,wBAC9B,OACE,YAAAC,EACA,mBAAAC,EACA,qBAAAC,EACA,sBAAAC,EACA,gCAAAC,MACK,YAYH,cAAAC,EAuCA,QAAAC,MAvCA,oBAFJ,IAAMC,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,CAAM,EAAGC,IAC5CN,EAACL,EAAA,CACC,IAAKW,EACL,mBAAoBC,EAAG,qDAAsDH,CAAkB,EAC/F,UAAWG,EAAG,8BAA+BJ,CAAS,EACrD,GAAGE,EACN,CAEJ,EAEAH,EAAS,YAAc,WASvB,IAAMM,EAAsB,aAAqD,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IACzGN,EAAC,OAAI,IAAKM,EAAK,UAAWC,EAAG,oBAAqBJ,CAAS,EAAI,GAAGE,EAAO,CAC1E,EAEDG,EAAc,YAAc,gBAY5B,IAAMC,EAAqB,aAAmD,CAAC,CAAE,MAAAC,EAAO,UAAAP,EAAW,GAAGE,CAAM,EAAGC,IAAQ,CAErH,IAAMK,EADwB,aAAWf,CAAe,EAC3B,MAAMc,CAAK,EAExC,OACET,EAAC,OACC,IAAKK,EACL,UAAWC,EACT,8JACAI,GAAM,UAAY,yBAClBR,CACF,EACC,GAAGE,EAEH,UAAAM,GAAM,KACNA,GAAM,aACLX,EAAC,OAAI,UAAU,wEACb,SAAAA,EAAC,OAAI,UAAU,mEAAmE,EACpF,EACE,MACN,CAEJ,CAAC,EAEDS,EAAa,YAAc,eAS3B,IAAMG,EAA0B,aAA6D,CAAC,CAAE,GAAGP,CAAM,EAAGC,IAC1GN,EAAC,OAAI,IAAKM,EAAK,KAAK,YAAa,GAAGD,EAClC,SAAAL,EAACN,EAAA,EAAc,EACjB,CACD,EAEDkB,EAAkB,YAAc","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { DotFilledIcon } from \"@radix-ui/react-icons\";\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n} from \"input-otp\";\nimport { cn } from \"../lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: InputOtp\n * -------------------------------------------------------------------------- */\n\ntype InputOTPElement = React.ElementRef<typeof OTPInput>;\ntype InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;\n\nconst InputOTP = React.forwardRef<InputOTPElement, InputOTPProps>(\n ({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\"flex items-center gap-2 has-[:disabled]:opacity-50\", containerClassName)}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n ),\n);\n\nInputOTP.displayName = \"InputOTP\";\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPGroup\n * -------------------------------------------------------------------------- */\n\ntype InputOTPGroupElement = HTMLDivElement;\ntype InputOTPGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPGroup = React.forwardRef<InputOTPGroupElement, InputOTPGroupProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n));\n\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSlot\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSlotElement = HTMLDivElement;\n\ninterface InputOTPSlotProps extends React.HTMLAttributes<HTMLDivElement> {\n index: number;\n}\n\nconst InputOTPSlot = React.forwardRef<InputOTPSlotElement, InputOTPSlotProps>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const slot = inputOTPContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md\",\n slot?.isActive && \"z-10 outline outline-2\",\n className,\n )}\n {...props}\n >\n {slot?.char}\n {slot?.hasFakeCaret ? (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px\" />\n </div>\n ) : null}\n </div>\n );\n});\n\nInputOTPSlot.displayName = \"InputOTPSlot\";\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSeparator\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSeparatorElement = HTMLDivElement;\ntype InputOTPSeparatorProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPSeparator = React.forwardRef<InputOTPSeparatorElement, InputOTPSeparatorProps>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <DotFilledIcon />\n </div>\n));\n\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n type InputOTPProps,\n type InputOTPGroupProps,\n type InputOTPSlotProps,\n type InputOTPSeparatorProps,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/input-otp.tsx"],"names":["React","DotFilledIcon","OTPInput","OTPInputContext","REGEXP_ONLY_CHARS","REGEXP_ONLY_DIGITS","REGEXP_ONLY_DIGITS_AND_CHARS","jsx","jsxs","InputOTP","className","containerClassName","props","ref","cn","InputOTPGroup","InputOTPSlot","index","slot","InputOTPSeparator"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,iBAAAC,MAAqB,wBAC9B,OACE,YAAAC,EACA,mBAAAC,EACA,qBAAAC,EACA,sBAAAC,EACA,gCAAAC,MACK,YAYH,cAAAC,EA8CE,QAAAC,MA9CF,oBAFJ,IAAMC,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,CAAM,EAAGC,IAC5CN,EAACL,EAAA,CACC,IAAKW,EACL,mBAAoBC,EAClB,qDACAH,CACF,EACA,UAAWG,EAAG,8BAA+BJ,CAAS,EACrD,GAAGE,EACN,CAEJ,EAEAH,EAAS,YAAc,WASvB,IAAMM,EAAsB,aAG1B,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IAC1BN,EAAC,OAAI,IAAKM,EAAK,UAAWC,EAAG,oBAAqBJ,CAAS,EAAI,GAAGE,EAAO,CAC1E,EAEDG,EAAc,YAAc,gBAY5B,IAAMC,EAAqB,aACzB,CAAC,CAAE,MAAAC,EAAO,UAAAP,EAAW,GAAGE,CAAM,EAAGC,IAAQ,CAEvC,IAAMK,EADwB,aAAWf,CAAe,EAC3B,MAAMc,CAAK,EAExC,OACET,EAAC,OACC,IAAKK,EACL,UAAWC,EACT,8JACAI,GAAM,UAAY,yBAClBR,CACF,EACC,GAAGE,EAEH,UAAAM,GAAM,KACNA,GAAM,aACLX,EAAC,OAAI,UAAU,wEACb,SAAAA,EAAC,OAAI,UAAU,mEAAmE,EACpF,EACE,MACN,CAEJ,CACF,EAEAS,EAAa,YAAc,eAS3B,IAAMG,EAA0B,aAG9B,CAAC,CAAE,GAAGP,CAAM,EAAGC,IACfN,EAAC,OAAI,IAAKM,EAAK,KAAK,YAAa,GAAGD,EAClC,SAAAL,EAACN,EAAA,EAAc,EACjB,CACD,EAEDkB,EAAkB,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { DotFilledIcon } from '@radix-ui/react-icons';\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n} from 'input-otp';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOtp\n * -------------------------------------------------------------------------- */\n\ntype InputOTPElement = React.ElementRef<typeof OTPInput>;\ntype InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;\n\nconst InputOTP = React.forwardRef<InputOTPElement, InputOTPProps>(\n ({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n 'flex items-center gap-2 has-[:disabled]:opacity-50',\n containerClassName,\n )}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n ),\n);\n\nInputOTP.displayName = 'InputOTP';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPGroup\n * -------------------------------------------------------------------------- */\n\ntype InputOTPGroupElement = HTMLDivElement;\ntype InputOTPGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPGroup = React.forwardRef<\n InputOTPGroupElement,\n InputOTPGroupProps\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center', className)} {...props} />\n));\n\nInputOTPGroup.displayName = 'InputOTPGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSlot\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSlotElement = HTMLDivElement;\n\ninterface InputOTPSlotProps extends React.HTMLAttributes<HTMLDivElement> {\n index: number;\n}\n\nconst InputOTPSlot = React.forwardRef<InputOTPSlotElement, InputOTPSlotProps>(\n ({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const slot = inputOTPContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md',\n slot?.isActive && 'z-10 outline outline-2',\n className,\n )}\n {...props}\n >\n {slot?.char}\n {slot?.hasFakeCaret ? (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px\" />\n </div>\n ) : null}\n </div>\n );\n },\n);\n\nInputOTPSlot.displayName = 'InputOTPSlot';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSeparator\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSeparatorElement = HTMLDivElement;\ntype InputOTPSeparatorProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPSeparator = React.forwardRef<\n InputOTPSeparatorElement,\n InputOTPSeparatorProps\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <DotFilledIcon />\n </div>\n));\n\nInputOTPSeparator.displayName = 'InputOTPSeparator';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n type InputOTPProps,\n type InputOTPGroupProps,\n type InputOTPSlotProps,\n type InputOTPSeparatorProps,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n};\n"]}