@codapet/design-system 0.6.3 → 0.6.5

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
@@ -410,6 +410,35 @@ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }
410
410
  }): react_jsx_runtime.JSX.Element;
411
411
  declare function DropdownMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
412
412
 
413
+ interface DropdownSelectProps {
414
+ children: React$1.ReactNode;
415
+ value?: string;
416
+ defaultValue?: string;
417
+ onValueChange?: (value: string) => void;
418
+ open?: boolean;
419
+ defaultOpen?: boolean;
420
+ onOpenChange?: (open: boolean) => void;
421
+ disabled?: boolean;
422
+ error?: boolean;
423
+ placeholder?: string;
424
+ icon?: React$1.ReactNode;
425
+ }
426
+ declare function DropdownSelect({ children, value: valueProp, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, disabled, error, placeholder, icon, }: DropdownSelectProps): react_jsx_runtime.JSX.Element;
427
+ interface DropdownSelectLabelProps extends React$1.ComponentProps<'div'> {
428
+ mandatory?: boolean;
429
+ }
430
+ declare function DropdownSelectLabel({ className, children, mandatory, ...props }: DropdownSelectLabelProps): react_jsx_runtime.JSX.Element;
431
+ type DropdownSelectTriggerProps = Omit<React$1.ComponentProps<typeof PopoverPrimitive.Trigger>, 'asChild'>;
432
+ declare function DropdownSelectTrigger({ className, ...props }: DropdownSelectTriggerProps): react_jsx_runtime.JSX.Element;
433
+ type DropdownSelectContentProps = Omit<React$1.ComponentProps<typeof PopoverPrimitive.Content>, 'asChild'>;
434
+ declare function DropdownSelectContent({ className, children, ...props }: DropdownSelectContentProps): react_jsx_runtime.JSX.Element;
435
+ interface DropdownSelectOptionProps extends React$1.ComponentProps<'div'> {
436
+ value: string;
437
+ label?: string;
438
+ disabled?: boolean;
439
+ }
440
+ declare function DropdownSelectOption({ className, value: optionValue, label, disabled: optionDisabled, children, ...props }: DropdownSelectOptionProps): react_jsx_runtime.JSX.Element;
441
+
413
442
  declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
414
443
  declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
415
444
  declare const useFormField: () => {
@@ -474,6 +503,34 @@ declare function MenubarSubTrigger({ className, inset, children, ...props }: Rea
474
503
  }): react_jsx_runtime.JSX.Element;
