primevue-mirror/api-generator/components/togglebutton.js

146 lines
3.6 KiB
JavaScript
Raw Permalink Normal View History

const ToggleButtonProps = [
{
2022-09-14 14:26:41 +00:00
name: 'modelValue',
type: 'any',
default: 'null',
description: 'Value of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'onIcon',
type: 'string',
default: 'null',
description: 'Icon for the on state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'offIcon',
type: 'string',
default: 'null',
description: 'Icon for the off state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'onLabel',
type: 'string',
default: 'yes',
description: 'Label for the on state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'offLabel',
type: 'string',
default: 'no',
description: 'Label for the off state.'
},
{
2022-09-14 14:26:41 +00:00
name: 'iconPos',
type: 'string',
default: 'left',
description: 'Position of the icon, valid values are "left" and "right".'
},
{
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: '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.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputId',
type: 'string',
default: 'null',
description: 'Identifier of the focus input to match a label defined for the chips.'
},
{
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.'
2023-05-08 12:18:27 +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 ToggleButtonEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'change',
description: 'Callback to invoke on value change.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'focus',
description: 'Callback to invoke when the component receives focus.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'blur',
description: 'Callback to invoke when the component loses focus.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
}
];
2023-04-18 13:42:36 +00:00
const ToggleButtonSlots = [
{
name: 'icon',
description: 'custom icon template.'
}
];
module.exports = {
togglebutton: {
2022-09-14 14:26:41 +00:00
name: 'ToggleButton',
description: 'ToggleButton is used to select a boolean value using a button.',
props: ToggleButtonProps,
2023-04-18 13:42:36 +00:00
slots: ToggleButtonSlots,
events: ToggleButtonEvents
}
};