Files
NapCatQQ/.pnpm-store/v3/files/b8/0b0d6a1f7e70164a5018fa8774fdf90f322f39ed9290687b2de18b180cf3e6bc67985f585079ebfb057c10c1e1fd19848533e8e97d58c93dbcd60a0db208d3
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

46 lines
1.9 KiB
Plaintext

import { CheckboxGroupProps } from "@react-types/checkbox";
import { FormValidationState } from "@react-stately/form";
import { ValidationResult, ValidationState } from "@react-types/shared";
export interface CheckboxGroupState extends FormValidationState {
/** Current selected values. */
readonly value: readonly string[];
/** Default selected values. */
readonly defaultValue: readonly string[];
/** Whether the checkbox group is disabled. */
readonly isDisabled: boolean;
/** Whether the checkbox group is read only. */
readonly isReadOnly: boolean;
/**
* The current validation state of the checkbox group.
* @deprecated Use `isInvalid` instead.
*/
readonly validationState: ValidationState | null;
/** Whether the checkbox group is invalid. */
readonly isInvalid: boolean;
/**
* Whether the checkboxes in the group are required.
* This changes to false once at least one item is selected.
*/
readonly isRequired: boolean;
/** Returns whether the given value is selected. */
isSelected(value: string): boolean;
/** Sets the selected values. */
setValue(value: string[]): void;
/** Adds a value to the set of selected values. */
addValue(value: string): void;
/** Removes a value from the set of selected values. */
removeValue(value: string): void;
/** Toggles a value in the set of selected values. */
toggleValue(value: string): void;
/** Sets whether one of the checkboxes is invalid. */
setInvalid(value: string, validation: ValidationResult): void;
}
/**
* Provides state management for a checkbox group component. Provides a name for the group,
* and manages selection and focus state.
*/
export function useCheckboxGroupState(props?: CheckboxGroupProps): CheckboxGroupState;
export type { CheckboxGroupProps } from '@react-types/checkbox';
//# sourceMappingURL=types.d.ts.map