@invana/ui 0.0.4 → 0.0.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.cts CHANGED
@@ -775,6 +775,59 @@ interface PanelContentProps {
775
775
  }
776
776
  declare function PanelContent({ title, titleText, children, onClose, showClose, headerClassName, bodyClassName, footerContent, footerClassName, closeIcon }: PanelContentProps): react_jsx_runtime.JSX.Element;
777
777
 
778
+ interface RichSelectOption {
779
+ /** Stable key used as the selection value. */
780
+ value: string;
781
+ /** Rich primary content — string or JSX. */
782
+ label: React$1.ReactNode;
783
+ /** Secondary line shown muted under the label. */
784
+ description?: React$1.ReactNode;
785
+ /** Lucide glyph or any component accepting `{ size }`. */
786
+ icon?: React$1.ElementType;
787
+ /** Trailing content (e.g. a count or status badge), pushed to the right. */
788
+ badge?: React$1.ReactNode;
789
+ disabled?: boolean;
790
+ }
791
+ interface RichSelectProps {
792
+ options: RichSelectOption[];
793
+ /** `string` in single mode, `string[]` in multi mode. */
794
+ value: string | string[];
795
+ /** Fired with the new selection — mirrors the mode of {@link value}. */
796
+ onChange: (value: string | string[]) => void;
797
+ /** Enable multi-select (checkboxes). Default `false` (radio). */
798
+ multiple?: boolean;
799
+ /** Menu heading and default trigger prefix. */
800
+ label?: string;
801
+ /** Trigger content when nothing is selected. */
802
+ placeholder?: React$1.ReactNode;
803
+ /** Full custom row JSX. Overrides the default row layout. */
804
+ renderOption?: (option: RichSelectOption, state: {
805
+ selected: boolean;
806
+ }) => React$1.ReactNode;
807
+ /** Full custom trigger JSX for the current selection. Overrides the default. */
808
+ renderValue?: (selected: RichSelectOption[]) => React$1.ReactNode;
809
+ /** Menu alignment relative to the trigger. Default `'start'`. */
810
+ align?: "start" | "center" | "end";
811
+ /** Trigger tooltip content; omit to disable the tooltip. */
812
+ tooltip?: React$1.ReactNode;
813
+ /** Side the trigger tooltip is placed on. Default `'top'`. */
814
+ tooltipSide?: "top" | "right" | "bottom" | "left";
815
+ disabled?: boolean;
816
+ /** Class merged onto the trigger Button. */
817
+ triggerClassName?: string;
818
+ /** Class merged onto the dropdown content. */
819
+ contentClassName?: string;
820
+ /** Alias of {@link triggerClassName} for ergonomics. */
821
+ className?: string;
822
+ }
823
+ /**
824
+ * A `<select>` replacement built on {@link DropdownMenu}. Each option carries
825
+ * rich content (`label`, `description`, `icon`, `badge`) and both the rows and
826
+ * the trigger are fully customizable via `renderOption` / `renderValue`.
827
+ * Supports single (radio) and multi (checkbox) selection via `multiple`.
828
+ */
829
+ declare function RichSelect({ options, value, onChange, multiple, label, placeholder, renderOption, renderValue, align, tooltip, tooltipSide, disabled, triggerClassName, contentClassName, className, }: RichSelectProps): react_jsx_runtime.JSX.Element;
830
+
778
831
  interface TabConfig {
779
832
  /** Unique identifier for the tab */
780
833
  value: string;
@@ -1038,4 +1091,4 @@ declare const Typography: {
1038
1091
  Pre: React$1.ForwardRefExoticComponent<TypographyPreProps & React$1.RefAttributes<HTMLPreElement>>;
1039
1092
  };
1040
1093
 
1041
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BaseNavProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, ButtonWithTooltip, type ButtonWithTooltipProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, HoverCard, HoverCardContent, HoverCardTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, MenuItem, type MenuItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavBase, NavHorizontal, type NavHorizontalItem, NavHorizontalItems, type NavHorizontalItemsProps, type NavHorizontalProps, type NavSection, NavVertical, type NavVerticalItem, NavVerticalItems, type NavVerticalItemsProps, type NavVerticalProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, type NestedMenuProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, type PanelContentProps, Popover, PopoverContent, PopoverTrigger, Progress, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, Spinner, type TabConfig, TabbedPanel, type TabbedPanelProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourController, type TourProps, type TourReference, type TourStep, TreeItem, TreeView, type TreeViewProps, Typography, TypographyBlockquote, type TypographyBlockquoteProps, TypographyH1, type TypographyH1Props, TypographyH2, type TypographyH2Props, TypographyH3, type TypographyH3Props, TypographyH4, type TypographyH4Props, TypographyH5, type TypographyH5Props, TypographyH6, type TypographyH6Props, TypographyInlineCode, type TypographyInlineCodeProps, TypographyLarge, type TypographyLargeProps, TypographyLead, type TypographyLeadProps, TypographyList, type TypographyListProps, TypographyMuted, type TypographyMutedProps, TypographyP, type TypographyPProps, TypographyPre, type TypographyPreProps, TypographySmall, type TypographySmallProps, UnderDevelopment, type UnderDevelopmentProps, type UseTourOptions, badgeVariants, buttonGroupVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useSidebar, useTour };
1094
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BaseNavProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, ButtonWithTooltip, type ButtonWithTooltipProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, HoverCard, HoverCardContent, HoverCardTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, MenuItem, type MenuItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavBase, NavHorizontal, type NavHorizontalItem, NavHorizontalItems, type NavHorizontalItemsProps, type NavHorizontalProps, type NavSection, NavVertical, type NavVerticalItem, NavVerticalItems, type NavVerticalItemsProps, type NavVerticalProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, type NestedMenuProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, type PanelContentProps, Popover, PopoverContent, PopoverTrigger, Progress, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichSelect, type RichSelectOption, type RichSelectProps, ScrollArea, ScrollBar, SearchInput, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, Spinner, type TabConfig, TabbedPanel, type TabbedPanelProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourController, type TourProps, type TourReference, type TourStep, TreeItem, TreeView, type TreeViewProps, Typography, TypographyBlockquote, type TypographyBlockquoteProps, TypographyH1, type TypographyH1Props, TypographyH2, type TypographyH2Props, TypographyH3, type TypographyH3Props, TypographyH4, type TypographyH4Props, TypographyH5, type TypographyH5Props, TypographyH6, type TypographyH6Props, TypographyInlineCode, type TypographyInlineCodeProps, TypographyLarge, type TypographyLargeProps, TypographyLead, type TypographyLeadProps, TypographyList, type TypographyListProps, TypographyMuted, type TypographyMutedProps, TypographyP, type TypographyPProps, TypographyPre, type TypographyPreProps, TypographySmall, type TypographySmallProps, UnderDevelopment, type UnderDevelopmentProps, type UseTourOptions, badgeVariants, buttonGroupVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useSidebar, useTour };
package/dist/index.d.ts CHANGED
@@ -775,6 +775,59 @@ interface PanelContentProps {
775
775
  }
