import type { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react'; import type { Direction } from '../../utils/primitiveProps.cjs'; import type { SxProp } from '../Layout/sx.cjs'; import type { ButtonColor, ButtonShape, ButtonSize, ButtonVariant } from './Button.types.cjs'; interface GroupRootBase extends Omit, 'onChange' | 'defaultValue' | 'dir'> { /** Disable every item in the group. */ disabled?: boolean; /** Reading direction. */ dir?: Direction; /** Layout axis. Default: `horizontal`. */ orientation?: 'horizontal' | 'vertical'; /** Allow arrow-key navigation to wrap around. Default: true. */ loop?: boolean; /** Keep at least one item pressed. */ rovingFocus?: boolean; } type GroupSingle = GroupRootBase & { type?: 'single'; /** Controlled pressed value. */ value?: string; /** Uncontrolled initial pressed value. */ defaultValue?: string; /** Fires when the pressed value changes. */ onValueChange?: (value: string) => void; }; type GroupMultiple = GroupRootBase & { type: 'multiple'; /** Controlled set of pressed values. */ value?: string[]; /** Uncontrolled initial set of pressed values. */ defaultValue?: string[]; /** Fires when the pressed set changes. */ onValueChange?: (value: string[]) => void; }; type GroupRootProps = GroupSingle | GroupMultiple; interface GroupItemProps extends Omit, 'value' | 'type'> { /** Value identifying this item within the group. */ value: string; /** Disables just this item. */ disabled?: boolean; } type GroupVariant = Extract; export type ToggleButtonGroupProps = GroupRootProps & { variant?: GroupVariant; color?: ButtonColor; size?: ButtonSize; /** `attached` collapses borders, `spaced` leaves a small gap. Default: `attached`. */ layout?: 'attached' | 'spaced'; /** Pill-shaped ends. */ round?: boolean; /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */ sx?: SxProp; }; export interface ToggleButtonGroupItemProps extends Omit { icon?: ReactNode; shape?: ButtonShape; children?: ReactNode; /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */ sx?: SxProp; } /** * Accessible segmented control / toolbar built on Radix's `ToggleGroup` primitive. * Supports single-select (`type="single"`) or multi-select (`type="multiple"`). * Items inherit styling via React context; override per-item if needed. */ export declare const ToggleButtonGroup: import("react").ForwardRefExoticComponent>; /** Individual toggle item. Styling inherits from `ToggleButtonGroup` via context. */ export declare const ToggleButtonGroupItem: import("react").ForwardRefExoticComponent>; export {};