primevue 3.38.0 → 3.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +173 -0
- package/accordion/Accordion.d.ts +233 -0
- package/accordion/Accordion.vue +259 -0
- package/accordion/BaseAccordion.vue +45 -0
- package/accordion/package.json +9 -0
- package/accordion/style/AccordionStyle.d.ts +3 -0
- package/accordion/style/package.json +6 -0
- package/accordiontab/AccordionTab.d.ts +226 -0
- package/accordiontab/AccordionTab.vue +12 -0
- package/accordiontab/BaseAccordionTab.vue +26 -0
- package/accordiontab/package.json +9 -0
- package/accordiontab/style/AccordionTabStyle.d.ts +3 -0
- package/accordiontab/style/package.json +6 -0
- package/animateonscroll/AnimateOnScroll.d.ts +87 -0
- package/animateonscroll/package.json +6 -0
- package/animateonscroll/style/AnimateOnScrollStyle.d.ts +3 -0
- package/animateonscroll/style/package.json +6 -0
- package/api/Api.d.ts +325 -0
- package/api/package.json +6 -0
- package/autocomplete/AutoComplete.d.ts +734 -0
- package/autocomplete/AutoComplete.vue +948 -0
- package/autocomplete/BaseAutoComplete.vue +176 -0
- package/autocomplete/package.json +9 -0
- package/autocomplete/style/AutoCompleteStyle.d.ts +3 -0
- package/autocomplete/style/package.json +6 -0
- package/avatar/Avatar.d.ts +169 -0
- package/avatar/Avatar.vue +32 -0
- package/avatar/BaseAvatar.vue +45 -0
- package/avatar/package.json +9 -0
- package/avatar/style/AvatarStyle.d.ts +3 -0
- package/avatar/style/package.json +6 -0
- package/avatargroup/AvatarGroup.d.ts +89 -0
- package/avatargroup/AvatarGroup.vue +14 -0
- package/avatargroup/BaseAvatarGroup.vue +15 -0
- package/avatargroup/package.json +9 -0
- package/avatargroup/style/AvatarGroupStyle.d.ts +3 -0
- package/avatargroup/style/package.json +6 -0
- package/badge/Badge.d.ts +125 -0
- package/badge/Badge.vue +14 -0
- package/badge/BaseBadge.vue +29 -0
- package/badge/package.json +9 -0
- package/badge/style/BadgeStyle.d.ts +3 -0
- package/badge/style/package.json +6 -0
- package/badgedirective/BadgeDirective.d.ts +158 -0
- package/badgedirective/package.json +6 -0
- package/badgedirective/style/BadgeDirectiveStyle.d.ts +3 -0
- package/badgedirective/style/package.json +6 -0
- package/base/package.json +5 -0
- package/base/style/BaseStyle.d.ts +10 -0
- package/base/style/package.json +6 -0
- package/basecomponent/BaseComponent.d.ts +23 -0
- package/basecomponent/BaseComponent.vue +218 -0
- package/basecomponent/package.json +9 -0
- package/basecomponent/style/BaseComponentStyle.d.ts +3 -0
- package/basecomponent/style/package.json +6 -0
- package/basedirective/BaseDirective.d.ts +38 -0
- package/basedirective/package.json +6 -0
- package/baseicon/BaseIcon.vue +43 -0
- package/baseicon/package.json +8 -0
- package/baseicon/style/BaseIconStyle.d.ts +3 -0
- package/baseicon/style/package.json +6 -0
- package/blockui/BaseBlockUI.vue +33 -0
- package/blockui/BlockUI.d.ts +161 -0
- package/blockui/BlockUI.vue +104 -0
- package/blockui/package.json +9 -0
- package/blockui/style/BlockUIStyle.d.ts +3 -0
- package/blockui/style/package.json +6 -0
- package/breadcrumb/BaseBreadcrumb.vue +29 -0
- package/breadcrumb/Breadcrumb.d.ts +232 -0
- package/breadcrumb/Breadcrumb.vue +35 -0
- package/breadcrumb/BreadcrumbItem.vue +99 -0
- package/breadcrumb/package.json +9 -0
- package/breadcrumb/style/BreadcrumbStyle.d.ts +3 -0
- package/breadcrumb/style/package.json +6 -0
- package/button/BaseButton.vue +81 -0
- package/button/Button.d.ts +248 -0
- package/button/Button.vue +58 -0
- package/button/package.json +9 -0
- package/button/style/ButtonStyle.d.ts +3 -0
- package/button/style/package.json +6 -0
- package/calendar/BaseCalendar.vue +231 -0
- package/calendar/Calendar.d.ts +888 -0
- package/calendar/Calendar.vue +2955 -0
- package/calendar/package.json +9 -0
- package/calendar/style/CalendarStyle.d.ts +3 -0
- package/calendar/style/package.json +6 -0
- package/card/BaseCard.vue +10 -0
- package/card/Card.d.ts +135 -0
- package/card/Card.vue +30 -0
- package/card/package.json +9 -0
- package/card/style/CardStyle.d.ts +3 -0
- package/card/style/package.json +6 -0
- package/carousel/BaseCarousel.vue +66 -0
- package/carousel/Carousel.d.ts +374 -0
- package/carousel/Carousel.vue +636 -0
- package/carousel/package.json +9 -0
- package/carousel/style/CarouselStyle.d.ts +3 -0
- package/carousel/style/package.json +6 -0
- package/cascadeselect/BaseCascadeSelect.vue +119 -0
- package/cascadeselect/CascadeSelect.d.ts +473 -0
- package/cascadeselect/CascadeSelect.vue +741 -0
- package/cascadeselect/CascadeSelectSub.vue +143 -0
- package/cascadeselect/package.json +9 -0
- package/cascadeselect/style/CascadeSelectStyle.d.ts +3 -0
- package/cascadeselect/style/package.json +6 -0
- package/chart/BaseChart.vue +33 -0
- package/chart/Chart.d.ts +195 -0
- package/chart/Chart.vue +96 -0
- package/chart/package.json +9 -0
- package/chart/style/ChartStyle.d.ts +3 -0
- package/chart/style/package.json +6 -0
- package/checkbox/BaseCheckbox.vue +72 -0
- package/checkbox/Checkbox.d.ts +271 -0
- package/checkbox/Checkbox.vue +90 -0
- package/checkbox/package.json +9 -0
- package/checkbox/style/CheckboxStyle.d.ts +3 -0
- package/checkbox/style/package.json +6 -0
- package/chip/BaseChip.vue +37 -0
- package/chip/Chip.d.ts +193 -0
- package/chip/Chip.vue +43 -0
- package/chip/package.json +9 -0
- package/chip/style/ChipStyle.d.ts +3 -0
- package/chip/style/package.json +6 -0
- package/chips/BaseChips.vue +73 -0
- package/chips/Chips.d.ts +286 -0
- package/chips/Chips.vue +256 -0
- package/chips/package.json +9 -0
- package/chips/style/ChipsStyle.d.ts +3 -0
- package/chips/style/package.json +6 -0
- package/colorpicker/BaseColorPicker.vue +54 -0
- package/colorpicker/ColorPicker.d.ts +240 -0
- package/colorpicker/ColorPicker.vue +649 -0
- package/colorpicker/package.json +9 -0
- package/colorpicker/style/ColorPickerStyle.d.ts +3 -0
- package/colorpicker/style/package.json +6 -0
- package/column/BaseColumn.vue +193 -0
- package/column/Column.d.ts +999 -0
- package/column/Column.vue +11 -0
- package/column/package.json +9 -0
- package/column/style/ColumnStyle.d.ts +3 -0
- package/column/style/package.json +6 -0
- package/columngroup/BaseColumnGroup.vue +21 -0
- package/columngroup/ColumnGroup.d.ts +133 -0
- package/columngroup/ColumnGroup.vue +11 -0
- package/columngroup/package.json +9 -0
- package/columngroup/style/ColumnGroupStyle.d.ts +3 -0
- package/columngroup/style/package.json +6 -0
- package/config/PrimeVue.d.ts +376 -0
- package/config/package.json +6 -0
- package/confirmationeventbus/package.json +5 -0
- package/confirmationoptions/ConfirmationOptions.d.ts +84 -0
- package/confirmationoptions/package.json +3 -0
- package/confirmationservice/ConfirmationService.d.ts +40 -0
- package/confirmationservice/package.json +6 -0
- package/confirmdialog/BaseConfirmDialog.vue +26 -0
- package/confirmdialog/ConfirmDialog.d.ts +262 -0
- package/confirmdialog/ConfirmDialog.vue +162 -0
- package/confirmdialog/package.json +9 -0
- package/confirmdialog/style/ConfirmDialogStyle.d.ts +3 -0
- package/confirmdialog/style/package.json +6 -0
- package/confirmpopup/BaseConfirmPopup.vue +18 -0
- package/confirmpopup/ConfirmPopup.d.ts +212 -0
- package/confirmpopup/ConfirmPopup.vue +321 -0
- package/confirmpopup/package.json +9 -0
- package/confirmpopup/style/ConfirmPopupStyle.d.ts +3 -0
- package/confirmpopup/style/package.json +6 -0
- package/contextmenu/BaseContextMenu.vue +53 -0
- package/contextmenu/ContextMenu.d.ts +398 -0
- package/contextmenu/ContextMenu.vue +594 -0
- package/contextmenu/ContextMenuSub.vue +242 -0
- package/contextmenu/package.json +9 -0
- package/contextmenu/style/ContextMenuStyle.d.ts +3 -0
- package/contextmenu/style/package.json +6 -0
- package/datatable/BaseDataTable.vue +281 -0
- package/datatable/BodyCell.vue +538 -0
- package/datatable/ColumnFilter.vue +720 -0
- package/datatable/DataTable.d.ts +1499 -0
- package/datatable/DataTable.vue +2105 -0
- package/datatable/FooterCell.vue +103 -0
- package/datatable/HeaderCell.vue +365 -0
- package/datatable/HeaderCheckbox.vue +94 -0
- package/datatable/RowCheckbox.vue +114 -0
- package/datatable/RowRadioButton.vue +79 -0
- package/datatable/TableBody.vue +639 -0
- package/datatable/TableFooter.vue +136 -0
- package/datatable/TableHeader.vue +336 -0
- package/datatable/package.json +9 -0
- package/datatable/style/DataTableStyle.d.ts +3 -0
- package/datatable/style/package.json +6 -0
- package/dataview/BaseDataView.vue +81 -0
- package/dataview/DataView.d.ts +337 -0
- package/dataview/DataView.vue +170 -0
- package/dataview/package.json +9 -0
- package/dataview/style/DataViewStyle.d.ts +3 -0
- package/dataview/style/package.json +6 -0
- package/dataviewlayoutoptions/BaseDataViewLayoutOptions.vue +18 -0
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +169 -0
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +57 -0
- package/dataviewlayoutoptions/package.json +9 -0
- package/dataviewlayoutoptions/style/DataViewLayoutOptionsStyle.d.ts +3 -0
- package/dataviewlayoutoptions/style/package.json +6 -0
- package/deferredcontent/DeferredContent.d.ts +133 -0
- package/deferredcontent/DeferredContent.vue +64 -0
- package/deferredcontent/package.json +9 -0
- package/deferredcontent/style/DeferredContentStyle.d.ts +3 -0
- package/deferredcontent/style/package.json +6 -0
- package/dialog/BaseDialog.vue +126 -0
- package/dialog/Dialog.d.ts +409 -0
- package/dialog/Dialog.vue +406 -0
- package/dialog/package.json +9 -0
- package/dialog/style/DialogStyle.d.ts +3 -0
- package/dialog/style/package.json +6 -0
- package/dialogservice/DialogService.d.ts +38 -0
- package/dialogservice/package.json +6 -0
- package/divider/BaseDivider.vue +29 -0
- package/divider/Divider.d.ts +129 -0
- package/divider/Divider.vue +16 -0
- package/divider/package.json +9 -0
- package/divider/style/DividerStyle.d.ts +3 -0
- package/divider/style/package.json +6 -0
- package/dock/BaseDock.vue +45 -0
- package/dock/Dock.d.ts +306 -0
- package/dock/Dock.vue +40 -0
- package/dock/DockSub.vue +309 -0
- package/dock/package.json +9 -0
- package/dock/style/DockStyle.d.ts +3 -0
- package/dock/style/package.json +6 -0
- package/dropdown/BaseDropdown.vue +165 -0
- package/dropdown/Dropdown.d.ts +711 -0
- package/dropdown/Dropdown.vue +929 -0
- package/dropdown/package.json +9 -0
- package/dropdown/style/DropdownStyle.d.ts +3 -0
- package/dropdown/style/package.json +6 -0
- package/dynamicdialog/BaseDynamicDialog.vue +16 -0
- package/dynamicdialog/DynamicDialog.d.ts +52 -0
- package/dynamicdialog/DynamicDialog.vue +77 -0
- package/dynamicdialog/package.json +9 -0
- package/dynamicdialog/style/AccordionStyle.d.ts +3 -0
- package/dynamicdialog/style/package.json +6 -0
- package/dynamicdialogeventbus/package.json +5 -0
- package/dynamicdialogoptions/DynamicDialogOptions.d.ts +93 -0
- package/dynamicdialogoptions/package.json +3 -0
- package/editor/BaseEditor.vue +26 -0
- package/editor/Editor.d.ts +306 -0
- package/editor/Editor.vue +171 -0
- package/editor/package.json +9 -0
- package/editor/style/EditorStyle.d.ts +3 -0
- package/editor/style/package.json +6 -0
- package/fieldset/BaseFieldset.vue +24 -0
- package/fieldset/Fieldset.d.ts +212 -0
- package/fieldset/Fieldset.vue +91 -0
- package/fieldset/package.json +9 -0
- package/fieldset/style/FieldsetStyle.d.ts +3 -0
- package/fieldset/style/package.json +6 -0
- package/fileupload/BaseFileUpload.vue +111 -0
- package/fileupload/FileContent.vue +75 -0
- package/fileupload/FileUpload.d.ts +609 -0
- package/fileupload/FileUpload.vue +415 -0
- package/fileupload/package.json +9 -0
- package/fileupload/style/FileUploadStyle.d.ts +3 -0
- package/fileupload/style/package.json +6 -0
- package/focustrap/FocusTrap.d.ts +95 -0
- package/focustrap/package.json +6 -0
- package/focustrap/style/FocusTrapStyle.d.ts +3 -0
- package/focustrap/style/package.json +6 -0
- package/galleria/BaseGalleria.vue +125 -0
- package/galleria/Galleria.d.ts +519 -0
- package/galleria/Galleria.vue +95 -0
- package/galleria/GalleriaContent.vue +153 -0
- package/galleria/GalleriaItem.vue +201 -0
- package/galleria/GalleriaThumbnails.vue +537 -0
- package/galleria/package.json +9 -0
- package/galleria/style/GalleriaStyle.d.ts +3 -0
- package/galleria/style/package.json +6 -0
- package/icons/angledoubledown/index.d.ts +12 -0
- package/icons/angledoubledown/index.vue +18 -0
- package/icons/angledoubledown/package.json +9 -0
- package/icons/angledoubleleft/index.d.ts +12 -0
- package/icons/angledoubleleft/index.vue +18 -0
- package/icons/angledoubleleft/package.json +9 -0
- package/icons/angledoubleright/index.d.ts +12 -0
- package/icons/angledoubleright/index.vue +18 -0
- package/icons/angledoubleright/package.json +9 -0
- package/icons/angledoubleup/index.d.ts +12 -0
- package/icons/angledoubleup/index.vue +18 -0
- package/icons/angledoubleup/package.json +9 -0
- package/icons/angledown/index.d.ts +12 -0
- package/icons/angledown/index.vue +16 -0
- package/icons/angledown/package.json +9 -0
- package/icons/angleleft/index.d.ts +12 -0
- package/icons/angleleft/index.vue +16 -0
- package/icons/angleleft/package.json +9 -0
- package/icons/angleright/index.d.ts +12 -0
- package/icons/angleright/index.vue +16 -0
- package/icons/angleright/package.json +9 -0
- package/icons/angleup/index.d.ts +12 -0
- package/icons/angleup/index.vue +16 -0
- package/icons/angleup/package.json +9 -0
- package/icons/arrowdown/index.d.ts +12 -0
- package/icons/arrowdown/index.vue +32 -0
- package/icons/arrowdown/package.json +9 -0
- package/icons/arrowup/index.d.ts +12 -0
- package/icons/arrowup/index.vue +32 -0
- package/icons/arrowup/package.json +9 -0
- package/icons/ban/index.d.ts +12 -0
- package/icons/ban/index.vue +30 -0
- package/icons/ban/package.json +9 -0
- package/icons/bars/index.d.ts +12 -0
- package/icons/bars/index.vue +18 -0
- package/icons/bars/package.json +9 -0
- package/icons/calendar/index.d.ts +12 -0
- package/icons/calendar/index.vue +16 -0
- package/icons/calendar/package.json +9 -0
- package/icons/check/index.d.ts +12 -0
- package/icons/check/index.vue +16 -0
- package/icons/check/package.json +9 -0
- package/icons/chevrondown/index.d.ts +12 -0
- package/icons/chevrondown/index.vue +16 -0
- package/icons/chevrondown/package.json +9 -0
- package/icons/chevronleft/index.d.ts +12 -0
- package/icons/chevronleft/index.vue +16 -0
- package/icons/chevronleft/package.json +9 -0
- package/icons/chevronright/index.d.ts +12 -0
- package/icons/chevronright/index.vue +16 -0
- package/icons/chevronright/package.json +9 -0
- package/icons/chevronup/index.d.ts +12 -0
- package/icons/chevronup/index.vue +16 -0
- package/icons/chevronup/package.json +9 -0
- package/icons/exclamationtriangle/index.d.ts +12 -0
- package/icons/exclamationtriangle/index.vue +38 -0
- package/icons/exclamationtriangle/package.json +9 -0
- package/icons/eye/index.d.ts +12 -0
- package/icons/eye/index.vue +18 -0
- package/icons/eye/package.json +9 -0
- package/icons/eyeslash/index.d.ts +12 -0
- package/icons/eyeslash/index.vue +32 -0
- package/icons/eyeslash/package.json +9 -0
- package/icons/filter/index.d.ts +12 -0
- package/icons/filter/index.vue +30 -0
- package/icons/filter/package.json +9 -0
- package/icons/filterslash/index.d.ts +12 -0
- package/icons/filterslash/index.vue +32 -0
- package/icons/filterslash/package.json +9 -0
- package/icons/index.d.ts +12 -0
- package/icons/infocircle/index.d.ts +12 -0
- package/icons/infocircle/index.vue +32 -0
- package/icons/infocircle/package.json +9 -0
- package/icons/minus/index.d.ts +12 -0
- package/icons/minus/index.vue +16 -0
- package/icons/minus/package.json +9 -0
- package/icons/pencil/index.d.ts +12 -0
- package/icons/pencil/index.vue +30 -0
- package/icons/pencil/package.json +9 -0
- package/icons/plus/index.d.ts +12 -0
- package/icons/plus/index.vue +30 -0
- package/icons/plus/package.json +9 -0
- package/icons/refresh/index.d.ts +12 -0
- package/icons/refresh/index.vue +32 -0
- package/icons/refresh/package.json +9 -0
- package/icons/search/index.d.ts +12 -0
- package/icons/search/index.vue +32 -0
- package/icons/search/package.json +9 -0
- package/icons/searchminus/index.d.ts +12 -0
- package/icons/searchminus/index.vue +32 -0
- package/icons/searchminus/package.json +9 -0
- package/icons/searchplus/index.d.ts +12 -0
- package/icons/searchplus/index.vue +32 -0
- package/icons/searchplus/package.json +9 -0
- package/icons/sortalt/index.d.ts +12 -0
- package/icons/sortalt/index.vue +36 -0
- package/icons/sortalt/package.json +9 -0
- package/icons/sortamountdown/index.d.ts +12 -0
- package/icons/sortamountdown/index.vue +50 -0
- package/icons/sortamountdown/package.json +9 -0
- package/icons/sortamountupalt/index.d.ts +12 -0
- package/icons/sortamountupalt/index.vue +50 -0
- package/icons/sortamountupalt/package.json +9 -0
- package/icons/spinner/index.d.ts +12 -0
- package/icons/spinner/index.vue +30 -0
- package/icons/spinner/package.json +9 -0
- package/icons/star/index.d.ts +12 -0
- package/icons/star/index.vue +30 -0
- package/icons/star/package.json +9 -0
- package/icons/starfill/index.d.ts +12 -0
- package/icons/starfill/index.vue +30 -0
- package/icons/starfill/package.json +9 -0
- package/icons/thlarge/index.d.ts +12 -0
- package/icons/thlarge/index.vue +32 -0
- package/icons/thlarge/package.json +9 -0
- package/icons/times/index.d.ts +12 -0
- package/icons/times/index.vue +16 -0
- package/icons/times/package.json +9 -0
- package/icons/timescircle/index.d.ts +12 -0
- package/icons/timescircle/index.vue +32 -0
- package/icons/timescircle/package.json +9 -0
- package/icons/trash/index.d.ts +12 -0
- package/icons/trash/index.vue +32 -0
- package/icons/trash/package.json +9 -0
- package/icons/undo/index.d.ts +12 -0
- package/icons/undo/index.vue +32 -0
- package/icons/undo/package.json +9 -0
- package/icons/upload/index.d.ts +12 -0
- package/icons/upload/index.vue +32 -0
- package/icons/upload/package.json +9 -0
- package/icons/windowmaximize/index.d.ts +12 -0
- package/icons/windowmaximize/index.vue +32 -0
- package/icons/windowmaximize/package.json +9 -0
- package/icons/windowminimize/index.d.ts +12 -0
- package/icons/windowminimize/index.vue +32 -0
- package/icons/windowminimize/package.json +9 -0
- package/image/BaseImage.vue +53 -0
- package/image/Image.d.ts +318 -0
- package/image/Image.vue +232 -0
- package/image/package.json +9 -0
- package/image/style/ImageStyle.d.ts +3 -0
- package/image/style/package.json +6 -0
- package/inlinemessage/BaseInlineMessage.vue +25 -0
- package/inlinemessage/InlineMessage.d.ts +147 -0
- package/inlinemessage/InlineMessage.vue +46 -0
- package/inlinemessage/package.json +9 -0
- package/inlinemessage/style/InlineMessageStyle.d.ts +3 -0
- package/inlinemessage/style/package.json +6 -0
- package/inplace/BaseInplace.vue +41 -0
- package/inplace/Inplace.d.ts +195 -0
- package/inplace/Inplace.vue +71 -0
- package/inplace/package.json +9 -0
- package/inplace/style/InplaceStyle.d.ts +3 -0
- package/inplace/style/package.json +6 -0
- package/inputmask/BaseInputMask.vue +33 -0
- package/inputmask/InputMask.d.ts +186 -0
- package/inputmask/InputMask.vue +512 -0
- package/inputmask/package.json +9 -0
- package/inputmask/style/InputMaskStyle.d.ts +3 -0
- package/inputmask/style/package.json +6 -0
- package/inputnumber/BaseInputNumber.vue +153 -0
- package/inputnumber/InputNumber.d.ts +369 -0
- package/inputnumber/InputNumber.vue +1004 -0
- package/inputnumber/package.json +9 -0
- package/inputnumber/style/InputNumberStyle.d.ts +3 -0
- package/inputnumber/style/package.json +6 -0
- package/inputswitch/BaseInputSwitch.vue +57 -0
- package/inputswitch/InputSwitch.d.ts +198 -0
- package/inputswitch/InputSwitch.vue +64 -0
- package/inputswitch/package.json +9 -0
- package/inputswitch/style/InputSwitchStyle.d.ts +3 -0
- package/inputswitch/style/package.json +6 -0
- package/inputtext/BaseInputText.vue +22 -0
- package/inputtext/InputText.d.ts +142 -0
- package/inputtext/InputText.vue +31 -0
- package/inputtext/package.json +9 -0
- package/inputtext/style/InputTextStyle.d.ts +3 -0
- package/inputtext/style/package.json +6 -0
- package/knob/BaseKnob.vue +81 -0
- package/knob/Knob.d.ts +243 -0
- package/knob/Knob.vue +219 -0
- package/knob/package.json +9 -0
- package/knob/style/KnobStyle.d.ts +3 -0
- package/knob/style/package.json +6 -0
- package/listbox/BaseListbox.vue +89 -0
- package/listbox/Listbox.d.ts +521 -0
- package/listbox/Listbox.vue +717 -0
- package/listbox/package.json +9 -0
- package/listbox/style/ListboxStyle.d.ts +3 -0
- package/listbox/style/package.json +6 -0
- package/megamenu/BaseMegaMenu.vue +45 -0
- package/megamenu/MegaMenu.d.ts +373 -0
- package/megamenu/MegaMenu.vue +590 -0
- package/megamenu/MegaMenuSub.vue +236 -0
- package/megamenu/package.json +9 -0
- package/megamenu/style/MegaMenuStyle.d.ts +3 -0
- package/megamenu/style/package.json +6 -0
- package/menu/BaseMenu.vue +53 -0
- package/menu/Menu.d.ts +359 -0
- package/menu/Menu.vue +373 -0
- package/menu/Menuitem.vue +118 -0
- package/menu/package.json +9 -0
- package/menu/style/MenuStyle.d.ts +3 -0
- package/menu/style/package.json +6 -0
- package/menubar/BaseMenubar.vue +37 -0
- package/menubar/Menubar.d.ts +361 -0
- package/menubar/Menubar.vue +599 -0
- package/menubar/MenubarSub.vue +224 -0
- package/menubar/package.json +9 -0
- package/menubar/style/MenubarStyle.d.ts +3 -0
- package/menubar/style/package.json +6 -0
- package/menuitem/MenuItem.d.ts +95 -0
- package/menuitem/package.json +3 -0
- package/message/BaseMessage.vue +45 -0
- package/message/Message.d.ts +234 -0
- package/message/Message.vue +89 -0
- package/message/package.json +9 -0
- package/message/style/MessageStyle.d.ts +3 -0
- package/message/style/package.json +6 -0
- package/multiselect/BaseMultiSelect.vue +174 -0
- package/multiselect/MultiSelect.d.ts +852 -0
- package/multiselect/MultiSelect.vue +1072 -0
- package/multiselect/package.json +9 -0
- package/multiselect/style/MultiSelectStyle.d.ts +3 -0
- package/multiselect/style/package.json +6 -0
- package/orderlist/BaseOrderList.vue +81 -0
- package/orderlist/OrderList.d.ts +366 -0
- package/orderlist/OrderList.vue +561 -0
- package/orderlist/package.json +9 -0
- package/orderlist/style/OrderListStyle.d.ts +3 -0
- package/orderlist/style/package.json +6 -0
- package/organizationchart/BaseOrganizationChart.vue +37 -0
- package/organizationchart/OrganizationChart.d.ts +342 -0
- package/organizationchart/OrganizationChart.vue +77 -0
- package/organizationchart/OrganizationChartNode.vue +164 -0
- package/organizationchart/package.json +9 -0
- package/organizationchart/style/OrganizationChartStyle.d.ts +3 -0
- package/organizationchart/style/package.json +6 -0
- package/overlayeventbus/package.json +5 -0
- package/overlaypanel/BaseOverlayPanel.vue +49 -0
- package/overlaypanel/OverlayPanel.d.ts +258 -0
- package/overlaypanel/OverlayPanel.vue +322 -0
- package/overlaypanel/package.json +9 -0
- package/overlaypanel/style/OverlayPanelStyle.d.ts +3 -0
- package/overlaypanel/style/package.json +6 -0
- package/package.json +1 -1
- package/paginator/BasePaginator.vue +49 -0
- package/paginator/CurrentPageReport.vue +56 -0
- package/paginator/FirstPageLink.vue +38 -0
- package/paginator/JumpToPageDropdown.vue +56 -0
- package/paginator/JumpToPageInput.vue +57 -0
- package/paginator/LastPageLink.vue +38 -0
- package/paginator/NextPageLink.vue +38 -0
- package/paginator/PageLinks.vue +56 -0
- package/paginator/Paginator.d.ts +367 -0
- package/paginator/Paginator.vue +303 -0
- package/paginator/PrevPageLink.vue +38 -0
- package/paginator/RowsPerPageDropdown.vue +58 -0
- package/paginator/package.json +9 -0
- package/paginator/style/PaginatorStyle.d.ts +3 -0
- package/paginator/style/package.json +6 -0
- package/panel/BasePanel.vue +24 -0
- package/panel/Panel.d.ts +244 -0
- package/panel/Panel.vue +95 -0
- package/panel/package.json +9 -0
- package/panel/style/PanelStyle.d.ts +3 -0
- package/panel/style/package.json +6 -0
- package/panelmenu/BasePanelMenu.vue +33 -0
- package/panelmenu/PanelMenu.d.ts +392 -0
- package/panelmenu/PanelMenu.vue +277 -0
- package/panelmenu/PanelMenuList.vue +397 -0
- package/panelmenu/PanelMenuSub.vue +213 -0
- package/panelmenu/package.json +9 -0
- package/panelmenu/style/PanelMenuStyle.d.ts +3 -0
- package/panelmenu/style/package.json +6 -0
- package/passthrough/index.d.ts +6 -0
- package/passthrough/package.json +6 -0
- package/passthrough/tailwind/index.d.ts +4 -0
- package/passthrough/tailwind/package.json +6 -0
- package/password/BasePassword.vue +114 -0
- package/password/Password.d.ts +346 -0
- package/password/Password.vue +301 -0
- package/password/package.json +9 -0
- package/password/style/PasswordStyle.d.ts +3 -0
- package/password/style/package.json +6 -0
- package/picklist/BasePickList.vue +101 -0
- package/picklist/PickList.d.ts +583 -0
- package/picklist/PickList.vue +892 -0
- package/picklist/package.json +9 -0
- package/picklist/style/PickListStyle.d.ts +3 -0
- package/picklist/style/package.json +6 -0
- package/portal/Portal.d.ts +37 -0
- package/portal/Portal.vue +41 -0
- package/portal/package.json +9 -0
- package/portal/style/PortalStyle.d.ts +3 -0
- package/portal/style/package.json +6 -0
- package/progressbar/BaseProgressBar.vue +29 -0
- package/progressbar/ProgressBar.d.ts +135 -0
- package/progressbar/ProgressBar.vue +35 -0
- package/progressbar/package.json +9 -0
- package/progressbar/style/ProgressBarStyle.d.ts +3 -0
- package/progressbar/style/package.json +6 -0
- package/progressspinner/BaseProgressSpinner.vue +29 -0
- package/progressspinner/ProgressSpinner.d.ts +129 -0
- package/progressspinner/ProgressSpinner.vue +23 -0
- package/progressspinner/package.json +9 -0
- package/progressspinner/style/ProgressSpinnerStyle.d.ts +3 -0
- package/progressspinner/style/package.json +6 -0
- package/radiobutton/BaseRadioButton.vue +51 -0
- package/radiobutton/RadioButton.d.ts +194 -0
- package/radiobutton/RadioButton.vue +52 -0
- package/radiobutton/package.json +9 -0
- package/radiobutton/style/RadioButtonStyle.d.ts +3 -0
- package/radiobutton/style/package.json +6 -0
- package/rating/BaseRating.vue +49 -0
- package/rating/Rating.d.ts +300 -0
- package/rating/Rating.vue +128 -0
- package/rating/package.json +9 -0
- package/rating/style/RatingStyle.d.ts +3 -0
- package/rating/style/package.json +6 -0
- package/ripple/Ripple.d.ts +82 -0
- package/ripple/package.json +6 -0
- package/ripple/style/RippleStyle.d.ts +3 -0
- package/ripple/style/package.json +6 -0
- package/row/Row.d.ts +113 -0
- package/row/Row.vue +11 -0
- package/row/package.json +9 -0
- package/row/style/RowStyle.d.ts +3 -0
- package/row/style/package.json +6 -0
- package/scrollpanel/BaseScrollPanel.vue +21 -0
- package/scrollpanel/ScrollPanel.d.ts +161 -0
- package/scrollpanel/ScrollPanel.vue +362 -0
- package/scrollpanel/package.json +9 -0
- package/scrollpanel/style/ScrollPanelStyle.d.ts +3 -0
- package/scrollpanel/style/package.json +6 -0
- package/scrolltop/BaseScrollTop.vue +33 -0
- package/scrolltop/ScrollTop.d.ts +158 -0
- package/scrolltop/ScrollTop.vue +97 -0
- package/scrolltop/package.json +9 -0
- package/scrolltop/style/ScrollTopStyle.d.ts +3 -0
- package/scrolltop/style/package.json +6 -0
- package/selectbutton/BaseSelectButton.vue +37 -0
- package/selectbutton/SelectButton.d.ts +253 -0
- package/selectbutton/SelectButton.vue +188 -0
- package/selectbutton/package.json +9 -0
- package/selectbutton/style/SelectButtonStyle.d.ts +3 -0
- package/selectbutton/style/package.json +6 -0
- package/sidebar/BaseSidebar.vue +53 -0
- package/sidebar/Sidebar.d.ts +241 -0
- package/sidebar/Sidebar.vue +195 -0
- package/sidebar/package.json +9 -0
- package/sidebar/style/SidebarStyle.d.ts +3 -0
- package/sidebar/style/package.json +6 -0
- package/skeleton/BaseSkeleton.vue +41 -0
- package/skeleton/Skeleton.d.ts +135 -0
- package/skeleton/Skeleton.vue +18 -0
- package/skeleton/package.json +9 -0
- package/skeleton/style/SkeletonStyle.d.ts +3 -0
- package/skeleton/style/package.json +6 -0
- package/slider/BaseSlider.vue +54 -0
- package/slider/Slider.d.ts +201 -0
- package/slider/Slider.vue +325 -0
- package/slider/package.json +9 -0
- package/slider/style/SliderStyle.d.ts +3 -0
- package/slider/style/package.json +6 -0
- package/speeddial/BaseSpeedDial.vue +76 -0
- package/speeddial/SpeedDial.d.ts +364 -0
- package/speeddial/SpeedDial.vue +466 -0
- package/speeddial/package.json +9 -0
- package/speeddial/style/SpeedDialStyle.d.ts +3 -0
- package/speeddial/style/package.json +6 -0
- package/splitbutton/BaseSplitButton.vue +93 -0
- package/splitbutton/SplitButton.d.ts +274 -0
- package/splitbutton/SplitButton.vue +118 -0
- package/splitbutton/package.json +9 -0
- package/splitbutton/style/SplitButtonStyle.d.ts +3 -0
- package/splitbutton/style/package.json +6 -0
- package/splitter/BaseSplitter.vue +37 -0
- package/splitter/Splitter.d.ts +235 -0
- package/splitter/Splitter.vue +381 -0
- package/splitter/package.json +9 -0
- package/splitter/style/SplitterStyle.d.ts +3 -0
- package/splitter/style/package.json +6 -0
- package/splitterpanel/BaseSplitterPanel.vue +25 -0
- package/splitterpanel/SplitterPanel.d.ts +133 -0
- package/splitterpanel/SplitterPanel.vue +28 -0
- package/splitterpanel/package.json +9 -0
- package/splitterpanel/style/SplitterPanelStyle.d.ts +3 -0
- package/splitterpanel/style/package.json +6 -0
- package/steps/BaseSteps.vue +32 -0
- package/steps/Steps.d.ts +217 -0
- package/steps/Steps.vue +208 -0
- package/steps/package.json +9 -0
- package/steps/style/StepsStyle.d.ts +3 -0
- package/steps/style/package.json +6 -0
- package/styleclass/StyleClass.d.ts +100 -0
- package/styleclass/package.json +6 -0
- package/styleclass/style/StyleClassStyle.d.ts +3 -0
- package/styleclass/style/package.json +6 -0
- package/tabmenu/BaseTabMenu.vue +37 -0
- package/tabmenu/TabMenu.d.ts +261 -0
- package/tabmenu/TabMenu.vue +303 -0
- package/tabmenu/package.json +9 -0
- package/tabmenu/style/TabMenuStyle.d.ts +3 -0
- package/tabmenu/style/package.json +6 -0
- package/tabpanel/BaseTabPanel.vue +21 -0
- package/tabpanel/TabPanel.d.ts +198 -0
- package/tabpanel/TabPanel.vue +12 -0
- package/tabpanel/package.json +9 -0
- package/tabpanel/style/TabPanelStyle.d.ts +3 -0
- package/tabpanel/style/package.json +6 -0
- package/tabview/BaseTabView.vue +53 -0
- package/tabview/TabView.d.ts +257 -0
- package/tabview/TabView.vue +372 -0
- package/tabview/package.json +9 -0
- package/tabview/style/TabViewStyle.d.ts +3 -0
- package/tabview/style/package.json +6 -0
- package/tag/BaseTag.vue +21 -0
- package/tag/Tag.d.ts +143 -0
- package/tag/Tag.vue +18 -0
- package/tag/package.json +9 -0
- package/tag/style/TagStyle.d.ts +3 -0
- package/tag/style/package.json +6 -0
- package/terminal/BaseTerminal.vue +25 -0
- package/terminal/Terminal.d.ts +165 -0
- package/terminal/Terminal.vue +57 -0
- package/terminal/package.json +9 -0
- package/terminal/style/TerminalStyle.d.ts +3 -0
- package/terminal/style/package.json +6 -0
- package/terminalservice/TerminalService.d.ts +30 -0
- package/terminalservice/package.json +6 -0
- package/textarea/BaseTextarea.vue +19 -0
- package/textarea/Textarea.d.ts +145 -0
- package/textarea/Textarea.vue +55 -0
- package/textarea/package.json +9 -0
- package/textarea/style/TextareaStyle.d.ts +3 -0
- package/textarea/style/package.json +6 -0
- package/tieredmenu/BaseTieredMenu.vue +57 -0
- package/tieredmenu/TieredMenu.d.ts +400 -0
- package/tieredmenu/TieredMenu.vue +608 -0
- package/tieredmenu/TieredMenuSub.vue +212 -0
- package/tieredmenu/package.json +9 -0
- package/tieredmenu/style/TieredMenuStyle.d.ts +3 -0
- package/tieredmenu/style/package.json +6 -0
- package/timeline/BaseTimeline.vue +27 -0
- package/timeline/Timeline.d.ts +219 -0
- package/timeline/Timeline.vue +43 -0
- package/timeline/package.json +9 -0
- package/timeline/style/TimelineStyle.d.ts +3 -0
- package/timeline/style/package.json +6 -0
- package/toast/BaseToast.vue +61 -0
- package/toast/Toast.d.ts +349 -0
- package/toast/Toast.vue +162 -0
- package/toast/ToastMessage.vue +120 -0
- package/toast/package.json +9 -0
- package/toast/style/ToastStyle.d.ts +3 -0
- package/toast/style/package.json +6 -0
- package/toasteventbus/package.json +5 -0
- package/toastservice/ToastService.d.ts +52 -0
- package/toastservice/package.json +6 -0
- package/togglebutton/BaseToggleButton.vue +64 -0
- package/togglebutton/ToggleButton.d.ts +263 -0
- package/togglebutton/ToggleButton.vue +105 -0
- package/togglebutton/package.json +9 -0
- package/togglebutton/style/ToggleButtonStyle.d.ts +3 -0
- package/togglebutton/style/package.json +6 -0
- package/toolbar/BaseToolbar.vue +21 -0
- package/toolbar/Toolbar.d.ts +139 -0
- package/toolbar/Toolbar.vue +22 -0
- package/toolbar/package.json +9 -0
- package/toolbar/style/ToolbarStyle.d.ts +3 -0
- package/toolbar/style/package.json +6 -0
- package/tooltip/Tooltip.d.ts +202 -0
- package/tooltip/package.json +6 -0
- package/tooltip/style/TooltipStyle.d.ts +3 -0
- package/tooltip/style/package.json +6 -0
- package/tree/BaseTree.vue +81 -0
- package/tree/Tree.d.ts +469 -0
- package/tree/Tree.vue +244 -0
- package/tree/TreeNode.vue +444 -0
- package/tree/package.json +9 -0
- package/tree/style/TreeStyle.d.ts +3 -0
- package/tree/style/package.json +6 -0
- package/treeselect/BaseTreeSelect.vue +87 -0
- package/treeselect/TreeSelect.d.ts +417 -0
- package/treeselect/TreeSelect.vue +441 -0
- package/treeselect/package.json +9 -0
- package/treeselect/style/TreeSelectStyle.d.ts +3 -0
- package/treeselect/style/package.json +6 -0
- package/treetable/BaseTreeTable.vue +173 -0
- package/treetable/BodyCell.vue +217 -0
- package/treetable/FooterCell.vue +103 -0
- package/treetable/HeaderCell.vue +238 -0
- package/treetable/TreeTable.d.ts +786 -0
- package/treetable/TreeTable.vue +853 -0
- package/treetable/TreeTableRow.vue +431 -0
- package/treetable/package.json +9 -0
- package/treetable/style/TreeTableStyle.d.ts +3 -0
- package/treetable/style/package.json +6 -0
- package/tristatecheckbox/BaseTriStateCheckbox.vue +42 -0
- package/tristatecheckbox/TriStateCheckbox.d.ts +244 -0
- package/tristatecheckbox/TriStateCheckbox.vue +111 -0
- package/tristatecheckbox/package.json +9 -0
- package/tristatecheckbox/style/TriStateCheckboxStyle.d.ts +3 -0
- package/tristatecheckbox/style/package.json +6 -0
- package/ts-helpers.d.ts +38 -0
- package/useconfirm/UseConfirm.d.ts +6 -0
- package/useconfirm/package.json +6 -0
- package/usedialog/UseDialog.d.ts +5 -0
- package/usedialog/package.json +6 -0
- package/usestyle/UseStyle.d.ts +21 -0
- package/usestyle/package.json +6 -0
- package/usetoast/UseToast.d.ts +3 -0
- package/usetoast/package.json +6 -0
- package/utils/Utils.d.ts +114 -0
- package/utils/package.json +6 -0
- package/virtualscroller/BaseVirtualScroller.vue +100 -0
- package/virtualscroller/VirtualScroller.d.ts +520 -0
- package/virtualscroller/VirtualScroller.vue +673 -0
- package/virtualscroller/package.json +9 -0
- package/virtualscroller/style/VirtualScrollerStyle.d.ts +3 -0
- package/virtualscroller/style/package.json +6 -0
- package/web-types.json +1 -1
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018-2023 PrimeTek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
[](https://opensource.org/licenses/MIT)
|
|
2
|
+
[](https://badge.fury.io/js/primevue)
|
|
3
|
+
[](https://discord.gg/gzKFYnpmCY)
|
|
4
|
+
[](https://github.com/orgs/primefaces/discussions)
|
|
5
|
+
|
|
6
|
+
[](https://primevue.org/)
|
|
7
|
+
|
|
8
|
+
# PrimeVue
|
|
9
|
+
|
|
10
|
+
PrimeVue is a rich set of open source UI Components for Vue. See [PrimeVue homepage](https://primevue.org/) for live showcase and documentation.
|
|
11
|
+
|
|
12
|
+
## Download
|
|
13
|
+
|
|
14
|
+
PrimeVue is available at [npm](https://www.npmjs.com/package/primevue).
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
# Using npm
|
|
18
|
+
npm install primevue
|
|
19
|
+
|
|
20
|
+
# Using yarn
|
|
21
|
+
yarn add primevue
|
|
22
|
+
|
|
23
|
+
# Using pnpm
|
|
24
|
+
pnpm add primevue
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Plugin
|
|
28
|
+
|
|
29
|
+
PrimeVue plugin is required to be installed with the **use** function to set up the default [configuration](https://primevue.org/theming).
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
import { createApp } from 'vue';
|
|
33
|
+
import PrimeVue from 'primevue/config';
|
|
34
|
+
const app = createApp(App);
|
|
35
|
+
|
|
36
|
+
app.use(PrimeVue);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Theming
|
|
40
|
+
|
|
41
|
+
PrimeVue has two theming has modes; styled or unstyled.
|
|
42
|
+
|
|
43
|
+
**Styled Mode**
|
|
44
|
+
|
|
45
|
+
Styled mode is based on pre-skinned components with opinionated themes like Material, Bootstrap or PrimeOne themes. Theme is the required css file to be imported, visit the [Themes](https://primevue.org/theming) section for the complete list of available themes to choose from.
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
// theme
|
|
49
|
+
import 'primevue/resources/themes/lara-light-teal/theme.css';
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Unstyled Mode**
|
|
53
|
+
|
|
54
|
+
Unstyled mode is disabled by default for all components. Using the PrimeVue plugin during installation, set `unstyled` as true to enable it globally. Visit the [Unstyled mode](https://primevue.org/unstyled) documentation for more information and examples.
|
|
55
|
+
|
|
56
|
+
```javascript
|
|
57
|
+
import { createApp } from 'vue';
|
|
58
|
+
import PrimeVue from 'primevue/config';
|
|
59
|
+
const app = createApp(App);
|
|
60
|
+
|
|
61
|
+
app.use(PrimeVue, { unstyled: true });
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Usage
|
|
65
|
+
|
|
66
|
+
Each component can be imported individually so that you only bundle what you use. Import path is available in the documentation of the corresponding component.
|
|
67
|
+
|
|
68
|
+
```javascript
|
|
69
|
+
import Button from 'primevue/button';
|
|
70
|
+
|
|
71
|
+
const app = createApp(App);
|
|
72
|
+
app.component('Button', Button);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Prop Cases
|
|
76
|
+
|
|
77
|
+
Component prop names are described as camel case throughout the documentation however kebab-case is also fully supported. Events on the other hand should always be kebab-case.
|
|
78
|
+
|
|
79
|
+
```vue
|
|
80
|
+
<Dialog :showHeader="false"></Dialog>
|
|
81
|
+
|
|
82
|
+
<!-- can be written as -->
|
|
83
|
+
|
|
84
|
+
<Dialog :show-header="false"></Dialog>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Nuxt Integration
|
|
88
|
+
|
|
89
|
+
The [nuxt-primevue](https://www.npmjs.com/package/nuxt-primevue) package is the official module by PrimeTek.
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
# Using npm
|
|
93
|
+
npm install --save-dev nuxt-primevue
|
|
94
|
+
|
|
95
|
+
# Using yarn
|
|
96
|
+
yarn add --dev nuxt-primevue
|
|
97
|
+
|
|
98
|
+
# Using pnpm
|
|
99
|
+
pnpm add -D nuxt-primevue
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The module is enabled by adding `nuxt-primevue` to the modules option. Configuration values are defined with the `primevue` property.
|
|
103
|
+
|
|
104
|
+
```javascript
|
|
105
|
+
export default defineNuxtConfig({
|
|
106
|
+
modules: ['nuxt-primevue'],
|
|
107
|
+
primevue: {
|
|
108
|
+
/* Options */
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Whether to install the PrimeVue plugin, defaults to true. Disable this option if you prefer to configure PrimeVue manually e.g. with a Nuxt plugin.
|
|
114
|
+
|
|
115
|
+
```javascript
|
|
116
|
+
primevue: {
|
|
117
|
+
usePrimeVue: true;
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The names of the components, directives and composables to import and register are provided using the include property. When the value is ignored or set using the \* alias, all of the components, directives and composables are registered respectively.
|
|
122
|
+
|
|
123
|
+
```javascript
|
|
124
|
+
primevue: {
|
|
125
|
+
components: {
|
|
126
|
+
include: ['Button', 'DataTable']
|
|
127
|
+
},
|
|
128
|
+
directives: {
|
|
129
|
+
include: ['Ripple', 'Tooltip']
|
|
130
|
+
},
|
|
131
|
+
composables: {
|
|
132
|
+
include: ['useStyle']
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
In styled mode, the theme can be defined at Nuxt configuration with the css property. Note that this only applies to styled mode, in unstyled mode a theme file is not required as styling is done externally.
|
|
138
|
+
|
|
139
|
+
```javascript
|
|
140
|
+
export default defineNuxtConfig({
|
|
141
|
+
css: ['primevue/resources/themes/lara-dark-teal/theme.css']
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
For detailed [information](https://primevue.org/nuxt)
|
|
146
|
+
|
|
147
|
+
## Example
|
|
148
|
+
|
|
149
|
+
We've created various samples for the popular options in the Vue ecosystem. Visit the [primevue-examples](https://github.com/primefaces/primevue-examples) repository for the samples.
|
|
150
|
+
|
|
151
|
+
### Vite
|
|
152
|
+
|
|
153
|
+
<a href="https://github.com/primefaces/primevue-examples/tree/main/vite-quickstart">
|
|
154
|
+
<img src="https://primefaces.org/cdn/primevue/images/logos/vite.svg" alt="vite" width="112" height="112">
|
|
155
|
+
</a>
|
|
156
|
+
|
|
157
|
+
### Nuxt
|
|
158
|
+
|
|
159
|
+
<a href="https://github.com/primefaces/primevue-examples/tree/main/nuxt-quickstart">
|
|
160
|
+
<img src="https://primefaces.org/cdn/primevue/images/logos/nuxt.svg" alt="nuxt" width="112" height="112">
|
|
161
|
+
</a>
|
|
162
|
+
|
|
163
|
+
### Astro
|
|
164
|
+
|
|
165
|
+
<a href="https://github.com/primefaces/primevue-examples/tree/main/astro-quickstart">
|
|
166
|
+
<img src="https://primefaces.org/cdn/primevue/images/logos/astro.svg" alt="astro" width="112" height="112">
|
|
167
|
+
</a>
|
|
168
|
+
|
|
169
|
+
## Contributors
|
|
170
|
+
|
|
171
|
+
<a href="https://github.com/primefaces/primevue/graphs/contributors">
|
|
172
|
+
<img src="https://contrib.rocks/image?repo=primefaces/primevue" />
|
|
173
|
+
</a>
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Accordion groups a collection of contents in tabs.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primevue.org/accordion/)
|
|
6
|
+
*
|
|
7
|
+
* @module accordion
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import { VNode } from 'vue';
|
|
11
|
+
import { AccordionTabPassThroughOptionType } from '../accordiontab';
|
|
12
|
+
import { ComponentHooks } from '../basecomponent';
|
|
13
|
+
import { PassThroughOptions } from '../passthrough';
|
|
14
|
+
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
|
15
|
+
|
|
16
|
+
export declare type AccordionPassThroughOptionType = AccordionPassThroughAttributes | ((options: AccordionPassThroughMethodOptions) => AccordionPassThroughAttributes | string) | string | null | undefined;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Custom passthrough(pt) option method.
|
|
20
|
+
*/
|
|
21
|
+
export interface AccordionPassThroughMethodOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Defines instance.
|
|
24
|
+
*/
|
|
25
|
+
instance: any;
|
|
26
|
+
/**
|
|
27
|
+
* Defines valid properties.
|
|
28
|
+
*/
|
|
29
|
+
props: AccordionProps;
|
|
30
|
+
/**
|
|
31
|
+
* Defines current inline state.
|
|
32
|
+
*/
|
|
33
|
+
state: AccordionState;
|
|
34
|
+
/**
|
|
35
|
+
* Defines passthrough(pt) options in global config.
|
|
36
|
+
*/
|
|
37
|
+
global: object | undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Custom tab open event.
|
|
41
|
+
* @see {@link AccordionEmits.tab-open}
|
|
42
|
+
*/
|
|
43
|
+
export interface AccordionTabOpenEvent {
|
|
44
|
+
/**
|
|
45
|
+
* Browser mouse event.
|
|
46
|
+
* @type {MouseEvent}
|
|
47
|
+
*/
|
|
48
|
+
originalEvent: MouseEvent;
|
|
49
|
+
/**
|
|
50
|
+
* Opened tab index.
|
|
51
|
+
*/
|
|
52
|
+
index: number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Custom tab close event.
|
|
57
|
+
* @see {@link AccordionEmits.tab-close}
|
|
58
|
+
* @extends {AccordionTabOpenEvent}
|
|
59
|
+
*/
|
|
60
|
+
export interface AccordionTabCloseEvent extends AccordionTabOpenEvent {}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Custom tab open event.
|
|
64
|
+
* @see {@link AccordionEmits.tab-open}
|
|
65
|
+
* @extends AccordionTabOpenEvent
|
|
66
|
+
*/
|
|
67
|
+
export interface AccordionClickEvent extends AccordionTabOpenEvent {}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Custom passthrough(pt) options.
|
|
71
|
+
* @see {@link AccordionProps.pt}
|
|
72
|
+
*/
|
|
73
|
+
export interface AccordionPassThroughOptions {
|
|
74
|
+
/**
|
|
75
|
+
* Used to pass attributes to the root's DOM element.
|
|
76
|
+
*/
|
|
77
|
+
root?: AccordionPassThroughOptionType;
|
|
78
|
+
/**
|
|
79
|
+
* Used to pass attributes to AccordionTab helper components.
|
|
80
|
+
* @deprecated since v3.30.1. Use 'accordiontab' property instead.
|
|
81
|
+
*/
|
|
82
|
+
tab?: AccordionTabPassThroughOptionType;
|
|
83
|
+
/**
|
|
84
|
+
* Used to pass attributes to AccordionTab helper components.
|
|
85
|
+
*/
|
|
86
|
+
accordiontab?: AccordionTabPassThroughOptionType;
|
|
87
|
+
/**
|
|
88
|
+
* Used to manage all lifecycle hooks
|
|
89
|
+
* @see {@link BaseComponent.ComponentHooks}
|
|
90
|
+
*/
|
|
91
|
+
hooks?: ComponentHooks;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Custom passthrough attributes for each DOM elements
|
|
96
|
+
*/
|
|
97
|
+
export interface AccordionPassThroughAttributes {
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Defines current inline state in Accordion component.
|
|
103
|
+
*/
|
|
104
|
+
export interface AccordionState {
|
|
105
|
+
/**
|
|
106
|
+
* Current id state as a string
|
|
107
|
+
*/
|
|
108
|
+
id: string;
|
|
109
|
+
/**
|
|
110
|
+
* Current active index state.
|
|
111
|
+
*/
|
|
112
|
+
d_activeIndex: number | number[];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Defines valid properties in Accordion component.
|
|
117
|
+
*/
|
|
118
|
+
export interface AccordionProps {
|
|
119
|
+
/**
|
|
120
|
+
* When enabled, multiple tabs can be activated at the same time.
|
|
121
|
+
* @defaultValue false
|
|
122
|
+
*/
|
|
123
|
+
multiple?: boolean | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Index of the active tab or an array of indexes in multiple mode.
|
|
126
|
+
* @defaultValue null
|
|
127
|
+
*/
|
|
128
|
+
activeIndex?: number | number[] | null | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* When enabled, hidden tabs are not rendered at all. Defaults to false that hides tabs with css.
|
|
131
|
+
* @defaultValue false
|
|
132
|
+
*/
|
|
133
|
+
lazy?: boolean | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Icon of a collapsed tab.
|
|
136
|
+
*/
|
|
137
|
+
expandIcon?: string | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Icon of an expanded tab.
|
|
140
|
+
*/
|
|
141
|
+
collapseIcon?: string | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* Index of the element in tabbing order.
|
|
144
|
+
* @defaultValue 0
|
|
145
|
+
*/
|
|
146
|
+
tabindex?: number | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* When enabled, the focused tab is activated.
|
|
149
|
+
* @defaultValue false
|
|
150
|
+
*/
|
|
151
|
+
selectOnFocus?: boolean | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
154
|
+
* @type {AccordionPassThroughOptions}
|
|
155
|
+
*/
|
|
156
|
+
pt?: PassThrough<AccordionPassThroughOptions>;
|
|
157
|
+
/**
|
|
158
|
+
* Used to configure passthrough(pt) options of the component.
|
|
159
|
+
* @type {PassThroughOptions}
|
|
160
|
+
*/
|
|
161
|
+
ptOptions?: PassThroughOptions;
|
|
162
|
+
/**
|
|
163
|
+
* When enabled, it removes component related styles in the core.
|
|
164
|
+
* @defaultValue false
|
|
165
|
+
*/
|
|
166
|
+
unstyled?: boolean;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Defines valid slots in Accordion slots.
|
|
171
|
+
*/
|
|
172
|
+
export interface AccordionSlots {
|
|
173
|
+
/**
|
|
174
|
+
* Default slot to detect AccordionTab components.
|
|
175
|
+
*/
|
|
176
|
+
default(): VNode[];
|
|
177
|
+
/**
|
|
178
|
+
* Custom collapse icon template.
|
|
179
|
+
*/
|
|
180
|
+
collapseicon(): VNode[];
|
|
181
|
+
/**
|
|
182
|
+
* Custom expand icon template.
|
|
183
|
+
*/
|
|
184
|
+
expandicon(): VNode[];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Defines valid emits in Accordion component.
|
|
189
|
+
*/
|
|
190
|
+
export interface AccordionEmits {
|
|
191
|
+
/**
|
|
192
|
+
* Emitted when the active tab changes.
|
|
193
|
+
* @param {number | undefined} value - Index of new active tab.
|
|
194
|
+
*/
|
|
195
|
+
'update:activeIndex'(value: number | undefined): void;
|
|
196
|
+
/**
|
|
197
|
+
* Callback to invoke when a tab gets expanded.
|
|
198
|
+
* @param {AccordionTabOpenEvent} event - Custom tab open event.
|
|
199
|
+
*/
|
|
200
|
+
'tab-open'(event: AccordionTabOpenEvent): void;
|
|
201
|
+
/**
|
|
202
|
+
* Callback to invoke when an active tab is collapsed by clicking on the header.
|
|
203
|
+
* @param {AccordionTabCloseEvent} event - Custom tab close event.
|
|
204
|
+
*/
|
|
205
|
+
'tab-close'(event: AccordionTabCloseEvent): void;
|
|
206
|
+
/**
|
|
207
|
+
* Callback to invoke when an active tab is clicked.
|
|
208
|
+
* @param {AccordionClickEvent} event - Custom tab click event.
|
|
209
|
+
*/
|
|
210
|
+
'tab-click'(event: AccordionClickEvent): void;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* **PrimeVue - Accordion**
|
|
215
|
+
*
|
|
216
|
+
* _Accordion groups a collection of contents in tabs._
|
|
217
|
+
*
|
|
218
|
+
* [Live Demo](https://www.primevue.org/accordion/)
|
|
219
|
+
* --- ---
|
|
220
|
+
* 
|
|
221
|
+
*
|
|
222
|
+
* @group Component
|
|
223
|
+
*
|
|
224
|
+
*/
|
|
225
|
+
declare class Accordion extends ClassComponent<AccordionProps, AccordionSlots, AccordionEmits> {}
|
|
226
|
+
|
|
227
|
+
declare module '@vue/runtime-core' {
|
|
228
|
+
interface GlobalComponents {
|
|
229
|
+
Accordion: GlobalComponentConstructor<Accordion>;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export default Accordion;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="cx('root')" v-bind="ptm('root')">
|
|
3
|
+
<div v-for="(tab, i) of tabs" :key="getKey(tab, i)" :class="cx('tab.root', { tab, index: i })" v-bind="getTabPT(tab, 'root', i)" data-pc-name="accordiontab" :data-pc-index="i" :data-p-active="isTabActive(i)">
|
|
4
|
+
<div
|
|
5
|
+
:style="getTabProp(tab, 'headerStyle')"
|
|
6
|
+
:class="[cx('tab.header', { tab, index: i }), getTabProp(tab, 'headerClass')]"
|
|
7
|
+
v-bind="{ ...getTabProp(tab, 'headerProps'), ...getTabPT(tab, 'header', i) }"
|
|
8
|
+
:data-p-highlight="isTabActive(i)"
|
|
9
|
+
:data-p-disabled="getTabProp(tab, 'disabled')"
|
|
10
|
+
>
|
|
11
|
+
<a
|
|
12
|
+
:id="getTabHeaderActionId(i)"
|
|
13
|
+
:class="cx('tab.headerAction')"
|
|
14
|
+
:tabindex="getTabProp(tab, 'disabled') ? -1 : tabindex"
|
|
15
|
+
role="button"
|
|
16
|
+
:aria-disabled="getTabProp(tab, 'disabled')"
|
|
17
|
+
:aria-expanded="isTabActive(i)"
|
|
18
|
+
:aria-controls="getTabContentId(i)"
|
|
19
|
+
@click="onTabClick($event, tab, i)"
|
|
20
|
+
@keydown="onTabKeyDown($event, tab, i)"
|
|
21
|
+
v-bind="{ ...getTabProp(tab, 'headeractionprops'), ...getTabPT(tab, 'headeraction', i) }"
|
|
22
|
+
>
|
|
23
|
+
<component v-if="tab.children && tab.children.headericon" :is="tab.children.headericon" :isTabActive="isTabActive(i)" :index="i"></component>
|
|
24
|
+
<component
|
|
25
|
+
v-else-if="isTabActive(i)"
|
|
26
|
+
:is="$slots.collapseicon ? $slots.collapseicon : collapseIcon ? 'span' : 'ChevronDownIcon'"
|
|
27
|
+
:class="[cx('tab.headerIcon'), collapseIcon]"
|
|
28
|
+
aria-hidden="true"
|
|
29
|
+
v-bind="getTabPT(tab, 'headericon', i)"
|
|
30
|
+
/>
|
|
31
|
+
<component v-else :is="$slots.expandicon ? $slots.expandicon : expandIcon ? 'span' : 'ChevronRightIcon'" :class="[cx('tab.headerIcon'), expandIcon]" aria-hidden="true" v-bind="getTabPT(tab, 'headericon', i)" />
|
|
32
|
+
<span v-if="tab.props && tab.props.header" :class="cx('tab.headerTitle')" v-bind="getTabPT(tab, 'headertitle', i)">{{ tab.props.header }}</span>
|
|
33
|
+
<component v-if="tab.children && tab.children.header" :is="tab.children.header"></component>
|
|
34
|
+
</a>
|
|
35
|
+
</div>
|
|
36
|
+
<transition name="p-toggleable-content" v-bind="getTabPT(tab, 'transition', i)">
|
|
37
|
+
<div
|
|
38
|
+
v-if="lazy ? isTabActive(i) : true"
|
|
39
|
+
v-show="lazy ? true : isTabActive(i)"
|
|
40
|
+
:id="getTabContentId(i)"
|
|
41
|
+
:style="getTabProp(tab, 'contentStyle')"
|
|
42
|
+
:class="[cx('tab.toggleableContent'), getTabProp(tab, 'contentClass')]"
|
|
43
|
+
role="region"
|
|
44
|
+
:aria-labelledby="getTabHeaderActionId(i)"
|
|
45
|
+
v-bind="{ ...getTabProp(tab, 'contentProps'), ...getTabPT(tab, 'toggleablecontent', i) }"
|
|
46
|
+
>
|
|
47
|
+
<div :class="cx('tab.content')" v-bind="getTabPT(tab, 'content', i)">
|
|
48
|
+
<component :is="tab"></component>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</transition>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script>
|
|
57
|
+
import ChevronDownIcon from 'primevue/icons/chevrondown';
|
|
58
|
+
import ChevronRightIcon from 'primevue/icons/chevronright';
|
|
59
|
+
import Ripple from 'primevue/ripple';
|
|
60
|
+
import { DomHandler, UniqueComponentId } from 'primevue/utils';
|
|
61
|
+
import { mergeProps } from 'vue';
|
|
62
|
+
import BaseAccordion from './BaseAccordion.vue';
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
name: 'Accordion',
|
|
66
|
+
extends: BaseAccordion,
|
|
67
|
+
emits: ['update:activeIndex', 'tab-open', 'tab-close', 'tab-click'],
|
|
68
|
+
data() {
|
|
69
|
+
return {
|
|
70
|
+
id: this.$attrs.id,
|
|
71
|
+
d_activeIndex: this.activeIndex
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
watch: {
|
|
75
|
+
'$attrs.id': function (newValue) {
|
|
76
|
+
this.id = newValue || UniqueComponentId();
|
|
77
|
+
},
|
|
78
|
+
activeIndex(newValue) {
|
|
79
|
+
this.d_activeIndex = newValue;
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
mounted() {
|
|
83
|
+
this.id = this.id || UniqueComponentId();
|
|
84
|
+
},
|
|
85
|
+
methods: {
|
|
86
|
+
isAccordionTab(child) {
|
|
87
|
+
return child.type.name === 'AccordionTab';
|
|
88
|
+
},
|
|
89
|
+
isTabActive(index) {
|
|
90
|
+
return this.multiple ? this.d_activeIndex && this.d_activeIndex.includes(index) : this.d_activeIndex === index;
|
|
91
|
+
},
|
|
92
|
+
getTabProp(tab, name) {
|
|
93
|
+
return tab.props ? tab.props[name] : undefined;
|
|
94
|
+
},
|
|
95
|
+
getKey(tab, index) {
|
|
96
|
+
return this.getTabProp(tab, 'header') || index;
|
|
97
|
+
},
|
|
98
|
+
getTabHeaderActionId(index) {
|
|
99
|
+
return `${this.id}_${index}_header_action`;
|
|
100
|
+
},
|
|
101
|
+
getTabContentId(index) {
|
|
102
|
+
return `${this.id}_${index}_content`;
|
|
103
|
+
},
|
|
104
|
+
getTabPT(tab, key, index) {
|
|
105
|
+
const count = this.tabs.length;
|
|
106
|
+
const tabMetaData = {
|
|
107
|
+
props: tab.props || {},
|
|
108
|
+
parent: {
|
|
109
|
+
props: this.$props,
|
|
110
|
+
state: this.$data
|
|
111
|
+
},
|
|
112
|
+
context: {
|
|
113
|
+
index,
|
|
114
|
+
count,
|
|
115
|
+
first: index === 0,
|
|
116
|
+
last: index === count - 1,
|
|
117
|
+
active: this.isTabActive(index)
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
return mergeProps(this.ptm(`tab.${key}`, { tab: tabMetaData }), this.ptm(`accordiontab.${key}`, { accordiontab: tabMetaData }), this.ptm(`accordiontab.${key}`, tabMetaData), this.ptmo(this.getTabProp(tab, 'pt'), key, tabMetaData));
|
|
122
|
+
},
|
|
123
|
+
onTabClick(event, tab, index) {
|
|
124
|
+
this.changeActiveIndex(event, tab, index);
|
|
125
|
+
this.$emit('tab-click', { originalEvent: event, index });
|
|
126
|
+
},
|
|
127
|
+
onTabKeyDown(event, tab, index) {
|
|
128
|
+
switch (event.code) {
|
|
129
|
+
case 'ArrowDown':
|
|
130
|
+
this.onTabArrowDownKey(event);
|
|
131
|
+
break;
|
|
132
|
+
|
|
133
|
+
case 'ArrowUp':
|
|
134
|
+
this.onTabArrowUpKey(event);
|
|
135
|
+
break;
|
|
136
|
+
|
|
137
|
+
case 'Home':
|
|
138
|
+
this.onTabHomeKey(event);
|
|
139
|
+
break;
|
|
140
|
+
|
|
141
|
+
case 'End':
|
|
142
|
+
this.onTabEndKey(event);
|
|
143
|
+
break;
|
|
144
|
+
|
|
145
|
+
case 'Enter':
|
|
146
|
+
case 'Space':
|
|
147
|
+
this.onTabEnterKey(event, tab, index);
|
|
148
|
+
break;
|
|
149
|
+
|
|
150
|
+
default:
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
onTabArrowDownKey(event) {
|
|
155
|
+
const nextHeaderAction = this.findNextHeaderAction(event.target.parentElement.parentElement);
|
|
156
|
+
|
|
157
|
+
nextHeaderAction ? this.changeFocusedTab(event, nextHeaderAction) : this.onTabHomeKey(event);
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
},
|
|
160
|
+
onTabArrowUpKey(event) {
|
|
161
|
+
const prevHeaderAction = this.findPrevHeaderAction(event.target.parentElement.parentElement);
|
|
162
|
+
|
|
163
|
+
prevHeaderAction ? this.changeFocusedTab(event, prevHeaderAction) : this.onTabEndKey(event);
|
|
164
|
+
event.preventDefault();
|
|
165
|
+
},
|
|
166
|
+
onTabHomeKey(event) {
|
|
167
|
+
const firstHeaderAction = this.findFirstHeaderAction();
|
|
168
|
+
|
|
169
|
+
this.changeFocusedTab(event, firstHeaderAction);
|
|
170
|
+
event.preventDefault();
|
|
171
|
+
},
|
|
172
|
+
onTabEndKey(event) {
|
|
173
|
+
const lastHeaderAction = this.findLastHeaderAction();
|
|
174
|
+
|
|
175
|
+
this.changeFocusedTab(event, lastHeaderAction);
|
|
176
|
+
event.preventDefault();
|
|
177
|
+
},
|
|
178
|
+
onTabEnterKey(event, tab, index) {
|
|
179
|
+
this.changeActiveIndex(event, tab, index);
|
|
180
|
+
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
},
|
|
183
|
+
findNextHeaderAction(tabElement, selfCheck = false) {
|
|
184
|
+
const nextTabElement = selfCheck ? tabElement : tabElement.nextElementSibling;
|
|
185
|
+
const headerElement = DomHandler.findSingle(nextTabElement, '[data-pc-section="header"]');
|
|
186
|
+
|
|
187
|
+
return headerElement ? (DomHandler.getAttribute(headerElement, 'data-p-disabled') ? this.findNextHeaderAction(headerElement.parentElement) : DomHandler.findSingle(headerElement, '[data-pc-section="headeraction"]')) : null;
|
|
188
|
+
},
|
|
189
|
+
findPrevHeaderAction(tabElement, selfCheck = false) {
|
|
190
|
+
const prevTabElement = selfCheck ? tabElement : tabElement.previousElementSibling;
|
|
191
|
+
const headerElement = DomHandler.findSingle(prevTabElement, '[data-pc-section="header"]');
|
|
192
|
+
|
|
193
|
+
return headerElement ? (DomHandler.getAttribute(headerElement, 'data-p-disabled') ? this.findPrevHeaderAction(headerElement.parentElement) : DomHandler.findSingle(headerElement, '[data-pc-section="headeraction"]')) : null;
|
|
194
|
+
},
|
|
195
|
+
findFirstHeaderAction() {
|
|
196
|
+
return this.findNextHeaderAction(this.$el.firstElementChild, true);
|
|
197
|
+
},
|
|
198
|
+
findLastHeaderAction() {
|
|
199
|
+
return this.findPrevHeaderAction(this.$el.lastElementChild, true);
|
|
200
|
+
},
|
|
201
|
+
changeActiveIndex(event, tab, index) {
|
|
202
|
+
if (!this.getTabProp(tab, 'disabled')) {
|
|
203
|
+
const active = this.isTabActive(index);
|
|
204
|
+
const eventName = active ? 'tab-close' : 'tab-open';
|
|
205
|
+
|
|
206
|
+
if (this.multiple) {
|
|
207
|
+
if (active) {
|
|
208
|
+
this.d_activeIndex = this.d_activeIndex.filter((i) => i !== index);
|
|
209
|
+
} else {
|
|
210
|
+
if (this.d_activeIndex) this.d_activeIndex.push(index);
|
|
211
|
+
else this.d_activeIndex = [index];
|
|
212
|
+
}
|
|
213
|
+
} else {
|
|
214
|
+
this.d_activeIndex = this.d_activeIndex === index ? null : index;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
this.$emit('update:activeIndex', this.d_activeIndex);
|
|
218
|
+
this.$emit(eventName, { originalEvent: event, index });
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
changeFocusedTab(event, element) {
|
|
222
|
+
if (element) {
|
|
223
|
+
DomHandler.focus(element);
|
|
224
|
+
|
|
225
|
+
if (this.selectOnFocus) {
|
|
226
|
+
const index = parseInt(element.parentElement.parentElement.dataset.pcIndex, 10);
|
|
227
|
+
const tab = this.tabs[index];
|
|
228
|
+
|
|
229
|
+
this.changeActiveIndex(event, tab, index);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
computed: {
|
|
235
|
+
tabs() {
|
|
236
|
+
return this.$slots.default().reduce((tabs, child) => {
|
|
237
|
+
if (this.isAccordionTab(child)) {
|
|
238
|
+
tabs.push(child);
|
|
239
|
+
} else if (child.children && child.children instanceof Array) {
|
|
240
|
+
child.children.forEach((nestedChild) => {
|
|
241
|
+
if (this.isAccordionTab(nestedChild)) {
|
|
242
|
+
tabs.push(nestedChild);
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return tabs;
|
|
248
|
+
}, []);
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
components: {
|
|
252
|
+
ChevronDownIcon,
|
|
253
|
+
ChevronRightIcon
|
|
254
|
+
},
|
|
255
|
+
directives: {
|
|
256
|
+
ripple: Ripple
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
</script>
|