776
776
  declare function PanelContent({ title, titleText, children, onClose, showClose, headerClassName, bodyClassName, footerContent, footerClassName, closeIcon }: PanelContentProps): react_jsx_runtime.JSX.Element;
777
777
 
778
+ interface RichSelectOption {
779
+ /** Stable key used as the selection value. */
780
+ value: string;
781
+ /** Rich primary content — string or JSX. */
782
+ label: React$1.ReactNode;
783
+ /** Secondary line shown muted under the label. */
784
+ description?: React$1.ReactNode;
785
+ /** Lucide glyph or any component accepting `{ size }`. */
786
+ icon?: React$1.ElementType;
787
+ /** Trailing content (e.g. a count or status badge), pushed to the right. */
788
+ badge?: React$1.ReactNode;
789
+ disabled?: boolean;
790
+ }
791
+ interface RichSelectProps {
792
+ options: RichSelectOption[];
793
+ /** `string` in single mode, `string[]` in multi mode. */
794
+ value: string | string[];
795
+ /** Fired with the new selection — mirrors the mode of {@link value}. */
796
+ onChange: (value: string | string[]) => void;
797
+ /** Enable multi-select (checkboxes). Default `false` (radio). */
798
+ multiple?: boolean;
799
+ /** Menu heading and default trigger prefix. */
800
+ label?: string;
801
+ /** Trigger content when nothing is selected. */
802
+ placeholder?: React$1.ReactNode;
803
+ /** Full custom row JSX. Overrides the default row layout. */
804
+ renderOption?: (option: RichSelectOption, state: {
805
+ selected: boolean;
806
+ }) => React$1.ReactNode;
807
+ /** Full custom trigger JSX for the current selection. Overrides the default. */
808
+ renderValue?: (selected: RichSelectOption[]) => React$1.ReactNode;
809
+ /** Menu alignment relative to the trigger. Default `'start'`. */
810
+ align?: "start" | "center" | "end";
811
+ /** Trigger tooltip content; omit to disable the tooltip. */
812
+ tooltip?: React$1.ReactNode;
813
+ /** Side the trigger tooltip is placed on. Default `'top'`. */
814
+ tooltipSide?: "top" | "right" | "bottom" | "left";
815
+ disabled?: boolean;
816
+ /** Class merged onto the trigger Button. */
817
+ triggerClassName?: string;
818
+ /** Class merged onto the dropdown content. */
819
+ contentClassName?: string;
820
+ /** Alias of {@link triggerClassName} for ergonomics. */
821
+ className?: string;
822
+ }
823
+ /**
824
+ * A `<select>` replacement built on {@link DropdownMenu}. Each option carries
825
+ * rich content (`label`, `description`, `icon`, `badge`) and both the rows and
826
+ * the trigger are fully customizable via `renderOption` / `renderValue`.
827
+ * Supports single (radio) and multi (checkbox) selection via `multiple`.
828
+ */
829
+ declare function RichSelect({ options, value, onChange, multiple, label, placeholder, renderOption, renderValue, align, tooltip, tooltipSide, disabled, triggerClassName, contentClassName, className, }: RichSelectProps): react_jsx_runtime.JSX.Element;
830
+
778
831
  interface TabConfig {
779
832
  /** Unique identifier for the tab */
780
833
  value: string;
@@ -1038,4 +1091,4 @@ declare const Typography: {
1038
1091
  Pre: React$1.ForwardRefExoticComponent<TypographyPreProps & React$1.RefAttributes<HTMLPreElement>>;
1039
1092
  };
1040
1093
 
1041
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BaseNavProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, ButtonWithTooltip, type ButtonWithTooltipProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, HoverCard, HoverCardContent, HoverCardTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, MenuItem, type MenuItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavBase, NavHorizontal, type NavHorizontalItem, NavHorizontalItems, type NavHorizontalItemsProps, type NavHorizontalProps, type NavSection, NavVertical, type NavVerticalItem, NavVerticalItems, type NavVerticalItemsProps, type NavVerticalProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, type NestedMenuProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, type PanelContentProps, Popover, PopoverContent, PopoverTrigger, Progress, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, Spinner, type TabConfig, TabbedPanel, type TabbedPanelProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourController, type TourProps, type TourReference, type TourStep, TreeItem, TreeView, type TreeViewProps, Typography, TypographyBlockquote, type TypographyBlockquoteProps, TypographyH1, type TypographyH1Props, TypographyH2, type TypographyH2Props, TypographyH3, type TypographyH3Props, TypographyH4, type TypographyH4Props, TypographyH5, type TypographyH5Props, TypographyH6, type TypographyH6Props, TypographyInlineCode, type TypographyInlineCodeProps, TypographyLarge, type TypographyLargeProps, TypographyLead, type TypographyLeadProps, TypographyList, type TypographyListProps, TypographyMuted, type TypographyMutedProps, TypographyP, type TypographyPProps, TypographyPre, type TypographyPreProps, TypographySmall, type TypographySmallProps, UnderDevelopment, type UnderDevelopmentProps, type UseTourOptions, badgeVariants, buttonGroupVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useSidebar, useTour };
1094
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BaseNavProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, ButtonWithTooltip, type ButtonWithTooltipProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, HoverCard, HoverCardContent, HoverCardTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, MenuItem, type MenuItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavBase, NavHorizontal, type NavHorizontalItem, NavHorizontalItems, type NavHorizontalItemsProps, type NavHorizontalProps, type NavSection, NavVertical, type NavVerticalItem, NavVerticalItems, type NavVerticalItemsProps, type NavVerticalProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, type NestedMenuProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, type PanelContentProps, Popover, PopoverContent, PopoverTrigger, Progress, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichSelect, type RichSelectOption, type RichSelectProps, ScrollArea, ScrollBar, SearchInput, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, Spinner, type TabConfig, TabbedPanel, type TabbedPanelProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourController, type TourProps, type TourReference, type TourStep, TreeItem, TreeView, type TreeViewProps, Typography, TypographyBlockquote, type TypographyBlockquoteProps, TypographyH1, type TypographyH1Props, TypographyH2, type TypographyH2Props, TypographyH3, type TypographyH3Props, TypographyH4, type TypographyH4Props, TypographyH5, type TypographyH5Props, TypographyH6, type TypographyH6Props, TypographyInlineCode, type TypographyInlineCodeProps, TypographyLarge, type TypographyLargeProps, TypographyLead, type TypographyLeadProps, TypographyList, type TypographyListProps, TypographyMuted, type TypographyMutedProps, TypographyP, type TypographyPProps, TypographyPre, type TypographyPreProps, TypographySmall, type TypographySmallProps, UnderDevelopment, type UnderDevelopmentProps, type UseTourOptions, badgeVariants, buttonGroupVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useSidebar, useTour };
package/dist/index.js CHANGED
@@ -2943,6 +2943,124 @@ function PanelContent({
2943
2943
  footerContent ? /* @__PURE__ */ jsx(CardFooter, { className: footerClassName, children: footerContent }) : /* @__PURE__ */ jsx(Fragment, {})
2944
2944
  ] }) });
