@codefast/ui 0.0.64 → 0.0.66

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 (276) hide show
  1. package/dist/{chunk-ZMF2SRE5.js → chunk-26W5NJTU.js} +1 -1
  2. package/dist/chunk-26W5NJTU.js.map +1 -0
  3. package/dist/chunk-3COHZ24E.cjs +2 -0
  4. package/dist/chunk-3COHZ24E.cjs.map +1 -0
  5. package/dist/chunk-4MTN7WZ2.cjs +2 -0
  6. package/dist/chunk-4MTN7WZ2.cjs.map +1 -0
  7. package/dist/chunk-5QETIFO4.js +2 -0
  8. package/dist/chunk-5QETIFO4.js.map +1 -0
  9. package/dist/{chunk-WECV77JD.cjs → chunk-5RJANBDJ.cjs} +1 -1
  10. package/dist/chunk-5RJANBDJ.cjs.map +1 -0
  11. package/dist/chunk-6UQKMUZG.cjs +2 -0
  12. package/dist/chunk-6UQKMUZG.cjs.map +1 -0
  13. package/dist/chunk-AVEDWLNQ.js +2 -0
  14. package/dist/chunk-AVEDWLNQ.js.map +1 -0
  15. package/dist/{chunk-YLE5XFEO.cjs → chunk-EW7DAPDC.cjs} +1 -1
  16. package/dist/chunk-EW7DAPDC.cjs.map +1 -0
  17. package/dist/chunk-HDHZESSG.js +2 -0
  18. package/dist/chunk-HDHZESSG.js.map +1 -0
  19. package/dist/{chunk-GCHNSK5O.cjs → chunk-JMM2MTPI.cjs} +1 -1
  20. package/dist/chunk-JMM2MTPI.cjs.map +1 -0
  21. package/dist/{chunk-WRO3QIWH.js → chunk-JNOLIDCD.js} +1 -1
  22. package/dist/chunk-JNOLIDCD.js.map +1 -0
  23. package/dist/{chunk-F5TIIJJJ.cjs → chunk-LOJBMYTH.cjs} +1 -1
  24. package/dist/chunk-LOJBMYTH.cjs.map +1 -0
  25. package/dist/{chunk-A5ILA637.js → chunk-RBP4PBCK.js} +1 -1
  26. package/dist/chunk-RBP4PBCK.js.map +1 -0
  27. package/dist/{chunk-L7IASKCH.js → chunk-RVGKUNXC.js} +1 -1
  28. package/dist/{chunk-L7IASKCH.js.map → chunk-RVGKUNXC.js.map} +1 -1
  29. package/dist/{chunk-72NPDP3X.cjs → chunk-T3G5USVY.cjs} +1 -1
  30. package/dist/chunk-T3G5USVY.cjs.map +1 -0
  31. package/dist/chunk-VDVLCSO4.js +2 -0
  32. package/dist/chunk-VDVLCSO4.js.map +1 -0
  33. package/dist/{chunk-2OBTJ7SD.cjs → chunk-WKKCZQNO.cjs} +2 -2
  34. package/dist/chunk-WKKCZQNO.cjs.map +1 -0
  35. package/dist/{chunk-FNQFZJUG.js → chunk-WQFHFTYS.js} +1 -1
  36. package/dist/chunk-WQFHFTYS.js.map +1 -0
  37. package/dist/react/accordion.cjs.map +1 -1
  38. package/dist/react/accordion.js.map +1 -1
  39. package/dist/react/alert-dialog.cjs +1 -1
  40. package/dist/react/alert-dialog.cjs.map +1 -1
  41. package/dist/react/alert-dialog.d.cts +3 -1
  42. package/dist/react/alert-dialog.d.ts +3 -1
  43. package/dist/react/alert-dialog.js +1 -1
  44. package/dist/react/alert-dialog.js.map +1 -1
  45. package/dist/react/alert.cjs.map +1 -1
  46. package/dist/react/alert.js.map +1 -1
  47. package/dist/react/avatar.cjs.map +1 -1
  48. package/dist/react/avatar.js.map +1 -1
  49. package/dist/react/blockquote.cjs.map +1 -1
  50. package/dist/react/blockquote.js.map +1 -1
  51. package/dist/react/box.cjs.map +1 -1
  52. package/dist/react/box.js.map +1 -1
  53. package/dist/react/breadcrumb.cjs +1 -1
  54. package/dist/react/breadcrumb.cjs.map +1 -1
  55. package/dist/react/breadcrumb.js +1 -1
  56. package/dist/react/breadcrumb.js.map +1 -1
  57. package/dist/react/button.cjs +1 -1
  58. package/dist/react/button.js +1 -1
  59. package/dist/react/calendar.cjs +1 -1
  60. package/dist/react/calendar.js +1 -1
  61. package/dist/react/card.cjs.map +1 -1
  62. package/dist/react/card.js.map +1 -1
  63. package/dist/react/carousel.cjs +1 -1
  64. package/dist/react/carousel.cjs.map +1 -1
  65. package/dist/react/carousel.js +1 -1
  66. package/dist/react/carousel.js.map +1 -1
  67. package/dist/react/checkbox-cards.cjs +1 -1
  68. package/dist/react/checkbox-cards.cjs.map +1 -1
  69. package/dist/react/checkbox-cards.js +1 -1
  70. package/dist/react/checkbox-cards.js.map +1 -1
  71. package/dist/react/checkbox-group.cjs +1 -1
  72. package/dist/react/checkbox-group.cjs.map +1 -1
  73. package/dist/react/checkbox-group.js +1 -1
  74. package/dist/react/checkbox-group.js.map +1 -1
  75. package/dist/react/checkbox-group.primitive.cjs +1 -1
  76. package/dist/react/checkbox-group.primitive.js +1 -1
  77. package/dist/react/checkbox.cjs +1 -1
  78. package/dist/react/checkbox.cjs.map +1 -1
  79. package/dist/react/checkbox.js +1 -1
  80. package/dist/react/checkbox.js.map +1 -1
  81. package/dist/react/code.cjs.map +1 -1
  82. package/dist/react/code.js.map +1 -1
  83. package/dist/react/collapsible.cjs.map +1 -1
  84. package/dist/react/collapsible.js.map +1 -1
  85. package/dist/react/command.cjs +1 -1
  86. package/dist/react/command.cjs.map +1 -1
  87. package/dist/react/command.js +1 -1
  88. package/dist/react/command.js.map +1 -1
  89. package/dist/react/container.cjs.map +1 -1
  90. package/dist/react/container.js.map +1 -1
  91. package/dist/react/context-menu.cjs.map +1 -1
  92. package/dist/react/context-menu.js.map +1 -1
  93. package/dist/react/data-table.cjs +1 -1
  94. package/dist/react/data-table.js +1 -1
  95. package/dist/react/dialog.cjs +1 -1
  96. package/dist/react/dialog.d.cts +1 -1
  97. package/dist/react/dialog.d.ts +1 -1
  98. package/dist/react/dialog.js +1 -1
  99. package/dist/react/drawer.cjs.map +1 -1
  100. package/dist/react/drawer.js.map +1 -1
  101. package/dist/react/dropdown-menu.cjs +1 -1
  102. package/dist/react/dropdown-menu.js +1 -1
  103. package/dist/react/em.cjs.map +1 -1
  104. package/dist/react/em.js.map +1 -1
  105. package/dist/react/form.cjs +1 -1
  106. package/dist/react/form.cjs.map +1 -1
  107. package/dist/react/form.js +1 -1
  108. package/dist/react/form.js.map +1 -1
  109. package/dist/react/heading.cjs.map +1 -1
  110. package/dist/react/heading.js.map +1 -1
  111. package/dist/react/hover-card.cjs.map +1 -1
  112. package/dist/react/hover-card.js.map +1 -1
  113. package/dist/react/input-otp.cjs +1 -1
  114. package/dist/react/input-otp.cjs.map +1 -1
  115. package/dist/react/input-otp.js +1 -1
  116. package/dist/react/input-otp.js.map +1 -1
  117. package/dist/react/input.cjs +1 -1
  118. package/dist/react/input.cjs.map +1 -1
  119. package/dist/react/input.d.cts +113 -34
  120. package/dist/react/input.d.ts +113 -34
  121. package/dist/react/input.js +1 -1
  122. package/dist/react/input.js.map +1 -1
  123. package/dist/react/kbd.cjs.map +1 -1
  124. package/dist/react/kbd.js.map +1 -1
  125. package/dist/react/label.cjs +1 -1
  126. package/dist/react/label.js +1 -1
  127. package/dist/react/menubar.cjs.map +1 -1
  128. package/dist/react/menubar.js.map +1 -1
  129. package/dist/react/navigation-menu.cjs.map +1 -1
  130. package/dist/react/navigation-menu.js.map +1 -1
  131. package/dist/react/pagination.cjs +1 -1
  132. package/dist/react/pagination.cjs.map +1 -1
  133. package/dist/react/pagination.js +1 -1
  134. package/dist/react/pagination.js.map +1 -1
  135. package/dist/react/popover.cjs.map +1 -1
  136. package/dist/react/popover.js.map +1 -1
  137. package/dist/react/pre.cjs.map +1 -1
  138. package/dist/react/pre.js.map +1 -1
  139. package/dist/react/progress.cjs.map +1 -1
  140. package/dist/react/progress.js.map +1 -1
  141. package/dist/react/quote.cjs.map +1 -1
  142. package/dist/react/quote.js.map +1 -1
  143. package/dist/react/radio-cards.cjs +1 -1
  144. package/dist/react/radio-cards.cjs.map +1 -1
  145. package/dist/react/radio-cards.js +1 -1
  146. package/dist/react/radio-cards.js.map +1 -1
  147. package/dist/react/radio-group.cjs.map +1 -1
  148. package/dist/react/radio-group.js.map +1 -1
  149. package/dist/react/radio.cjs.map +1 -1
  150. package/dist/react/radio.js.map +1 -1
  151. package/dist/react/scroll-area.cjs.map +1 -1
  152. package/dist/react/scroll-area.js.map +1 -1
  153. package/dist/react/section.cjs.map +1 -1
  154. package/dist/react/section.js.map +1 -1
  155. package/dist/react/select.cjs +1 -1
  156. package/dist/react/select.js +1 -1
  157. package/dist/react/separator.cjs.map +1 -1
  158. package/dist/react/separator.js.map +1 -1
  159. package/dist/react/sheet.cjs +1 -1
  160. package/dist/react/sheet.cjs.map +1 -1
  161. package/dist/react/sheet.js +1 -1
  162. package/dist/react/sheet.js.map +1 -1
  163. package/dist/react/slider.cjs.map +1 -1
  164. package/dist/react/slider.js.map +1 -1
  165. package/dist/react/spinner.cjs +1 -1
  166. package/dist/react/spinner.js +1 -1
  167. package/dist/react/strong.cjs.map +1 -1
  168. package/dist/react/strong.js.map +1 -1
  169. package/dist/react/switch.cjs +1 -1
  170. package/dist/react/switch.cjs.map +1 -1
  171. package/dist/react/switch.js +1 -1
  172. package/dist/react/switch.js.map +1 -1
  173. package/dist/react/table.cjs.map +1 -1
  174. package/dist/react/table.js.map +1 -1
  175. package/dist/react/tabs.cjs.map +1 -1
  176. package/dist/react/tabs.js.map +1 -1
  177. package/dist/react/text-input.cjs +2 -0
  178. package/dist/react/text-input.cjs.map +1 -0
  179. package/dist/react/text-input.d.cts +11 -0
  180. package/dist/react/text-input.d.ts +11 -0
  181. package/dist/react/text-input.js +2 -0
  182. package/dist/react/text-input.js.map +1 -0
  183. package/dist/react/text.cjs.map +1 -1
  184. package/dist/react/text.js.map +1 -1
  185. package/dist/react/textarea.cjs +1 -1
  186. package/dist/react/textarea.cjs.map +1 -1
  187. package/dist/react/textarea.js +1 -1
  188. package/dist/react/textarea.js.map +1 -1
  189. package/dist/react/toggle-group.cjs +1 -1
  190. package/dist/react/toggle-group.cjs.map +1 -1
  191. package/dist/react/toggle-group.js +1 -1
  192. package/dist/react/toggle-group.js.map +1 -1
  193. package/dist/react/toggle.cjs +1 -1
  194. package/dist/react/toggle.js +1 -1
  195. package/dist/react/tooltip.cjs.map +1 -1
  196. package/dist/react/tooltip.js.map +1 -1
  197. package/dist/styles.css +1 -1
  198. package/dist/styles.css.map +1 -1
  199. package/package.json +8 -2
  200. package/src/react/accordion.tsx +9 -7
  201. package/src/react/alert-dialog.tsx +55 -20
  202. package/src/react/alert.tsx +11 -9
  203. package/src/react/avatar.tsx +13 -11
  204. package/src/react/blockquote.tsx +2 -2
  205. package/src/react/box.tsx +2 -2
  206. package/src/react/breadcrumb.tsx +33 -27
  207. package/src/react/button.tsx +3 -4
  208. package/src/react/card.tsx +21 -15
  209. package/src/react/carousel.tsx +10 -10
  210. package/src/react/checkbox-cards.tsx +8 -6
  211. package/src/react/checkbox-group.primitive.tsx +12 -6
  212. package/src/react/checkbox-group.tsx +7 -5
  213. package/src/react/checkbox.tsx +3 -3
  214. package/src/react/code.tsx +2 -2
  215. package/src/react/collapsible.tsx +2 -2
  216. package/src/react/command.tsx +46 -36
  217. package/src/react/container.tsx +6 -4
  218. package/src/react/context-menu.tsx +22 -18
  219. package/src/react/dialog.tsx +13 -9
  220. package/src/react/drawer.tsx +10 -6
  221. package/src/react/dropdown-menu.tsx +20 -16
  222. package/src/react/em.tsx +2 -2
  223. package/src/react/form.tsx +38 -22
  224. package/src/react/heading.tsx +6 -4
  225. package/src/react/hover-card.tsx +7 -5
  226. package/src/react/input-otp.tsx +40 -34
  227. package/src/react/input.tsx +115 -12
  228. package/src/react/kbd.tsx +2 -2
  229. package/src/react/label.tsx +2 -2
  230. package/src/react/menubar.tsx +48 -42
  231. package/src/react/navigation-menu.tsx +12 -12
  232. package/src/react/pagination.tsx +5 -5
  233. package/src/react/popover.tsx +7 -5
  234. package/src/react/pre.tsx +2 -2
  235. package/src/react/progress.tsx +2 -2
  236. package/src/react/quote.tsx +2 -2
  237. package/src/react/radio-cards.tsx +16 -14
  238. package/src/react/radio-group.tsx +18 -16
  239. package/src/react/radio.tsx +16 -14
  240. package/src/react/scroll-area.tsx +4 -4
  241. package/src/react/section.tsx +2 -2
  242. package/src/react/select.tsx +32 -30
  243. package/src/react/separator.tsx +2 -2
  244. package/src/react/sheet.tsx +15 -7
  245. package/src/react/slider.tsx +2 -2
  246. package/src/react/spinner.tsx +2 -2
  247. package/src/react/strong.tsx +2 -2
  248. package/src/react/switch.tsx +3 -3
  249. package/src/react/table.tsx +23 -17
  250. package/src/react/tabs.tsx +6 -6
  251. package/src/react/text-input.tsx +36 -0
  252. package/src/react/text.tsx +2 -2
  253. package/src/react/textarea.tsx +3 -3
  254. package/src/react/toggle-group.tsx +7 -4
  255. package/src/react/toggle.tsx +2 -2
  256. package/src/react/tooltip.tsx +7 -5
  257. package/dist/chunk-2OBTJ7SD.cjs.map +0 -1
  258. package/dist/chunk-37XZ3LKY.cjs +0 -2
  259. package/dist/chunk-37XZ3LKY.cjs.map +0 -1
  260. package/dist/chunk-3OEPCFBF.cjs +0 -2
  261. package/dist/chunk-3OEPCFBF.cjs.map +0 -1
  262. package/dist/chunk-6AFJCDFU.js +0 -2
  263. package/dist/chunk-6AFJCDFU.js.map +0 -1
  264. package/dist/chunk-72NPDP3X.cjs.map +0 -1
  265. package/dist/chunk-7CHCTEST.js +0 -2
  266. package/dist/chunk-7CHCTEST.js.map +0 -1
  267. package/dist/chunk-A5ILA637.js.map +0 -1
  268. package/dist/chunk-F5TIIJJJ.cjs.map +0 -1
  269. package/dist/chunk-FNQFZJUG.js.map +0 -1
  270. package/dist/chunk-GCHNSK5O.cjs.map +0 -1
  271. package/dist/chunk-SHMTOJHM.js +0 -2
  272. package/dist/chunk-SHMTOJHM.js.map +0 -1
  273. package/dist/chunk-WECV77JD.cjs.map +0 -1
  274. package/dist/chunk-WRO3QIWH.js.map +0 -1
  275. package/dist/chunk-YLE5XFEO.cjs.map +0 -1
  276. package/dist/chunk-ZMF2SRE5.js.map +0 -1
