@base-ui-components/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.
29 lines • 1.28 kB
TypeScript
import * as React from 'react';
import type { BaseUIChangeEventDetails } from "../utils/createBaseUIEventDetails.js";
import type { BaseUIEventReasons } from "../utils/reasons.js";
export declare function useCheckboxGroupParent(params: useCheckboxGroupParent.Parameters): useCheckboxGroupParent.ReturnValue;
export interface UseCheckboxGroupParentParameters {
allValues?: string[];
value?: string[];
onValueChange?: (value: string[], eventDetails: BaseUIChangeEventDetails<BaseUIEventReasons['none']>) => void;
}
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 declare namespace useCheckboxGroupParent {
type Parameters = UseCheckboxGroupParentParameters;
type ReturnValue = UseCheckboxGroupParentReturnValue;
}