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

278 lines
8.2 KiB
JavaScript
Raw Normal View History

const InputNumberProps = [
{
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: 'format',
type: 'boolean',
default: 'true',
description: 'Whether to format the value.'
},
{
2022-09-14 14:26:41 +00:00
name: 'showButtons',
type: 'boolean',
default: 'false',
description: 'Displays spinner buttons.'
},
{
2022-09-14 14:26:41 +00:00
name: 'buttonLayout',
type: 'string',
default: 'stacked',
description: 'Layout of the buttons, valid values are "stacked" (default), "horizontal" and "vertical".'
},
{
2022-09-14 14:26:41 +00:00
name: 'incrementButtonClass',
type: 'string',
default: 'null',
description: 'Style class of the increment button.'
},
{
2022-09-14 14:26:41 +00:00
name: 'decrementButtonClass',
type: 'string',
default: 'null',
description: 'Style class of the decrement button.'
},
{
2022-09-14 14:26:41 +00:00
name: 'incrementButtonIcon',
type: 'string',
default: 'pi pi-angle-up',
description: 'Style class of the increment button.'
},
{
2022-09-14 14:26:41 +00:00
name: 'decrementButtonIcon',
type: 'string',
default: 'pi pi-angle-down',
description: 'Style class of the decrement button.'
},
{
2022-09-14 14:26:41 +00:00
name: 'locale',
type: 'string',
default: 'null',
description: 'Locale to be used in formatting.'
},
{
2022-09-14 14:26:41 +00:00
name: 'localeMatcher',
type: 'string',
default: 'best fit',
description: 'The locale matching algorithm to use. Possible values are "lookup" and "best fit".'
},
{
2022-09-14 14:26:41 +00:00
name: 'mode',
type: 'string',
default: 'decimal',
description: 'Defines the behavior of the component, valid values are "decimal" and "currency".'
},
{
2022-09-14 14:26:41 +00:00
name: 'prefix',
type: 'string',
default: 'null',
description: 'Text to display before the value.'
},
{
2022-09-14 14:26:41 +00:00
name: 'suffix',
type: 'string',
default: 'decimal',
description: 'Text to display after the value.'
},
{
2022-09-14 14:26:41 +00:00
name: 'currency',
type: 'string',
default: 'null',
description:
'The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB. There is no default value; if the style is "currency", the currency property must be provided.'
},
{
2022-09-14 14:26:41 +00:00
name: 'currencyDisplay',
type: 'string',
default: 'symbol',
description:
'How to display the currency in currency formatting. Possible values are "symbol" to use a localized currency symbol such as €, "code" to use the ISO currency code, "name" to use a localized currency name such as "dollar"; the default is "symbol".'
},
{
2022-09-14 14:26:41 +00:00
name: 'useGrouping',
type: 'boolean',
default: 'true',
description: 'Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.'
},
{
2022-09-14 14:26:41 +00:00
name: 'minFractionDigits',
type: 'number',
default: 'null',
description:
"The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information)."
},
{
2022-09-14 14:26:41 +00:00
name: 'maxFractionDigits',
type: 'number',
default: 'null',
description:
"The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information)."
},
{
2022-09-14 14:26:41 +00:00
name: 'min',
type: 'number',
default: 'null',
description: 'Mininum boundary value.'
},
{
2022-09-14 14:26:41 +00:00
name: 'max',
type: 'number',
default: 'null',
description: 'Maximum boundary value.'
},
{
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: 'allowEmpty',
type: 'boolean',
default: 'true',
description: 'Determines whether the input field is empty.'
},
{
2022-09-14 14:26:41 +00:00
name: 'readonly',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that an input field is read-only.'
},
{
2022-09-14 14:26:41 +00:00
name: 'placeholder',
type: 'string',
default: 'null',
description: 'Placeholder text for the input.'
},
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.'
},
{
name: 'variant',
type: 'string',
default: 'outlined',
description: 'Specifies the input variant of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputId',
type: 'string',
default: 'null',
description: 'Identifier of the underlying input element.'
},
{
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: '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: '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.'
},
{
2022-09-14 14:26:41 +00:00
name: 'incrementButtonProps',
type: 'object',
default: 'null',
2023-08-01 14:01:12 +00:00
description: 'Used to pass all properties of the HTMLButtonElement to increment button inside the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'decrementButtonProps',
type: 'object',
default: 'null',
2023-08-01 14:01:12 +00:00
description: 'Used to pass all properties of the HTMLButtonElement to decrement button inside the component.'
2023-05-05 12:56:22 +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 InputNumberEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'input',
description: 'Callback to invoke when the value is entered.',
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'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'focus',
description: 'Callback to invoke on focus of input field.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Focus event'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'blur',
description: 'Callback to invoke on blur of input field.',
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: 'string',
description: 'Input value'
}
]
}
];
const InputNumberSlots = [
{
name: 'incrementbuttonicon',
description: 'Custom increment button icon template.'
},
{
name: 'decrementbuttonicon',
description: 'Custom decrement button icon template.'
}
];
module.exports = {
inputnumber: {
2022-09-14 14:26:41 +00:00
name: 'InputNumber',
description: 'InputNumber is an input component to provide numerical input.',
props: InputNumberProps,
events: InputNumberEvents,
slots: InputNumberSlots
}
};