@@ -8,12 +8,12 @@ import { cn } from '../lib/utils';
8
8
  type TextareaElement = HTMLTextAreaElement;
9
9
  type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
10
10
 
11
- const Textarea = React.forwardRef<TextareaElement, TextareaProps>(({ className, ...props }, ref) => {
11
+ const Textarea = React.forwardRef<TextareaElement, TextareaProps>(({ className, ...props }, forwardedRef) => {
12
12
  return (
13
13
  <textarea
14
- ref={ref}
14
+ ref={forwardedRef}
15
15
  className={cn(
16
- 'border-input placeholder:text-muted-foreground flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
16
+ 'border-input placeholder:text-muted-foreground flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50',
17
17
  className,
18
18
  )}
19
19
  {...props}
@@ -25,13 +25,16 @@ type ToggleGroupElement = React.ElementRef<typeof ToggleGroupPrimitive.Root>;
25
25
  type ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & ToggleVariantsProps;
26
26
 
27
27
  const ToggleGroup = React.forwardRef<ToggleGroupElement, ToggleGroupProps>(
28
- ({ __scopeToggleGroup, children, className, variant, size, ...props }: ScopedProps<ToggleGroupProps>, ref) => {
28
+ (
29
+ { __scopeToggleGroup, children, className, variant, size, ...props }: ScopedProps<ToggleGroupProps>,
30
+ forwardedRef,
31
+ ) => {
29
32
  const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);
30
33
 
31
34
  return (
32
35
  <ToggleGroupProvider scope={__scopeToggleGroup} size={size} variant={variant}>
33
36
  <ToggleGroupPrimitive.Root
34
- ref={ref}
37
+ ref={forwardedRef}
35
38
  className={cn('flex items-center justify-center gap-1', className)}
36
39
  {...toggleGroupScope}
37
40
  {...props}
@@ -55,13 +58,13 @@ type ToggleGroupItemElement = React.ElementRef<typeof ToggleGroupPrimitive.Item>
55
58
  type ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;
56
59
 
57
60
  const ToggleGroupItem = React.forwardRef<ToggleGroupItemElement, ToggleGroupItemProps>(
58
- ({ __scopeToggleGroup, children, className, ...props }: ScopedProps<ToggleGroupItemProps>, ref) => {
61
+ ({ __scopeToggleGroup, children, className, ...props }: ScopedProps<ToggleGroupItemProps>, forwardedRef) => {
59
62
  const context = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);
60
63
  const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);
61
64
 
62
65
  return (
63
66
  <ToggleGroupPrimitive.Item
64
- ref={ref}
67
+ ref={forwardedRef}
65
68
  className={toggleVariants({ ...context, className })}
66
69
  {...toggleGroupScope}
67
70
  {...props}
@@ -36,8 +36,8 @@ type ToggleVariantsProps = VariantProps<typeof toggleVariants>;
36
36
  type ToggleElement = React.ElementRef<typeof TogglePrimitive.Root>;
37
37
  type ToggleProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> & ToggleVariantsProps;
38
38
 
39
- const Toggle = React.forwardRef<ToggleElement, ToggleProps>(({ className, variant, size, ...props }, ref) => (
40
- <TogglePrimitive.Root ref={ref} className={toggleVariants({ variant, size, className })} {...props} />
39
+ const Toggle = React.forwardRef<ToggleElement, ToggleProps>(({ className, variant, size, ...props }, forwardedRef) => (
40
+ <TogglePrimitive.Root ref={forwardedRef} className={toggleVariants({ variant, size, className })} {...props} />
41
41
  ));
42
42
 
43
43
  Toggle.displayName = TogglePrimitive.Root.displayName;
@@ -33,10 +33,10 @@ type TooltipContentElement = React.ElementRef<typeof TooltipPrimitive.Content>;
33
33
  type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>;
34
34
 
35
35
  const TooltipContent = React.forwardRef<TooltipContentElement, TooltipContentProps>(
36
- ({ className, sideOffset = 6, ...props }, ref) => (
36
+ ({ className, sideOffset = 6, ...props }, forwardedRef) => (
37
37
  <TooltipPrimitive.Portal>
38
38
  <TooltipPrimitive.Content
39
- ref={ref}
39
+ ref={forwardedRef}
40
40
  className={cn(
41
41
  'bg-popover text-popover-foreground data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 rounded-md border px-3 py-1.5 text-xs',
42
42
  className,
@@ -57,9 +57,11 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
57
57
  type TooltipArrowElement = React.ElementRef<typeof TooltipPrimitive.Arrow>;
58
58
  type TooltipArrowProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>;
59
59
 
60
- const TooltipArrow = React.forwardRef<TooltipArrowElement, TooltipArrowProps>(({ className, ...props }, ref) => (
61
- <TooltipPrimitive.Arrow ref={ref} className={cn('fill-primary', className)} {...props} />
62
- ));
60
+ const TooltipArrow = React.forwardRef<TooltipArrowElement, TooltipArrowProps>(
61
+ ({ className, ...props }, forwardedRef) => (
62
+ <TooltipPrimitive.Arrow ref={forwardedRef} className={cn('fill-primary', className)} {...props} />
63
+ ),
64
+ );
63
65
 
64
66
  TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
65
67
 
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/button.tsx"],"names":["React","Fragment","Slot","VisuallyHidden","tv","jsx","jsxs","buttonVariants","Button","children","className","variant","size","loading","asChild","props","ref","Component","ComponentLoading","disabled","Spinner"],"mappings":"yCAAA,UAAYA,MAAW,QACvB,OAAS,YAAAC,MAAgB,QACzB,OAAS,QAAAC,MAAY,uBACrB,OAAS,kBAAAC,MAAsB,kCAC/B,OAAS,MAAAC,MAA6B,oBAmE5B,OACE,OAAAC,EADF,QAAAC,MAAA,oBA5DV,IAAMC,EAAiBH,EAAG,CACxB,KAAM,gPACN,SAAU,CACR,QAAS,CACP,QAAS,gEACT,YAAa,+EACb,MAAO,+DACP,KAAM,kDACN,QACE,2GACF,UAAW,wEACb,EACA,KAAM,CACJ,QAAS,kBACT,GAAI,iBACJ,GAAI,iBACJ,GAAI,kBACJ,KAAM,UACN,UAAW,SACX,UAAW,SACX,UAAW,SACb,EACA,QAAS,CACP,KAAM,UACR,CACF,EACA,gBAAiB,CACf,KAAM,UACN,QAAS,UACT,QAAS,EACX,CACF,CAAC,EAcKI,EAAe,aACnB,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAAQ,CAC3F,IAAMC,EAAYH,EAAUZ,EAAO,SAC7BgB,EAAmBJ,EAAU,OAASb,EACtCkB,EAAWN,GAAWE,EAAM,SAElC,OACEV,EAACY,EAAA,CACC,IAAKD,EACL,UAAWT,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,EAC/D,KAAMI,EAAU,OAAY,SAC3B,GAAGC,EACJ,SAAUI,EAET,SAAAN,EACCP,EAACY,EAAA,CACC,UAAAb,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAI,EACH,EACAJ,EAACF,EAAA,CAAgB,SAAAM,EAAS,EAC1BJ,EAAC,QAAK,UAAU,oDACd,SAAAA,EAACe,EAAA,EAAQ,EACX,GACF,EAEAX,EAEJ,CAEJ,CACF,EAEAD,EAAO,YAAc","sourcesContent":["import * as React from 'react';\nimport { Fragment } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = tv({\n base: 'inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm',\n ghost: 'text-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline:\n 'border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',\n },\n size: {\n default: 'h-10 gap-2 px-4',\n xs: 'h-8 gap-1 px-2',\n sm: 'h-9 gap-2 px-3',\n lg: 'h-11 gap-2 px-8',\n icon: 'size-10',\n 'icon-xs': 'size-8',\n 'icon-sm': 'size-9',\n 'icon-lg': 'size-11',\n },\n loading: {\n true: 'relative',\n },\n },\n defaultVariants: {\n size: 'default',\n variant: 'default',\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n ({ children, className, variant, size, loading = false, asChild = false, ...props }, ref) => {\n const Component = asChild ? Slot : 'button';\n const ComponentLoading = asChild ? 'span' : Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={ref}\n className={buttonVariants({ variant, size, loading, className })}\n type={asChild ? undefined : 'button'}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = 'Button';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"]}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkNU6SK3FCcjs = require('./chunk-NU6SK3FC.cjs');var _react = require('react'); var r = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var f=e.Root,P= exports.b =e.Trigger,y= exports.c =e.Close,m= exports.d =r.forwardRef(({children:t,className:o,...l},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Overlay,{className:"data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8",children:_jsxruntime.jsxs.call(void 0, e.Content,{ref:n,className:_chunkNU6SK3FCcjs.a.call(void 0, "bg-background data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out relative z-50 flex w-full max-w-lg origin-top flex-col rounded-lg border shadow-lg",o),...l,children:[t,_jsxruntime.jsxs.call(void 0, e.Close,{className:"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[_jsxruntime.jsx.call(void 0, _reacticons.Cross2Icon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]})})}));m.displayName=e.Content.displayName;function u({className:t,...o}){return _jsxruntime.jsx.call(void 0, "header",{className:_chunkNU6SK3FCcjs.a.call(void 0, "flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function v({className:t,...o}){return _jsxruntime.jsx.call(void 0, "main",{className:_chunkNU6SK3FCcjs.a.call(void 0, "overflow-auto px-6 py-2",t),...o})}function R({className:t,...o}){return _jsxruntime.jsx.call(void 0, "footer",{className:_chunkNU6SK3FCcjs.a.call(void 0, "flex shrink-0 flex-col-reverse px-6 pb-6 pt-4 sm:flex-row sm:justify-end sm:space-x-2",t),...o})}var g=r.forwardRef(({className:t,...o},l)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:l,className:_chunkNU6SK3FCcjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",t),...o}));g.displayName=e.Title.displayName;var D=r.forwardRef(({className:t,...o},l)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:l,className:_chunkNU6SK3FCcjs.a.call(void 0, "text-muted-foreground text-sm",t),...o}));D.displayName=e.Description.displayName;exports.a = f; exports.b = P; exports.c = y; exports.d = m; exports.e = u; exports.f = v; exports.g = R; exports.h = g; exports.i = D;
2
- //# sourceMappingURL=chunk-37XZ3LKY.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/dialog.tsx"],"names":["React","DialogPrimitive","Cross2Icon","jsx","jsxs","Dialog","DialogTrigger","DialogClose","DialogContent","children","className","props","ref","cn","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription"],"mappings":"oCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,wBA4CjB,OACE,OAAAC,EADF,QAAAC,MAAA,oBApCV,IAAMC,EAAyB,OAOzBC,EAAgC,UAOhCC,EAA8B,QAS9BC,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClCT,EAAiB,SAAhB,CACC,SAAAA,EAAiB,UAAhB,CAAwB,UAAU,mPACjC,SAAAC,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,oWACAH,CACF,EACC,GAAGC,EAEH,UAAAF,EACDL,EAAiB,QAAhB,CAAsB,UAAU,8PAC/B,UAAAD,EAACD,EAAA,CAAW,UAAU,SAAS,EAC/BC,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,EACF,EACF,CAEJ,EAEAK,EAAc,YAA8B,UAAQ,YAQpD,SAASM,EAAa,CAAE,UAAAJ,EAAW,GAAGC,CAAM,EAAyC,CACnF,OACER,EAAC,UACC,UAAWU,EAAG,yEAA0EH,CAAS,EAChG,GAAGC,EACN,CAEJ,CAQA,SAASI,EAAW,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAyC,CACjF,OAAOR,EAAC,QAAK,UAAWU,EAAG,0BAA2BH,CAAS,EAAI,GAAGC,EAAO,CAC/E,CAQA,SAASK,EAAa,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAyC,CACnF,OACER,EAAC,UACC,UAAWU,EAAG,wFAAyFH,CAAS,EAC/G,GAAGC,EACN,CAEJ,CASA,IAAMM,EAAoB,aAAiD,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IACnGT,EAAiB,QAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,oDAAqDH,CAAS,EAC3E,GAAGC,EACN,CACD,EAEDM,EAAY,YAA8B,QAAM,YAShD,IAAMC,EAA0B,aAC9B,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,cAAhB,CAA4B,IAAKS,EAAK,UAAWC,EAAG,gCAAiCH,CAAS,EAAI,GAAGC,EAAO,CAEjH,EAEAO,EAAkB,YAA8B,cAAY","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Dialog\n * -------------------------------------------------------------------------- */\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root>;\nconst Dialog = DialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\nconst DialogTrigger = DialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogClose\n * -------------------------------------------------------------------------- */\n\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\nconst DialogClose = DialogPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogContent\n * -------------------------------------------------------------------------- */\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n ({ children, className, ...props }, ref) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className=\"data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8\">\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out relative z-50 flex w-full max-w-lg origin-top flex-col rounded-lg border shadow-lg',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Overlay>\n </DialogPrimitive.Portal>\n ),\n);\n\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogHeader\n * -------------------------------------------------------------------------- */\n\ntype DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogBody\n * -------------------------------------------------------------------------- */\n\ntype DialogBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogBody({ className, ...props }: DialogFooterProps): React.JSX.Element {\n return <main className={cn('overflow-auto px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogFooter\n * -------------------------------------------------------------------------- */\n\ntype DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse px-6 pb-6 pt-4 sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTitle\n * -------------------------------------------------------------------------- */\n\ntype DialogTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogDescription\n * -------------------------------------------------------------------------- */\n\ntype DialogDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\n\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Dialog,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogBody,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n type DialogProps,\n type DialogTriggerProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogHeaderProps,\n type DialogBodyProps,\n type DialogFooterProps,\n type DialogTitleProps,\n type DialogDescriptionProps,\n};\n"]}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkNU6SK3FCcjs = require('./chunk-NU6SK3FC.cjs');var _react = require('react'); var a = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _reactselect = require('@radix-ui/react-select'); var e = _interopRequireWildcard(_reactselect);var _jsxruntime = require('react/jsx-runtime');var h=e.Root,C= exports.b =e.Group,N= exports.c =e.Value,u= exports.d =a.forwardRef(({children:i,className:l,...o},c)=>_jsxruntime.jsxs.call(void 0, e.Trigger,{ref:c,className:_chunkNU6SK3FCcjs.a.call(void 0, "border-input placeholder:text-muted-foreground flex h-10 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:truncate",l),...o,children:[i,_jsxruntime.jsx.call(void 0, e.Icon,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _reacticons.CaretSortIcon,{className:"size-4 opacity-50"})})]}));u.displayName=e.Trigger.displayName;var n=a.forwardRef(({className:i,...l},o)=>_jsxruntime.jsx.call(void 0, e.ScrollUpButton,{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, "flex cursor-pointer items-center justify-center py-1",i),...l,children:_jsxruntime.jsx.call(void 0, _reacticons.ChevronUpIcon,{})}));n.displayName=e.ScrollUpButton.displayName;var s=a.forwardRef(({className:i,...l},o)=>_jsxruntime.jsx.call(void 0, e.ScrollDownButton,{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, "flex cursor-pointer items-center justify-center py-1",i),...l,children:_jsxruntime.jsx.call(void 0, _reacticons.ChevronDownIcon,{})}));s.displayName=e.ScrollDownButton.displayName;var y=a.forwardRef(({children:i,className:l,position:o="popper",...c},m)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsxs.call(void 0, e.Content,{ref:m,className:_chunkNU6SK3FCcjs.a.call(void 0, "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",l),position:o,...c,children:[_jsxruntime.jsx.call(void 0, n,{}),_jsxruntime.jsx.call(void 0, e.Viewport,{className:_chunkNU6SK3FCcjs.a.call(void 0, "p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),_jsxruntime.jsx.call(void 0, s,{})]})}));y.displayName=e.Content.displayName;var v=a.forwardRef(({className:i,...l},o)=>_jsxruntime.jsx.call(void 0, e.Label,{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, "px-2 py-1.5 text-sm font-semibold",i),...l}));v.displayName=e.Label.displayName;var R=a.forwardRef(({children:i,className:l,...o},c)=>_jsxruntime.jsxs.call(void 0, e.Item,{ref:c,className:_chunkNU6SK3FCcjs.a.call(void 0, "focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",l),...o,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-4"})})}),_jsxruntime.jsx.call(void 0, e.ItemText,{children:i})]}));R.displayName=e.Item.displayName;var g=a.forwardRef(({className:i,...l},o)=>_jsxruntime.jsx.call(void 0, e.Separator,{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, "bg-muted -mx-1 my-1 h-px",i),...l}));g.displayName=e.Separator.displayName;exports.a = h; exports.b = C; exports.c = N; exports.d = u; exports.e = n; exports.f = s; exports.g = y; exports.h = v; exports.i = R; exports.j = g;
2
- //# sourceMappingURL=chunk-3OEPCFBF.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/select.tsx"],"names":["React","CaretSortIcon","CheckIcon","ChevronDownIcon","ChevronUpIcon","SelectPrimitive","jsx","jsxs","Select","SelectGroup","SelectValue","SelectTrigger","children","className","props","ref","cn","SelectScrollUpButton","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","SelectSeparator"],"mappings":"yCAEA,UAAYA,MAAW,QACvB,OAAS,iBAAAC,EAAe,aAAAC,EAAW,mBAAAC,EAAiB,iBAAAC,MAAqB,wBACzE,UAAYC,MAAqB,yBAiC7B,OAUI,OAAAC,EAVJ,QAAAC,MAAA,oBAzBJ,IAAMC,EAAyB,OAOzBC,EAA8B,QAO9BC,EAA8B,QAS9BC,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClCR,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,oVACAH,CACF,EACC,GAAGC,EAEH,UAAAF,EACDN,EAAiB,OAAhB,CAAqB,QAAO,GAC3B,SAAAA,EAACL,EAAA,CAAc,UAAU,oBAAoB,EAC/C,GACF,CAEJ,EAEAU,EAAc,YAA8B,UAAQ,YASpD,IAAMM,EAA6B,aACjC,CAAC,CAAE,UAAAJ,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,iBAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,uDAAwDH,CAAS,EAC9E,GAAGC,EAEJ,SAAAR,EAACF,EAAA,EAAc,EACjB,CAEJ,EAEAa,EAAqB,YAA8B,iBAAe,YASlE,IAAMC,EAA+B,aACnC,CAAC,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,mBAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,uDAAwDH,CAAS,EAC9E,GAAGC,EAEJ,SAAAR,EAACH,EAAA,EAAgB,EACnB,CAEJ,EAEAe,EAAuB,YAA8B,mBAAiB,YAStE,IAAMC,EAAsB,aAC1B,CAAC,CAAE,SAAAP,EAAU,UAAAC,EAAW,SAAAO,EAAW,SAAU,GAAGN,CAAM,EAAGC,IACvDT,EAAiB,SAAhB,CACC,SAAAC,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,8uBACAI,IAAa,UACX,kIACFP,CACF,EACA,SAAUO,EACT,GAAGN,EAEJ,UAAAR,EAACW,EAAA,EAAqB,EACtBX,EAAiB,WAAhB,CACC,UAAWU,EACT,MACAI,IAAa,UACX,yFACJ,EAEC,SAAAR,EACH,EACAN,EAACY,EAAA,EAAuB,GAC1B,EACF,CAEJ,EAEAC,EAAc,YAA8B,UAAQ,YASpD,IAAME,EAAoB,aAAiD,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACnGT,EAAiB,QAAhB,CAAsB,IAAKS,EAAK,UAAWC,EAAG,oCAAqCH,CAAS,EAAI,GAAGC,EAAO,CAC5G,EAEDO,EAAY,YAA8B,QAAM,YAShD,IAAMC,EAAmB,aAA+C,CAAC,CAAE,SAAAV,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1GR,EAAiB,OAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,8NACAH,CACF,EACC,GAAGC,EAEJ,UAAAR,EAAC,QAAK,UAAU,6DACd,SAAAA,EAAiB,gBAAhB,CACC,SAAAA,EAACJ,EAAA,CAAU,UAAU,SAAS,EAChC,EACF,EACAI,EAAiB,WAAhB,CAA0B,SAAAM,EAAS,GACtC,CACD,EAEDU,EAAW,YAA8B,OAAK,YAS9C,IAAMC,EAAwB,aAC5B,CAAC,CAAE,UAAAV,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,YAAhB,CAA0B,IAAKS,EAAK,UAAWC,EAAG,2BAA4BH,CAAS,EAAI,GAAGC,EAAO,CAE1G,EAEAS,EAAgB,YAA8B,YAAU","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Select\n * -------------------------------------------------------------------------- */\n\ntype SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>;\nconst Select = SelectPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectGroup\n * -------------------------------------------------------------------------- */\n\ntype SelectGroupProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;\nconst SelectGroup = SelectPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectValue\n * -------------------------------------------------------------------------- */\n\ntype SelectValueProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>;\nconst SelectValue = SelectPrimitive.Value;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectTrigger\n * -------------------------------------------------------------------------- */\n\ntype SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;\ntype SelectTriggerProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>;\n\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n ({ children, className, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'border-input placeholder:text-muted-foreground flex h-10 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:truncate',\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretSortIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\n\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollUpButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollUpButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollUpButton>;\ntype SelectScrollUpButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>;\n\nconst SelectScrollUpButton = React.forwardRef<SelectScrollUpButtonElement, SelectScrollUpButtonProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-pointer items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n ),\n);\n\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollDownButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollDownButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollDownButton>;\ntype SelectScrollDownButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>;\n\nconst SelectScrollDownButton = React.forwardRef<SelectScrollDownButtonElement, SelectScrollDownButtonProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-pointer items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n ),\n);\n\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectContent\n * -------------------------------------------------------------------------- */\n\ntype SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;\ntype SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>;\n\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n ({ children, className, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\n\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectLabel\n * -------------------------------------------------------------------------- */\n\ntype SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;\ntype SelectLabelProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>;\n\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label ref={ref} className={cn('px-2 py-1.5 text-sm font-semibold', className)} {...props} />\n));\n\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectItem\n * -------------------------------------------------------------------------- */\n\ntype SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;\ntype SelectItemProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>;\n\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>(({ children, className, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\n\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectSeparator\n * -------------------------------------------------------------------------- */\n\ntype SelectSeparatorElement = React.ElementRef<typeof SelectPrimitive.Separator>;\ntype SelectSeparatorProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>;\n\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n ),\n);\n\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n type SelectProps,\n type SelectGroupProps,\n type SelectValueProps,\n type SelectTriggerProps,\n type SelectContentProps,\n type SelectLabelProps,\n type SelectItemProps,\n type SelectSeparatorProps,\n type SelectScrollUpButtonProps,\n type SelectScrollDownButtonProps,\n};\n"]}
@@ -1,2 +0,0 @@
1
- import{a as s}from"./chunk-A5ILA637.js";import*as a from"react";import{Fragment as m}from"react";import{Slot as b}from"@radix-ui/react-slot";import{VisuallyHidden as g}from"@radix-ui/react-visually-hidden";import{tv as v}from"tailwind-variants";import{jsx as t,jsxs as h}from"react/jsx-runtime";var y=v({base:"inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm"},size:{default:"h-10 gap-2 px-4",xs:"h-8 gap-1 px-2",sm:"h-9 gap-2 px-3",lg:"h-11 gap-2 px-8",icon:"size-10","icon-xs":"size-8","icon-sm":"size-9","icon-lg":"size-11"},loading:{true:"relative"}},defaultVariants:{size:"default",variant:"default",loading:!1}}),x=a.forwardRef(({children:e,className:i,variant:u,size:d,loading:o=!1,asChild:n=!1,...r},p)=>{let l=n?b:"button",c=n?"span":m,f=o||r.disabled;return t(l,{ref:p,className:y({variant:u,size:d,loading:o,className:i}),type:n?void 0:"button",...r,disabled:f,children:o?h(c,{children:[t("span",{"aria-hidden":!0,className:"invisible contents",children:e}),t(g,{children:e}),t("span",{className:"absolute inset-0 flex items-center justify-center",children:t(s,{})})]}):e})});x.displayName="Button";export{y as a,x as b};
2
- //# sourceMappingURL=chunk-6AFJCDFU.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Fragment } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = tv({\n base: 'inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm',\n ghost: 'text-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline:\n 'border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',\n },\n size: {\n default: 'h-10 gap-2 px-4',\n xs: 'h-8 gap-1 px-2',\n sm: 'h-9 gap-2 px-3',\n lg: 'h-11 gap-2 px-8',\n icon: 'size-10',\n 'icon-xs': 'size-8',\n 'icon-sm': 'size-9',\n 'icon-lg': 'size-11',\n },\n loading: {\n true: 'relative',\n },\n },\n defaultVariants: {\n size: 'default',\n variant: 'default',\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n ({ children, className, variant, size, loading = false, asChild = false, ...props }, ref) => {\n const Component = asChild ? Slot : 'button';\n const ComponentLoading = asChild ? 'span' : Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={ref}\n className={buttonVariants({ variant, size, loading, className })}\n type={asChild ? undefined : 'button'}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = 'Button';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"],"mappings":"wCAAA,UAAYA,MAAW,QACvB,OAAS,YAAAC,MAAgB,QACzB,OAAS,QAAAC,MAAY,uBACrB,OAAS,kBAAAC,MAAsB,kCAC/B,OAAS,MAAAC,MAA6B,oBAmE5B,OACE,OAAAC,EADF,QAAAC,MAAA,oBA5DV,IAAMC,EAAiBC,EAAG,CACxB,KAAM,gPACN,SAAU,CACR,QAAS,CACP,QAAS,gEACT,YAAa,+EACb,MAAO,+DACP,KAAM,kDACN,QACE,2GACF,UAAW,wEACb,EACA,KAAM,CACJ,QAAS,kBACT,GAAI,iBACJ,GAAI,iBACJ,GAAI,kBACJ,KAAM,UACN,UAAW,SACX,UAAW,SACX,UAAW,SACb,EACA,QAAS,CACP,KAAM,UACR,CACF,EACA,gBAAiB,CACf,KAAM,UACN,QAAS,UACT,QAAS,EACX,CACF,CAAC,EAcKC,EAAe,aACnB,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAAQ,CAC3F,IAAMC,EAAYH,EAAUI,EAAO,SAC7BC,EAAmBL,EAAU,OAASM,EACtCC,EAAWR,GAAWE,EAAM,SAElC,OACEX,EAACa,EAAA,CACC,IAAKD,EACL,UAAWV,EAAe,CAAE,QAAAK,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,EAC/D,KAAMI,EAAU,OAAY,SAC3B,GAAGC,EACJ,SAAUM,EAET,SAAAR,EACCR,EAACc,EAAA,CACC,UAAAf,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAK,EACH,EACAL,EAACkB,EAAA,CAAgB,SAAAb,EAAS,EAC1BL,EAAC,QAAK,UAAU,oDACd,SAAAA,EAACmB,EAAA,EAAQ,EACX,GACF,EAEAd,EAEJ,CAEJ,CACF,EAEAD,EAAO,YAAc","names":["React","Fragment","Slot","VisuallyHidden","tv","jsx","jsxs","buttonVariants","tv","Button","children","className","variant","size","loading","asChild","props","ref","Component","Slot","ComponentLoading","Fragment","disabled","VisuallyHidden","Spinner"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/label.tsx"],"names":["React","LabelPrimitive","jsx","Label","className","props","ref","cn"],"mappings":"yCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,wBAW9B,cAAAC,MAAA,oBADF,IAAMC,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACjFJ,EAAgB,OAAf,CACC,IAAKI,EACL,UAAWC,EACT,8FACAH,CACF,EACC,GAAGC,EACN,CACD,EAEDF,EAAM,YAA6B,OAAK","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Label\n * -------------------------------------------------------------------------- */\n\ntype LabelElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst Label = React.forwardRef<LabelElement, LabelProps>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(\n 'text-sm font-medium leading-none peer-disabled:pointer-events-none peer-disabled:opacity-70',\n className,\n )}\n {...props}\n />\n));\n\nLabel.displayName = LabelPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Label, type LabelProps };\n"]}
@@ -1,2 +0,0 @@
1
- import{a as r}from"./chunk-5UXVZTFG.js";import*as a from"react";import{CaretSortIcon as S,CheckIcon as d,ChevronDownIcon as f,ChevronUpIcon as P}from"@radix-ui/react-icons";import*as e from"@radix-ui/react-select";import{jsx as t,jsxs as p}from"react/jsx-runtime";var h=e.Root,C=e.Group,N=e.Value,u=a.forwardRef(({children:i,className:l,...o},c)=>p(e.Trigger,{ref:c,className:r("border-input placeholder:text-muted-foreground flex h-10 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:truncate",l),...o,children:[i,t(e.Icon,{asChild:!0,children:t(S,{className:"size-4 opacity-50"})})]}));u.displayName=e.Trigger.displayName;var n=a.forwardRef(({className:i,...l},o)=>t(e.ScrollUpButton,{ref:o,className:r("flex cursor-pointer items-center justify-center py-1",i),...l,children:t(P,{})}));n.displayName=e.ScrollUpButton.displayName;var s=a.forwardRef(({className:i,...l},o)=>t(e.ScrollDownButton,{ref:o,className:r("flex cursor-pointer items-center justify-center py-1",i),...l,children:t(f,{})}));s.displayName=e.ScrollDownButton.displayName;var y=a.forwardRef(({children:i,className:l,position:o="popper",...c},m)=>t(e.Portal,{children:p(e.Content,{ref:m,className:r("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",l),position:o,...c,children:[t(n,{}),t(e.Viewport,{className:r("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),t(s,{})]})}));y.displayName=e.Content.displayName;var v=a.forwardRef(({className:i,...l},o)=>t(e.Label,{ref:o,className:r("px-2 py-1.5 text-sm font-semibold",i),...l}));v.displayName=e.Label.displayName;var R=a.forwardRef(({children:i,className:l,...o},c)=>p(e.Item,{ref:c,className:r("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",l),...o,children:[t("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t(e.ItemIndicator,{children:t(d,{className:"size-4"})})}),t(e.ItemText,{children:i})]}));R.displayName=e.Item.displayName;var g=a.forwardRef(({className:i,...l},o)=>t(e.Separator,{ref:o,className:r("bg-muted -mx-1 my-1 h-px",i),...l}));g.displayName=e.Separator.displayName;export{h as a,C as b,N as c,u as d,n as e,s as f,y as g,v as h,R as i,g as j};
2
- //# sourceMappingURL=chunk-7CHCTEST.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Select\n * -------------------------------------------------------------------------- */\n\ntype SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>;\nconst Select = SelectPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectGroup\n * -------------------------------------------------------------------------- */\n\ntype SelectGroupProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;\nconst SelectGroup = SelectPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectValue\n * -------------------------------------------------------------------------- */\n\ntype SelectValueProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>;\nconst SelectValue = SelectPrimitive.Value;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectTrigger\n * -------------------------------------------------------------------------- */\n\ntype SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;\ntype SelectTriggerProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>;\n\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n ({ children, className, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'border-input placeholder:text-muted-foreground flex h-10 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:truncate',\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretSortIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\n\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollUpButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollUpButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollUpButton>;\ntype SelectScrollUpButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>;\n\nconst SelectScrollUpButton = React.forwardRef<SelectScrollUpButtonElement, SelectScrollUpButtonProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-pointer items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n ),\n);\n\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollDownButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollDownButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollDownButton>;\ntype SelectScrollDownButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>;\n\nconst SelectScrollDownButton = React.forwardRef<SelectScrollDownButtonElement, SelectScrollDownButtonProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-pointer items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n ),\n);\n\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectContent\n * -------------------------------------------------------------------------- */\n\ntype SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;\ntype SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>;\n\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n ({ children, className, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\n\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectLabel\n * -------------------------------------------------------------------------- */\n\ntype SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;\ntype SelectLabelProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>;\n\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label ref={ref} className={cn('px-2 py-1.5 text-sm font-semibold', className)} {...props} />\n));\n\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectItem\n * -------------------------------------------------------------------------- */\n\ntype SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;\ntype SelectItemProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>;\n\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>(({ children, className, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\n\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectSeparator\n * -------------------------------------------------------------------------- */\n\ntype SelectSeparatorElement = React.ElementRef<typeof SelectPrimitive.Separator>;\ntype SelectSeparatorProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>;\n\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n ),\n);\n\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n type SelectProps,\n type SelectGroupProps,\n type SelectValueProps,\n type SelectTriggerProps,\n type SelectContentProps,\n type SelectLabelProps,\n type SelectItemProps,\n type SelectSeparatorProps,\n type SelectScrollUpButtonProps,\n type SelectScrollDownButtonProps,\n};\n"],"mappings":"wCAEA,UAAYA,MAAW,QACvB,OAAS,iBAAAC,EAAe,aAAAC,EAAW,mBAAAC,EAAiB,iBAAAC,MAAqB,wBACzE,UAAYC,MAAqB,yBAiC7B,OAUI,OAAAC,EAVJ,QAAAC,MAAA,oBAzBJ,IAAMC,EAAyB,OAOzBC,EAA8B,QAO9BC,EAA8B,QAS9BC,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClCR,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,oVACAH,CACF,EACC,GAAGC,EAEH,UAAAF,EACDN,EAAiB,OAAhB,CAAqB,QAAO,GAC3B,SAAAA,EAACW,EAAA,CAAc,UAAU,oBAAoB,EAC/C,GACF,CAEJ,EAEAN,EAAc,YAA8B,UAAQ,YASpD,IAAMO,EAA6B,aACjC,CAAC,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,iBAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,uDAAwDH,CAAS,EAC9E,GAAGC,EAEJ,SAAAR,EAACa,EAAA,EAAc,EACjB,CAEJ,EAEAD,EAAqB,YAA8B,iBAAe,YASlE,IAAME,EAA+B,aACnC,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,mBAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,uDAAwDH,CAAS,EAC9E,GAAGC,EAEJ,SAAAR,EAACe,EAAA,EAAgB,EACnB,CAEJ,EAEAD,EAAuB,YAA8B,mBAAiB,YAStE,IAAME,EAAsB,aAC1B,CAAC,CAAE,SAAAV,EAAU,UAAAC,EAAW,SAAAU,EAAW,SAAU,GAAGT,CAAM,EAAGC,IACvDT,EAAiB,SAAhB,CACC,SAAAC,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,8uBACAO,IAAa,UACX,kIACFV,CACF,EACA,SAAUU,EACT,GAAGT,EAEJ,UAAAR,EAACY,EAAA,EAAqB,EACtBZ,EAAiB,WAAhB,CACC,UAAWU,EACT,MACAO,IAAa,UACX,yFACJ,EAEC,SAAAX,EACH,EACAN,EAACc,EAAA,EAAuB,GAC1B,EACF,CAEJ,EAEAE,EAAc,YAA8B,UAAQ,YASpD,IAAME,EAAoB,aAAiD,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACnGT,EAAiB,QAAhB,CAAsB,IAAKS,EAAK,UAAWC,EAAG,oCAAqCH,CAAS,EAAI,GAAGC,EAAO,CAC5G,EAEDU,EAAY,YAA8B,QAAM,YAShD,IAAMC,EAAmB,aAA+C,CAAC,CAAE,SAAAb,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1GR,EAAiB,OAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,8NACAH,CACF,EACC,GAAGC,EAEJ,UAAAR,EAAC,QAAK,UAAU,6DACd,SAAAA,EAAiB,gBAAhB,CACC,SAAAA,EAACoB,EAAA,CAAU,UAAU,SAAS,EAChC,EACF,EACApB,EAAiB,WAAhB,CAA0B,SAAAM,EAAS,GACtC,CACD,EAEDa,EAAW,YAA8B,OAAK,YAS9C,IAAME,EAAwB,aAC5B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,YAAhB,CAA0B,IAAKS,EAAK,UAAWC,EAAG,2BAA4BH,CAAS,EAAI,GAAGC,EAAO,CAE1G,EAEAa,EAAgB,YAA8B,YAAU","names":["React","CaretSortIcon","CheckIcon","ChevronDownIcon","ChevronUpIcon","SelectPrimitive","jsx","jsxs","Select","SelectGroup","SelectValue","SelectTrigger","children","className","props","ref","cn","CaretSortIcon","SelectScrollUpButton","ChevronUpIcon","SelectScrollDownButton","ChevronDownIcon","SelectContent","position","SelectLabel","SelectItem","CheckIcon","SelectSeparator"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/spinner.tsx"],"sourcesContent":["import * as React from 'react';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Spinner\n * -------------------------------------------------------------------------- */\n\nconst spinnerCount = 8;\n\ntype SpinnerElement = HTMLSpanElement;\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {\n loading?: boolean;\n}\n\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>(\n ({ children, className, loading = true, ...props }, ref) => {\n if (!loading) {\n return children;\n }\n\n const spinner = (\n <span\n ref={ref}\n className={cn('relative flex size-4 items-center justify-center opacity-60', className)}\n {...props}\n >\n {Array.from({ length: spinnerCount }, (_, i) => (\n <span\n key={i}\n className=\"before:fade-out-25 before:animate-out before:animate-repeat-infinite before:animate-delay-[var(--spinner-delay)] before:animate-duration-[var(--spinner-duration)] absolute h-full rotate-[var(--spinner-rotate)] before:block before:h-1/3 before:w-full before:rounded-full before:bg-current\"\n style={\n {\n width: `${(100 / spinnerCount).toString()}%`,\n '--spinner-delay': `-${((spinnerCount - i) * 100).toString()}ms`,\n '--spinner-rotate': `${((360 / spinnerCount) * i).toString()}deg`,\n '--spinner-duration': `${(spinnerCount * 100).toString()}ms`,\n } as React.CSSProperties\n }\n />\n ))}\n </span>\n );\n\n if (children === undefined) {\n return spinner;\n }\n\n return (\n <span className=\"relative\">\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">{spinner}</span>\n </span>\n );\n },\n);\n\nSpinner.displayName = 'Spinner';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Spinner, type SpinnerProps };\n"],"mappings":"wCAAA,UAAYA,MAAW,QACvB,OAAS,kBAAAC,MAAsB,kCA4BrB,cAAAC,EAqBJ,QAAAC,MArBI,oBArBV,IAAMC,EAAe,EAQfC,EAAgB,aACpB,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAU,GAAM,GAAGC,CAAM,EAAGC,IAAQ,CAC1D,GAAI,CAACF,EACH,OAAOF,EAGT,IAAMK,EACJT,EAAC,QACC,IAAKQ,EACL,UAAWE,EAAG,8DAA+DL,CAAS,EACrF,GAAGE,EAEH,eAAM,KAAK,CAAE,OAAQL,CAAa,EAAG,CAACS,EAAGC,IACxCZ,EAAC,QAEC,UAAU,kSACV,MACE,CACE,MAAO,IAAI,IAAME,GAAc,SAAS,CAAC,IACzC,kBAAmB,MAAMA,EAAeU,GAAK,KAAK,SAAS,CAAC,KAC5D,mBAAoB,IAAK,IAAMV,EAAgBU,GAAG,SAAS,CAAC,MAC5D,qBAAsB,IAAIV,EAAe,KAAK,SAAS,CAAC,IAC1D,GARGU,CAUP,CACD,EACH,EAGF,OAAIR,IAAa,OACRK,EAIPR,EAAC,QAAK,UAAU,WACd,UAAAD,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAI,EACH,EACAJ,EAACa,EAAA,CAAgB,SAAAT,EAAS,EAC1BJ,EAAC,QAAK,UAAU,oDAAqD,SAAAS,EAAQ,GAC/E,CAEJ,CACF,EAEAN,EAAQ,YAAc","names":["React","VisuallyHidden","jsx","jsxs","spinnerCount","Spinner","children","className","loading","props","ref","spinner","cn","_","i","VisuallyHidden"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/spinner.tsx"],"names":["React","VisuallyHidden","jsx","jsxs","spinnerCount","Spinner","children","className","loading","props","ref","spinner","cn","_","i"],"mappings":"yCAAA,UAAYA,MAAW,QACvB,OAAS,kBAAAC,MAAsB,kCA4BrB,cAAAC,EAqBJ,QAAAC,MArBI,oBArBV,IAAMC,EAAe,EAQfC,EAAgB,aACpB,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAU,GAAM,GAAGC,CAAM,EAAGC,IAAQ,CAC1D,GAAI,CAACF,EACH,OAAOF,EAGT,IAAMK,EACJT,EAAC,QACC,IAAKQ,EACL,UAAWE,EAAG,8DAA+DL,CAAS,EACrF,GAAGE,EAEH,eAAM,KAAK,CAAE,OAAQL,CAAa,EAAG,CAACS,EAAGC,IACxCZ,EAAC,QAEC,UAAU,kSACV,MACE,CACE,MAAO,IAAI,IAAME,GAAc,SAAS,CAAC,IACzC,kBAAmB,MAAMA,EAAeU,GAAK,KAAK,SAAS,CAAC,KAC5D,mBAAoB,IAAK,IAAMV,EAAgBU,GAAG,SAAS,CAAC,MAC5D,qBAAsB,IAAIV,EAAe,KAAK,SAAS,CAAC,IAC1D,GARGU,CAUP,CACD,EACH,EAGF,OAAIR,IAAa,OACRK,EAIPR,EAAC,QAAK,UAAU,WACd,UAAAD,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAI,EACH,EACAJ,EAACD,EAAA,CAAgB,SAAAK,EAAS,EAC1BJ,EAAC,QAAK,UAAU,oDAAqD,SAAAS,EAAQ,GAC/E,CAEJ,CACF,EAEAN,EAAQ,YAAc","sourcesContent":["import * as React from 'react';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Spinner\n * -------------------------------------------------------------------------- */\n\nconst spinnerCount = 8;\n\ntype SpinnerElement = HTMLSpanElement;\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {\n loading?: boolean;\n}\n\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>(\n ({ children, className, loading = true, ...props }, ref) => {\n if (!loading) {\n return children;\n }\n\n const spinner = (\n <span\n ref={ref}\n className={cn('relative flex size-4 items-center justify-center opacity-60', className)}\n {...props}\n >\n {Array.from({ length: spinnerCount }, (_, i) => (\n <span\n key={i}\n className=\"before:fade-out-25 before:animate-out before:animate-repeat-infinite before:animate-delay-[var(--spinner-delay)] before:animate-duration-[var(--spinner-duration)] absolute h-full rotate-[var(--spinner-rotate)] before:block before:h-1/3 before:w-full before:rounded-full before:bg-current\"\n style={\n {\n width: `${(100 / spinnerCount).toString()}%`,\n '--spinner-delay': `-${((spinnerCount - i) * 100).toString()}ms`,\n '--spinner-rotate': `${((360 / spinnerCount) * i).toString()}deg`,\n '--spinner-duration': `${(spinnerCount * 100).toString()}ms`,\n } as React.CSSProperties\n }\n />\n ))}\n </span>\n );\n\n if (children === undefined) {\n return spinner;\n }\n\n return (\n <span className=\"relative\">\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">{spinner}</span>\n </span>\n );\n },\n);\n\nSpinner.displayName = 'Spinner';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Spinner, type SpinnerProps };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenu\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>;\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSub\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub>;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\n\ninterface DropdownMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<DropdownMenuSubTriggerElement, DropdownMenuSubTriggerProps>(\n ({ children, className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent data-[state=open]:bg-accent flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n ),\n);\n\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubContentProps = DropdownMenuPrimitive.DropdownMenuSubContentProps;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n DropdownMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\n\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ntype DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;\n\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n ({ className, sideOffset = 6, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n ),\n);\n\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\n\ninterface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n ({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<DropdownMenuCheckboxItemElement, DropdownMenuCheckboxItemProps>(\n ({ children, className, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n ),\n);\n\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>;\n\nconst DropdownMenuRadioItem = React.forwardRef<DropdownMenuRadioItemElement, DropdownMenuRadioItemProps>(\n ({ children, className, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n ),\n);\n\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\n\ninterface DropdownMenuLabelProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ntype DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>;\n\nconst DropdownMenuSeparator = React.forwardRef<DropdownMenuSeparatorElement, DropdownMenuSeparatorProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n ),\n);\n\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n type DropdownMenuProps,\n type DropdownMenuTriggerProps,\n type DropdownMenuContentProps,\n type DropdownMenuItemProps,\n type DropdownMenuCheckboxItemProps,\n type DropdownMenuRadioItemProps,\n type DropdownMenuLabelProps,\n type DropdownMenuSeparatorProps,\n type DropdownMenuShortcutProps,\n type DropdownMenuGroupProps,\n type DropdownMenuSubProps,\n type DropdownMenuSubContentProps,\n type DropdownMenuSubTriggerProps,\n type DropdownMenuRadioGroupProps,\n};\n"],"mappings":"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","names":["React","DropdownMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","children","className","inset","props","ref","cn","ChevronRightIcon","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","CheckIcon","DropdownMenuRadioItem","DotFilledIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/dropdown-menu.tsx"],"names":["React","DropdownMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","children","className","inset","props","ref","cn","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":"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","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenu\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>;\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSub\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub>;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\n\ninterface DropdownMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<DropdownMenuSubTriggerElement, DropdownMenuSubTriggerProps>(\n ({ children, className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent data-[state=open]:bg-accent flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n ),\n);\n\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubContentProps = DropdownMenuPrimitive.DropdownMenuSubContentProps;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n DropdownMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\n\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ntype DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;\n\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n ({ className, sideOffset = 6, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n ),\n);\n\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\n\ninterface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n ({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<DropdownMenuCheckboxItemElement, DropdownMenuCheckboxItemProps>(\n ({ children, className, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n ),\n);\n\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>;\n\nconst DropdownMenuRadioItem = React.forwardRef<DropdownMenuRadioItemElement, DropdownMenuRadioItemProps>(\n ({ children, className, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n ),\n);\n\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\n\ninterface DropdownMenuLabelProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ntype DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>;\n\nconst DropdownMenuSeparator = React.forwardRef<DropdownMenuSeparatorElement, DropdownMenuSeparatorProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n ),\n);\n\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n type DropdownMenuProps,\n type DropdownMenuTriggerProps,\n type DropdownMenuContentProps,\n type DropdownMenuItemProps,\n type DropdownMenuCheckboxItemProps,\n type DropdownMenuRadioItemProps,\n type DropdownMenuLabelProps,\n type DropdownMenuSeparatorProps,\n type DropdownMenuShortcutProps,\n type DropdownMenuGroupProps,\n type DropdownMenuSubProps,\n type DropdownMenuSubContentProps,\n type DropdownMenuSubTriggerProps,\n type DropdownMenuRadioGroupProps,\n};\n"]}
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-5UXVZTFG.js";import*as r from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as p}from"@radix-ui/react-icons";import{jsx as i,jsxs as s}from"react/jsx-runtime";var f=e.Root,P=e.Trigger,y=e.Close,m=r.forwardRef(({children:t,className:o,...l},n)=>i(e.Portal,{children:i(e.Overlay,{className:"data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8",children:s(e.Content,{ref:n,className:a("bg-background data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out relative z-50 flex w-full max-w-lg origin-top flex-col rounded-lg border shadow-lg",o),...l,children:[t,s(e.Close,{className:"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[i(p,{className:"size-4"}),i("span",{className:"sr-only",children:"Close"})]})]})})}));m.displayName=e.Content.displayName;function u({className:t,...o}){return i("header",{className:a("flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function v({className:t,...o}){return i("main",{className:a("overflow-auto px-6 py-2",t),...o})}function R({className:t,...o}){return i("footer",{className:a("flex shrink-0 flex-col-reverse px-6 pb-6 pt-4 sm:flex-row sm:justify-end sm:space-x-2",t),...o})}var g=r.forwardRef(({className:t,...o},l)=>i(e.Title,{ref:l,className:a("text-lg font-semibold leading-none tracking-tight",t),...o}));g.displayName=e.Title.displayName;var D=r.forwardRef(({className:t,...o},l)=>i(e.Description,{ref:l,className:a("text-muted-foreground text-sm",t),...o}));D.displayName=e.Description.displayName;export{f as a,P as b,y as c,m as d,u as e,v as f,R as g,g as h,D as i};
2
- //# sourceMappingURL=chunk-SHMTOJHM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Dialog\n * -------------------------------------------------------------------------- */\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root>;\nconst Dialog = DialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\nconst DialogTrigger = DialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogClose\n * -------------------------------------------------------------------------- */\n\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\nconst DialogClose = DialogPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogContent\n * -------------------------------------------------------------------------- */\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n ({ children, className, ...props }, ref) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className=\"data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8\">\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 data-[state=open]:animate-duration-200 data-[state=closed]:animate-duration-200 data-[state=open]:fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out relative z-50 flex w-full max-w-lg origin-top flex-col rounded-lg border shadow-lg',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Overlay>\n </DialogPrimitive.Portal>\n ),\n);\n\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogHeader\n * -------------------------------------------------------------------------- */\n\ntype DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogBody\n * -------------------------------------------------------------------------- */\n\ntype DialogBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogBody({ className, ...props }: DialogFooterProps): React.JSX.Element {\n return <main className={cn('overflow-auto px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogFooter\n * -------------------------------------------------------------------------- */\n\ntype DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse px-6 pb-6 pt-4 sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTitle\n * -------------------------------------------------------------------------- */\n\ntype DialogTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogDescription\n * -------------------------------------------------------------------------- */\n\ntype DialogDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\n\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Dialog,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogBody,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n type DialogProps,\n type DialogTriggerProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogHeaderProps,\n type DialogBodyProps,\n type DialogFooterProps,\n type DialogTitleProps,\n type DialogDescriptionProps,\n};\n"],"mappings":"mCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,wBA4CjB,OACE,OAAAC,EADF,QAAAC,MAAA,oBApCV,IAAMC,EAAyB,OAOzBC,EAAgC,UAOhCC,EAA8B,QAS9BC,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClCT,EAAiB,SAAhB,CACC,SAAAA,EAAiB,UAAhB,CAAwB,UAAU,mPACjC,SAAAC,EAAiB,UAAhB,CACC,IAAKQ,EACL,UAAWC,EACT,oWACAH,CACF,EACC,GAAGC,EAEH,UAAAF,EACDL,EAAiB,QAAhB,CAAsB,UAAU,8PAC/B,UAAAD,EAACW,EAAA,CAAW,UAAU,SAAS,EAC/BX,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,EACF,EACF,CAEJ,EAEAK,EAAc,YAA8B,UAAQ,YAQpD,SAASO,EAAa,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAyC,CACnF,OACER,EAAC,UACC,UAAWU,EAAG,yEAA0EH,CAAS,EAChG,GAAGC,EACN,CAEJ,CAQA,SAASK,EAAW,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAyC,CACjF,OAAOR,EAAC,QAAK,UAAWU,EAAG,0BAA2BH,CAAS,EAAI,GAAGC,EAAO,CAC/E,CAQA,SAASM,EAAa,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAyC,CACnF,OACER,EAAC,UACC,UAAWU,EAAG,wFAAyFH,CAAS,EAC/G,GAAGC,EACN,CAEJ,CASA,IAAMO,EAAoB,aAAiD,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACnGT,EAAiB,QAAhB,CACC,IAAKS,EACL,UAAWC,EAAG,oDAAqDH,CAAS,EAC3E,GAAGC,EACN,CACD,EAEDO,EAAY,YAA8B,QAAM,YAShD,IAAMC,EAA0B,aAC9B,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,cAAhB,CAA4B,IAAKS,EAAK,UAAWC,EAAG,gCAAiCH,CAAS,EAAI,GAAGC,EAAO,CAEjH,EAEAQ,EAAkB,YAA8B,cAAY","names":["React","DialogPrimitive","Cross2Icon","jsx","jsxs","Dialog","DialogTrigger","DialogClose","DialogContent","children","className","props","ref","cn","Cross2Icon","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/checkbox-group.primitive.tsx"],"names":["React","CheckboxPrimitive","createCheckboxScope","createContextScope","RovingFocusGroup","createRovingFocusGroupScope","useControllableState","useDirection","Primitive","jsx","CHECKBOX_GROUP_NAME","createCheckboxGroupContext","createCheckboxGroupScope","useRovingFocusGroupScope","useCheckboxScope","CheckboxGroupProvider","useCheckboxGroupContext","CheckboxGroup","__scopeCheckboxGroup","name","defaultValue","valueProp","required","disabled","orientation","dir","loop","onValueChange","props","ref","rovingFocusGroupScope","direction","value","setValue","handleItemCheck","itemValue","prevValue","handleItemUncheck","val","ITEM_NAME","CheckboxGroupItem","context","isDisabled","checkboxScope","checked","checkedState","INDICATOR_NAME","CheckboxGroupIndicator","Root","Item","Indicator"],"mappings":"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","sourcesContent":["import * as React from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { createCheckboxScope } from '@radix-ui/react-checkbox';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Scope };\n\nconst [createCheckboxGroupContext, createCheckboxGroupScope] = createContextScope(CHECKBOX_GROUP_NAME, [\n createRovingFocusGroupScope,\n createCheckboxScope,\n]);\n\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\nconst useCheckboxScope = createCheckboxScope();\n\ninterface CheckboxGroupContextValue {\n disabled: boolean;\n onItemCheck: (value: string) => void;\n onItemUncheck: (value: string) => void;\n required: boolean;\n name?: string;\n value?: string[];\n}\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;\n\ninterface CheckboxGroupProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {\n defaultValue?: string[];\n dir?: RovingFocusGroup.RovingFocusGroupProps['dir'];\n disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];\n loop?: RovingFocusGroup.RovingFocusGroupProps['loop'];\n name?: CheckboxGroupContextValue['name'];\n onValueChange?: (value: string[]) => void;\n orientation?: RovingFocusGroup.RovingFocusGroupProps['orientation'];\n required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];\n value?: CheckboxGroupContextValue['value'];\n}\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (\n {\n __scopeCheckboxGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation,\n dir,\n loop = true,\n onValueChange,\n ...props\n }: ScopedProps<CheckboxGroupProps>,\n ref,\n ) => {\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeCheckboxGroup);\n const direction = useDirection(dir);\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => {\n setValue((prevValue = []) => [...prevValue, itemValue]);\n },\n [setValue],\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) => {\n setValue((prevValue = []) => prevValue.filter((val) => val !== itemValue));\n },\n [setValue],\n );\n\n return (\n <CheckboxGroupProvider\n disabled={disabled}\n name={name}\n required={required}\n scope={__scopeCheckboxGroup}\n value={value}\n onItemCheck={handleItemCheck}\n onItemUncheck={handleItemUncheck}\n >\n <RovingFocusGroup.Root asChild {...rovingFocusGroupScope} dir={direction} loop={loop} orientation={orientation}>\n {/* eslint-disable-next-line react/jsx-pascal-case -- radix-ui */}\n <Primitive.div ref={ref} data-disabled={disabled ? '' : undefined} dir={direction} role=\"group\" {...props} />\n </RovingFocusGroup.Root>\n </CheckboxGroupProvider>\n );\n },\n);\n\nCheckboxGroup.displayName = CHECKBOX_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = `${CHECKBOX_GROUP_NAME}Item`;\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\n\ninterface CheckboxGroupItemProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n 'checked' | 'defaultChecked' | 'onCheckedChange' | 'name'\n > {\n value: string;\n}\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ __scopeCheckboxGroup, disabled, ...props }: ScopedProps<CheckboxGroupItemProps>, ref) => {\n const context = useCheckboxGroupContext(ITEM_NAME, __scopeCheckboxGroup);\n const isDisabled = context.disabled || disabled;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeCheckboxGroup);\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n const checked = context.value?.includes(props.value);\n\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} active={checked} focusable={!isDisabled}>\n <CheckboxPrimitive.Root\n ref={ref}\n checked={checked}\n disabled={isDisabled}\n name={context.name}\n required={context.required}\n {...checkboxScope}\n {...props}\n onCheckedChange={(checkedState) => {\n if (checkedState) {\n context.onItemCheck(props.value);\n } else {\n context.onItemUncheck(props.value);\n }\n }}\n />\n </RovingFocusGroup.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Component: CheckboxGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = `${CHECKBOX_GROUP_NAME}Indicator`;\n\ntype CheckboxGroupIndicatorElement = React.ElementRef<typeof CheckboxPrimitive.Indicator>;\ntype CheckboxGroupIndicatorProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Indicator>;\n\nconst CheckboxGroupIndicator = React.forwardRef<CheckboxGroupIndicatorElement, CheckboxGroupIndicatorProps>(\n ({ __scopeCheckboxGroup, ...props }: ScopedProps<CheckboxGroupIndicatorProps>, ref) => {\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n\n return <CheckboxPrimitive.Indicator ref={ref} {...checkboxScope} {...props} />;\n },\n);\n\nCheckboxGroupIndicator.displayName = INDICATOR_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nconst Root = CheckboxGroup;\nconst Item = CheckboxGroupItem;\nconst Indicator = CheckboxGroupIndicator;\n\nexport {\n createCheckboxGroupScope,\n CheckboxGroup,\n CheckboxGroupItem,\n CheckboxGroupIndicator,\n Root,\n Item,\n Indicator,\n type CheckboxGroupProps,\n type CheckboxGroupItemProps,\n type CheckboxGroupIndicatorProps,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Label\n * -------------------------------------------------------------------------- */\n\ntype LabelElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst Label = React.forwardRef<LabelElement, LabelProps>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(\n 'text-sm font-medium leading-none peer-disabled:pointer-events-none peer-disabled:opacity-70',\n className,\n )}\n {...props}\n />\n));\n\nLabel.displayName = LabelPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Label, type LabelProps };\n"],"mappings":"wCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,wBAW9B,cAAAC,MAAA,oBADF,IAAMC,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACjFJ,EAAgB,OAAf,CACC,IAAKI,EACL,UAAWC,EACT,8FACAH,CACF,EACC,GAAGC,EACN,CACD,EAEDF,EAAM,YAA6B,OAAK","names":["React","LabelPrimitive","jsx","Label","className","props","ref","cn"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/toggle.tsx"],"names":["React","TogglePrimitive","tv","jsx","toggleVariants","Toggle","className","variant","size","props","ref"],"mappings":"AAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,MAAAC,MAA6B,oBAmCpC,cAAAC,MAAA,oBA7BF,IAAMC,EAAiBF,EAAG,CACxB,KAAM,8TACN,SAAU,CACR,QAAS,CACP,QAAS,iBACT,QAAS,2FACX,EACA,KAAM,CACJ,QAAS,YACT,GAAI,aACJ,GAAI,WACN,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CAAC,EAWKG,EAAe,aAAuC,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,GAAGC,CAAM,EAAGC,IACnGP,EAAiB,OAAhB,CAAqB,IAAKO,EAAK,UAAWN,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,EAAI,GAAGG,EAAO,CACrG,EAEDJ,EAAO,YAA8B,OAAK","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { tv, type VariantProps } from 'tailwind-variants';\n\n/* -----------------------------------------------------------------------------\n * Variant: Toggle\n * -------------------------------------------------------------------------- */\n\nconst toggleVariants = tv({\n base: 'hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n default: 'bg-transparent',\n outline: 'border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-sm',\n },\n size: {\n default: 'h-10 px-3',\n sm: 'h-9 px-2.5',\n lg: 'h-11 px-5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\ntype ToggleVariantsProps = VariantProps<typeof toggleVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Toggle\n * -------------------------------------------------------------------------- */\n\ntype ToggleElement = React.ElementRef<typeof TogglePrimitive.Root>;\ntype ToggleProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> & ToggleVariantsProps;\n\nconst Toggle = React.forwardRef<ToggleElement, ToggleProps>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root ref={ref} className={toggleVariants({ variant, size, className })} {...props} />\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Toggle, toggleVariants, type ToggleProps, type ToggleVariantsProps };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/checkbox-group.primitive.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { createCheckboxScope } from '@radix-ui/react-checkbox';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Scope };\n\nconst [createCheckboxGroupContext, createCheckboxGroupScope] = createContextScope(CHECKBOX_GROUP_NAME, [\n createRovingFocusGroupScope,\n createCheckboxScope,\n]);\n\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\nconst useCheckboxScope = createCheckboxScope();\n\ninterface CheckboxGroupContextValue {\n disabled: boolean;\n onItemCheck: (value: string) => void;\n onItemUncheck: (value: string) => void;\n required: boolean;\n name?: string;\n value?: string[];\n}\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;\n\ninterface CheckboxGroupProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {\n defaultValue?: string[];\n dir?: RovingFocusGroup.RovingFocusGroupProps['dir'];\n disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];\n loop?: RovingFocusGroup.RovingFocusGroupProps['loop'];\n name?: CheckboxGroupContextValue['name'];\n onValueChange?: (value: string[]) => void;\n orientation?: RovingFocusGroup.RovingFocusGroupProps['orientation'];\n required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];\n value?: CheckboxGroupContextValue['value'];\n}\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (\n {\n __scopeCheckboxGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation,\n dir,\n loop = true,\n onValueChange,\n ...props\n }: ScopedProps<CheckboxGroupProps>,\n ref,\n ) => {\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeCheckboxGroup);\n const direction = useDirection(dir);\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => {\n setValue((prevValue = []) => [...prevValue, itemValue]);\n },\n [setValue],\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) => {\n setValue((prevValue = []) => prevValue.filter((val) => val !== itemValue));\n },\n [setValue],\n );\n\n return (\n <CheckboxGroupProvider\n disabled={disabled}\n name={name}\n required={required}\n scope={__scopeCheckboxGroup}\n value={value}\n onItemCheck={handleItemCheck}\n onItemUncheck={handleItemUncheck}\n >\n <RovingFocusGroup.Root asChild {...rovingFocusGroupScope} dir={direction} loop={loop} orientation={orientation}>\n {/* eslint-disable-next-line react/jsx-pascal-case -- radix-ui */}\n <Primitive.div ref={ref} data-disabled={disabled ? '' : undefined} dir={direction} role=\"group\" {...props} />\n </RovingFocusGroup.Root>\n </CheckboxGroupProvider>\n );\n },\n);\n\nCheckboxGroup.displayName = CHECKBOX_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = `${CHECKBOX_GROUP_NAME}Item`;\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\n\ninterface CheckboxGroupItemProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n 'checked' | 'defaultChecked' | 'onCheckedChange' | 'name'\n > {\n value: string;\n}\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ __scopeCheckboxGroup, disabled, ...props }: ScopedProps<CheckboxGroupItemProps>, ref) => {\n const context = useCheckboxGroupContext(ITEM_NAME, __scopeCheckboxGroup);\n const isDisabled = context.disabled || disabled;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeCheckboxGroup);\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n const checked = context.value?.includes(props.value);\n\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} active={checked} focusable={!isDisabled}>\n <CheckboxPrimitive.Root\n ref={ref}\n checked={checked}\n disabled={isDisabled}\n name={context.name}\n required={context.required}\n {...checkboxScope}\n {...props}\n onCheckedChange={(checkedState) => {\n if (checkedState) {\n context.onItemCheck(props.value);\n } else {\n context.onItemUncheck(props.value);\n }\n }}\n />\n </RovingFocusGroup.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Component: CheckboxGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = `${CHECKBOX_GROUP_NAME}Indicator`;\n\ntype CheckboxGroupIndicatorElement = React.ElementRef<typeof CheckboxPrimitive.Indicator>;\ntype CheckboxGroupIndicatorProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Indicator>;\n\nconst CheckboxGroupIndicator = React.forwardRef<CheckboxGroupIndicatorElement, CheckboxGroupIndicatorProps>(\n ({ __scopeCheckboxGroup, ...props }: ScopedProps<CheckboxGroupIndicatorProps>, ref) => {\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n\n return <CheckboxPrimitive.Indicator ref={ref} {...checkboxScope} {...props} />;\n },\n);\n\nCheckboxGroupIndicator.displayName = INDICATOR_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nconst Root = CheckboxGroup;\nconst Item = CheckboxGroupItem;\nconst Indicator = CheckboxGroupIndicator;\n\nexport {\n createCheckboxGroupScope,\n CheckboxGroup,\n CheckboxGroupItem,\n CheckboxGroupIndicator,\n Root,\n Item,\n Indicator,\n type CheckboxGroupProps,\n type CheckboxGroupItemProps,\n type CheckboxGroupIndicatorProps,\n};\n"],"mappings":"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","names":["React","CheckboxPrimitive","createCheckboxScope","createContextScope","RovingFocusGroup","createRovingFocusGroupScope","useControllableState","useDirection","Primitive","jsx","CHECKBOX_GROUP_NAME","createCheckboxGroupContext","createCheckboxGroupScope","useRovingFocusGroupScope","useCheckboxScope","CheckboxGroupProvider","useCheckboxGroupContext","CheckboxGroup","__scopeCheckboxGroup","name","defaultValue","valueProp","required","disabled","orientation","dir","loop","onValueChange","props","ref","rovingFocusGroupScope","direction","value","setValue","handleItemCheck","itemValue","prevValue","handleItemUncheck","val","ITEM_NAME","CheckboxGroupItem","context","isDisabled","checkboxScope","checked","checkedState","INDICATOR_NAME","CheckboxGroupIndicator","Root","Item","Indicator"]}