@me1a/ui 2.2.8 → 2.2.9
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.
- package/dist/index.d.mts +60 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -24,7 +24,7 @@ import * as vaul from 'vaul';
|
|
|
24
24
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
25
25
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
26
26
|
import * as react_hook_form from 'react-hook-form';
|
|
27
|
-
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
27
|
+
import { FieldValues, FieldPath, ControllerProps, RegisterOptions } from 'react-hook-form';
|
|
28
28
|
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
29
29
|
import { Slot } from '@radix-ui/react-slot';
|
|
30
30
|
import { ClassValue } from 'clsx';
|
|
@@ -2736,6 +2736,64 @@ interface RHFSelectProps<TFieldValues extends FieldValues = FieldValues, TName e
|
|
|
2736
2736
|
*/
|
|
2737
2737
|
declare function RHFSelect<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, warningText, required, disabled, readOnly, placeholder, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, options, ...other }: RHFSelectProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2738
2738
|
|
|
2739
|
+
/**
|
|
2740
|
+
* Props interface for the RhfDndInput component.
|
|
2741
|
+
* Extends DndInputProps to add React Hook Form specific properties.
|
|
2742
|
+
*
|
|
2743
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-dnd-input--docs
|
|
2744
|
+
*/
|
|
2745
|
+
interface RhfDndInputProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<DndInputProps, "name"> {
|
|
2746
|
+
/** The name of the form field */
|
|
2747
|
+
name: TName;
|
|
2748
|
+
/** React Hook Form validation rules */
|
|
2749
|
+
rules?: RegisterOptions<TFieldValues, TName>;
|
|
2750
|
+
/** Label text for the form field */
|
|
2751
|
+
label?: string;
|
|
2752
|
+
/** Description text for the form field */
|
|
2753
|
+
description?: string;
|
|
2754
|
+
/** Whether the field is required */
|
|
2755
|
+
required?: boolean;
|
|
2756
|
+
/** Whether the field is disabled */
|
|
2757
|
+
disabled?: boolean;
|
|
2758
|
+
/** ARIA label for accessibility */
|
|
2759
|
+
"aria-label"?: string;
|
|
2760
|
+
/** ARIA describedby for accessibility */
|
|
2761
|
+
"aria-describedby"?: string;
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
/**
|
|
2765
|
+
* RhfDndInput is a React Hook Form wrapper around the DndInput component.
|
|
2766
|
+
* It provides form integration with validation and error handling.
|
|
2767
|
+
*
|
|
2768
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-dnd-input--docs
|
|
2769
|
+
*
|
|
2770
|
+
* @example
|
|
2771
|
+
* ```tsx
|
|
2772
|
+
* // Basic usage with React Hook Form
|
|
2773
|
+
* <Form>
|
|
2774
|
+
* <RhfDndInput
|
|
2775
|
+
* name="files"
|
|
2776
|
+
* label="Upload Files"
|
|
2777
|
+
* rules={{ required: "Please upload a file" }}
|
|
2778
|
+
* />
|
|
2779
|
+
* </Form>
|
|
2780
|
+
*
|
|
2781
|
+
* // With file type restrictions
|
|
2782
|
+
* <Form>
|
|
2783
|
+
* <RhfDndInput
|
|
2784
|
+
* name="files"
|
|
2785
|
+
* label="Upload Images"
|
|
2786
|
+
* accept={{ 'image/*': ['.png', '.jpg'] }}
|
|
2787
|
+
* rules={{
|
|
2788
|
+
* required: "Please upload a file",
|
|
2789
|
+
* validate: (files) => files.length > 0 || "At least one file is required"
|
|
2790
|
+
* }}
|
|
2791
|
+
* />
|
|
2792
|
+
* </Form>
|
|
2793
|
+
* ```
|
|
2794
|
+
*/
|
|
2795
|
+
declare function RhfDndInput<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, required, disabled, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, ...other }: RhfDndInputProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
2796
|
+
|
|
2739
2797
|
declare function useIsMobile(): boolean;
|
|
2740
2798
|
|
|
2741
2799
|
type ToasterToast = ToastProps & {
|
|
@@ -2782,4 +2840,4 @@ declare function useToast(): {
|
|
|
2782
2840
|
|
|
2783
2841
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2784
2842
|
|
|
2785
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, type CommandEmptyRef, CommandGroup, type CommandGroupProps, type CommandGroupRef, CommandInput, type CommandInputProps, type CommandInputRef, CommandItem, type CommandItemProps, type CommandItemRef, CommandList, type CommandListProps, type CommandListRef, type CommandProps, type CommandRef, CommandSeparator, type CommandSeparatorProps, type CommandSeparatorRef, CommandShortcut, type CommandShortcutProps, Container, type ContainerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DndInput, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuPortalProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, type FormFieldContextValue, type FormFieldProps, FormItem, type FormItemContextValue, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, type FormProps, Input, Label, type LabelProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuIndicator, type NavigationMenuIndicatorProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, NavigationMenuViewport, type NavigationMenuViewportProps, PageLoader, type PageLoaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, RHFCheckbox, RHFMultiSelect, RHFRadioButtonGroup, type RHFRadioButtonGroupOption, type RHFRadioButtonGroupProps, RHFRadioGroup, RHFSelect, type RHFSelectOption, type RHFSelectProps, RHFSwitch, RHFTextField, RHFTextarea, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RadioItemContainer, RadioItemLabel, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps, Select, type SelectOption, type SelectProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContextProps, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Stack, type StackProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TextField, type TextFieldProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, type TypographyAlign, type TypographyProps, type TypographyVariant, badgeVariants, buttonVariants, cn, reducer, sidebarMenuButtonVariants, toast, typographyVariants, useFormField, useIsMobile, useSidebar, useToast };
|
|
2843
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, type CommandEmptyRef, CommandGroup, type CommandGroupProps, type CommandGroupRef, CommandInput, type CommandInputProps, type CommandInputRef, CommandItem, type CommandItemProps, type CommandItemRef, CommandList, type CommandListProps, type CommandListRef, type CommandProps, type CommandRef, CommandSeparator, type CommandSeparatorProps, type CommandSeparatorRef, CommandShortcut, type CommandShortcutProps, Container, type ContainerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DndInput, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuPortalProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, type FormFieldContextValue, type FormFieldProps, FormItem, type FormItemContextValue, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, type FormProps, Input, Label, type LabelProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuIndicator, type NavigationMenuIndicatorProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, NavigationMenuViewport, type NavigationMenuViewportProps, PageLoader, type PageLoaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, RHFCheckbox, RHFMultiSelect, RHFRadioButtonGroup, type RHFRadioButtonGroupOption, type RHFRadioButtonGroupProps, RHFRadioGroup, RHFSelect, type RHFSelectOption, type RHFSelectProps, RHFSwitch, RHFTextField, RHFTextarea, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RadioItemContainer, RadioItemLabel, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps, RhfDndInput, type RhfDndInputProps, Select, type SelectOption, type SelectProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContextProps, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Stack, type StackProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TextField, type TextFieldProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, type TypographyAlign, type TypographyProps, type TypographyVariant, badgeVariants, buttonVariants, cn, reducer, sidebarMenuButtonVariants, toast, typographyVariants, useFormField, useIsMobile, useSidebar, useToast };
|