@codefast/ui 0.0.65 → 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 (266) 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-QEWITXOV.cjs → chunk-4MTN7WZ2.cjs} +1 -1
  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-RSNKUKY7.js → chunk-HDHZESSG.js} +1 -1
  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.js +1 -1
  42. package/dist/react/alert-dialog.js.map +1 -1
  43. package/dist/react/alert.cjs.map +1 -1
  44. package/dist/react/alert.js.map +1 -1
  45. package/dist/react/avatar.cjs.map +1 -1
  46. package/dist/react/avatar.js.map +1 -1
  47. package/dist/react/blockquote.cjs.map +1 -1
  48. package/dist/react/blockquote.js.map +1 -1
  49. package/dist/react/box.cjs.map +1 -1
  50. package/dist/react/box.js.map +1 -1
  51. package/dist/react/breadcrumb.cjs.map +1 -1
  52. package/dist/react/breadcrumb.js.map +1 -1
  53. package/dist/react/button.cjs +1 -1
  54. package/dist/react/button.js +1 -1
  55. package/dist/react/calendar.cjs +1 -1
  56. package/dist/react/calendar.js +1 -1
  57. package/dist/react/card.cjs.map +1 -1
  58. package/dist/react/card.js.map +1 -1
  59. package/dist/react/carousel.cjs +1 -1
  60. package/dist/react/carousel.cjs.map +1 -1
  61. package/dist/react/carousel.js +1 -1
  62. package/dist/react/carousel.js.map +1 -1
  63. package/dist/react/checkbox-cards.cjs +1 -1
  64. package/dist/react/checkbox-cards.cjs.map +1 -1
  65. package/dist/react/checkbox-cards.js +1 -1
  66. package/dist/react/checkbox-cards.js.map +1 -1
  67. package/dist/react/checkbox-group.cjs +1 -1
  68. package/dist/react/checkbox-group.cjs.map +1 -1
  69. package/dist/react/checkbox-group.js +1 -1
  70. package/dist/react/checkbox-group.js.map +1 -1
  71. package/dist/react/checkbox-group.primitive.cjs +1 -1
  72. package/dist/react/checkbox-group.primitive.js +1 -1
  73. package/dist/react/checkbox.cjs +1 -1
  74. package/dist/react/checkbox.cjs.map +1 -1
  75. package/dist/react/checkbox.js +1 -1
  76. package/dist/react/checkbox.js.map +1 -1
  77. package/dist/react/code.cjs.map +1 -1
  78. package/dist/react/code.js.map +1 -1
  79. package/dist/react/collapsible.cjs.map +1 -1
  80. package/dist/react/collapsible.js.map +1 -1
  81. package/dist/react/command.cjs +1 -1
  82. package/dist/react/command.cjs.map +1 -1
  83. package/dist/react/command.js +1 -1
  84. package/dist/react/command.js.map +1 -1
  85. package/dist/react/container.cjs.map +1 -1
  86. package/dist/react/container.js.map +1 -1
  87. package/dist/react/context-menu.cjs.map +1 -1
  88. package/dist/react/context-menu.js.map +1 -1
  89. package/dist/react/data-table.cjs +1 -1
  90. package/dist/react/data-table.js +1 -1
  91. package/dist/react/dialog.cjs +1 -1
  92. package/dist/react/dialog.js +1 -1
  93. package/dist/react/drawer.cjs.map +1 -1
  94. package/dist/react/drawer.js.map +1 -1
  95. package/dist/react/dropdown-menu.cjs +1 -1
  96. package/dist/react/dropdown-menu.js +1 -1
  97. package/dist/react/em.cjs.map +1 -1
  98. package/dist/react/em.js.map +1 -1
  99. package/dist/react/form.cjs +1 -1
  100. package/dist/react/form.cjs.map +1 -1
  101. package/dist/react/form.js +1 -1
  102. package/dist/react/form.js.map +1 -1
  103. package/dist/react/heading.cjs.map +1 -1
  104. package/dist/react/heading.js.map +1 -1
  105. package/dist/react/hover-card.cjs.map +1 -1
  106. package/dist/react/hover-card.js.map +1 -1
  107. package/dist/react/input-otp.cjs +1 -1
  108. package/dist/react/input-otp.cjs.map +1 -1
  109. package/dist/react/input-otp.js +1 -1
  110. package/dist/react/input-otp.js.map +1 -1
  111. package/dist/react/input.cjs +1 -1
  112. package/dist/react/input.cjs.map +1 -1
  113. package/dist/react/input.d.cts +113 -34
  114. package/dist/react/input.d.ts +113 -34
  115. package/dist/react/input.js +1 -1
  116. package/dist/react/input.js.map +1 -1
  117. package/dist/react/kbd.cjs.map +1 -1
  118. package/dist/react/kbd.js.map +1 -1
  119. package/dist/react/label.cjs +1 -1
  120. package/dist/react/label.js +1 -1
  121. package/dist/react/menubar.cjs.map +1 -1
  122. package/dist/react/menubar.js.map +1 -1
  123. package/dist/react/navigation-menu.cjs.map +1 -1
  124. package/dist/react/navigation-menu.js.map +1 -1
  125. package/dist/react/pagination.cjs +1 -1
  126. package/dist/react/pagination.cjs.map +1 -1
  127. package/dist/react/pagination.js +1 -1
  128. package/dist/react/pagination.js.map +1 -1
  129. package/dist/react/popover.cjs.map +1 -1
  130. package/dist/react/popover.js.map +1 -1
  131. package/dist/react/pre.cjs.map +1 -1
  132. package/dist/react/pre.js.map +1 -1
  133. package/dist/react/progress.cjs.map +1 -1
  134. package/dist/react/progress.js.map +1 -1
  135. package/dist/react/quote.cjs.map +1 -1
  136. package/dist/react/quote.js.map +1 -1
  137. package/dist/react/radio-cards.cjs +1 -1
  138. package/dist/react/radio-cards.cjs.map +1 -1
  139. package/dist/react/radio-cards.js +1 -1
  140. package/dist/react/radio-cards.js.map +1 -1
  141. package/dist/react/radio-group.cjs.map +1 -1
  142. package/dist/react/radio-group.js.map +1 -1
  143. package/dist/react/radio.cjs.map +1 -1
  144. package/dist/react/radio.js.map +1 -1
  145. package/dist/react/scroll-area.cjs.map +1 -1
  146. package/dist/react/scroll-area.js.map +1 -1
  147. package/dist/react/section.cjs.map +1 -1
  148. package/dist/react/section.js.map +1 -1
  149. package/dist/react/select.cjs +1 -1
  150. package/dist/react/select.js +1 -1
  151. package/dist/react/separator.cjs.map +1 -1
  152. package/dist/react/separator.js.map +1 -1
  153. package/dist/react/sheet.cjs.map +1 -1
  154. package/dist/react/sheet.js.map +1 -1
  155. package/dist/react/slider.cjs.map +1 -1
  156. package/dist/react/slider.js.map +1 -1
  157. package/dist/react/spinner.cjs +1 -1
  158. package/dist/react/spinner.js +1 -1
  159. package/dist/react/strong.cjs.map +1 -1
  160. package/dist/react/strong.js.map +1 -1
  161. package/dist/react/switch.cjs +1 -1
  162. package/dist/react/switch.cjs.map +1 -1
  163. package/dist/react/switch.js +1 -1
  164. package/dist/react/switch.js.map +1 -1
  165. package/dist/react/table.cjs.map +1 -1
  166. package/dist/react/table.js.map +1 -1
  167. package/dist/react/tabs.cjs.map +1 -1
  168. package/dist/react/tabs.js.map +1 -1
  169. package/dist/react/text-input.cjs +2 -0
  170. package/dist/react/text-input.cjs.map +1 -0
  171. package/dist/react/text-input.d.cts +11 -0
  172. package/dist/react/text-input.d.ts +11 -0
  173. package/dist/react/text-input.js +2 -0
  174. package/dist/react/text-input.js.map +1 -0
  175. package/dist/react/text.cjs.map +1 -1
  176. package/dist/react/text.js.map +1 -1
  177. package/dist/react/textarea.cjs +1 -1
  178. package/dist/react/textarea.cjs.map +1 -1
  179. package/dist/react/textarea.js +1 -1
  180. package/dist/react/textarea.js.map +1 -1
  181. package/dist/react/toggle-group.cjs +1 -1
  182. package/dist/react/toggle-group.cjs.map +1 -1
  183. package/dist/react/toggle-group.js +1 -1
  184. package/dist/react/toggle-group.js.map +1 -1
  185. package/dist/react/toggle.cjs +1 -1
  186. package/dist/react/toggle.js +1 -1
  187. package/dist/react/tooltip.cjs.map +1 -1
  188. package/dist/react/tooltip.js.map +1 -1
  189. package/dist/styles.css +1 -1
  190. package/dist/styles.css.map +1 -1
  191. package/package.json +10 -4
  192. package/src/react/accordion.tsx +9 -7
  193. package/src/react/alert-dialog.tsx +18 -10
  194. package/src/react/alert.tsx +11 -9
  195. package/src/react/avatar.tsx +13 -11
  196. package/src/react/blockquote.tsx +2 -2
  197. package/src/react/box.tsx +2 -2
  198. package/src/react/breadcrumb.tsx +33 -27
  199. package/src/react/button.tsx +3 -4
  200. package/src/react/card.tsx +21 -15
  201. package/src/react/carousel.tsx +10 -10
  202. package/src/react/checkbox-cards.tsx +8 -6
  203. package/src/react/checkbox-group.primitive.tsx +12 -6
  204. package/src/react/checkbox-group.tsx +7 -5
  205. package/src/react/checkbox.tsx +3 -3
  206. package/src/react/code.tsx +2 -2
  207. package/src/react/collapsible.tsx +2 -2
  208. package/src/react/command.tsx +46 -36
  209. package/src/react/container.tsx +6 -4
  210. package/src/react/context-menu.tsx +22 -18
  211. package/src/react/dialog.tsx +10 -6
  212. package/src/react/drawer.tsx +10 -6
  213. package/src/react/dropdown-menu.tsx +20 -16
  214. package/src/react/em.tsx +2 -2
  215. package/src/react/form.tsx +38 -22
  216. package/src/react/heading.tsx +6 -4
  217. package/src/react/hover-card.tsx +7 -5
  218. package/src/react/input-otp.tsx +40 -34
  219. package/src/react/input.tsx +115 -12
  220. package/src/react/kbd.tsx +2 -2
  221. package/src/react/label.tsx +2 -2
  222. package/src/react/menubar.tsx +48 -42
  223. package/src/react/navigation-menu.tsx +12 -12
  224. package/src/react/pagination.tsx +5 -5
  225. package/src/react/popover.tsx +7 -5
  226. package/src/react/pre.tsx +2 -2
  227. package/src/react/progress.tsx +2 -2
  228. package/src/react/quote.tsx +2 -2
  229. package/src/react/radio-cards.tsx +16 -14
  230. package/src/react/radio-group.tsx +18 -16
  231. package/src/react/radio.tsx +16 -14
  232. package/src/react/scroll-area.tsx +4 -4
  233. package/src/react/section.tsx +2 -2
  234. package/src/react/select.tsx +32 -30
  235. package/src/react/separator.tsx +2 -2
  236. package/src/react/sheet.tsx +14 -6
  237. package/src/react/slider.tsx +2 -2
  238. package/src/react/spinner.tsx +2 -2
  239. package/src/react/strong.tsx +2 -2
  240. package/src/react/switch.tsx +3 -3
  241. package/src/react/table.tsx +23 -17
  242. package/src/react/tabs.tsx +6 -6
  243. package/src/react/text-input.tsx +36 -0
  244. package/src/react/text.tsx +2 -2
  245. package/src/react/textarea.tsx +3 -3
  246. package/src/react/toggle-group.tsx +7 -4
  247. package/src/react/toggle.tsx +2 -2
  248. package/src/react/tooltip.tsx +7 -5
  249. package/dist/chunk-2OBTJ7SD.cjs.map +0 -1
  250. package/dist/chunk-3OEPCFBF.cjs +0 -2
  251. package/dist/chunk-3OEPCFBF.cjs.map +0 -1
  252. package/dist/chunk-6AFJCDFU.js +0 -2
  253. package/dist/chunk-6AFJCDFU.js.map +0 -1
  254. package/dist/chunk-72NPDP3X.cjs.map +0 -1
  255. package/dist/chunk-7CHCTEST.js +0 -2
  256. package/dist/chunk-7CHCTEST.js.map +0 -1
  257. package/dist/chunk-A5ILA637.js.map +0 -1
  258. package/dist/chunk-F5TIIJJJ.cjs.map +0 -1
  259. package/dist/chunk-FNQFZJUG.js.map +0 -1
  260. package/dist/chunk-GCHNSK5O.cjs.map +0 -1
  261. package/dist/chunk-QEWITXOV.cjs.map +0 -1
  262. package/dist/chunk-RSNKUKY7.js.map +0 -1
  263. package/dist/chunk-WECV77JD.cjs.map +0 -1
  264. package/dist/chunk-WRO3QIWH.js.map +0 -1
  265. package/dist/chunk-YLE5XFEO.cjs.map +0 -1
  266. package/dist/chunk-ZMF2SRE5.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldErrorsImpl,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type Merge,\n useFormContext,\n} from 'react-hook-form';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n name: string;\n error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />;\n});\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n id={formItemId}\n {...props}\n />\n );\n});\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return <p ref={ref} className={cn('text-muted-foreground text-xs', className)} id={formDescriptionId} {...props} />;\n },\n);\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} className={cn('text-destructive text-xs font-medium', className)} id={formMessageId} {...props}>\n {body}\n </p>\n );\n});\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"],"mappings":"0FAEA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAMA,gBAAAC,EAEA,kBAAAC,MACK,kBAgFD,cAAAC,MAAA,oBA5DN,IAAMC,EAAyB,gBAA4C,IAAI,EAEzEC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIC,EAAe,EAEpD,GAAI,CAACJ,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMI,EAAaH,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAG,CAAG,EAAIL,EAEf,MAAO,CACL,GAAAK,EACA,KAAMN,EAAa,KACnB,WAAY,aAAaM,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOC,EAWb,SAASC,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEd,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMa,EAAM,IAAK,EACnD,SAAAd,EAACe,EAAA,CAAY,GAAGD,EAAO,EACzB,CAEJ,CASA,IAAME,EAAiB,aAA2C,CAAC,CAAE,UAAAC,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAClG,IAAMR,EAAW,QAAM,EAEvB,OACEV,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAQ,CAAG,EACpC,SAAAV,EAAC,OAAI,IAAKkB,EAAK,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGH,EAAO,EACnE,CAEJ,CAAC,EAEDE,EAAS,YAAc,WASvB,IAAMI,EAAkB,aAA6C,CAAC,CAAE,UAAAH,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CACrG,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAInB,EAAa,EAE3C,OAAOH,EAACuB,EAAA,CAAM,IAAKL,EAAK,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EAAG,QAASK,EAAa,GAAGR,EAAO,CACjH,CAAC,EAEDM,EAAU,YAAc,YASxB,IAAMI,EAAoB,aAAiD,CAAC,CAAE,GAAGV,CAAM,EAAGI,IAAQ,CAChG,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAAIvB,EAAa,EAE7E,OACEH,EAAC2B,EAAA,CACC,IAAKT,EACL,mBAAmBG,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAC3B,eAAc,EAAQJ,EACtB,GAAIC,EACH,GAAGR,EACN,CAEJ,CAAC,EAEDU,EAAY,YAAc,cAS1B,IAAMI,EAAwB,aAC5B,CAAC,CAAE,UAAAX,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAChC,GAAM,CAAE,kBAAAO,CAAkB,EAAItB,EAAa,EAE3C,OAAOH,EAAC,KAAE,IAAKkB,EAAK,UAAWC,EAAG,gCAAiCF,CAAS,EAAG,GAAIQ,EAAoB,GAAGX,EAAO,CACnH,CACF,EAEAc,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aAAiD,CAAC,CAAE,SAAAC,EAAU,UAAAb,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CACrH,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIvB,EAAa,EACxC4B,EAAOV,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAIS,EAEtD,OAAKC,EAKH/B,EAAC,KAAE,IAAKkB,EAAK,UAAWC,EAAG,uCAAwCF,CAAS,EAAG,GAAIS,EAAgB,GAAGZ,EACnG,SAAAiB,EACH,EANO,IAQX,CAAC,EAEDF,EAAY,YAAc","names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","useFormContext","fieldState","id","Form","FormProvider","FormField","props","Controller","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body"]}
