UNPKG

@base-ui/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

26 lines 1.21 kB
import * as React from 'react'; import type { BaseUIChangeEventDetails } from "../internals/createBaseUIEventDetails.js"; import type { BaseUIEventReasons } from "../internals/reasons.js"; export declare function useCheckboxGroupParent(params: UseCheckboxGroupParentParameters): UseCheckboxGroupParentReturnValue; export interface UseCheckboxGroupParentParameters { allValues?: string[] | undefined; value?: string[] | undefined; onValueChange?: ((value: string[], eventDetails: BaseUIChangeEventDetails<BaseUIEventReasons['none']>) => void) | undefined; } export interface UseCheckboxGroupParentReturnValue { id: string | undefined; indeterminate: boolean; disabledStatesRef: React.RefObject<Map<string, boolean>>; getParentProps: () => { id: string | undefined; indeterminate: boolean; checked: boolean; 'aria-controls': string; onCheckedChange: (checked: boolean, eventDetails: BaseUIChangeEventDetails<BaseUIEventReasons['none']>) => void; }; getChildProps: (value: string) => { checked: boolean; onCheckedChange: (checked: boolean, eventDetails: BaseUIChangeEventDetails<BaseUIEventReasons['none']>) => void; }; } export interface UseCheckboxGroupParentState {}