@gv-tech/design-system 2.21.0 → 2.21.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 (235) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.cjs.map +1 -1
  3. package/dist/accordion.mjs +2 -2
  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 +2 -2
  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 +2 -2
  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/avatar.cjs +1 -1
  17. package/dist/avatar.cjs.map +1 -1
  18. package/dist/avatar.mjs +2 -2
  19. package/dist/avatar.mjs.map +1 -1
  20. package/dist/badge.cjs +1 -1
  21. package/dist/badge.cjs.map +1 -1
  22. package/dist/badge.mjs +2 -2
  23. package/dist/badge.mjs.map +1 -1
  24. package/dist/breadcrumb.cjs +1 -1
  25. package/dist/breadcrumb.cjs.map +1 -1
  26. package/dist/breadcrumb.mjs +2 -2
  27. package/dist/breadcrumb.mjs.map +1 -1
  28. package/dist/button.cjs +1 -1
  29. package/dist/button.cjs.map +1 -1
  30. package/dist/button.mjs +2 -2
  31. package/dist/button.mjs.map +1 -1
  32. package/dist/calendar.cjs +1 -1
  33. package/dist/calendar.cjs.map +1 -1
  34. package/dist/calendar.mjs +2 -2
  35. package/dist/calendar.mjs.map +1 -1
  36. package/dist/card.cjs +1 -1
  37. package/dist/card.cjs.map +1 -1
  38. package/dist/card.mjs +2 -2
  39. package/dist/card.mjs.map +1 -1
  40. package/dist/carousel.cjs +1 -1
  41. package/dist/carousel.cjs.map +1 -1
  42. package/dist/carousel.mjs +2 -2
  43. package/dist/carousel.mjs.map +1 -1
  44. package/dist/chart.cjs +1 -1
  45. package/dist/chart.cjs.map +1 -1
  46. package/dist/chart.mjs +2 -2
  47. package/dist/chart.mjs.map +1 -1
  48. package/dist/checkbox.cjs +1 -1
  49. package/dist/checkbox.cjs.map +1 -1
  50. package/dist/checkbox.mjs +2 -2
  51. package/dist/checkbox.mjs.map +1 -1
  52. package/dist/collapsible.cjs +1 -1
  53. package/dist/collapsible.mjs +1 -1
  54. package/dist/command.cjs +1 -1
  55. package/dist/command.cjs.map +1 -1
  56. package/dist/command.mjs +2 -2
  57. package/dist/command.mjs.map +1 -1
  58. package/dist/context-menu.cjs +1 -1
  59. package/dist/context-menu.cjs.map +1 -1
  60. package/dist/context-menu.mjs +2 -2
  61. package/dist/context-menu.mjs.map +1 -1
  62. package/dist/design-system.css +2 -2
  63. package/dist/dialog.cjs +1 -1
  64. package/dist/dialog.cjs.map +1 -1
  65. package/dist/dialog.mjs +2 -2
  66. package/dist/dialog.mjs.map +1 -1
  67. package/dist/drawer.cjs +1 -1
  68. package/dist/drawer.cjs.map +1 -1
  69. package/dist/drawer.mjs +2 -2
  70. package/dist/drawer.mjs.map +1 -1
  71. package/dist/dropdown-menu.cjs +1 -1
  72. package/dist/dropdown-menu.cjs.map +1 -1
  73. package/dist/dropdown-menu.mjs +2 -2
  74. package/dist/dropdown-menu.mjs.map +1 -1
  75. package/dist/form.cjs +1 -1
  76. package/dist/form.cjs.map +1 -1
  77. package/dist/form.mjs +2 -2
  78. package/dist/form.mjs.map +1 -1
  79. package/dist/hover-card.cjs +1 -1
  80. package/dist/hover-card.cjs.map +1 -1
  81. package/dist/hover-card.mjs +2 -2
  82. package/dist/hover-card.mjs.map +1 -1
  83. package/dist/index.cjs +1 -1
  84. package/dist/index.mjs +4 -4
  85. package/dist/input.cjs +1 -1
  86. package/dist/input.cjs.map +1 -1
  87. package/dist/input.mjs +2 -2
  88. package/dist/input.mjs.map +1 -1
  89. package/dist/label.cjs +1 -1
  90. package/dist/label.cjs.map +1 -1
  91. package/dist/label.mjs +2 -2
  92. package/dist/label.mjs.map +1 -1
  93. package/dist/menubar.cjs +1 -1
  94. package/dist/menubar.cjs.map +1 -1
  95. package/dist/menubar.mjs +2 -2
  96. package/dist/menubar.mjs.map +1 -1
  97. package/dist/navigation-menu.cjs +1 -1
  98. package/dist/navigation-menu.cjs.map +1 -1
  99. package/dist/navigation-menu.mjs +2 -2
  100. package/dist/navigation-menu.mjs.map +1 -1
  101. package/dist/pagination.cjs +1 -1
  102. package/dist/pagination.cjs.map +1 -1
  103. package/dist/pagination.mjs +2 -2
  104. package/dist/pagination.mjs.map +1 -1
  105. package/dist/popover.cjs +1 -1
  106. package/dist/popover.cjs.map +1 -1
  107. package/dist/popover.mjs +2 -2
  108. package/dist/popover.mjs.map +1 -1
  109. package/dist/progress.cjs +1 -1
  110. package/dist/progress.cjs.map +1 -1
  111. package/dist/progress.mjs +2 -2
  112. package/dist/progress.mjs.map +1 -1
  113. package/dist/radio-group.cjs +1 -1
  114. package/dist/radio-group.cjs.map +1 -1
  115. package/dist/radio-group.mjs +2 -2
  116. package/dist/radio-group.mjs.map +1 -1
  117. package/dist/resizable.cjs +1 -1
  118. package/dist/resizable.cjs.map +1 -1
  119. package/dist/resizable.mjs +2 -2
  120. package/dist/resizable.mjs.map +1 -1
  121. package/dist/{rolldown-runtime-C0IHAABJ.mjs → rolldown-runtime-CWhphoD1.mjs} +1 -1
  122. package/dist/rolldown-runtime-mLOUI7ql.js +1 -0
  123. package/dist/scroll-area.cjs +1 -1
  124. package/dist/scroll-area.cjs.map +1 -1
  125. package/dist/scroll-area.mjs +2 -2
  126. package/dist/scroll-area.mjs.map +1 -1
  127. package/dist/scroll-to-top.cjs +1 -1
  128. package/dist/scroll-to-top.cjs.map +1 -1
  129. package/dist/scroll-to-top.mjs +2 -2
  130. package/dist/scroll-to-top.mjs.map +1 -1
  131. package/dist/search.cjs +1 -1
  132. package/dist/search.cjs.map +1 -1
  133. package/dist/search.mjs +2 -2
  134. package/dist/search.mjs.map +1 -1
  135. package/dist/select.cjs +1 -1
  136. package/dist/select.cjs.map +1 -1
  137. package/dist/select.mjs +2 -2
  138. package/dist/select.mjs.map +1 -1
  139. package/dist/separator.cjs +1 -1
  140. package/dist/separator.cjs.map +1 -1
  141. package/dist/separator.mjs +2 -2
  142. package/dist/separator.mjs.map +1 -1
  143. package/dist/sheet.cjs +1 -1
  144. package/dist/sheet.cjs.map +1 -1
  145. package/dist/sheet.mjs +2 -2
  146. package/dist/sheet.mjs.map +1 -1
  147. package/dist/skeleton.cjs +1 -1
  148. package/dist/skeleton.cjs.map +1 -1
  149. package/dist/skeleton.mjs +2 -2
  150. package/dist/skeleton.mjs.map +1 -1
  151. package/dist/slider.cjs +1 -1
  152. package/dist/slider.cjs.map +1 -1
  153. package/dist/slider.mjs +2 -2
  154. package/dist/slider.mjs.map +1 -1
  155. package/dist/sonner.cjs +1 -1
  156. package/dist/sonner.cjs.map +1 -1
  157. package/dist/sonner.mjs +1 -1
  158. package/dist/sonner.mjs.map +1 -1
  159. package/dist/{src-B8AA-nU4.js → src-D3IDWqE2.js} +2 -2
  160. package/dist/{src-B8AA-nU4.js.map → src-D3IDWqE2.js.map} +1 -1
  161. package/dist/{src-C65A5RuY.mjs → src-N08I3kfW.mjs} +2 -2
  162. package/dist/{src-C65A5RuY.mjs.map → src-N08I3kfW.mjs.map} +1 -1
  163. package/dist/support-fab.cjs +1 -1
  164. package/dist/support-fab.cjs.map +1 -1
  165. package/dist/support-fab.mjs +2 -2
  166. package/dist/support-fab.mjs.map +1 -1
  167. package/dist/switch.cjs +1 -1
  168. package/dist/switch.cjs.map +1 -1
  169. package/dist/switch.mjs +2 -2
  170. package/dist/switch.mjs.map +1 -1
  171. package/dist/table-of-contents.cjs +1 -1
  172. package/dist/table-of-contents.cjs.map +1 -1
  173. package/dist/table-of-contents.mjs +2 -2
  174. package/dist/table-of-contents.mjs.map +1 -1
  175. package/dist/table.cjs +1 -1
  176. package/dist/table.cjs.map +1 -1
  177. package/dist/table.mjs +2 -2
  178. package/dist/table.mjs.map +1 -1
  179. package/dist/tabs.cjs +1 -1
  180. package/dist/tabs.cjs.map +1 -1
  181. package/dist/tabs.mjs +2 -2
  182. package/dist/tabs.mjs.map +1 -1
  183. package/dist/text.cjs +1 -1
  184. package/dist/text.cjs.map +1 -1
  185. package/dist/text.mjs +2 -2
  186. package/dist/text.mjs.map +1 -1
  187. package/dist/textarea.cjs +1 -1
  188. package/dist/textarea.cjs.map +1 -1
  189. package/dist/textarea.mjs +2 -2
  190. package/dist/textarea.mjs.map +1 -1
  191. package/dist/theme-provider.cjs +1 -1
  192. package/dist/theme-provider.cjs.map +1 -1
  193. package/dist/theme-provider.mjs +1 -1
  194. package/dist/theme-provider.mjs.map +1 -1
  195. package/dist/{theme-toggle-DoAVRoyO.mjs → theme-toggle-B6QS2aTS.mjs} +3 -3
  196. package/dist/{theme-toggle-DoAVRoyO.mjs.map → theme-toggle-B6QS2aTS.mjs.map} +1 -1
  197. package/dist/theme-toggle-CbtfA8aG.js +2 -0
  198. package/dist/{theme-toggle-B8UiizQB.js.map → theme-toggle-CbtfA8aG.js.map} +1 -1
  199. package/dist/theme-toggle.cjs +1 -1
  200. package/dist/theme-toggle.mjs +1 -1
  201. package/dist/toast.cjs +1 -1
  202. package/dist/toast.cjs.map +1 -1
  203. package/dist/toast.mjs +2 -2
  204. package/dist/toast.mjs.map +1 -1
  205. package/dist/{toaster-DnZKPR-G.js → toaster-C-1djNvf.js} +2 -2
  206. package/dist/{toaster-DnZKPR-G.js.map → toaster-C-1djNvf.js.map} +1 -1
  207. package/dist/{toaster-BgZxvlTL.mjs → toaster-CEa33QUH.mjs} +2 -2
  208. package/dist/{toaster-BgZxvlTL.mjs.map → toaster-CEa33QUH.mjs.map} +1 -1
  209. package/dist/toaster.cjs +1 -1
  210. package/dist/toaster.mjs +1 -1
  211. package/dist/toggle-group.cjs +1 -1
  212. package/dist/toggle-group.cjs.map +1 -1
  213. package/dist/toggle-group.mjs +3 -3
  214. package/dist/toggle-group.mjs.map +1 -1
  215. package/dist/toggle.cjs +1 -1
  216. package/dist/toggle.cjs.map +1 -1
  217. package/dist/toggle.mjs +3 -3
  218. package/dist/toggle.mjs.map +1 -1
  219. package/dist/tooltip.cjs +1 -1
  220. package/dist/tooltip.cjs.map +1 -1
  221. package/dist/tooltip.mjs +2 -2
  222. package/dist/tooltip.mjs.map +1 -1
  223. package/dist/{utils-BtI8Nf6i.mjs → utils-BsD1_fYL.mjs} +2 -2
  224. package/dist/{utils-BtI8Nf6i.mjs.map → utils-BsD1_fYL.mjs.map} +1 -1
  225. package/dist/utils-DU-Y_pvO.js +2 -0
  226. package/dist/{utils-CbSX47LV.js.map → utils-DU-Y_pvO.js.map} +1 -1
  227. package/dist/{vendor-D3ZzLf8D.js → vendor-3cr8xz0x.js} +8 -8
  228. package/dist/{vendor-D3ZzLf8D.js.map → vendor-3cr8xz0x.js.map} +1 -1
  229. package/dist/{vendor-Cr0eKZrm.mjs → vendor-ChPUVHXi.mjs} +7 -6
  230. package/dist/vendor-ChPUVHXi.mjs.map +1 -0
  231. package/package.json +22 -22
  232. package/dist/rolldown-runtime-CacfPODE.js +0 -1
  233. package/dist/theme-toggle-B8UiizQB.js +0 -2
  234. package/dist/utils-CbSX47LV.js +0 -2
  235. package/dist/vendor-Cr0eKZrm.mjs.map +0 -1