1
+ {"version":3,"sources":["../../src/react/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldErrorsImpl,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type Merge,\n useFormContext,\n} from 'react-hook-form';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n name: string;\n error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, forwardedRef) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={forwardedRef} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, forwardedRef) => {\n const { error, formItemId } = useFormField();\n\n return (\n <Label ref={forwardedRef} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />\n );\n});\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, forwardedRef) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={forwardedRef}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n id={formItemId}\n {...props}\n />\n );\n});\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, forwardedRef) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-muted-foreground text-xs', className)}\n id={formDescriptionId}\n {...props}\n />\n );\n },\n);\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(\n ({ children, className, ...props }, forwardedRef) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-destructive text-xs font-medium', className)}\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"],"mappings":"0FAEA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAMA,gBAAAC,EAEA,kBAAAC,MACK,kBAgFD,cAAAC,MAAA,oBA5DN,IAAMC,EAAyB,gBAA4C,IAAI,EAEzEC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIC,EAAe,EAEpD,GAAI,CAACJ,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMI,EAAaH,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAG,CAAG,EAAIL,EAEf,MAAO,CACL,GAAAK,EACA,KAAMN,EAAa,KACnB,WAAY,aAAaM,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOC,EAWb,SAASC,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEd,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMa,EAAM,IAAK,EACnD,SAAAd,EAACe,EAAA,CAAY,GAAGD,EAAO,EACzB,CAEJ,CASA,IAAME,EAAiB,aAA2C,CAAC,CAAE,UAAAC,EAAW,GAAGH,CAAM,EAAGI,IAAiB,CAC3G,IAAMR,EAAW,QAAM,EAEvB,OACEV,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAQ,CAAG,EACpC,SAAAV,EAAC,OAAI,IAAKkB,EAAc,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGH,EAAO,EAC5E,CAEJ,CAAC,EAEDE,EAAS,YAAc,WASvB,IAAMI,EAAkB,aAA6C,CAAC,CAAE,UAAAH,EAAW,GAAGH,CAAM,EAAGI,IAAiB,CAC9G,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAInB,EAAa,EAE3C,OACEH,EAACuB,EAAA,CAAM,IAAKL,EAAc,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EAAG,QAASK,EAAa,GAAGR,EAAO,CAErH,CAAC,EAEDM,EAAU,YAAc,YASxB,IAAMI,EAAoB,aAAiD,CAAC,CAAE,GAAGV,CAAM,EAAGI,IAAiB,CACzG,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAAIvB,EAAa,EAE7E,OACEH,EAAC2B,EAAA,CACC,IAAKT,EACL,mBAAmBG,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAC3B,eAAc,EAAQJ,EACtB,GAAIC,EACH,GAAGR,EACN,CAEJ,CAAC,EAEDU,EAAY,YAAc,cAS1B,IAAMI,EAAwB,aAC5B,CAAC,CAAE,UAAAX,EAAW,GAAGH,CAAM,EAAGI,IAAiB,CACzC,GAAM,CAAE,kBAAAO,CAAkB,EAAItB,EAAa,EAE3C,OACEH,EAAC,KACC,IAAKkB,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACxD,GAAIQ,EACH,GAAGX,EACN,CAEJ,CACF,EAEAc,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aACxB,CAAC,CAAE,SAAAC,EAAU,UAAAb,EAAW,GAAGH,CAAM,EAAGI,IAAiB,CACnD,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIvB,EAAa,EACxC4B,EAAOV,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAIS,EAEtD,OAAKC,EAKH/B,EAAC,KACC,IAAKkB,EACL,UAAWC,EAAG,uCAAwCF,CAAS,EAC/D,GAAIS,EACH,GAAGZ,EAEH,SAAAiB,EACH,EAXO,IAaX,CACF,EAEAF,EAAY,YAAc","names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","useFormContext","fieldState","id","Form","FormProvider","FormField","props","Controller","FormItem","className","forwardedRef","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/heading.tsx"],"names":["React","Slot","jsx","Heading","asChild","Tag","props","ref"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAgBZ,cAAAC,MAAA,oBAHT,IAAMC,EAAgB,aAAyC,CAAC,CAAE,QAAAC,EAAS,GAAIC,EAAM,KAAM,GAAGC,CAAM,EAAGC,IAG9FL,EAFWE,EAAUH,EAAOI,EAE3B,CAAU,IAAKE,EAAM,GAAGD,EAAO,CACxC,EAEDH,EAAQ,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Heading\n * -------------------------------------------------------------------------- */\n\ntype HeadingElement = HTMLHeadingElement;\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n asChild?: boolean;\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>(({ asChild, as: Tag = 'h1', ...props }, ref) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={ref} {...props} />;\n});\n\nHeading.displayName = 'Heading';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Heading, type HeadingProps };\n"]}
1
+ {"version":3,"sources":["../../src/react/heading.tsx"],"names":["React","Slot","jsx","Heading","asChild","Tag","props","forwardedRef"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAiBV,cAAAC,MAAA,oBAJX,IAAMC,EAAgB,aACpB,CAAC,CAAE,QAAAC,EAAS,GAAIC,EAAM,KAAM,GAAGC,CAAM,EAAGC,IAG/BL,EAFWE,EAAUH,EAAOI,EAE3B,CAAU,IAAKE,EAAe,GAAGD,EAAO,CAEpD,EAEAH,EAAQ,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Heading\n * -------------------------------------------------------------------------- */\n\ntype HeadingElement = HTMLHeadingElement;\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n asChild?: boolean;\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>(\n ({ asChild, as: Tag = 'h1', ...props }, forwardedRef) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={forwardedRef} {...props} />;\n },\n);\n\nHeading.displayName = 'Heading';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Heading, type HeadingProps };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/heading.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Heading\n * -------------------------------------------------------------------------- */\n\ntype HeadingElement = HTMLHeadingElement;\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n asChild?: boolean;\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>(({ asChild, as: Tag = 'h1', ...props }, ref) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={ref} {...props} />;\n});\n\nHeading.displayName = 'Heading';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Heading, type HeadingProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAgBZ,cAAAC,MAAA,oBAHT,IAAMC,EAAgB,aAAyC,CAAC,CAAE,QAAAC,EAAS,GAAIC,EAAM,KAAM,GAAGC,CAAM,EAAGC,IAG9FL,EAFWE,EAAUH,EAAOI,EAE3B,CAAU,IAAKE,EAAM,GAAGD,EAAO,CACxC,EAEDH,EAAQ,YAAc","names":["React","Slot","jsx","Heading","asChild","Tag","props","ref"]}
1
+ {"version":3,"sources":["../../src/react/heading.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Heading\n * -------------------------------------------------------------------------- */\n\ntype HeadingElement = HTMLHeadingElement;\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n asChild?: boolean;\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>(\n ({ asChild, as: Tag = 'h1', ...props }, forwardedRef) => {\n const Component = asChild ? Slot : Tag;\n\n return <Component ref={forwardedRef} {...props} />;\n },\n);\n\nHeading.displayName = 'Heading';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Heading, type HeadingProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAiBV,cAAAC,MAAA,oBAJX,IAAMC,EAAgB,aACpB,CAAC,CAAE,QAAAC,EAAS,GAAIC,EAAM,KAAM,GAAGC,CAAM,EAAGC,IAG/BL,EAFWE,EAAUH,EAAOI,EAE3B,CAAU,IAAKE,EAAe,GAAGD,EAAO,CAEpD,EAEAH,EAAQ,YAAc","names":["React","Slot","jsx","Heading","asChild","Tag","props","forwardedRef"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/hover-card.tsx"],"names":["React","HoverCardPrimitive","jsx","HoverCard","HoverCardTrigger","HoverCardContent","className","align","sideOffset","props","ref","cn","HoverCardArrow"],"mappings":"kDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAwB,6BA2B9B,cAAAC,MAAA,oBAnBN,IAAMC,EAA+B,OAO/BC,EAAsC,UAStCC,EAAyB,aAC7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC1DR,EAAoB,SAAnB,CACC,SAAAA,EAAoB,UAAnB,CACC,IAAKQ,EACL,MAAOH,EACP,UAAWI,EACT,gtBACAL,CACF,EACA,WAAYE,EACX,GAAGC,EACN,EACF,CAEJ,EAEAJ,EAAiB,YAAiC,UAAQ,YAS1D,IAAMO,EAAuB,aAAuD,CAAC,CAAE,UAAAN,EAAW,GAAGG,CAAM,EAAGC,IAC5GR,EAAoB,QAAnB,CAAyB,IAAKQ,EAAK,UAAWC,EAAG,eAAgBL,CAAS,EAAI,GAAGG,EAAO,CAC1F,EAEDG,EAAe,YAAiC,QAAM","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCard\n * -------------------------------------------------------------------------- */\n\ntype HoverCardProps = React.ComponentProps<typeof HoverCardPrimitive.Root>;\nconst HoverCard = HoverCardPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardTrigger\n * -------------------------------------------------------------------------- */\n\ntype HoverCardTriggerProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Trigger>;\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardContent\n * -------------------------------------------------------------------------- */\n\ntype HoverCardContentElement = React.ElementRef<typeof HoverCardPrimitive.Content>;\ntype HoverCardContentProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>;\n\nconst HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(\n ({ className, align = 'center', sideOffset = 6, ...props }, ref) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n ),\n);\n\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardArrow\n * -------------------------------------------------------------------------- */\n\ntype HoverCardArrowElement = React.ElementRef<typeof HoverCardPrimitive.Arrow>;\ntype HoverCardArrowProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Arrow>;\n\nconst HoverCardArrow = React.forwardRef<HoverCardArrowElement, HoverCardArrowProps>(({ className, ...props }, ref) => (\n <HoverCardPrimitive.Arrow ref={ref} className={cn('fill-popover', className)} {...props} />\n));\n\nHoverCardArrow.displayName = HoverCardPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n HoverCard,\n HoverCardTrigger,\n HoverCardContent,\n HoverCardArrow,\n type HoverCardProps,\n type HoverCardTriggerProps,\n type HoverCardContentProps,\n type HoverCardArrowProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/hover-card.tsx"],"names":["React","HoverCardPrimitive","jsx","HoverCard","HoverCardTrigger","HoverCardContent","className","align","sideOffset","props","forwardedRef","cn","HoverCardArrow"],"mappings":"kDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAwB,6BA2B9B,cAAAC,MAAA,oBAnBN,IAAMC,EAA+B,OAO/BC,EAAsC,UAStCC,EAAyB,aAC7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC1DR,EAAoB,SAAnB,CACC,SAAAA,EAAoB,UAAnB,CACC,IAAKQ,EACL,MAAOH,EACP,UAAWI,EACT,gtBACAL,CACF,EACA,WAAYE,EACX,GAAGC,EACN,EACF,CAEJ,EAEAJ,EAAiB,YAAiC,UAAQ,YAS1D,IAAMO,EAAuB,aAC3B,CAAC,CAAE,UAAAN,EAAW,GAAGG,CAAM,EAAGC,IACxBR,EAAoB,QAAnB,CAAyB,IAAKQ,EAAc,UAAWC,EAAG,eAAgBL,CAAS,EAAI,GAAGG,EAAO,CAEtG,EAEAG,EAAe,YAAiC,QAAM","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCard\n * -------------------------------------------------------------------------- */\n\ntype HoverCardProps = React.ComponentProps<typeof HoverCardPrimitive.Root>;\nconst HoverCard = HoverCardPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardTrigger\n * -------------------------------------------------------------------------- */\n\ntype HoverCardTriggerProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Trigger>;\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardContent\n * -------------------------------------------------------------------------- */\n\ntype HoverCardContentElement = React.ElementRef<typeof HoverCardPrimitive.Content>;\ntype HoverCardContentProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>;\n\nconst HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(\n ({ className, align = 'center', sideOffset = 6, ...props }, forwardedRef) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={forwardedRef}\n align={align}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n ),\n);\n\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardArrow\n * -------------------------------------------------------------------------- */\n\ntype HoverCardArrowElement = React.ElementRef<typeof HoverCardPrimitive.Arrow>;\ntype HoverCardArrowProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Arrow>;\n\nconst HoverCardArrow = React.forwardRef<HoverCardArrowElement, HoverCardArrowProps>(\n ({ className, ...props }, forwardedRef) => (\n <HoverCardPrimitive.Arrow ref={forwardedRef} className={cn('fill-popover', className)} {...props} />\n ),\n);\n\nHoverCardArrow.displayName = HoverCardPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n HoverCard,\n HoverCardTrigger,\n HoverCardContent,\n HoverCardArrow,\n type HoverCardProps,\n type HoverCardTriggerProps,\n type HoverCardContentProps,\n type HoverCardArrowProps,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/hover-card.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCard\n * -------------------------------------------------------------------------- */\n\ntype HoverCardProps = React.ComponentProps<typeof HoverCardPrimitive.Root>;\nconst HoverCard = HoverCardPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardTrigger\n * -------------------------------------------------------------------------- */\n\ntype HoverCardTriggerProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Trigger>;\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardContent\n * -------------------------------------------------------------------------- */\n\ntype HoverCardContentElement = React.ElementRef<typeof HoverCardPrimitive.Content>;\ntype HoverCardContentProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>;\n\nconst HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(\n ({ className, align = 'center', sideOffset = 6, ...props }, ref) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n ),\n);\n\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardArrow\n * -------------------------------------------------------------------------- */\n\ntype HoverCardArrowElement = React.ElementRef<typeof HoverCardPrimitive.Arrow>;\ntype HoverCardArrowProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Arrow>;\n\nconst HoverCardArrow = React.forwardRef<HoverCardArrowElement, HoverCardArrowProps>(({ className, ...props }, ref) => (\n <HoverCardPrimitive.Arrow ref={ref} className={cn('fill-popover', className)} {...props} />\n));\n\nHoverCardArrow.displayName = HoverCardPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n HoverCard,\n HoverCardTrigger,\n HoverCardContent,\n HoverCardArrow,\n type HoverCardProps,\n type HoverCardTriggerProps,\n type HoverCardContentProps,\n type HoverCardArrowProps,\n};\n"],"mappings":"iDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAwB,6BA2B9B,cAAAC,MAAA,oBAnBN,IAAMC,EAA+B,OAO/BC,EAAsC,UAStCC,EAAyB,aAC7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC1DR,EAAoB,SAAnB,CACC,SAAAA,EAAoB,UAAnB,CACC,IAAKQ,EACL,MAAOH,EACP,UAAWI,EACT,gtBACAL,CACF,EACA,WAAYE,EACX,GAAGC,EACN,EACF,CAEJ,EAEAJ,EAAiB,YAAiC,UAAQ,YAS1D,IAAMO,EAAuB,aAAuD,CAAC,CAAE,UAAAN,EAAW,GAAGG,CAAM,EAAGC,IAC5GR,EAAoB,QAAnB,CAAyB,IAAKQ,EAAK,UAAWC,EAAG,eAAgBL,CAAS,EAAI,GAAGG,EAAO,CAC1F,EAEDG,EAAe,YAAiC,QAAM","names":["React","HoverCardPrimitive","jsx","HoverCard","HoverCardTrigger","HoverCardContent","className","align","sideOffset","props","ref","cn","HoverCardArrow"]}
1
+ {"version":3,"sources":["../../src/react/hover-card.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCard\n * -------------------------------------------------------------------------- */\n\ntype HoverCardProps = React.ComponentProps<typeof HoverCardPrimitive.Root>;\nconst HoverCard = HoverCardPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardTrigger\n * -------------------------------------------------------------------------- */\n\ntype HoverCardTriggerProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Trigger>;\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardContent\n * -------------------------------------------------------------------------- */\n\ntype HoverCardContentElement = React.ElementRef<typeof HoverCardPrimitive.Content>;\ntype HoverCardContentProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>;\n\nconst HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(\n ({ className, align = 'center', sideOffset = 6, ...props }, forwardedRef) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={forwardedRef}\n align={align}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n ),\n);\n\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: HoverCardArrow\n * -------------------------------------------------------------------------- */\n\ntype HoverCardArrowElement = React.ElementRef<typeof HoverCardPrimitive.Arrow>;\ntype HoverCardArrowProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Arrow>;\n\nconst HoverCardArrow = React.forwardRef<HoverCardArrowElement, HoverCardArrowProps>(\n ({ className, ...props }, forwardedRef) => (\n <HoverCardPrimitive.Arrow ref={forwardedRef} className={cn('fill-popover', className)} {...props} />\n ),\n);\n\nHoverCardArrow.displayName = HoverCardPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n HoverCard,\n HoverCardTrigger,\n HoverCardContent,\n HoverCardArrow,\n type HoverCardProps,\n type HoverCardTriggerProps,\n type HoverCardContentProps,\n type HoverCardArrowProps,\n};\n"],"mappings":"iDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAwB,6BA2B9B,cAAAC,MAAA,oBAnBN,IAAMC,EAA+B,OAO/BC,EAAsC,UAStCC,EAAyB,aAC7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC1DR,EAAoB,SAAnB,CACC,SAAAA,EAAoB,UAAnB,CACC,IAAKQ,EACL,MAAOH,EACP,UAAWI,EACT,gtBACAL,CACF,EACA,WAAYE,EACX,GAAGC,EACN,EACF,CAEJ,EAEAJ,EAAiB,YAAiC,UAAQ,YAS1D,IAAMO,EAAuB,aAC3B,CAAC,CAAE,UAAAN,EAAW,GAAGG,CAAM,EAAGC,IACxBR,EAAoB,QAAnB,CAAyB,IAAKQ,EAAc,UAAWC,EAAG,eAAgBL,CAAS,EAAI,GAAGG,EAAO,CAEtG,EAEAG,EAAe,YAAiC,QAAM","names":["React","HoverCardPrimitive","jsx","HoverCard","HoverCardTrigger","HoverCardContent","className","align","sideOffset","props","forwardedRef","cn","HoverCardArrow"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkNU6SK3FCcjs = require('../chunk-NU6SK3FC.cjs');var _react = require('react'); var n = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _inputotp = require('input-otp');var _jsxruntime = require('react/jsx-runtime');var P=n.forwardRef(({className:t,containerClassName:e,...p},a)=>_jsxruntime.jsx.call(void 0, _inputotp.OTPInput,{ref:a,className:_chunkNU6SK3FCcjs.a.call(void 0, "disabled:cursor-not-allowed",t),containerClassName:_chunkNU6SK3FCcjs.a.call(void 0, "flex items-center gap-2 has-[:disabled]:opacity-50",e),...p}));P.displayName="InputOTP";var T=n.forwardRef(({className:t,...e},p)=>_jsxruntime.jsx.call(void 0, "div",{ref:p,className:_chunkNU6SK3FCcjs.a.call(void 0, "flex items-center",t),...e}));T.displayName="InputOTPGroup";var m=n.forwardRef(({index:t,className:e,...p},a)=>{let s=n.useContext(_inputotp.OTPInputContext).slots[t];return _jsxruntime.jsxs.call(void 0, "div",{ref:a,className:_chunkNU6SK3FCcjs.a.call(void 0, "border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",_optionalChain([s, 'optionalAccess', _ => _.isActive])&&"z-10 outline outline-2",e),...p,children:[_optionalChain([s, 'optionalAccess', _2 => _2.char]),_optionalChain([s, 'optionalAccess', _3 => _3.hasFakeCaret])?_jsxruntime.jsx.call(void 0, "div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:_jsxruntime.jsx.call(void 0, "div",{className:"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px"})}):null]})});m.displayName="InputOTPSlot";var c=n.forwardRef(({...t},e)=>_jsxruntime.jsx.call(void 0, "div",{ref:e,role:"separator",...t,children:_jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon,{})}));c.displayName="InputOTPSeparator";exports.InputOTP = P; exports.InputOTPGroup = T; exports.InputOTPSeparator = c; exports.InputOTPSlot = m; exports.REGEXP_ONLY_CHARS = _inputotp.REGEXP_ONLY_CHARS; exports.REGEXP_ONLY_DIGITS = _inputotp.REGEXP_ONLY_DIGITS; exports.REGEXP_ONLY_DIGITS_AND_CHARS = _inputotp.REGEXP_ONLY_DIGITS_AND_CHARS;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkNU6SK3FCcjs = require('../chunk-NU6SK3FC.cjs');var _react = require('react'); var r = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _inputotp = require('input-otp');var _jsxruntime = require('react/jsx-runtime');var P=r.forwardRef(({className:t,containerClassName:e,...p},a)=>_jsxruntime.jsx.call(void 0, _inputotp.OTPInput,{ref:a,className:_chunkNU6SK3FCcjs.a.call(void 0, "disabled:cursor-default",t),containerClassName:_chunkNU6SK3FCcjs.a.call(void 0, "flex items-center gap-2 has-[:disabled]:opacity-50",e),...p}));P.displayName="InputOTP";var T=r.forwardRef(({className:t,...e},p)=>_jsxruntime.jsx.call(void 0, "div",{ref:p,className:_chunkNU6SK3FCcjs.a.call(void 0, "flex items-center",t),...e}));T.displayName="InputOTPGroup";var m=r.forwardRef(({index:t,className:e,...p},a)=>{let s=r.useContext(_inputotp.OTPInputContext).slots[t];return _jsxruntime.jsxs.call(void 0, "div",{ref:a,className:_chunkNU6SK3FCcjs.a.call(void 0, "border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",_optionalChain([s, 'optionalAccess', _ => _.isActive])&&"z-10 outline outline-2",e),...p,children:[_optionalChain([s, 'optionalAccess', _2 => _2.char]),_optionalChain([s, 'optionalAccess', _3 => _3.hasFakeCaret])?_jsxruntime.jsx.call(void 0, "div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:_jsxruntime.jsx.call(void 0, "div",{className:"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px"})}):null]})});m.displayName="InputOTPSlot";var c=r.forwardRef(({...t},e)=>_jsxruntime.jsx.call(void 0, "div",{ref:e,role:"separator",...t,children:_jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon,{})}));c.displayName="InputOTPSeparator";exports.InputOTP = P; exports.InputOTPGroup = T; exports.InputOTPSeparator = c; exports.InputOTPSlot = m; exports.REGEXP_ONLY_CHARS = _inputotp.REGEXP_ONLY_CHARS; exports.REGEXP_ONLY_DIGITS = _inputotp.REGEXP_ONLY_DIGITS; exports.REGEXP_ONLY_DIGITS_AND_CHARS = _inputotp.REGEXP_ONLY_DIGITS_AND_CHARS;
2
2
  //# sourceMappingURL=input-otp.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/input-otp.tsx"],"names":["React","DotFilledIcon","OTPInput","OTPInputContext","REGEXP_ONLY_CHARS","REGEXP_ONLY_DIGITS","REGEXP_ONLY_DIGITS_AND_CHARS","jsx","jsxs","InputOTP","className","containerClassName","props","ref","cn","InputOTPGroup","InputOTPSlot","index","slot","InputOTPSeparator"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,OAAS,iBAAAC,MAAqB,wBAC9B,OACE,YAAAC,EACA,mBAAAC,EACA,qBAAAC,EACA,sBAAAC,EACA,gCAAAC,MACK,YAYH,cAAAC,EAuCA,QAAAC,MAvCA,oBAFJ,IAAMC,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,CAAM,EAAGC,IAC5CN,EAACL,EAAA,CACC,IAAKW,EACL,UAAWC,EAAG,8BAA+BJ,CAAS,EACtD,mBAAoBI,EAAG,qDAAsDH,CAAkB,EAC9F,GAAGC,EACN,CAEJ,EAEAH,EAAS,YAAc,WASvB,IAAMM,EAAsB,aAAqD,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IACzGN,EAAC,OAAI,IAAKM,EAAK,UAAWC,EAAG,oBAAqBJ,CAAS,EAAI,GAAGE,EAAO,CAC1E,EAEDG,EAAc,YAAc,gBAY5B,IAAMC,EAAqB,aAAmD,CAAC,CAAE,MAAAC,EAAO,UAAAP,EAAW,GAAGE,CAAM,EAAGC,IAAQ,CAErH,IAAMK,EADwB,aAAWf,CAAe,EAC3B,MAAMc,CAAK,EAExC,OACET,EAAC,OACC,IAAKK,EACL,UAAWC,EACT,8JACAI,GAAM,UAAY,yBAClBR,CACF,EACC,GAAGE,EAEH,UAAAM,GAAM,KACNA,GAAM,aACLX,EAAC,OAAI,UAAU,wEACb,SAAAA,EAAC,OAAI,UAAU,mEAAmE,EACpF,EACE,MACN,CAEJ,CAAC,EAEDS,EAAa,YAAc,eAS3B,IAAMG,EAA0B,aAA6D,CAAC,CAAE,GAAGP,CAAM,EAAGC,IAC1GN,EAAC,OAAI,IAAKM,EAAK,KAAK,YAAa,GAAGD,EAClC,SAAAL,EAACN,EAAA,EAAc,EACjB,CACD,EAEDkB,EAAkB,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { DotFilledIcon } from '@radix-ui/react-icons';\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n} from 'input-otp';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOtp\n * -------------------------------------------------------------------------- */\n\ntype InputOTPElement = React.ElementRef<typeof OTPInput>;\ntype InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;\n\nconst InputOTP = React.forwardRef<InputOTPElement, InputOTPProps>(\n ({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n className={cn('disabled:cursor-not-allowed', className)}\n containerClassName={cn('flex items-center gap-2 has-[:disabled]:opacity-50', containerClassName)}\n {...props}\n />\n ),\n);\n\nInputOTP.displayName = 'InputOTP';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPGroup\n * -------------------------------------------------------------------------- */\n\ntype InputOTPGroupElement = HTMLDivElement;\ntype InputOTPGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPGroup = React.forwardRef<InputOTPGroupElement, InputOTPGroupProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center', className)} {...props} />\n));\n\nInputOTPGroup.displayName = 'InputOTPGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSlot\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSlotElement = HTMLDivElement;\n\ninterface InputOTPSlotProps extends React.HTMLAttributes<HTMLDivElement> {\n index: number;\n}\n\nconst InputOTPSlot = React.forwardRef<InputOTPSlotElement, InputOTPSlotProps>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const slot = inputOTPContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md',\n slot?.isActive && 'z-10 outline outline-2',\n className,\n )}\n {...props}\n >\n {slot?.char}\n {slot?.hasFakeCaret ? (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px\" />\n </div>\n ) : null}\n </div>\n );\n});\n\nInputOTPSlot.displayName = 'InputOTPSlot';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSeparator\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSeparatorElement = HTMLDivElement;\ntype InputOTPSeparatorProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPSeparator = React.forwardRef<InputOTPSeparatorElement, InputOTPSeparatorProps>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <DotFilledIcon />\n </div>\n));\n\nInputOTPSeparator.displayName = 'InputOTPSeparator';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n type InputOTPProps,\n type InputOTPGroupProps,\n type InputOTPSlotProps,\n type InputOTPSeparatorProps,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/input-otp.tsx"],"names":["React","DotFilledIcon","OTPInput","OTPInputContext","REGEXP_ONLY_CHARS","REGEXP_ONLY_DIGITS","REGEXP_ONLY_DIGITS_AND_CHARS","jsx","jsxs","InputOTP","className","containerClassName","props","forwardedRef","cn","InputOTPGroup","InputOTPSlot","index","slot","InputOTPSeparator"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,OAAS,iBAAAC,MAAqB,wBAC9B,OACE,YAAAC,EACA,mBAAAC,EACA,qBAAAC,EACA,sBAAAC,EACA,gCAAAC,MACK,YAYH,cAAAC,EA0CE,QAAAC,MA1CF,oBAFJ,IAAMC,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,CAAM,EAAGC,IAC5CN,EAACL,EAAA,CACC,IAAKW,EACL,UAAWC,EAAG,0BAA2BJ,CAAS,EAClD,mBAAoBI,EAAG,qDAAsDH,CAAkB,EAC9F,GAAGC,EACN,CAEJ,EAEAH,EAAS,YAAc,WASvB,IAAMM,EAAsB,aAC1B,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IACxBN,EAAC,OAAI,IAAKM,EAAc,UAAWC,EAAG,oBAAqBJ,CAAS,EAAI,GAAGE,EAAO,CAEtF,EAEAG,EAAc,YAAc,gBAY5B,IAAMC,EAAqB,aACzB,CAAC,CAAE,MAAAC,EAAO,UAAAP,EAAW,GAAGE,CAAM,EAAGC,IAAiB,CAEhD,IAAMK,EADwB,aAAWf,CAAe,EAC3B,MAAMc,CAAK,EAExC,OACET,EAAC,OACC,IAAKK,EACL,UAAWC,EACT,8JACAI,GAAM,UAAY,yBAClBR,CACF,EACC,GAAGE,EAEH,UAAAM,GAAM,KACNA,GAAM,aACLX,EAAC,OAAI,UAAU,wEACb,SAAAA,EAAC,OAAI,UAAU,mEAAmE,EACpF,EACE,MACN,CAEJ,CACF,EAEAS,EAAa,YAAc,eAS3B,IAAMG,EAA0B,aAC9B,CAAC,CAAE,GAAGP,CAAM,EAAGC,IACbN,EAAC,OAAI,IAAKM,EAAc,KAAK,YAAa,GAAGD,EAC3C,SAAAL,EAACN,EAAA,EAAc,EACjB,CAEJ,EAEAkB,EAAkB,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { DotFilledIcon } from '@radix-ui/react-icons';\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n} from 'input-otp';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOtp\n * -------------------------------------------------------------------------- */\n\ntype InputOTPElement = React.ElementRef<typeof OTPInput>;\ntype InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;\n\nconst InputOTP = React.forwardRef<InputOTPElement, InputOTPProps>(\n ({ className, containerClassName, ...props }, forwardedRef) => (\n <OTPInput\n ref={forwardedRef}\n className={cn('disabled:cursor-default', className)}\n containerClassName={cn('flex items-center gap-2 has-[:disabled]:opacity-50', containerClassName)}\n {...props}\n />\n ),\n);\n\nInputOTP.displayName = 'InputOTP';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPGroup\n * -------------------------------------------------------------------------- */\n\ntype InputOTPGroupElement = HTMLDivElement;\ntype InputOTPGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPGroup = React.forwardRef<InputOTPGroupElement, InputOTPGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <div ref={forwardedRef} className={cn('flex items-center', className)} {...props} />\n ),\n);\n\nInputOTPGroup.displayName = 'InputOTPGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSlot\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSlotElement = HTMLDivElement;\n\ninterface InputOTPSlotProps extends React.HTMLAttributes<HTMLDivElement> {\n index: number;\n}\n\nconst InputOTPSlot = React.forwardRef<InputOTPSlotElement, InputOTPSlotProps>(\n ({ index, className, ...props }, forwardedRef) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const slot = inputOTPContext.slots[index];\n\n return (\n <div\n ref={forwardedRef}\n className={cn(\n 'border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md',\n slot?.isActive && 'z-10 outline outline-2',\n className,\n )}\n {...props}\n >\n {slot?.char}\n {slot?.hasFakeCaret ? (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px\" />\n </div>\n ) : null}\n </div>\n );\n },\n);\n\nInputOTPSlot.displayName = 'InputOTPSlot';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSeparator\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSeparatorElement = HTMLDivElement;\ntype InputOTPSeparatorProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPSeparator = React.forwardRef<InputOTPSeparatorElement, InputOTPSeparatorProps>(\n ({ ...props }, forwardedRef) => (\n <div ref={forwardedRef} role=\"separator\" {...props}>\n <DotFilledIcon />\n </div>\n ),\n);\n\nInputOTPSeparator.displayName = 'InputOTPSeparator';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n type InputOTPProps,\n type InputOTPGroupProps,\n type InputOTPSlotProps,\n type InputOTPSeparatorProps,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as o}from"../chunk-5UXVZTFG.js";import*as n from"react";import{DotFilledIcon as u}from"@radix-ui/react-icons";import{OTPInput as i,OTPInputContext as l,REGEXP_ONLY_CHARS as R,REGEXP_ONLY_DIGITS as y,REGEXP_ONLY_DIGITS_AND_CHARS as E}from"input-otp";import{jsx as r,jsxs as I}from"react/jsx-runtime";var P=n.forwardRef(({className:t,containerClassName:e,...p},a)=>r(i,{ref:a,className:o("disabled:cursor-not-allowed",t),containerClassName:o("flex items-center gap-2 has-[:disabled]:opacity-50",e),...p}));P.displayName="InputOTP";var T=n.forwardRef(({className:t,...e},p)=>r("div",{ref:p,className:o("flex items-center",t),...e}));T.displayName="InputOTPGroup";var m=n.forwardRef(({index:t,className:e,...p},a)=>{let s=n.useContext(l).slots[t];return I("div",{ref:a,className:o("border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",s?.isActive&&"z-10 outline outline-2",e),...p,children:[s?.char,s?.hasFakeCaret?r("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:r("div",{className:"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px"})}):null]})});m.displayName="InputOTPSlot";var c=n.forwardRef(({...t},e)=>r("div",{ref:e,role:"separator",...t,children:r(u,{})}));c.displayName="InputOTPSeparator";export{P as InputOTP,T as InputOTPGroup,c as InputOTPSeparator,m as InputOTPSlot,R as REGEXP_ONLY_CHARS,y as REGEXP_ONLY_DIGITS,E as REGEXP_ONLY_DIGITS_AND_CHARS};
