@codefast/ui 0.0.55 → 0.0.57

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 (93) hide show
  1. package/dist/{chunk-MFYACCZV.mjs → chunk-77I644ZX.mjs} +1 -1
  2. package/dist/{chunk-MFYACCZV.mjs.map → chunk-77I644ZX.mjs.map} +1 -1
  3. package/dist/{chunk-VZVI3OHH.js → chunk-BEBSUUL4.js} +2 -2
  4. package/dist/{chunk-VZVI3OHH.js.map → chunk-BEBSUUL4.js.map} +1 -1
  5. package/dist/{chunk-4JHGPRLG.js → chunk-JI2ITVUE.js} +1 -1
  6. package/dist/{chunk-4JHGPRLG.js.map → chunk-JI2ITVUE.js.map} +1 -1
  7. package/dist/{chunk-X4BEEJEW.js → chunk-P2RMYMNK.js} +2 -2
  8. package/dist/chunk-P2RMYMNK.js.map +1 -0
  9. package/dist/{chunk-K63K4LTH.mjs → chunk-QXZKUXR2.mjs} +2 -2
  10. package/dist/chunk-QXZKUXR2.mjs.map +1 -0
  11. package/dist/{chunk-7ABWX5CF.mjs → chunk-TVVOS66G.mjs} +2 -2
  12. package/dist/{chunk-7ABWX5CF.mjs.map → chunk-TVVOS66G.mjs.map} +1 -1
  13. package/dist/{chunk-SCXRD727.js → chunk-VE44YFJR.js} +1 -1
  14. package/dist/{chunk-SCXRD727.js.map → chunk-VE44YFJR.js.map} +1 -1
  15. package/dist/{chunk-5RENVAXH.mjs → chunk-W3VRLCP7.mjs} +1 -1
  16. package/dist/{chunk-5RENVAXH.mjs.map → chunk-W3VRLCP7.mjs.map} +1 -1
  17. package/dist/plugin/animate.plugin.js +1 -1
  18. package/dist/plugin/animate.plugin.mjs +1 -1
  19. package/dist/react/alert-dialog.js +1 -1
  20. package/dist/react/alert-dialog.mjs +1 -1
  21. package/dist/react/alert.js.map +1 -1
  22. package/dist/react/alert.mjs.map +1 -1
  23. package/dist/react/badge.js.map +1 -1
  24. package/dist/react/badge.mjs.map +1 -1
  25. package/dist/react/button.js +1 -1
  26. package/dist/react/button.mjs +1 -1
  27. package/dist/react/calendar.js +1 -1
  28. package/dist/react/calendar.js.map +1 -1
  29. package/dist/react/calendar.mjs +1 -1
  30. package/dist/react/calendar.mjs.map +1 -1
  31. package/dist/react/carousel.js +1 -1
  32. package/dist/react/carousel.js.map +1 -1
  33. package/dist/react/carousel.mjs +1 -1
  34. package/dist/react/carousel.mjs.map +1 -1
  35. package/dist/react/checkbox-cards.js +1 -1
  36. package/dist/react/checkbox-cards.mjs +1 -1
  37. package/dist/react/checkbox-group.js +1 -1
  38. package/dist/react/checkbox-group.mjs +1 -1
  39. package/dist/react/checkbox-group.primitive.js +1 -1
  40. package/dist/react/checkbox-group.primitive.mjs +1 -1
  41. package/dist/react/data-table.js +1 -1
  42. package/dist/react/data-table.js.map +1 -1
  43. package/dist/react/data-table.mjs +1 -1
  44. package/dist/react/data-table.mjs.map +1 -1
  45. package/dist/react/form.js.map +1 -1
  46. package/dist/react/form.mjs.map +1 -1
  47. package/dist/react/input.js.map +1 -1
  48. package/dist/react/input.mjs.map +1 -1
  49. package/dist/react/pagination.js +1 -1
  50. package/dist/react/pagination.js.map +1 -1
  51. package/dist/react/pagination.mjs +1 -1
  52. package/dist/react/pagination.mjs.map +1 -1
  53. package/dist/react/scroll-area.d.mts +63 -2
  54. package/dist/react/scroll-area.d.ts +63 -2
  55. package/dist/react/scroll-area.js +1 -1
  56. package/dist/react/scroll-area.js.map +1 -1
  57. package/dist/react/scroll-area.mjs +1 -1
  58. package/dist/react/scroll-area.mjs.map +1 -1
  59. package/dist/react/sheet.js +1 -1
  60. package/dist/react/sheet.js.map +1 -1
  61. package/dist/react/sheet.mjs +1 -1
  62. package/dist/react/sheet.mjs.map +1 -1
  63. package/dist/react/toggle-group.js +1 -1
  64. package/dist/react/toggle-group.js.map +1 -1
  65. package/dist/react/toggle-group.mjs +1 -1
  66. package/dist/react/toggle-group.mjs.map +1 -1
  67. package/dist/react/toggle.js +1 -1
  68. package/dist/react/toggle.mjs +1 -1
  69. package/dist/styles.css +1 -1
  70. package/dist/styles.css.map +1 -1
  71. package/dist/tailwind.config.js +1 -1
  72. package/dist/tailwind.config.js.map +1 -1
  73. package/dist/tailwind.config.mjs +1 -1
  74. package/dist/tailwind.config.mjs.map +1 -1
  75. package/package.json +2 -2
  76. package/plugin/animate.plugin.ts +1 -1
  77. package/src/react/alert.tsx +1 -1
  78. package/src/react/badge.tsx +1 -1
  79. package/src/react/button.tsx +1 -1
  80. package/src/react/calendar.tsx +1 -2
  81. package/src/react/carousel.tsx +2 -4
  82. package/src/react/checkbox-group.primitive.tsx +1 -2
  83. package/src/react/data-table.tsx +1 -1
  84. package/src/react/form.tsx +1 -1
  85. package/src/react/input.tsx +1 -1
  86. package/src/react/pagination.tsx +1 -2
  87. package/src/react/scroll-area.tsx +75 -25
  88. package/src/react/sheet.tsx +1 -1
  89. package/src/react/toggle-group.tsx +2 -4
  90. package/src/react/toggle.tsx +1 -1
  91. package/tailwind.config.ts +1 -1
  92. package/dist/chunk-K63K4LTH.mjs.map +0 -1
  93. package/dist/chunk-X4BEEJEW.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/form.tsx"],"names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","fieldState","id","Form","FormField","props","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","FormDescription","FormMessage","children","body"],"mappings":"+FAEA,UAAYA,MAAW,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,E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CAAc,EAAIpB,EAAa,EAE7E,OACEH,EAACJ,EAAA,CACC,IAAKmB,EACL,GAAII,EACJ,mBAAmBD,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAC3B,eAAc,EAAQJ,EACrB,GAAGN,EACN,CAEJ,CAAC,EAEDS,EAAY,YAAc,cAS1B,IAAMG,EAAwB,aAC5B,CAAC,CAAE,UAAAV,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAChC,GAAM,CAAE,kBAAAO,CAAkB,EAAInB,EAAa,EAE3C,OAAOH,EAAC,KAAE,IAAKe,EAAK,GAAIO,EAAmB,UAAWN,EAAG,gCAAiCF,CAAS,EAAI,GAAGF,EAAO,CACnH,CACF,EAEAY,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aAAiD,CAAC,CAAE,SAAAC,EAAU,UAAAZ,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CACrH,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIpB,EAAa,EACxCwB,EAAOT,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAIQ,EAEtD,OAAKC,EAKH3B,EAAC,KAAE,IAAKe,EAAK,GAAIQ,EAAe,UAAWP,EAAG,uCAAwCF,CAAS,EAAI,GAAGF,EACnG,SAAAe,EACH,EANO,IAQX,CAAC,EAEDF,EAAY,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { 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 { cn } from '../lib/utils';\nimport { Label } from './label';\nimport type * as LabelPrimitive from '@radix-ui/react-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 error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\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} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />;\n});\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n});\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return <p ref={ref} id={formDescriptionId} className={cn('text-muted-foreground text-xs', className)} {...props} />;\n },\n);\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn('text-destructive text-xs font-medium', className)} {...props}>\n {body}\n </p>\n );\n});\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/form.tsx"],"names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","fieldState","id","Form","FormField","props","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","FormDescription","FormMessage","children","body"],"mappings":"+FAEA,UAAYA,MAAW,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,EAAIR,EAAe,EAEpD,GAAI,CAACK,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMG,EAAaF,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAE,CAAG,EAAIJ,EAEf,MAAO,C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AY,YAAc,cAS1B,IAAMG,EAAwB,aAC5B,CAAC,CAAE,UAAAV,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAChC,GAAM,CAAE,kBAAAO,CAAkB,EAAInB,EAAa,EAE3C,OAAOH,EAAC,KAAE,IAAKe,EAAK,GAAIO,EAAmB,UAAWN,EAAG,gCAAiCF,CAAS,EAAI,GAAGF,EAAO,CACnH,CACF,EAEAY,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aAAiD,CAAC,CAAE,SAAAC,EAAU,UAAAZ,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CACrH,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIpB,EAAa,EACxCwB,EAAOT,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAIQ,EAEtD,OAAKC,EAKH3B,EAAC,KAAE,IAAKe,EAAK,GAAIQ,EAAe,UAAWP,EAAG,uCAAwCF,CAAS,EAAI,GAAGF,EACnG,SAAAe,EACH,EANO,IAQX,CAAC,EAEDF,EAAY,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { 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 error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\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} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />;\n});\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n});\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return <p ref={ref} id={formDescriptionId} className={cn('text-muted-foreground text-xs', className)} {...props} />;\n },\n);\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn('text-destructive text-xs font-medium', className)} {...props}>\n {body}\n </p>\n );\n});\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"]}
@@ -1 +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 { cn } from '../lib/utils';\nimport { Label } from './label';\nimport type * as LabelPrimitive from '@radix-ui/react-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 error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\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} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />;\n});\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n});\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return <p ref={ref} id={formDescriptionId} className={cn('text-muted-foreground text-xs', className)} {...props} />;\n },\n);\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn('text-destructive text-xs font-medium', className)} {...props}>\n {body}\n </p>\n );\n});\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLab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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 error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\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} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />;\n});\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n});\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return <p ref={ref} id={formDescriptionId} className={cn('text-muted-foreground text-xs', className)} {...props} />;\n },\n);\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn('text-destructive text-xs font-medium', className)} {...props}>\n {body}\n </p>\n );\n});\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"],"mappings":"iGAEA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAMA,gBAAAC,EAEA,kBAAAC,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EAAG,QAASK,EAAa,GAAGR,EAAO,CACjH,CAAC,EAEDM,EAAU,YAAc,YASxB,IAAMI,EAAoB,aAAiD,CAAC,CAAE,GAAGV,CAAM,EAAGI,IAAQ,CAChG,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAAIvB,EAAa,EAE7E,OACEH,EAAC2B,EAAA,CACC,IAAKT,EACL,GAAII,EACJ,mBAAmBD,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAC3B,eAAc,EAAQJ,EACrB,GAAGP,EACN,CAEJ,CAAC,EAEDU,EAAY,YAAc,cAS1B,IAAMI,EAAwB,aAC5B,CAAC,CAAE,UAAAX,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAChC,GAAM,CAAE,kBAAAO,CAAkB,EAAItB,EAAa,EAE3C,OAAOH,EAAC,KAAE,IAAKkB,EAAK,GAAIO,EAAmB,UAAWN,EAAG,gCAAiCF,CAAS,EAAI,GAAGH,EAAO,CACnH,CACF,EAEAc,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aAAiD,CAAC,CAAE,SAAAC,EAAU,UAAAb,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CACrH,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIvB,EAAa,EACxC4B,EAAOV,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAIS,EAEtD,OAAKC,EAKH/B,EAAC,KAAE,IAAKkB,EAAK,GAAIQ,EAAe,UAAWP,EAAG,uCAAwCF,CAAS,EAAI,GAAGH,EACnG,SAAAiB,EACH,EANO,IAQX,CAAC,EAEDF,EAAY,YAAc","names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","useFormContext","fieldState","id","Form","FormProvider","FormField","props","Controller","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/input.tsx"],"names":["React","jsx","inputVariants","cva","Input","className","inputSize","props","ref"],"mappings":"yCAAA,UAAYA,MAAW,QAiCd,cAAAC,MAAA,oBAzBT,IAAMC,EAAgBC,EAAI,CACxB,KAAM,kUACN,SAAU,CACR,UAAW,CACT,QAAS,OACT,GAAI,MACJ,GAAI,MACJ,GAAI,MACN,CACF,EACA,gBAAiB,CACf,UAAW,SACb,CACF,CAAC,EAWKC,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACrFP,EAAC,SAAM,KAAK,OAAO,UAAWC,EAAc,CAAE,UAAAG,EAAW,UAAAC,CAAU,CAAC,EAAG,IAAKE,EAAM,GAAGD,EAAO,CACpG,EAEDH,EAAM,YAAc","sourcesContent":["import * as React from 'react';\nimport { cva } from '../lib/utils';\nimport type { VariantProps } from 'cva';\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = cva({\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 type=\"text\" className={inputVariants({ className, inputSize })} ref={ref} {...props} />;\n});\n\nInput.displayName = 'Input';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Input, type InputProps };\n"]}
1
+ {"version":3,"sources":["../../src/react/input.tsx"],"names":["React","jsx","inputVariants","cva","Input","className","inputSize","props","ref"],"mappings":"yCAAA,UAAYA,MAAW,QAiCd,cAAAC,MAAA,oBAzBT,IAAMC,EAAgBC,EAAI,CACxB,KAAM,kUACN,SAAU,CACR,UAAW,CACT,QAAS,OACT,GAAI,MACJ,GAAI,MACJ,GAAI,MACN,CACF,EACA,gBAAiB,CACf,UAAW,SACb,CACF,CAAC,EAWKC,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACrFP,EAAC,SAAM,KAAK,OAAO,UAAWC,EAAc,CAAE,UAAAG,EAAW,UAAAC,CAAU,CAAC,EAAG,IAAKE,EAAM,GAAGD,EAAO,CACpG,EAEDH,EAAM,YAAc","sourcesContent":["import * as React from 'react';\nimport { type VariantProps } from 'cva';\nimport { cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = cva({\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 type=\"text\" className={inputVariants({ className, inputSize })} ref={ref} {...props} />;\n});\n\nInput.displayName = 'Input';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Input, type InputProps };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/input.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cva } from '../lib/utils';\nimport type { VariantProps } from 'cva';\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = cva({\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 type=\"text\" className={inputVariants({ className, inputSize })} ref={ref} {...props} />;\n});\n\nInput.displayName = 'Input';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Input, type InputProps };\n"],"mappings":"0CAAA,UAAYA,MAAW,QAiCd,cAAAC,MAAA,oBAzBT,IAAMC,EAAgBC,EAAI,CACxB,KAAM,kUACN,SAAU,CACR,UAAW,CACT,QAAS,OACT,GAAI,MACJ,GAAI,MACJ,GAAI,MACN,CACF,EACA,gBAAiB,CACf,UAAW,SACb,CACF,CAAC,EAWKC,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACrFP,EAAC,SAAM,KAAK,OAAO,UAAWC,EAAc,CAAE,UAAAG,EAAW,UAAAC,CAAU,CAAC,EAAG,IAAKE,EAAM,GAAGD,EAAO,CACpG,EAEDH,EAAM,YAAc","names":["React","jsx","inputVariants","cva","Input","className","inputSize","props","ref"]}
1
+ {"version":3,"sources":["../../src/react/input.tsx"],"sourcesContent":["import * as React from 'react';\nimport { type VariantProps } from 'cva';\nimport { cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Variant: Input\n * -------------------------------------------------------------------------- */\n\nconst inputVariants = cva({\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 type=\"text\" className={inputVariants({ className, inputSize })} ref={ref} {...props} />;\n});\n\nInput.displayName = 'Input';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Input, type InputProps };\n"],"mappings":"0CAAA,UAAYA,MAAW,QAiCd,cAAAC,MAAA,oBAzBT,IAAMC,EAAgBC,EAAI,CACxB,KAAM,kUACN,SAAU,CACR,UAAW,CACT,QAAS,OACT,GAAI,MACJ,GAAI,MACJ,GAAI,MACN,CACF,EACA,gBAAiB,CACf,UAAW,SACb,CACF,CAAC,EAWKC,EAAc,aAAqC,CAAC,CAAE,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACrFP,EAAC,SAAM,KAAK,OAAO,UAAWC,EAAc,CAAE,UAAAG,EAAW,UAAAC,CAAU,CAAC,EAAG,IAAKE,EAAM,GAAGD,EAAO,CACpG,EAEDH,EAAM,YAAc","names":["React","jsx","inputVariants","cva","Input","className","inputSize","props","ref"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkVZVI3OHHjs = require('../chunk-VZVI3OHH.js');require('../chunk-46W6RAYD.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function N({className:n,...t}){return _jsxruntime.jsx.call(void 0, "nav",{role:"navigation","aria-label":"pagination",className:_chunkHQ4AUOQMjs.b.call(void 0, "mx-auto flex w-full justify-center",n),...t})}var u=o.forwardRef(({className:n,...t},i)=>_jsxruntime.jsx.call(void 0, "ul",{ref:i,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return _jsxruntime.jsx.call(void 0, "a",{"aria-current":t?"page":void 0,className:_chunkVZVI3OHHjs.a.call(void 0, {variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to previous page",size:"default",className:_chunkHQ4AUOQMjs.b.call(void 0, "gap-1 pl-2.5",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{children:"Previous"})]})}function H({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to next page",size:"default",className:_chunkHQ4AUOQMjs.b.call(void 0, "gap-1 pr-2.5",n),...t,children:[_jsxruntime.jsx.call(void 0, "span",{children:"Next"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]})}function M({className:n,...t}){return _jsxruntime.jsxs.call(void 0, "span",{"aria-hidden":!0,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex size-10 items-center justify-center",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.DotsHorizontalIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"More pages"})]})}exports.Pagination = N; exports.PaginationContent = u; exports.PaginationEllipsis = M; exports.PaginationItem = f; exports.PaginationLink = p; exports.PaginationNext = H; exports.PaginationPrevious = R;
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 _chunkBEBSUUL4js = require('../chunk-BEBSUUL4.js');require('../chunk-46W6RAYD.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function N({className:n,...t}){return _jsxruntime.jsx.call(void 0, "nav",{role:"navigation","aria-label":"pagination",className:_chunkHQ4AUOQMjs.b.call(void 0, "mx-auto flex w-full justify-center",n),...t})}var u=o.forwardRef(({className:n,...t},i)=>_jsxruntime.jsx.call(void 0, "ul",{ref:i,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return _jsxruntime.jsx.call(void 0, "a",{"aria-current":t?"page":void 0,className:_chunkBEBSUUL4js.a.call(void 0, {variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to previous page",size:"default",className:_chunkHQ4AUOQMjs.b.call(void 0, "gap-1 pl-2.5",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{children:"Previous"})]})}function H({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to next page",size:"default",className:_chunkHQ4AUOQMjs.b.call(void 0, "gap-1 pr-2.5",n),...t,children:[_jsxruntime.jsx.call(void 0, "span",{children:"Next"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]})}function M({className:n,...t}){return _jsxruntime.jsxs.call(void 0, "span",{"aria-hidden":!0,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex size-10 items-center justify-center",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.DotsHorizontalIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"More pages"})]})}exports.Pagination = N; exports.PaginationContent = u; exports.PaginationEllipsis = M; exports.PaginationItem = f; exports.PaginationLink = p; exports.PaginationNext = H; exports.PaginationPrevious = R;
2
2
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/pagination.tsx"],"names":["React","ChevronLeftIcon","ChevronRightIcon","DotsHorizontalIcon","jsx","jsxs","Pagination","className","props","cn","PaginationContent","ref","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious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EAAG,eAAgBF,CAAS,EAAI,GAAGC,EACxG,UAAAJ,EAAC,QAAK,gBAAI,EACVA,EAACF,EAAA,CAAiB,UAAU,SAAS,GACvC,CAEJ,CAQA,SAASkB,EAAmB,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAA+C,CAC/F,OACEH,EAAC,QAAK,cAAW,GAAC,UAAWI,EAAG,2CAA4CF,CAAS,EAAI,GAAGC,EAC1F,UAAAJ,EAACD,EAAA,CAAmB,UAAU,SAAS,EACvCC,EAAC,QAAK,UAAU,UAAU,sBAAU,GACtC,CAEJ","sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\nimport { buttonVariants } from './button';\nimport type { ButtonProps } from './button';\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\n\nfunction Pagination({ className, ...props }: PaginationProps): React.JSX.Element {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentElement = HTMLUListElement;\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\n\nconst PaginationContent = React.forwardRef<PaginationContentElement, PaginationContentProps>(\n ({ className, ...props }, ref) => (\n <ul ref={ref} className={cn('flex flex-row items-center gap-1', className)} {...props} />\n ),\n);\n\nPaginationContent.displayName = 'PaginationContent';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemElement = HTMLLIElement;\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nconst PaginationItem = React.forwardRef<PaginationItemElement, PaginationItemProps>((props, ref) => (\n <li ref={ref} {...props} />\n));\n\nPaginationItem.displayName = 'PaginationItem';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, 'size'> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = 'icon',\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\n\nfunction PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\n\nfunction PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"default\" className={cn('gap-1 pr-2.5', className)} {...props}>\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span aria-hidden className={cn('flex size-10 items-center justify-center', className)} {...props}>\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/pagination.tsx"],"names":["React","ChevronLeftIcon","ChevronRightIcon","DotsHorizontalIcon","jsx","jsxs","Pagination","className","props","cn","PaginationContent","ref","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious","PaginationNext","PaginationEllipsis"],"mappings":"+GAAA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,EAAiB,oBAAAC,EAAkB,sBAAAC,MAA0B,wBAYlE,cAAAC,EA2EA,QAAAC,MA3EA,oBAFJ,SAASC,EAAW,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAuC,CAC/E,OACEJ,EAAC,OACC,KAAK,aACL,aAAW,aACX,UAAWK,EAAG,qCAAsCF,CAAS,EAC5D,GAAGC,EACN,CAEJ,CASA,IAAME,EAA0B,aAC9B,CAAC,CAAE,UAAAH,EAAW,GAAGC,CAAM,EAAGG,IACxBP,EAAC,MAAG,IAAKO,EAAK,UAAWF,EAAG,mCAAoCF,CAAS,EAAI,GAAGC,EAAO,CAE3F,EAEAE,EAAkB,YAAc,oBAShC,IAAME,EAAuB,aAAuD,CAACJ,EAAOG,IAC1FP,EAAC,MAAG,IAAKO,EAAM,GAAGH,EAAO,CAC1B,EAEDI,EAAe,YAAc,iBAU7B,SAASC,EAAe,CACtB,UAAAN,EACA,SAAAO,EACA,KAAAC,EAAO,OACP,SAAAC,EACA,GAAGR,CACL,EAA2C,CACzC,OACEJ,EAAC,KACC,eAAcU,EAAW,OAAS,OAClC,UAAWG,EAAe,CACxB,QAASH,EAAW,UAAY,QAChC,KAAAC,EACA,UAAAR,CACF,CAAC,EACA,GAAGC,EAEH,SAAAQ,EACH,CAEJ,CAQA,SAASE,EAAmB,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAA+C,CAC/F,OACEH,EAACQ,EAAA,CACC,aAAW,sBACX,KAAK,UACL,UAAWJ,EAAG,eAAgBF,CAAS,EACtC,GAAGC,EAEJ,UAAAJ,EAACH,EAAA,CAAgB,UAAU,SAAS,EACpCG,EAAC,QAAK,oBAAQ,GAChB,CAEJ,CAQA,SAASe,EAAe,CAAE,UAAAZ,EAAW,GAAGC,CAAM,EAA2C,CACvF,OACEH,EAACQ,EAAA,CAAe,aAAW,kBAAkB,KAAK,UAAU,UAAWJ,EAAG,eAAgBF,CAAS,EAAI,GAAGC,EACxG,UAAAJ,EAAC,QAAK,gBAAI,EACVA,EAACF,EAAA,CAAiB,UAAU,SAAS,GACvC,CAEJ,CAQA,SAASkB,EAAmB,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAA+C,CAC/F,OACEH,EAAC,QAAK,cAAW,GAAC,UAAWI,EAAG,2CAA4CF,CAAS,EAAI,GAAGC,EAC1F,UAAAJ,EAACD,EAAA,CAAmB,UAAU,SAAS,EACvCC,EAAC,QAAK,UAAU,UAAU,sBAAU,GACtC,CAEJ","sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\nimport { buttonVariants, type ButtonProps } from './button';\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\n\nfunction Pagination({ className, ...props }: PaginationProps): React.JSX.Element {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentElement = HTMLUListElement;\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\n\nconst PaginationContent = React.forwardRef<PaginationContentElement, PaginationContentProps>(\n ({ className, ...props }, ref) => (\n <ul ref={ref} className={cn('flex flex-row items-center gap-1', className)} {...props} />\n ),\n);\n\nPaginationContent.displayName = 'PaginationContent';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemElement = HTMLLIElement;\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nconst PaginationItem = React.forwardRef<PaginationItemElement, PaginationItemProps>((props, ref) => (\n <li ref={ref} {...props} />\n));\n\nPaginationItem.displayName = 'PaginationItem';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, 'size'> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = 'icon',\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\n\nfunction PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\n\nfunction PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"default\" className={cn('gap-1 pr-2.5', className)} {...props}>\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span aria-hidden className={cn('flex size-10 items-center justify-center', className)} {...props}>\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- import{a as r}from"../chunk-7ABWX5CF.mjs";import"../chunk-BNKSZEF2.mjs";import{b as e}from"../chunk-LEUB3C3L.mjs";import*as o from"react";import{ChevronLeftIcon as g,ChevronRightIcon as m,DotsHorizontalIcon as c}from"@radix-ui/react-icons";import{jsx as a,jsxs as s}from"react/jsx-runtime";function N({className:n,...t}){return a("nav",{role:"navigation","aria-label":"pagination",className:e("mx-auto flex w-full justify-center",n),...t})}var u=o.forwardRef(({className:n,...t},i)=>a("ul",{ref:i,className:e("flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>a("li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return a("a",{"aria-current":t?"page":void 0,className:r({variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return s(p,{"aria-label":"Go to previous page",size:"default",className:e("gap-1 pl-2.5",n),...t,children:[a(g,{className:"size-4"}),a("span",{children:"Previous"})]})}function H({className:n,...t}){return s(p,{"aria-label":"Go to next page",size:"default",className:e("gap-1 pr-2.5",n),...t,children:[a("span",{children:"Next"}),a(m,{className:"size-4"})]})}function M({className:n,...t}){return s("span",{"aria-hidden":!0,className:e("flex size-10 items-center justify-center",n),...t,children:[a(c,{className:"size-4"}),a("span",{className:"sr-only",children:"More pages"})]})}export{N as Pagination,u as PaginationContent,M as PaginationEllipsis,f as PaginationItem,p as PaginationLink,H as PaginationNext,R as PaginationPrevious};
1
+ import{a as r}from"../chunk-TVVOS66G.mjs";import"../chunk-BNKSZEF2.mjs";import{b as e}from"../chunk-LEUB3C3L.mjs";import*as o from"react";import{ChevronLeftIcon as g,ChevronRightIcon as m,DotsHorizontalIcon as c}from"@radix-ui/react-icons";import{jsx as a,jsxs as s}from"react/jsx-runtime";function N({className:n,...t}){return a("nav",{role:"navigation","aria-label":"pagination",className:e("mx-auto flex w-full justify-center",n),...t})}var u=o.forwardRef(({className:n,...t},i)=>a("ul",{ref:i,className:e("flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>a("li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return a("a",{"aria-current":t?"page":void 0,className:r({variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return s(p,{"aria-label":"Go to previous page",size:"default",className:e("gap-1 pl-2.5",n),...t,children:[a(g,{className:"size-4"}),a("span",{children:"Previous"})]})}function H({className:n,...t}){return s(p,{"aria-label":"Go to next page",size:"default",className:e("gap-1 pr-2.5",n),...t,children:[a("span",{children:"Next"}),a(m,{className:"size-4"})]})}function M({className:n,...t}){return s("span",{"aria-hidden":!0,className:e("flex size-10 items-center justify-center",n),...t,children:[a(c,{className:"size-4"}),a("span",{className:"sr-only",children:"More pages"})]})}export{N as Pagination,u as PaginationContent,M as PaginationEllipsis,f as PaginationItem,p as PaginationLink,H as PaginationNext,R as PaginationPrevious};
2
2
  //# sourceMappingURL=pagination.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\nimport { buttonVariants } from './button';\nimport type { ButtonProps } from './button';\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\n\nfunction Pagination({ className, ...props }: PaginationProps): React.JSX.Element {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentElement = HTMLUListElement;\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\n\nconst PaginationContent = React.forwardRef<PaginationContentElement, PaginationContentProps>(\n ({ className, ...props }, ref) => (\n <ul ref={ref} className={cn('flex flex-row items-center gap-1', className)} {...props} />\n ),\n);\n\nPaginationContent.displayName = 'PaginationContent';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemElement = HTMLLIElement;\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nconst PaginationItem = React.forwardRef<PaginationItemElement, PaginationItemProps>((props, ref) => (\n <li ref={ref} {...props} />\n));\n\nPaginationItem.displayName = 'PaginationItem';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, 'size'> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = 'icon',\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\n\nfunction PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\n\nfunction PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"default\" className={cn('gap-1 pr-2.5', className)} {...props}>\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span aria-hidden className={cn('flex size-10 items-center justify-center', className)} {...props}>\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"],"mappings":"kHAAA,UAAYA,MAAW,QAC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,QAAK,gBAAI,EACVA,EAACiB,EAAA,CAAiB,UAAU,SAAS,GACvC,CAEJ,CAQA,SAASC,EAAmB,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAA+C,CAC/F,OACEH,EAAC,QAAK,cAAW,GAAC,UAAWI,EAAG,2CAA4CF,CAAS,EAAI,GAAGC,EAC1F,UAAAJ,EAACmB,EAAA,CAAmB,UAAU,SAAS,EACvCnB,EAAC,QAAK,UAAU,UAAU,sBAAU,GACtC,CAEJ","names":["React","ChevronLeftIcon","ChevronRightIcon","DotsHorizontalIcon","jsx","jsxs","Pagination","className","props","cn","PaginationContent","ref","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","DotsHorizontalIcon"]}
1
+ {"version":3,"sources":["../../src/react/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\nimport { buttonVariants, type ButtonProps } from './button';\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\n\nfunction Pagination({ className, ...props }: PaginationProps): React.JSX.Element {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentElement = HTMLUListElement;\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\n\nconst PaginationContent = React.forwardRef<PaginationContentElement, PaginationContentProps>(\n ({ className, ...props }, ref) => (\n <ul ref={ref} className={cn('flex flex-row items-center gap-1', className)} {...props} />\n ),\n);\n\nPaginationContent.displayName = 'PaginationContent';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemElement = HTMLLIElement;\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nconst PaginationItem = React.forwardRef<PaginationItemElement, PaginationItemProps>((props, ref) => (\n <li ref={ref} {...props} />\n));\n\nPaginationItem.displayName = 'PaginationItem';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, 'size'> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = 'icon',\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\n\nfunction PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\n\nfunction PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"default\" className={cn('gap-1 pr-2.5', className)} {...props}>\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span aria-hidden className={cn('flex size-10 items-center justify-center', className)} {...props}>\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"],"mappings":"kHAAA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,EAAiB,oBAAAC,EAAkB,sBAAAC,MAA0B,wBAYlE,cAAAC,EA2EA,QAAAC,MA3EA,oBAFJ,SAASC,EAAW,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAuC,CAC/E,OACEJ,EAAC,OACC,KAAK,aACL,aAAW,aACX,UAAWK,EAAG,qCAAsCF,CAAS,EAC5D,GAAGC,EACN,CAEJ,CASA,IAAME,EAA0B,aAC9B,CAAC,CAAE,UAAAH,EAAW,GAAGC,CAAM,EAAGG,IACxBP,EAAC,MAAG,IAAKO,EAAK,UAAWF,EAAG,mCAAoCF,CAAS,EAAI,GAAGC,EAAO,CAE3F,EAEAE,EAAkB,YAAc,oBAShC,IAAME,EAAuB,aAAuD,CAACJ,EAAOG,IAC1FP,EAAC,MAAG,IAAKO,EAAM,GAAGH,EAAO,CAC1B,EAEDI,EAAe,YAAc,iBAU7B,SAASC,EAAe,CACtB,UAAAN,EACA,SAAAO,EACA,KAAAC,EAAO,OACP,SAAAC,EACA,GAAGR,CACL,EAA2C,CACzC,OACEJ,EAAC,KACC,eAAcU,EAAW,OAAS,OAClC,UAAWG,EAAe,CACxB,QAASH,EAAW,UAAY,QAChC,KAAAC,EACA,UAAAR,CACF,CAAC,EACA,GAAGC,EAEH,SAAAQ,EACH,CAEJ,CAQA,SAASE,EAAmB,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAA+C,CAC/F,OACEH,EAACQ,EAAA,CACC,aAAW,sBACX,KAAK,UACL,UAAWJ,EAAG,eAAgBF,CAAS,EACtC,GAAGC,EAEJ,UAAAJ,EAACe,EAAA,CAAgB,UAAU,SAAS,EACpCf,EAAC,QAAK,oBAAQ,GAChB,CAEJ,CAQA,SAASgB,EAAe,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAA2C,CACvF,OACEH,EAACQ,EAAA,CAAe,aAAW,kBAAkB,KAAK,UAAU,UAAWJ,EAAG,eAAgBF,CAAS,EAAI,GAAGC,EACxG,UAAAJ,EAAC,QAAK,gBAAI,EACVA,EAACiB,EAAA,CAAiB,UAAU,SAAS,GACvC,CAEJ,CAQA,SAASC,EAAmB,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAA+C,CAC/F,OACEH,EAAC,QAAK,cAAW,GAAC,UAAWI,EAAG,2CAA4CF,CAAS,EAAI,GAAGC,EAC1F,UAAAJ,EAACmB,EAAA,CAAmB,UAAU,SAAS,EACvCnB,EAAC,QAAK,UAAU,UAAU,sBAAU,GACtC,CAEJ","names":["React","ChevronLeftIcon","ChevronRightIcon","DotsHorizontalIcon","jsx","jsxs","Pagination","className","props","cn","PaginationContent","ref","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","DotsHorizontalIcon"]}
@@ -1,8 +1,69 @@
1
1
  import * as React from 'react';
2
2
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
3
+ import { VariantProps } from 'cva';
3
4
 
4
- type ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>;
5
- declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ type ScrollAreaContextValue = Pick<ScrollAreaScrollbarVariantsProps, 'size'>;
6
+ type ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue;
7
+ declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & ScrollAreaContextValue & React.RefAttributes<HTMLDivElement>>;
8
+ declare const scrollAreaScrollbarVariants: (props?: ({
9
+ orientation?: "horizontal" | "vertical" | undefined;
10
+ size?: "none" | "1" | "2" | "3" | undefined;
11
+ } & ({
12
+ class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
13
+ [x: string]: any;
14
+ } | null | undefined)[] | {
15
+ [x: string]: any;
16
+ } | null | undefined)[] | {
17
+ [x: string]: any;
18
+ } | null | undefined)[] | {
19
+ [x: string]: any;
20
+ } | null | undefined)[] | {
21
+ [x: string]: any;
22
+ } | null | undefined)[] | {
23
+ [x: string]: any;
24
+ } | null | undefined)[] | {
25
+ [x: string]: any;
26
+ } | null | undefined)[] | {
27
+ [x: string]: any;
28
+ } | null | undefined)[] | {
29
+ [x: string]: any;
30
+ } | null | undefined)[] | {
31
+ [x: string]: any;
32
+ } | null | undefined)[] | {
33
+ [x: string]: any;
34
+ } | null | undefined)[] | {
35
+ [x: string]: any;
36
+ } | null | undefined;
37
+ className?: never;
38
+ } | {
39
+ class?: never;
40
+ className?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
41
+ [x: string]: any;
42
+ } | null | undefined)[] | {
43
+ [x: string]: any;
44
+ } | null | undefined)[] | {
45
+ [x: string]: any;
46
+ } | null | undefined)[] | {
47
+ [x: string]: any;
48
+ } | null | undefined)[] | {
49
+ [x: string]: any;
50
+ } | null | undefined)[] | {
51
+ [x: string]: any;
52
+ } | null | undefined)[] | {
53
+ [x: string]: any;
54
+ } | null | undefined)[] | {
55
+ [x: string]: any;
56
+ } | null | undefined)[] | {
57
+ [x: string]: any;
58
+ } | null | undefined)[] | {
59
+ [x: string]: any;
60
+ } | null | undefined)[] | {
61
+ [x: string]: any;
62
+ } | null | undefined)[] | {
63
+ [x: string]: any;
64
+ } | null | undefined;
65
+ })) | undefined) => string;
66
+ type ScrollAreaScrollbarVariantsProps = VariantProps<typeof scrollAreaScrollbarVariants>;
6
67
  type ScrollAreaScrollbarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;
