@gv-tech/design-system 2.29.0 → 2.29.1

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 (361) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.cjs.map +1 -1
  3. package/dist/accordion.mjs +11 -11
  4. package/dist/accordion.mjs.map +1 -1
  5. package/dist/alert-dialog.cjs +1 -1
  6. package/dist/alert-dialog.cjs.map +1 -1
  7. package/dist/alert-dialog.mjs +15 -15
  8. package/dist/alert-dialog.mjs.map +1 -1
  9. package/dist/alert.cjs +1 -1
  10. package/dist/alert.cjs.map +1 -1
  11. package/dist/alert.mjs +3 -3
  12. package/dist/alert.mjs.map +1 -1
  13. package/dist/aspect-ratio.cjs +1 -1
  14. package/dist/aspect-ratio.cjs.map +1 -1
  15. package/dist/aspect-ratio.mjs +1 -1
  16. package/dist/aspect-ratio.mjs.map +1 -1
  17. package/dist/attachment.cjs +1 -1
  18. package/dist/attachment.cjs.map +1 -1
  19. package/dist/attachment.mjs +3 -3
  20. package/dist/attachment.mjs.map +1 -1
  21. package/dist/avatar.cjs +1 -1
  22. package/dist/avatar.cjs.map +1 -1
  23. package/dist/avatar.mjs +2 -2
  24. package/dist/avatar.mjs.map +1 -1
  25. package/dist/badge.cjs +1 -1
  26. package/dist/badge.cjs.map +1 -1
  27. package/dist/badge.mjs +3 -3
  28. package/dist/badge.mjs.map +1 -1
  29. package/dist/breadcrumb.cjs +1 -1
  30. package/dist/breadcrumb.cjs.map +1 -1
  31. package/dist/breadcrumb.mjs +1 -3
  32. package/dist/breadcrumb.mjs.map +1 -1
  33. package/dist/bubble.cjs +1 -1
  34. package/dist/bubble.cjs.map +1 -1
  35. package/dist/bubble.mjs +4 -4
  36. package/dist/bubble.mjs.map +1 -1
  37. package/dist/button-group.cjs +1 -1
  38. package/dist/button-group.cjs.map +1 -1
  39. package/dist/button-group.mjs +2 -3
  40. package/dist/button-group.mjs.map +1 -1
  41. package/dist/button.cjs +1 -1
  42. package/dist/button.cjs.map +1 -1
  43. package/dist/button.mjs +3 -3
  44. package/dist/button.mjs.map +1 -1
  45. package/dist/calendar.cjs +1 -1
  46. package/dist/calendar.cjs.map +1 -1
  47. package/dist/calendar.mjs +8 -8
  48. package/dist/calendar.mjs.map +1 -1
  49. package/dist/card.cjs +1 -1
  50. package/dist/card.cjs.map +1 -1
  51. package/dist/card.mjs +1 -1
  52. package/dist/card.mjs.map +1 -1
  53. package/dist/carousel.cjs +1 -1
  54. package/dist/carousel.cjs.map +1 -1
  55. package/dist/carousel.mjs +3 -5
  56. package/dist/carousel.mjs.map +1 -1
  57. package/dist/chart.cjs +1 -1
  58. package/dist/chart.mjs +1 -1
  59. package/dist/checkbox.cjs +1 -1
  60. package/dist/checkbox.cjs.map +1 -1
  61. package/dist/checkbox.mjs +1 -1
  62. package/dist/checkbox.mjs.map +1 -1
  63. package/dist/collapsible.cjs +1 -1
  64. package/dist/collapsible.cjs.map +1 -1
  65. package/dist/collapsible.mjs +4 -4
  66. package/dist/collapsible.mjs.map +1 -1
  67. package/dist/combobox.cjs +1 -1
  68. package/dist/combobox.cjs.map +1 -1
  69. package/dist/combobox.mjs +1 -1
  70. package/dist/combobox.mjs.map +1 -1
  71. package/dist/command.cjs +1 -1
  72. package/dist/command.cjs.map +1 -1
  73. package/dist/command.mjs +1 -1
  74. package/dist/command.mjs.map +1 -1
  75. package/dist/context-menu.cjs +1 -1
  76. package/dist/context-menu.cjs.map +1 -1
  77. package/dist/context-menu.mjs +23 -23
  78. package/dist/context-menu.mjs.map +1 -1
  79. package/dist/design-system.css +1 -1
  80. package/dist/dialog.cjs +1 -1
  81. package/dist/dialog.cjs.map +1 -1
  82. package/dist/dialog.mjs +1 -1
  83. package/dist/dialog.mjs.map +1 -1
  84. package/dist/direction.cjs +1 -1
  85. package/dist/direction.cjs.map +1 -1
  86. package/dist/direction.mjs +1 -1
  87. package/dist/direction.mjs.map +1 -1
  88. package/dist/drawer.cjs +1 -1
  89. package/dist/drawer.cjs.map +1 -1
  90. package/dist/drawer.mjs +1 -1
  91. package/dist/drawer.mjs.map +1 -1
  92. package/dist/dropdown-menu.cjs +1 -1
  93. package/dist/dropdown-menu.cjs.map +1 -1
  94. package/dist/dropdown-menu.mjs +23 -23
  95. package/dist/dropdown-menu.mjs.map +1 -1
  96. package/dist/empty.cjs +1 -1
  97. package/dist/empty.cjs.map +1 -1
  98. package/dist/empty.mjs +2 -2
  99. package/dist/empty.mjs.map +1 -1
  100. package/dist/field.cjs +1 -1
  101. package/dist/field.cjs.map +1 -1
  102. package/dist/field.mjs +3 -4
  103. package/dist/field.mjs.map +1 -1
  104. package/dist/form.cjs +1 -1
  105. package/dist/form.cjs.map +1 -1
  106. package/dist/form.mjs +2 -2
  107. package/dist/form.mjs.map +1 -1
  108. package/dist/hover-card.cjs +1 -1
  109. package/dist/hover-card.cjs.map +1 -1
  110. package/dist/hover-card.mjs +6 -6
  111. package/dist/hover-card.mjs.map +1 -1
  112. package/dist/index.cjs +1 -1
  113. package/dist/index.mjs +5 -5
  114. package/dist/input-group.cjs +1 -1
  115. package/dist/input-group.cjs.map +1 -1
  116. package/dist/input-group.mjs +4 -9
  117. package/dist/input-group.mjs.map +1 -1
  118. package/dist/input-otp.cjs +1 -1
  119. package/dist/input-otp.cjs.map +1 -1
  120. package/dist/input-otp.mjs +2 -2
  121. package/dist/input-otp.mjs.map +1 -1
  122. package/dist/input.cjs +1 -1
  123. package/dist/input.cjs.map +1 -1
  124. package/dist/input.mjs +1 -1
  125. package/dist/input.mjs.map +1 -1
  126. package/dist/item.cjs +1 -1
  127. package/dist/item.cjs.map +1 -1
  128. package/dist/item.mjs +4 -5
  129. package/dist/item.mjs.map +1 -1
  130. package/dist/kbd.cjs +1 -1
  131. package/dist/kbd.cjs.map +1 -1
  132. package/dist/kbd.mjs +1 -1
  133. package/dist/kbd.mjs.map +1 -1
  134. package/dist/label.cjs +1 -1
  135. package/dist/label.cjs.map +1 -1
  136. package/dist/label.mjs +1 -1
  137. package/dist/label.mjs.map +1 -1
  138. package/dist/marker.cjs +1 -1
  139. package/dist/marker.cjs.map +1 -1
  140. package/dist/marker.mjs +4 -4
  141. package/dist/marker.mjs.map +1 -1
  142. package/dist/menubar.cjs +1 -1
  143. package/dist/menubar.cjs.map +1 -1
  144. package/dist/menubar.mjs +20 -20
  145. package/dist/menubar.mjs.map +1 -1
  146. package/dist/message-scroller.cjs +1 -1
  147. package/dist/message-scroller.cjs.map +1 -1
  148. package/dist/message-scroller.mjs +1 -1
  149. package/dist/message-scroller.mjs.map +1 -1
  150. package/dist/message.cjs +1 -1
  151. package/dist/message.cjs.map +1 -1
  152. package/dist/message.mjs +1 -1
  153. package/dist/message.mjs.map +1 -1
  154. package/dist/native-select.cjs +1 -1
  155. package/dist/native-select.cjs.map +1 -1
  156. package/dist/native-select.mjs +1 -1
  157. package/dist/native-select.mjs.map +1 -1
  158. package/dist/navigation-menu.cjs +1 -1
  159. package/dist/navigation-menu.cjs.map +1 -1
  160. package/dist/navigation-menu.mjs +8 -8
  161. package/dist/navigation-menu.mjs.map +1 -1
  162. package/dist/packages/ui-core/src/contracts/scroll-to-top.d.ts +1 -2
  163. package/dist/packages/ui-core/src/contracts/table-of-contents.d.ts +5 -18
  164. package/dist/packages/ui-web/src/__contracts.d.ts +0 -1
  165. package/dist/packages/ui-web/src/accordion.d.ts +1 -1
  166. package/dist/packages/ui-web/src/alert-dialog.d.ts +1 -1
  167. package/dist/packages/ui-web/src/alert.d.ts +1 -1
  168. package/dist/packages/ui-web/src/aspect-ratio.d.ts +2 -2
  169. package/dist/packages/ui-web/src/attachment.d.ts +1 -1
  170. package/dist/packages/ui-web/src/avatar.d.ts +1 -1
  171. package/dist/packages/ui-web/src/badge.d.ts +1 -1
  172. package/dist/packages/ui-web/src/bubble.d.ts +1 -1
  173. package/dist/packages/ui-web/src/button-group.d.ts +3 -3
  174. package/dist/packages/ui-web/src/button.d.ts +1 -1
  175. package/dist/packages/ui-web/src/calendar.d.ts +1 -1
  176. package/dist/packages/ui-web/src/carousel.d.ts +3 -3
  177. package/dist/packages/ui-web/src/checkbox.d.ts +1 -1
  178. package/dist/packages/ui-web/src/collapsible.d.ts +4 -4
  179. package/dist/packages/ui-web/src/command.d.ts +1 -1
  180. package/dist/packages/ui-web/src/context-menu.d.ts +1 -1
  181. package/dist/packages/ui-web/src/dialog.d.ts +1 -1
  182. package/dist/packages/ui-web/src/direction.d.ts +1 -1
  183. package/dist/packages/ui-web/src/drawer.d.ts +1 -1
  184. package/dist/packages/ui-web/src/dropdown-menu.d.ts +1 -1
  185. package/dist/packages/ui-web/src/empty.d.ts +7 -7
  186. package/dist/packages/ui-web/src/field.d.ts +11 -11
  187. package/dist/packages/ui-web/src/form.d.ts +3 -3
  188. package/dist/packages/ui-web/src/hover-card.d.ts +1 -1
  189. package/dist/packages/ui-web/src/input-group.d.ts +3 -3
  190. package/dist/packages/ui-web/src/input-otp.d.ts +1 -1
  191. package/dist/packages/ui-web/src/item.d.ts +2 -2
  192. package/dist/packages/ui-web/src/kbd.d.ts +2 -2
  193. package/dist/packages/ui-web/src/label.d.ts +1 -1
  194. package/dist/packages/ui-web/src/marker.d.ts +1 -1
  195. package/dist/packages/ui-web/src/menubar.d.ts +1 -1
  196. package/dist/packages/ui-web/src/message-scroller.d.ts +1 -1
  197. package/dist/packages/ui-web/src/navigation-menu.d.ts +1 -1
  198. package/dist/packages/ui-web/src/pagination.d.ts +2 -2
  199. package/dist/packages/ui-web/src/popover.d.ts +1 -1
  200. package/dist/packages/ui-web/src/progress.d.ts +1 -1
  201. package/dist/packages/ui-web/src/questionnaire.d.ts +1 -1
  202. package/dist/packages/ui-web/src/resizable.d.ts +3 -3
  203. package/dist/packages/ui-web/src/scroll-area.d.ts +1 -1
  204. package/dist/packages/ui-web/src/select.d.ts +1 -1
  205. package/dist/packages/ui-web/src/separator.d.ts +1 -1
  206. package/dist/packages/ui-web/src/sheet.d.ts +1 -1
  207. package/dist/packages/ui-web/src/sidebar.d.ts +1 -1
  208. package/dist/packages/ui-web/src/skeleton.d.ts +1 -1
  209. package/dist/packages/ui-web/src/slider.d.ts +1 -1
  210. package/dist/packages/ui-web/src/sonner.d.ts +1 -1
  211. package/dist/packages/ui-web/src/spinner.d.ts +2 -1
  212. package/dist/packages/ui-web/src/switch.d.ts +1 -1
  213. package/dist/packages/ui-web/src/table-of-contents.d.ts +5 -10
  214. package/dist/packages/ui-web/src/tabs.d.ts +1 -1
  215. package/dist/packages/ui-web/src/text.d.ts +1 -1
  216. package/dist/packages/ui-web/src/theme-provider.d.ts +1 -1
  217. package/dist/packages/ui-web/src/theme-toggle.d.ts +1 -1
  218. package/dist/packages/ui-web/src/toast.d.ts +1 -1
  219. package/dist/packages/ui-web/src/toaster.d.ts +1 -1
  220. package/dist/packages/ui-web/src/toggle-group.d.ts +1 -1
  221. package/dist/packages/ui-web/src/toggle.d.ts +1 -1
  222. package/dist/packages/ui-web/src/tooltip.d.ts +1 -1
  223. package/dist/pagination.cjs +1 -1
  224. package/dist/pagination.cjs.map +1 -1
  225. package/dist/pagination.mjs +4 -3
  226. package/dist/pagination.mjs.map +1 -1
  227. package/dist/popover.cjs +1 -1
  228. package/dist/popover.cjs.map +1 -1
  229. package/dist/popover.mjs +7 -7
  230. package/dist/popover.mjs.map +1 -1
  231. package/dist/progress.cjs +1 -1
  232. package/dist/progress.cjs.map +1 -1
  233. package/dist/progress.mjs +3 -3
  234. package/dist/progress.mjs.map +1 -1
  235. package/dist/questionnaire.cjs +1 -1
  236. package/dist/questionnaire.cjs.map +1 -1
  237. package/dist/questionnaire.mjs +1 -1
  238. package/dist/questionnaire.mjs.map +1 -1
  239. package/dist/radio-group.cjs +1 -1
  240. package/dist/radio-group.mjs +1 -1
  241. package/dist/resizable.cjs +1 -1
  242. package/dist/resizable.mjs +1 -1
  243. package/dist/scroll-area.cjs +1 -1
  244. package/dist/scroll-area.cjs.map +1 -1
  245. package/dist/scroll-area.mjs +3 -3
  246. package/dist/scroll-area.mjs.map +1 -1
  247. package/dist/scroll-to-top.cjs +1 -1
  248. package/dist/scroll-to-top.cjs.map +1 -1
  249. package/dist/scroll-to-top.mjs +9 -7
  250. package/dist/scroll-to-top.mjs.map +1 -1
  251. package/dist/search.cjs +1 -1
  252. package/dist/search.cjs.map +1 -1
  253. package/dist/search.mjs +2 -2
  254. package/dist/search.mjs.map +1 -1
  255. package/dist/select.cjs +1 -1
  256. package/dist/select.cjs.map +1 -1
  257. package/dist/select.mjs +1 -1
  258. package/dist/select.mjs.map +1 -1
  259. package/dist/separator.cjs +1 -1
  260. package/dist/separator.cjs.map +1 -1
  261. package/dist/separator.mjs +1 -1
  262. package/dist/separator.mjs.map +1 -1
  263. package/dist/sheet.cjs +1 -1
  264. package/dist/sheet.cjs.map +1 -1
  265. package/dist/sheet.mjs +1 -1
  266. package/dist/sheet.mjs.map +1 -1
  267. package/dist/{sidebar-C5ukZKYH.mjs → sidebar-Cl3zXgaX.mjs} +5 -5
  268. package/dist/sidebar-Cl3zXgaX.mjs.map +1 -0
  269. package/dist/sidebar-DQzY8XPP.js +2 -0
  270. package/dist/sidebar-DQzY8XPP.js.map +1 -0
  271. package/dist/sidebar.cjs +1 -1
  272. package/dist/sidebar.mjs +1 -1
  273. package/dist/skeleton.cjs +1 -1
  274. package/dist/skeleton.cjs.map +1 -1
  275. package/dist/skeleton.mjs +1 -1
  276. package/dist/skeleton.mjs.map +1 -1
  277. package/dist/slider.cjs +1 -1
  278. package/dist/slider.cjs.map +1 -1
  279. package/dist/slider.mjs +1 -1
  280. package/dist/slider.mjs.map +1 -1
  281. package/dist/sonner.cjs +1 -1
  282. package/dist/sonner.mjs +1 -1
  283. package/dist/spinner.cjs +1 -1
  284. package/dist/spinner.cjs.map +1 -1
  285. package/dist/spinner.mjs +9 -5
  286. package/dist/spinner.mjs.map +1 -1
  287. package/dist/support-fab.cjs +1 -1
  288. package/dist/support-fab.cjs.map +1 -1
  289. package/dist/support-fab.mjs +2 -2
  290. package/dist/support-fab.mjs.map +1 -1
  291. package/dist/switch.cjs +1 -1
  292. package/dist/switch.cjs.map +1 -1
  293. package/dist/switch.mjs +1 -1
  294. package/dist/switch.mjs.map +1 -1
  295. package/dist/table-of-contents.cjs +1 -1
  296. package/dist/table-of-contents.cjs.map +1 -1
  297. package/dist/table-of-contents.mjs +3 -2
  298. package/dist/table-of-contents.mjs.map +1 -1
  299. package/dist/table.cjs +1 -1
  300. package/dist/table.cjs.map +1 -1
  301. package/dist/table.mjs +1 -1
  302. package/dist/table.mjs.map +1 -1
  303. package/dist/tabs.cjs +1 -1
  304. package/dist/tabs.cjs.map +1 -1
  305. package/dist/tabs.mjs +7 -7
  306. package/dist/tabs.mjs.map +1 -1
  307. package/dist/text.cjs +1 -1
  308. package/dist/text.cjs.map +1 -1
  309. package/dist/text.mjs +5 -5
  310. package/dist/text.mjs.map +1 -1
  311. package/dist/textarea.cjs +1 -1
  312. package/dist/textarea.cjs.map +1 -1
  313. package/dist/textarea.mjs +1 -1
  314. package/dist/textarea.mjs.map +1 -1
  315. package/dist/theme-provider.cjs +1 -1
  316. package/dist/theme-provider.cjs.map +1 -1
  317. package/dist/theme-provider.mjs +1 -1
  318. package/dist/theme-provider.mjs.map +1 -1
  319. package/dist/{theme-toggle-BGVdrh4J.mjs → theme-toggle-ldAbIn1Q.mjs} +22 -13
  320. package/dist/{theme-toggle-BGVdrh4J.mjs.map → theme-toggle-ldAbIn1Q.mjs.map} +1 -1
  321. package/dist/{theme-toggle-CMdzi7Y8.js → theme-toggle-nNtzABo6.js} +2 -2
  322. package/dist/{theme-toggle-CMdzi7Y8.js.map → theme-toggle-nNtzABo6.js.map} +1 -1
  323. package/dist/theme-toggle.cjs +1 -1
  324. package/dist/theme-toggle.mjs +1 -1
  325. package/dist/toast.cjs +1 -1
  326. package/dist/toast.cjs.map +1 -1
  327. package/dist/toast.mjs +19 -19
  328. package/dist/toast.mjs.map +1 -1
  329. package/dist/{toaster-D9OZF7hL.js → toaster-BRNNfjp9.js} +2 -2
  330. package/dist/{toaster-D9OZF7hL.js.map → toaster-BRNNfjp9.js.map} +1 -1
  331. package/dist/{toaster-CfNd-vsx.mjs → toaster-_FgrA-3c.mjs} +2 -2
  332. package/dist/{toaster-CfNd-vsx.mjs.map → toaster-_FgrA-3c.mjs.map} +1 -1
  333. package/dist/toaster.cjs +1 -1
  334. package/dist/toaster.mjs +1 -1
  335. package/dist/toggle-group.cjs +1 -1
  336. package/dist/toggle-group.cjs.map +1 -1
  337. package/dist/toggle-group.mjs +1 -1
  338. package/dist/toggle-group.mjs.map +1 -1
  339. package/dist/toggle.cjs +1 -1
  340. package/dist/toggle.cjs.map +1 -1
  341. package/dist/toggle.mjs +3 -3
  342. package/dist/toggle.mjs.map +1 -1
  343. package/dist/tooltip.cjs +1 -1
  344. package/dist/tooltip.cjs.map +1 -1
  345. package/dist/tooltip.mjs +6 -6
  346. package/dist/tooltip.mjs.map +1 -1
  347. package/dist/{utils-CnOgTvBJ.js → utils-BROwqSso.js} +2 -2
  348. package/dist/{utils-CnOgTvBJ.js.map → utils-BROwqSso.js.map} +1 -1
  349. package/dist/{utils-BtHTUEvP.mjs → utils-BurmJD8d.mjs} +2 -2
  350. package/dist/{utils-BtHTUEvP.mjs.map → utils-BurmJD8d.mjs.map} +1 -1
  351. package/dist/{vendor-D9rWr_E8.mjs → vendor-0E4gGRxj.mjs} +13885 -12065
  352. package/dist/vendor-0E4gGRxj.mjs.map +1 -0
  353. package/dist/vendor-Bz5F_va8.js +101 -0
  354. package/dist/vendor-Bz5F_va8.js.map +1 -0
  355. package/package.json +44 -49
  356. package/dist/sidebar-C5ukZKYH.mjs.map +0 -1
  357. package/dist/sidebar-DyP2Q-Ru.js +0 -2
  358. package/dist/sidebar-DyP2Q-Ru.js.map +0 -1
  359. package/dist/vendor-D9rWr_E8.mjs.map +0 -1
  360. package/dist/vendor-i1KCLryV.js +0 -101
  361. package/dist/vendor-i1KCLryV.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.cjs","names":[],"sources":["../packages/ui-web/src/calendar.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from 'cn';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { DayPicker, getDefaultClassNames, type DayButton, type Locale } from 'react-day-picker';\n\nimport { Button, buttonVariants } from '@/./button';\n\nimport type { CalendarBaseProps } from '@gv-tech/ui-core';\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n locale,\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n locale={locale}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: 'short' }),\n ...formatters,\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn('relative rounded-(--cell-radius)', defaultClassNames.dropdown_root),\n dropdown: cn('absolute inset-0 bg-popover opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : 'flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground',\n defaultClassNames.caption_label,\n ),\n month_grid: cn('w-full border-collapse', defaultClassNames.month_grid),\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none',\n defaultClassNames.weekday,\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn('w-(--cell-size) select-none', defaultClassNames.week_number_header),\n week_number: cn('text-[0.8rem] text-muted-foreground select-none', defaultClassNames.week_number),\n day: cn(\n 'group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)',\n props.showWeekNumber\n ? '[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)'\n : '[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)',\n defaultClassNames.day,\n ),\n range_start: cn(\n 'relative isolate z-0 rounded-s-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-muted',\n defaultClassNames.range_start,\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn(\n 'relative isolate z-0 rounded-e-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-muted',\n defaultClassNames.range_end,\n ),\n today: cn(\n 'rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none',\n defaultClassNames.today,\n ),\n outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),\n disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return <ChevronLeftIcon className={cn('size-4 rtl:rotate-180', className)} {...props} />;\n }\n\n if (orientation === 'right') {\n return <ChevronRightIcon className={cn('size-4 rtl:rotate-180', className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn('size-4', className)} {...props} />;\n },\n DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">{children}</div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n locale,\n ...props\n}: React.ComponentProps<typeof DayButton> & { locale?: Partial<Locale> }) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) {\n ref.current?.focus();\n }\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString(locale?.code)}\n data-selected-single={\n modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCalendarContract = React.ComponentProps<typeof Calendar> extends CalendarBaseProps ? true : false;\n"],"mappings":"wPAWA,SAAS,EAAS,CAChB,YACA,aACA,kBAAkB,GAClB,gBAAgB,QAChB,gBAAgB,QAChB,SACA,aACA,aACA,GAAG,GAGF,CACD,IAAM,EAAoB,EAAA,EAAqB,EAE/C,OACE,EAAA,EAAA,KAAC,EAAA,EAAD,CACmB,kBACjB,UAAW,EAAA,GACT,wLACA,OAAO,GAAG,4CACV,OAAO,GAAG,gDACV,CACF,EACe,gBACP,SACR,WAAY,CACV,oBAAsB,GAAS,EAAK,eAAe,GAAQ,KAAM,CAAE,MAAO,OAAQ,CAAC,EACnF,GAAG,CACL,EACA,WAAY,CACV,KAAM,EAAA,GAAG,QAAS,EAAkB,IAAI,EACxC,OAAQ,EAAA,GAAG,2CAA4C,EAAkB,MAAM,EAC/E,MAAO,EAAA,GAAG,6BAA8B,EAAkB,KAAK,EAC/D,IAAK,EAAA,GAAG,0EAA2E,EAAkB,GAAG,EACxG,gBAAiB,EAAA,GACf,EAAA,eAAe,CAAE,QAAS,CAAc,CAAC,EACzC,8DACA,EAAkB,eACpB,EACA,YAAa,EAAA,GACX,EAAA,eAAe,CAAE,QAAS,CAAc,CAAC,EACzC,8DACA,EAAkB,WACpB,EACA,cAAe,EAAA,GACb,2EACA,EAAkB,aACpB,EACA,UAAW,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wBAAyB,CAAS,EAAG,GAAI,CAAQ,CAAA,GAGnF,EAAA,EAAA,KAAC,EAAA,GAAD,CAAiB,UAAW,EAAA,GAAG,SAAU,CAAS,EAAG,GAAI,CAAQ,CAAA,EAE1E,WAAY,CAAE,GAAG,MAAY,EAAA,EAAA,KAAC,EAAD,CAA2B,SAAQ,GAAI,CAAQ,CAAA,EAC5E,YAAa,CAAE,WAAU,GAAG,MAExB,EAAA,EAAA,KAAC,KAAD,CAAI,GAAI,YACN,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,kEAAmE,UAAc,CAAA,CAC9F,CAAA,EAGR,GAAG,CACL,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAkB,CACzB,YACA,MACA,YACA,SACA,GAAG,GACqE,CACxE,IAAM,EAAoB,EAAA,EAAqB,EAEzC,EAAM,EAAM,OAA0B,IAAI,EAOhD,OANA,EAAM,cAAgB,CAChB,EAAU,SACZ,EAAI,SAAS,MAAM,CAEvB,EAAG,CAAC,EAAU,OAAO,CAAC,GAGpB,EAAA,EAAA,KAAC,EAAA,OAAD,CACO,MACL,QAAQ,QACR,KAAK,OACL,WAAU,EAAI,KAAK,mBAAmB,GAAQ,IAAI,EAClD,uBACE,EAAU,UAAY,CAAC,EAAU,aAAe,CAAC,EAAU,WAAa,CAAC,EAAU,aAErF,mBAAkB,EAAU,YAC5B,iBAAgB,EAAU,UAC1B,oBAAmB,EAAU,aAC7B,UAAW,EAAA,GACT,u7BACA,EAAkB,IAClB,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"calendar.cjs","names":[],"sources":["../packages/ui-web/src/calendar.tsx"],"sourcesContent":["'use client';\n\nimport type { CalendarBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { DayPicker, getDefaultClassNames, type DayButton, type Locale } from 'react-day-picker';\n\nimport { Button, buttonVariants } from '@/./button';\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n locale,\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n locale={locale}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: 'short' }),\n ...formatters,\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn('relative rounded-(--cell-radius)', defaultClassNames.dropdown_root),\n dropdown: cn('bg-popover absolute inset-0 opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : '[&>svg]:text-muted-foreground flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5',\n defaultClassNames.caption_label,\n ),\n month_grid: cn('w-full border-collapse', defaultClassNames.month_grid),\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'text-muted-foreground flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal select-none',\n defaultClassNames.weekday,\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn('w-(--cell-size) select-none', defaultClassNames.week_number_header),\n week_number: cn('text-muted-foreground text-[0.8rem] select-none', defaultClassNames.week_number),\n day: cn(\n 'group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)',\n props.showWeekNumber\n ? '[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)'\n : '[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)',\n defaultClassNames.day,\n ),\n range_start: cn(\n 'bg-muted after:bg-muted relative isolate z-0 rounded-s-(--cell-radius) after:absolute after:inset-y-0 after:end-0 after:w-4',\n defaultClassNames.range_start,\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn(\n 'bg-muted after:bg-muted relative isolate z-0 rounded-e-(--cell-radius) after:absolute after:inset-y-0 after:start-0 after:w-4',\n defaultClassNames.range_end,\n ),\n today: cn(\n 'bg-muted text-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none',\n defaultClassNames.today,\n ),\n outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),\n disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return <ChevronLeftIcon className={cn('size-4 rtl:rotate-180', className)} {...props} />;\n }\n\n if (orientation === 'right') {\n return <ChevronRightIcon className={cn('size-4 rtl:rotate-180', className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn('size-4', className)} {...props} />;\n },\n DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">{children}</div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n locale,\n ...props\n}: React.ComponentProps<typeof DayButton> & { locale?: Partial<Locale> }) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) {\n ref.current?.focus();\n }\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString(locale?.code)}\n data-selected-single={\n modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCalendarContract = React.ComponentProps<typeof Calendar> extends CalendarBaseProps ? true : false;\n"],"mappings":"wPAUA,SAAS,EAAS,CAChB,YACA,aACA,kBAAkB,GAClB,gBAAgB,QAChB,gBAAgB,QAChB,SACA,aACA,aACA,GAAG,GAGF,CACD,IAAM,EAAoB,EAAA,EAAqB,EAE/C,OACE,EAAA,EAAA,KAAC,EAAA,EAAD,CACmB,kBACjB,UAAW,EAAA,GACT,wLACA,OAAO,GAAG,4CACV,OAAO,GAAG,gDACV,CACF,EACe,gBACP,SACR,WAAY,CACV,oBAAsB,GAAS,EAAK,eAAe,GAAQ,KAAM,CAAE,MAAO,OAAQ,CAAC,EACnF,GAAG,CACL,EACA,WAAY,CACV,KAAM,EAAA,GAAG,QAAS,EAAkB,IAAI,EACxC,OAAQ,EAAA,GAAG,2CAA4C,EAAkB,MAAM,EAC/E,MAAO,EAAA,GAAG,6BAA8B,EAAkB,KAAK,EAC/D,IAAK,EAAA,GAAG,0EAA2E,EAAkB,GAAG,EACxG,gBAAiB,EAAA,GACf,EAAA,eAAe,CAAE,QAAS,CAAc,CAAC,EACzC,8DACA,EAAkB,eACpB,EACA,YAAa,EAAA,GACX,EAAA,eAAe,CAAE,QAAS,CAAc,CAAC,EACzC,8DACA,EAAkB,WACpB,EACA,cAAe,EAAA,GACb,2EACA,EAAkB,aACpB,EACA,UAAW,EAAA,GACT,sFACA,EAAkB,SACpB,EACA,cAAe,EAAA,GAAG,mCAAoC,EAAkB,aAAa,EACrF,SAAU,EAAA,GAAG,wCAAyC,EAAkB,QAAQ,EAChF,cAAe,EAAA,GACb,0BACA,IAAkB,QACd,UACA,yGACJ,EAAkB,aACpB,EACA,WAAY,EAAA,GAAG,yBAA0B,EAAkB,UAAU,EACrE,SAAU,EA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,WAAU,GAAG,MAExB,EAAA,EAAA,KAAC,KAAD,CAAI,GAAI,YACN,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,kEAAmE,UAAc,CAAA,CAC9F,CAAA,EAGR,GAAG,CACL,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAkB,CACzB,YACA,MACA,YACA,SACA,GAAG,GACqE,CACxE,IAAM,EAAoB,EAAA,EAAqB,EAEzC,EAAM,EAAM,OAA0B,IAAI,EAOhD,OANA,EAAM,cAAgB,CAChB,EAAU,SACZ,EAAI,SAAS,MAAM,CAEvB,EAAG,CAAC,EAAU,OAAO,CAAC,GAGpB,EAAA,EAAA,KAAC,EAAA,OAAD,CACO,MACL,QAAQ,QACR,KAAK,OACL,WAAU,EAAI,KAAK,mBAAmB,GAAQ,IAAI,EAClD,uBACE,EAAU,UAAY,CAAC,EAAU,aAAe,CAAC,EAAU,WAAa,CAAC,EAAU,aAErF,mBAAkB,EAAU,YAC5B,iBAAgB,EAAU,UAC1B,oBAAmB,EAAU,aAC7B,UAAW,EAAA,GACT,u7BACA,EAAkB,IAClB,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
