UNPKG

@veracity/vui

Version:

Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.

54 lines (53 loc) 2.16 kB
import { ChangeEventHandler, FocusEventHandler } from "../utils/types.js"; import "../utils/index.js"; import { ThemingProps } from "../theme/types.js"; import "../theme/index.js"; import { SystemProps } from "../system/system.js"; import "../system/index.js"; import { IconProp } from "../icon/icon.types.js"; import "../icon/index.js"; import { HTMLAttributes } from "react"; //#region src/checkbox/checkbox.types.d.ts type CheckboxProps = SystemProps & ThemingProps<'Checkbox'> & { /** Provides value to checkbox in controlled mode. */ checked?: boolean; /** Deprecated. Please use variant instead. @deprecated */ colorScheme?: 'blue' | 'prussian'; /** Disables checkbox and related elements with the right styling. */ disabled?: boolean; /** Makes the checkbox non-interactive while keeping normal styling. Value cannot be changed by the user. */ readOnly?: boolean; /** Icon used when not checked. @default cuiCheckboxUnselected */ icon?: IconProp; /** Icon used when checked. @default cuiCheckboxSelected */ iconChecked?: IconProp; /** Icon used when in indeterminte state. @default cuiCheckboxIndeterminate */ iconIndeterminate?: IconProp; /** Props object passed to the inner input element. */ inputProps?: HTMLAttributes<HTMLInputElement>; /** Ref passed to the inner input element. */ inputRef?: React.MutableRefObject<HTMLInputElement | null> | null; /** Displays the checkbox as indeterminate. */ isIndeterminate?: boolean; /** Socket for the text next to the checkbox. */ label?: string; /** Passed to the inner input. */ name?: string; /** Passed to the inner input. */ onBlur?: FocusEventHandler; /** Passed to the inner input. */ onChange?: ChangeEventHandler; /** Passed to the inner input. */ onFocus?: FocusEventHandler; /** Passed to the inner input. */ required?: boolean; /** Passed to the inner input. */ value?: number | string; }; type CheckboxStyleProps = { /** Styles the icon when any part of the checkbox is hovered. */ controlHoverColor: string; }; //#endregion export { CheckboxProps, CheckboxStyleProps }; //# sourceMappingURL=checkbox.types.d.ts.map