7
68
  declare const ScrollAreaScrollbar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
69
 
@@ -1,8 +1,69 @@
1
1
  import * as React from 'react';
2
2
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
3
+ import { VariantProps } from 'cva';
3
4
 
4
- type ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>;
5
- declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ type ScrollAreaContextValue = Pick<ScrollAreaScrollbarVariantsProps, 'size'>;
6
+ type ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue;
7
+ declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & ScrollAreaContextValue & React.RefAttributes<HTMLDivElement>>;
8
+ declare const scrollAreaScrollbarVariants: (props?: ({
9
+ orientation?: "horizontal" | "vertical" | undefined;
10
+ size?: "none" | "1" | "2" | "3" | undefined;
11
+ } & ({
12
+ class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
13
+ [x: string]: any;
14
+ } | null | undefined)[] | {
15
+ [x: string]: any;
16
+ } | null | undefined)[] | {
17
+ [x: string]: any;
18
+ } | null | undefined)[] | {
19
+ [x: string]: any;
20
+ } | null | undefined)[] | {
21
+ [x: string]: any;
22
+ } | null | undefined)[] | {
23
+ [x: string]: any;
24
+ } | null | undefined)[] | {
25
+ [x: string]: any;
26
+ } | null | undefined)[] | {
27
+ [x: string]: any;
28
+ } | null | undefined)[] | {
29
+ [x: string]: any;
30
+ } | null | undefined)[] | {
31
+ [x: string]: any;
32
+ } | null | undefined)[] | {
33
+ [x: string]: any;
34
+ } | null | undefined)[] | {
35
+ [x: string]: any;
36
+ } | null | undefined;
37
+ className?: never;
38
+ } | {
39
+ class?: never;
40
+ className?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
41
+ [x: string]: any;
42
+ } | null | undefined)[] | {
43
+ [x: string]: any;
44
+ } | null | undefined)[] | {
45
+ [x: string]: any;
46
+ } | null | undefined)[] | {
47
+ [x: string]: any;
48
+ } | null | undefined)[] | {
49
+ [x: string]: any;
50
+ } | null | undefined)[] | {
51
+ [x: string]: any;
52
+ } | null | undefined)[] | {
53
+ [x: string]: any;
54
+ } | null | undefined)[] | {
55
+ [x: string]: any;
56
+ } | null | undefined)[] | {
57
+ [x: string]: any;
58
+ } | null | undefined)[] | {
59
+ [x: string]: any;
60
+ } | null | undefined)[] | {
61
+ [x: string]: any;
62
+ } | null | undefined)[] | {
63
+ [x: string]: any;
64
+ } | null | undefined;
65
+ })) | undefined) => string;
66
+ type ScrollAreaScrollbarVariantsProps = VariantProps<typeof scrollAreaScrollbarVariants>;
6
67
  type ScrollAreaScrollbarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;
