Files
NapCatQQ/.pnpm-store/v3/files/29/fff8ab2ce84d22f5a4102db36c09ca951d70f6b03c0d77d67c8f9e69763398f211cb415f144469db12df0e6d6fc0b79f44c03fdec11f73f1e294941da81c36
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

57 lines
3.0 KiB
Plaintext

import { AriaCheckboxProps, AriaCheckboxGroupProps, AriaCheckboxGroupItemProps } from "@react-types/checkbox";
import { InputHTMLAttributes, LabelHTMLAttributes } from "react";
import { RefObject, ValidationResult, DOMAttributes } from "@react-types/shared";
import { ToggleState } from "@react-stately/toggle";
import { CheckboxGroupState } from "@react-stately/checkbox";
export interface CheckboxAria extends ValidationResult {
/** Props for the label wrapper element. */
labelProps: LabelHTMLAttributes<HTMLLabelElement>;
/** Props for the input element. */
inputProps: InputHTMLAttributes<HTMLInputElement>;
/** Whether the checkbox is selected. */
isSelected: boolean;
/** Whether the checkbox is in a pressed state. */
isPressed: boolean;
/** Whether the checkbox is disabled. */
isDisabled: boolean;
/** Whether the checkbox is read only. */
isReadOnly: boolean;
}
/**
* Provides the behavior and accessibility implementation for a checkbox component.
* Checkboxes allow users to select multiple items from a list of individual items, or
* to mark one individual item as selected.
* @param props - Props for the checkbox.
* @param state - State for the checkbox, as returned by `useToggleState`.
* @param inputRef - A ref for the HTML input element.
*/
export function useCheckbox(props: AriaCheckboxProps, state: ToggleState, inputRef: RefObject<HTMLInputElement | null>): CheckboxAria;
export interface CheckboxGroupAria extends ValidationResult {
/** Props for the checkbox group wrapper element. */
groupProps: DOMAttributes;
/** Props for the checkbox group's visible label (if any). */
labelProps: DOMAttributes;
/** Props for the checkbox group description element, if any. */
descriptionProps: DOMAttributes;
/** Props for the checkbox group error message element, if any. */
errorMessageProps: DOMAttributes;
}
/**
* Provides the behavior and accessibility implementation for a checkbox group component.
* Checkbox groups allow users to select multiple items from a list of options.
* @param props - Props for the checkbox group.
* @param state - State for the checkbox group, as returned by `useCheckboxGroupState`.
*/
export function useCheckboxGroup(props: AriaCheckboxGroupProps, state: CheckboxGroupState): CheckboxGroupAria;
/**
* Provides the behavior and accessibility implementation for a checkbox component contained within a checkbox group.
* Checkbox groups allow users to select multiple items from a list of options.
* @param props - Props for the checkbox.
* @param state - State for the checkbox, as returned by `useCheckboxGroupState`.
* @param inputRef - A ref for the HTML input element.
*/
export function useCheckboxGroupItem(props: AriaCheckboxGroupItemProps, state: CheckboxGroupState, inputRef: RefObject<HTMLInputElement | null>): CheckboxAria;
export type { AriaCheckboxGroupItemProps, AriaCheckboxGroupProps, AriaCheckboxProps } from '@react-types/checkbox';
//# sourceMappingURL=types.d.ts.map