package/dist/calendar.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  "use client";
3
- import { Ar as e, B as t, Jr as n, V as r, Xr as i, Yr as a, ei as o } from "./vendor-D9rWr_E8.mjs";
3
+ import { Ar as e, B as t, Jr as n, V as r, Xr as i, Yr as a, ei as o } from "./vendor-0E4gGRxj.mjs";
4
4
  import { Button as s, buttonVariants as c } from "./button.mjs";
5
5
  import * as l from "react";
6
6
  //#region packages/ui-web/src/calendar.tsx
@@ -26,19 +26,19 @@ function d({ className: e, classNames: s, showOutsideDays: l = !0, captionLayout
26
26
  month_caption: o("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", v.month_caption),
27
27
  dropdowns: o("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", v.dropdowns),
28
28
  dropdown_root: o("relative rounded-(--cell-radius)", v.dropdown_root),
29
- dropdown: o("absolute inset-0 bg-popover opacity-0", v.dropdown),
30
- caption_label: o("font-medium select-none", d === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", v.caption_label),
29
+ dropdown: o("bg-popover absolute inset-0 opacity-0", v.dropdown),
30
+ caption_label: o("font-medium select-none", d === "label" ? "text-sm" : "[&>svg]:text-muted-foreground flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5", v.caption_label),
31
31
  month_grid: o("w-full border-collapse", v.month_grid),
32
32
  weekdays: o("flex", v.weekdays),
33
- weekday: o("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", v.weekday),
33
+ weekday: o("text-muted-foreground flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal select-none", v.weekday),
34
34
  week: o("mt-2 flex w-full", v.week),
35
35
  week_number_header: o("w-(--cell-size) select-none", v.week_number_header),
36
- week_number: o("text-[0.8rem] text-muted-foreground select-none", v.week_number),
36
+ week_number: o("text-muted-foreground text-[0.8rem] select-none", v.week_number),
37
37
  day: o("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)", _.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)", v.day),
38
- range_start: o("relative isolate z-0 rounded-s-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-muted", v.range_start),
38
+ range_start: o("bg-muted after:bg-muted relative isolate z-0 rounded-s-(--cell-radius) after:absolute after:inset-y-0 after:end-0 after:w-4", v.range_start),
39
39
  range_middle: o("rounded-none", v.range_middle),
40
- range_end: o("relative isolate z-0 rounded-e-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-muted", v.range_end),
41
- today: o("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", v.today),
40
+ range_end: o("bg-muted after:bg-muted relative isolate z-0 rounded-e-(--cell-radius) after:absolute after:inset-y-0 after:start-0 after:w-4", v.range_end),
41
+ today: o("bg-muted text-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none", v.today),
42
42
  outside: o("text-muted-foreground aria-selected:text-muted-foreground", v.outside),
43
43
  disabled: o("text-muted-foreground opacity-50", v.disabled),
44
44
  hidden: o("invisible", v.hidden),
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.mjs","names":[],"sources":["../packages/ui-web/src/calendar.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from 'cn';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { DayPicker, getDefaultClassNames, type DayButton, type Locale } from 'react-day-picker';\n\nimport { Button, buttonVariants } from '@/./button';\n\nimport type { CalendarBaseProps } from '@gv-tech/ui-core';\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n locale,\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n locale={locale}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: 'short' }),\n ...formatters,\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn('relative rounded-(--cell-radius)', defaultClassNames.dropdown_root),\n dropdown: cn('absolute inset-0 bg-popover opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : 'flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground',\n defaultClassNames.caption_label,\n ),\n month_grid: cn('w-full border-collapse', defaultClassNames.month_grid),\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none',\n defaultClassNames.weekday,\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn('w-(--cell-size) select-none', defaultClassNames.week_number_header),\n week_number: cn('text-[0.8rem] text-muted-foreground select-none', defaultClassNames.week_number),\n day: cn(\n 'group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)',\n props.showWeekNumber\n ? '[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)'\n : '[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)',\n defaultClassNames.day,\n ),\n range_start: cn(\n 'relative isolate z-0 rounded-s-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-muted',\n defaultClassNames.range_start,\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn(\n 'relative isolate z-0 rounded-e-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-muted',\n defaultClassNames.range_end,\n ),\n today: cn(\n 'rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none',\n defaultClassNames.today,\n ),\n outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),\n disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return <ChevronLeftIcon className={cn('size-4 rtl:rotate-180', className)} {...props} />;\n }\n\n if (orientation === 'right') {\n return <ChevronRightIcon className={cn('size-4 rtl:rotate-180', className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn('size-4', className)} {...props} />;\n },\n DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">{children}</div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n locale,\n ...props\n}: React.ComponentProps<typeof DayButton> & { locale?: Partial<Locale> }) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) {\n ref.current?.focus();\n }\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString(locale?.code)}\n data-selected-single={\n modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCalendarContract = React.ComponentProps<typeof Calendar> extends CalendarBaseProps ? true : false;\n"],"mappings":";;;;;;;AAWA,SAAS,EAAS,EAChB,cACA,eACA,qBAAkB,IAClB,mBAAgB,SAChB,mBAAgB,SAChB,WACA,eACA,eACA,GAAG,KAGF;CACD,IAAM,IAAoB,EAAqB;CAE/C,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACmB;EACjB,WAAW,EACT,yLACA,OAAO,GAAG,6CACV,OAAO,GAAG,iDACV,CACF;EACe;EACP;EACR,YAAY;GACV,sBAAsB,MAAS,EAAK,eAAe,GAAQ,MAAM,EAAE,OAAO,QAAQ,CAAC;GACnF,GAAG;EACL;EACA,YAAY;GACV,MAAM,EAAG,SAAS,EAAkB,IAAI;GACxC,QAAQ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ourcesContent":["'use client';\n\nimport type { CalendarBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { DayPicker, getDefaultClassNames, type DayButton, type Locale } from 'react-day-picker';\n\nimport { Button, buttonVariants } from '@/./button';\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n locale,\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n locale={locale}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: 'short' }),\n ...formatters,\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn('relative rounded-(--cell-radius)', defaultClassNames.dropdown_root),\n dropdown: cn('bg-popover absolute inset-0 opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : '[&>svg]:text-muted-foreground flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5',\n defaultClassNames.caption_label,\n ),\n month_grid: cn('w-full border-collapse', defaultClassNames.month_grid),\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'text-muted-foreground flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal select-none',\n defaultClassNames.weekday,\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn('w-(--cell-size) select-none', defaultClassNames.week_number_header),\n week_number: cn('text-muted-foreground text-[0.8rem] select-none', defaultClassNames.week_number),\n day: cn(\n 'group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)',\n props.showWeekNumber\n ? '[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)'\n : '[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)',\n defaultClassNames.day,\n ),\n range_start: cn(\n 'bg-muted after:bg-muted relative isolate z-0 rounded-s-(--cell-radius) after:absolute after:inset-y-0 after:end-0 after:w-4',\n defaultClassNames.range_start,\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn(\n 'bg-muted after:bg-muted relative isolate z-0 rounded-e-(--cell-radius) after:absolute after:inset-y-0 after:start-0 after:w-4',\n defaultClassNames.range_end,\n ),\n today: cn(\n 'bg-muted text-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none',\n defaultClassNames.today,\n ),\n outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),\n disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return <div data-slot=\"calendar\" ref={rootRef} className={cn(className)} {...props} />;\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return <ChevronLeftIcon className={cn('size-4 rtl:rotate-180', className)} {...props} />;\n }\n\n if (orientation === 'right') {\n return <ChevronRightIcon className={cn('size-4 rtl:rotate-180', className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn('size-4', className)} {...props} />;\n },\n DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">{children}</div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n locale,\n ...props\n}: React.ComponentProps<typeof DayButton> & { locale?: Partial<Locale> }) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) {\n ref.current?.focus();\n }\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString(locale?.code)}\n data-selected-single={\n modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCalendarContract = React.ComponentProps<typeof Calendar> extends CalendarBaseProps ? true : false;\n"],"mappings":";;;;;;;AAUA,SAAS,EAAS,EAChB,cACA,eACA,qBAAkB,IAClB,mBAAgB,SAChB,mBAAgB,SAChB,WACA,eACA,eACA,GAAG,KAGF;CACD,IAAM,IAAoB,EAAqB;CAE/C,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACmB;EACjB,WAAW,EACT,yLACA,OAAO,GAAG,6CACV,OAAO,GAAG,iDACV,CACF;EACe;EACP;EACR,YAAY;GACV,sBAAsB,MAAS,EAAK,eAAe,GAAQ,MAAM,EAAE,OAAO,QAAQ,CAAC;GACnF,GAAG;EACL;EACA,YAAY;GACV,MAAM,EAAG,SAAS,EAAkB,IAAI;GACxC,QAAQ,EAAG,4CAA4C,EAAkB,MAAM;GAC/E,OAAO,EAAG,8BAA8B,EAAkB,KAAK;GAC/D,KAAK,EAAG,2EAA2E,EAAkB,GAAG;GACxG,iBAAiB,EACf,EAAe,EAAE,SAAS,EAAc,CAAC,GACzC,+DACA,EAAkB,eACpB;GACA,aAAa,EACX,EAAe,EAAE,SAAS,EAAc,CAAC,GACzC,+DACA,EAAkB,WACpB;GACA,eAAe,EACb,4EACA,EAAkB,aACpB;GACA,WAAW,EACT,uFACA,EAAkB,SACpB;GACA,eAAe,EAAG,oCAAoC,EAAkB,aAAa;GACrF,UAAU,EAAG,yCAAyC,EAAkB,QAAQ;GA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AAQ,CAAA;GAC5E,aAAa,EAAE,aAAU,GAAG,QAExB,iBAAA,GAAA,EAAA,KAAC,MAAD;IAAI,GAAI;cACN,iBAAA,GAAA,EAAA,KAAC,OAAD;KAAK,WAAU;KAAmE;IAAc,CAAA;GAC9F,CAAA;GAGR,GAAG;EACL;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAkB,EACzB,cACA,QACA,cACA,WACA,GAAG,KACqE;CACxE,IAAM,IAAoB,EAAqB,GAEzC,IAAM,EAAM,OAA0B,IAAI;CAOhD,OANA,EAAM,gBAAgB;EACpB,AAAI,EAAU,WACZ,EAAI,SAAS,MAAM;CAEvB,GAAG,CAAC,EAAU,OAAO,CAAC,GAGpB,iBAAA,GAAA,EAAA,KAAC,GAAD;EACO;EACL,SAAQ;EACR,MAAK;EACL,YAAU,EAAI,KAAK,mBAAmB,GAAQ,IAAI;EAClD,wBACE,EAAU,YAAY,CAAC,EAAU,eAAe,CAAC,EAAU,aAAa,CAAC,EAAU;EAErF,oBAAkB,EAAU;EAC5B,kBAAgB,EAAU;EAC1B,qBAAmB,EAAU;EAC7B,WAAW,EACT,w7BACA,EAAkB,KAClB,CACF;EACA,GAAI;CACL,CAAA;AAEL"}
package/dist/card.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-i1KCLryV.js");let n=require("react");n=e.r(n);var r=t.Ar();function i({className:e,size:n=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":n,className:t.ei(`group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:t.ei(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,e),...n})}function o({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:t.ei(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:t.ei(`text-muted-foreground text-sm`,e),...n})}function c({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-action`,className:t.ei(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,e),...n})}function l({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:t.ei(`px-(--card-spacing)`,e),...n})}function u({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:t.ei(`bg-muted/50 flex items-center rounded-b-xl border-t p-(--card-spacing)`,e),...n})}exports.Card=i,exports.CardAction=c,exports.CardContent=l,exports.CardDescription=s,exports.CardFooter=u,exports.CardHeader=a,exports.CardTitle=o;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-Bz5F_va8.js");let n=require("react");n=e.r(n);var r=t.Ar();function i({className:e,size:n=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":n,className:t.ei(`group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:t.ei(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,e),...n})}function o({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:t.ei(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:t.ei(`text-muted-foreground text-sm`,e),...n})}function c({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-action`,className:t.ei(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,e),...n})}function l({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:t.ei(`px-(--card-spacing)`,e),...n})}function u({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:t.ei(`bg-muted/50 flex items-center rounded-b-xl border-t p-(--card-spacing)`,e),...n})}exports.Card=i,exports.CardAction=c,exports.CardContent=l,exports.CardDescription=s,exports.CardFooter=u,exports.CardHeader=a,exports.CardTitle=o;
2
2
  //# sourceMappingURL=card.cjs.map