7
68
  declare const ScrollAreaScrollbar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
69
 
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var S = _interopRequireWildcard(_react);var _reactscrollarea = require('@radix-ui/react-scroll-area'); var r = _interopRequireWildcard(_reactscrollarea);var _jsxruntime = require('react/jsx-runtime');var m=S.forwardRef(({children:o,className:l,...a},t)=>_jsxruntime.jsxs.call(void 0, r.Root,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "relative overflow-hidden",l),...a,children:[_jsxruntime.jsx.call(void 0, r.Viewport,{className:"size-full rounded-[inherit]",children:o}),_jsxruntime.jsx.call(void 0, c,{orientation:"vertical"}),_jsxruntime.jsx.call(void 0, c,{orientation:"horizontal"}),_jsxruntime.jsx.call(void 0, r.Corner,{})]}));m.displayName=r.Root.displayName;var c=S.forwardRef(({className:o,orientation:l="vertical",...a},t)=>_jsxruntime.jsx.call(void 0, r.Scrollbar,{ref:t,orientation:l,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex touch-none select-none transition",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",o),...a,children:_jsxruntime.jsx.call(void 0, r.ScrollAreaThumb,{className:"bg-border relative flex-1 rounded-full"})}));c.displayName=r.Scrollbar.displayName;exports.ScrollArea = m; exports.ScrollAreaScrollbar = c;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var n = _interopRequireWildcard(_react);var _reactscrollarea = require('@radix-ui/react-scroll-area'); var r = _interopRequireWildcard(_reactscrollarea);var _reactcontext = require('@radix-ui/react-context');var _jsxruntime = require('react/jsx-runtime');var p="ScrollArea",[P]=_reactcontext.createContextScope.call(void 0, p),[f,v]=P(p),b= exports.ScrollArea =n.forwardRef(({__scopeScrollArea:l,children:a,className:o,size:t="1",...i},c)=>_jsxruntime.jsx.call(void 0, f,{scope:l,size:t,children:_jsxruntime.jsxs.call(void 0, r.Root,{ref:c,className:_chunkHQ4AUOQMjs.b.call(void 0, "relative overflow-hidden",o),...i,children:[_jsxruntime.jsx.call(void 0, r.Viewport,{className:"size-full rounded-[inherit] [&>*]:min-h-full",children:a}),_jsxruntime.jsx.call(void 0, s,{orientation:"vertical"}),_jsxruntime.jsx.call(void 0, s,{orientation:"horizontal"}),_jsxruntime.jsx.call(void 0, r.Corner,{})]})}));b.displayName=r.Root.displayName;var d=_chunkHQ4AUOQMjs.a.call(void 0, {base:"flex touch-none select-none transition p-px",variants:{orientation:{vertical:"h-full flex-row border-l border-l-transparent",horizontal:"w-full flex-col border-t border-t-transparent"},size:{none:"",1:"",2:"",3:""}},compoundVariants:[{orientation:"vertical",size:"1",className:"w-1.5"},{orientation:"vertical",size:"2",className:"w-2"},{orientation:"vertical",size:"3",className:"w-2.5"},{orientation:"horizontal",size:"1",className:"h-1.5"},{orientation:"horizontal",size:"2",className:"h-2"},{orientation:"horizontal",size:"3",className:"h-2.5"}]}),s= exports.ScrollAreaScrollbar =n.forwardRef(({__scopeScrollArea:l,className:a,orientation:o="vertical",...t},i)=>{let{size:c}=v(p,l);return _jsxruntime.jsx.call(void 0, r.Scrollbar,{ref:i,orientation:o,className:d({orientation:o,size:c,className:a}),...t,children:_jsxruntime.jsx.call(void 0, r.ScrollAreaThumb,{className:"bg-border relative flex-1 rounded-full"})})});s.displayName=r.Scrollbar.displayName;exports.ScrollArea = b; exports.ScrollAreaScrollbar = s;
2
2
  //# sourceMappingURL=scroll-area.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/scroll-area.tsx"],"names":["React","ScrollAreaPrimitive","jsx","jsxs","ScrollArea","children","className","props","ref","cn","ScrollAreaScrollbar","orientation"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAyB,8BAWnC,OACE,OAAAC,EADF,QAAAC,MAAA,oBADF,IAAMC,EAAmB,aAA+C,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1GL,EAAqB,OAApB,CAAyB,IAAKK,EAAK,UAAWC,EAAG,2BAA4BH,CAAS,EAAI,GAAGC,EAC5F,UAAAL,EAAqB,WAApB,CAA6B,UAAU,8BAA+B,SAAAG,EAAS,EAChFH,EAACQ,EAAA,CAAoB,YAAY,WAAW,EAC5CR,EAACQ,EAAA,CAAoB,YAAY,aAAa,EAC9CR,EAAqB,SAApB,EAA2B,GAC9B,CACD,EAEDE,EAAW,YAAkC,OAAK,YASlD,IAAMM,EAA4B,aAChC,CAAC,CAAE,UAAAJ,EAAW,YAAAK,EAAc,WAAY,GAAGJ,CAAM,EAAGC,IAClDN,EAAqB,YAApB,CACC,IAAKM,EACL,YAAaG,EACb,UAAWF,EACT,yCACAE,IAAgB,YAAc,kDAC9BA,IAAgB,cAAgB,oDAChCL,CACF,EACC,GAAGC,EAEJ,SAAAL,EAAqB,kBAApB,CAAoC,UAAU,yCAAyC,EAC1F,CAEJ,EAEAQ,EAAoB,YAAkC,YAAU","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollArea\n * -------------------------------------------------------------------------- */\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Root>;\ntype ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>;\n\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(({ children, className, ...props }, ref) => (\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"size-full rounded-[inherit]\">{children}</ScrollAreaPrimitive.Viewport>\n <ScrollAreaScrollbar orientation=\"vertical\" />\n <ScrollAreaScrollbar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\n\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\ntype ScrollAreaScrollbarElement = React.ElementRef<typeof ScrollAreaPrimitive.Scrollbar>;\ntype ScrollAreaScrollbarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;\n\nconst ScrollAreaScrollbar = React.forwardRef<ScrollAreaScrollbarElement, ScrollAreaScrollbarProps>(\n ({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.Scrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none select-none transition',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-px',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-px',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.Scrollbar>\n ),\n);\n\nScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ScrollArea, ScrollAreaScrollbar, type ScrollAreaProps, type ScrollAreaScrollbarProps };\n"]}
