@me1a/ui 2.2.10 → 2.5.0

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 CHANGED
@@ -18,6 +18,7 @@ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
18
18
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
19
19
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
20
20
  import { DropzoneOptions } from 'react-dropzone';
21
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
21
22
  import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
22
23
  import * as TabsPrimitive from '@radix-ui/react-tabs';
23
24
  import * as vaul from 'vaul';
@@ -732,27 +733,27 @@ type ResizableHandleProps = ComponentProps<typeof ResizablePrimitive.PanelResize
732
733
  withHandle?: boolean;
733
734
  };
734
735
 
735
- type SelectOption = {
736
- id: string;
736
+ type SelectOption<T extends string | number = string | number> = {
737
+ id: T;
737
738
  label: string;
738
739
  startIcon?: React$1.ReactNode;
739
740
  endIcon?: React$1.ReactNode;
740
741
  className?: string;
741
742
  disabled?: boolean;
742
743
  };
743
- type SelectProps = {
744
+ type SelectProps<T extends string | number = string | number> = {
744
745
  /** Whether the select is searchable */
745
746
  searchable?: boolean;
746
747
  /** Whether the select should take up the full width of its container */
747
748
  fullWidth?: boolean;
748
749
  /** Currently selected value */
749
- value: string;
750
+ value: T;
750
751
  /** Array of options to display in the select */
751
- options: SelectOption[];
752
+ options: SelectOption<T>[];
752
753
  /** Callback fired when the value changes */
753
- onChange: (value: string) => void;
754
+ onChange: (value: T) => void;
754
755
  /** Render a custom CommandList for the select, if not provided, the select will render a default CommandList with the options */
755
- renderCommandList?: (options: SelectOption[]) => React$1.ReactNode;
756
+ renderCommandList?: (options: SelectOption<T>[]) => React$1.ReactNode;
756
757
  /** Placeholder text to show when no value is selected */
757
758
  placeholder?: string;
758
759
  /** Whether the select is disabled */
@@ -785,7 +786,7 @@ type SelectProps = {
785
786
  * />
786
787
  * ```
787
788
  */
788
- declare function Select({ options, value, onChange, placeholder, disabled, required, error, className, fullWidth, searchable, id, renderCommandList }: SelectProps): react_jsx_runtime.JSX.Element;
789
+ declare function Select<T extends string | number = string | number>({ options, value, onChange, placeholder, disabled, required, error, className, fullWidth, searchable, id, renderCommandList }: SelectProps<T>): react_jsx_runtime.JSX.Element;
789
790
 
790
791
  type MultiSelectOption = {
791
792
  id: string;
@@ -1290,6 +1291,34 @@ interface DndInputProps extends DropzoneOptions {
1290
1291
  */
1291
1292
  declare const DndInput: React__default.FC<DndInputProps>;
1292
1293
 
1294
+ /**
1295
+ * ScrollArea component that provides a custom scrollable area with a styled scrollbar.
1296
+ * Built on top of Radix UI's ScrollArea primitive.
1297
+ *
1298
+ * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-scroll-area--docs
1299
+ *
1300
+ * @example
1301
+ * ```tsx
1302
+ * <ScrollArea className="h-[200px] w-[350px] rounded-md border p-4">
1303
+ * <div className="space-y-4">
1304
+ * <h4 className="text-sm font-medium leading-none">Scroll Area</h4>
1305
+ * <p className="text-sm text-muted-foreground">
1306
+ * Scrollable content goes here...
1307
+ * </p>
1308
+ * </div>
1309
+ * </ScrollArea>
1310
+ * ```
1311
+ */
1312
+ declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1313
+ declare const ScrollBar: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
1314
+ orientation?: "vertical" | "horizontal";
1315
+ } & React$1.RefAttributes<HTMLDivElement>>;
1316
+
1317
+ type ScrollAreaProps = React$1.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>;
1318
+ type ScrollBarProps = React$1.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> & {
1319
+ orientation?: "vertical" | "horizontal";
1320
+ };
1321
+
1293
1322
  /**
1294
1323
  * Props interface for the Card component.
1295
1324
  * Extends the native div HTML attributes and adds support for custom styling.
@@ -2840,4 +2869,4 @@ declare function useToast(): {
2840
2869
 
2841
2870
  declare function cn(...inputs: ClassValue[]): string;
2842
2871
 
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 };
2872
+ 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, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, 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 };