2023-03-01 11:23:31 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* TriStateCheckbox is used to select either 'true', 'false' or 'null' as the value.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/tristatecheckbox/)
|
|
|
|
*
|
|
|
|
* @module tristatecheckbox
|
|
|
|
*
|
|
|
|
*/
|
2023-04-04 12:42:13 +00:00
|
|
|
import { InputHTMLAttributes, VNode } from 'vue';
|
2022-09-06 12:03:37 +00:00
|
|
|
import { ClassComponent, GlobalComponentConstructor, Nullable } from '../ts-helpers';
|
|
|
|
|
2023-03-01 11:23:31 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in TriStateCheckbox component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface TriStateCheckboxProps {
|
|
|
|
/**
|
|
|
|
* Value of the component.
|
2023-03-01 11:23:31 +00:00
|
|
|
* @defaultValue null
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
modelValue?: Nullable<boolean>;
|
|
|
|
/**
|
|
|
|
* When present, it specifies that the component should be disabled.
|
2023-03-01 11:23:31 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
disabled?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Index of the element in tabbing order.
|
|
|
|
*/
|
|
|
|
tabindex?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Identifier of the underlying input element.
|
|
|
|
*/
|
|
|
|
inputId?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.
|
2023-04-18 10:51:10 +00:00
|
|
|
* @deprecated since v3.26.0. Use 'pt' property.
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
inputProps?: InputHTMLAttributes | undefined;
|
|
|
|
/**
|
|
|
|
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
|
|
*/
|
|
|
|
'aria-labelledby'?: string | undefined;
|
|
|
|
/**
|
2022-09-14 11:26:01 +00:00
|
|
|
* Establishes a string value that labels the component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
'aria-label'?: string | undefined;
|
|
|
|
}
|
|
|
|
|
2023-03-01 11:23:31 +00:00
|
|
|
/**
|
|
|
|
* Defines valid slots in TriStateCheckbox component.
|
|
|
|
*/
|
2023-04-04 12:42:13 +00:00
|
|
|
export interface TriStateCheckboxSlots {
|
|
|
|
/**
|
|
|
|
* Custom check icon template.
|
|
|
|
*/
|
|
|
|
checkicon(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom uncheck icon template.
|
|
|
|
*/
|
|
|
|
uncheckicon(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom nullable icon template.
|
|
|
|
*/
|
|
|
|
nullableicon(): VNode[];
|
|
|
|
}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 11:23:31 +00:00
|
|
|
/**
|
|
|
|
* Defines valid emits in TriStateCheckbox component.
|
|
|
|
*/
|
|
|
|
export interface TriStateCheckboxEmits {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Emitted when the value changes.
|
|
|
|
* @param {boolean|null|undefined} value - New value.
|
|
|
|
*/
|
2023-03-01 11:23:31 +00:00
|
|
|
'update:modelValue'(value: Nullable<boolean>): void;
|
|
|
|
}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 11:23:31 +00:00
|
|
|
/**
|
|
|
|
* **PrimeVue - TriStateCheckbox**
|
|
|
|
*
|
|
|
|
* _TriStateCheckbox is used to select either 'true', 'false' or 'null' as the value._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/tristatecheckbox/)
|
|
|
|
* --- ---
|
2023-03-03 10:55:20 +00:00
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
2023-03-01 11:23:31 +00:00
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*
|
|
|
|
*/
|
2022-09-14 11:26:01 +00:00
|
|
|
declare class TriStateCheckbox extends ClassComponent<TriStateCheckboxProps, TriStateCheckboxSlots, TriStateCheckboxEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
TriStateCheckbox: GlobalComponentConstructor<TriStateCheckbox>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default TriStateCheckbox;
|