1
+ {"version":3,"sources":["../../src/react/scroll-area.tsx"],"names":["React","ScrollAreaPrimitive","createContextScope","jsx","jsxs","SCROLL_AREA_NAME","createCarouselContext","CarouselProvider","useCarouselContext","ScrollArea","__scopeScrollArea","children","className","size","props","ref","cn","ScrollAreaScrollbar","scrollAreaScrollbarVariants","cva","orientation"],"mappings":"6DAEA,UAAYA,MAAW,QACvB,UAAYC,MAAyB,8BACrC,OAAS,sBAAAC,MAAsC,0BAwBzC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAhBN,IAAMC,EAAmB,aAInB,CAACC,CAAqB,EAAIJ,EAAmBG,CAAgB,EAI7D,CAACE,EAAkBC,CAAkB,EAAIF,EAA8CD,CAAgB,EAKvGI,EAAmB,aACvB,CAAC,CAAE,kBAAAC,EAAmB,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,IAAK,GAAGC,CAAM,EAAiCC,IAC/FZ,EAACI,EAAA,CAAiB,MAAOG,EAAmB,KAAMG,EAChD,SAAAT,EAAqB,OAApB,CAAyB,IAAKW,EAAK,UAAWC,EAAG,2BAA4BJ,CAAS,EAAI,GAAGE,EAC5F,UAAAX,EAAqB,WAApB,CAA6B,UAAU,+CACrC,SAAAQ,EACH,EACAR,EAACc,EAAA,CAAoB,YAAY,WAAW,EAC5Cd,EAACc,EAAA,CAAoB,YAAY,aAAa,EAC9Cd,EAAqB,SAApB,EAA2B,GAC9B,EACF,CAEJ,EAEAM,EAAW,YAAkC,OAAK,YAMlD,IAAMS,EAA8BC,EAAI,CACtC,KAAM,8CACN,SAAU,CACR,YAAa,CACX,SAAU,gDACV,WAAY,+CACd,EACA,KAAM,CACJ,KAAM,GACN,EAAK,GACL,EAAK,GACL,EAAK,EACP,CACF,EACA,iBAAkB,CAChB,CAAE,YAAa,WAAY,KAAM,IAAK,UAAW,OAAQ,EACzD,CAAE,YAAa,WAAY,KAAM,IAAK,UAAW,KAAM,EACvD,CAAE,YAAa,WAAY,KAAM,IAAK,UAAW,OAAQ,EACzD,CAAE,YAAa,aAAc,KAAM,IAAK,UAAW,OAAQ,EAC3D,CAAE,YAAa,aAAc,KAAM,IAAK,UAAW,KAAM,EACzD,CAAE,YAAa,aAAc,KAAM,IAAK,UAAW,OAAQ,CAC7D,CACF,CAAC,EAWKF,EAA4B,aAChC,CACE,CAAE,kBAAAP,EAAmB,UAAAE,EAAW,YAAAQ,EAAc,WAAY,GAAGN,CAAM,EACnEC,IACG,CACH,GAAM,CAAE,KAAAF,CAAK,EAAIL,EAAmBH,EAAkBK,CAAiB,EAEvE,OACEP,EAAqB,YAApB,CACC,IAAKY,EACL,YAAaK,EACb,UAAWF,EAA4B,CAAE,YAAAE,EAAa,KAAAP,EAAM,UAAAD,CAAU,CAAC,EACtE,GAAGE,EAEJ,SAAAX,EAAqB,kBAApB,CAAoC,UAAU,yCAAyC,EAC1F,CAEJ,CACF,EAEAc,EAAoB,YAAkC,YAAU","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { type VariantProps } from 'cva';\nimport { cn, cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollArea\n * -------------------------------------------------------------------------- */\n\nconst SCROLL_AREA_NAME = 'ScrollArea';\n\ntype ScopedProps<P> = P & { __scopeScrollArea?: Scope };\n\nconst [createCarouselContext] = createContextScope(SCROLL_AREA_NAME);\n\ntype ScrollAreaContextValue = Pick<ScrollAreaScrollbarVariantsProps, 'size'>;\n\nconst [CarouselProvider, useCarouselContext] = createCarouselContext<ScrollAreaContextValue>(SCROLL_AREA_NAME);\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Root>;\ntype ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue;\n\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(\n ({ __scopeScrollArea, children, className, size = '1', ...props }: ScopedProps<ScrollAreaProps>, ref) => (\n <CarouselProvider scope={__scopeScrollArea} size={size}>\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"size-full rounded-[inherit] [&>*]:min-h-full\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollAreaScrollbar orientation=\"vertical\" />\n <ScrollAreaScrollbar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n </CarouselProvider>\n ),\n);\n\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Variant: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\nconst scrollAreaScrollbarVariants = cva({\n base: 'flex touch-none select-none transition p-px',\n variants: {\n orientation: {\n vertical: 'h-full flex-row border-l border-l-transparent',\n horizontal: 'w-full flex-col border-t border-t-transparent',\n },\n size: {\n none: '',\n '1': '',\n '2': '',\n '3': '',\n },\n },\n compoundVariants: [\n { orientation: 'vertical', size: '1', className: 'w-1.5' },\n { orientation: 'vertical', size: '2', className: 'w-2' },\n { orientation: 'vertical', size: '3', className: 'w-2.5' },\n { orientation: 'horizontal', size: '1', className: 'h-1.5' },\n { orientation: 'horizontal', size: '2', className: 'h-2' },\n { orientation: 'horizontal', size: '3', className: 'h-2.5' },\n ],\n});\n\ntype ScrollAreaScrollbarVariantsProps = VariantProps<typeof scrollAreaScrollbarVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\ntype ScrollAreaScrollbarElement = React.ElementRef<typeof ScrollAreaPrimitive.Scrollbar>;\ntype ScrollAreaScrollbarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;\n\nconst ScrollAreaScrollbar = React.forwardRef<ScrollAreaScrollbarElement, ScrollAreaScrollbarProps>(\n (\n { __scopeScrollArea, className, orientation = 'vertical', ...props }: ScopedProps<ScrollAreaScrollbarProps>,\n ref,\n ) => {\n const { size } = useCarouselContext(SCROLL_AREA_NAME, __scopeScrollArea);\n\n return (\n <ScrollAreaPrimitive.Scrollbar\n ref={ref}\n orientation={orientation}\n className={scrollAreaScrollbarVariants({ orientation, size, className })}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.Scrollbar>\n );\n },\n);\n\nScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ScrollArea, ScrollAreaScrollbar, type ScrollAreaProps, type ScrollAreaScrollbarProps };\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{b as i}from"../chunk-LEUB3C3L.mjs";import*as S from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as e,jsxs as p}from"react/jsx-runtime";var m=S.forwardRef(({children:o,className:l,...a},t)=>p(r.Root,{ref:t,className:i("relative overflow-hidden",l),...a,children:[e(r.Viewport,{className:"size-full rounded-[inherit]",children:o}),e(c,{orientation:"vertical"}),e(c,{orientation:"horizontal"}),e(r.Corner,{})]}));m.displayName=r.Root.displayName;var c=S.forwardRef(({className:o,orientation:l="vertical",...a},t)=>e(r.Scrollbar,{ref:t,orientation:l,className:i("flex touch-none select-none transition",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",o),...a,children:e(r.ScrollAreaThumb,{className:"bg-border relative flex-1 rounded-full"})}));c.displayName=r.Scrollbar.displayName;export{m as ScrollArea,c as ScrollAreaScrollbar};
1
+ "use client";import{a as S,b as m}from"../chunk-LEUB3C3L.mjs";import*as n from"react";import*as r from"@radix-ui/react-scroll-area";import{createContextScope as A}from"@radix-ui/react-context";import{jsx as e,jsxs as u}from"react/jsx-runtime";var p="ScrollArea",[P]=A(p),[f,v]=P(p),b=n.forwardRef(({__scopeScrollArea:l,children:a,className:o,size:t="1",...i},c)=>e(f,{scope:l,size:t,children:u(r.Root,{ref:c,className:m("relative overflow-hidden",o),...i,children:[e(r.Viewport,{className:"size-full rounded-[inherit] [&>*]:min-h-full",children:a}),e(s,{orientation:"vertical"}),e(s,{orientation:"horizontal"}),e(r.Corner,{})]})}));b.displayName=r.Root.displayName;var d=S({base:"flex touch-none select-none transition p-px",variants:{orientation:{vertical:"h-full flex-row border-l border-l-transparent",horizontal:"w-full flex-col border-t border-t-transparent"},size:{none:"",1:"",2:"",3:""}},compoundVariants:[{orientation:"vertical",size:"1",className:"w-1.5"},{orientation:"vertical",size:"2",className:"w-2"},{orientation:"vertical",size:"3",className:"w-2.5"},{orientation:"horizontal",size:"1",className:"h-1.5"},{orientation:"horizontal",size:"2",className:"h-2"},{orientation:"horizontal",size:"3",className:"h-2.5"}]}),s=n.forwardRef(({__scopeScrollArea:l,className:a,orientation:o="vertical",...t},i)=>{let{size:c}=v(p,l);return e(r.Scrollbar,{ref:i,orientation:o,className:d({orientation:o,size:c,className:a}),...t,children:e(r.ScrollAreaThumb,{className:"bg-border relative flex-1 rounded-full"})})});s.displayName=r.Scrollbar.displayName;export{b as ScrollArea,s as ScrollAreaScrollbar};
2
2
  //# sourceMappingURL=scroll-area.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/scroll-area.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollArea\n * -------------------------------------------------------------------------- */\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Root>;\ntype ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>;\n\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(({ children, className, ...props }, ref) => (\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"size-full rounded-[inherit]\">{children}</ScrollAreaPrimitive.Viewport>\n <ScrollAreaScrollbar orientation=\"vertical\" />\n <ScrollAreaScrollbar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\n\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\ntype ScrollAreaScrollbarElement = React.ElementRef<typeof ScrollAreaPrimitive.Scrollbar>;\ntype ScrollAreaScrollbarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;\n\nconst ScrollAreaScrollbar = React.forwardRef<ScrollAreaScrollbarElement, ScrollAreaScrollbarProps>(\n ({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.Scrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none select-none transition',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-px',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-px',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.Scrollbar>\n ),\n);\n\nScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ScrollArea, ScrollAreaScrollbar, type ScrollAreaProps, type ScrollAreaScrollbarProps };\n"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,UAAYC,MAAyB,8BAWnC,OACE,OAAAC,EADF,QAAAC,MAAA,oBADF,IAAMC,EAAmB,aAA+C,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1GL,EAAqB,OAApB,CAAyB,IAAKK,EAAK,UAAWC,EAAG,2BAA4BH,CAAS,EAAI,GAAGC,EAC5F,UAAAL,EAAqB,WAApB,CAA6B,UAAU,8BAA+B,SAAAG,EAAS,EAChFH,EAACQ,EAAA,CAAoB,YAAY,WAAW,EAC5CR,EAACQ,EAAA,CAAoB,YAAY,aAAa,EAC9CR,EAAqB,SAApB,EAA2B,GAC9B,CACD,EAEDE,EAAW,YAAkC,OAAK,YASlD,IAAMM,EAA4B,aAChC,CAAC,CAAE,UAAAJ,EAAW,YAAAK,EAAc,WAAY,GAAGJ,CAAM,EAAGC,IAClDN,EAAqB,YAApB,CACC,IAAKM,EACL,YAAaG,EACb,UAAWF,EACT,yCACAE,IAAgB,YAAc,kDAC9BA,IAAgB,cAAgB,oDAChCL,CACF,EACC,GAAGC,EAEJ,SAAAL,EAAqB,kBAApB,CAAoC,UAAU,yCAAyC,EAC1F,CAEJ,EAEAQ,EAAoB,YAAkC,YAAU","names":["React","ScrollAreaPrimitive","jsx","jsxs","ScrollArea","children","className","props","ref","cn","ScrollAreaScrollbar","orientation"]}
