2022-09-12 07:13:52 +00:00
|
|
|
const ToggleButtonProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'modelValue',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Value of the component.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'onIcon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Icon for the on state.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'offIcon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Icon for the off state.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'onLabel',
|
|
|
|
type: 'string',
|
|
|
|
default: 'yes',
|
|
|
|
description: 'Label for the on state.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'offLabel',
|
|
|
|
type: 'string',
|
|
|
|
default: 'no',
|
|
|
|
description: 'Label for the off state.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'iconPos',
|
|
|
|
type: 'string',
|
|
|
|
default: 'left',
|
2022-09-12 07:13:52 +00:00
|
|
|
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-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
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.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
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-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'inputClass',
|
2023-03-09 07:02:25 +00:00
|
|
|
type: 'string | object',
|
2022-09-14 14:26:41 +00:00
|
|
|
default: 'null',
|
|
|
|
description: 'Style class of the input field.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'inputStyle',
|
2023-03-09 07:02:25 +00:00
|
|
|
type: 'object',
|
2022-09-14 14:26:41 +00:00
|
|
|
default: 'null',
|
|
|
|
description: 'Inline style of the input field.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'inputProps',
|
|
|
|
type: 'object',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Uses 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',
|
|
|
|
description: 'Uses to pass attributes to DOM elements inside the component.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const ToggleButtonEvents = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'change',
|
|
|
|
description: 'Callback to invoke on value change.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'event',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Browser event'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'focus',
|
|
|
|
description: 'Callback to invoke when the component receives focus.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'event',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Browser event'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'blur',
|
|
|
|
description: 'Callback to invoke when the component loses focus.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'event',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Browser event'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-04-18 13:42:36 +00:00
|
|
|
const ToggleButtonSlots = [
|
|
|
|
{
|
|
|
|
name: 'icon',
|
|
|
|
description: 'custom icon template.'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2022-09-12 07:13:52 +00:00
|
|
|
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.',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: ToggleButtonProps,
|
2023-04-18 13:42:36 +00:00
|
|
|
slots: ToggleButtonSlots,
|
2022-09-12 07:13:52 +00:00
|
|
|
events: ToggleButtonEvents
|
|
|
|
}
|
|
|
|
};
|