package/dist/calendar.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  "use client";
3
- import { Sn as e, ar as t, ir as n, rr as r, vr as i, xn as a } from "./vendor-Cr0eKZrm.mjs";
4
- import { t as o } from "./utils-BtI8Nf6i.mjs";
3
+ import { Sn as e, ar as t, ir as n, rr as r, vr as i, xn as a } from "./vendor-ChPUVHXi.mjs";
4
+ import { t as o } from "./utils-BsD1_fYL.mjs";
5
5
  import { Button as s, buttonVariants as c } from "./button.mjs";
6
6
  import * as l from "react";
7
7
  //#region packages/ui-web/src/calendar.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.mjs","names":[],"sources":["../packages/ui-web/src/calendar.tsx"],"sourcesContent":["'use client';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';\n\nimport { CalendarBaseProps } from '@gv-tech/ui-core';\nimport { Button, buttonVariants } from './button';\nimport { cn } from './lib/utils';\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> &\n CalendarBaseProps & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n }) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'bg-background group/calendar p-3 [--cell-size:2.5rem] [[data-slot=card-content]_&]:bg-transparent [[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 'relative',\n className,\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString('default', { 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(\n 'absolute inset-x-0 top-2 flex items-center justify-between pointer-events-none px-2',\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'h-7 w-7 select-none p-0 aria-disabled:opacity-50 pointer-events-auto',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'h-7 w-7 select-none p-0 aria-disabled:opacity-50 pointer-events-auto',\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n 'flex h-[--cell-size] w-full items-center justify-center text-sm font-medium',\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(\n 'has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border',\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn('bg-popover absolute inset-0 opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'select-none font-medium',\n captionLayout === 'label'\n ? 'text-sm'\n : '[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5',\n defaultClassNames.caption_label,\n ),\n table: 'w-full border-collapse grow',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'text-muted-foreground pt-1 flex-1 select-none rounded-md text-[0.8rem] font-normal uppercase',\n defaultClassNames.weekday,\n ),\n week: cn('flex w-full mt-2', defaultClassNames.week),\n week_number_header: cn('w-[--cell-size] select-none', defaultClassNames.week_number_header),\n week_number: cn('text-muted-foreground select-none text-[0.8rem]', defaultClassNames.week_number),\n day: cn(\n 'group/day relative flex aspect-square h-10 w-10 select-none items-center justify-center p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md',\n defaultClassNames.day,\n ),\n range_start: cn('bg-accent rounded-l-md', defaultClassNames.range_start),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('bg-accent rounded-r-md', defaultClassNames.range_end),\n today: cn(\n 'bg-accent text-accent-foreground rounded-md 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', className)} {...props} />;\n }\n\n if (orientation === 'right') {\n return <ChevronRightIcon className={cn('size-4', className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn('size-4', className)} {...props} />;\n },\n DayButton: CalendarDayButton,\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({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>) {\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()}\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 'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-full w-full min-w-[--cell-size] items-center justify-center 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-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\nexport type { CalendarBaseProps as CalendarProps };\n"],"mappings":";;;;;;;;AASA,SAAS,EAAS,EAChB,cACA,eACA,qBAAkB,IAClB,mBAAgB,SAChB,mBAAgB,SAChB,eACA,eACA,GAAG,KAIA;CACH,IAAM,IAAoB,GAAsB;AAEhD,QACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACmB;EACjB,WAAW,EACT,oJACA,OAAO,GAAG,6CACV,OAAO,GAAG,iDACV,YACA,EACD;EACc;EACf,YAAY;GACV,sBAAsB,MAAS,EAAK,eAAe,WAAW,EAAE,OAAO,SAAS,CAAC;GACjF,GAAG;GACJ;EACD,YAAY;GACV,MAAM,EAAG,SAAS,EAAkB,KAAK;GACzC,QAAQ,EAAG,4CAA4C,EAAkB,OAAO;GAChF,OAAO,EAAG,8BAA8B,EAAkB,MAAM;GAChE,KAAK,EACH,uFACA,EAAkB,IACnB;GACD,iBAAiB,EACf,EAAe,EAAE,SAAS,GAAe,CAAC,EAC1C,wEACA,EAAkB,gBACnB;GACD,aAAa,EACX,EAAe,EAAE,SAAS,GAAe,CAAC,EAC1C,wEACA,EAAkB,YACnB;GACD,eAAe,EACb,+EACA,EAAkB,cACnB;GACD,WAAW,EACT,uFACA,EAAkB,UACnB;GACD,eAAe,EACb,uHACA,EAAkB,cACnB;GACD,UAAU,EAAG,yCAAyC,EAAkB,SAAS;GACjF,eAAe,EACb,2BACA,MAAkB,UACd,YACA,2GACJ,EAAkB,cACnB;GACD,OAAO;GACP,UAAU,EAAG,QAAQ,EAAkB,SAAS;GAChD,SAAS,EACP,gGACA,EAAkB,QACnB;GACD,MAAM,EAAG,oBAAoB,EAAkB,KAAK;GACpD,oBAAoB,EAAG,+BAA+B,EAAkB,mBAAmB;GAC3F,aAAa,EAAG,mDAAmD,EAAkB,YAAY;GACjG,KAAK,EACH,0NACA,EAAkB,IACnB;GACD,aAAa,EAAG,0BAA0B,EAAkB,YAAY;GACxE,cAAc,EAAG,gBAAgB,EAAkB,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AK,oBAAoB;EACvC,wBACE,EAAU,YAAY,CAAC,EAAU,eAAe,CAAC,EAAU,aAAa,CAAC,EAAU;EAErF,oBAAkB,EAAU;EAC5B,kBAAgB,EAAU;EAC1B,qBAAmB,EAAU;EAC7B,WAAW,EACT,oxBACA,EAAkB,KAClB,EACD;EACD,GAAI;EACJ,CAAA"}