1
+ {"version":3,"sources":["../../src/react/scroll-area.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { type VariantProps } from 'cva';\nimport { cn, cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollArea\n * -------------------------------------------------------------------------- */\n\nconst SCROLL_AREA_NAME = 'ScrollArea';\n\ntype ScopedProps<P> = P & { __scopeScrollArea?: Scope };\n\nconst [createCarouselContext] = createContextScope(SCROLL_AREA_NAME);\n\ntype ScrollAreaContextValue = Pick<ScrollAreaScrollbarVariantsProps, 'size'>;\n\nconst [CarouselProvider, useCarouselContext] = createCarouselContext<ScrollAreaContextValue>(SCROLL_AREA_NAME);\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Root>;\ntype ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue;\n\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(\n ({ __scopeScrollArea, children, className, size = '1', ...props }: ScopedProps<ScrollAreaProps>, ref) => (\n <CarouselProvider scope={__scopeScrollArea} size={size}>\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"size-full rounded-[inherit] [&>*]:min-h-full\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollAreaScrollbar orientation=\"vertical\" />\n <ScrollAreaScrollbar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n </CarouselProvider>\n ),\n);\n\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Variant: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\nconst scrollAreaScrollbarVariants = cva({\n base: 'flex touch-none select-none transition p-px',\n variants: {\n orientation: {\n vertical: 'h-full flex-row border-l border-l-transparent',\n horizontal: 'w-full flex-col border-t border-t-transparent',\n },\n size: {\n none: '',\n '1': '',\n '2': '',\n '3': '',\n },\n },\n compoundVariants: [\n { orientation: 'vertical', size: '1', className: 'w-1.5' },\n { orientation: 'vertical', size: '2', className: 'w-2' },\n { orientation: 'vertical', size: '3', className: 'w-2.5' },\n { orientation: 'horizontal', size: '1', className: 'h-1.5' },\n { orientation: 'horizontal', size: '2', className: 'h-2' },\n { orientation: 'horizontal', size: '3', className: 'h-2.5' },\n ],\n});\n\ntype ScrollAreaScrollbarVariantsProps = VariantProps<typeof scrollAreaScrollbarVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\ntype ScrollAreaScrollbarElement = React.ElementRef<typeof ScrollAreaPrimitive.Scrollbar>;\ntype ScrollAreaScrollbarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;\n\nconst ScrollAreaScrollbar = React.forwardRef<ScrollAreaScrollbarElement, ScrollAreaScrollbarProps>(\n (\n { __scopeScrollArea, className, orientation = 'vertical', ...props }: ScopedProps<ScrollAreaScrollbarProps>,\n ref,\n ) => {\n const { size } = useCarouselContext(SCROLL_AREA_NAME, __scopeScrollArea);\n\n return (\n <ScrollAreaPrimitive.Scrollbar\n ref={ref}\n orientation={orientation}\n className={scrollAreaScrollbarVariants({ orientation, size, className })}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.Scrollbar>\n );\n },\n);\n\nScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ScrollArea, ScrollAreaScrollbar, type ScrollAreaProps, type ScrollAreaScrollbarProps };\n"],"mappings":"8DAEA,UAAYA,MAAW,QACvB,UAAYC,MAAyB,8BACrC,OAAS,sBAAAC,MAAsC,0BAwBzC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAhBN,IAAMC,EAAmB,aAInB,CAACC,CAAqB,EAAIC,EAAmBF,CAAgB,EAI7D,CAACG,EAAkBC,CAAkB,EAAIH,EAA8CD,CAAgB,EAKvGK,EAAmB,aACvB,CAAC,CAAE,kBAAAC,EAAmB,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,IAAK,GAAGC,CAAM,EAAiCC,IAC/Fb,EAACK,EAAA,CAAiB,MAAOG,EAAmB,KAAMG,EAChD,SAAAV,EAA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arouselContext","createContextScope","CarouselProvider","useCarouselContext","ScrollArea","__scopeScrollArea","children","className","size","props","ref","cn","ScrollAreaScrollbar","scrollAreaScrollbarVariants","cva","orientation"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var r = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var d=_chunkHQ4AUOQMjs.a.call(void 0, {base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 gap-4 p-6 shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),u= exports.Sheet =e.Root,R= exports.SheetTrigger =e.Trigger,g= exports.SheetClose =e.Close,c= exports.SheetContent =r.forwardRef(({children:t,side:o="right",className:a,...m},l)=>_jsxruntime.jsxs.call(void 0, e.Portal,{children:[_jsxruntime.jsx.call(void 0, e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, e.Content,{ref:l,className:d({side:o,className:a}),...m,children:[t,_jsxruntime.jsxs.call(void 0, e.Close,{className:"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[_jsxruntime.jsx.call(void 0, _reacticons.Cross2Icon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=e.Content.displayName;function C({className:t,...o}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-col space-y-2 text-center sm:text-left",t),...o})}function S({className:t,...o}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...o})}S.displayName="SheetFooter";var f=r.forwardRef(({className:t,...o},a)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:a,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-foreground text-lg font-semibold",t),...o}));f.displayName=e.Title.displayName;var P=r.forwardRef(({className:t,...o},a)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:a,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-muted-foreground text-sm",t),...o}));P.displayName=e.Description.displayName;exports.Sheet = u; exports.SheetClose = g; exports.SheetContent = c; exports.SheetDescription = P; exports.SheetFooter = S; exports.SheetHeader = C; exports.SheetTitle = f; exports.SheetTrigger = R;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var r = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var d=_chunkHQ4AUOQMjs.a.call(void 0, {base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 gap-4 p-6 shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),v= exports.Sheet =e.Root,R= exports.SheetTrigger =e.Trigger,g= exports.SheetClose =e.Close,c= exports.SheetContent =r.forwardRef(({children:t,side:o="right",className:a,...m},l)=>_jsxruntime.jsxs.call(void 0, e.Portal,{children:[_jsxruntime.jsx.call(void 0, e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, e.Content,{ref:l,className:d({side:o,className:a}),...m,children:[t,_jsxruntime.jsxs.call(void 0, e.Close,{className:"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[_jsxruntime.jsx.call(void 0, _reacticons.Cross2Icon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=e.Content.displayName;function C({className:t,...o}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-col space-y-2 text-center sm:text-left",t),...o})}function S({className:t,...o}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...o})}S.displayName="SheetFooter";var f=r.forwardRef(({className:t,...o},a)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:a,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-foreground text-lg font-semibold",t),...o}));f.displayName=e.Title.displayName;var P=r.forwardRef(({className:t,...o},a)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:a,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-muted-foreground text-sm",t),...o}));P.displayName=e.Description.displayName;exports.Sheet = v; exports.SheetClose = g; exports.SheetContent = c; exports.SheetDescription = P; exports.SheetFooter = S; exports.SheetHeader = C; exports.SheetTitle = f; exports.SheetTrigger = R;
2
2
  //# sourceMappingURL=sheet.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/sheet.tsx"],"names":["React","SheetPrimitive","Cross2Icon","jsx","jsxs","sheetVariants","cva","Sheet","SheetTrigger","SheetClose","SheetContent","children","side","className","props","ref","SheetHeader","cn","SheetFooter","SheetTitle","SheetDescription"],"mappings":"6DAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,yBAChC,OAAS,cAAAC,MAAkB,wBA0DrB,cAAAC,EAGE,QAAAC,MAHF,oBAlDN,IAAMC,EAAgBC,EAAI,CACxB,KAAM,gNACN,SAAU,CACR,KAAM,CACJ,IAAK,oGACL,OACE,6GACF,KAAM,gIACN,MACE,kIACJ,CACF,EACA,gBAAiB,CACf,KAAM,OACR,CACF,CAAC,EASKC,EAAuB,OAOvBC,EAA8B,UAO9BC,EAA4B,QAS5BC,EAAqB,aACzB,CAAC,CAAE,SAAAC,EAAU,KAAAC,EAAO,QAAS,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClDX,EAAgB,SAAf,CACC,UAAAD,EAAgB,UAAf,CAAuB,UAAU,wLAAwL,EAC1NC,EAAgB,UAAf,CAAuB,IAAKW,EAAK,UAAWV,EAAc,CAAE,KAAAO,EAAM,UAAAC,CAAU,CAAC,EAAI,GAAGC,EAClF,UAAAH,EACDP,EAAgB,QAAf,CAAqB,UAAU,qNAC9B,UAAAD,EAACD,EAAA,CAAW,UAAU,SAAS,EAC/BC,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CAEJ,EAEAO,EAAa,YAA6B,UAAQ,YAQlD,SAASM,EAAY,CAAE,UAAAH,EAAW,GAAGC,CAAM,EAAwC,CACjF,OAAOX,EAAC,OAAI,UAAWc,EAAG,mDAAoDJ,CAAS,EAAI,GAAGC,EAAO,CACvG,CAQA,SAASI,EAAY,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAwC,CACjF,OAAOX,EAAC,OAAI,UAAWc,EAAG,gEAAiEJ,CAAS,EAAI,GAAGC,EAAO,CACpH,CAEAI,EAAY,YAAc,cAS1B,IAAMC,EAAmB,aAA+C,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAGC,IAChGZ,EAAgB,QAAf,CAAqB,IAAKY,EAAK,UAAWE,EAAG,wCAAyCJ,CAAS,EAAI,GAAGC,EAAO,CAC/G,EAEDK,EAAW,YAA6B,QAAM,YAS9C,IAAMC,EAAyB,aAC7B,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IACxBZ,EAAgB,cAAf,CAA2B,IAAKY,EAAK,UAAWE,EAAG,gCAAiCJ,CAAS,EAAI,GAAGC,EAAO,CAEhH,EAEAM,EAAiB,YAA6B,cAAY","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { cn, cva } from '../lib/utils';\nimport type { VariantProps } from 'cva';\n\n/* -----------------------------------------------------------------------------\n * Variant: Sheet\n * -------------------------------------------------------------------------- */\n\nconst sheetVariants = cva({\n base: 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 gap-4 p-6 shadow-lg',\n variants: {\n side: {\n top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 border-b',\n bottom:\n 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 border-t',\n left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n right:\n 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n});\n\ntype SheetVariantsProps = VariantProps<typeof sheetVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Sheet\n * -------------------------------------------------------------------------- */\n\ntype SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;\nconst Sheet = SheetPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTrigger\n * -------------------------------------------------------------------------- */\n\ntype SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetClose\n * -------------------------------------------------------------------------- */\n\ntype SheetCloseProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close>;\nconst SheetClose = SheetPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetContent\n * -------------------------------------------------------------------------- */\n\ntype SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;\ntype SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetVariantsProps;\n\nconst SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(\n ({ children, side = 'right', className, ...props }, ref) => (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className=\"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <SheetPrimitive.Content ref={ref} className={sheetVariants({ side, className })} {...props}>\n {children}\n <SheetPrimitive.Close className=\"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n ),\n);\n\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetHeader\n * -------------------------------------------------------------------------- */\n\ntype SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return <div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetFooter\n * -------------------------------------------------------------------------- */\n\ntype SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {\n return <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />;\n}\n\nSheetFooter.displayName = 'SheetFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTitle\n * -------------------------------------------------------------------------- */\n\ntype SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;\ntype SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title ref={ref} className={cn('text-foreground text-lg font-semibold', className)} {...props} />\n));\n\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetDescription\n * -------------------------------------------------------------------------- */\n\ntype SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;\n\nconst SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ className, ...props }, ref) => (\n <SheetPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\n\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n type SheetProps,\n type SheetTriggerProps,\n type SheetCloseProps,\n type SheetContentProps,\n type SheetHeaderProps,\n type SheetFooterProps,\n type SheetTitleProps,\n type SheetDescriptionProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/sheet.tsx"],"names":["React","SheetPrimitive","Cross2Icon","jsx","jsxs","sheetVariants","cva","Sheet","SheetTrigger","SheetClose","SheetContent","children","side","className","props","ref","SheetHeader","cn","SheetFooter","SheetTitle","SheetDescription"],"mappings":"6DAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,yBAChC,OAAS,cAAAC,MAAkB,wBA0DrB,cAAAC,EAGE,QAAAC,MAHF,oBAlDN,IAAMC,EAAgBC,EAAI,CACxB,KAAM,gNACN,SAAU,CACR,KAAM,CACJ,IAAK,oGACL,OACE,6GACF,KAAM,gIACN,MACE,kIACJ,CACF,EACA,gBAAiB,CACf,KAAM,OACR,CACF,CAAC,EASKC,EAAuB,OAOvBC,EAA8B,UAO9BC,EAA4B,QAS5BC,EAAqB,aACzB,CAAC,CAAE,SAAAC,EAAU,KAAAC,EAAO,QAAS,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClDX,EAAgB,SAAf,CACC,UAAAD,EAAgB,UAAf,CAAuB,UAAU,wLAAwL,EAC1NC,EAAgB,UAAf,CAAuB,IAAKW,EAAK,UAAWV,EAAc,CAAE,KAAAO,EAAM,UAAAC,CAAU,CAAC,EAAI,GAAGC,EAClF,UAAAH,EACDP,EAAgB,QAAf,CAAqB,UAAU,qNAC9B,UAAAD,EAACD,EAAA,CAAW,UAAU,SAAS,EAC/BC,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CAEJ,EAEAO,EAAa,YAA6B,UAAQ,YAQlD,SAASM,EAAY,CAAE,UAAAH,EAAW,GAAGC,CAAM,EAAwC,CACjF,OAAOX,EAAC,OAAI,UAAWc,EAAG,mDAAoDJ,CAAS,EAAI,GAAGC,EAAO,CACvG,CAQA,SAASI,EAAY,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAwC,CACjF,OAAOX,EAAC,OAAI,UAAWc,EAAG,gEAAiEJ,CAAS,EAAI,GAAGC,EAAO,CACpH,CAEAI,EAAY,YAAc,cAS1B,IAAMC,EAAmB,aAA+C,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAGC,IAChGZ,EAAgB,QAAf,CAAqB,IAAKY,EAAK,UAAWE,EAAG,wCAAyCJ,CAAS,EAAI,GAAGC,EAAO,CAC/G,EAEDK,EAAW,YAA6B,QAAM,YAS9C,IAAMC,EAAyB,aAC7B,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IACxBZ,EAAgB,cAAf,CAA2B,IAAKY,EAAK,UAAWE,EAAG,gCAAiCJ,CAAS,EAAI,GAAGC,EAAO,CAEhH,EAEAM,EAAiB,YAA6B,cAAY","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { type VariantProps } from 'cva';\nimport { cn, cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Variant: Sheet\n * -------------------------------------------------------------------------- */\n\nconst sheetVariants = cva({\n base: 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 gap-4 p-6 shadow-lg',\n variants: {\n side: {\n top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 border-b',\n bottom:\n 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 border-t',\n left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n right:\n 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n});\n\ntype SheetVariantsProps = VariantProps<typeof sheetVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Sheet\n * -------------------------------------------------------------------------- */\n\ntype SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;\nconst Sheet = SheetPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTrigger\n * -------------------------------------------------------------------------- */\n\ntype SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetClose\n * -------------------------------------------------------------------------- */\n\ntype SheetCloseProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close>;\nconst SheetClose = SheetPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetContent\n * -------------------------------------------------------------------------- */\n\ntype SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;\ntype SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetVariantsProps;\n\nconst SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(\n ({ children, side = 'right', className, ...props }, ref) => (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className=\"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <SheetPrimitive.Content ref={ref} className={sheetVariants({ side, className })} {...props}>\n {children}\n <SheetPrimitive.Close className=\"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n ),\n);\n\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetHeader\n * -------------------------------------------------------------------------- */\n\ntype SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return <div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetFooter\n * -------------------------------------------------------------------------- */\n\ntype SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {\n return <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />;\n}\n\nSheetFooter.displayName = 'SheetFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTitle\n * -------------------------------------------------------------------------- */\n\ntype SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;\ntype SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title ref={ref} className={cn('text-foreground text-lg font-semibold', className)} {...props} />\n));\n\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetDescription\n * -------------------------------------------------------------------------- */\n\ntype SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;\n\nconst SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ className, ...props }, ref) => (\n <SheetPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\n\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n type SheetProps,\n type SheetTriggerProps,\n type SheetCloseProps,\n type SheetContentProps,\n type SheetHeaderProps,\n type SheetFooterProps,\n type SheetTitleProps,\n type SheetDescriptionProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as p,b as s}from"../chunk-LEUB3C3L.mjs";import*as r from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as h}from"@radix-ui/react-icons";import{jsx as i,jsxs as n}from"react/jsx-runtime";var d=p({base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 gap-4 p-6 shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),u=e.Root,R=e.Trigger,g=e.Close,c=r.forwardRef(({children:t,side:o="right",className:a,...m},l)=>n(e.Portal,{children:[i(e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),n(e.Content,{ref:l,className:d({side:o,className:a}),...m,children:[t,n(e.Close,{className:"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[i(h,{className:"size-4"}),i("span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=e.Content.displayName;function C({className:t,...o}){return i("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",t),...o})}function S({className:t,...o}){return i("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...o})}S.displayName="SheetFooter";var f=r.forwardRef(({className:t,...o},a)=>i(e.Title,{ref:a,className:s("text-foreground text-lg font-semibold",t),...o}));f.displayName=e.Title.displayName;var P=r.forwardRef(({className:t,...o},a)=>i(e.Description,{ref:a,className:s("text-muted-foreground text-sm",t),...o}));P.displayName=e.Description.displayName;export{u as Sheet,g as SheetClose,c as SheetContent,P as SheetDescription,S as SheetFooter,C as SheetHeader,f as SheetTitle,R as SheetTrigger};
1
+ "use client";import{a as p,b as s}from"../chunk-LEUB3C3L.mjs";import*as r from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as h}from"@radix-ui/react-icons";import{jsx as i,jsxs as n}from"react/jsx-runtime";var d=p({base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 gap-4 p-6 shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),v=e.Root,R=e.Trigger,g=e.Close,c=r.forwardRef(({children:t,side:o="right",className:a,...m},l)=>n(e.Portal,{children:[i(e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),n(e.Content,{ref:l,className:d({side:o,className:a}),...m,children:[t,n(e.Close,{className:"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[i(h,{className:"size-4"}),i("span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=e.Content.displayName;function C({className:t,...o}){return i("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",t),...o})}function S({className:t,...o}){return i("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...o})}S.displayName="SheetFooter";var f=r.forwardRef(({className:t,...o},a)=>i(e.Title,{ref:a,className:s("text-foreground text-lg font-semibold",t),...o}));f.displayName=e.Title.displayName;var P=r.forwardRef(({className:t,...o},a)=>i(e.Description,{ref:a,className:s("text-muted-foreground text-sm",t),...o}));P.displayName=e.Description.displayName;export{v as Sheet,g as SheetClose,c as SheetContent,P as SheetDescription,S as SheetFooter,C as SheetHeader,f as SheetTitle,R as SheetTrigger};
2
2
  //# sourceMappingURL=sheet.mjs.map