import { AriaCheckboxGroupProps } from 'react-aria/useCheckboxGroup'; import { AriaCheckboxProps } from 'react-aria/useCheckbox'; import { CheckboxGroupState } from 'react-stately/useCheckboxGroupState'; import { ClassNameOrFunction, ContextValue, RACValidation, RenderProps, SlotProps } from './utils'; import { GlobalDOMAttributes, RefObject } from '@react-types/shared'; import { HoverEvents } from '@react-types/shared'; import React from 'react'; export interface CheckboxGroupProps extends Omit, RACValidation, RenderProps, SlotProps, GlobalDOMAttributes { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. * @default 'react-aria-CheckboxGroup' */ className?: ClassNameOrFunction; } export interface CheckboxProps extends Omit, HoverEvents, RACValidation, RenderProps, SlotProps, Omit, 'onClick'> { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. * @default 'react-aria-Checkbox' */ className?: ClassNameOrFunction; /** * A ref for the HTML input element. */ inputRef?: RefObject; } export interface CheckboxGroupRenderProps { /** * Whether the checkbox group is disabled. * @selector [data-disabled] */ isDisabled: boolean; /** * Whether the checkbox group is read only. * @selector [data-readonly] */ isReadOnly: boolean; /** * Whether the checkbox group is required. * @selector [data-required] */ isRequired: boolean; /** * Whether the checkbox group is invalid. * @selector [data-invalid] */ isInvalid: boolean; /** * State of the checkbox group. */ state: CheckboxGroupState; } export interface CheckboxRenderProps { /** * Whether the checkbox is selected. * @selector [data-selected] */ isSelected: boolean; /** * Whether the checkbox is indeterminate. * @selector [data-indeterminate] */ isIndeterminate: boolean; /** * Whether the checkbox is currently hovered with a mouse. * @selector [data-hovered] */ isHovered: boolean; /** * Whether the checkbox is currently in a pressed state. * @selector [data-pressed] */ isPressed: boolean; /** * Whether the checkbox is focused, either via a mouse or keyboard. * @selector [data-focused] */ isFocused: boolean; /** * Whether the checkbox is keyboard focused. * @selector [data-focus-visible] */ isFocusVisible: boolean; /** * Whether the checkbox is disabled. * @selector [data-disabled] */ isDisabled: boolean; /** * Whether the checkbox is read only. * @selector [data-readonly] */ isReadOnly: boolean; /** * Whether the checkbox invalid. * @selector [data-invalid] */ isInvalid: boolean; /** * Whether the checkbox is required. * @selector [data-required] */ isRequired: boolean; } export declare const CheckboxContext: React.Context>; export declare const CheckboxGroupContext: React.Context>; export declare const CheckboxGroupStateContext: React.Context; /** * A checkbox group allows a user to select multiple items from a list of options. */ export declare const CheckboxGroup: (props: CheckboxGroupProps & React.RefAttributes) => React.ReactElement> | null; /** * A checkbox allows a user to select multiple items from a list of individual items, or * to mark one individual item as selected. */ export declare const Checkbox: (props: CheckboxProps & React.RefAttributes) => React.ReactElement> | null;