1
+ {"version":3,"file":"calendar.mjs","names":[],"sources":["../packages/ui-web/src/calendar.tsx"],"sourcesContent":["'use client';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';\n\nimport { CalendarBaseProps } from '@gv-tech/ui-core';\nimport { Button, buttonVariants } from './button';\nimport { cn } from './lib/utils';\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> &\n CalendarBaseProps & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n }) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'bg-background group/calendar p-3 [--cell-size:2.5rem] [[data-slot=card-content]_&]:bg-transparent [[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 'relative',\n className,\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString('default', { 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(\n 'absolute inset-x-0 top-2 flex items-center justify-between pointer-events-none px-2',\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'h-7 w-7 select-none p-0 aria-disabled:opacity-50 pointer-events-auto',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'h-7 w-7 select-none p-0 aria-disabled:opacity-50 pointer-events-auto',\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n 'flex h-[--cell-size] w-full items-center justify-center text-sm font-medium',\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(\n 'has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border',\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn('bg-popover absolute inset-0 opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'select-none font-medium',\n captionLayout === 'label'\n ? 'text-sm'\n : '[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5',\n defaultClassNames.caption_label,\n ),\n table: 'w-full border-collapse grow',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'text-muted-foreground pt-1 flex-1 select-none rounded-md text-[0.8rem] font-normal uppercase',\n defaultClassNames.weekday,\n ),\n week: cn('flex w-full mt-2', defaultClassNames.week),\n week_number_header: cn('w-[--cell-size] select-none', defaultClassNames.week_number_header),\n week_number: cn('text-muted-foreground select-none text-[0.8rem]', defaultClassNames.week_number),\n day: cn(\n 'group/day relative flex aspect-square h-10 w-10 select-none items-center justify-center p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md',\n defaultClassNames.day,\n ),\n range_start: cn('bg-accent rounded-l-md', defaultClassNames.range_start),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('bg-accent rounded-r-md', defaultClassNames.range_end),\n today: cn(\n 'bg-accent text-accent-foreground rounded-md 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', className)} {...props} />;\n }\n\n if (orientation === 'right') {\n return <ChevronRightIcon className={cn('size-4', className)} {...props} />;\n }\n\n return <ChevronDownIcon className={cn('size-4', className)} {...props} />;\n },\n DayButton: CalendarDayButton,\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({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>) {\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()}\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 'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-full w-full min-w-[--cell-size] items-center justify-center 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-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\nexport type { CalendarBaseProps as CalendarProps };\n"],"mappings":";;;;;;;;AASA,SAAS,EAAS,EAChB,cACA,eACA,qBAAkB,IAClB,mBAAgB,SAChB,mBAAgB,SAChB,eACA,eACA,GAAG,KAIA;CACH,IAAM,IAAoB,EAAqB;CAE/C,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACmB;EACjB,WAAW,EACT,oJACA,OAAO,GAAG,6CACV,OAAO,GAAG,iDACV,YACA,CACF;EACe;EACf,YAAY;GACV,sBAAsB,MAAS,EAAK,eAAe,WAAW,EAAE,OAAO,QAAQ,CAAC;GAChF,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,EACH,uFACA,EAAkB,GACpB;GACA,iBAAiB,EACf,EAAe,EAAE,SAAS,EAAc,CAAC,GACzC,wEACA,EAAkB,eACpB;GACA,aAAa,EACX,EAAe,EAAE,SAAS,EAAc,CAAC,GACzC,wEACA,EAAkB,WACpB;GACA,eAAe,EACb,+EACA,EAAkB,aACpB;GACA,WAAW,EACT,uFACA,EAAkB,SACpB;GACA,eAAe,EACb,uHACA,EAAkB,aACpB;GACA,UAAU,EAAG,yCAAyC,EAAkB,QAAQ;GAChF,eAAe,EACb,2BACA,MAAkB,UACd,YACA,2GACJ,EAAkB,aACpB;GACA,OAAO;GACP,UAAU,EAAG,QAAQ,EAAkB,QAAQ;GAC/C,SAAS,EACP,gGACA,EAAkB,OACpB;GACA,MAAM,EAAG,oBAAoB,EAAk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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;EACtC,wBACE,EAAU,YAAY,CAAC,EAAU,eAAe,CAAC,EAAU,aAAa,CAAC,EAAU;EAErF,oBAAkB,EAAU;EAC5B,kBAAgB,EAAU;EAC1B,qBAAmB,EAAU;EAC7B,WAAW,EACT,oxBACA,EAAkB,KAClB,CACF;EACA,GAAI;CACL,CAAA;AAEL"}
package/dist/card.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./rolldown-runtime-CacfPODE.js`),t=require(`./vendor-D3ZzLf8D.js`),n=require(`./utils-CbSX47LV.js`);let r=require(`react`);r=e.r(r);var i=t.vr(),a=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`bg-card text-card-foreground rounded-xl border shadow`,e),...t}));a.displayName=`Card`;var o=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`flex flex-col space-y-1.5 p-6`,e),...t}));o.displayName=`CardHeader`;var s=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`leading-none font-semibold tracking-tight`,e),...t}));s.displayName=`CardTitle`;var c=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`text-muted-foreground text-sm`,e),...t}));c.displayName=`CardDescription`;var l=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`p-6 pt-0`,e),...t}));l.displayName=`CardContent`;var u=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`flex items-center p-6 pt-0`,e),...t}));u.displayName=`CardFooter`,exports.Card=a,exports.CardContent=l,exports.CardDescription=c,exports.CardFooter=u,exports.CardHeader=o,exports.CardTitle=s;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-3cr8xz0x.js"),n=require("./utils-DU-Y_pvO.js");let r=require("react");r=e.r(r);var i=t.vr(),a=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`bg-card text-card-foreground rounded-xl border shadow`,e),...t}));a.displayName=`Card`;var o=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`flex flex-col space-y-1.5 p-6`,e),...t}));o.displayName=`CardHeader`;var s=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`leading-none font-semibold tracking-tight`,e),...t}));s.displayName=`CardTitle`;var c=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`text-muted-foreground text-sm`,e),...t}));c.displayName=`CardDescription`;var l=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`p-6 pt-0`,e),...t}));l.displayName=`CardContent`;var u=r.forwardRef(({className:e,...t},r)=>(0,i.jsx)(`div`,{ref:r,className:n.t(`flex items-center p-6 pt-0`,e),...t}));u.displayName=`CardFooter`,exports.Card=a,exports.CardContent=l,exports.CardDescription=c,exports.CardFooter=u,exports.CardHeader=o,exports.CardTitle=s;
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":["'use client';\nimport * as React from 'react';\n\nimport type { CardBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement>, CardBaseProps {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('bg-card text-card-foreground rounded-xl border shadow', className)} {...props} />\n));\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('leading-none font-semibold tracking-tight', className)} {...props} />\n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />,\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n ),\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\n"],"mappings":"+PAQM,EAAO,EAAM,YAAuC,CAAE,YAAW,GAAG,GAAS,KACjF,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,wDAAyD,EAAU,CAAE,GAAI,EAAS,CAAA,CAC/G,CACF,EAAK,YAAc,OAEnB,IAAM,EAAa,EAAM,YACtB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,gCAAiC,EAAU,CAAE,GAAI,EAAS,CAAA,CAE1F,CACD,EAAW,YAAc,aAEzB,IAAM,EAAY,EAAM,YACrB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,4CAA6C,EAAU,CAAE,GAAI,EAAS,CAAA,CAEtG,CACD,EAAU,YAAc,YAExB,IAAM,EAAkB,EAAM,YAC3B,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,gCAAiC,EAAU,CAAE,GAAI,EAAS,CAAA,CAE1F,CACD,EAAgB,YAAc,kBAE9B,IAAM,EAAc,EAAM,YACvB,CAAE,YAAW,GAAG,GAAS,KAAQ,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,WAAY,EAAU,CAAE,GAAI,EAAS,CAAA,CACrG,CACD,EAAY,YAAc,cAE1B,IAAM,EAAa,EAAM,YACtB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,6BAA8B,EAAU,CAAE,GAAI,EAAS,CAAA,CAEvF,CACD,EAAW,YAAc"}
1
+ {"version":3,"file":"card.cjs","names":[],"sources":["../packages/ui-web/src/card.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\n\nimport type { CardBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement>, CardBaseProps {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('bg-card text-card-foreground rounded-xl border shadow', className)} {...props} />\n));\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('leading-none font-semibold tracking-tight', className)} {...props} />\n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />,\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n ),\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\n"],"mappings":"+PAQM,EAAO,EAAM,YAAuC,CAAE,YAAW,GAAG,GAAS,KACjF,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,wDAAyD,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC/G,EACD,EAAK,YAAc,OAEnB,IAAM,EAAa,EAAM,YACtB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,gCAAiC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAE1F,EACA,EAAW,YAAc,aAEzB,IAAM,EAAY,EAAM,YACrB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,4CAA6C,CAAS,EAAG,GAAI,CAAQ,CAAA,CAEtG,EACA,EAAU,YAAc,YAExB,IAAM,EAAkB,EAAM,YAC3B,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,gCAAiC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAE1F,EACA,EAAgB,YAAc,kBAE9B,IAAM,EAAc,EAAM,YACvB,CAAE,YAAW,GAAG,GAAS,KAAQ,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,WAAY,CAAS,EAAG,GAAI,CAAQ,CAAA,CACrG,EACA,EAAY,YAAc,cAE1B,IAAM,EAAa,EAAM,YACtB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,6BAA8B,CAAS,EAAG,GAAI,CAAQ,CAAA,CAEvF,EACA,EAAW,YAAc"}
package/dist/card.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  "use client";
3
- import { vr as e } from "./vendor-Cr0eKZrm.mjs";
4
- import { t } from "./utils-BtI8Nf6i.mjs";
3
+ import { vr as e } from "./vendor-ChPUVHXi.mjs";
4
+ import { t } from "./utils-BsD1_fYL.mjs";
5
5
  import * as n from "react";
6
6
  //#region packages/ui-web/src/card.tsx
7
7
  var r = e(), i = n.forwardRef(({ className: e, ...n }, i) => /* @__PURE__ */ (0, r.jsx)("div", {
package/dist/card.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"card.mjs","names":[],"sources":["../packages/ui-web/src/card.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\n\nimport type { CardBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement>, CardBaseProps {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('bg-card text-card-foreground rounded-xl border shadow', className)} {...props} />\n));\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('leading-none font-semibold tracking-tight', className)} {...props} />\n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />,\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n ),\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\n"],"mappings":";;;;;;aAQM,IAAO,EAAM,YAAuC,EAAE,cAAW,GAAG,KAAS,MACjF,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,yDAAyD,EAAU;CAAE,GAAI;CAAS,CAAA,CAC/G;AACF,EAAK,cAAc;AAEnB,IAAM,IAAa,EAAM,YACtB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,iCAAiC,EAAU;CAAE,GAAI;CAAS,CAAA,CAE1F;AACD,EAAW,cAAc;AAEzB,IAAM,IAAY,EAAM,YACrB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,6CAA6C,EAAU;CAAE,GAAI;CAAS,CAAA,CAEtG;AACD,EAAU,cAAc;AAExB,IAAM,IAAkB,EAAM,YAC3B,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,iCAAiC,EAAU;CAAE,GAAI;CAAS,CAAA,CAE1F;AACD,EAAgB,cAAc;AAE9B,IAAM,IAAc,EAAM,YACvB,EAAE,cAAW,GAAG,KAAS,MAAQ,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,YAAY,EAAU;CAAE,GAAI;CAAS,CAAA,CACrG;AACD,EAAY,cAAc;AAE1B,IAAM,IAAa,EAAM,YACtB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,8BAA8B,EAAU;CAAE,GAAI;CAAS,CAAA,CAEvF;AACD,EAAW,cAAc"}
1
+ {"version":3,"file":"card.mjs","names":[],"sources":["../packages/ui-web/src/card.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\n\nimport type { CardBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement>, CardBaseProps {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('bg-card text-card-foreground rounded-xl border shadow', className)} {...props} />\n));\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('leading-none font-semibold tracking-tight', className)} {...props} />\n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />,\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n ),\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\n"],"mappings":";;;;;;aAQM,IAAO,EAAM,YAAuC,EAAE,cAAW,GAAG,KAAS,MACjF,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,yDAAyD,CAAS;CAAG,GAAI;AAAQ,CAAA,CAC/G;AACD,EAAK,cAAc;AAEnB,IAAM,IAAa,EAAM,YACtB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,iCAAiC,CAAS;CAAG,GAAI;AAAQ,CAAA,CAE1F;AACA,EAAW,cAAc;AAEzB,IAAM,IAAY,EAAM,YACrB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,6CAA6C,CAAS;CAAG,GAAI;AAAQ,CAAA,CAEtG;AACA,EAAU,cAAc;AAExB,IAAM,IAAkB,EAAM,YAC3B,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,iCAAiC,CAAS;CAAG,GAAI;AAAQ,CAAA,CAE1F;AACA,EAAgB,cAAc;AAE9B,IAAM,IAAc,EAAM,YACvB,EAAE,cAAW,GAAG,KAAS,MAAQ,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,YAAY,CAAS;CAAG,GAAI;AAAQ,CAAA,CACrG;AACA,EAAY,cAAc;AAE1B,IAAM,IAAa,EAAM,YACtB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,OAAD;CAAU;CAAK,WAAW,EAAG,8BAA8B,CAAS;CAAG,GAAI;AAAQ,CAAA,CAEvF;AACA,EAAW,cAAc"}
package/dist/carousel.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./rolldown-runtime-CacfPODE.js`),t=require(`./vendor-D3ZzLf8D.js`),n=require(`./utils-CbSX47LV.js`),r=require(`./button.cjs`);let i=require(`react`);i=e.r(i);var a=t.vr(),o=i.createContext(null);function s(){let e=i.useContext(o);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}var c=i.forwardRef(({orientation:e=`horizontal`,opts:r,setApi:s,plugins:c,className:l,children:u,...d},f)=>{let[p,m]=t.bn({...r,axis:e===`horizontal`?`x`:`y`},c),[h,g]=i.useState(!1),[_,v]=i.useState(!1),y=i.useCallback(e=>{e&&(g(e.canScrollPrev()),v(e.canScrollNext()))},[]),b=i.useCallback(()=>{m?.scrollPrev()},[m]),x=i.useCallback(()=>{m?.scrollNext()},[m]),S=i.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),b()):e.key===`ArrowRight`&&(e.preventDefault(),x())},[b,x]);return i.useEffect(()=>{!m||!s||s(m)},[m,s]),i.useEffect(()=>{if(m)return y(m),m.on(`reInit`,y),m.on(`select`,y),()=>{m?.off(`select`,y)}},[m,y]),(0,a.jsx)(o.Provider,{value:{carouselRef:p,api:m,opts:r,orientation:e||(r?.axis===`y`?`vertical`:`horizontal`),scrollPrev:b,scrollNext:x,canScrollPrev:h,canScrollNext:_},children:(0,a.jsx)(`div`,{ref:f,onKeyDownCapture:S,className:n.t(`relative`,l),role:`region`,"aria-roledescription":`carousel`,...d,children:u})})});c.displayName=`Carousel`;var l=i.forwardRef(({className:e,...t},r)=>{let{carouselRef:i,orientation:o}=s();return(0,a.jsx)(`div`,{ref:i,className:`overflow-hidden`,children:(0,a.jsx)(`div`,{ref:r,className:n.t(`flex`,o===`horizontal`?`-ml-4`:`-mt-4 flex-col`,e),...t})})});l.displayName=`CarouselContent`;var u=i.forwardRef(({className:e,...t},r)=>{let{orientation:i}=s();return(0,a.jsx)(`div`,{ref:r,role:`group`,"aria-roledescription":`slide`,className:n.t(`min-w-0 shrink-0 grow-0 basis-full`,i===`horizontal`?`pl-4`:`pt-4`,e),...t})});u.displayName=`CarouselItem`;var d=i.forwardRef(({className:e,variant:i=`outline`,size:o=`icon`,...c},l)=>{let{orientation:u,scrollPrev:d,canScrollPrev:f}=s();return(0,a.jsxs)(r.Button,{ref:l,variant:i,size:o,className:n.t(`absolute h-8 w-8 rounded-full`,u===`horizontal`?`top-1/2 -left-12 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!f,onClick:d,...c,children:[(0,a.jsx)(t.lr,{className:`h-4 w-4`}),(0,a.jsx)(`span`,{className:`sr-only`,children:`Previous slide`})]})});d.displayName=`CarouselPrevious`;var f=i.forwardRef(({className:e,variant:i=`outline`,size:o=`icon`,...c},l)=>{let{orientation:u,scrollNext:d,canScrollNext:f}=s();return(0,a.jsxs)(r.Button,{ref:l,variant:i,size:o,className:n.t(`absolute h-8 w-8 rounded-full`,u===`horizontal`?`top-1/2 -right-12 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!f,onClick:d,...c,children:[(0,a.jsx)(t.cr,{className:`h-4 w-4`}),(0,a.jsx)(`span`,{className:`sr-only`,children:`Next slide`})]})});f.displayName=`CarouselNext`,exports.Carousel=c,exports.CarouselContent=l,exports.CarouselItem=u,exports.CarouselNext=f,exports.CarouselPrevious=d;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-3cr8xz0x.js"),n=require("./utils-DU-Y_pvO.js"),r=require("./button.cjs");let i=require("react");i=e.r(i);var a=t.vr(),o=i.createContext(null);function s(){let e=i.useContext(o);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}var c=i.forwardRef(({orientation:e=`horizontal`,opts:r,setApi:s,plugins:c,className:l,children:u,...d},f)=>{let[p,m]=t.bn({...r,axis:e===`horizontal`?`x`:`y`},c),[h,g]=i.useState(!1),[_,v]=i.useState(!1),y=i.useCallback(e=>{e&&(g(e.canScrollPrev()),v(e.canScrollNext()))},[]),b=i.useCallback(()=>{m?.scrollPrev()},[m]),x=i.useCallback(()=>{m?.scrollNext()},[m]),S=i.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),b()):e.key===`ArrowRight`&&(e.preventDefault(),x())},[b,x]);return i.useEffect(()=>{!m||!s||s(m)},[m,s]),i.useEffect(()=>{if(m)return y(m),m.on(`reInit`,y),m.on(`select`,y),()=>{m?.off(`select`,y)}},[m,y]),(0,a.jsx)(o.Provider,{value:{carouselRef:p,api:m,opts:r,orientation:e||(r?.axis===`y`?`vertical`:`horizontal`),scrollPrev:b,scrollNext:x,canScrollPrev:h,canScrollNext:_},children:(0,a.jsx)(`div`,{ref:f,onKeyDownCapture:S,className:n.t(`relative`,l),role:`region`,"aria-roledescription":`carousel`,...d,children:u})})});c.displayName=`Carousel`;var l=i.forwardRef(({className:e,...t},r)=>{let{carouselRef:i,orientation:o}=s();return(0,a.jsx)(`div`,{ref:i,className:`overflow-hidden`,children:(0,a.jsx)(`div`,{ref:r,className:n.t(`flex`,o===`horizontal`?`-ml-4`:`-mt-4 flex-col`,e),...t})})});l.displayName=`CarouselContent`;var u=i.forwardRef(({className:e,...t},r)=>{let{orientation:i}=s();return(0,a.jsx)(`div`,{ref:r,role:`group`,"aria-roledescription":`slide`,className:n.t(`min-w-0 shrink-0 grow-0 basis-full`,i===`horizontal`?`pl-4`:`pt-4`,e),...t})});u.displayName=`CarouselItem`;var d=i.forwardRef(({className:e,variant:i=`outline`,size:o=`icon`,...c},l)=>{let{orientation:u,scrollPrev:d,canScrollPrev:f}=s();return(0,a.jsxs)(r.Button,{ref:l,variant:i,size:o,className:n.t(`absolute h-8 w-8 rounded-full`,u===`horizontal`?`top-1/2 -left-12 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!f,onClick:d,...c,children:[(0,a.jsx)(t.lr,{className:`h-4 w-4`}),(0,a.jsx)(`span`,{className:`sr-only`,children:`Previous slide`})]})});d.displayName=`CarouselPrevious`;var f=i.forwardRef(({className:e,variant:i=`outline`,size:o=`icon`,...c},l)=>{let{orientation:u,scrollNext:d,canScrollNext:f}=s();return(0,a.jsxs)(r.Button,{ref:l,variant:i,size:o,className:n.t(`absolute h-8 w-8 rounded-full`,u===`horizontal`?`top-1/2 -right-12 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!f,onClick:d,...c,children:[(0,a.jsx)(t.cr,{className:`h-4 w-4`}),(0,a.jsx)(`span`,{className:`sr-only`,children:`Next slide`})]})});f.displayName=`CarouselNext`,exports.Carousel=c,exports.CarouselContent=l,exports.CarouselItem=u,exports.CarouselNext=f,exports.CarouselPrevious=d;
2
2
  //# sourceMappingURL=carousel.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.cjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["'use client';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ArrowLeft, ArrowRight } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CarouselBaseProps,\n CarouselContentBaseProps,\n CarouselItemBaseProps,\n CarouselNextBaseProps,\n CarouselPreviousBaseProps,\n} from '@gv-tech/ui-core';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = React.HTMLAttributes<HTMLDivElement> &\n CarouselBaseProps & {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\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\nconst Carousel = React.forwardRef<HTMLDivElement, CarouselProps>(\n ({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }, ref) => {\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\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\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\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 ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n },\n);\nCarousel.displayName = 'Carousel';\n\nconst CarouselContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CarouselContentBaseProps\n>(({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n );\n});\nCarouselContent.displayName = 'CarouselContent';\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselItemBaseProps>(\n ({ className, ...props }, ref) => {\n const { orientation } = useCarousel();\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n );\n },\n);\nCarouselItem.displayName = 'CarouselItem';\n\nconst CarouselPrevious = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button> & CarouselPreviousBaseProps\n>(({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -left-12 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n});\nCarouselPrevious.displayName = 'CarouselPrevious';\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button> & CarouselNextBaseProps>(\n ({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -right-12 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n },\n);\nCarouselNext.displayName = 'CarouselNext';\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselApi };\nexport type { CarouselProps };\n"],"mappings":"yRAoCM,EAAkB,EAAM,cAA2C,KAAK,CAE9E,SAAS,GAAc,CACrB,IAAM,EAAU,EAAM,WAAW,EAAgB,CAEjD,GAAI,CAAC,EACH,MAAU,MAAM,iDAAiD,CAGnE,OAAO,EAGT,IAAM,EAAW,EAAM,YACpB,CAAE,cAAc,aAAc,OAAM,SAAQ,UAAS,YAAW,WAAU,GAAG,G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,IAAgB,aACZ,qCACA,iDACJ,EACD,CACD,SAAU,CAAC,EACX,QAAS,EACT,GAAI,WAbN,EAeE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAY,UAAU,UAAY,CAAA,EAClC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,aAAiB,CAAA,CACpC,IAGd,CACD,EAAa,YAAc"}
1
+ {"version":3,"file":"carousel.cjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["'use client';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ArrowLeft, ArrowRight } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CarouselBaseProps,\n CarouselContentBaseProps,\n CarouselItemBaseProps,\n CarouselNextBaseProps,\n CarouselPreviousBaseProps,\n} from '@gv-tech/ui-core';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = React.HTMLAttributes<HTMLDivElement> &\n CarouselBaseProps & {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\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\nconst Carousel = React.forwardRef<HTMLDivElement, CarouselProps>(\n ({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }, ref) => {\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\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\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\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 ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n },\n);\nCarousel.displayName = 'Carousel';\n\nconst CarouselContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CarouselContentBaseProps\n>(({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n );\n});\nCarouselContent.displayName = 'CarouselContent';\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselItemBaseProps>(\n ({ className, ...props }, ref) => {\n const { orientation } = useCarousel();\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n );\n },\n);\nCarouselItem.displayName = 'CarouselItem';\n\nconst CarouselPrevious = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button> & CarouselPreviousBaseProps\n>(({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -left-12 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n});\nCarouselPrevious.displayName = 'CarouselPrevious';\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button> & CarouselNextBaseProps>(\n ({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -right-12 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n },\n);\nCarouselNext.displayName = 'CarouselNext';\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselApi };\nexport type { CarouselProps };\n"],"mappings":"yRAoCM,EAAkB,EAAM,cAA2C,IAAI,EAE7E,SAAS,GAAc,CACrB,IAAM,EAAU,EAAM,WAAW,CAAe,EAEhD,GAAI,CAAC,EACH,MAAU,MAAM,gDAAgD,EAGlE,OAAO,CACT,CAEA,IAAM,EAAW,EAAM,YACpB,CAAE,cAAc,aAAc,OAAM,SAAQ,UAAS,YAAW,WAAU,GAAG,GAAS,IAAQ,CAC7F,GAAM,CAAC,EAAa,GAAO,EAAA,GACzB,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,IAIL,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,EAEF,EAAgB,EAAM,YACzB,GAA+C,CAC1C,EAAM,MAAQ,aAChB,EAAM,eAAe,EACrB,EAAW,GACF,EAAM,MAAQ,eACvB,EAAM,eAAe,EACrB,EAAW,EAEf,EACA,CAAC,EAAY,CAAU,CACzB,EAwBA,OAtBA,EAAM,cAAgB,CAChB,CAAC,GAAO,CAAC,GAIb,EAAO,CAAG,CACZ,EAAG,CAAC,EAAK,CAAM,CAAC,EAEhB,EAAM,cAAgB,CACf,KAQL,OAJA,EAAS,CAAG,EACZ,EAAI,GAAG,SAAU,CAAQ,EACzB,EAAI,GAAG,SAAU,CAAQ,MAEZ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8CACJ,CACF,EACA,SAAU,CAAC,EACX,QAAS,EACT,GAAI,WAbN,EAeE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAW,UAAU,SAAW,CAAA,GAChC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,gBAAoB,CAAA,CACxC,GAEZ,CAAC,EACD,EAAiB,YAAc,mBAE/B,IAAM,EAAe,EAAM,YACxB,CAAE,YAAW,UAAU,UAAW,OAAO,OAAQ,GAAG,GAAS,IAAQ,CACpE,GAAM,CAAE,cAAa,aAAY,iBAAkB,EAAY,EAE/D,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CACO,MACI,UACH,OACN,UAAW,EAAA,EACT,gCACA,IAAgB,aACZ,qCACA,iDACJ,CACF,EACA,SAAU,CAAC,EACX,QAAS,EACT,GAAI,WAbN,EAeE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAY,UAAU,SAAW,CAAA,GACjC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,YAAgB,CAAA,CACpC,GAEZ,CACF,EACA,EAAa,YAAc"}
package/dist/carousel.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  "use client";
3
- import { bn as e, cr as t, lr as n, vr as r } from "./vendor-Cr0eKZrm.mjs";
4
- import { t as i } from "./utils-BtI8Nf6i.mjs";
3
+ import { bn as e, cr as t, lr as n, vr as r } from "./vendor-ChPUVHXi.mjs";
4
+ import { t as i } from "./utils-BsD1_fYL.mjs";
5
5
  import { Button as a } from "./button.mjs";
6
6
  import * as o from "react";
7
7
  //#region packages/ui-web/src/carousel.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.mjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["'use client';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ArrowLeft, ArrowRight } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CarouselBaseProps,\n CarouselContentBaseProps,\n CarouselItemBaseProps,\n CarouselNextBaseProps,\n CarouselPreviousBaseProps,\n} from '@gv-tech/ui-core';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = React.HTMLAttributes<HTMLDivElement> &\n CarouselBaseProps & {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\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\nconst Carousel = React.forwardRef<HTMLDivElement, CarouselProps>(\n ({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }, ref) => {\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\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\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\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 ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n },\n);\nCarousel.displayName = 'Carousel';\n\nconst CarouselContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CarouselContentBaseProps\n>(({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n );\n});\nCarouselContent.displayName = 'CarouselContent';\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselItemBaseProps>(\n ({ className, ...props }, ref) => {\n const { orientation } = useCarousel();\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n );\n },\n);\nCarouselItem.displayName = 'CarouselItem';\n\nconst CarouselPrevious = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button> & CarouselPreviousBaseProps\n>(({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -left-12 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n});\nCarouselPrevious.displayName = 'CarouselPrevious';\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button> & CarouselNextBaseProps>(\n ({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -right-12 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n },\n);\nCarouselNext.displayName = 'CarouselNext';\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselApi };\nexport type { CarouselProps };\n"],"mappings":";;;;;;;aAoCM,IAAkB,EAAM,cAA2C,KAAK;AAE9E,SAAS,IAAc;CACrB,IAAM,IAAU,EAAM,WAAW,EAAgB;AAEjD,KAAI,CAAC,EACH,OAAU,MAAM,iDAAiD;AAGnE,QAAO;;AAGT,IAAM,IAAW,EAAM,YACpB,EAAE,iBAAc,cAAc,SAAM,WAAQ,YAAS,cAAW,aAAU,GAAG,KAAS,MAAQ;CAC7F,IAAM,CAAC,GAAa,KAAO,EACzB;EACE,GAAG;EACH,MAAM,MAAgB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AS;EACT,GAAI;YAbN,CAeE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAY,WAAU,WAAY,CAAA,EAClC,iBAAA,GAAA,EAAA,KAAC,QAAD;GAAM,WAAU;aAAU;GAAiB,CAAA,CACpC;;EAGd;AACD,EAAa,cAAc"}
1
+ {"version":3,"file":"carousel.mjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["'use client';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ArrowLeft, ArrowRight } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CarouselBaseProps,\n CarouselContentBaseProps,\n CarouselItemBaseProps,\n CarouselNextBaseProps,\n CarouselPreviousBaseProps,\n} from '@gv-tech/ui-core';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = React.HTMLAttributes<HTMLDivElement> &\n CarouselBaseProps & {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\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\nconst Carousel = React.forwardRef<HTMLDivElement, CarouselProps>(\n ({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }, ref) => {\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\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\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\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 ref={ref}\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n },\n);\nCarousel.displayName = 'Carousel';\n\nconst CarouselContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & CarouselContentBaseProps\n>(({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={ref}\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n );\n});\nCarouselContent.displayName = 'CarouselContent';\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselItemBaseProps>(\n ({ className, ...props }, ref) => {\n const { orientation } = useCarousel();\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n );\n },\n);\nCarouselItem.displayName = 'CarouselItem';\n\nconst CarouselPrevious = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Button> & CarouselPreviousBaseProps\n>(({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -left-12 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n});\nCarouselPrevious.displayName = 'CarouselPrevious';\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button> & CarouselNextBaseProps>(\n ({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -right-12 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n },\n);\nCarouselNext.displayName = 'CarouselNext';\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselApi };\nexport type { CarouselProps };\n"],"mappings":";;;;;;;aAoCM,IAAkB,EAAM,cAA2C,IAAI;AAE7E,SAAS,IAAc;CACrB,IAAM,IAAU,EAAM,WAAW,CAAe;CAEhD,IAAI,CAAC,GACH,MAAU,MAAM,gDAAgD;CAGlE,OAAO;AACT;AAEA,IAAM,IAAW,EAAM,YACpB,EAAE,iBAAc,cAAc,SAAM,WAAQ,YAAS,cAAW,aAAU,GAAG,KAAS,MAAQ;CAC7F,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,MAIL,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;CAwBA,OAtBA,EAAM,gBAAgB;EAChB,CAAC,KAAO,CAAC,KAIb,EAAO,CAAG;CACZ,GAAG,CAAC,GAAK,CAAM,CAAC,GAEhB,EAAM,gBAAgB;EACf,OAQL,OAJA,EAAS,CAAG,GACZ,EAAI,GAAG,UAAU,CAAQ,GACzB,EAAI,GAAG,UAAU,CAAQ,SAEZ;GACX,GAAK,IAAI,UAAU,CAAQ;EAC7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CAAC;EACX,SAAS;EACT,GAAI;YAbN,CAeE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAW,WAAU,UAAW,CAAA,GAChC,iBAAA,GAAA,EAAA,KAAC,QAAD;GAAM,WAAU;aAAU;EAAoB,CAAA,CACxC;;AAEZ,CAAC;AACD,EAAiB,cAAc;AAE/B,IAAM,IAAe,EAAM,YACxB,EAAE,cAAW,aAAU,WAAW,UAAO,QAAQ,GAAG,KAAS,MAAQ;CACpE,IAAM,EAAE,gBAAa,eAAY,qBAAkB,EAAY;CAE/D,OACE,iBAAA,GAAA,EAAA,MAAC,GAAD;EACO;EACI;EACH;EACN,WAAW,EACT,iCACA,MAAgB,eACZ,uCACA,kDACJ,CACF;EACA,UAAU,CAAC;EACX,SAAS;EACT,GAAI;YAbN,CAeE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAY,WAAU,UAAW,CAAA,GACjC,iBAAA,GAAA,EAAA,KAAC,QAAD;GAAM,WAAU;aAAU;EAAgB,CAAA,CACpC;;AAEZ,CACF;AACA,EAAa,cAAc"}
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-CacfPODE.js`),t=require(`./vendor-D3ZzLf8D.js`),n=require(`./utils-CbSX47LV.js`);let r=require(`react`);r=e.r(r);var i=t.vr(),a={light:``,dark:`.dark`},o=r.createContext(null);function s(){let e=r.useContext(o);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}var c=r.forwardRef(({id:e,className:a,children:s,config:c,...u},d)=>{let f=r.useId(),p=`chart-${e||f.replace(/:/g,``)}`;return(0,i.jsx)(o.Provider,{value:{config:c},children:(0,i.jsxs)(`div`,{"data-chart":p,ref:d,className:n.t(`[&_.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-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none`,a),...u,children:[(0,i.jsx)(l,{id:p,config:c}),(0,i.jsx)(t.yn,{children:s})]})})});c.displayName=`Chart`;var l=({id:e,config:t})=>{let n=Object.entries(t).filter(([,e])=>e.theme||e.color);return n.length?(0,i.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(a).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-3cr8xz0x.js"),n=require("./utils-DU-Y_pvO.js");let r=require("react");r=e.r(r);var i=t.vr(),a={light:``,dark:`.dark`},o=r.createContext(null);function s(){let e=r.useContext(o);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}var c=r.forwardRef(({id:e,className:a,children:s,config:c,...u},d)=>{let f=r.useId(),p=`chart-${e||f.replace(/:/g,``)}`;return(0,i.jsx)(o.Provider,{value:{config:c},children:(0,i.jsxs)(`div`,{"data-chart":p,ref:d,className:n.t(`[&_.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-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none`,a),...u,children:[(0,i.jsx)(l,{id:p,config:c}),(0,i.jsx)(t.yn,{children:s})]})})});c.displayName=`Chart`;var l=({id:e,config:t})=>{let n=Object.entries(t).filter(([,e])=>e.theme||e.color);return n.length?(0,i.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(a).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
  `)}
@@ -1 +1 @@
1
- {"version":3,"file":"chart.cjs","names":[],"sources":["../packages/ui-web/src/chart.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport * as RechartsPrimitive from 'recharts';\n\nimport {\n ChartConfig,\n ChartContainerBaseProps,\n ChartLegendContentBaseProps,\n ChartTooltipContentBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const;\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\nconst ChartContainer = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n ChartContainerBaseProps & {\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n }\n>(({ id, className, children, config, ...props }, ref) => {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-chart={chartId}\n ref={ref}\n className={cn(\n \"[&_.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-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n});\nChartContainer.displayName = 'Chart';\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, itemConfig]) => itemConfig.theme || itemConfig.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof THEMES] || itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join('\\n')}\n}\n`,\n )\n .join('\\n'),\n }}\n />\n );\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nconst ChartTooltipContent = React.forwardRef<\n HTMLDivElement,\n Partial<RechartsPrimitive.TooltipContentProps> & React.ComponentProps<'div'> & ChartTooltipContentBaseProps\n>(\n (\n {\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n },\n ref,\n ) => {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string'\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>;\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item: RechartsPrimitive.TooltipPayloadEntry) => item.type !== 'none')\n .map((item: RechartsPrimitive.TooltipPayloadEntry, index: number) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || ((item.payload as Record<string, unknown>).fill as string) || item.color;\n\n return (\n <div\n key={typeof item.dataKey === 'function' ? index : (item.dataKey ?? index)}\n className={cn(\n '[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn('shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]', {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n })}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label || item.name}</span>\n </div>\n {item.value && (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n },\n);\nChartTooltipContent.displayName = 'ChartTooltip';\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nconst ChartLegendContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n Pick<RechartsPrimitive.DefaultLegendContentProps, 'payload' | 'verticalAlign'> &\n ChartLegendContentBaseProps\n>(({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey }, ref) => {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)}\n >\n {payload\n .filter((item: RechartsPrimitive.LegendPayload) => item.type !== 'none')\n .map((item: RechartsPrimitive.LegendPayload) => {\n const key = `${nameKey || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={item.value}\n className={cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3')}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n});\nChartLegendContent.displayName = 'ChartLegend';\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== 'object' || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n 'payload' in payload &&\n typeof (payload as { payload: unknown }).payload === 'object' &&\n (payload as { payload: unknown }).payload !== null\n ? ((payload as { payload: unknown }).payload as Record<string, unknown>)\n : undefined;\n\n let configLabelKey: string = key;\n\n if (key in payload && typeof (payload as Record<string, unknown>)[key] === 'string') {\n configLabelKey = (payload as Record<string, unknown>)[key] as string;\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === 'string') {\n configLabelKey = payloadPayload[key] as string;\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\n}\n\nexport { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };\nexport type { ChartConfig };\n"],"mappings":"+PAaM,EAAS,CAAE,MAAO,GAAI,KAAM,QAAS,CAMrC,EAAe,EAAM,cAAwC,KAAK,CAExE,SAAS,GAAW,CAClB,IAAM,EAAU,EAAM,WAAW,EAAa,CAE9C,GAAI,CAAC,EACH,MAAU,MAAM,oDAAoD,CAGtE,OAAO,EAGT,IAAM,EAAiB,EAAM,YAM1B,CAAE,KAAI,YAAW,WAAU,SAAQ,GAAG,GAAS,IAAQ,CACxD,IAAM,EAAW,EAAM,OAAO,CACxB,EAAU,SAAS,GAAM,EAAS,QAAQ,KAAM,GAAG,GAEzD,OACE,EAAA,EAAA,KAAC,EAAa,SAAd,CAAuB,MAAO,CAAE,SAAQ,WACtC,EAAA,EAAA,MAAC,MAAD,CACE,aAAY,EACP,MACL,UAAW,EAAA,EACT,wpBACA,EACD,CACD,GAAI,WAPN,EASE,EAAA,EAAA,KAAC,EAAD,CAAY,GAAI,EAAiB,SAAU,CAAA,EAC3C,EAAA,EAAA,KAAA,EAAA,GAAA,CAAwC,WAAiD,CAAA,CACrF,GACgB,CAAA,EAE1B,CACF,EAAe,YAAc,QAE7B,IAAM,GAAc,CAAE,KAAI,YAAkD,CAC1E,IAAM,EAAc,OAAO,QAAQ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AAW,EAgD/D,EAER,CACA,CAAA,CACF,IAGX,CACD,EAAoB,YAAc,eAElC,IAAM,EAAA,EAAA,GAEA,EAAqB,EAAM,YAK9B,CAAE,YAAW,WAAW,GAAO,UAAS,gBAAgB,SAAU,WAAW,IAAQ,CACtF,GAAM,CAAE,UAAW,GAAU,CAM7B,OAJK,GAAS,QAKZ,EAAA,EAAA,KAAC,MAAD,CACO,MACL,UAAW,EAAA,EAAG,yCAA0C,IAAkB,MAAQ,OAAS,OAAQ,EAAU,UAE5G,EACE,OAAQ,GAA0C,EAAK,OAAS,OAAO,CACvE,IAAK,GAA0C,CAE9C,IAAM,EAAa,EAA4B,EAAQ,EAD3C,GAAG,GAAW,EAAK,SAAW,UACuB,CAEjE,OACE,EAAA,EAAA,MAAC,MAAD,CAEE,UAAW,EAAA,EAAG,kFAAkF,UAFlG,CAIG,GAAY,MAAQ,CAAC,GACpB,EAAA,EAAA,KAAC,EAAW,KAAZ,EAAmB,CAAA,EAEnB,EAAA,EAAA,KAAC,MAAD,CACE,UAAU,iCACV,MAAO,CACL,gBAAiB,EAAK,MACvB,CACD,CAAA,CAEH,GAAY,MACT,EAdC,EAAK,MAcN,EAER,CACA,CAAA,CAjCC,MAmCT,CACF,EAAmB,YAAc,cAGjC,SAAS,EAA4B,EAAqB,EAAkB,EAAa,CACvF,GAAI,OAAO,GAAY,WAAY,EACjC,OAGF,IAAM,EACJ,YAAa,GACb,OAAQ,EAAiC,SAAY,UACpD,EAAiC,UAAY,KACxC,EAAiC,QACnC,IAAA,GAEF,EAAyB,EAQ7B,OANI,KAAO,GAAW,OAAQ,EAAoC,IAAS,SACzE,EAAkB,EAAoC,GAC7C,GAAkB,KAAO,GAAkB,OAAO,EAAe,IAAS,WACnF,EAAiB,EAAe,IAG3B,KAAkB,EAAS,EAAO,GAAkB,EAAO"}
1
+ {"version":3,"file":"chart.cjs","names":[],"sources":["../packages/ui-web/src/chart.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport * as RechartsPrimitive from 'recharts';\n\nimport {\n ChartConfig,\n ChartContainerBaseProps,\n ChartLegendContentBaseProps,\n ChartTooltipContentBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const;\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\nconst ChartContainer = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n ChartContainerBaseProps & {\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n }\n>(({ id, className, children, config, ...props }, ref) => {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-chart={chartId}\n ref={ref}\n className={cn(\n \"[&_.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-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n});\nChartContainer.displayName = 'Chart';\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, itemConfig]) => itemConfig.theme || itemConfig.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof THEMES] || itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join('\\n')}\n}\n`,\n )\n .join('\\n'),\n }}\n />\n );\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nconst ChartTooltipContent = React.forwardRef<\n HTMLDivElement,\n Partial<RechartsPrimitive.TooltipContentProps> & React.ComponentProps<'div'> & ChartTooltipContentBaseProps\n>(\n (\n {\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n },\n ref,\n ) => {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string'\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>;\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item: RechartsPrimitive.TooltipPayloadEntry) => item.type !== 'none')\n .map((item: RechartsPrimitive.TooltipPayloadEntry, index: number) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || ((item.payload as Record<string, unknown>).fill as string) || item.color;\n\n return (\n <div\n key={typeof item.dataKey === 'function' ? index : (item.dataKey ?? index)}\n className={cn(\n '[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn('shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]', {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n })}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label || item.name}</span>\n </div>\n {item.value && (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n },\n);\nChartTooltipContent.displayName = 'ChartTooltip';\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nconst ChartLegendContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n Pick<RechartsPrimitive.DefaultLegendContentProps, 'payload' | 'verticalAlign'> &\n ChartLegendContentBaseProps\n>(({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey }, ref) => {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)}\n >\n {payload\n .filter((item: RechartsPrimitive.LegendPayload) => item.type !== 'none')\n .map((item: RechartsPrimitive.LegendPayload) => {\n const key = `${nameKey || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={item.value}\n className={cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3')}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n});\nChartLegendContent.displayName = 'ChartLegend';\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== 'object' || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n 'payload' in payload &&\n typeof (payload as { payload: unknown }).payload === 'object' &&\n (payload as { payload: unknown }).payload !== null\n ? ((payload as { payload: unknown }).payload as Record<string, unknown>)\n : undefined;\n\n let configLabelKey: string = key;\n\n if (key in payload && typeof (payload as Record<string, unknown>)[key] === 'string') {\n configLabelKey = (payload as Record<string, unknown>)[key] as string;\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === 'string') {\n configLabelKey = payloadPayload[key] as string;\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\n}\n\nexport { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };\nexport type { ChartConfig };\n"],"mappings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EAEhE,OACE,EAAA,EAAA,MAAC,MAAD,CAEE,UAAW,EAAA,EAAG,iFAAiF,WAFjG,CAIG,GAAY,MAAQ,CAAC,GACpB,EAAA,EAAA,KAAC,EAAW,KAAZ,CAAkB,CAAA,GAElB,EAAA,EAAA,KAAC,MAAD,CACE,UAAU,iCACV,MAAO,CACL,gBAAiB,EAAK,KACxB,CACD,CAAA,EAEF,GAAY,KACV,GAdE,EAAK,KAcP,CAET,CAAC,CACA,CAAA,EAjCE,IAmCX,CAAC,EACD,EAAmB,YAAc,cAGjC,SAAS,EAA4B,EAAqB,EAAkB,EAAa,CACvF,GAAI,OAAO,GAAY,WAAY,EACjC,OAGF,IAAM,EACJ,YAAa,GACb,OAAQ,EAAiC,SAAY,UACpD,EAAiC,UAAY,KACxC,EAAiC,QACnC,IAAA,GAEF,EAAyB,EAQ7B,OANI,KAAO,GAAW,OAAQ,EAAoC,IAAS,SACzE,EAAkB,EAAoC,GAC7C,GAAkB,KAAO,GAAkB,OAAO,EAAe,IAAS,WACnF,EAAiB,EAAe,IAG3B,KAAkB,EAAS,EAAO,GAAkB,EAAO,EACpE"}
package/dist/chart.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  "use client";
3
- import { _n as e, vn as t, vr as n, yn as r } from "./vendor-Cr0eKZrm.mjs";
4
- import { t as i } from "./utils-BtI8Nf6i.mjs";
3
+ import { _n as e, vn as t, vr as n, yn as r } from "./vendor-ChPUVHXi.mjs";
4
+ import { t as i } from "./utils-BsD1_fYL.mjs";
5
5
  import * as a from "react";
6
6
  //#region packages/ui-web/src/chart.tsx
7
7
  var o = n(), s = {
@@ -1 +1 @@
1
- {"version":3,"file":"chart.mjs","names":[],"sources":["../packages/ui-web/src/chart.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport * as RechartsPrimitive from 'recharts';\n\nimport {\n ChartConfig,\n ChartContainerBaseProps,\n ChartLegendContentBaseProps,\n ChartTooltipContentBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const;\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\nconst ChartContainer = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n ChartContainerBaseProps & {\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n }\n>(({ id, className, children, config, ...props }, ref) => {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-chart={chartId}\n ref={ref}\n className={cn(\n \"[&_.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-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n});\nChartContainer.displayName = 'Chart';\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, itemConfig]) => itemConfig.theme || itemConfig.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof THEMES] || itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join('\\n')}\n}\n`,\n )\n .join('\\n'),\n }}\n />\n );\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nconst ChartTooltipContent = React.forwardRef<\n HTMLDivElement,\n Partial<RechartsPrimitive.TooltipContentProps> & React.ComponentProps<'div'> & ChartTooltipContentBaseProps\n>(\n (\n {\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n },\n ref,\n ) => {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string'\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>;\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item: RechartsPrimitive.TooltipPayloadEntry) => item.type !== 'none')\n .map((item: RechartsPrimitive.TooltipPayloadEntry, index: number) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || ((item.payload as Record<string, unknown>).fill as string) || item.color;\n\n return (\n <div\n key={typeof item.dataKey === 'function' ? index : (item.dataKey ?? index)}\n className={cn(\n '[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn('shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]', {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n })}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label || item.name}</span>\n </div>\n {item.value && (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n },\n);\nChartTooltipContent.displayName = 'ChartTooltip';\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nconst ChartLegendContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n Pick<RechartsPrimitive.DefaultLegendContentProps, 'payload' | 'verticalAlign'> &\n ChartLegendContentBaseProps\n>(({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey }, ref) => {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)}\n >\n {payload\n .filter((item: RechartsPrimitive.LegendPayload) => item.type !== 'none')\n .map((item: RechartsPrimitive.LegendPayload) => {\n const key = `${nameKey || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={item.value}\n className={cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3')}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n});\nChartLegendContent.displayName = 'ChartLegend';\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== 'object' || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n 'payload' in payload &&\n typeof (payload as { payload: unknown }).payload === 'object' &&\n (payload as { payload: unknown }).payload !== null\n ? ((payload as { payload: unknown }).payload as Record<string, unknown>)\n : undefined;\n\n let configLabelKey: string = key;\n\n if (key in payload && typeof (payload as Record<string, unknown>)[key] === 'string') {\n configLabelKey = (payload as Record<string, unknown>)[key] as string;\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === 'string') {\n configLabelKey = payloadPayload[key] as string;\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\n}\n\nexport { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };\nexport type { ChartConfig };\n"],"mappings":";;;;;;aAaM,IAAS;CAAE,OAAO;CAAI,MAAM;CAAS,EAMrC,IAAe,EAAM,cAAwC,KAAK;AAExE,SAAS,IAAW;CAClB,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;cAFlG,CAIG,GAAY,QAAQ,CAAC,IACpB,iBAAA,GAAA,EAAA,KAAC,EAAW,MAAZ,EAAmB,CAAA,GAEnB,iBAAA,GAAA,EAAA,KAAC,OAAD;KACE,WAAU;KACV,OAAO,EACL,iBAAiB,EAAK,OACvB;KACD,CAAA,EAEH,GAAY,MACT;MAdC,EAAK,MAcN;IAER;EACA,CAAA,GAjCC;EAmCT;AACF,EAAmB,cAAc;AAGjC,SAAS,EAA4B,GAAqB,GAAkB,GAAa;AACvF,KAAI,OAAO,KAAY,aAAY,EACjC;CAGF,IAAM,IACJ,aAAa,KACb,OAAQ,EAAiC,WAAY,YACpD,EAAiC,YAAY,OACxC,EAAiC,UACnC,KAAA,GAEF,IAAyB;AAQ7B,QANI,KAAO,KAAW,OAAQ,EAAoC,MAAS,WACzE,IAAkB,EAAoC,KAC7C,KAAkB,KAAO,KAAkB,OAAO,EAAe,MAAS,aACnF,IAAiB,EAAe,KAG3B,KAAkB,IAAS,EAAO,KAAkB,EAAO"}
1
+ {"version":3,"file":"chart.mjs","names":[],"sources":["../packages/ui-web/src/chart.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport * as RechartsPrimitive from 'recharts';\n\nimport {\n ChartConfig,\n ChartContainerBaseProps,\n ChartLegendContentBaseProps,\n ChartTooltipContentBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const;\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\nconst ChartContainer = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n ChartContainerBaseProps & {\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n }\n>(({ id, className, children, config, ...props }, ref) => {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-chart={chartId}\n ref={ref}\n className={cn(\n \"[&_.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-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n});\nChartContainer.displayName = 'Chart';\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, itemConfig]) => itemConfig.theme || itemConfig.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof THEMES] || itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .join('\\n')}\n}\n`,\n )\n .join('\\n'),\n }}\n />\n );\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nconst ChartTooltipContent = React.forwardRef<\n HTMLDivElement,\n Partial<RechartsPrimitive.TooltipContentProps> & React.ComponentProps<'div'> & ChartTooltipContentBaseProps\n>(\n (\n {\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n },\n ref,\n ) => {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string'\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>;\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item: RechartsPrimitive.TooltipPayloadEntry) => item.type !== 'none')\n .map((item: RechartsPrimitive.TooltipPayloadEntry, index: number) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || ((item.payload as Record<string, unknown>).fill as string) || item.color;\n\n return (\n <div\n key={typeof item.dataKey === 'function' ? index : (item.dataKey ?? index)}\n className={cn(\n '[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn('shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]', {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n })}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label || item.name}</span>\n </div>\n {item.value && (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n },\n);\nChartTooltipContent.displayName = 'ChartTooltip';\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nconst ChartLegendContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<'div'> &\n Pick<RechartsPrimitive.DefaultLegendContentProps, 'payload' | 'verticalAlign'> &\n ChartLegendContentBaseProps\n>(({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey }, ref) => {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)}\n >\n {payload\n .filter((item: RechartsPrimitive.LegendPayload) => item.type !== 'none')\n .map((item: RechartsPrimitive.LegendPayload) => {\n const key = `${nameKey || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={item.value}\n className={cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3')}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n});\nChartLegendContent.displayName = 'ChartLegend';\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== 'object' || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n 'payload' in payload &&\n typeof (payload as { payload: unknown }).payload === 'object' &&\n (payload as { payload: unknown }).payload !== null\n ? ((payload as { payload: unknown }).payload as Record<string, unknown>)\n : undefined;\n\n let configLabelKey: string = key;\n\n if (key in payload && typeof (payload as Record<string, unknown>)[key] === 'string') {\n configLabelKey = (payload as Record<string, unknown>)[key] as string;\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === 'string') {\n configLabelKey = payloadPayload[key] as string;\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\n}\n\nexport { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };\nexport type { ChartConfig };\n"],"mappings":";;;;;;aAaM,IAAS;CAAE,OAAO;CAAI,MAAM;AAAQ,GAMpC,IAAe,EAAM,cAAwC,IAAI;AAEvE,SAAS,IAAW;CAClB,IAAM,IAAU,EAAM,WAAW,CAAY;CAE7C,IAAI,CAAC,GACH,MAAU,MAAM,mDAAmD;CAGrE,OAAO;AACT;AAEA,IAAM,IAAiB,EAAM,YAM1B,EAAE,OAAI,cAAW,aAAU,WAAQ,GAAG,KAAS,MAAQ;CACxD,IAAM,IAAW,EAAM,MAAM,GACvB,IAAU,SAAS,KAAM,EAAS,QAAQ,MAAM,EAAE;CAExD,OACE,iBAAA,GAAA,EAAA,KAAC,EAAa,UAAd;EAAuB,OAAO,EAAE,UAAO;YACrC,iBAAA,GAAA,EAAA,MAAC,OAAD;GACE,cAAY;GACP;GACL,WAAW,EACT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IAAM,IACJ,aAAa,KACb,OAAQ,EAAiC,WAAY,YACpD,EAAiC,YAAY,OACxC,EAAiC,UACnC,KAAA,GAEF,IAAyB;CAQ7B,OANI,KAAO,KAAW,OAAQ,EAAoC,MAAS,WACzE,IAAkB,EAAoC,KAC7C,KAAkB,KAAO,KAAkB,OAAO,EAAe,MAAS,aACnF,IAAiB,EAAe,KAG3B,KAAkB,IAAS,EAAO,KAAkB,EAAO;AACpE"}
package/dist/checkbox.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./rolldown-runtime-CacfPODE.js`),t=require(`./vendor-D3ZzLf8D.js`),n=require(`./utils-CbSX47LV.js`);let r=require(`react`);r=e.r(r);var i=t.vr(),a=r.forwardRef(({className:e,...r},a)=>(0,i.jsx)(t.hn,{ref:a,className:n.t(`peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,e),...r,children:(0,i.jsx)(t.gn,{className:n.t(`grid place-content-center text-current`),children:(0,i.jsx)(t.or,{className:`h-4 w-4`})})}));a.displayName=t.hn?.displayName||`Checkbox`,exports.Checkbox=a;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-3cr8xz0x.js"),n=require("./utils-DU-Y_pvO.js");let r=require("react");r=e.r(r);var i=t.vr(),a=r.forwardRef(({className:e,...r},a)=>(0,i.jsx)(t.hn,{ref:a,className:n.t(`peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,e),...r,children:(0,i.jsx)(t.gn,{className:n.t(`grid place-content-center text-current`),children:(0,i.jsx)(t.or,{className:`h-4 w-4`})})}));a.displayName=t.hn?.displayName||`Checkbox`,exports.Checkbox=a;
2
2
  //# sourceMappingURL=checkbox.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.cjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["'use client';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, keyof CheckboxBaseProps>,\n CheckboxBaseProps {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('grid place-content-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = CheckboxPrimitive.Root?.displayName || 'Checkbox';\n\nexport { Checkbox };\n"],"mappings":"+PAaM,EAAW,EAAM,YACpB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,+RACA,EACD,CACD,GAAI,YAEJ,EAAA,EAAA,KAAA,EAAA,GAAA,CAA6B,UAAW,EAAA,EAAG,yCAAyC,WAClF,EAAA,EAAA,KAAC,EAAA,GAAD,CAAO,UAAU,UAAY,CAAA,CACD,CAAA,CACP,CAAA,CAE5B,CACD,EAAS,YAAA,EAAA,IAAsC,aAAe"}