475
504
  declare function MenubarSubContent({ className, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
476
505
 
506
+ interface MultiSelectFreeTextOption {
507
+ value: string;
508
+ label: string;
509
+ }
510
+ interface MultiSelectFreeTextProps {
511
+ /** Current tag values */
512
+ values?: string[];
513
+ /** Default tag values (uncontrolled) */
514
+ defaultValues?: string[];
515
+ /** Callback when tags change */
516
+ onValuesChange?: (values: string[]) => void;
517
+ /** Suggestion options shown in dropdown */
518
+ options?: MultiSelectFreeTextOption[];
519
+ /** Placeholder when no tags and no input text */
520
+ placeholder?: string;
521
+ /** Left icon */
522
+ icon?: React$1.ReactNode;
523
+ /** Label text */
524
+ label?: string;
525
+ /** Show mandatory asterisk on label */
526
+ mandatory?: boolean;
527
+ /** Disabled state */
528
+ disabled?: boolean;
529
+ /** Additional className */
530
+ className?: string;
531
+ }
532
+ declare function MultiSelectFreeText({ values: valuesProp, defaultValues, onValuesChange, options, placeholder, icon, label, mandatory, disabled, className, }: MultiSelectFreeTextProps): react_jsx_runtime.JSX.Element;
533
+
477
534
  declare function NavigationMenu({ className, children, viewport, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
478
535
  viewport?: boolean;
479
536
  }): react_jsx_runtime.JSX.Element;
@@ -499,6 +556,19 @@ declare function PaginationEllipsis({ className, ...props }: React$1.ComponentPr
499
556
 
500
557
  declare function Progress({ className, value, ...props }: React$1.ComponentProps<typeof ProgressPrimitive.Root>): react_jsx_runtime.JSX.Element;
501
558
 
559
+ declare const progressBarVariants: (props?: ({
560
+ device?: "mobile" | "desktop" | null | undefined;
561
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
562
+ interface ProgressBarProps extends React$1.ComponentProps<'div'>, VariantProps<typeof progressBarVariants> {
563
+ /** Current step (1-based). Must be between 1 and totalSteps. */
564
+ currentStep?: number;
565
+ /** Total number of steps. Defaults to 7. */
566
+ totalSteps?: number;
567
+ /** Direct percentage value (0-100). Overrides step-based calculation when provided. */
568
+ value?: number;
569
+ }
570
+ declare function ProgressBar({ className, device, currentStep, totalSteps, value, ...props }: ProgressBarProps): react_jsx_runtime.JSX.Element;
571
+
502
572
  declare function RadioGroup({ className, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime.JSX.Element;
503
573
  declare function RadioGroupItem({ className, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Item>): react_jsx_runtime.JSX.Element;
504
574
 
@@ -511,6 +581,44 @@ declare function ResizableHandle({ withHandle, className, ...props }: React$1.Co
511
581
  declare function ScrollArea({ className, children, ...props }: React$1.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
512
582
  declare function ScrollBar({ className, orientation, ...props }: React$1.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
513
583
 
584
+ interface SearchSuggestion {
585
+ icon?: React$1.ReactNode;
586
+ label: string;
587
+ }
588
+ interface SearchInputProps {
589
+ /** 'icon' renders a 36×36 search icon button; 'button' renders a "Search" text button */
590
+ variant?: 'icon' | 'button';
591
+ /** Controlled value */
592
+ value?: string;
593
+ /** Uncontrolled default value */
594
+ defaultValue?: string;
595
+ /** Called on every input change */
596
+ onValueChange?: (value: string) => void;
597
+ /** Called on Enter key or search button click */
598
+ onSearch?: (value: string) => void;
599
+ /** Called when the clear (X) button is clicked */
600
+ onClear?: () => void;
601
+ placeholder?: string;
602
+ /** Label text above the input */
603
+ label?: string;
604
+ /** Helper text below the input */
605
+ helperText?: string;
606
+ /** Optional left icon */
607
+ icon?: React$1.ReactNode;
608
+ /** Error state */
609
+ error?: boolean;
610
+ /** Error helper text (overrides helperText when error=true) */
611
+ errorMessage?: string;
612
+ /** Disabled state */
613
+ disabled?: boolean;
614
+ /** Suggestion items shown in dropdown when typing */
615
+ suggestions?: SearchSuggestion[];
616
+ /** Called when a suggestion is clicked */
617
+ onSuggestionClick?: (label: string) => void;
618
+ className?: string;
619
+ }
620
+ declare function SearchInput({ variant, value: valueProp, defaultValue, onValueChange, onSearch, onClear, placeholder, label, helperText, icon, error, errorMessage, disabled, suggestions, onSuggestionClick, className, }: SearchInputProps): react_jsx_runtime.JSX.Element;
621
+
514
622
  type SearchableSelectOption = {
515
623
  value: string;
516
624
  label: string;
@@ -686,10 +794,11 @@ declare function TableHead({ className, ...props }: React$1.ComponentProps<"th">
686
794
  declare function TableCell({ className, ...props }: React$1.ComponentProps<"td">): react_jsx_runtime.JSX.Element;
687
795
  declare function TableCaption({ className, ...props }: React$1.ComponentProps<"caption">): react_jsx_runtime.JSX.Element;
688
796
 
689
- declare function Tabs({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
797
+ declare function Tabs({ className, orientation, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
690
798
  declare function TabsList({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
691
799
  declare const tabsTriggerVariants: (props?: ({
692
800
  size?: "md" | "lg" | null | undefined;
801
+ orientation?: "horizontal" | "vertical" | null | undefined;
693
802
  } & class_variance_authority_types.ClassProp) | undefined) => string;
694
803
  interface TabsTriggerProps extends React$1.ComponentProps<typeof TabsPrimitive.Trigger>, VariantProps<typeof tabsTriggerVariants> {
695
804
  }
@@ -766,4 +875,4 @@ declare function cn(...inputs: ClassValue[]): string;
766
875
 
767
876
  declare function useIsMobile(): boolean;
768
877
 
769
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertBanner, type AlertBannerProps, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, AutoResizeTextarea, Avatar, AvatarFallback, AvatarImage, Badge, BadgeActionable, type BadgeActionableProps, BadgeInformative, BadgeInformativeGroup, BadgeInformativeItem, type BadgeInformativeProps, BadgeNumber, type BadgeNumberProps, Body, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DateFormat, DateInput, type DateInputProps, DateRangeInput, type DateRangeInputProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayHeading, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HeadingL, HeadingM, HeadingS, HeadingXL, HeadingXS, HeadingXXS, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTooltipContent, type RichTooltipContentProps, ScrollArea, ScrollBar, SearchableSelect, SearchableSelectContent, SearchableSelectEmpty, SearchableSelectGroup, SearchableSelectItem, type SearchableSelectOption, type SearchableSelectProps, SearchableSelectTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SmartDialog, SmartDialogClose, SmartDialogContent, SmartDialogDescription, SmartDialogFooter, SmartDialogHeader, SmartDialogTitle, SmartDialogTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type TimeFormat, TimeInput, type TimeInputProps, type TimeValue, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertBannerVariants, badgeActionableVariants, badgeInformativeVariants, badgeNumberVariants, badgeVariants, bodyTextVariants, buttonVariants, cn, displayTextVariants, inputVariants, labelTextVariants, navigationMenuTriggerStyle, tabsTriggerVariants, toggleVariants, useFormField, useIsMobile, useSidebar };
878
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertBanner, type AlertBannerProps, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, AutoResizeTextarea, Avatar, AvatarFallback, AvatarImage, Badge, BadgeActionable, type BadgeActionableProps, BadgeInformative, BadgeInformativeGroup, BadgeInformativeItem, type BadgeInformativeProps, BadgeNumber, type BadgeNumberProps, Body, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DateFormat, DateInput, type DateInputProps, DateRangeInput, type DateRangeInputProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayHeading, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DropdownSelect, DropdownSelectContent, type DropdownSelectContentProps, DropdownSelectLabel, type DropdownSelectLabelProps, DropdownSelectOption, type DropdownSelectOptionProps, type DropdownSelectProps, DropdownSelectTrigger, type DropdownSelectTriggerProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HeadingL, HeadingM, HeadingS, HeadingXL, HeadingXS, HeadingXXS, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MultiSelectFreeText, type MultiSelectFreeTextOption, type MultiSelectFreeTextProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProgressBar, type ProgressBarProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTooltipContent, type RichTooltipContentProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, type SearchSuggestion, SearchableSelect, SearchableSelectContent, SearchableSelectEmpty, SearchableSelectGroup, SearchableSelectItem, type SearchableSelectOption, type SearchableSelectProps, SearchableSelectTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SmartDialog, SmartDialogClose, SmartDialogContent, SmartDialogDescription, SmartDialogFooter, SmartDialogHeader, SmartDialogTitle, SmartDialogTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type TimeFormat, TimeInput, type TimeInputProps, type TimeValue, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertBannerVariants, badgeActionableVariants, badgeInformativeVariants, badgeNumberVariants, badgeVariants, bodyTextVariants, buttonVariants, cn, displayTextVariants, inputVariants, labelTextVariants, navigationMenuTriggerStyle, progressBarVariants, tabsTriggerVariants, toggleVariants, useFormField, useIsMobile, useSidebar };