primevue-mirror/packages/primevue/scripts/components/checkbox.js

149 lines
3.7 KiB
JavaScript
Raw Normal View History

const CheckboxProps = [
{
2022-09-14 14:26:41 +00:00
name: 'value',
type: 'any',
default: 'null',
description: 'Value of the checkbox.'
},
{
2022-09-14 14:26:41 +00:00
name: 'modelValue',
type: 'any',
default: 'null',
description: 'Value binding of the checkbox.'
},
{
2022-09-14 14:26:41 +00:00
name: 'binary',
type: 'boolean',
default: 'false',
description: 'Allows to select a boolean value instead of multiple values.'
},
{
2022-09-14 14:26:41 +00:00
name: 'disabled',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that the element should be disabled.'
},
2024-01-31 08:01:02 +00:00
{
name: 'invalid',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that the component should have invalid state style.'
},
{
name: 'variant',
type: 'string',
2024-02-02 13:26:27 +00:00
default: 'null',
2024-01-31 08:01:02 +00:00
description: 'Specifies the input variant of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'readonly',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that an input field is read-only.'
},
{
2022-09-14 14:26:41 +00:00
name: 'required',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that the element is required.'
},
{
2022-09-14 14:26:41 +00:00
name: 'tabindex',
type: 'number',
default: 'null',
description: 'Index of the element in tabbing order.'
},
{
2022-09-14 14:26:41 +00:00
name: 'trueValue',
type: 'any',
default: 'null',
description: 'Value in checked state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'falseValue',
type: 'any',
default: 'null',
description: 'Value in unchecked state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputId',
type: 'string',
default: 'null',
description: 'Identifier of the underlying input element.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputClass',
type: 'string | object',
2022-09-14 14:26:41 +00:00
default: 'null',
description: 'Style class of the input field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputStyle',
type: 'object',
2022-09-14 14:26:41 +00:00
default: 'null',
description: 'Inline style of the input field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputProps',
type: 'object',
default: 'null',
2023-08-01 14:01:12 +00:00
description: 'Used to pass all properties of the HTMLInputElement to the focusable input element inside the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'aria-labelledby',
type: 'string',
default: 'null',
description: 'Establishes relationships between the component and label(s) where its value should be one or more element IDs.'
},
{
2022-09-14 14:26:41 +00:00
name: 'aria-label',
type: 'string',
default: 'null',
description: 'Used to define a string that labels the element.'
2023-05-05 09:09:09 +00:00
},
{
name: 'pt',
type: 'any',
default: 'null',
2023-08-01 14:01:12 +00:00
description: 'Used to pass attributes to DOM elements inside the component.'
2023-07-06 13:20:37 +00:00
},
{
name: 'unstyled',
type: 'boolean',
default: 'false',
description: 'When enabled, it removes component related styles in the core.'
}
];
const CheckboxEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'click',
description: 'Callback to invoke on value click.'
},
{
2022-09-14 14:26:41 +00:00
name: 'change',
description: 'Callback to invoke on value change.'
},
{
2022-09-14 14:26:41 +00:00
name: 'input',
description: 'Callback to invoke on value change.'
}
];
const CheckboxSlots = [
{
name: 'icon',
description: 'Custom icon template.'
}
];
module.exports = {
checkbox: {
2022-09-14 14:26:41 +00:00
name: 'Checkbox',
description: 'Checkbox is an extension to standard checkbox element with theming.',
props: CheckboxProps,
events: CheckboxEvents,
slots: CheckboxSlots
}
};