import { default as React } from 'react'; import { IconComponent } from '../../Icons/types'; type SegmentedButtonOptionBase = { value: string | number; icon?: IconComponent | React.ReactElement; /** Shown on hover via DS Tooltip. */ tooltipText?: string; }; export type SegmentedButtonOption = (SegmentedButtonOptionBase & { label: string; ariaLabel?: string; }) | (SegmentedButtonOptionBase & { label?: undefined; icon: IconComponent | React.ReactElement; ariaLabel: string; }); export type SegmentedButtonColor = "brand" | "neutral" | "error" | "success" | "warning" | "default" | "danger"; export interface SegmentedButtonProps { name: string; size?: "small" | "medium" | "large"; /** * Visual color variant. * Legacy aliases: `default` → `brand`, `danger` → `error`. */ color?: SegmentedButtonColor; options: SegmentedButtonOption[]; value: string | number; onChange?: (name: string, value: string | number) => void; /** Accepts an IconComponent (preferred) or a ReactElement (legacy). */ icon?: IconComponent | React.ReactElement; /** * Layout mode for option widths. * - `false` (default): each option takes its natural width * - `true`: all options same width (max measured) * - `"fill"`: container fills parent, options distribute equally * * Legacy: `allowExpand={true}` → `equalWidth={false}`, `allowExpand={false}` → `equalWidth={true}` */ equalWidth?: boolean | "fill"; /** Legacy prop — use `equalWidth` instead. */ allowExpand?: boolean; disabled?: boolean; /** Class for the root \ (container). */ className?: string; /** * Class for the sliding pill. * Supported: radius, shadow, background, etc. Changing `position`, `width` * or `left`/`right` breaks the insets system and is not supported. */ pillClassName?: string; /** Class for the icon inside the pill. */ iconClassName?: string; /** * Class for each option span. * Changing padding/font-size is supported (triggers re-measure). Changing * `position` or forcing widths that fight the measurement system is not. */ optionClassName?: string; /** Class for the icons of unselected options. */ optionIconClassName?: string; } declare const SegmentedButton: (props: SegmentedButtonProps) => import("react/jsx-runtime").JSX.Element; export default SegmentedButton;