@me1a/ui 2.2.9 → 2.2.11

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.
@@ -1,2 +1,2 @@
1
- import{useFormContext as O}from"react-hook-form";import{useDropzone as A}from"react-dropzone";import{clsx as S}from"clsx";import{twMerge as $}from"tailwind-merge";function m(...e){return $(S(e))}import{UploadIcon as W}from"lucide-react";import{Fragment as z,jsx as F,jsxs as I}from"react/jsx-runtime";var U=I(z,{children:[F(W,{className:"text-blue-600 mr-2","aria-hidden":"true"}),I("span",{children:[F("span",{className:"underline",children:"Upload"})," or drop a file right here"]}),F("span",{className:"ml-auto text-gray-400 text-sm",children:"all file types"})]}),h=({onDrop:e,accept:o,className:t,children:r,...a})=>{let{getRootProps:s,getInputProps:n,isDragActive:C,isFocused:c}=A({onDrop:e,accept:o,...a});return I("div",{...s({className:m("flex items-center border-2 border-dashed border-blue-500 rounded-lg p-4 cursor-pointer transition-colors",t,C?"bg-blue-50 border-blue-700":"",c?"ring-2 ring-blue-400":""),"aria-label":"File upload area",tabIndex:0,role:"button"}),"data-testid":"dnd-input",children:[F("input",{...n()}),r||U]})};import*as i from"react";import{Slot as G}from"@radix-ui/react-slot";import{Controller as J,FormProvider as ce,useFormContext as K}from"react-hook-form";import*as T from"react";import*as V from"@radix-ui/react-label";import{cva as k}from"class-variance-authority";import{jsx as B}from"react/jsx-runtime";var q=k("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),f=T.forwardRef(({className:e,...o},t)=>B(V.Root,{ref:t,className:m(q(),e),...o}));f.displayName=V.Root.displayName;import{jsx as l}from"react/jsx-runtime";var N=i.createContext({}),g=({...e})=>l(N.Provider,{value:{name:e.name},children:l(J,{...e})}),p=()=>{let e=i.useContext(N),o=i.useContext(D),{getFieldState:t,formState:r}=K(),a=t(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:s}=o;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}},D=i.createContext({}),b=i.forwardRef(({className:e,...o},t)=>{let r=i.useId();return l(D.Provider,{value:{id:r},children:l("div",{ref:t,className:m("space-y-2",e),...o})})});b.displayName="FormItem";var x=i.forwardRef(({className:e,...o},t)=>{let{error:r,formItemId:a}=p();return l(f,{ref:t,className:m(r&&"text-destructive",e),htmlFor:a,...o})});x.displayName="FormLabel";var P=i.forwardRef(({...e},o)=>{let{error:t,formItemId:r,formDescriptionId:a,formMessageId:s}=p();return l(G,{ref:o,id:r,"aria-describedby":t?`${a} ${s}`:`${a}`,"aria-invalid":!!t,...e})});P.displayName="FormControl";var R=i.forwardRef(({className:e,...o},t)=>{let{formDescriptionId:r}=p();return l("p",{ref:t,id:r,className:m("text-sm text-muted-foreground",e),...o})});R.displayName="FormDescription";var y=i.forwardRef(({className:e,children:o,...t},r)=>{let{error:a,formMessageId:s}=p(),n=a?String(a?.message??""):o;return n?l("p",{ref:r,id:s,className:m("text-sm font-medium text-destructive",e),...t,children:n}):null});y.displayName="FormMessage";import{jsx as d,jsxs as M}from"react/jsx-runtime";function ge({name:e,label:o,description:t,className:r,required:a,disabled:s,"aria-label":n,"aria-describedby":C,...c}){let{control:w}=O();return d(g,{name:e,control:w,render:({field:v,fieldState:{error:u}})=>M(b,{children:[o&&M(x,{children:[o,a&&d("span",{className:"text-destructive ml-1",children:"*"})]}),d(P,{children:d(h,{...v,...c,disabled:s,"aria-label":n,"aria-describedby":C,"aria-invalid":!!u,"aria-required":a,className:m(u&&"border-destructive focus-visible:ring-destructive",r),onDrop:(L,E,H)=>{v.onChange(L),c.onDrop?.(L,E,H)}})}),t&&d(R,{children:t}),u&&d(y,{children:u.message})]})})}export{ge as RhfDndInput};
1
+ "use client";import{useFormContext as O}from"react-hook-form";import{useDropzone as A}from"react-dropzone";import{clsx as S}from"clsx";import{twMerge as $}from"tailwind-merge";function m(...e){return $(S(e))}import{UploadIcon as W}from"lucide-react";import{Fragment as z,jsx as F,jsxs as I}from"react/jsx-runtime";var U=I(z,{children:[F(W,{className:"text-blue-600 mr-2","aria-hidden":"true"}),I("span",{children:[F("span",{className:"underline",children:"Upload"})," or drop a file right here"]}),F("span",{className:"ml-auto text-gray-400 text-sm",children:"all file types"})]}),h=({onDrop:e,accept:o,className:t,children:r,...a})=>{let{getRootProps:s,getInputProps:n,isDragActive:C,isFocused:c}=A({onDrop:e,accept:o,...a});return I("div",{...s({className:m("flex items-center border-2 border-dashed border-blue-500 rounded-lg p-4 cursor-pointer transition-colors",t,C?"bg-blue-50 border-blue-700":"",c?"ring-2 ring-blue-400":""),"aria-label":"File upload area",tabIndex:0,role:"button"}),"data-testid":"dnd-input",children:[F("input",{...n()}),r||U]})};import*as i from"react";import{Slot as G}from"@radix-ui/react-slot";import{Controller as J,FormProvider as ce,useFormContext as K}from"react-hook-form";import*as T from"react";import*as V from"@radix-ui/react-label";import{cva as k}from"class-variance-authority";import{jsx as B}from"react/jsx-runtime";var q=k("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),f=T.forwardRef(({className:e,...o},t)=>B(V.Root,{ref:t,className:m(q(),e),...o}));f.displayName=V.Root.displayName;import{jsx as l}from"react/jsx-runtime";var N=i.createContext({}),g=({...e})=>l(N.Provider,{value:{name:e.name},children:l(J,{...e})}),p=()=>{let e=i.useContext(N),o=i.useContext(D),{getFieldState:t,formState:r}=K(),a=t(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:s}=o;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}},D=i.createContext({}),b=i.forwardRef(({className:e,...o},t)=>{let r=i.useId();return l(D.Provider,{value:{id:r},children:l("div",{ref:t,className:m("space-y-2",e),...o})})});b.displayName="FormItem";var x=i.forwardRef(({className:e,...o},t)=>{let{error:r,formItemId:a}=p();return l(f,{ref:t,className:m(r&&"text-destructive",e),htmlFor:a,...o})});x.displayName="FormLabel";var P=i.forwardRef(({...e},o)=>{let{error:t,formItemId:r,formDescriptionId:a,formMessageId:s}=p();return l(G,{ref:o,id:r,"aria-describedby":t?`${a} ${s}`:`${a}`,"aria-invalid":!!t,...e})});P.displayName="FormControl";var R=i.forwardRef(({className:e,...o},t)=>{let{formDescriptionId:r}=p();return l("p",{ref:t,id:r,className:m("text-sm text-muted-foreground",e),...o})});R.displayName="FormDescription";var y=i.forwardRef(({className:e,children:o,...t},r)=>{let{error:a,formMessageId:s}=p(),n=a?String(a?.message??""):o;return n?l("p",{ref:r,id:s,className:m("text-sm font-medium text-destructive",e),...t,children:n}):null});y.displayName="FormMessage";import{jsx as d,jsxs as M}from"react/jsx-runtime";function ge({name:e,label:o,description:t,className:r,required:a,disabled:s,"aria-label":n,"aria-describedby":C,...c}){let{control:w}=O();return d(g,{name:e,control:w,render:({field:v,fieldState:{error:u}})=>M(b,{children:[o&&M(x,{children:[o,a&&d("span",{className:"text-destructive ml-1",children:"*"})]}),d(P,{children:d(h,{...v,...c,disabled:s,"aria-label":n,"aria-describedby":C,"aria-invalid":!!u,"aria-required":a,className:m(u&&"border-destructive focus-visible:ring-destructive",r),onDrop:(L,E,H)=>{v.onChange(L),c.onDrop?.(L,E,H)}})}),t&&d(R,{children:t}),u&&d(y,{children:u.message})]})})}export{ge as RhfDndInput};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/rhf/rhf-dnd-input/rhf-dnd-input.tsx","../../src/components/atoms/dnd-input/dnd-input.tsx","../../src/utils/cn.ts","../../src/components/rhf/form/form.tsx","../../src/components/atoms/label/label.tsx"],"sourcesContent":["\"use client\";\n\"use client\"\n\nimport * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { DndInput } from \"@/components/atoms/dnd-input\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport type { RhfDndInputProps } from \"./rhf-dnd-input.types\"\n\n/**\n * RhfDndInput is a React Hook Form wrapper around the DndInput component.\n * It provides form integration with validation and error handling.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-dnd-input--docs\n *\n * @example\n * ```tsx\n * // Basic usage with React Hook Form\n * <Form>\n * <RhfDndInput\n * name=\"files\"\n * label=\"Upload Files\"\n * rules={{ required: \"Please upload a file\" }}\n * />\n * </Form>\n *\n * // With file type restrictions\n * <Form>\n * <RhfDndInput\n * name=\"files\"\n * label=\"Upload Images\"\n * accept={{ 'image/*': ['.png', '.jpg'] }}\n * rules={{\n * required: \"Please upload a file\",\n * validate: (files) => files.length > 0 || \"At least one file is required\"\n * }}\n * />\n * </Form>\n * ```\n */\nexport function RhfDndInput<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n required,\n disabled,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n ...other\n}: RhfDndInputProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <DndInput\n {...field}\n {...other}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n onDrop={(acceptedFiles, fileRejections, event) => {\n field.onChange(acceptedFiles)\n other.onDrop?.(acceptedFiles, fileRejections, event)\n }}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n </FormItem>\n )}\n />\n )\n}\n","\"use client\";\n\"use client\"\n\nimport React from \"react\"\nimport { useDropzone } from \"react-dropzone\"\nimport { cn } from \"@/utils\"\nimport { UploadIcon } from \"lucide-react\" // or your icon\n\nimport type { DndInputProps } from \"./dnd-input.types\"\n\n/**\n * Default content shown when no children are provided to the DndInput component.\n * Displays an upload icon, text prompt, and file type information.\n */\nconst defaultContent = (\n <>\n <UploadIcon className=\"text-blue-600 mr-2\" aria-hidden=\"true\" />\n <span>\n <span className=\"underline\">Upload</span> or drop a file right here\n </span>\n <span className=\"ml-auto text-gray-400 text-sm\">all file types</span>\n </>\n)\n\n/**\n * DndInput is a drag-and-drop file upload component built on top of react-dropzone.\n * It provides a customizable dropzone area for file uploads with visual feedback for drag states.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-dnd-input--docs\n *\n * @example\n * ```tsx\n * // Basic usage with default UI\n * <DndInput onDrop={(files) => handleFiles(files)} />\n *\n * // Custom content with file type restrictions\n * <DndInput\n * accept={{ 'image/*': ['.png', '.jpg'] }}\n * onDrop={(files) => handleFiles(files)}\n * >\n * <div>Custom upload UI</div>\n * </DndInput>\n * ```\n */\nexport const DndInput: React.FC<DndInputProps> = ({\n onDrop,\n accept,\n className,\n children,\n ...props\n}) => {\n // Initialize dropzone functionality with provided options\n const { getRootProps, getInputProps, isDragActive, isFocused } = useDropzone({\n onDrop,\n accept,\n ...props\n })\n\n return (\n <div\n {...getRootProps({\n className: cn(\n // Base styles for the dropzone container\n \"flex items-center border-2 border-dashed border-blue-500 rounded-lg p-4 cursor-pointer transition-colors\",\n // Custom className prop for additional styling\n className,\n // Visual feedback for drag state\n isDragActive ? \"bg-blue-50 border-blue-700\" : \"\",\n // Visual feedback for focus state\n isFocused ? \"ring-2 ring-blue-400\" : \"\"\n ),\n \"aria-label\": \"File upload area\",\n tabIndex: 0,\n role: \"button\"\n })}\n data-testid=\"dnd-input\"\n >\n <input {...getInputProps()} />\n {children || defaultContent}\n </div>\n )\n}\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","\"use client\";\n\"use client\"\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues\n} from \"react-hook-form\"\n\nimport { cn } from \"@/utils/cn\"\nimport { Label } from \"@/components/atoms/label\"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\")\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue)\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ 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\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n ref={ref}\n className={cn(error && \"text-destructive\", className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n})\nFormLabel.displayName = \"FormLabel\"\n\nconst FormControl = React.forwardRef<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...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={!!error}\n {...props}\n />\n )\n})\nFormControl.displayName = \"FormControl\"\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n})\nFormDescription.displayName = \"FormDescription\"\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? \"\") : children\n\n if (!body) {\n return null\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn(\"text-sm font-medium text-destructive\", className)}\n {...props}\n >\n {body}\n </p>\n )\n})\nFormMessage.displayName = \"FormMessage\"\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField\n}\n","import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils/index\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nexport interface LabelProps\n extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n VariantProps<typeof labelVariants> {}\n\n/**\n * Label component for creating accessible labels.\n * Built on top of Radix UI's Label primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-label--docs\n *\n */\nconst Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n )\n)\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n"],"mappings":"AAIA,OAAS,kBAAAA,MAAwD,kBCAjE,OAAS,eAAAC,MAAmB,iBCJ5B,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDCA,OAAS,cAAAC,MAAkB,eASzB,mBAAAC,EACE,OAAAC,EACA,QAAAC,MAFF,oBADF,IAAMC,EACJD,EAAAF,EAAA,CACE,UAAAC,EAACF,EAAA,CAAW,UAAU,qBAAqB,cAAY,OAAO,EAC9DG,EAAC,QACC,UAAAD,EAAC,QAAK,UAAU,YAAY,kBAAM,EAAO,8BAC3C,EACAA,EAAC,QAAK,UAAU,gCAAgC,0BAAc,GAChE,EAuBWG,EAAoC,CAAC,CAChD,OAAAC,EACA,OAAAC,EACA,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAM,CAEJ,GAAM,CAAE,aAAAC,EAAc,cAAAC,EAAe,aAAAC,EAAc,UAAAC,CAAU,EAAIC,EAAY,CAC3E,OAAAT,EACA,OAAAC,EACA,GAAGG,CACL,CAAC,EAED,OACEP,EAAC,OACE,GAAGQ,EAAa,CACf,UAAWK,EAET,2GAEAR,EAEAK,EAAe,6B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J,CAEJ","names":["useFormContext","useDropzone","clsx","twMerge","cn","inputs","UploadIcon","Fragment","jsx","jsxs","defaultContent","DndInput","onDrop","accept","className","children","props","getRootProps","getInputProps","isDragActive","isFocused","useDropzone","cn","React","Slot","Controller","FormProvider","useFormContext","React","LabelPrimitive","cva","jsx","labelVariants","cva","Label","className","props","ref","cn","jsx","FormFieldContext","FormField","props","jsx","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body","jsx","jsxs","RhfDndInput","name","label","description","className","required","disabled","ariaLabel","ariaDescribedby","other","control","useFormContext","FormField","field","error","FormItem","FormLabel","FormControl","DndInput","cn","acceptedFiles","fileRejections","event","FormDescription","FormMessage"]}
1
+ {"version":3,"sources":["../../src/components/rhf/rhf-dnd-input/rhf-dnd-input.tsx","../../src/components/atoms/dnd-input/dnd-input.tsx","../../src/utils/cn.ts","../../src/components/rhf/form/form.tsx","../../src/components/atoms/label/label.tsx"],"sourcesContent":["\"use client\";\n\"use client\"\n\nimport * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { DndInput } from \"@/components/atoms/dnd-input\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport type { RhfDndInputProps } from \"./rhf-dnd-input.types\"\n\n/**\n * RhfDndInput is a React Hook Form wrapper around the DndInput component.\n * It provides form integration with validation and error handling.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-dnd-input--docs\n *\n * @example\n * ```tsx\n * // Basic usage with React Hook Form\n * <Form>\n * <RhfDndInput\n * name=\"files\"\n * label=\"Upload Files\"\n * rules={{ required: \"Please upload a file\" }}\n * />\n * </Form>\n *\n * // With file type restrictions\n * <Form>\n * <RhfDndInput\n * name=\"files\"\n * label=\"Upload Images\"\n * accept={{ 'image/*': ['.png', '.jpg'] }}\n * rules={{\n * required: \"Please upload a file\",\n * validate: (files) => files.length > 0 || \"At least one file is required\"\n * }}\n * />\n * </Form>\n * ```\n */\nexport function RhfDndInput<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n required,\n disabled,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n ...other\n}: RhfDndInputProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <DndInput\n {...field}\n {...other}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n onDrop={(acceptedFiles, fileRejections, event) => {\n field.onChange(acceptedFiles)\n other.onDrop?.(acceptedFiles, fileRejections, event)\n }}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n </FormItem>\n )}\n />\n )\n}\n","\"use client\";\n\"use client\"\n\nimport React from \"react\"\nimport { useDropzone } from \"react-dropzone\"\nimport { cn } from \"@/utils\"\nimport { UploadIcon } from \"lucide-react\" // or your icon\n\nimport type { DndInputProps } from \"./dnd-input.types\"\n\n/**\n * Default content shown when no children are provided to the DndInput component.\n * Displays an upload icon, text prompt, and file type information.\n */\nconst defaultContent = (\n <>\n <UploadIcon className=\"text-blue-600 mr-2\" aria-hidden=\"true\" />\n <span>\n <span className=\"underline\">Upload</span> or drop a file right here\n </span>\n <span className=\"ml-auto text-gray-400 text-sm\">all file types</span>\n </>\n)\n\n/**\n * DndInput is a drag-and-drop file upload component built on top of react-dropzone.\n * It provides a customizable dropzone area for file uploads with visual feedback for drag states.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-dnd-input--docs\n *\n * @example\n * ```tsx\n * // Basic usage with default UI\n * <DndInput onDrop={(files) => handleFiles(files)} />\n *\n * // Custom content with file type restrictions\n * <DndInput\n * accept={{ 'image/*': ['.png', '.jpg'] }}\n * onDrop={(files) => handleFiles(files)}\n * >\n * <div>Custom upload UI</div>\n * </DndInput>\n * ```\n */\nexport const DndInput: React.FC<DndInputProps> = ({\n onDrop,\n accept,\n className,\n children,\n ...props\n}) => {\n // Initialize dropzone functionality with provided options\n const { getRootProps, getInputProps, isDragActive, isFocused } = useDropzone({\n onDrop,\n accept,\n ...props\n })\n\n return (\n <div\n {...getRootProps({\n className: cn(\n // Base styles for the dropzone container\n \"flex items-center border-2 border-dashed border-blue-500 rounded-lg p-4 cursor-pointer transition-colors\",\n // Custom className prop for additional styling\n className,\n // Visual feedback for drag state\n isDragActive ? \"bg-blue-50 border-blue-700\" : \"\",\n // Visual feedback for focus state\n isFocused ? \"ring-2 ring-blue-400\" : \"\"\n ),\n \"aria-label\": \"File upload area\",\n tabIndex: 0,\n role: \"button\"\n })}\n data-testid=\"dnd-input\"\n >\n <input {...getInputProps()} />\n {children || defaultContent}\n </div>\n )\n}\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","\"use client\";\n\"use client\"\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues\n} from \"react-hook-form\"\n\nimport { cn } from \"@/utils/cn\"\nimport { Label } from \"@/components/atoms/label\"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\")\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue)\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ 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\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n ref={ref}\n className={cn(error && \"text-destructive\", className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n})\nFormLabel.displayName = \"FormLabel\"\n\nconst FormControl = React.forwardRef<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...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={!!error}\n {...props}\n />\n )\n})\nFormControl.displayName = \"FormControl\"\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n})\nFormDescription.displayName = \"FormDescription\"\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? \"\") : children\n\n if (!body) {\n return null\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn(\"text-sm font-medium text-destructive\", className)}\n {...props}\n >\n {body}\n </p>\n )\n})\nFormMessage.displayName = \"FormMessage\"\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField\n}\n","import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils/index\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nexport interface LabelProps\n extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n VariantProps<typeof labelVariants> {}\n\n/**\n * Label component for creating accessible labels.\n * Built on top of Radix UI's Label primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-label--docs\n *\n */\nconst Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n )\n)\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n"],"mappings":"aAIA,OAAS,kBAAAA,MAAwD,kBCAjE,OAAS,eAAAC,MAAmB,iBCJ5B,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDCA,OAAS,cAAAC,MAAkB,eASzB,mBAAAC,EACE,OAAAC,EACA,QAAAC,MAFF,oBADF,IAAMC,EACJD,EAAAF,EAAA,CACE,UAAAC,EAACF,EAAA,CAAW,UAAU,qBAAqB,cAAY,OAAO,EAC9DG,EAAC,QACC,UAAAD,EAAC,QAAK,UAAU,YAAY,kBAAM,EAAO,8BAC3C,EACAA,EAAC,QAAK,UAAU,gCAAgC,0BAAc,GAChE,EAuBWG,EAAoC,CAAC,CAChD,OAAAC,EACA,OAAAC,EACA,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAM,CAEJ,GAAM,CAAE,aAAAC,EAAc,cAAAC,EAAe,aAAAC,EAAc,UAAAC,CAAU,EAAIC,EAAY,CAC3E,OAAAT,EACA,OAAAC,EACA,GAAGG,CACL,CAAC,EAED,OACEP,EAAC,OACE,GAAGQ,EAAa,CACf,UAAWK,EAET,2GAEAR,EAEAK,EAAe,6BAA+B,GAE9CC,EAAY,uBAAyB,EACvC,EACA,aAAc,mBACd,SAAU,EACV,KAAM,QACR,CAAC,EACD,cAAY,YAEZ,UAAAZ,EAAC,SAAO,GAAGU,EAAc,EAAG,EAC3BH,GAAYL,GACf,CAEJ,EE9EA,UAAYa,MAAW,QAEvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EACA,gBAAAC,GACA,kBAAAC,MAIK,kBCbP,UAAYC,MAAW,QACvB,UAAYC,MAAoB,wBAChC,OAAS,OAAAC,MAA8B,2BAqBnC,cAAAC,MA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AEe,OAAAG,EAFf,QAAAC,MAAA,oBAvBL,SAASC,GAGd,CACA,KAAAC,EACA,MAAAC,EACA,YAAAC,EACA,UAAAC,EACA,SAAAC,EACA,SAAAC,EACA,aAAcC,EACd,mBAAoBC,EACpB,GAAGC,CACL,EAA0C,CACxC,GAAM,CAAE,QAAAC,CAAQ,EAAIC,EAA6B,EAEjD,OACEb,EAACc,EAAA,CACC,KAAMX,EACN,QAASS,EACT,OAAQ,CAAC,CAAE,MAAAG,EAAO,WAAY,CAAE,MAAAC,CAAM,CAAE,IACtCf,EAACgB,EAAA,CACE,UAAAb,GACCH,EAACiB,EAAA,CACE,UAAAd,EACAG,GAAYP,EAAC,QAAK,UAAU,wBAAwB,aAAC,GACxD,EAEFA,EAACmB,EAAA,CACC,SAAAnB,EAACoB,EAAA,CACE,GAAGL,EACH,GAAGJ,EACJ,SAAUH,EACV,aAAYC,EACZ,mBAAkBC,EAClB,eAAc,CAAC,CAACM,EAChB,gBAAeT,EACf,UAAWc,EACTL,GAAS,oDACTV,CACF,EACA,OAAQ,CAACgB,EAAeC,EAAgBC,IAAU,CAChDT,EAAM,SAASO,CAAa,EAC5BX,EAAM,SAASW,EAAeC,EAAgBC,CAAK,CACrD,EACF,EACF,EACCnB,GAAeL,EAACyB,EAAA,CAAiB,SAAApB,EAAY,EAC7CW,GAAShB,EAAC0B,EAAA,CAAa,SAAAV,EAAM,QAAQ,GACxC,EAEJ,CAEJ","names":["useFormContext","useDropzone","clsx","twMerge","cn","inputs","UploadIcon","Fragment","jsx","jsxs","defaultContent","DndInput","onDrop","accept","className","children","props","getRootProps","getInputProps","isDragActive","isFocused","useDropzone","cn","React","Slot","Controller","FormProvider","useFormContext","React","LabelPrimitive","cva","jsx","labelVariants","cva","Label","className","props","ref","cn","jsx","FormFieldContext","FormField","props","jsx","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body","jsx","jsxs","RhfDndInput","name","label","description","className","required","disabled","ariaLabel","ariaDescribedby","other","control","useFormContext","FormField","field","error","FormItem","FormLabel","FormControl","DndInput","cn","acceptedFiles","fileRejections","event","FormDescription","FormMessage"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@me1a/ui",
3
- "version": "2.2.9",
3
+ "version": "2.2.11",
4
4
  "private": false,
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.mjs",