diff --git a/api-generator/components/datepicker.js b/api-generator/components/datepicker.js new file mode 100644 index 000000000..1adc9e9b8 --- /dev/null +++ b/api-generator/components/datepicker.js @@ -0,0 +1,512 @@ +const DatePickerProps = [ + { + name: 'modelValue', + type: 'any', + default: 'null', + description: 'Value of the component.' + }, + { + name: 'selectionMode', + type: 'string', + default: 'single', + description: 'Defines the quantity of the selection, valid values are "single", "multiple" and "range".' + }, + { + name: 'dateFormat', + type: 'string', + default: 'null', + description: 'Format of the date. Defaults to PrimeVue Locale configuration.' + }, + { + name: 'inline', + type: 'boolean', + default: 'false', + description: 'When enabled, displays the calendar as inline instead of an overlay.' + }, + { + name: 'showOtherMonths', + type: 'boolean', + default: 'true', + description: 'Whether to display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use the selectOtherMonths option.' + }, + { + name: 'selectOtherMonths', + type: 'boolean', + default: 'false', + description: 'Whether days in other months shown before or after the current month are selectable. This only applies if the showOtherMonths option is set to true.' + }, + { + name: 'showIcon', + type: 'boolean', + default: 'false', + description: 'When enabled, displays a button with icon next to input.' + }, + { + name: 'icon', + type: 'string', + default: 'null', + description: 'Icon of the calendar button.' + }, + { + name: 'previousIcon', + type: 'string', + default: 'null', + description: 'Icon to show in the previous button.' + }, + { + name: 'nextIcon', + type: 'string', + default: 'null', + description: 'Icon to show in the next button.' + }, + { + name: 'incrementIcon', + type: 'string', + default: 'null', + description: 'Icon to show in each of the increment buttons.' + }, + { + name: 'decrementIcon', + type: 'string', + default: 'null', + description: 'Icon to show in each of the decrement buttons.' + }, + { + name: 'numberOfMonths', + type: 'number', + default: '1', + description: 'Number of months to display.' + }, + { + name: 'view', + type: 'string', + default: 'date', + description: 'Type of view to display, valid valids are "date" for datepicker and "month" for month picker.' + }, + { + name: 'monthNavigator', + type: 'boolean', + default: 'false', + description: 'Whether the month should be rendered as a dropdown instead of text.' + }, + { + name: 'yearNavigator', + type: 'boolean', + default: 'false', + description: 'Whether the year should be rendered as a dropdown instead of text.' + }, + { + name: 'yearRange', + type: 'string', + default: 'null', + description: 'The range of years displayed in the year drop-down in (nnnn:nnnn) format such as (2000:2020).' + }, + { + name: 'panelClass', + type: 'string', + default: 'null', + description: 'Style class of the datetimepicker panel.' + }, + { + name: 'minDate', + type: 'Date', + default: 'null', + description: 'The minimum selectable date.' + }, + { + name: 'maxDate', + type: 'Date', + default: 'null', + description: 'The maximum selectable date.' + }, + { + name: 'disabledDates', + type: 'array', + default: 'null', + description: 'Array with dates to disable.' + }, + { + name: 'disabledDays', + type: 'array', + default: 'null', + description: 'Array with disabled weekday numbers.' + }, + { + name: 'maxDateCount', + type: 'number', + default: 'null', + description: 'Maximum number of selectable dates in multiple mode.' + }, + { + name: 'showOnFocus', + type: 'boolean', + default: 'true', + description: 'When disabled, datepicker will not be visible with input focus.' + }, + { + name: 'autoZIndex', + type: 'boolean', + default: 'true', + description: 'Whether to automatically manage layering.' + }, + { + name: 'baseZIndex', + type: 'number', + default: '0', + description: 'Base zIndex value to use in layering.' + }, + { + name: 'showButtonBar', + type: 'boolean', + default: 'false', + description: 'Whether to display today and clear buttons at the footer' + }, + { + name: 'shortYearCutoff', + type: 'string', + default: '+10', + description: 'The cutoff year for determining the century for a date.' + }, + { + name: 'showTime', + type: 'boolean', + default: 'false', + description: 'Whether to display timepicker.' + }, + { + name: 'timeOnly', + type: 'boolean', + default: 'false', + description: 'Whether to display timepicker only.' + }, + { + name: 'hourFormat', + type: 'string', + default: '24', + description: 'Specifies 12 or 24 hour format.' + }, + { + name: 'stepHour', + type: 'number', + default: '1', + description: 'Hours to change per step.' + }, + { + name: 'stepMinute', + type: 'number', + default: '1', + description: 'Minutes to change per step.' + }, + { + name: 'stepSeconds', + type: 'number', + default: '1', + description: 'Seconds to change per step.' + }, + { + name: 'showSeconds', + type: 'boolean', + default: 'false', + description: 'Whether to show the seconds in time picker.' + }, + { + name: 'hideOnDateTimeSelect', + type: 'boolean', + default: 'false', + description: 'Whether to hide the overlay on date selection when showTime is enabled.' + }, + { + name: 'hideOnRangeSelection', + type: 'boolean', + default: 'false', + description: 'Whether to hide the overlay on date selection is completed when selectionMode is range.' + }, + { + name: 'timeSeparator', + type: 'string', + default: ':', + description: 'Separator of time selector.' + }, + { + name: 'showWeek', + type: 'boolean', + default: 'false', + description: 'When enabled, calendar will show week numbers.' + }, + { + name: 'manualInput', + type: 'boolean', + default: 'true', + description: 'Whether to allow entering the date manually via typing.' + }, + { + name: 'appendTo', + type: 'string', + default: 'body', + description: 'A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are "body" for document body and "self" for the element itself.' + }, + { + name: 'disabled', + type: 'boolean', + default: 'false', + description: 'When present, it specifies that the element should be disabled.' + }, + { + name: 'invalid', + type: 'boolean', + default: 'false', + description: 'When present, it specifies that the component should have invalid state style.' + }, + { + name: 'variant', + type: 'string', + default: 'null', + description: 'Specifies the input variant of the component.' + }, + { + name: 'readonly', + type: 'boolean', + default: 'false', + description: 'When present, it specifies that an input field is read-only.' + }, + { + name: 'placeholder', + type: 'string', + default: 'null', + description: 'Placeholder text for the input.' + }, + { + name: 'id', + type: 'string', + default: 'null', + description: 'Identifier of the element.' + }, + { + name: 'inputId', + type: 'string', + default: 'null', + description: 'Identifier of the underlying input element.' + }, + { + name: 'inputClass', + type: 'string | object', + default: 'null', + description: 'Style class of the input field.' + }, + { + name: 'inputStyle', + type: 'object', + default: 'null', + description: 'Inline style of the input field.' + }, + { + name: 'inputProps', + type: 'object', + default: 'null', + description: 'Used to pass all properties of the HTMLInputElement to the focusable input element inside the component.' + }, + { + name: 'panelClass', + type: 'string | object', + default: 'null', + description: 'Style class of the overlay panel.' + }, + { + name: 'panelStyle', + type: 'object', + default: 'null', + description: 'Inline style of the overlay panel.' + }, + { + name: 'panelProps', + type: 'object', + default: 'null', + description: 'Used to pass all properties of the HTMLDivElement to the overlay panel inside the component.' + }, + { + name: 'pt', + type: 'any', + default: 'null', + description: 'Used to pass attributes to DOM elements inside the component.' + }, + { + name: 'unstyled', + type: 'boolean', + default: 'false', + description: 'When enabled, it removes component related styles in the core.' + } +]; + +const DatePickerEvents = [ + { + name: 'input', + description: 'Callback to invoke when input field is being typed.', + arguments: [ + { + name: 'event', + type: 'object', + description: 'New date' + } + ] + }, + { + name: 'date-select', + description: 'Callback to invoke when a date is selected.', + arguments: [ + { + name: 'value', + type: 'Date', + description: 'Selected value' + } + ] + }, + { + name: 'show', + description: 'Callback to invoke when datepicker panel is shown.' + }, + { + name: 'hide', + description: 'Callback to invoke when datepicker panel is hidden.' + }, + { + name: 'today-click', + description: 'Callback to invoke when today button is clicked.', + arguments: [ + { + name: 'date', + type: 'Date', + description: 'Today as a date instance' + } + ] + }, + { + name: 'clear-click', + description: 'Callback to invoke when clear button is clicked.', + arguments: [ + { + name: 'event', + type: 'object', + description: 'Click event' + } + ] + }, + { + name: 'month-change', + description: 'Callback to invoke when a month is changed using the navigators.', + arguments: [ + { + name: 'event.month', + type: 'number', + description: 'New month' + }, + { + name: 'event.year', + type: 'number', + description: 'New year' + } + ] + }, + { + name: 'year-change', + description: 'Callback to invoke when a year is changed using the navigators.', + arguments: [ + { + name: 'event.month', + type: 'number', + description: 'New month' + }, + { + name: 'event.year', + type: 'number', + description: 'New year' + } + ] + }, + { + name: 'focus', + description: 'Callback to invoke on focus of input field.', + arguments: [ + { + name: 'event', + type: 'object', + description: 'Focus event' + } + ] + }, + { + name: 'blur', + description: 'Callback to invoke on blur of input field.', + arguments: [ + { + name: 'event.originalEvent', + type: 'object', + description: 'Browser event' + }, + { + name: 'event.value', + type: 'string', + description: 'Input value' + } + ] + }, + { + name: 'keydown', + description: 'Callback to invoke when a key is pressed.', + arguments: [ + { + name: 'event', + type: 'object', + description: 'Keydown event' + } + ] + } +]; + +const DatePickerSlots = [ + { + name: 'header', + description: 'Custom content for the component header.' + }, + { + name: 'footer', + description: 'Custom content for the component footer.' + }, + { + name: 'date', + description: 'Custom content for the calendar cell.' + }, + { + name: 'decade', + description: 'Custom content for the calendar decade.' + }, + { + name: 'dropdownicon', + description: 'Custom dropdown icon template.' + }, + { + name: 'previousicon', + description: 'Custom previous icon template.' + }, + { + name: 'nexticon', + description: 'Custom next icon template.' + }, + { + name: 'incrementicon', + description: 'Custom increment icon template.' + }, + { + name: 'decrementicon', + description: 'Custom decrement icon template.' + } +]; + +module.exports = { + calendar: { + name: 'DatePicker', + description: 'DatePicker is an input component to select a date.', + props: DatePickerProps, + events: DatePickerEvents, + slots: DatePickerSlots + } +}; diff --git a/api-generator/components/drawer.js b/api-generator/components/drawer.js new file mode 100644 index 000000000..986e790df --- /dev/null +++ b/api-generator/components/drawer.js @@ -0,0 +1,114 @@ +const DrawerProps = [ + { + name: 'visible', + type: 'boolean', + default: 'false', + description: 'Specifies the visibility of the dialog.' + }, + { + name: 'position', + type: 'string', + default: 'left', + description: 'Specifies the position of the sidebar, valid values are "left", "right", "top", "bottom" and "full".' + }, + { + name: 'baseZIndex', + type: 'number', + default: '0', + description: 'Base zIndex value to use in layering.' + }, + { + name: 'autoZIndex', + type: 'boolean', + default: 'true', + description: 'Whether to automatically manage layering.' + }, + { + name: 'dismissable', + type: 'boolean', + default: 'true', + description: 'Whether clicking outside closes the panel.' + }, + { + name: 'showCloseIcon', + type: 'boolean', + default: 'true', + description: 'Whether to display a close icon inside the panel.' + }, + { + name: 'modal', + type: 'boolean', + default: 'true', + description: 'Whether to a modal layer behind the sidebar.' + }, + { + name: 'ariaCloseLabel', + type: 'string', + default: 'close', + description: 'Aria label of the close icon.' + }, + { + name: 'blockScroll', + type: 'boolean', + default: 'false', + description: 'Whether background scroll should be blocked when sidebar is visible.' + }, + { + name: 'closeIcon', + type: 'string', + default: 'undefined', + description: 'Icon to display in the sidebar close button.' + }, + { + name: 'pt', + type: 'any', + default: 'null', + description: 'Used to pass attributes to DOM elements inside the component.' + }, + { + name: 'unstyled', + type: 'boolean', + default: 'false', + description: 'When enabled, it removes component related styles in the core.' + } +]; + +const DrawerEvents = [ + { + name: 'hide', + description: 'Callback to invoke when sidebar gets hidden.' + }, + { + name: 'show', + description: 'Callback to invoke when sidebar gets shown.' + }, + { + name: 'closeicon', + description: 'Custom close icon template.' + } +]; + +const DrawerSlots = [ + { + name: 'header', + description: 'Custom content for the component header.' + }, + { + name: 'closeicon', + description: 'Custom close icon template.' + }, + { + name: 'container', + description: 'Custom container template.' + } +]; + +module.exports = { + sidebar: { + name: 'Drawer', + description: 'Drawer is a panel component displayed as an overlay at the edges of the screen.', + props: DrawerProps, + events: DrawerEvents, + slots: DrawerSlots + } +}; diff --git a/api-generator/components/inputchips.js b/api-generator/components/inputchips.js new file mode 100644 index 000000000..1602667fa --- /dev/null +++ b/api-generator/components/inputchips.js @@ -0,0 +1,148 @@ +const InputChipsProps = [ + { + name: 'modelValue', + type: 'array', + default: 'null', + description: 'Value of the component.' + }, + { + name: 'max', + type: 'number', + default: 'null', + description: 'Maximum number of entries allowed.' + }, + { + name: 'separator', + type: 'string', + default: 'null', + description: 'Separator char to add an item when pressed in addition to the enter key. Currently only possible value is ","' + }, + { + name: 'addOnBlur', + type: 'boolean', + default: 'false', + description: 'Whether to add an item when the input loses focus.' + }, + { + name: 'allowDuplicate', + type: 'boolean', + default: 'false', + description: 'Whether to allow duplicate values or not.' + }, + { + name: 'disabled', + type: 'boolean', + default: 'false', + description: 'When present, it specifies that the element should be disabled.' + }, + { + name: 'invalid', + type: 'boolean', + default: 'false', + description: 'When present, it specifies that the component should have invalid state style.' + }, + { + name: 'variant', + type: 'string', + default: 'null', + description: 'Specifies the input variant of the component.' + }, + { + name: 'placeholder', + type: 'string', + default: 'null', + description: 'Placeholder text for the input.' + }, + { + name: 'inputId', + type: 'string', + default: 'null', + description: 'Identifier of the focus input to match a label defined for the chips.' + }, + { + name: 'inputClass', + type: 'string | object', + default: 'null', + description: 'Style class of the input field.' + }, + { + name: 'inputStyle', + type: 'object', + default: 'null', + description: 'Inline style of the input field.' + }, + { + name: 'inputProps', + type: 'object', + default: 'null', + description: 'Used to pass all properties of the HTMLInputElement to the focusable input element inside the component.' + }, + { + name: 'pt', + type: 'any', + default: 'null', + description: 'Used to pass attributes to DOM elements inside the component.' + }, + { + name: 'unstyled', + type: 'boolean', + default: 'false', + description: 'When enabled, it removes component related styles in the core.' + } +]; + +const InputChipsEvents = [ + { + name: 'add', + description: 'Callback to invoke when a chip is added.', + arguments: [ + { + name: 'originalEvent', + type: 'object', + description: 'Browser event' + }, + { + name: 'value', + type: 'array', + description: 'Added item value' + } + ] + }, + { + name: 'remove', + description: 'Callback to invoke when a chip is removed.', + arguments: [ + { + name: 'originalEvent', + type: 'object', + description: 'Browser event' + }, + { + name: 'value', + type: 'array', + description: 'Removed item value' + } + ] + } +]; + +const InputChipsSlots = [ + { + name: 'chips', + description: 'Custom content for the chips' + }, + { + name: 'removetokenicon', + description: 'Custom remove token icon template.' + } +]; + +module.exports = { + chips: { + name: 'InputChips', + description: 'InputChips is used to enter multiple values on an input field.', + props: InputChipsProps, + events: InputChipsEvents, + slots: InputChipsSlots + } +}; diff --git a/api-generator/components/popover.js b/api-generator/components/popover.js new file mode 100644 index 000000000..87cb7c5af --- /dev/null +++ b/api-generator/components/popover.js @@ -0,0 +1,100 @@ +const PopoverProps = [ + { + name: 'dismissable', + type: 'boolean', + default: 'true', + description: 'Enables to hide the overlay when outside is clicked.' + }, + { + name: 'showCloseIcon', + type: 'boolean', + default: 'false', + description: 'When enabled, displays a close icon at top right corner.' + }, + { + name: 'appendTo', + type: 'string', + default: 'body', + description: 'A valid query selector or an HTMLElement to specify where the overlay gets attached.' + }, + { + name: 'baseZIndex', + type: 'number', + default: '0', + description: 'Base zIndex value to use in layering.' + }, + { + name: 'autoZIndex', + type: 'boolean', + default: 'true', + description: 'Whether to automatically manage layering.' + }, + { + name: 'ariaCloseLabel', + type: 'string', + default: 'close', + description: 'Aria label of the close icon.' + }, + { + name: 'breakpoints', + type: 'object', + default: 'null', + description: 'Object literal to define widths per screen size.' + }, + { + name: 'closeIcon', + type: 'string', + default: 'undefined', + description: 'Display a custom close icon for the message.' + }, + { + name: 'closeOnEscape', + type: 'boolean', + default: 'true', + description: 'Specifies if pressing escape key should hide the dialog.' + }, + { + name: 'pt', + type: 'any', + default: 'null', + description: 'Used to pass attributes to DOM elements inside the component.' + }, + { + name: 'unstyled', + type: 'boolean', + default: 'false', + description: 'When enabled, it removes component related styles in the core.' + } +]; + +const PopoverSlots = [ + { + name: 'closeicon', + description: 'Custom close icon template.' + } +]; + +const PopoverEvents = [ + { + name: 'show', + description: 'Callback to invoke before the overlay is shown.' + }, + { + name: 'hide', + description: 'Callback to invoke before the overlay is hidden.' + }, + { + name: 'container', + description: 'Custom container template.' + } +]; + +module.exports = { + overlaypanel: { + name: 'Popover', + description: 'Popover is a container component positioned as connected to its target.', + props: PopoverProps, + slots: PopoverSlots, + events: PopoverEvents + } +}; diff --git a/api-generator/components/select.js b/api-generator/components/select.js new file mode 100644 index 000000000..3c7686755 --- /dev/null +++ b/api-generator/components/select.js @@ -0,0 +1,432 @@ +const SelectProps = [ + { + name: 'modelValue', + type: 'any', + default: 'null', + description: 'Value of the component.' + }, + { + name: 'options', + type: 'array', + default: 'null', + description: 'An array of selectitems to display as the available options.' + }, + { + name: 'optionLabel', + type: 'string | function', + default: 'null', + description: 'Property name or getter function to use as the label of an option.' + }, + { + name: 'optionValue', + type: 'string | function', + default: 'null', + description: 'Property name or getter function to use as the value of an option, defaults to the option itself when not defined.' + }, + { + name: 'optionDisabled', + type: 'boolean', + default: 'null', + description: 'Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.' + }, + { + name: 'optionGroupLabel', + type: 'string | function', + default: 'null', + description: 'Property name or getter function to use as the label of an option group.' + }, + { + name: 'optionGroupChildren', + type: 'string | function', + default: 'null', + description: 'Property name or getter function that refers to the children options of option group.' + }, + { + name: 'scrollHeight', + type: 'string', + default: '200px', + description: 'Height of the viewport, a scrollbar is defined if height of list exceeds this value.' + }, + { + name: 'filter', + type: 'boolean', + default: 'false', + description: 'When specified, displays a filter input at header.' + }, + { + name: 'filterPlaceholder', + type: 'string', + default: 'null', + description: 'Placeholder text to show when filter input is empty.' + }, + { + name: 'filterLocale', + type: 'string', + default: 'undefined', + description: "Locale to use in filtering. The default locale is the host environment's current locale." + }, + { + name: 'filterMatchMode', + type: 'string', + default: 'contains', + description: 'Defines the filtering algorithm to use when searching the options. Valid values are "contains" (default), "startsWith" and "endsWith"' + }, + { + name: 'filterFields', + type: 'array', + default: 'null', + description: 'Fields used when filtering the options, defaults to optionLabel.' + }, + { + name: 'editable', + type: 'boolean', + default: 'false', + description: 'When present, custom value instead of predefined options can be entered using the editable input field.' + }, + { + name: 'placeholder', + type: 'string', + default: 'null', + description: 'Default text to display when no option is selected.' + }, + { + name: 'disabled', + type: 'boolean', + default: 'false', + description: 'When present, it specifies that the component should be disabled.' + }, + { + name: 'invalid', + type: 'boolean', + default: 'false', + description: 'When present, it specifies that the component should have invalid state style.' + }, + { + name: 'variant', + type: 'string', + default: 'null', + description: 'Specifies the input variant of the component.' + }, + { + name: 'dataKey', + type: 'string', + default: 'null', + description: 'A property to uniquely identify an option.' + }, + { + name: 'showClear', + type: 'boolean', + default: 'false', + description: 'When enabled, a clear icon is displayed to clear the value.' + }, + { + name: 'inputId', + type: 'string', + default: 'null', + description: 'Identifier of the underlying input element.' + }, + { + name: 'inputStyle', + type: 'object', + default: 'null', + description: 'Inline style of the input field.' + }, + { + name: 'inputClass', + type: 'string | object', + default: 'null', + description: 'Style class of the input field.' + }, + { + name: 'inputProps', + type: 'object', + default: 'null', + description: 'Used to pass all properties of the HTMLInputElement/HTMLSpanElement to the focusable input element inside the component.' + }, + { + name: 'panelStyle', + type: 'object', + default: 'null', + description: 'Inline style of the overlay panel.' + }, + { + name: 'panelClass', + type: 'string', + default: 'null', + description: 'Style class of the overlay panel.' + }, + { + name: 'panelProps', + type: 'object', + default: 'null', + description: 'Used to pass all properties of the HTMLDivElement to the overlay panel inside the component.' + }, + { + name: 'filterInputProps', + type: 'object', + default: 'null', + description: 'Used to pass all properties of the HTMLInputElement to the filter input inside the component.' + }, + { + name: 'clearIconProps', + type: 'object', + default: 'null', + description: 'Used to pass all properties of the HTMLElement to the clear icon inside the component.' + }, + { + name: 'appendTo', + type: 'string', + default: 'body', + description: "A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are 'body' for document body and 'self' for the element itself." + }, + { + name: 'loading', + type: 'boolean', + default: 'false', + description: 'Whether the multiselect is in loading state.' + }, + { + name: 'loadingIcon', + type: 'string', + default: 'pi pi-spinner pi-spin', + description: 'Icon to display in loading state.' + }, + { + name: 'resetFilterOnHide', + type: 'boolean', + default: 'false', + description: 'Clears the filter value when hiding the dropdown.' + }, + { + name: 'resetFilterOnClear', + type: 'boolean', + default: 'false', + description: 'Clears the filter value when clicking on the clear icon.' + }, + { + name: 'virtualScrollerOptions', + type: 'object', + default: 'null', + description: 'Whether to use the virtualScroller feature. The properties of VirtualScroller component can be used like an object in it.' + }, + { + name: 'autoOptionFocus', + type: 'boolean', + default: 'false', + description: 'Whether to focus on the first visible or selected element when the overlay panel is shown.' + }, + { + name: 'autoFilterFocus', + type: 'boolean', + default: 'false', + description: 'Whether to focus on the filter element when the overlay panel is shown.' + }, + { + name: 'selectOnFocus', + type: 'boolean', + default: 'false', + description: 'When enabled, the focused option is selected.' + }, + { + name: 'filterMessage', + type: 'string', + default: '{0} results are available', + description: 'Text to be displayed in hidden accessible field when filtering returns any results. Defaults to value from PrimeVue locale configuration.' + }, + { + name: 'selectionMessage', + type: 'string', + default: '{0} items selected', + description: 'Text to be displayed in hidden accessible field when options are selected. Defaults to value from PrimeVue locale configuration.' + }, + { + name: 'emptySelectionMessage', + type: 'string', + default: 'No selected item', + description: 'Text to be displayed in hidden accessible field when any option is not selected. Defaults to value from PrimeVue locale configuration.' + }, + { + name: 'emptyFilterMessage', + type: 'string', + default: 'No results found', + description: 'Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration.' + }, + { + name: 'emptyMessage', + type: 'string', + default: 'No results found', + description: 'Text to display when there are no options available. Defaults to value from PrimeVue locale configuration.' + }, + { + name: 'tabindex', + type: 'number', + default: '0', + description: 'Index of the element in tabbing order.' + }, + { + name: 'aria-label', + type: 'string', + default: 'null', + description: 'Defines a string value that labels an interactive element.' + }, + { + name: 'aria-labelledby', + type: 'string', + default: 'null', + description: 'Identifier of the underlying input element.' + }, + { + name: 'pt', + type: 'any', + default: 'null', + description: 'Used to pass attributes to DOM elements inside the component.' + }, + { + name: 'unstyled', + type: 'boolean', + default: 'false', + description: 'When enabled, it removes component related styles in the core.' + } +]; + +const SelectEvents = [ + { + name: 'change', + description: 'Callback to invoke on value change.', + arguments: [ + { + name: 'event.originalEvent', + type: 'object', + description: 'Browser event' + }, + { + name: 'event.value', + type: 'string', + description: 'Selected option value' + } + ] + }, + { + name: 'focus', + description: 'Callback to invoke when component receives focus.', + arguments: [ + { + name: 'event', + type: 'object', + description: 'Browser event' + } + ] + }, + { + name: 'blur', + description: 'Callback to invoke when component loses focus.', + arguments: [ + { + name: 'event', + type: 'object', + description: 'Browser event' + } + ] + }, + { + name: 'before-show', + description: 'Callback to invoke before the overlay is shown.' + }, + { + name: 'before-hide', + description: 'Callback to invoke before the overlay is hidden.' + }, + { + name: 'show', + description: 'Callback to invoke when the overlay is shown.' + }, + { + name: 'hide', + description: 'Callback to invoke when the overlay is hidden.' + }, + { + name: 'filter', + description: 'Callback to invoke when the overlay is shown.', + arguments: [ + { + name: 'event.originalEvent', + type: 'object', + description: 'Browser event' + }, + { + name: 'event.value', + type: 'string', + description: 'Filter value' + } + ] + } +]; + +const SelectSlots = [ + { + name: 'value', + description: "Custom content for the item's value" + }, + { + name: 'indicator', + description: 'Custom content for the dropdown indicator' + }, + { + name: 'header', + description: "Custom content for the component's header" + }, + { + name: 'footer', + description: "Custom content for the component's footer" + }, + { + name: 'option', + description: "Custom content for the item's option" + }, + { + name: 'optiongroup', + description: "Custom content for the item's optiongroup" + }, + { + name: 'emptyfilter', + description: 'Custom content when there is no filtered data to display' + }, + { + name: 'empty', + description: 'Custom content when there is no data to display' + }, + { + name: 'content', + description: 'Custom content for the virtual scroller' + }, + { + name: 'loader', + description: 'Custom content for the virtual scroller loader items' + }, + { + name: 'clearicon', + description: 'Custom clear icon template.' + }, + { + name: 'dropdownicon', + description: 'Custom dropdown icon template.' + }, + { + name: 'loadingicon', + description: 'Custom loading icon template.' + }, + { + name: 'filtericon', + description: 'Custom filter icon template.' + } +]; + +module.exports = { + dropdown: { + name: 'Select', + description: 'Select is used to select an item from a list of options.', + props: SelectProps, + events: SelectEvents, + slots: SelectSlots + } +}; diff --git a/api-generator/components/toggleswitch.js b/api-generator/components/toggleswitch.js new file mode 100644 index 000000000..490d93992 --- /dev/null +++ b/api-generator/components/toggleswitch.js @@ -0,0 +1,80 @@ +const ToggleSwitchProps = [ + { + name: 'modelValue', + type: 'boolean', + default: 'null', + description: 'Specifies whether a inputswitch should be checked or not.' + }, + { + name: 'trueValue', + type: 'any', + default: 'null', + description: 'Value in checked state.' + }, + { + name: 'falseValue', + type: 'any', + default: 'null', + description: 'Value in unchecked state.' + }, + { + name: 'inputId', + type: 'string', + default: 'null', + description: 'Identifier of the underlying input element.' + }, + { + name: 'inputStyle', + type: 'object', + default: 'null', + description: 'Inline style of the input field.' + }, + { + name: 'inputClass', + type: 'string | object', + default: 'null', + description: 'Style class of the input field.' + }, + { + name: 'inputProps', + type: 'object', + default: 'null', + description: 'Used to pass all properties of the HTMLInputElement to the focusable input element inside the component.' + }, + { + name: 'pt', + type: 'any', + default: 'null', + description: 'Used to pass attributes to DOM elements inside the component.' + }, + { + name: 'unstyled', + type: 'boolean', + default: 'false', + description: 'When enabled, it removes component related styles in the core.' + } +]; + +const ToggleSwitchEvents = [ + { + name: 'click', + description: 'Callback to invoke on click.' + }, + { + name: 'change', + description: 'Callback to invoke on value change.' + }, + { + name: 'input', + description: 'Callback to invoke on value change.' + } +]; + +module.exports = { + inputswitch: { + name: 'ToggleSwitch', + description: 'ToggleSwitch is used to select a boolean value.', + props: ToggleSwitchProps, + events: ToggleSwitchEvents + } +};