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

134 lines
3.2 KiB
JavaScript
Raw Normal View History

const KnobProps = [
{
2022-09-14 14:26:41 +00:00
name: 'modelValue',
type: 'number',
default: 'null',
description: 'Value of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'size',
type: 'number',
default: '100',
description: 'Size of the component in pixels.'
},
{
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: 'readonly',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that the component value cannot be edited.'
},
{
2022-09-14 14:26:41 +00:00
name: 'step',
type: 'number',
default: 'null',
description: 'Step factor to increment/decrement the value.'
},
{
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: 'valueColor',
type: 'string',
default: 'null',
description: 'Background of the value.'
},
{
2022-09-14 14:26:41 +00:00
name: 'rangeColor',
type: 'string',
default: 'null',
description: 'Background color of the range.'
},
{
2022-09-14 14:26:41 +00:00
name: 'textColor',
type: 'string',
default: 'null',
description: 'Color of the value text.'
},
{
2022-09-14 14:26:41 +00:00
name: 'strokeWidth',
type: 'number',
default: '14',
description: 'Width of the knob stroke.'
},
{
2022-09-14 14:26:41 +00:00
name: 'showValue',
type: 'boolean',
default: 'true',
description: 'Whether the show the value inside the knob.'
},
{
2022-09-14 14:26:41 +00:00
name: 'valueTemplate',
type: 'string',
default: '{value}',
description: 'Template string of the value.'
},
{
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-05 14:13:58 +00:00
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Uses 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 KnobEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'change',
description: 'Callback to invoke when the value changes.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'value',
type: 'number',
description: 'New value'
}
]
}
];
module.exports = {
knob: {
2022-09-14 14:26:41 +00:00
name: 'Knob',
description: 'Knob is a form component to define number inputs with a dial.',
props: KnobProps,
events: KnobEvents
}
};