@accelint/design-toolkit
Version:
An open-source component library to serve as part of the entire ecosystem of UX for Accelint.
54 lines (51 loc) • 1.85 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { ContextValue } from 'react-aria-components';
import { CheckboxProps, CheckboxGroupProps } from './types.js';
import '@react-types/shared';
import '../label/types.js';
declare const CheckboxGroupContext: react.Context<ContextValue<CheckboxGroupProps, HTMLDivElement>>;
declare function CheckboxGroup({ ref, ...props }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
declare namespace CheckboxGroup {
var displayName: string;
}
declare const CheckboxContext: react.Context<ContextValue<CheckboxProps, HTMLLabelElement>>;
/**
* Checkbox - A form control for binary or multiple selection with group support
*
* Provides accessible checkbox functionality with support for individual checkboxes
* or grouped selections. Includes visual feedback for checked, indeterminate, and
* disabled states with integrated labeling and validation support.
*
* @example
* // Basic checkbox
* <Checkbox>
* Accept terms and conditions
* </Checkbox>
*
* @example
* // Checkbox group with multiple options
* <Checkbox.Group label="Select preferences">
* <Checkbox value="notifications">Email notifications</Checkbox>
* <Checkbox value="marketing">Marketing emails</Checkbox>
* <Checkbox value="updates">Product updates</Checkbox>
* </Checkbox.Group>
*
* @example
* // Disabled checkbox
* <Checkbox isDisabled>
* Unavailable option
* </Checkbox>
*
* @example
* // Indeterminate checkbox (partial selection)
* <Checkbox isIndeterminate>
* Select all items
* </Checkbox>
*/
declare function Checkbox({ ref, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
declare namespace Checkbox {
var displayName: string;
var Group: typeof CheckboxGroup;
}
export { Checkbox, CheckboxContext, CheckboxGroupContext };