import * as React from 'react'; import { ThemeInterface } from '../../theme/magma'; import { ButtonSize } from '../Button'; import { ButtonGroupProps } from '../ButtonGroup'; export declare enum ToggleButtonGroupRole { group = "group", radiogroup = "radiogroup", tablist = "tablist" } export interface ToggleButtonGroupProps extends Omit { /** * @children required */ children: React.ReactNode; /** * Description for aria-describedby */ descriptionId?: string; /** * Enables a radio configuration throughout the group retaining an active selection at all times. * @default false */ enforced?: boolean; /** * Sets the Toggle Button group to have only one active selection. * @default false */ exclusive?: boolean; isInverse?: boolean; /** * The onChange handler for managing state of toggle buttons by your custom logic. */ onChange?: (event: React.ChangeEvent, value?: string) => void; /** * ARIA role for the group container. `tablist` renders children as tabs * (`aria-selected`); `radiogroup` renders them as radios (`aria-checked`); * `group` renders radios or switches based on `exclusive`. `tablist` and * `radiogroup` are single-select patterns, so pair them with `exclusive` * (and `enforced` for tabs, to keep one selected at all times). * @default ToggleButtonGroupRole.group */ role?: ToggleButtonGroupRole; /** * @internal */ testId?: string; /** * @internal */ theme?: ThemeInterface; /** * Value of the toggle button that is the default selected value for the group */ value?: string; } export interface ToggleButtonGroupContextInterface { ariaChecked?: boolean; descriptionId?: string; selectedValues?: string[]; isInverse?: boolean; enforced?: boolean; exclusive?: boolean; role?: ToggleButtonGroupRole; selected?: boolean; onChange?: (event: React.ChangeEvent, value?: string) => void; size?: ButtonSize; } export declare const ToggleButtonGroupContext: React.Context; export declare const ToggleButtonGroup: React.ForwardRefExoticComponent>;