@engie-group/fluid-design-system
Version:
The Fluid Design System is ENGIE’s open-source library to create, build and deliver ENGIE digital services in a more efficient way.
61 lines (60 loc) • 2.02 kB
TypeScript
import { Scale, Variant } from '../../variations';
/**
* The allowed scale values for the checkbox component.
*/
export declare const CHECKBOX_SCALES: readonly ["md", "lg", "xl"];
export type CheckboxScale = Extract<Scale, (typeof CHECKBOX_SCALES)[number]>;
/**
* The allowed variant types for displaying a subscript message associated with the checkbox.
*/
export declare const CHECKBOX_SUBSCRIPT_VARIANTS: readonly ["error", "success"];
export type CheckboxSubscriptVariant = Extract<Variant | 'error', (typeof CHECKBOX_SUBSCRIPT_VARIANTS)[number]>;
export type CheckboxProperties = {
/**
* Defines the size of the checkbox component.
*
* Possible values:
* - 'md': Medium size (default).
* - 'lg': Large size, for enhanced visibility and accessibility.
* - 'xl': Extra-large size, providing maximum visibility and ease of interaction.
*
* @default 'md'
*/
scale?: CheckboxScale;
/**
* Text content displayed as subscript below the checkbox,
* used for additional labels, instructions, or feedback messages.
*/
subscript?: string;
/**
* Defines the visual variant of the subscript message, indicating
* a specific status or state.
*
* Possible values:
* - 'error': Indicates an error or issue with user input or selection.
* - 'success': Indicates successful input validation or positive feedback.
*
* If not specified, defaults to a neutral display without special styling.
*/
subscriptVariant?: CheckboxSubscriptVariant;
/**
* Whether the checkbox component is invalid
*/
invalid?: boolean;
/**
* Whether the checkbox component is indeterminate
*/
indeterminate?: boolean;
/**
* Whether the checkbox component is disabled
*/
disabled?: boolean;
/**
* Whether the checkbox component is required
*/
required?: boolean;
/**
* Whether the checkbox component is checked
*/
checked?: boolean;
};