1
+ "use client";import{a as o}from"../chunk-5UXVZTFG.js";import*as r from"react";import{DotFilledIcon as u}from"@radix-ui/react-icons";import{OTPInput as i,OTPInputContext as l,REGEXP_ONLY_CHARS as R,REGEXP_ONLY_DIGITS as y,REGEXP_ONLY_DIGITS_AND_CHARS as E}from"input-otp";import{jsx as n,jsxs as I}from"react/jsx-runtime";var P=r.forwardRef(({className:t,containerClassName:e,...p},a)=>n(i,{ref:a,className:o("disabled:cursor-default",t),containerClassName:o("flex items-center gap-2 has-[:disabled]:opacity-50",e),...p}));P.displayName="InputOTP";var T=r.forwardRef(({className:t,...e},p)=>n("div",{ref:p,className:o("flex items-center",t),...e}));T.displayName="InputOTPGroup";var m=r.forwardRef(({index:t,className:e,...p},a)=>{let s=r.useContext(l).slots[t];return I("div",{ref:a,className:o("border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",s?.isActive&&"z-10 outline outline-2",e),...p,children:[s?.char,s?.hasFakeCaret?n("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:n("div",{className:"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px"})}):null]})});m.displayName="InputOTPSlot";var c=r.forwardRef(({...t},e)=>n("div",{ref:e,role:"separator",...t,children:n(u,{})}));c.displayName="InputOTPSeparator";export{P as InputOTP,T as InputOTPGroup,c as InputOTPSeparator,m as InputOTPSlot,R as REGEXP_ONLY_CHARS,y as REGEXP_ONLY_DIGITS,E as REGEXP_ONLY_DIGITS_AND_CHARS};
2
2
  //# sourceMappingURL=input-otp.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/input-otp.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { DotFilledIcon } from '@radix-ui/react-icons';\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n} from 'input-otp';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOtp\n * -------------------------------------------------------------------------- */\n\ntype InputOTPElement = React.ElementRef<typeof OTPInput>;\ntype InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;\n\nconst InputOTP = React.forwardRef<InputOTPElement, InputOTPProps>(\n ({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n className={cn('disabled:cursor-not-allowed', className)}\n containerClassName={cn('flex items-center gap-2 has-[:disabled]:opacity-50', containerClassName)}\n {...props}\n />\n ),\n);\n\nInputOTP.displayName = 'InputOTP';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPGroup\n * -------------------------------------------------------------------------- */\n\ntype InputOTPGroupElement = HTMLDivElement;\ntype InputOTPGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPGroup = React.forwardRef<InputOTPGroupElement, InputOTPGroupProps>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center', className)} {...props} />\n));\n\nInputOTPGroup.displayName = 'InputOTPGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSlot\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSlotElement = HTMLDivElement;\n\ninterface InputOTPSlotProps extends React.HTMLAttributes<HTMLDivElement> {\n index: number;\n}\n\nconst InputOTPSlot = React.forwardRef<InputOTPSlotElement, InputOTPSlotProps>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const slot = inputOTPContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md',\n slot?.isActive && 'z-10 outline outline-2',\n className,\n )}\n {...props}\n >\n {slot?.char}\n {slot?.hasFakeCaret ? (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px\" />\n </div>\n ) : null}\n </div>\n );\n});\n\nInputOTPSlot.displayName = 'InputOTPSlot';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSeparator\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSeparatorElement = HTMLDivElement;\ntype InputOTPSeparatorProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPSeparator = React.forwardRef<InputOTPSeparatorElement, InputOTPSeparatorProps>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <DotFilledIcon />\n </div>\n));\n\nInputOTPSeparator.displayName = 'InputOTPSeparator';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n type InputOTPProps,\n type InputOTPGroupProps,\n type InputOTPSlotProps,\n type InputOTPSeparatorProps,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,iBAAAC,MAAqB,wBAC9B,OACE,YAAAC,EACA,mBAAAC,EACA,qBAAAC,EACA,sBAAAC,EACA,gCAAAC,MACK,YAYH,cAAAC,EAuCA,QAAAC,MAvCA,oBAFJ,IAAMC,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,CAAM,EAAGC,IAC5CN,EAACO,EAAA,CACC,IAAKD,EACL,UAAWE,EAAG,8BAA+BL,CAAS,EACtD,mBAAoBK,EAAG,qDAAsDJ,CAAkB,EAC9F,GAAGC,EACN,CAEJ,EAEAH,EAAS,YAAc,WASvB,IAAMO,EAAsB,aAAqD,CAAC,CAAE,UAAAN,EAAW,GAAGE,CAAM,EAAGC,IACzGN,EAAC,OAAI,IAAKM,EAAK,UAAWE,EAAG,oBAAqBL,CAAS,EAAI,GAAGE,EAAO,CAC1E,EAEDI,EAAc,YAAc,gBAY5B,IAAMC,EAAqB,aAAmD,CAAC,CAAE,MAAAC,EAAO,UAAAR,EAAW,GAAGE,CAAM,EAAGC,IAAQ,CAErH,IAAMM,EADwB,aAAWC,CAAe,EAC3B,MAAMF,CAAK,EAExC,OACEV,EAAC,OACC,IAAKK,EACL,UAAWE,EACT,8JACAI,GAAM,UAAY,yBAClBT,CACF,EACC,GAAGE,EAEH,UAAAO,GAAM,KACNA,GAAM,aACLZ,EAAC,OAAI,UAAU,wEACb,SAAAA,EAAC,OAAI,UAAU,mEAAmE,EACpF,EACE,MACN,CAEJ,CAAC,EAEDU,EAAa,YAAc,eAS3B,IAAMI,EAA0B,aAA6D,CAAC,CAAE,GAAGT,CAAM,EAAGC,IAC1GN,EAAC,OAAI,IAAKM,EAAK,KAAK,YAAa,GAAGD,EAClC,SAAAL,EAACe,EAAA,EAAc,EACjB,CACD,EAEDD,EAAkB,YAAc","names":["React","DotFilledIcon","OTPInput","OTPInputContext","REGEXP_ONLY_CHARS","REGEXP_ONLY_DIGITS","REGEXP_ONLY_DIGITS_AND_CHARS","jsx","jsxs","InputOTP","className","containerClassName","props","ref","OTPInput","cn","InputOTPGroup","InputOTPSlot","index","slot","OTPInputContext","InputOTPSeparator","DotFilledIcon"]}
1
+ {"version":3,"sources":["../../src/react/input-otp.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { DotFilledIcon } from '@radix-ui/react-icons';\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n} from 'input-otp';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOtp\n * -------------------------------------------------------------------------- */\n\ntype InputOTPElement = React.ElementRef<typeof OTPInput>;\ntype InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;\n\nconst InputOTP = React.forwardRef<InputOTPElement, InputOTPProps>(\n ({ className, containerClassName, ...props }, forwardedRef) => (\n <OTPInput\n ref={forwardedRef}\n className={cn('disabled:cursor-default', className)}\n containerClassName={cn('flex items-center gap-2 has-[:disabled]:opacity-50', containerClassName)}\n {...props}\n />\n ),\n);\n\nInputOTP.displayName = 'InputOTP';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPGroup\n * -------------------------------------------------------------------------- */\n\ntype InputOTPGroupElement = HTMLDivElement;\ntype InputOTPGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPGroup = React.forwardRef<InputOTPGroupElement, InputOTPGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <div ref={forwardedRef} className={cn('flex items-center', className)} {...props} />\n ),\n);\n\nInputOTPGroup.displayName = 'InputOTPGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSlot\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSlotElement = HTMLDivElement;\n\ninterface InputOTPSlotProps extends React.HTMLAttributes<HTMLDivElement> {\n index: number;\n}\n\nconst InputOTPSlot = React.forwardRef<InputOTPSlotElement, InputOTPSlotProps>(\n ({ index, className, ...props }, forwardedRef) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const slot = inputOTPContext.slots[index];\n\n return (\n <div\n ref={forwardedRef}\n className={cn(\n 'border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md',\n slot?.isActive && 'z-10 outline outline-2',\n className,\n )}\n {...props}\n >\n {slot?.char}\n {slot?.hasFakeCaret ? (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px\" />\n </div>\n ) : null}\n </div>\n );\n },\n);\n\nInputOTPSlot.displayName = 'InputOTPSlot';\n\n/* -----------------------------------------------------------------------------\n * Component: InputOTPSeparator\n * -------------------------------------------------------------------------- */\n\ntype InputOTPSeparatorElement = HTMLDivElement;\ntype InputOTPSeparatorProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst InputOTPSeparator = React.forwardRef<InputOTPSeparatorElement, InputOTPSeparatorProps>(\n ({ ...props }, forwardedRef) => (\n <div ref={forwardedRef} role=\"separator\" {...props}>\n <DotFilledIcon />\n </div>\n ),\n);\n\nInputOTPSeparator.displayName = 'InputOTPSeparator';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n type InputOTPProps,\n type InputOTPGroupProps,\n type InputOTPSlotProps,\n type InputOTPSeparatorProps,\n REGEXP_ONLY_DIGITS_AND_CHARS,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,iBAAAC,MAAqB,wBAC9B,OACE,YAAAC,EACA,mBAAAC,EACA,qBAAAC,EACA,sBAAAC,EACA,gCAAAC,MACK,YAYH,cAAAC,EA0CE,QAAAC,MA1CF,oBAFJ,IAAMC,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,CAAM,EAAGC,IAC5CN,EAACO,EAAA,CACC,IAAKD,EACL,UAAWE,EAAG,0BAA2BL,CAAS,EAClD,mBAAoBK,EAAG,qDAAsDJ,CAAkB,EAC9F,GAAGC,EACN,CAEJ,EAEAH,EAAS,YAAc,WASvB,IAAMO,EAAsB,aAC1B,CAAC,CAAE,UAAAN,EAAW,GAAGE,CAAM,EAAGC,IACxBN,EAAC,OAAI,IAAKM,EAAc,UAAWE,EAAG,oBAAqBL,CAAS,EAAI,GAAGE,EAAO,CAEtF,EAEAI,EAAc,YAAc,gBAY5B,IAAMC,EAAqB,aACzB,CAAC,CAAE,MAAAC,EAAO,UAAAR,EAAW,GAAGE,CAAM,EAAGC,IAAiB,CAEhD,IAAMM,EADwB,aAAWC,CAAe,EAC3B,MAAMF,CAAK,EAExC,OACEV,EAAC,OACC,IAAKK,EACL,UAAWE,EACT,8JACAI,GAAM,UAAY,yBAClBT,CACF,EACC,GAAGE,EAEH,UAAAO,GAAM,KACNA,GAAM,aACLZ,EAAC,OAAI,UAAU,wEACb,SAAAA,EAAC,OAAI,UAAU,mEAAmE,EACpF,EACE,MACN,CAEJ,CACF,EAEAU,EAAa,YAAc,eAS3B,IAAMI,EAA0B,aAC9B,CAAC,CAAE,GAAGT,CAAM,EAAGC,IACbN,EAAC,OAAI,IAAKM,EAAc,KAAK,YAAa,GAAGD,EAC3C,SAAAL,EAACe,EAAA,EAAc,EACjB,CAEJ,EAEAD,EAAkB,YAAc","names":["React","DotFilledIcon","OTPInput","OTPInputContext","REGEXP_ONLY_CHARS","REGEXP_ONLY_DIGITS","REGEXP_ONLY_DIGITS_AND_CHARS","jsx","jsxs","InputOTP","className","containerClassName","props","forwardedRef","OTPInput","cn","InputOTPGroup","InputOTPSlot","index","slot","OTPInputContext","InputOTPSeparator","DotFilledIcon"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _react = require('react'); var t = _interopRequireWildcard(_react);var _tailwindvariants = require('tailwind-variants');var _jsxruntime = require('react/jsx-runtime');var s=_tailwindvariants.tv.call(void 0, {base:"border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50",variants:{inputSize:{default:"h-10",xs:"h-8",sm:"h-9",lg:"h-11"}},defaultVariants:{inputSize:"default"}}),i= exports.Input =t.forwardRef(({className:e,inputSize:n,...p},r)=>_jsxruntime.jsx.call(void 0, "input",{ref:r,className:s({className:e,inputSize:n}),type:"text",...p}));i.displayName="Input";exports.Input = i;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunk3COHZ24Ecjs = require('../chunk-3COHZ24E.cjs');require('../chunk-LOJBMYTH.cjs');require('../chunk-NU6SK3FC.cjs');exports.Input = _chunk3COHZ24Ecjs.c; exports.InputSlot = _chunk3COHZ24Ecjs.d; exports.createInputScope = _chunk3COHZ24Ecjs.b; exports.inputVariants = _chunk3COHZ24Ecjs.a;
2
2
  //# sourceMappingURL=input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/input.tsx"],"names":["React","tv","jsx","inputVariants","Input","className","inputSize","props","ref"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,MAAAC,MAA6B,oBA+B7B,cAAAC,MAAA,oBAzBT,IAAMC,EAAgBF,EAAG,CACvB,KAAM,kUACN,SAAU,CACR,UAAW,CACT,QAAS,OACT,GAAI,MACJ,GAAI,MACJ,GAAI,MACN,CACF,EACA,gBAAiB,CACf,UAAW,SACb,CACF,CAAC,EAWKG,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACrFN,EAAC,SAAM,IAAKM,EAAK,UAAWL,EAAc,CAAE,UAAAE,EAAW,UAAAC,CAAU,CAAC,EAAG,KAAK,OAAQ,GAAGC,EAAO,CACpG,EAEDH,EAAM,YAAc","sourcesContent":["import * as React from 'react';\nimport { tv, type VariantProps } from 'tailwind-variants';\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = tv({\n base: 'border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n variants: {\n inputSize: {\n default: 'h-10',\n xs: 'h-8',\n sm: 'h-9',\n lg: 'h-11',\n },\n },\n defaultVariants: {\n inputSize: 'default',\n },\n});\n\ntype InputVariantsProps = VariantProps<typeof inputVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Input\n * -------------------------------------------------------------------------- */\n\ntype InputElement = HTMLInputElement;\ntype InputProps = React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps;\n\nconst Input = React.forwardRef<InputElement, InputProps>(({ className, inputSize, ...props }, ref) => {\n return <input ref={ref} className={inputVariants({ className, inputSize })} type=\"text\" {...props} />;\n});\n\nInput.displayName = 'Input';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Input, type InputProps };\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,3 +1,5 @@
1
+ import * as _radix_ui_react_context from '@radix-ui/react-context';
2
+ import { Scope } from '@radix-ui/react-context';
1
3
  import * as tailwind_variants from 'tailwind-variants';
2
4
  import { VariantProps } from 'tailwind-variants';
3
5
  import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
@@ -5,56 +7,133 @@ import * as React from 'react';
5
7
 
6
8
  declare const inputVariants: tailwind_variants.TVReturnType<{
7
9
  inputSize: {
8
- default: string;
9
- xs: string;
10
- sm: string;
11
- lg: string;
10
+ default: {
11
+ root: string;
12
+ };
13
+ xs: {
14
+ root: string;
15
+ };
16
+ sm: {
17
+ root: string;
18
+ };
19
+ lg: {
20
+ root: string;
21
+ };
12
22
  };
13
- }, undefined, "border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50", tailwind_variants_dist_config_js.TVConfig<{
23
+ }, {
24
+ root: string;
25
+ slot: string;
26
+ }, undefined, tailwind_variants_dist_config_js.TVConfig<{
14
27
  inputSize: {
15
- default: string;
16
- xs: string;
17
- sm: string;
18
- lg: string;
28
+ default: {
29
+ root: string;
30
+ };
31
+ xs: {
32
+ root: string;
33
+ };
34
+ sm: {
35
+ root: string;
36
+ };
37
+ lg: {
38
+ root: string;
39
+ };
19
40
  };
20
41
  }, {
21
42
  inputSize: {
22
- default: string;
23
- xs: string;
24
- sm: string;
25
- lg: string;
43
+ default: {
44
+ root: string;
45
+ };
46
+ xs: {
47
+ root: string;
48
+ };
49
+ sm: {
50
+ root: string;
51
+ };
52
+ lg: {
53
+ root: string;
54
+ };
26
55
  };
27
56
  }>, {
28
57
  inputSize: {
29
- default: string;
30
- xs: string;
31
- sm: string;
32
- lg: string;
58
+ default: {
59
+ root: string;
60
+ };
61
+ xs: {
62
+ root: string;
63
+ };
64
+ sm: {
65
+ root: string;
66
+ };
67
+ lg: {
68
+ root: string;
69
+ };
33
70
  };
34
- }, undefined, tailwind_variants.TVReturnType<{
71
+ }, {
72
+ root: string;
73
+ slot: string;
74
+ }, tailwind_variants.TVReturnType<{
35
75
  inputSize: {
36
- default: string;
37
- xs: string;
38
- sm: string;
39
- lg: string;
76
+ default: {
77
+ root: string;
78
+ };
79
+ xs: {
80
+ root: string;
81
+ };
82
+ sm: {
83
+ root: string;
84
+ };
85
+ lg: {
86
+ root: string;
87
+ };
40
88
  };
41
- }, undefined, "border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50", tailwind_variants_dist_config_js.TVConfig<{
89
+ }, {
90
+ root: string;
91
+ slot: string;
92
+ }, undefined, tailwind_variants_dist_config_js.TVConfig<{
42
93
  inputSize: {
43
- default: string;
44
- xs: string;
45
- sm: string;
46
- lg: string;
94
+ default: {
95
+ root: string;
96
+ };
97
+ xs: {
98
+ root: string;
99
+ };
100
+ sm: {
101
+ root: string;
102
+ };
103
+ lg: {
104
+ root: string;
105
+ };
47
106
  };
48
107
  }, {
49
108
  inputSize: {
50
- default: string;
51
- xs: string;
52
- sm: string;
53
- lg: string;
109
+ default: {
110
+ root: string;
111
+ };
112
+ xs: {
113
+ root: string;
114
+ };
115
+ sm: {
116
+ root: string;
117
+ };
118
+ lg: {
119
+ root: string;
120
+ };
54
121
  };
55
122
  }>, unknown, unknown, undefined>>;
56
123
  type InputVariantsProps = VariantProps<typeof inputVariants>;
57
- type InputProps = React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps;
58
- declare const Input: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps & React.RefAttributes<HTMLInputElement>>;
124
+ type ScopedProps<P> = P & {
125
+ __scopeInput?: Scope;
126
+ };
127
+ declare const createInputScope: _radix_ui_react_context.CreateScope;
128
+ interface InputProps extends React.PropsWithChildren, InputVariantsProps {
129
+ className?: string | undefined;
130
+ loaderPosition?: 'prefix' | 'suffix';
131
+ loading?: boolean;
132
+ prefix?: React.ReactNode;
133
+ suffix?: React.ReactNode;
134
+ }
135
+ declare function Input({ __scopeInput, className, prefix, suffix, loading, loaderPosition, inputSize, children, ...props }: ScopedProps<InputProps>): React.JSX.Element;
136
+ type InputSlotProps = React.InputHTMLAttributes<HTMLInputElement>;
137
+ declare const InputSlot: React.ForwardRefExoticComponent<InputSlotProps & React.RefAttributes<HTMLInputElement>>;
59
138
 
60
- export { Input, type InputProps };
139
+ export { Input, type InputProps, InputSlot, type InputSlotProps, type InputVariantsProps, createInputScope, inputVariants };
@@ -1,3 +1,5 @@
1
+ import * as _radix_ui_react_context from '@radix-ui/react-context';
2
+ import { Scope } from '@radix-ui/react-context';
1
3
  import * as tailwind_variants from 'tailwind-variants';
2
4
  import { VariantProps } from 'tailwind-variants';
3
5
  import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
@@ -5,56 +7,133 @@ import * as React from 'react';
5
7
 
6
8
  declare const inputVariants: tailwind_variants.TVReturnType<{
7
9
  inputSize: {
8
- default: string;
9
- xs: string;
10
- sm: string;
11
- lg: string;
10
+ default: {
11
+ root: string;
12
+ };
13
+ xs: {
14
+ root: string;
15
+ };
16
+ sm: {
17
+ root: string;
18
+ };
19
+ lg: {
20
+ root: string;
21
+ };
12
22
  };
13
- }, undefined, "border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50", tailwind_variants_dist_config_js.TVConfig<{
23
+ }, {
24
+ root: string;
25
+ slot: string;
26
+ }, undefined, tailwind_variants_dist_config_js.TVConfig<{
14
27
  inputSize: {
15
- default: string;
16
- xs: string;
17
- sm: string;
18
- lg: string;
28
+ default: {
29
+ root: string;
30
+ };
31
+ xs: {
32
+ root: string;
33
+ };
34
+ sm: {
35
+ root: string;
36
+ };
37
+ lg: {
38
+ root: string;
39
+ };
19
40
  };
20
41
  }, {
21
42
  inputSize: {
22
- default: string;
23
- xs: string;
24
- sm: string;
25
- lg: string;
43
+ default: {
44
+ root: string;
45
+ };
46
+ xs: {
47
+ root: string;
48
+ };
49
+ sm: {
50
+ root: string;
51
+ };
52
+ lg: {
53
+ root: string;
54
+ };
26
55
  };
27
56
  }>, {
28
57
  inputSize: {
29
- default: string;
30
- xs: string;
31
- sm: string;
32
- lg: string;
58
+ default: {
59
+ root: string;
60
+ };
61
+ xs: {
62
+ root: string;
63
+ };
64
+ sm: {
65
+ root: string;
66
+ };
67
+ lg: {
68
+ root: string;
69
+ };
33
70
  };
34
- }, undefined, tailwind_variants.TVReturnType<{
71
+ }, {
72
+ root: string;
73
+ slot: string;
74
+ }, tailwind_variants.TVReturnType<{
35
75
  inputSize: {
36
- default: string;
37
- xs: string;
38
- sm: string;
39
- lg: string;
76
+ default: {
77
+ root: string;
78
+ };
79
+ xs: {
80
+ root: string;
81
+ };
82
+ sm: {
83
+ root: string;
84
+ };
85
+ lg: {
86
+ root: string;
87
+ };
40
88
  };
41
- }, undefined, "border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50", tailwind_variants_dist_config_js.TVConfig<{
89
+ }, {
90
+ root: string;
91
+ slot: string;
92
+ }, undefined, tailwind_variants_dist_config_js.TVConfig<{
42
93
  inputSize: {
43
- default: string;
44
- xs: string;
45
- sm: string;
46
- lg: string;
94
+ default: {
95
+ root: string;
96
+ };
97
+ xs: {
98
+ root: string;
99
+ };
100
+ sm: {
101
+ root: string;
102
+ };
103
+ lg: {
104
+ root: string;
105
+ };
47
106
  };
48
107
  }, {
49
108
  inputSize: {
50
- default: string;
51
- xs: string;
52
- sm: string;
53
- lg: string;
109
+ default: {
110
+ root: string;
111
+ };
112
+ xs: {
113
+ root: string;
114
+ };
115
+ sm: {
116
+ root: string;
117
+ };
118
+ lg: {
119
+ root: string;
120
+ };
54
121
  };
55
122
  }>, unknown, unknown, undefined>>;
56
123
  type InputVariantsProps = VariantProps<typeof inputVariants>;
57
- type InputProps = React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps;
58
- declare const Input: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps & React.RefAttributes<HTMLInputElement>>;
124
+ type ScopedProps<P> = P & {
125
+ __scopeInput?: Scope;
126
+ };
127
+ declare const createInputScope: _radix_ui_react_context.CreateScope;
128
+ interface InputProps extends React.PropsWithChildren, InputVariantsProps {
129
+ className?: string | undefined;
130
+ loaderPosition?: 'prefix' | 'suffix';
131
+ loading?: boolean;
132
+ prefix?: React.ReactNode;
133
+ suffix?: React.ReactNode;
134
+ }
135
+ declare function Input({ __scopeInput, className, prefix, suffix, loading, loaderPosition, inputSize, children, ...props }: ScopedProps<InputProps>): React.JSX.Element;
136
+ type InputSlotProps = React.InputHTMLAttributes<HTMLInputElement>;
137
+ declare const InputSlot: React.ForwardRefExoticComponent<InputSlotProps & React.RefAttributes<HTMLInputElement>>;
59
138
 
60
- export { Input, type InputProps };
139
+ export { Input, type InputProps, InputSlot, type InputSlotProps, type InputVariantsProps, createInputScope, inputVariants };
@@ -1,2 +1,2 @@
1
- import*as t from"react";import{tv as a}from"tailwind-variants";import{jsx as o}from"react/jsx-runtime";var s=a({base:"border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50",variants:{inputSize:{default:"h-10",xs:"h-8",sm:"h-9",lg:"h-11"}},defaultVariants:{inputSize:"default"}}),i=t.forwardRef(({className:e,inputSize:n,...p},r)=>o("input",{ref:r,className:s({className:e,inputSize:n}),type:"text",...p}));i.displayName="Input";export{i as Input};
1
+ "use client";import{a,b,c,d}from"../chunk-AVEDWLNQ.js";import"../chunk-RBP4PBCK.js";import"../chunk-5UXVZTFG.js";export{c as Input,d as InputSlot,b as createInputScope,a as inputVariants};
2
2
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/input.tsx"],"sourcesContent":["import * as React from 'react';\nimport { tv, type VariantProps } from 'tailwind-variants';\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = tv({\n base: 'border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n variants: {\n inputSize: {\n default: 'h-10',\n xs: 'h-8',\n sm: 'h-9',\n lg: 'h-11',\n },\n },\n defaultVariants: {\n inputSize: 'default',\n },\n});\n\ntype InputVariantsProps = VariantProps<typeof inputVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Input\n * -------------------------------------------------------------------------- */\n\ntype InputElement = HTMLInputElement;\ntype InputProps = React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps;\n\nconst Input = React.forwardRef<InputElement, InputProps>(({ className, inputSize, ...props }, ref) => {\n return <input ref={ref} className={inputVariants({ className, inputSize })} type=\"text\" {...props} />;\n});\n\nInput.displayName = 'Input';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Input, type InputProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,MAAAC,MAA6B,oBA+B7B,cAAAC,MAAA,oBAzBT,IAAMC,EAAgBF,EAAG,CACvB,KAAM,kUACN,SAAU,CACR,UAAW,CACT,QAAS,OACT,GAAI,MACJ,GAAI,MACJ,GAAI,MACN,CACF,EACA,gBAAiB,CACf,UAAW,SACb,CACF,CAAC,EAWKG,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACrFN,EAAC,SAAM,IAAKM,EAAK,UAAWL,EAAc,CAAE,UAAAE,EAAW,UAAAC,CAAU,CAAC,EAAG,KAAK,OAAQ,GAAGC,EAAO,CACpG,EAEDH,EAAM,YAAc","names":["React","tv","jsx","inputVariants","Input","className","inputSize","props","ref"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/kbd.tsx"],"names":["React","Slot","jsx","Kbd","asChild","className","props","ref","cn"],"mappings":"0CAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAiBjB,cAAAC,MAAA,oBAJJ,IAAMC,EAAY,aAAiC,CAAC,CAAE,QAAAC,EAAS,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAIlFL,EAHgBE,EAAUH,EAAO,MAGhC,CACC,IAAKM,EACL,UAAWC,EACT,oIACAH,CACF,EACC,GAAGC,EACN,CAEH,EAEDH,EAAI,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Kbd\n * -------------------------------------------------------------------------- */\n\ntype KbdElement = HTMLElement;\n\ninterface KbdProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Kbd = React.forwardRef<KbdElement, KbdProps>(({ asChild, className, ...props }, ref) => {\n const Component = asChild ? Slot : 'kbd';\n\n return (\n <Component\n ref={ref}\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-5 select-none items-center gap-1 rounded border px-1.5 font-mono text-xs font-medium',\n className,\n )}\n {...props}\n />\n );\n});\n\nKbd.displayName = 'Kbd';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Kbd, type KbdProps };\n"]}
1
+ {"version":3,"sources":["../../src/react/kbd.tsx"],"names":["React","Slot","jsx","Kbd","asChild","className","props","forwardedRef","cn"],"mappings":"0CAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAiBjB,cAAAC,MAAA,oBAJJ,IAAMC,EAAY,aAAiC,CAAC,CAAE,QAAAC,EAAS,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAIlFL,EAHgBE,EAAUH,EAAO,MAGhC,CACC,IAAKM,EACL,UAAWC,EACT,oIACAH,CACF,EACC,GAAGC,EACN,CAEH,EAEDH,EAAI,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Kbd\n * -------------------------------------------------------------------------- */\n\ntype KbdElement = HTMLElement;\n\ninterface KbdProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Kbd = React.forwardRef<KbdElement, KbdProps>(({ asChild, className, ...props }, forwardedRef) => {\n const Component = asChild ? Slot : 'kbd';\n\n return (\n <Component\n ref={forwardedRef}\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-5 select-none items-center gap-1 rounded border px-1.5 font-mono text-xs font-medium',\n className,\n )}\n {...props}\n />\n );\n});\n\nKbd.displayName = 'Kbd';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Kbd, type KbdProps };\n"]}