diff --git a/components/lib/checkbox/Checkbox.d.ts b/components/lib/checkbox/Checkbox.d.ts index e3cfad4f7..611fe7bd7 100755 --- a/components/lib/checkbox/Checkbox.d.ts +++ b/components/lib/checkbox/Checkbox.d.ts @@ -18,6 +18,7 @@ export declare type CheckboxPassThroughOptionType = CheckboxPassThroughAttribute export interface CheckboxPassThroughMethodOptions { props: CheckboxProps; state: CheckboxState; + context: CheckboxContext; } /** @@ -151,6 +152,30 @@ export interface CheckboxProps { unstyled?: boolean; } +/** + * Defines current options in Checkbox component. + */ +export interface CheckboxContext { + /** + * Current checked state of the item as a boolean. + * @defaultValue false + */ + checked: boolean; + /** + * Current focus state of the item as a boolean. + * @defaultValue false + */ + focused: boolean; + /** + * Current disabled state of the item as a boolean. + * @defaultValue false + */ + disabled: boolean; +} + +/** + * Defines valid slots in Checkbox component. + */ export interface CheckboxSlots { /** * Custom icon template. diff --git a/components/lib/checkbox/Checkbox.vue b/components/lib/checkbox/Checkbox.vue index c9964c3cf..c0f411180 100755 --- a/components/lib/checkbox/Checkbox.vue +++ b/components/lib/checkbox/Checkbox.vue @@ -1,5 +1,5 @@