import { GlobalProps } from '../../shared/global'; import { BaseCheckableProps } from '../../shared/input'; export interface CheckboxProps extends GlobalProps, BaseCheckableProps { /** * Indicate an error to the user. The field will be given a specific stylistic treatment * to communicate problems that have to be resolved immediately. */ error?: string; /** * Additional text to provide context or guidance for the input. * This text is displayed along with the input and its label * to offer more information or instructions to the user. */ details?: string; /** * Whether to display the checkbox in an indeterminate state (neither checked or unchecked). * * In terms of appearance, this takes priority over the `checked` prop. * But this is purely a visual change. * Whether the value is submitted along with a form is still down to the `checked` prop. * * In custom element implementations, this must not reflect to an attribute (similar to `.checked`). */ indeterminate?: boolean; /** * Whether the checkbox is in an `indeterminate` state by default. * * Similar to `defaultValue` and `defaultChecked`, this value applies until `indeterminate` is set, or user changes the state of the checkbox. * * In custom element implementations, this must reflect to the `indeterminate` attribute (similar to how `.defaultChecked` reflects to the `checked` attribute). */ defaultIndeterminate?: boolean; /** * Whether the field needs a value. This requirement adds semantic value * to the field, but it will not cause an error to appear automatically. * If you want to present an error when this field is empty, you can do * so with the `error` prop. */ required?: boolean; }