package/dist/card.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"card.cjs","names":[],"sources":["../packages/ui-web/src/card.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport * as React from 'react';\n\nimport type { CardBaseProps } from '@gv-tech/ui-core';\n\nfunction Card({ className, size = 'default', ...props }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('text-base leading-snug font-medium group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />;\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-content\" className={cn('px-(--card-spacing)', className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('bg-muted/50 flex items-center rounded-b-xl border-t p-(--card-spacing)', className)}\n {...props}\n />\n );\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\nexport type ___verifyContract = React.ComponentProps<typeof Card> extends CardBaseProps ? true : false;\n"],"mappings":"iNAKA,SAAS,EAAK,CAAE,YAAW,OAAO,UAAW,GAAG,GAAoE,CAClH,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,OACV,YAAW,EACX,UAAW,EAAA,GACT,uZACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GACT,yPACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAU,CAAE,YAAW,GAAG,GAAsC,CACvE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,aACV,UAAW,EAAA,GAAG,uEAAwE,CAAS,EAC/F,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAgB,CAAE,YAAW,GAAG,GAAsC,CAC7E,OAAO,EAAA,EAAA,KAAC,MAAD,CAAK,YAAU,mBAAmB,UAAW,EAAA,GAAG,gCAAiC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAClH,CAEA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GAAG,iEAAkE,CAAS,EACzF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAY,CAAE,YAAW,GAAG,GAAsC,CACzE,OAAO,EAAA,EAAA,KAAC,MAAD,CAAK,YAAU,eAAe,UAAW,EAAA,GAAG,sBAAuB,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpG,CAEA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GAAG,yEAA0E,CAAS,EACjG,GAAI,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"card.cjs","names":[],"sources":["../packages/ui-web/src/card.tsx"],"sourcesContent":["import type { CardBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport * as React from 'react';\n\nfunction Card({ className, size = 'default', ...props }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('text-base leading-snug font-medium group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />;\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-content\" className={cn('px-(--card-spacing)', className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('bg-muted/50 flex items-center rounded-b-xl border-t p-(--card-spacing)', className)}\n {...props}\n />\n );\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\nexport type ___verifyContract = React.ComponentProps<typeof Card> extends CardBaseProps ? true : false;\n"],"mappings":"iNAIA,SAAS,EAAK,CAAE,YAAW,OAAO,UAAW,GAAG,GAAoE,CAClH,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,OACV,YAAW,EACX,UAAW,EAAA,GACT,uZACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GACT,yPACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAU,CAAE,YAAW,GAAG,GAAsC,CACvE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,aACV,UAAW,EAAA,GAAG,uEAAwE,CAAS,EAC/F,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAgB,CAAE,YAAW,GAAG,GAAsC,CAC7E,OAAO,EAAA,EAAA,KAAC,MAAD,CAAK,YAAU,mBAAmB,UAAW,EAAA,GAAG,gCAAiC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAClH,CAEA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GAAG,iEAAkE,CAAS,EACzF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAY,CAAE,YAAW,GAAG,GAAsC,CACzE,OAAO,EAAA,EAAA,KAAC,MAAD,CAAK,YAAU,eAAe,UAAW,EAAA,GAAG,sBAAuB,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpG,CAEA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GAAG,yEAA0E,CAAS,EACjG,GAAI,CACL,CAAA,CAEL"}
package/dist/card.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { Ar as e, ei as t } from "./vendor-D9rWr_E8.mjs";
2
+ import { Ar as e, ei as t } from "./vendor-0E4gGRxj.mjs";
3
3
  import "react";
4
4
  //#region packages/ui-web/src/card.tsx
5
5
  var n = e();
package/dist/card.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"card.mjs","names":[],"sources":["../packages/ui-web/src/card.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport * as React from 'react';\n\nimport type { CardBaseProps } from '@gv-tech/ui-core';\n\nfunction Card({ className, size = 'default', ...props }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('text-base leading-snug font-medium group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />;\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-content\" className={cn('px-(--card-spacing)', className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('bg-muted/50 flex items-center rounded-b-xl border-t p-(--card-spacing)', className)}\n {...props}\n />\n );\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\nexport type ___verifyContract = React.ComponentProps<typeof Card> extends CardBaseProps ? true : false;\n"],"mappings":";;;;;AAKA,SAAS,EAAK,EAAE,cAAW,UAAO,WAAW,GAAG,KAAoE;CAClH,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,aAAW;EACX,WAAW,EACT,wZACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;CACxE,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAW,EACT,0PACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAU,EAAE,cAAW,GAAG,KAAsC;CACvE,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,wEAAwE,CAAS;EAC/F,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAgB,EAAE,cAAW,GAAG,KAAsC;CAC7E,OAAO,iBAAA,GAAA,EAAA,KAAC,OAAD;EAAK,aAAU;EAAmB,WAAW,EAAG,iCAAiC,CAAS;EAAG,GAAI;CAAQ,CAAA;AAClH;AAEA,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;CACxE,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,kEAAkE,CAAS;EACzF,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EAAE,cAAW,GAAG,KAAsC;CACzE,OAAO,iBAAA,GAAA,EAAA,KAAC,OAAD;EAAK,aAAU;EAAe,WAAW,EAAG,uBAAuB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACpG;AAEA,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;CACxE,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,0EAA0E,CAAS;EACjG,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"card.mjs","names":[],"sources":["../packages/ui-web/src/card.tsx"],"sourcesContent":["import type { CardBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport * as React from 'react';\n\nfunction Card({ className, size = 'default', ...props }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('text-base leading-snug font-medium group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />;\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-content\" className={cn('px-(--card-spacing)', className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('bg-muted/50 flex items-center rounded-b-xl border-t p-(--card-spacing)', className)}\n {...props}\n />\n );\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\nexport type ___verifyContract = React.ComponentProps<typeof Card> extends CardBaseProps ? true : false;\n"],"mappings":";;;;;AAIA,SAAS,EAAK,EAAE,cAAW,UAAO,WAAW,GAAG,KAAoE;CAClH,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,aAAW;EACX,WAAW,EACT,wZACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;CACxE,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAW,EACT,0PACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAU,EAAE,cAAW,GAAG,KAAsC;CACvE,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,wEAAwE,CAAS;EAC/F,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAgB,EAAE,cAAW,GAAG,KAAsC;CAC7E,OAAO,iBAAA,GAAA,EAAA,KAAC,OAAD;EAAK,aAAU;EAAmB,WAAW,EAAG,iCAAiC,CAAS;EAAG,GAAI;CAAQ,CAAA;AAClH;AAEA,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;CACxE,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,kEAAkE,CAAS;EACzF,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EAAE,cAAW,GAAG,KAAsC;CACzE,OAAO,iBAAA,GAAA,EAAA,KAAC,OAAD;EAAK,aAAU;EAAe,WAAW,EAAG,uBAAuB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACpG;AAEA,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;CACxE,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,0EAA0E,CAAS;EACjG,GAAI;CACL,CAAA;AAEL"}
package/dist/carousel.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-i1KCLryV.js"),n=require("./button.cjs");let r=require("react");r=e.r(r);var i=t.Ar(),a=r.createContext(null);function o(){let e=r.useContext(a);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}function s({orientation:e=`horizontal`,opts:n,setApi:o,plugins:s,className:c,children:l,...u}){let[d,f]=t.z({...n,axis:e===`horizontal`?`x`:`y`},s),[p,m]=r.useState(!1),[h,g]=r.useState(!1),_=r.useCallback(e=>{e&&(m(e.canScrollPrev()),g(e.canScrollNext()))},[]),v=r.useCallback(()=>{f?.scrollPrev()},[f]),y=r.useCallback(()=>{f?.scrollNext()},[f]),b=r.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),v()):e.key===`ArrowRight`&&(e.preventDefault(),y())},[v,y]);return r.useEffect(()=>{!f||!o||o(f)},[f,o]),r.useEffect(()=>{if(f)return _(f),f.on(`reInit`,_),f.on(`select`,_),()=>{f?.off(`select`,_)}},[f,_]),(0,i.jsx)(a.Provider,{value:{carouselRef:d,api:f,opts:n,orientation:e||(n?.axis===`y`?`vertical`:`horizontal`),scrollPrev:v,scrollNext:y,canScrollPrev:p,canScrollNext:h},children:(0,i.jsx)(`div`,{onKeyDownCapture:b,className:t.ei(`relative`,c),role:`region`,"aria-roledescription":`carousel`,"data-slot":`carousel`,...u,children:l})})}function c({className:e,...n}){let{carouselRef:r,orientation:a}=o();return(0,i.jsx)(`div`,{ref:r,className:`overflow-hidden`,"data-slot":`carousel-content`,children:(0,i.jsx)(`div`,{className:t.ei(`flex`,a===`horizontal`?`-ms-4`:`-mt-4 flex-col`,e),...n})})}function l({className:e,...n}){let{orientation:r}=o();return(0,i.jsx)(`div`,{role:`group`,"aria-roledescription":`slide`,"data-slot":`carousel-item`,className:t.ei(`min-w-0 shrink-0 grow-0 basis-full`,r===`horizontal`?`ps-4`:`pt-4`,e),...n})}function u({className:e,variant:r=`outline`,size:a=`icon-sm`,...s}){let{orientation:c,scrollPrev:l,canScrollPrev:u}=o();return(0,i.jsxs)(n.Button,{"data-slot":`carousel-previous`,variant:r,size:a,className:t.ei(`absolute touch-manipulation rounded-full`,c===`horizontal`?`inset-y-0 -start-12 my-auto`:`start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2`,e),disabled:!u,onClick:l,...s,children:[(0,i.jsx)(t.Yr,{className:`rtl:rotate-180`}),(0,i.jsx)(`span`,{className:`sr-only`,children:`Previous slide`})]})}function d({className:e,variant:r=`outline`,size:a=`icon-sm`,...s}){let{orientation:c,scrollNext:l,canScrollNext:u}=o();return(0,i.jsxs)(n.Button,{"data-slot":`carousel-next`,variant:r,size:a,className:t.ei(`absolute touch-manipulation rounded-full`,c===`horizontal`?`inset-y-0 -end-12 my-auto`:`start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2`,e),disabled:!u,onClick:l,...s,children:[(0,i.jsx)(t.Jr,{className:`rtl:rotate-180`}),(0,i.jsx)(`span`,{className:`sr-only`,children:`Next slide`})]})}exports.Carousel=s,exports.CarouselContent=c,exports.CarouselItem=l,exports.CarouselNext=d,exports.CarouselPrevious=u,exports.useCarousel=o;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-Bz5F_va8.js"),n=require("./button.cjs");let r=require("react");r=e.r(r);var i=t.Ar(),a=r.createContext(null);function o(){let e=r.useContext(a);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}function s({orientation:e=`horizontal`,opts:n,setApi:o,plugins:s,className:c,children:l,...u}){let[d,f]=t.z({...n,axis:e===`horizontal`?`x`:`y`},s),[p,m]=r.useState(!1),[h,g]=r.useState(!1),_=r.useCallback(e=>{e&&(m(e.canScrollPrev()),g(e.canScrollNext()))},[]),v=r.useCallback(()=>{f?.scrollPrev()},[f]),y=r.useCallback(()=>{f?.scrollNext()},[f]),b=r.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),v()):e.key===`ArrowRight`&&(e.preventDefault(),y())},[v,y]);return r.useEffect(()=>{!f||!o||o(f)},[f,o]),r.useEffect(()=>{if(f)return _(f),f.on(`reInit`,_),f.on(`select`,_),()=>{f?.off(`select`,_)}},[f,_]),(0,i.jsx)(a.Provider,{value:{carouselRef:d,api:f,opts:n,orientation:e||(n?.axis===`y`?`vertical`:`horizontal`),scrollPrev:v,scrollNext:y,canScrollPrev:p,canScrollNext:h},children:(0,i.jsx)(`section`,{onKeyDownCapture:b,className:t.ei(`relative`,c),"aria-roledescription":`carousel`,"data-slot":`carousel`,...u,children:l})})}function c({className:e,...n}){let{carouselRef:r,orientation:a}=o();return(0,i.jsx)(`div`,{ref:r,className:`overflow-hidden`,"data-slot":`carousel-content`,children:(0,i.jsx)(`div`,{className:t.ei(`flex`,a===`horizontal`?`-ms-4`:`-mt-4 flex-col`,e),...n})})}function l({className:e,...n}){let{orientation:r}=o();return(0,i.jsx)(`fieldset`,{"aria-roledescription":`slide`,"data-slot":`carousel-item`,className:t.ei(`min-w-0 shrink-0 grow-0 basis-full`,r===`horizontal`?`ps-4`:`pt-4`,e),...n})}function u({className:e,variant:r=`outline`,size:a=`icon-sm`,...s}){let{orientation:c,scrollPrev:l,canScrollPrev:u}=o();return(0,i.jsxs)(n.Button,{"data-slot":`carousel-previous`,variant:r,size:a,className:t.ei(`absolute touch-manipulation rounded-full`,c===`horizontal`?`inset-y-0 -start-12 my-auto`:`start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2`,e),disabled:!u,onClick:l,...s,children:[(0,i.jsx)(t.Yr,{className:`rtl:rotate-180`}),(0,i.jsx)(`span`,{className:`sr-only`,children:`Previous slide`})]})}function d({className:e,variant:r=`outline`,size:a=`icon-sm`,...s}){let{orientation:c,scrollNext:l,canScrollNext:u}=o();return(0,i.jsxs)(n.Button,{"data-slot":`carousel-next`,variant:r,size:a,className:t.ei(`absolute touch-manipulation rounded-full`,c===`horizontal`?`inset-y-0 -end-12 my-auto`:`start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2`,e),disabled:!u,onClick:l,...s,children:[(0,i.jsx)(t.Jr,{className:`rtl:rotate-180`}),(0,i.jsx)(`span`,{className:`sr-only`,children:`Next slide`})]})}exports.Carousel=s,exports.CarouselContent=c,exports.CarouselItem=l,exports.CarouselNext=d,exports.CarouselPrevious=u,exports.useCarousel=o;
2
2
  //# sourceMappingURL=carousel.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.cjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Button } from '@/./button';\n\nimport type { CarouselBaseProps } from '@gv-tech/ui-core';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ms-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'div'>) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'ps-4' : 'pt-4', className)}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'inset-y-0 -start-12 my-auto'\n : 'start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ChevronLeftIcon className=\"rtl:rotate-180\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'inset-y-0 -end-12 my-auto'\n : 'start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ChevronRightIcon className=\"rtl:rotate-180\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel, type CarouselApi };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCarouselContract = React.ComponentProps<typeof Carousel> extends CarouselBaseProps ? true : false;\n"],"mappings":"2OA8BM,EAAkB,EAAM,cAA2C,IAAI,EAE7E,SAAS,GAAc,CACrB,IAAM,EAAU,EAAM,WAAW,CAAe,EAEhD,GAAI,CAAC,EACH,MAAU,MAAM,gDAAgD,EAGlE,OAAO,CACT,CAEA,SAAS,EAAS,CAChB,cAAc,aACd,OACA,SACA,UACA,YACA,WACA,GAAG,GAC2C,CAC9C,GAAM,CAAC,EAAa,GAAO,EAAA,EACzB,CACE,GAAG,EACH,KAAM,IAAgB,aAAe,IAAM,GAC7C,EACA,CACF,EACM,CAAC,EAAe,GAAoB,EAAM,SAAS,EAAK,EACxD,CAAC,EAAe,GAAoB,EAAM,SAAS,EAAK,EAExD,EAAW,EAAM,YAAa,GAAqB,CAClD,IAGL,EAAiB,EAAI,cAAc,CAAC,EACpC,EAAiB,EAAI,cAAc,CAAC,EACtC,EAAG,CAAC,CAAC,EAEC,EAAa,EAAM,gBAAkB,CACzC,GAAK,WAAW,CAClB,EAAG,CAAC,CAAG,CAAC,EAEF,EAAa,EAAM,gBAAkB,CACzC,GAAK,WAAW,CAClB,EAAG,CAAC,CAAG,CAAC,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qCAAsC,IAAgB,aAAe,OAAS,OAAQ,CAAS,EAC7G,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAiB,CACxB,YACA,UAAU,UACV,OAAO,UACP,GAAG,GACmC,CACtC,GAAM,CAAE,cAAa,aAAY,iBAAkB,EAAY,EAE/D,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CACE,YAAU,oBACD,UACH,OACN,UAAW,EAAA,GACT,2CACA,IAAgB,aACZ,8BACA,mEACJ,CACF,EACA,SAAU,CAAC,EACX,QAAS,EACT,GAAI,WAbN,EAeE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAiB,UAAU,gBAAkB,CAAA,GAC7C,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,gBAAoB,CAAA,CACxC,GAEZ,CAEA,SAAS,EAAa,CACpB,YACA,UAAU,UACV,OAAO,UACP,GAAG,GACmC,CACtC,GAAM,CAAE,cAAa,aAAY,iBAAkB,EAAY,EAE/D,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CACE,YAAU,gBACD,UACH,OACN,UAAW,EAAA,GACT,2CACA,IAAgB,aACZ,4BACA,sEACJ,CACF,EACA,SAAU,CAAC,EACX,QAAS,EACT,GAAI,WAbN,EAeE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAkB,UAAU,gBAAkB,CAAA,GAC9C,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,YAAgB,CAAA,CACpC,GAEZ"}
1
+ {"version":3,"file":"carousel.cjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["import type { CarouselBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Button } from '@/./button';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'section'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n // Sync parent with the initial selection on subscribe (external store sync)\n // eslint-disable-next-line react/set-state-in-effect\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <section\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </section>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ms-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'fieldset'>) {\n const { orientation } = useCarousel();\n\n return (\n <fieldset\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'ps-4' : 'pt-4', className)}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'inset-y-0 -start-12 my-auto'\n : 'start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ChevronLeftIcon className=\"rtl:rotate-180\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'inset-y-0 -end-12 my-auto'\n : 'start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ChevronRightIcon className=\"rtl:rotate-180\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel, type CarouselApi };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCarouselContract = React.ComponentProps<typeof Carousel> extends CarouselBaseProps ? true : false;\n"],"mappings":"2OA6BM,EAAkB,EAAM,cAA2C,IAAI,EAE7E,SAAS,GAAc,CACrB,IAAM,EAAU,EAAM,WAAW,CAAe,EAEhD,GAAI,CAAC,EACH,MAAU,MAAM,gDAAgD,EAGlE,OAAO,CACT,CAEA,SAAS,EAAS,CAChB,cAAc,aACd,OACA,SACA,UACA,YACA,WACA,GAAG,GAC+C,CAClD,GAAM,CAAC,EAAa,GAAO,EAAA,EACzB,CACE,GAAG,EACH,KAAM,IAAgB,aAAe,IAAM,GAC7C,EACA,CACF,EACM,CAAC,EAAe,GAAoB,EAAM,SAAS,EAAK,EACxD,CAAC,EAAe,GAAoB,EAAM,SAAS,EAAK,EAExD,EAAW,EAAM,YAAa,GAAqB,CAClD,IAGL,EAAiB,EAAI,cAAc,CAAC,EACpC,EAAiB,EAAI,cAAc,CAAC,EACtC,EAAG,CAAC,CAAC,EAEC,EAAa,EAAM,gBAAkB,CACzC,GAAK,WAAW,CAClB,EAAG,CAAC,CAAG,CAAC,EAEF,EAAa,EAAM,gBAAkB,CACzC,GAAK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,EAAA,GAAG,qCAAsC,IAAgB,aAAe,OAAS,OAAQ,CAAS,EAC7G,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAiB,CACxB,YACA,UAAU,UACV,OAAO,UACP,GAAG,GACmC,CACtC,GAAM,CAAE,cAAa,aAAY,iBAAkB,EAAY,EAE/D,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CACE,YAAU,oBACD,UACH,OACN,UAAW,EAAA,GACT,2CACA,IAAgB,aACZ,8BACA,mEACJ,CACF,EACA,SAAU,CAAC,EACX,QAAS,EACT,GAAI,WAbN,EAeE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAiB,UAAU,gBAAkB,CAAA,GAC7C,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,gBAAoB,CAAA,CACxC,GAEZ,CAEA,SAAS,EAAa,CACpB,YACA,UAAU,UACV,OAAO,UACP,GAAG,GACmC,CACtC,GAAM,CAAE,cAAa,aAAY,iBAAkB,EAAY,EAE/D,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CACE,YAAU,gBACD,UACH,OACN,UAAW,EAAA,GACT,2CACA,IAAgB,aACZ,4BACA,sEACJ,CACF,EACA,SAAU,CAAC,EACX,QAAS,EACT,GAAI,WAbN,EAeE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAkB,UAAU,gBAAkB,CAAA,GAC9C,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,YAAgB,CAAA,CACpC,GAEZ"}
package/dist/carousel.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { Ar as e, Jr as t, Yr as n, ei as r, z as i } from "./vendor-D9rWr_E8.mjs";
2
+ import { Ar as e, Jr as t, Yr as n, ei as r, z as i } from "./vendor-0E4gGRxj.mjs";
3
3
  import { Button as a } from "./button.mjs";
4
4
  import * as o from "react";
5
5
  //#region packages/ui-web/src/carousel.tsx
@@ -39,10 +39,9 @@ function u({ orientation: e = "horizontal", opts: t, setApi: n, plugins: a, clas
39
39
  canScrollPrev: m,
40
40
  canScrollNext: g
41
41
  },
42
- children: /* @__PURE__ */ (0, s.jsx)("div", {
42
+ children: /* @__PURE__ */ (0, s.jsx)("section", {
43
43
  onKeyDownCapture: x,
44
44
  className: r("relative", l),
45
- role: "region",
46
45
  "aria-roledescription": "carousel",
47
46
  "data-slot": "carousel",
48
47
  ...d,
@@ -64,8 +63,7 @@ function d({ className: e, ...t }) {
64
63
  }
65
64
  function f({ className: e, ...t }) {
66
65
  let { orientation: n } = l();
67
- return /* @__PURE__ */ (0, s.jsx)("div", {
68
- role: "group",
66
+ return /* @__PURE__ */ (0, s.jsx)("fieldset", {
69
67
  "aria-roledescription": "slide",
70
68
  "data-slot": "carousel-item",
71
69
  className: r("min-w-0 shrink-0 grow-0 basis-full", n === "horizontal" ? "ps-4" : "pt-4", e),
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.mjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Button } from '@/./button';\n\nimport type { CarouselBaseProps } from '@gv-tech/ui-core';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ms-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'div'>) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'ps-4' : 'pt-4', className)}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'inset-y-0 -start-12 my-auto'\n : 'start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ChevronLeftIcon className=\"rtl:rotate-180\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'inset-y-0 -end-12 my-auto'\n : 'start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ChevronRightIcon className=\"rtl:rotate-180\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel, type CarouselApi };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCarouselContract = React.ComponentProps<typeof Carousel> extends CarouselBaseProps ? true : false;\n"],"mappings":";;;;;aA8BM,IAAkB,EAAM,cAA2C,IAAI;AAE7E,SAAS,IAAc;CACrB,IAAM,IAAU,EAAM,WAAW,CAAe;CAEhD,IAAI,CAAC,GACH,MAAU,MAAM,gDAAgD;CAGlE,OAAO;AACT;AAEA,SAAS,EAAS,EAChB,iBAAc,cACd,SACA,WACA,YACA,cACA,aACA,GAAG,KAC2C;CAC9C,IAAM,CAAC,GAAa,KAAO,EACzB;EACE,GAAG;EACH,MAAM,MAAgB,eAAe,MAAM;CAC7C,GACA,CACF,GACM,CAAC,GAAe,KAAoB,EAAM,SAAS,EAAK,GACxD,CAAC,GAAe,KAAoB,EAAM,SAAS,EAAK,GAExD,IAAW,EAAM,aAAa,MAAqB;EAClD,MAGL,EAAiB,EAAI,cAAc,CAAC,GACpC,EAAiB,EAAI,cAAc,CAAC;CACtC,GAAG,CAAC,CAAC,GAEC,IAAa,EAAM,kBAAkB;EACzC,GAAK,WAAW;CAClB,GAAG,CAAC,CAAG,CAAC,GAEF,IAAa,EAAM,kBAAkB;EACzC,GAAK,WAAW;CAClB,GAAG,CAAC,CAAG,CAAC,GAEF,IAAgB,EAAM,aACzB,MAA+C;EAC9C,AAAI,EAAM,QAAQ,eAChB,EAAM,eAAe,GACrB,EAAW,KACF,EAAM,QAAQ,iBACvB,EAAM,eAAe,GACrB,EAAW;CAEf,GACA,CAAC,GAAY,CAAU,CACzB;CAsBA,OApBA,EAAM,gBAAgB;EAChB,CAAC,KAAO,CAAC,KAGb,EAAO,CAAG;CACZ,GAAG,CAAC,GAAK,CAAM,CAAC,GAEhB,EAAM,gBAAgB;EACf,OAOL,OAJA,EAAS,CAAG,GACZ,EAAI,GAAG,UAAU,CAAQ,GACzB,EAAI,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,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAiB,WAAU,iBAAkB,CAAA,GAC7C,iBAAA,GAAA,EAAA,KAAC,QAAD;GAAM,WAAU;aAAU;EAAoB,CAAA,CACxC;;AAEZ;AAEA,SAAS,EAAa,EACpB,cACA,aAAU,WACV,UAAO,WACP,GAAG,KACmC;CACtC,IAAM,EAAE,gBAAa,eAAY,qBAAkB,EAAY;CAE/D,OACE,iBAAA,GAAA,EAAA,MAAC,GAAD;EACE,aAAU;EACD;EACH;EACN,WAAW,EACT,4CACA,MAAgB,eACZ,8BACA,uEACJ,CACF;EACA,UAAU,CAAC;EACX,SAAS;EACT,GAAI;YAbN,CAeE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAkB,WAAU,iBAAkB,CAAA,GAC9C,iBAAA,GAAA,EAAA,KAAC,QAAD;GAAM,WAAU;aAAU;EAAgB,CAAA,CACpC;;AAEZ"}
1
+ {"version":3,"file":"carousel.mjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["import type { CarouselBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Button } from '@/./button';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'section'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n // Sync parent with the initial selection on subscribe (external store sync)\n // eslint-disable-next-line react/set-state-in-effect\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <section\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </section>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ms-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'fieldset'>) {\n const { orientation } = useCarousel();\n\n return (\n <fieldset\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'ps-4' : 'pt-4', className)}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'inset-y-0 -start-12 my-auto'\n : 'start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ChevronLeftIcon className=\"rtl:rotate-180\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'inset-y-0 -end-12 my-auto'\n : 'start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ChevronRightIcon className=\"rtl:rotate-180\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel, type CarouselApi };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCarouselContract = React.ComponentProps<typeof Carousel> extends CarouselBaseProps ? true : false;\n"],"mappings":";;;;;aA6BM,IAAkB,EAAM,cAA2C,IAAI;AAE7E,SAAS,IAAc;CACrB,IAAM,IAAU,EAAM,WAAW,CAAe;CAEhD,IAAI,CAAC,GACH,MAAU,MAAM,gDAAgD;CAGlE,OAAO;AACT;AAEA,SAAS,EAAS,EAChB,iBAAc,cACd,SACA,WACA,YACA,cACA,aACA,GAAG,KAC+C;CAClD,IAAM,CAAC,GAAa,KAAO,EACzB;EACE,GAAG;EACH,MAAM,MAAgB,eAAe,MAAM;CAC7C,GACA,CACF,GACM,CAAC,GAAe,KAAoB,EAAM,SAAS,EAAK,GACxD,CAAC,GAAe,KAAoB,EAAM,SAAS,EAAK,GAExD,IAAW,EAAM,aAAa,MAAqB;EAClD,MAGL,EAAiB,EAAI,cAAc,CAAC,GACpC,EAAiB,EAAI,cAAc,CAAC;CACtC,GAAG,CAAC,CAAC,GAEC,IAAa,EAAM,kBAAkB;EACzC,GAAK,WAAW;CAClB,GAAG,CAAC,CAAG,CAAC,GAEF,IAAa,EAAM,kBAAkB;EACzC,GAAK,WAAW;CAClB,GAAG,CAAC,CAAG,CAAC,GAEF,IAAgB,EAAM,aACzB,MAA4C;EAC3C,AAAI,EAAM,QAAQ,eAChB,EAAM,eAAe,GACrB,EAAW,KACF,EAAM,QAAQ,iBACvB,EAAM,eAAe,GACrB,EAAW;CAEf,GACA,CAAC,GAAY,CAAU,CACzB;CAwBA,OAtBA,EAAM,gBAAgB;EAChB,CAAC,KAAO,CAAC,KAGb,EAAO,CAAG;CACZ,GAAG,CAAC,GAAK,CAAM,CAAC,GAEhB,EAAM,gBAAgB;EAC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,UAAU,CAAC;EACX,SAAS;EACT,GAAI;YAbN,CAeE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAiB,WAAU,iBAAkB,CAAA,GAC7C,iBAAA,GAAA,EAAA,KAAC,QAAD;GAAM,WAAU;aAAU;EAAoB,CAAA,CACxC;;AAEZ;AAEA,SAAS,EAAa,EACpB,cACA,aAAU,WACV,UAAO,WACP,GAAG,KACmC;CACtC,IAAM,EAAE,gBAAa,eAAY,qBAAkB,EAAY;CAE/D,OACE,iBAAA,GAAA,EAAA,MAAC,GAAD;EACE,aAAU;EACD;EACH;EACN,WAAW,EACT,4CACA,MAAgB,eACZ,8BACA,uEACJ,CACF;EACA,UAAU,CAAC;EACX,SAAS;EACT,GAAI;YAbN,CAeE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAkB,WAAU,iBAAkB,CAAA,GAC9C,iBAAA,GAAA,EAAA,KAAC,QAAD;GAAM,WAAU;aAAU;EAAgB,CAAA,CACpC;;AAEZ"}
package/dist/chart.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-i1KCLryV.js");let n=require("react");n=e.r(n);var r=t.Ar(),i={light:``,dark:`.dark`},a={width:320,height:200},o=n.createContext(null);function s(){let e=n.useContext(o);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function c({id:e,className:i,children:s,config:c,initialDimension:u=a,...d}){let f=n.useId(),p=`chart-${e??f.replace(/:/g,``)}`;return(0,r.jsx)(o.Provider,{value:{config:c},children:(0,r.jsxs)(`div`,{"data-slot":`chart`,"data-chart":p,className:t.ei(`[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,i),...d,children:[(0,r.jsx)(l,{id:p,config:c}),(0,r.jsx)(t.R,{initialDimension:u,children:s})]})})}var l=({id:e,config:t})=>{let n=Object.entries(t).filter(([,e])=>e.theme??e.color);return n.length?(0,r.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(i).map(([t,r])=>`
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-Bz5F_va8.js");let n=require("react");n=e.r(n);var r=t.Ar(),i={light:``,dark:`.dark`},a={width:320,height:200},o=n.createContext(null);function s(){let e=n.useContext(o);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function c({id:e,className:i,children:s,config:c,initialDimension:u=a,...d}){let f=n.useId(),p=`chart-${e??f.replace(/:/g,``)}`;return(0,r.jsx)(o.Provider,{value:{config:c},children:(0,r.jsxs)(`div`,{"data-slot":`chart`,"data-chart":p,className:t.ei(`[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,i),...d,children:[(0,r.jsx)(l,{id:p,config:c}),(0,r.jsx)(t.R,{initialDimension:u,children:s})]})})}var l=({id:e,config:t})=>{let n=Object.entries(t).filter(([,e])=>e.theme??e.color);return n.length?(0,r.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(i).map(([t,r])=>`
2
2
  ${r} [data-chart=${e}] {
3
3
  ${n.map(([e,n])=>{let r=n.theme?.[t]??n.color;return r?` --color-${e}: ${r};`:null}).join(`
4
4
  `)}
package/dist/chart.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  "use client";
3
- import { Ar as e, I as t, L as n, R as r, ei as i } from "./vendor-D9rWr_E8.mjs";
3
+ import { Ar as e, I as t, L as n, R as r, ei as i } from "./vendor-0E4gGRxj.mjs";
4
4
  import * as a from "react";
5
5
  //#region packages/ui-web/src/chart.tsx
6
6
  var o = e(), s = {
package/dist/checkbox.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-i1KCLryV.js");let n=require("react");n=e.r(n);var r=t.Ar();function i({className:e,...n}){return(0,r.jsx)(t.Zn,{"data-slot":`checkbox`,className:t.ei(`peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3`,e),...n,children:(0,r.jsx)(t.Qn,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3.5`,children:(0,r.jsx)(t.Zr,{})})})}exports.Checkbox=i;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-Bz5F_va8.js");let n=require("react");n=e.r(n);var r=t.Ar();function i({className:e,...n}){return(0,r.jsx)(t.Zn,{"data-slot":`checkbox`,className:t.ei(`peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3`,e),...n,children:(0,r.jsx)(t.Qn,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3.5`,children:(0,r.jsx)(t.Zr,{})})})}exports.Checkbox=i;
2
2
  //# sourceMappingURL=checkbox.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.cjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport { CheckIcon } from 'lucide-react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCheckboxContract = React.ComponentProps<typeof Checkbox> extends CheckboxBaseProps ? true : false;\n"],"mappings":"iNAOA,SAAS,EAAS,CAAE,YAAW,GAAG,GAA8D,CAC9F,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,WACV,UAAW,EAAA,GACT,01BACA,CACF,EACA,GAAI,YAEJ,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,qBACV,UAAU,oFAEV,EAAA,EAAA,KAAC,EAAA,GAAD,CAAY,CAAA,CACe,CAAA,CACP,CAAA,CAE5B"}
1
+ {"version":3,"file":"checkbox.cjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["import type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport { CheckIcon } from 'lucide-react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCheckboxContract = React.ComponentProps<typeof Checkbox> extends CheckboxBaseProps ? true : false;\n"],"mappings":"iNAMA,SAAS,EAAS,CAAE,YAAW,GAAG,GAA8D,CAC9F,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,WACV,UAAW,EAAA,GACT,01BACA,CACF,EACA,GAAI,YAEJ,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,qBACV,UAAU,oFAEV,EAAA,EAAA,KAAC,EAAA,GAAD,CAAY,CAAA,CACe,CAAA,CACP,CAAA,CAE5B"}
package/dist/checkbox.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { Ar as e, Qn as t, Zn as n, Zr as r, ei as i } from "./vendor-D9rWr_E8.mjs";
2
+ import { Ar as e, Qn as t, Zn as n, Zr as r, ei as i } from "./vendor-0E4gGRxj.mjs";
3
3
  import "react";
4
4
  //#region packages/ui-web/src/checkbox.tsx
5
5
  var a = e();
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.mjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport { CheckIcon } from 'lucide-react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCheckboxContract = React.ComponentProps<typeof Checkbox> extends CheckboxBaseProps ? true : false;\n"],"mappings":";;;;;AAOA,SAAS,EAAS,EAAE,cAAW,GAAG,KAA8D;CAC9F,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EACT,21BACA,CACF;EACA,GAAI;YAEJ,iBAAA,GAAA,EAAA,KAAC,GAAD;GACE,aAAU;GACV,WAAU;aAEV,iBAAA,GAAA,EAAA,KAAC,GAAD,CAAY,CAAA;EACe,CAAA;CACP,CAAA;AAE5B"}
1
+ {"version":3,"file":"checkbox.mjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["import type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport { CheckIcon } from 'lucide-react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCheckboxContract = React.ComponentProps<typeof Checkbox> extends CheckboxBaseProps ? true : false;\n"],"mappings":";;;;;AAMA,SAAS,EAAS,EAAE,cAAW,GAAG,KAA8D;CAC9F,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EACT,21BACA,CACF;EACA,GAAI;YAEJ,iBAAA,GAAA,EAAA,KAAC,GAAD;GACE,aAAU;GACV,WAAU;aAEV,iBAAA,GAAA,EAAA,KAAC,GAAD,CAAY,CAAA;EACe,CAAA;CACP,CAAA;AAE5B"}
@@ -1,2 +1,2 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./vendor-i1KCLryV.js");var t=e.Ar();function n({...n}){return(0,t.jsx)(e.kr,{"data-slot":`collapsible`,...n})}function r({...n}){return(0,t.jsx)(e.Or,{"data-slot":`collapsible-trigger`,...n})}function i({...n}){return(0,t.jsx)(e.Dr,{"data-slot":`collapsible-content`,...n})}exports.Collapsible=n,exports.CollapsibleContent=i,exports.CollapsibleTrigger=r;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./vendor-Bz5F_va8.js");var t=e.Ar();function n({...n}){return(0,t.jsx)(e.Dr,{"data-slot":`collapsible`,...n})}function r({...n}){return(0,t.jsx)(e.kr,{"data-slot":`collapsible-trigger`,...n})}function i({...n}){return(0,t.jsx)(e.Or,{"data-slot":`collapsible-content`,...n})}exports.Collapsible=n,exports.CollapsibleContent=i,exports.CollapsibleTrigger=r;
2
2
  //# sourceMappingURL=collapsible.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.cjs","names":[],"sources":["../packages/ui-web/src/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport { Collapsible as CollapsiblePrimitive } from 'radix-ui';\n\nimport type { CollapsibleBaseProps } from '@gv-tech/ui-core';\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCollapsibleContract =\n React.ComponentProps<typeof Collapsible> extends CollapsibleBaseProps ? true : false;\n"],"mappings":"kJAMA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA2B,YAAU,cAAc,GAAI,CAAQ,CAAA,CACxE,CAEA,SAAS,EAAmB,CAAE,GAAG,GAA+E,CAC9G,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F,CAEA,SAAS,EAAmB,CAAE,GAAG,GAA+E,CAC9G,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F"}
1
+ {"version":3,"file":"collapsible.cjs","names":[],"sources":["../packages/ui-web/src/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport type { CollapsibleBaseProps } from '@gv-tech/ui-core';\nimport { Collapsible as CollapsiblePrimitive } from 'radix-ui';\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCollapsibleContract =\n React.ComponentProps<typeof Collapsible> extends CollapsibleBaseProps ? true : false;\n"],"mappings":"kJAKA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA2B,YAAU,cAAc,GAAI,CAAQ,CAAA,CACxE,CAEA,SAAS,EAAmB,CAAE,GAAG,GAA+E,CAC9G,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F,CAEA,SAAS,EAAmB,CAAE,GAAG,GAA+E,CAC9G,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F"}
@@ -1,22 +1,22 @@
1
1
  "use client";
2
2
  "use client";
3
- import { Ar as e, Dr as t, Or as n, kr as r } from "./vendor-D9rWr_E8.mjs";
3
+ import { Ar as e, Dr as t, Or as n, kr as r } from "./vendor-0E4gGRxj.mjs";
4
4
  //#region packages/ui-web/src/collapsible.tsx
5
5
  var i = e();
6
6
  function a({ ...e }) {
7
- return /* @__PURE__ */ (0, i.jsx)(r, {
7
+ return /* @__PURE__ */ (0, i.jsx)(t, {
8
8
  "data-slot": "collapsible",
9
9
  ...e
10
10
  });
11
11
  }
12
12
  function o({ ...e }) {
13
- return /* @__PURE__ */ (0, i.jsx)(n, {
13
+ return /* @__PURE__ */ (0, i.jsx)(r, {
14
14
  "data-slot": "collapsible-trigger",
15
15
  ...e
16
16
  });
17
17
  }
18
18
  function s({ ...e }) {
19
- return /* @__PURE__ */ (0, i.jsx)(t, {
19
+ return /* @__PURE__ */ (0, i.jsx)(n, {
20
20
  "data-slot": "collapsible-content",
21
21
  ...e
22
22
  });
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.mjs","names":[],"sources":["../packages/ui-web/src/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport { Collapsible as CollapsiblePrimitive } from 'radix-ui';\n\nimport type { CollapsibleBaseProps } from '@gv-tech/ui-core';\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCollapsibleContract =\n React.ComponentProps<typeof Collapsible> extends CollapsibleBaseProps ? true : false;\n"],"mappings":";;;;;AAMA,SAAS,EAAY,EAAE,GAAG,KAAiE;CACzF,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA2B,aAAU;EAAc,GAAI;CAAQ,CAAA;AACxE;AAEA,SAAS,EAAmB,EAAE,GAAG,KAA+E;CAC9G,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAyC,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAC9F;AAEA,SAAS,EAAmB,EAAE,GAAG,KAA+E;CAC9G,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAyC,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAC9F"}
1
+ {"version":3,"file":"collapsible.mjs","names":[],"sources":["../packages/ui-web/src/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport type { CollapsibleBaseProps } from '@gv-tech/ui-core';\nimport { Collapsible as CollapsiblePrimitive } from 'radix-ui';\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCollapsibleContract =\n React.ComponentProps<typeof Collapsible> extends CollapsibleBaseProps ? true : false;\n"],"mappings":";;;;;AAKA,SAAS,EAAY,EAAE,GAAG,KAAiE;CACzF,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA2B,aAAU;EAAc,GAAI;CAAQ,CAAA;AACxE;AAEA,SAAS,EAAmB,EAAE,GAAG,KAA+E;CAC9G,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAyC,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAC9F;AAEA,SAAS,EAAmB,EAAE,GAAG,KAA+E;CAC9G,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAyC,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAC9F"}
package/dist/combobox.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-i1KCLryV.js"),n=require("./button.cjs"),r=require("./input-group.cjs");let i=require("react");i=e.r(i);var a=t.Ar(),o=t.m;function s({...e}){return(0,a.jsx)(t.p,{"data-slot":`combobox-value`,...e})}function c({className:e,children:n,...r}){return(0,a.jsxs)(t.E,{"data-slot":`combobox-trigger`,className:t.ei(`[&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,a.jsx)(t.Xr,{className:`text-muted-foreground pointer-events-none size-4`})]})}function l({className:e,...n}){return(0,a.jsx)(t.w,{"data-slot":`combobox-clear`,render:(0,a.jsx)(r.InputGroupButton,{variant:`ghost`,size:`icon-xs`}),className:t.ei(e),...n,children:(0,a.jsx)(t.Mr,{className:`pointer-events-none`})})}function u({className:e,children:n,disabled:i=!1,showTrigger:o=!0,showClear:s=!1,...u}){return(0,a.jsxs)(r.InputGroup,{className:t.ei(`w-auto`,e),children:[(0,a.jsx)(t.T,{render:(0,a.jsx)(r.InputGroupInput,{disabled:i}),...u}),(0,a.jsxs)(r.InputGroupAddon,{align:`inline-end`,children:[o&&(0,a.jsx)(r.InputGroupButton,{size:`icon-xs`,variant:`ghost`,asChild:!0,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:i,children:(0,a.jsx)(c,{})}),s&&(0,a.jsx)(l,{disabled:i})]}),n]})}function d({className:e,side:n=`bottom`,sideOffset:r=6,align:i=`start`,alignOffset:o=0,anchor:s,...c}){return(0,a.jsx)(t.x,{children:(0,a.jsx)(t.b,{side:n,sideOffset:r,align:i,alignOffset:o,anchor:s,className:`isolate z-50`,children:(0,a.jsx)(t.y,{"data-slot":`combobox-content`,"data-chips":!!s,className:t.ei(`group/combobox-content bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none`,e),...c})})})}function f({className:e,...n}){return(0,a.jsx)(t.S,{"data-slot":`combobox-list`,className:t.ei(`no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0`,e),...n})}function p({className:e,children:n,...r}){return(0,a.jsxs)(t.g,{"data-slot":`combobox-item`,className:t.ei(`data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,a.jsx)(t.f,{render:(0,a.jsx)(`span`,{className:`pointer-events-none absolute end-2 flex size-4 items-center justify-center`}),children:(0,a.jsx)(t.Zr,{className:`pointer-events-none`})})]})}function m({className:e,...n}){return(0,a.jsx)(t.v,{"data-slot":`combobox-group`,className:t.ei(e),...n})}function h({className:e,...n}){return(0,a.jsx)(t._,{"data-slot":`combobox-label`,className:t.ei(`text-muted-foreground px-2 py-1.5 text-xs`,e),...n})}function g({...e}){return(0,a.jsx)(t.C,{"data-slot":`combobox-collection`,...e})}function _({className:e,...n}){return(0,a.jsx)(t.h,{"data-slot":`combobox-empty`,className:t.ei(`text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex`,e),...n})}function v({className:e,...n}){return(0,a.jsx)(t.c,{"data-slot":`combobox-separator`,className:t.ei(`bg-border -mx-1 my-1 h-px`,e),...n})}function y({className:e,...n}){return(0,a.jsx)(t.d,{"data-slot":`combobox-chips`,className:t.ei(`border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1`,e),...n})}function b({className:e,children:r,showRemove:i=!0,...o}){return(0,a.jsxs)(t.u,{"data-slot":`combobox-chip`,className:t.ei(`bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0`,e),...o,children:[r,i&&(0,a.jsx)(t.l,{render:(0,a.jsx)(n.Button,{variant:`ghost`,size:`icon-xs`}),className:`-ms-1 opacity-50 hover:opacity-100`,"data-slot":`combobox-chip-remove`,children:(0,a.jsx)(t.Mr,{className:`pointer-events-none`})})]})}function x({className:e,...n}){return(0,a.jsx)(t.T,{"data-slot":`combobox-chip-input`,className:t.ei(`min-w-16 flex-1 outline-none`,e),...n})}function S(){return i.useRef(null)}exports.Combobox=o,exports.ComboboxChip=b,exports.ComboboxChips=y,exports.ComboboxChipsInput=x,exports.ComboboxCollection=g,exports.ComboboxContent=d,exports.ComboboxEmpty=_,exports.ComboboxGroup=m,exports.ComboboxInput=u,exports.ComboboxItem=p,exports.ComboboxLabel=h,exports.ComboboxList=f,exports.ComboboxSeparator=v,exports.ComboboxTrigger=c,exports.ComboboxValue=s,exports.useComboboxAnchor=S;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-Bz5F_va8.js"),n=require("./button.cjs"),r=require("./input-group.cjs");let i=require("react");i=e.r(i);var a=t.Ar(),o=t.m;function s({...e}){return(0,a.jsx)(t.p,{"data-slot":`combobox-value`,...e})}function c({className:e,children:n,...r}){return(0,a.jsxs)(t.E,{"data-slot":`combobox-trigger`,className:t.ei(`[&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,a.jsx)(t.Xr,{className:`text-muted-foreground pointer-events-none size-4`})]})}function l({className:e,...n}){return(0,a.jsx)(t.w,{"data-slot":`combobox-clear`,render:(0,a.jsx)(r.InputGroupButton,{variant:`ghost`,size:`icon-xs`}),className:t.ei(e),...n,children:(0,a.jsx)(t.Mr,{className:`pointer-events-none`})})}function u({className:e,children:n,disabled:i=!1,showTrigger:o=!0,showClear:s=!1,...u}){return(0,a.jsxs)(r.InputGroup,{className:t.ei(`w-auto`,e),children:[(0,a.jsx)(t.T,{render:(0,a.jsx)(r.InputGroupInput,{disabled:i}),...u}),(0,a.jsxs)(r.InputGroupAddon,{align:`inline-end`,children:[o&&(0,a.jsx)(r.InputGroupButton,{size:`icon-xs`,variant:`ghost`,asChild:!0,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:i,children:(0,a.jsx)(c,{})}),s&&(0,a.jsx)(l,{disabled:i})]}),n]})}function d({className:e,side:n=`bottom`,sideOffset:r=6,align:i=`start`,alignOffset:o=0,anchor:s,...c}){return(0,a.jsx)(t.x,{children:(0,a.jsx)(t.b,{side:n,sideOffset:r,align:i,alignOffset:o,anchor:s,className:`isolate z-50`,children:(0,a.jsx)(t.y,{"data-slot":`combobox-content`,"data-chips":!!s,className:t.ei(`group/combobox-content bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none`,e),...c})})})}function f({className:e,...n}){return(0,a.jsx)(t.S,{"data-slot":`combobox-list`,className:t.ei(`no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0`,e),...n})}function p({className:e,children:n,...r}){return(0,a.jsxs)(t.g,{"data-slot":`combobox-item`,className:t.ei(`data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,a.jsx)(t.f,{render:(0,a.jsx)(`span`,{className:`pointer-events-none absolute end-2 flex size-4 items-center justify-center`}),children:(0,a.jsx)(t.Zr,{className:`pointer-events-none`})})]})}function m({className:e,...n}){return(0,a.jsx)(t.v,{"data-slot":`combobox-group`,className:t.ei(e),...n})}function h({className:e,...n}){return(0,a.jsx)(t._,{"data-slot":`combobox-label`,className:t.ei(`text-muted-foreground px-2 py-1.5 text-xs`,e),...n})}function g({...e}){return(0,a.jsx)(t.C,{"data-slot":`combobox-collection`,...e})}function _({className:e,...n}){return(0,a.jsx)(t.h,{"data-slot":`combobox-empty`,className:t.ei(`text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex`,e),...n})}function v({className:e,...n}){return(0,a.jsx)(t.c,{"data-slot":`combobox-separator`,className:t.ei(`bg-border -mx-1 my-1 h-px`,e),...n})}function y({className:e,...n}){return(0,a.jsx)(t.d,{"data-slot":`combobox-chips`,className:t.ei(`border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1`,e),...n})}function b({className:e,children:r,showRemove:i=!0,...o}){return(0,a.jsxs)(t.u,{"data-slot":`combobox-chip`,className:t.ei(`bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0`,e),...o,children:[r,i&&(0,a.jsx)(t.l,{render:(0,a.jsx)(n.Button,{variant:`ghost`,size:`icon-xs`}),className:`-ms-1 opacity-50 hover:opacity-100`,"data-slot":`combobox-chip-remove`,children:(0,a.jsx)(t.Mr,{className:`pointer-events-none`})})]})}function x({className:e,...n}){return(0,a.jsx)(t.T,{"data-slot":`combobox-chip-input`,className:t.ei(`min-w-16 flex-1 outline-none`,e),...n})}function S(){return i.useRef(null)}exports.Combobox=o,exports.ComboboxChip=b,exports.ComboboxChips=y,exports.ComboboxChipsInput=x,exports.ComboboxCollection=g,exports.ComboboxContent=d,exports.ComboboxEmpty=_,exports.ComboboxGroup=m,exports.ComboboxInput=u,exports.ComboboxItem=p,exports.ComboboxLabel=h,exports.ComboboxList=f,exports.ComboboxSeparator=v,exports.ComboboxTrigger=c,exports.ComboboxValue=s,exports.useComboboxAnchor=S;
2
2
  //# sourceMappingURL=combobox.cjs.map