1
+ {"version":3,"file":"checkbox.cjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["'use client';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, keyof CheckboxBaseProps>,\n CheckboxBaseProps {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('grid place-content-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = CheckboxPrimitive.Root?.displayName || 'Checkbox';\n\nexport { Checkbox };\n"],"mappings":"+PAaM,EAAW,EAAM,YACpB,CAAE,YAAW,GAAG,GAAS,KACxB,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,+RACA,CACF,EACA,GAAI,YAEJ,EAAA,EAAA,KAAA,EAAA,GAAA,CAA6B,UAAW,EAAA,EAAG,wCAAwC,YACjF,EAAA,EAAA,KAAC,EAAA,GAAD,CAAO,UAAU,SAAW,CAAA,CACD,CAAA,CACP,CAAA,CAE5B,EACA,EAAS,YAAA,EAAA,IAAsC,aAAe"}
package/dist/checkbox.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  "use client";
3
- import { gn as e, hn as t, or as n, vr as r } from "./vendor-Cr0eKZrm.mjs";
4
- import { t as i } from "./utils-BtI8Nf6i.mjs";
3
+ import { gn as e, hn as t, or as n, vr as r } from "./vendor-ChPUVHXi.mjs";
4
+ import { t as i } from "./utils-BsD1_fYL.mjs";
5
5
  import * as a from "react";
6
6
  //#region packages/ui-web/src/checkbox.tsx
7
7
  var o = r(), s = a.forwardRef(({ className: r, ...a }, s) => /* @__PURE__ */ (0, o.jsx)(t, {
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.mjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["'use client';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, keyof CheckboxBaseProps>,\n CheckboxBaseProps {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('grid place-content-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = CheckboxPrimitive.Root?.displayName || 'Checkbox';\n\nexport { Checkbox };\n"],"mappings":";;;;;;aAaM,IAAW,EAAM,YACpB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,gSACA,EACD;CACD,GAAI;WAEJ,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA6B,WAAW,EAAG,yCAAyC;YAClF,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAO,WAAU,WAAY,CAAA;EACD,CAAA;CACP,CAAA,CAE5B;AACD,EAAS,cAAA,GAAsC,eAAe"}
1
+ {"version":3,"file":"checkbox.mjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["'use client';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface CheckboxProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, keyof CheckboxBaseProps>,\n CheckboxBaseProps {}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={cn('grid place-content-center text-current')}>\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n ),\n);\nCheckbox.displayName = CheckboxPrimitive.Root?.displayName || 'Checkbox';\n\nexport { Checkbox };\n"],"mappings":";;;;;;aAaM,IAAW,EAAM,YACpB,EAAE,cAAW,GAAG,KAAS,MACxB,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,gSACA,CACF;CACA,GAAI;WAEJ,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA6B,WAAW,EAAG,wCAAwC;YACjF,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAO,WAAU,UAAW,CAAA;CACD,CAAA;AACP,CAAA,CAE5B;AACA,EAAS,cAAA,GAAsC,eAAe"}
@@ -1,2 +1,2 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./vendor-D3ZzLf8D.js`);var t=e._r,n=e.gr,r=e.hr;exports.Collapsible=t,exports.CollapsibleContent=r,exports.CollapsibleTrigger=n;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./vendor-3cr8xz0x.js");var t=e._r,n=e.gr,r=e.hr;exports.Collapsible=t,exports.CollapsibleContent=r,exports.CollapsibleTrigger=n;
2
2
  //# sourceMappingURL=collapsible.cjs.map
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  "use client";
3
- import { _r as e, gr as t, hr as n } from "./vendor-Cr0eKZrm.mjs";
3
+ import { _r as e, gr as t, hr as n } from "./vendor-ChPUVHXi.mjs";
4
4
  //#region packages/ui-web/src/collapsible.tsx
5
5
  var r = e, i = t, a = n;
6
6
  //#endregion
package/dist/command.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./rolldown-runtime-CacfPODE.js`),t=require(`./vendor-D3ZzLf8D.js`),n=require(`./utils-CbSX47LV.js`),r=require(`./dialog.cjs`);let i=require(`react`);i=e.r(i);var a=t.vr(),o=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn,{ref:i,className:n.t(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...r}));o.displayName=t.mn?.displayName||`Command`;var s=({children:e,...t})=>(0,a.jsx)(r.Dialog,{...t,children:(0,a.jsxs)(r.DialogContent,{className:`overflow-hidden p-0`,children:[(0,a.jsx)(r.DialogTitle,{className:`sr-only`,children:`Search`}),(0,a.jsx)(r.DialogDescription,{className:`sr-only`,children:`Search for documentation and components.`}),(0,a.jsx)(o,{className:`[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:e})]})}),c=i.forwardRef(({className:e,...r},i)=>(0,a.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,a.jsx)(t.Yn,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,a.jsx)(t.mn.Input,{ref:i,className:n.t(`placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50`,e),...r})]}));c.displayName=t.mn.Input?.displayName||`CommandInput`;var l=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.List,{ref:i,className:n.t(`max-h-[300px] overflow-x-hidden overflow-y-auto`,e),...r}));l.displayName=t.mn.List?.displayName||`CommandList`;var u=i.forwardRef((e,n)=>(0,a.jsx)(t.mn.Empty,{ref:n,className:`py-6 text-center text-sm`,...e}));u.displayName=t.mn.Empty?.displayName||`CommandEmpty`;var d=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.Group,{ref:i,className:n.t(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,e),...r}));d.displayName=t.mn.Group?.displayName||`CommandGroup`;var f=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.Separator,{ref:i,className:n.t(`bg-border -mx-1 h-px`,e),...r}));f.displayName=t.mn.Separator?.displayName||`CommandSeparator`;var p=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.Item,{ref:i,className:n.t(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,e),...r}));p.displayName=t.mn.Item?.displayName||`CommandItem`;var m=({className:e,...t})=>(0,a.jsx)(`span`,{className:n.t(`text-muted-foreground ml-auto text-xs tracking-widest`,e),...t});m.displayName=`CommandShortcut`,exports.Command=o,exports.CommandDialog=s,exports.CommandEmpty=u,exports.CommandGroup=d,exports.CommandInput=c,exports.CommandItem=p,exports.CommandList=l,exports.CommandSeparator=f,exports.CommandShortcut=m;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-3cr8xz0x.js"),n=require("./utils-DU-Y_pvO.js"),r=require("./dialog.cjs");let i=require("react");i=e.r(i);var a=t.vr(),o=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn,{ref:i,className:n.t(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...r}));o.displayName=t.mn?.displayName||`Command`;var s=({children:e,...t})=>(0,a.jsx)(r.Dialog,{...t,children:(0,a.jsxs)(r.DialogContent,{className:`overflow-hidden p-0`,children:[(0,a.jsx)(r.DialogTitle,{className:`sr-only`,children:`Search`}),(0,a.jsx)(r.DialogDescription,{className:`sr-only`,children:`Search for documentation and components.`}),(0,a.jsx)(o,{className:`[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:e})]})}),c=i.forwardRef(({className:e,...r},i)=>(0,a.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,a.jsx)(t.Yn,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,a.jsx)(t.mn.Input,{ref:i,className:n.t(`placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50`,e),...r})]}));c.displayName=t.mn.Input?.displayName||`CommandInput`;var l=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.List,{ref:i,className:n.t(`max-h-[300px] overflow-x-hidden overflow-y-auto`,e),...r}));l.displayName=t.mn.List?.displayName||`CommandList`;var u=i.forwardRef((e,n)=>(0,a.jsx)(t.mn.Empty,{ref:n,className:`py-6 text-center text-sm`,...e}));u.displayName=t.mn.Empty?.displayName||`CommandEmpty`;var d=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.Group,{ref:i,className:n.t(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,e),...r}));d.displayName=t.mn.Group?.displayName||`CommandGroup`;var f=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.Separator,{ref:i,className:n.t(`bg-border -mx-1 h-px`,e),...r}));f.displayName=t.mn.Separator?.displayName||`CommandSeparator`;var p=i.forwardRef(({className:e,...r},i)=>(0,a.jsx)(t.mn.Item,{ref:i,className:n.t(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,e),...r}));p.displayName=t.mn.Item?.displayName||`CommandItem`;var m=({className:e,...t})=>(0,a.jsx)(`span`,{className:n.t(`text-muted-foreground ml-auto text-xs tracking-widest`,e),...t});m.displayName=`CommandShortcut`,exports.Command=o,exports.CommandDialog=s,exports.CommandEmpty=u,exports.CommandGroup=d,exports.CommandInput=c,exports.CommandItem=p,exports.CommandList=l,exports.CommandSeparator=f,exports.CommandShortcut=m;
2
2
  //# sourceMappingURL=command.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.cjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["'use client';\n\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CommandBaseProps,\n CommandEmptyBaseProps,\n CommandGroupBaseProps,\n CommandInputBaseProps,\n CommandItemBaseProps,\n CommandListBaseProps,\n CommandSeparatorBaseProps,\n CommandShortcutBaseProps,\n} from '@gv-tech/ui-core';\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from './dialog';\nimport { cn } from './lib/utils';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive> & CommandBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive?.displayName || 'Command';\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <DialogTitle className=\"sr-only\">Search</DialogTitle>\n <DialogDescription className=\"sr-only\">Search for documentation and components.</DialogDescription>\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & CommandInputBaseProps\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input?.displayName || 'CommandInput';\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> & CommandListBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List?.displayName || 'CommandList';\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> & CommandEmptyBaseProps\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />);\n\nCommandEmpty.displayName = CommandPrimitive.Empty?.displayName || 'CommandEmpty';\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> & CommandGroupBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group?.displayName || 'CommandGroup';\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> & CommandSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator?.displayName || 'CommandSeparator';\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & CommandItemBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item?.displayName || 'CommandItem';\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\nexport type {\n CommandEmptyBaseProps as CommandEmptyProps,\n CommandGroupBaseProps as CommandGroupProps,\n CommandInputBaseProps as CommandInputProps,\n CommandItemBaseProps as CommandItemProps,\n CommandListBaseProps as CommandListProps,\n CommandBaseProps as CommandProps,\n CommandSeparatorBaseProps as CommandSeparatorProps,\n CommandShortcutBaseProps as CommandShortcutProps,\n};\n"],"mappings":"yRAoBM,EAAU,EAAM,YAGnB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAC,EAAA,GAAD,CACO,MACL,UAAW,EAAA,EACT,4FACA,EACD,CACD,GAAI,EACJ,CAAA,CACF,CACF,EAAQ,YAAc,EAAA,IAAkB,aAAe,UAEvD,IAAM,GAAiB,CAAE,WAAU,GAAG,MAElC,EAAA,EAAA,KAAC,EAAA,OAAD,CAAQ,GAAI,YACV,EAAA,EAAA,MAAC,EAAA,cAAD,CAAe,UAAU,+BAAzB,EACE,EAAA,EAAA,KAAC,EAAA,YAAD,CAAa,UAAU,mBAAU,SAAoB,CAAA,EACrD,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAmB,UAAU,mBAAU,2CAA4D,CAAA,EACnG,EAAA,EAAA,KAAC,EAAD,CAAS,UAAU,8WAChB,WACO,CAAA,CACI,GACT,CAAA,CAIP,EAAe,EAAM,YAGxB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,kCAAkC,qBAAmB,YAApE,EACE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAQ,UAAU,mCAAqC,CAAA,EACvD,EAAA,EAAA,KAAC,EAAA,GAAiB,MAAlB,CACO,MACL,UAAW,EAAA,EACT,yJACA,EACD,CACD,GAAI,EACJ,CAAA,CACE,GACN,CAEF,EAAa,YAAc,E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":"command.cjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["'use client';\n\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n CommandBaseProps,\n CommandEmptyBaseProps,\n CommandGroupBaseProps,\n CommandInputBaseProps,\n CommandItemBaseProps,\n CommandListBaseProps,\n CommandSeparatorBaseProps,\n CommandShortcutBaseProps,\n} from '@gv-tech/ui-core';\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from './dialog';\nimport { cn } from './lib/utils';\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive> & CommandBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive?.displayName || 'Command';\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <DialogTitle className=\"sr-only\">Search</DialogTitle>\n <DialogDescription className=\"sr-only\">Search for documentation and components.</DialogDescription>\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & CommandInputBaseProps\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input?.displayName || 'CommandInput';\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> & CommandListBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List?.displayName || 'CommandList';\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> & CommandEmptyBaseProps\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />);\n\nCommandEmpty.displayName = CommandPrimitive.Empty?.displayName || 'CommandEmpty';\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> & CommandGroupBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group?.displayName || 'CommandGroup';\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> & CommandSeparatorBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator?.displayName || 'CommandSeparator';\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & CommandItemBaseProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item?.displayName || 'CommandItem';\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutBaseProps) => {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n};\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\nexport type {\n CommandEmptyBaseProps as CommandEmptyProps,\n CommandGroupBaseProps as CommandGroupProps,\n CommandInputBaseProps as CommandInputProps,\n CommandItemBaseProps as CommandItemProps,\n CommandListBaseProps as CommandListProps,\n CommandBaseProps as CommandProps,\n CommandSeparatorBaseProps as CommandSeparatorProps,\n CommandShortcutBaseProps as CommandShortcutProps,\n};\n"],"mappings":"yRAoBM,EAAU,EAAM,YAGnB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAC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