@eqtylab/equality 2.2.4 → 2.3.1

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
@@ -475,7 +475,7 @@ interface IconButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonEl
475
475
  target?: string;
476
476
  download?: string | boolean;
477
477
  }
478
- declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element | null;
478
+ declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element;
479
479
 
480
480
  interface InfoCardProps {
481
481
  label: string;
@@ -506,6 +506,9 @@ interface ListOrGridViewToggleProps {
506
506
  order?: ViewOrder;
507
507
  className?: string;
508
508
  }
509
+ /**
510
+ * @deprecated Use `SegmentedControls` instead.
511
+ */
509
512
  declare const ListOrGridViewToggle: ({ viewMode, onViewModeChange, order, className, }: ListOrGridViewToggleProps) => react_jsx_runtime.JSX.Element;
510
513
 
511
514
  interface LoadingOverlayProps {
@@ -651,6 +654,30 @@ interface SectionHeadingProps {
651
654
  }
652
655
  declare const SectionHeading: ({ heading, description, renderRightContent, className, }: SectionHeadingProps) => react_jsx_runtime.JSX.Element;
653
656
 
657
+ type SegmentedControlsDisplay = 'both' | 'text-only' | 'icon-only';
658
+ interface SegmentedControlOption {
659
+ /** Unique value used to identify the option. */
660
+ value: string;
661
+ /** Text label. Mandatory — used as the visible text and as the accessible label when `display="icon-only"`. */
662
+ label: string;
663
+ /** Optional prefix icon: a Lucide icon name or a React element. */
664
+ icon?: React$1.ReactElement | string;
665
+ /** Optional content rendered after the label. */
666
+ suffix?: React$1.ReactNode;
667
+ }
668
+ interface SegmentedControlsProps {
669
+ options: SegmentedControlOption[];
670
+ value: string;
671
+ onValueChange: (value: string) => void;
672
+ /**
673
+ * Controls what is rendered inside each segment.
674
+ * `icon-only` requires every option to define an `icon` and falls back to `both` otherwise.
675
+ */
676
+ display?: SegmentedControlsDisplay;
677
+ className?: string;
678
+ }
679
+ declare const SegmentedControls: ({ options, value, onValueChange, display, className, }: SegmentedControlsProps) => react_jsx_runtime.JSX.Element;
680
+
654
681
  declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
655
682
  declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
656
683
  declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
@@ -878,7 +905,7 @@ declare const TruncatedDescription: ({ className, description, maxLength, }: Tru
878
905
 
879
906
  declare const iconVariants: (props?: ({
880
907
  size?: "xs" | "sm" | "md" | "lg" | null | undefined;
881
- background?: "square" | "circle" | "transparent" | null | undefined;
908
+ background?: "circle" | "square" | "transparent" | null | undefined;
882
909
  } & class_variance_authority_types.ClassProp) | undefined) => string;
883
910
  declare const iconElevationVariants: (props?: ({
884
911
  elevation?: string | number | null | undefined;
@@ -916,4 +943,4 @@ declare const ThemeProvider: ({ customVars, children }: ThemeProviderProps) => r
916
943
 
917
944
  declare const useTheme: () => readonly [Theme$1 | undefined, (theme: Theme$1) => void];
918
945
 
919
- export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
946
+ export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, type SegmentedControlOption, SegmentedControls, type SegmentedControlsDisplay, type SegmentedControlsProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -475,7 +475,7 @@ interface IconButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonEl
475
475
  target?: string;
476
476
  download?: string | boolean;
477
477
  }
478
- declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element | null;
478
+ declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element;
479
479
 
480
480
  interface InfoCardProps {
481
481
  label: string;
@@ -506,6 +506,9 @@ interface ListOrGridViewToggleProps {
506
506
  order?: ViewOrder;
507
507
  className?: string;
508
508
  }
509
+ /**
510
+ * @deprecated Use `SegmentedControls` instead.
511
+ */
509
512
  declare const ListOrGridViewToggle: ({ viewMode, onViewModeChange, order, className, }: ListOrGridViewToggleProps) => react_jsx_runtime.JSX.Element;
510
513
 
511
514
  interface LoadingOverlayProps {
@@ -651,6 +654,30 @@ interface SectionHeadingProps {
651
654
  }
652
655
  declare const SectionHeading: ({ heading, description, renderRightContent, className, }: SectionHeadingProps) => react_jsx_runtime.JSX.Element;
653
656
 
657
+ type SegmentedControlsDisplay = 'both' | 'text-only' | 'icon-only';
658
+ interface SegmentedControlOption {
659
+ /** Unique value used to identify the option. */
660
+ value: string;
661
+ /** Text label. Mandatory — used as the visible text and as the accessible label when `display="icon-only"`. */
662
+ label: string;
663
+ /** Optional prefix icon: a Lucide icon name or a React element. */
664
+ icon?: React$1.ReactElement | string;
665
+ /** Optional content rendered after the label. */
666
+ suffix?: React$1.ReactNode;
667
+ }
668
+ interface SegmentedControlsProps {
669
+ options: SegmentedControlOption[];
670
+ value: string;
671
+ onValueChange: (value: string) => void;
672
+ /**
673
+ * Controls what is rendered inside each segment.
674
+ * `icon-only` requires every option to define an `icon` and falls back to `both` otherwise.
675
+ */
676
+ display?: SegmentedControlsDisplay;
677
+ className?: string;
678
+ }
679
+ declare const SegmentedControls: ({ options, value, onValueChange, display, className, }: SegmentedControlsProps) => react_jsx_runtime.JSX.Element;
680
+
654
681
  declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
655
682
  declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
656
683
  declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
@@ -878,7 +905,7 @@ declare const TruncatedDescription: ({ className, description, maxLength, }: Tru
878
905
 
879
906
  declare const iconVariants: (props?: ({
880
907
  size?: "xs" | "sm" | "md" | "lg" | null | undefined;
881
- background?: "square" | "circle" | "transparent" | null | undefined;
908
+ background?: "circle" | "square" | "transparent" | null | undefined;
882
909
  } & class_variance_authority_types.ClassProp) | undefined) => string;
883
910
  declare const iconElevationVariants: (props?: ({
884
911
  elevation?: string | number | null | undefined;
@@ -916,4 +943,4 @@ declare const ThemeProvider: ({ customVars, children }: ThemeProviderProps) => r
916
943
 
917
944
  declare const useTheme: () => readonly [Theme$1 | undefined, (theme: Theme$1) => void];
918
945
 
919
- export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
946
+ export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, type SegmentedControlOption, SegmentedControls, type SegmentedControlsDisplay, type SegmentedControlsProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };