2022-09-12 07:13:52 +00:00
|
|
|
const SliderProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'modelValue',
|
|
|
|
type: 'number',
|
|
|
|
default: '0',
|
|
|
|
description: 'Value of the component.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'min',
|
|
|
|
type: 'number',
|
|
|
|
default: '0',
|
|
|
|
description: 'Mininum boundary value.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'max',
|
|
|
|
type: 'number',
|
|
|
|
default: '100',
|
|
|
|
description: 'Maximum boundary value.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'orientation',
|
|
|
|
type: 'string',
|
|
|
|
default: 'horizontal',
|
|
|
|
description: 'Orientation of the slider, valid values are horizontal and vertical.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'step',
|
|
|
|
type: 'number',
|
|
|
|
default: '1',
|
|
|
|
description: 'Step factor to increment/decrement the value.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'range',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'When speficed, allows two boundary values to be picked.'
|
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 component should be disabled.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
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: '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-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
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-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 SliderEvents = [
|
|
|
|
{
|
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: 'value',
|
|
|
|
type: 'number',
|
|
|
|
description: 'Selected option value'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'slideend',
|
|
|
|
description: 'Callback to invoke when slide ends.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'event.originalEvent',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Browser event'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'event.value',
|
|
|
|
type: 'number',
|
|
|
|
description: 'New value.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
slider: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'Slider',
|
|
|
|
description: 'Slider is an input component to provide a numerical input',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: SliderProps,
|
|
|
|
events: SliderEvents
|
|
|
|
}
|
|
|
|
};
|