@eqtylab/equality 4.4.2 → 4.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.cts CHANGED
@@ -771,6 +771,7 @@ interface SectionHeadingProps {
771
771
  declare const SectionHeading: ({ heading, description, renderRightContent, className, }: SectionHeadingProps) => react_jsx_runtime.JSX.Element;
772
772
 
773
773
  type SegmentedControlsDisplay = 'both' | 'text-only' | 'icon-only';
774
+ type SegmentedControlsSize = 'sm' | 'md' | 'lg';
774
775
  interface SegmentedControlOption {
775
776
  /** Unique value used to identify the option. */
776
777
  value: string;
@@ -790,9 +791,11 @@ interface SegmentedControlsProps {
790
791
  * `icon-only` requires every option to define an `icon` and falls back to `both` otherwise.
791
792
  */
792
793
  display?: SegmentedControlsDisplay;
794
+ /** Matches the height of a `Button` of the same size. */
795
+ size?: SegmentedControlsSize;
793
796
  className?: string;
794
797
  }
795
- declare const SegmentedControls: ({ options, value, onValueChange, display, className, }: SegmentedControlsProps) => react_jsx_runtime.JSX.Element;
798
+ declare const SegmentedControls: ({ options, value, onValueChange, display, size, className, }: SegmentedControlsProps) => react_jsx_runtime.JSX.Element;
796
799
 
797
800
  declare const useSelectSearchQuery: () => {
798
801
  query: string;
@@ -1097,4 +1100,4 @@ declare const CODE_BLOCK_ATTRIBUTE = "data-equality-code-block";
1097
1100
  */
1098
1101
  declare const scheduleHighlight: (root?: Node) => Promise<void>;
1099
1102
 
1100
- 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, CODE_BLOCK_ATTRIBUTE, 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, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, 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, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, 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, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, 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, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };
1103
+ 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, CODE_BLOCK_ATTRIBUTE, 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, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, 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, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, 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, type SegmentedControlsSize, Select, SelectContent, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, 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, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -771,6 +771,7 @@ interface SectionHeadingProps {
771
771
  declare const SectionHeading: ({ heading, description, renderRightContent, className, }: SectionHeadingProps) => react_jsx_runtime.JSX.Element;
772
772
 
773
773
  type SegmentedControlsDisplay = 'both' | 'text-only' | 'icon-only';
774
+ type SegmentedControlsSize = 'sm' | 'md' | 'lg';
774
775
  interface SegmentedControlOption {
775
776
  /** Unique value used to identify the option. */
776
777
  value: string;
@@ -790,9 +791,11 @@ interface SegmentedControlsProps {
790
791
  * `icon-only` requires every option to define an `icon` and falls back to `both` otherwise.
791
792
  */
792
793
  display?: SegmentedControlsDisplay;
794
+ /** Matches the height of a `Button` of the same size. */
795
+ size?: SegmentedControlsSize;
793
796
  className?: string;
794
797
  }
795
- declare const SegmentedControls: ({ options, value, onValueChange, display, className, }: SegmentedControlsProps) => react_jsx_runtime.JSX.Element;
798
+ declare const SegmentedControls: ({ options, value, onValueChange, display, size, className, }: SegmentedControlsProps) => react_jsx_runtime.JSX.Element;
796
799
 
797
800
  declare const useSelectSearchQuery: () => {
798
801
  query: string;
@@ -1097,4 +1100,4 @@ declare const CODE_BLOCK_ATTRIBUTE = "data-equality-code-block";
1097
1100
  */
1098
1101
  declare const scheduleHighlight: (root?: Node) => Promise<void>;
1099
1102
 
1100
- 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, CODE_BLOCK_ATTRIBUTE, 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, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, 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, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, 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, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, 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, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };
1103
+ 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, CODE_BLOCK_ATTRIBUTE, 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, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, 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, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, 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, type SegmentedControlsSize, Select, SelectContent, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, 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, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };
package/dist/index.js CHANGED
@@ -3828,6 +3828,7 @@ var SegmentedControls = ({
3828
3828
  value,
3829
3829
  onValueChange,
3830
3830
  display = "both",
3831
+ size = "md",
3831
3832
  className
3832
3833
  }) => {
3833
3834
  const allHaveIcons = options.every((option) => option.icon != null);
@@ -3839,6 +3840,7 @@ var SegmentedControls = ({
3839
3840
  left: 0,
3840
3841
  width: 0
3841
3842
  });
3843
+ const [animateIndicator, setAnimateIndicator] = useState(false);
3842
3844
  const updateIndicator = useCallback(() => {
3843
3845
  const activeSegment = segmentRefs.current[value];
3844
3846
  if (activeSegment) {
@@ -3847,7 +3849,11 @@ var SegmentedControls = ({
3847
3849
  }, [value]);
3848
3850
  useLayoutEffect(() => {
3849
3851
  updateIndicator();
3850
- }, [updateIndicator, options, effectiveDisplay]);
3852
+ }, [updateIndicator, options, effectiveDisplay, size]);
3853
+ useEffect(() => {
3854
+ const frame = requestAnimationFrame(() => setAnimateIndicator(true));
3855
+ return () => cancelAnimationFrame(frame);
3856
+ }, []);
3851
3857
  useLayoutEffect(() => {
3852
3858
  const container = containerRef.current;
3853
3859
  if (!container) return;
@@ -3855,44 +3861,57 @@ var SegmentedControls = ({
3855
3861
  observer.observe(container);
3856
3862
  return () => observer.disconnect();
3857
3863
  }, [updateIndicator]);
3858
- return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: cn(styles49["segmented-controls"], className), children: [
3859
- options.map((option) => {
3860
- const currentlyActive = option.value === value;
3861
- const showIcon = option.icon != null && effectiveDisplay !== "text-only";
3862
- const showLabel = effectiveDisplay !== "icon-only";
3863
- return /* @__PURE__ */ jsxs(
3864
- "button",
3865
- {
3866
- ref: (el) => {
3867
- segmentRefs.current[option.value] = el;
3868
- },
3869
- type: "button",
3870
- "aria-pressed": currentlyActive,
3871
- "aria-label": isIconOnly ? option.label : void 0,
3872
- title: isIconOnly ? option.label : void 0,
3873
- className: cn(
3874
- styles49["segment"],
3875
- isIconOnly && styles49["segment--icon-only"],
3876
- currentlyActive ? styles49["segment--active"] : styles49["segment--inactive"]
3877
- ),
3878
- onClick: () => onValueChange(option.value),
3879
- children: [
3880
- showIcon && /* @__PURE__ */ jsx(Icon, { icon: option.icon, size: "xs", className: styles49["segment-icon"] }),
3881
- showLabel && /* @__PURE__ */ jsx("span", { children: option.label }),
3882
- !isIconOnly && option.suffix && /* @__PURE__ */ jsx("span", { className: styles49["segment-suffix"], children: option.suffix })
3883
- ]
3884
- },
3885
- option.value
3886
- );
3887
- }),
3888
- /* @__PURE__ */ jsx(
3889
- "div",
3890
- {
3891
- className: styles49["active-segment-indicator"],
3892
- style: { transform: `translateX(${indicator.left}px)`, width: `${indicator.width}px` }
3893
- }
3894
- )
3895
- ] });
3864
+ return /* @__PURE__ */ jsxs(
3865
+ "div",
3866
+ {
3867
+ ref: containerRef,
3868
+ className: cn(styles49["segmented-controls"], styles49[`size--${size}`], className),
3869
+ children: [
3870
+ options.map((option) => {
3871
+ const currentlyActive = option.value === value;
3872
+ const showIcon = option.icon != null && effectiveDisplay !== "text-only";
3873
+ const showLabel = effectiveDisplay !== "icon-only";
3874
+ return /* @__PURE__ */ jsxs(
3875
+ "button",
3876
+ {
3877
+ ref: (el) => {
3878
+ segmentRefs.current[option.value] = el;
3879
+ },
3880
+ type: "button",
3881
+ "aria-pressed": currentlyActive,
3882
+ "aria-label": isIconOnly ? option.label : void 0,
3883
+ title: isIconOnly ? option.label : void 0,
3884
+ className: cn(
3885
+ styles49["segment"],
3886
+ isIconOnly && styles49["segment--icon-only"],
3887
+ currentlyActive ? styles49["segment--active"] : styles49["segment--inactive"]
3888
+ ),
3889
+ onClick: () => onValueChange(option.value),
3890
+ children: [
3891
+ showIcon && /* @__PURE__ */ jsx(Icon, { icon: option.icon, size: "xs", className: styles49["segment-icon"] }),
3892
+ showLabel && /* @__PURE__ */ jsx("span", { children: option.label }),
3893
+ !isIconOnly && option.suffix && /* @__PURE__ */ jsx("span", { className: styles49["segment-suffix"], children: option.suffix })
3894
+ ]
3895
+ },
3896
+ option.value
3897
+ );
3898
+ }),
3899
+ /* @__PURE__ */ jsx(
3900
+ "div",
3901
+ {
3902
+ className: cn(
3903
+ styles49["active-segment-indicator"],
3904
+ animateIndicator && styles49["active-segment-indicator--animated"]
3905
+ ),
3906
+ style: {
3907
+ transform: `translateX(${indicator.left}px)`,
3908
+ "--indicator-width": `${indicator.width}px`
3909
+ }
3910
+ }
3911
+ )
3912
+ ]
3913
+ }
3914
+ );
3896
3915
  };
3897
3916
  var Separator3 = React15.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
3898
3917
  SeparatorPrimitive.Root,