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

108 lines
2.7 KiB
JavaScript
Raw Normal View History

const SliderProps = [
{
2022-09-14 14:26:41 +00:00
name: 'modelValue',
type: 'number',
default: '0',
description: 'Value of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'min',
type: 'number',
default: '0',
description: 'Mininum boundary value.'
},
{
2022-09-14 14:26:41 +00:00
name: 'max',
type: 'number',
default: '100',
description: 'Maximum boundary value.'
},
{
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-14 14:26:41 +00:00
name: 'step',
type: 'number',
default: '1',
description: 'Step factor to increment/decrement the value.'
},
{
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-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-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: '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-08 12:18:27 +00:00
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses to pass attributes to DOM elements inside the component.'
}
];
const SliderEvents = [
{
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: 'value',
type: 'number',
description: 'Selected option value'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'slideend',
description: 'Callback to invoke when slide ends.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event.originalEvent',
type: 'object',
description: 'Browser event'
},
{
2022-09-14 14:26:41 +00:00
name: 'event.value',
type: 'number',
description: 'New value.'
}
]
}
];
module.exports = {
slider: {
2022-09-14 14:26:41 +00:00
name: 'Slider',
description: 'Slider is an input component to provide a numerical input',
props: SliderProps,
events: SliderEvents
}
};