import React from 'react'; import { type AriaCheckboxGroupProps } from 'react-aria'; import { type CheckboxGroupState } from 'react-stately'; import type { TestIdProp } from '../../types'; type ElementAttributes = Pick, 'className' | 'ref' | 'style'>; export interface OptionListProps extends AriaCheckboxGroupProps, ElementAttributes, TestIdProp { /** * Label for the CheckboxButtons group needs to be provided at the component level for accessibility */ label: AriaCheckboxGroupProps['label']; description?: AriaCheckboxGroupProps['description']; /** * Populate with one or more CheckboxItem components */ children?: React.ReactNode; name?: AriaCheckboxGroupProps['name']; defaultValue?: AriaCheckboxGroupProps['defaultValue']; /** * Current selected value (controlled state) */ value?: AriaCheckboxGroupProps['value']; /** * Event handler when any checkbox button changes. Returned string array is the values of the inputs that are currently * checked. */ onChange?: AriaCheckboxGroupProps['onChange']; } export declare const OptionListContext: React.Context; /** * The OptionList is a form control that groups selectable items that apear as an outlined list of options and * implements React Aria `useCheckboxGroup` * ([docs](https://react-spectrum.adobe.com/react-aria/useCheckboxGroup.html)) * * Populate the OptionList group with the OptionListList, each item must have a `value` (unique) and be labelled. * The `value` of all active items are passed as a string array to set `defaultValue` (uncontrolled), `value` * (controlled) and is the format returned from the onChange handler as well. * * Used in the booking flow on the payment step for addons. * Future enhancements might include: validation states/error handling */ export declare const OptionList: { (props: OptionListProps): React.JSX.Element; Item: { (props: { name?: string | undefined; form?: string | undefined; value: string; autoFocus?: boolean | undefined; id?: string | undefined; 'aria-controls'?: string | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-errormessage'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; children?: React.ReactNode; onFocus?: ((e: React.FocusEvent) => void) | undefined; onBlur?: ((e: React.FocusEvent) => void) | undefined; onChange?: ((isSelected: boolean) => void) | undefined; onKeyDown?: ((e: import("@react-types/shared").KeyboardEvent) => void) | undefined; onKeyUp?: ((e: import("@react-types/shared").KeyboardEvent) => void) | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; isDisabled?: boolean | undefined; onPress?: ((e: import("react-aria").PressEvent) => void) | undefined; onPressStart?: ((e: import("react-aria").PressEvent) => void) | undefined; onPressEnd?: ((e: import("react-aria").PressEvent) => void) | undefined; onPressChange?: ((isPressed: boolean) => void) | undefined; onPressUp?: ((e: import("react-aria").PressEvent) => void) | undefined; onFocusChange?: ((isFocused: boolean) => void) | undefined; excludeFromTabOrder?: boolean | undefined; validate?: ((value: boolean) => import("@react-types/shared").ValidationError | true | null | undefined) | undefined; isReadOnly?: boolean | undefined; isRequired?: boolean | undefined; isInvalid?: boolean | undefined; validationState?: import("react-stately").ValidationState | undefined; validationBehavior?: "aria" | "native" | undefined; }): React.JSX.Element; displayName: string; }; ItemSplitLabel: { ({ children, content }: import("./OptionListItem").SplitLabelProps): React.JSX.Element | null; displayName: string; }; }; export {}; //# sourceMappingURL=OptionList.d.ts.map