2945
2945
  }
2946
+ function OptionRow({ option }) {
2947
+ const Icon = option.icon;
2948
+ return /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col gap-0.5", children: [
2949
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [
2950
+ Icon && /* @__PURE__ */ jsx(Icon, { size: 16, className: "shrink-0" }),
2951
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: option.label }),
2952
+ option.badge != null && /* @__PURE__ */ jsx("span", { className: "ml-auto pl-2", children: option.badge })
2953
+ ] }),
2954
+ option.description != null && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: option.description })
2955
+ ] });
2956
+ }
2957
+ function RichSelect({
2958
+ options,
2959
+ value,
2960
+ onChange,
2961
+ multiple = false,
2962
+ label,
2963
+ placeholder,
2964
+ renderOption,
2965
+ renderValue,
2966
+ align = "start",
2967
+ tooltip,
2968
+ tooltipSide = "top",
2969
+ disabled,
2970
+ triggerClassName,
2971
+ contentClassName,
2972
+ className
2973
+ }) {
2974
+ const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
2975
+ const selectedOptions = selectedValues.map((v) => options.find((o) => o.value === v)).filter((o) => o != null);
2976
+ const toggle = (optionValue) => {
2977
+ const next = selectedValues.includes(optionValue) ? selectedValues.filter((v) => v !== optionValue) : [...selectedValues, optionValue];
2978
+ onChange(next);
2979
+ };
2980
+ const triggerLabel = (() => {
2981
+ if (renderValue) return renderValue(selectedOptions);
2982
+ if (selectedOptions.length === 0) {
2983
+ return placeholder ?? label ?? "Select\u2026";
2984
+ }
2985
+ if (selectedOptions.length === 1) {
2986
+ const only = selectedOptions[0];
2987
+ const Icon = only.icon;
2988
+ return /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [
2989
+ Icon && /* @__PURE__ */ jsx(Icon, { size: 16, className: "shrink-0" }),
2990
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: only.label })
2991
+ ] });
2992
+ }
2993
+ return `${label ?? "Selected"}: ${selectedOptions.length}`;
2994
+ })();
2995
+ const trigger = /* @__PURE__ */ jsxs(
2996
+ Button,
2997
+ {
2998
+ variant: "outline",
2999
+ size: "sm",
3000
+ disabled,
3001
+ className: cn(
3002
+ "ring-offset-background justify-between gap-2",
3003
+ triggerClassName,
3004
+ className
3005
+ ),
3006
+ children: [
3007
+ /* @__PURE__ */ jsx("span", { className: "flex min-w-0 items-center gap-2", children: triggerLabel }),
3008
+ /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 opacity-60" })
3009
+ ]
3010
+ }
3011
+ );
3012
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
3013
+ tooltip != null ? /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { delayDuration: 0, children: [
3014
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: trigger }) }),
3015
+ /* @__PURE__ */ jsx(TooltipContent, { side: tooltipSide, children: tooltip })
3016
+ ] }) }) : /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: trigger }),
3017
+ /* @__PURE__ */ jsxs(
3018
+ DropdownMenuContent,
3019
+ {
3020
+ align,
3021
+ className: cn("min-w-[14rem] bg-popover", contentClassName),
3022
+ children: [
3023
+ label && /* @__PURE__ */ jsxs(Fragment, { children: [
3024
+ /* @__PURE__ */ jsx(DropdownMenuLabel, { children: label }),
3025
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {})
3026
+ ] }),
3027
+ multiple ? options.map((option) => {
3028
+ const selected = selectedValues.includes(option.value);
3029
+ return /* @__PURE__ */ jsx(
3030
+ DropdownMenuCheckboxItem,
3031
+ {
3032
+ checked: selected,
3033
+ disabled: option.disabled,
3034
+ onSelect: (e) => e.preventDefault(),
3035
+ onCheckedChange: () => toggle(option.value),
3036
+ children: renderOption ? renderOption(option, { selected }) : /* @__PURE__ */ jsx(OptionRow, { option })
3037
+ },
3038
+ option.value
3039
+ );
3040
+ }) : /* @__PURE__ */ jsx(
3041
+ DropdownMenuRadioGroup,
3042
+ {
3043
+ value: selectedValues[0],
3044
+ onValueChange: (v) => onChange(v),
3045
+ children: options.map((option) => {
3046
+ const selected = selectedValues.includes(option.value);
3047
+ return /* @__PURE__ */ jsx(
3048
+ DropdownMenuRadioItem,
3049
+ {
3050
+ value: option.value,
3051
+ disabled: option.disabled,
3052
+ children: renderOption ? renderOption(option, { selected }) : /* @__PURE__ */ jsx(OptionRow, { option })
3053
+ },
3054
+ option.value
3055
+ );
3056
+ })
3057
+ }
3058
+ )
3059
+ ]
3060
+ }
3061
+ )
3062
+ ] });
3063
+ }
2946
3064
  function TabbedPanel({
2947
3065
  tabs,
2948
3066
  defaultTab,
@@ -3603,6 +3721,6 @@ var Typography = {
3603
3721
  Pre: TypographyPre
3604
3722
  };
3605
3723
 
3606
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, ButtonWithTooltip, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, HoverCard, HoverCardContent, HoverCardTrigger, Item3 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, MenuItem, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavBase, NavHorizontal, NavHorizontalItems, NavVertical, NavVerticalItems, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, Popover, PopoverContent, PopoverTrigger, Progress, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, Spinner, TabbedPanel, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, TreeItem, TreeView, Typography, TypographyBlockquote, TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyH5, TypographyH6, TypographyInlineCode, TypographyLarge, TypographyLead, TypographyList, TypographyMuted, TypographyP, TypographyPre, TypographySmall, UnderDevelopment, badgeVariants, buttonGroupVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useSidebar, useTour };
3724
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, ButtonWithTooltip, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, HoverCard, HoverCardContent, HoverCardTrigger, Item3 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, MenuItem, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavBase, NavHorizontal, NavHorizontalItems, NavVertical, NavVerticalItems, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, Popover, PopoverContent, PopoverTrigger, Progress, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichSelect, ScrollArea, ScrollBar, SearchInput, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, Spinner, TabbedPanel, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, TreeItem, TreeView, Typography, TypographyBlockquote, TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyH5, TypographyH6, TypographyInlineCode, TypographyLarge, TypographyLead, TypographyList, TypographyMuted, TypographyP, TypographyPre, TypographySmall, UnderDevelopment, badgeVariants, buttonGroupVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useSidebar, useTour };
3607
3725
  //# sourceMappingURL=index.js.map
3608
3726
  //# sourceMappingURL=index.js.map