import type { ComputedRef, Ref } from 'vue'; import type { Option } from '../share/type'; import type { Nullish } from 'parsnip-kit'; export interface CheckboxGroupOption extends Option { disabled?: boolean; key?: string | number | symbol; } export type CheckboxGroupProps = { /** * @property {any[] | null} [modelValue] * @version 0.0.3 */ modelValue?: any[] | null; /** * @property {any[] | null} [defaultValue] * @version 0.0.3 */ defaultValue?: any[] | null; /** * @property {boolean} [disabled=false] * @version 0.0.3 */ disabled?: boolean; /** * @property {boolean} [readonly=false] * @version 0.0.3 */ readonly?: boolean; /** * @property {'normal' | 'retro'} [variant] * @version 0.0.3 */ variant?: 'normal' | 'retro'; /** * @property {'horizontal' | 'vertical'} [direction='horizontal'] * @version 0.0.3 */ direction?: 'horizontal' | 'vertical'; /** * @property {(CheckboxGroupOption | string)[]} [options] * @version 0.0.3 */ options?: (CheckboxGroupOption | string)[]; /** * @property {'medium' | 'large' | 'small'} [size='medium'] * @version 0.0.3 */ size?: 'medium' | 'large' | 'small'; /** * @property {boolean} [pollSizeChange=false] * @version 0.1.0 */ pollSizeChange?: boolean; }; export type CheckboxGroupEvents = { /** * @event update:modelValue * @param {any[]} value * @version 0.0.3 */ 'update:modelValue': [value: any[]]; /** * @event change * @param {any[]} value * @version 0.0.3 */ change: [value: any[]]; }; export type CheckboxGroupSlots = { /** * @slot default * @version 0.0.3 */ default: {}; }; export type CheckboxGroupProvide = { size: ComputedRef<'medium' | 'large' | 'small' | undefined>; variant: Ref; pollSizeChange: ComputedRef; disabled: ComputedRef; readonly: ComputedRef; modelValue: Ref; updateValue: (value: any, checked: boolean) => void; };