import { WidthProp } from "@marigold/system"; import { ReactNode, Ref } from "react"; import RAC from "react-aria-components"; type RemovedGroupProps = 'className' | 'style' | 'render' | 'isDisabled' | 'isInvalid' | 'isRequired' | 'isReadOnly' | 'orientation'; export interface SegmentedControlProps extends Omit { /** * The visual style of the control. * @default default */ variant?: 'default' | 'ghost' | (string & {}); /** * @default default */ size?: 'default' | (string & {}); /** * Set the label of the control. */ label?: ReactNode; /** * Content after the label, such as a `` or ``. Keeps * the label row's height, and a badge is read as the field's description. */ addon?: ReactNode; /** * Set the control's help text. */ description?: string; /** * Set the control's error message, shown when `error` is `true`. */ errorMessage?: string; /** * If `true`, the control is invalid and the `errorMessage` is shown. * @default false */ error?: RAC.RadioGroupProps['isInvalid']; /** * If `true`, the control is required. * @default false */ required?: RAC.RadioGroupProps['isRequired']; /** * If `true`, the control is disabled. * @default false */ disabled?: RAC.RadioGroupProps['isDisabled']; /** * Set the control as read-only. * @default false */ readOnly?: boolean; /** * Control the width of the field box. By default the control is sized to its * content and scrolls horizontally once the segments outgrow that box; use * `"full"` to fill the box and stretch the segments so they divide the width * equally. */ width?: WidthProp['width']; /** Children of the component. */ children?: ReactNode; /** Ref to the DOM element the component renders. */ ref?: Ref; } declare function SegmentedControlBase({ variant, size, label, addon, error, disabled, required, readOnly, description, errorMessage, width, onChange, children, ...rest }: SegmentedControlProps): import("react").JSX.Element; type RemovedOptionProps = 'className' | 'style' | 'render' | 'isDisabled'; export interface SegmentedControlOptionProps extends Omit { /** * The value of the option, matching the `value` of the control. */ value: string; /** * Whether the option is disabled. * @default false */ disabled?: RAC.RadioFieldProps['isDisabled']; /** Children of the component. */ children?: ReactNode; /** Ref to the DOM element the component renders. */ ref?: Ref; } declare function SegmentedControlOption({ disabled, children, ...props }: SegmentedControlOptionProps): import("react").JSX.Element; export declare const SegmentedControl: typeof SegmentedControlBase & { Option: typeof SegmentedControlOption; }; export { SegmentedControlOption };