primevue 3.32.2 → 3.34.0
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/accordion/Accordion.d.ts +21 -2
- package/accordion/accordion.cjs.js +3 -3
- package/accordion/accordion.esm.js +3 -3
- package/accordion/accordion.js +3 -3
- package/accordiontab/AccordionTab.d.ts +24 -2
- package/autocomplete/AutoComplete.d.ts +24 -2
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/autocomplete.cjs.js +5 -5
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +5 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +5 -5
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +21 -2
- package/avatargroup/AvatarGroup.d.ts +8 -2
- package/badge/Badge.d.ts +18 -2
- package/badgedirective/BadgeDirective.d.ts +12 -2
- package/badgedirective/badgedirective.cjs.js +3 -3
- package/badgedirective/badgedirective.esm.js +3 -3
- package/badgedirective/badgedirective.js +3 -3
- package/basecomponent/BaseComponent.vue +20 -22
- package/basecomponent/basecomponent.cjs.js +41 -28
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +41 -28
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +41 -28
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +42 -25
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +42 -25
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +42 -25
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BlockUI.d.ts +21 -2
- package/breadcrumb/Breadcrumb.d.ts +47 -2
- package/breadcrumb/Breadcrumb.vue +7 -2
- package/breadcrumb/BreadcrumbItem.vue +28 -3
- package/breadcrumb/breadcrumb.cjs.js +35 -8
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +36 -9
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +35 -8
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +24 -2
- package/button/button.cjs.js +1 -1
- package/button/button.esm.js +1 -1
- package/button/button.js +1 -1
- package/calendar/Calendar.d.ts +26 -4
- package/calendar/Calendar.vue +63 -29
- package/calendar/calendar.cjs.js +137 -51
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +137 -51
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +137 -51
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +8 -2
- package/carousel/Carousel.d.ts +24 -2
- package/carousel/Carousel.vue +22 -2
- package/carousel/carousel.cjs.js +9 -5
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +9 -5
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +9 -5
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +21 -2
- package/cascadeselect/cascadeselect.cjs.js +3 -3
- package/cascadeselect/cascadeselect.esm.js +3 -3
- package/cascadeselect/cascadeselect.js +3 -3
- package/chart/Chart.d.ts +18 -2
- package/chart/chart.cjs.js +3 -3
- package/chart/chart.esm.js +3 -3
- package/chart/chart.js +3 -3
- package/checkbox/Checkbox.d.ts +24 -2
- package/checkbox/checkbox.cjs.js +3 -3
- package/checkbox/checkbox.esm.js +3 -3
- package/checkbox/checkbox.js +3 -3
- package/chip/Chip.d.ts +21 -2
- package/chips/Chips.d.ts +21 -2
- package/chips/chips.cjs.js +3 -3
- package/chips/chips.esm.js +3 -3
- package/chips/chips.js +3 -3
- package/colorpicker/ColorPicker.d.ts +21 -2
- package/column/Column.d.ts +24 -2
- package/columngroup/ColumnGroup.d.ts +24 -2
- package/config/PrimeVue.d.ts +93 -92
- package/config/config.cjs.js +4 -3
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +4 -3
- package/config/config.esm.min.js +1 -1
- package/config/config.js +4 -3
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +21 -2
- package/confirmpopup/ConfirmPopup.d.ts +21 -2
- package/confirmpopup/confirmpopup.cjs.js +3 -3
- package/confirmpopup/confirmpopup.esm.js +3 -3
- package/confirmpopup/confirmpopup.js +3 -3
- package/contextmenu/ContextMenu.d.ts +54 -2
- package/contextmenu/ContextMenu.vue +13 -7
- package/contextmenu/ContextMenuSub.vue +34 -2
- package/contextmenu/contextmenu.cjs.js +41 -14
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +42 -15
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +41 -14
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +256 -147
- package/core/core.min.js +12 -12
- package/datatable/BodyCell.vue +14 -4
- package/datatable/DataTable.d.ts +41 -3
- package/datatable/DataTable.vue +6 -3
- package/datatable/TableBody.vue +7 -8
- package/datatable/datatable.cjs.js +63 -57
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +63 -57
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +63 -57
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +21 -2
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +21 -2
- package/deferredcontent/DeferredContent.d.ts +21 -2
- package/dialog/Dialog.d.ts +21 -2
- package/dialog/Dialog.vue +2 -2
- package/dialog/dialog.cjs.js +7 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +8 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +7 -5
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +18 -2
- package/dock/Dock.d.ts +46 -2
- package/dock/Dock.vue +5 -0
- package/dock/DockSub.vue +20 -1
- package/dock/dock.cjs.js +21 -2
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +22 -3
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +21 -2
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +24 -2
- package/dropdown/dropdown.cjs.js +6 -6
- package/dropdown/dropdown.esm.js +6 -6
- package/dropdown/dropdown.js +6 -6
- package/editor/Editor.d.ts +22 -2
- package/editor/editor.cjs.js +3 -3
- package/editor/editor.esm.js +3 -3
- package/editor/editor.js +3 -3
- package/fieldset/Fieldset.d.ts +21 -2
- package/fieldset/fieldset.cjs.js +4 -4
- package/fieldset/fieldset.esm.js +4 -4
- package/fieldset/fieldset.js +4 -4
- package/fileupload/FileContent.vue +8 -6
- package/fileupload/FileUpload.d.ts +21 -2
- package/fileupload/FileUpload.vue +9 -7
- package/fileupload/fileupload.cjs.js +17 -13
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +17 -13
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +17 -13
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +8 -2
- package/galleria/Galleria.d.ts +24 -2
- package/galleria/galleria.cjs.js +9 -9
- package/galleria/galleria.esm.js +9 -9
- package/galleria/galleria.js +9 -9
- package/image/Image.d.ts +21 -2
- package/image/image.cjs.js +3 -3
- package/image/image.esm.js +3 -3
- package/image/image.js +3 -3
- package/inlinemessage/InlineMessage.d.ts +21 -2
- package/inplace/Inplace.d.ts +21 -2
- package/inplace/inplace.cjs.js +3 -3
- package/inplace/inplace.esm.js +3 -3
- package/inplace/inplace.js +3 -3
- package/inputmask/InputMask.d.ts +21 -2
- package/inputmask/InputMask.vue +3 -1
- package/inputmask/inputmask.cjs.js +2 -1
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +2 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +2 -1
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +21 -2
- package/inputnumber/inputnumber.cjs.js +6 -6
- package/inputnumber/inputnumber.esm.js +6 -6
- package/inputnumber/inputnumber.js +6 -6
- package/inputswitch/InputSwitch.d.ts +21 -2
- package/inputswitch/inputswitch.cjs.js +3 -3
- package/inputswitch/inputswitch.esm.js +3 -3
- package/inputswitch/inputswitch.js +3 -3
- package/inputtext/InputText.d.ts +21 -2
- package/knob/Knob.d.ts +21 -2
- package/listbox/Listbox.d.ts +24 -2
- package/listbox/listbox.cjs.js +3 -3
- package/listbox/listbox.esm.js +3 -3
- package/listbox/listbox.js +3 -3
- package/megamenu/MegaMenu.d.ts +58 -2
- package/megamenu/MegaMenu.vue +6 -30
- package/megamenu/MegaMenuSub.vue +34 -3
- package/megamenu/megamenu.cjs.js +36 -39
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +37 -40
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +36 -39
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +60 -2
- package/menu/Menu.vue +6 -1
- package/menu/Menuitem.vue +26 -1
- package/menu/menu.cjs.js +29 -7
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +30 -8
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +29 -7
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +62 -2
- package/menubar/Menubar.vue +6 -0
- package/menubar/MenubarSub.vue +32 -1
- package/menubar/menubar.cjs.js +34 -6
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +35 -7
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +34 -6
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +1 -0
- package/message/Message.d.ts +21 -2
- package/message/message.cjs.js +3 -3
- package/message/message.esm.js +3 -3
- package/message/message.js +3 -3
- package/multiselect/MultiSelect.d.ts +24 -2
- package/multiselect/multiselect.cjs.js +6 -6
- package/multiselect/multiselect.esm.js +6 -6
- package/multiselect/multiselect.js +6 -6
- package/orderlist/OrderList.d.ts +24 -2
- package/orderlist/OrderList.vue +7 -5
- package/orderlist/orderlist.cjs.js +10 -8
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +10 -8
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +10 -8
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +24 -2
- package/organizationchart/organizationchart.cjs.js +4 -4
- package/organizationchart/organizationchart.esm.js +4 -4
- package/organizationchart/organizationchart.js +4 -4
- package/overlaypanel/OverlayPanel.d.ts +21 -2
- package/overlaypanel/overlaypanel.cjs.js +3 -3
- package/overlaypanel/overlaypanel.esm.js +3 -3
- package/overlaypanel/overlaypanel.js +3 -3
- package/package.json +1 -1
- package/paginator/FirstPageLink.vue +1 -1
- package/paginator/JumpToPageDropdown.vue +1 -0
- package/paginator/LastPageLink.vue +1 -1
- package/paginator/NextPageLink.vue +1 -1
- package/paginator/Paginator.d.ts +24 -2
- package/paginator/PrevPageLink.vue +1 -1
- package/paginator/RowsPerPageDropdown.vue +1 -0
- package/paginator/paginator.cjs.js +19 -9
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +19 -9
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +19 -9
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +21 -2
- package/panel/panel.cjs.js +3 -3
- package/panel/panel.esm.js +3 -3
- package/panel/panel.js +3 -3
- package/panelmenu/PanelMenu.d.ts +58 -2
- package/panelmenu/PanelMenu.vue +6 -0
- package/panelmenu/PanelMenuList.vue +1 -0
- package/panelmenu/PanelMenuSub.vue +33 -1
- package/panelmenu/panelmenu.cjs.js +41 -12
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +42 -13
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +41 -12
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +15 -9
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +4 -4
- package/passthrough/index.esm.js +15 -9
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +15 -9
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +3 -3
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +3 -3
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +3 -3
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/Password.d.ts +21 -2
- package/password/password.cjs.js +3 -3
- package/password/password.esm.js +3 -3
- package/password/password.js +3 -3
- package/picklist/PickList.d.ts +24 -2
- package/picklist/PickList.vue +8 -5
- package/picklist/picklist.cjs.js +10 -8
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +10 -8
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +10 -8
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +18 -2
- package/progressspinner/ProgressSpinner.d.ts +18 -2
- package/radiobutton/RadioButton.d.ts +21 -2
- package/radiobutton/radiobutton.cjs.js +3 -3
- package/radiobutton/radiobutton.esm.js +3 -3
- package/radiobutton/radiobutton.js +3 -3
- package/rating/Rating.d.ts +24 -2
- package/ripple/Ripple.d.ts +8 -2
- package/row/Row.d.ts +16 -0
- package/scrollpanel/ScrollPanel.d.ts +21 -2
- package/scrolltop/ScrollTop.d.ts +21 -2
- package/selectbutton/SelectButton.d.ts +24 -2
- package/sidebar/Sidebar.d.ts +21 -2
- package/sidebar/sidebar.cjs.js +3 -3
- package/sidebar/sidebar.esm.js +3 -3
- package/sidebar/sidebar.js +3 -3
- package/skeleton/Skeleton.d.ts +18 -2
- package/slider/Slider.d.ts +18 -2
- package/speeddial/SpeedDial.d.ts +24 -2
- package/speeddial/speeddial.cjs.js +4 -4
- package/speeddial/speeddial.esm.js +4 -4
- package/speeddial/speeddial.js +4 -4
- package/splitbutton/SplitButton.d.ts +35 -2
- package/splitbutton/SplitButton.vue +6 -2
- package/splitbutton/splitbutton.cjs.js +17 -9
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +18 -10
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +17 -9
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +24 -2
- package/splitterpanel/SplitterPanel.d.ts +21 -2
- package/steps/Steps.d.ts +51 -2
- package/steps/Steps.vue +31 -1
- package/steps/steps.cjs.js +31 -3
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +31 -3
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +32 -4
- package/steps/steps.min.js +1 -1
- package/styleclass/StyleClass.d.ts +8 -2
- package/tabmenu/TabMenu.d.ts +50 -2
- package/tabmenu/TabMenu.vue +27 -1
- package/tabmenu/tabmenu.cjs.js +26 -3
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +26 -3
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +27 -4
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +24 -2
- package/tabview/TabView.d.ts +8 -2
- package/tabview/tabview.cjs.js +3 -3
- package/tabview/tabview.esm.js +3 -3
- package/tabview/tabview.js +3 -3
- package/tag/Tag.d.ts +18 -2
- package/terminal/Terminal.d.ts +21 -2
- package/textarea/Textarea.d.ts +21 -2
- package/tieredmenu/TieredMenu.d.ts +58 -2
- package/tieredmenu/TieredMenu.vue +6 -0
- package/tieredmenu/TieredMenuSub.vue +33 -1
- package/tieredmenu/tieredmenu.cjs.js +35 -7
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +36 -8
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +35 -7
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +21 -2
- package/toast/Toast.d.ts +21 -2
- package/toast/toast.cjs.js +7 -7
- package/toast/toast.esm.js +7 -7
- package/toast/toast.js +7 -7
- package/togglebutton/ToggleButton.d.ts +24 -2
- package/togglebutton/ToggleButton.vue +4 -4
- package/togglebutton/togglebutton.cjs.js +7 -7
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +7 -7
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +7 -7
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +18 -2
- package/tooltip/Tooltip.d.ts +12 -2
- package/tooltip/tooltip.cjs.js +2 -2
- package/tooltip/tooltip.esm.js +2 -2
- package/tooltip/tooltip.js +2 -2
- package/tree/Tree.d.ts +24 -2
- package/tree/Tree.vue +1 -1
- package/tree/tree.cjs.js +7 -7
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +7 -7
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +7 -7
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +21 -2
- package/treeselect/treeselect.cjs.js +6 -6
- package/treeselect/treeselect.esm.js +6 -6
- package/treeselect/treeselect.js +6 -6
- package/treetable/BodyCell.vue +1 -1
- package/treetable/TreeTable.d.ts +24 -2
- package/treetable/TreeTableRow.vue +1 -1
- package/treetable/treetable.cjs.js +22 -20
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +22 -20
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +22 -20
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +24 -2
- package/tristatecheckbox/tristatecheckbox.cjs.js +3 -3
- package/tristatecheckbox/tristatecheckbox.esm.js +3 -3
- package/tristatecheckbox/tristatecheckbox.js +3 -3
- package/ts-helpers.d.ts +2 -2
- package/utils/utils.cjs.js +30 -20
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +30 -20
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +30 -20
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +1 -1
- package/virtualscroller/BaseVirtualScroller.vue +3 -3
- package/virtualscroller/VirtualScroller.d.ts +21 -2
- package/virtualscroller/virtualscroller.cjs.js +6 -6
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +6 -6
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +6 -6
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +13 -3
package/steps/steps.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.steps=function(e,t,n,i){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=s(
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.steps=function(e,t,n,i){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=s(n),r=i.useStyle("\n.p-steps {\n position: relative;\n}\n\n.p-steps .p-steps-list {\n padding: 0;\n margin: 0;\n list-style-type: none;\n display: flex;\n}\n\n.p-steps-item {\n position: relative;\n display: flex;\n justify-content: center;\n flex: 1 1 auto;\n overflow: hidden;\n}\n\n.p-steps-item .p-menuitem-link {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n overflow: hidden;\n text-decoration: none;\n}\n\n.p-steps.p-steps-readonly .p-steps-item {\n cursor: auto;\n}\n\n.p-steps-item.p-steps-current .p-menuitem-link {\n cursor: default;\n}\n\n.p-steps-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n}\n\n.p-steps-number {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-steps-title {\n display: block;\n}\n",{name:"steps",manual:!0}),a={name:"Steps",extends:{name:"BaseSteps",extends:o.default,props:{id:{type:String},model:{type:Array,default:null},readonly:{type:Boolean,default:!0},exact:{type:Boolean,default:!0}},css:{classes:{root:function(e){return["p-steps p-component",{"p-readonly":e.props.readonly}]},menu:"p-steps-list",menuitem:function(e){var t=e.instance,n=e.item;return["p-steps-item",{"p-highlight p-steps-current":t.isActive(n),"p-disabled":t.isItemDisabled(n)}]},action:function(e){return["p-menuitem-link",{"router-link-active":e.isActive,"router-link-active-exact":e.props.exact&&e.isExactActive}]},step:"p-steps-number",label:"p-steps-title"},loadStyle:r.load},provide:function(){return{$parentInstance:this}}},beforeMount:function(){this.$slots.item||console.warn("In future versions, vue-router support will be removed. Item templating should be used.")},mounted:function(){this.findFirstItem().tabIndex="0"},methods:{getPTOptions:function(e,t,n){return this.ptm(e,{context:{item:t,index:n,active:this.isActive(t),disabled:this.isItemDisabled(t)}})},onItemClick:function(e,t,n){this.disabled(t)||this.readonly?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},onItemKeydown:function(e,t,n){switch(e.code){case"ArrowRight":this.navigateToNextItem(e.target),e.preventDefault();break;case"ArrowLeft":this.navigateToPrevItem(e.target),e.preventDefault();break;case"Home":this.navigateToFirstItem(e.target),e.preventDefault();break;case"End":this.navigateToLastItem(e.target),e.preventDefault();break;case"Tab":break;case"Enter":case"Space":this.onItemClick(e,t,n),e.preventDefault()}},navigateToNextItem:function(e){var t=this.findNextItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToPrevItem:function(e){var t=this.findPrevItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToFirstItem:function(e){var t=this.findFirstItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToLastItem:function(e){var t=this.findLastItem(e);t&&this.setFocusToMenuitem(e,t)},findNextItem:function(e){var t=e.parentElement.nextElementSibling;return t?t.children[0]:null},findPrevItem:function(e){var t=e.parentElement.previousElementSibling;return t?t.children[0]:null},findFirstItem:function(){var t=e.DomHandler.findSingle(this.$refs.list,'[data-pc-section="menuitem"]');return t?t.children[0]:null},findLastItem:function(){var t=e.DomHandler.find(this.$refs.list,'[data-pc-section="menuitem"]');return t?t[t.length-1].children[0]:null},setFocusToMenuitem:function(e,t){e.tabIndex="-1",t.tabIndex="0",t.focus()},isActive:function(e){return!!e.to&&this.$router.resolve(e.to).path===this.$route.path},isItemDisabled:function(e){return this.disabled(e)||this.readonly&&!this.isActive(e)},visible:function(e){return"function"==typeof e.visible?e.visible():!1!==e.visible},disabled:function(e){return"function"==typeof e.disabled?e.disabled():e.disabled},label:function(e){return"function"==typeof e.label?e.label():e.label},getMenuItemProps:function(e,n){var i=this;return{action:t.mergeProps({class:this.cx("action"),onClick:function(t){return i.onItemClick(t,e)},onKeyDown:function(t){return i.onItemKeydown(t,e)}},this.getPTOptions("action",e,n)),step:t.mergeProps({class:this.cx("step")},this.getPTOptions("step",e,n)),label:t.mergeProps({class:this.cx("label")},this.getPTOptions("label",e,n))}}}},l=["id"],c=["data-p-highlight","data-p-disabled"],p=["href","aria-current","onClick","onKeydown"],u=["onKeydown"];return a.render=function(e,n,i,s,o,r){var a=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("nav",t.mergeProps({id:e.id,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"steps"}),[t.createElementVNode("ol",t.mergeProps({ref:"list",class:e.cx("menu")},e.ptm("menu")),[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(function(n,i){return t.openBlock(),t.createElementBlock(t.Fragment,{key:n.to},[r.visible(n)?(t.openBlock(),t.createElementBlock("li",t.mergeProps({key:0,class:[e.cx("menuitem",{item:n}),n.class],style:n.style},r.getPTOptions("menuitem",n,i),{"data-p-highlight":r.isActive(n),"data-p-disabled":r.isItemDisabled(n)}),[e.$slots.item?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.$slots.item),{key:1,item:n,index:i,label:r.label(n),props:r.getMenuItemProps(n,i)},null,8,["item","index","label","props"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[r.isItemDisabled(n)?(t.openBlock(),t.createElementBlock("span",t.mergeProps({key:1,class:e.cx("action"),onKeydown:function(e){return r.onItemKeydown(e,n)}},r.getPTOptions("action",n,i)),[t.createElementVNode("span",t.mergeProps({class:e.cx("step")},r.getPTOptions("step",n,i)),t.toDisplayString(i+1),17),t.createElementVNode("span",t.mergeProps({class:e.cx("label")},r.getPTOptions("label",n,i)),t.toDisplayString(r.label(n)),17)],16,u)):(t.openBlock(),t.createBlock(a,{key:0,to:n.to,custom:""},{default:t.withCtx((function(s){var o=s.navigate,a=s.isExactActive;return[t.createElementVNode("a",t.mergeProps({href:s.href,class:e.cx("action",{isActive:s.isActive,isExactActive:a}),tabindex:-1,"aria-current":a?"step":void 0,onClick:function(e){return r.onItemClick(e,n,o)},onKeydown:function(e){return r.onItemKeydown(e,n,o)}},r.getPTOptions("action",n,i)),[t.createElementVNode("span",t.mergeProps({class:e.cx("step")},r.getPTOptions("step",n,i)),t.toDisplayString(i+1),17),t.createElementVNode("span",t.mergeProps({class:e.cx("label")},r.getPTOptions("label",n,i)),t.toDisplayString(r.label(n)),17)],16,p)]})),_:2},1032,["to"]))],64))],16,c)):t.createCommentVNode("",!0)],64)})),128))],16)],16,l)},a}(primevue.utils,Vue,primevue.basecomponent,primevue.usestyle);
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { DirectiveBinding, ObjectDirective } from 'vue';
|
|
10
10
|
import { DirectiveHooks } from '../basedirective';
|
|
11
|
-
import {
|
|
11
|
+
import { PassThroughOptions } from '../passthrough';
|
|
12
|
+
import { PassThrough } from '../ts-helpers';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Defines options of StyleClass.
|
|
@@ -55,7 +56,12 @@ export interface StyleClassOptions {
|
|
|
55
56
|
* Used to pass attributes to DOM elements inside the component.
|
|
56
57
|
* @type {StyleClassDirectivePassThroughOptions}
|
|
57
58
|
*/
|
|
58
|
-
pt?:
|
|
59
|
+
pt?: PassThrough<StyleClassDirectivePassThroughOptions>;
|
|
60
|
+
/**
|
|
61
|
+
* Used to configure passthrough(pt) options of the component.
|
|
62
|
+
* @type {PassThroughOptions}
|
|
63
|
+
*/
|
|
64
|
+
ptOptions?: PassThroughOptions;
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
/**
|
package/tabmenu/TabMenu.d.ts
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
import { VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { MenuItem } from '../menuitem';
|
|
13
|
-
import {
|
|
13
|
+
import { PassThroughOptions } from '../passthrough';
|
|
14
|
+
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
|
14
15
|
|
|
15
16
|
export declare type TabMenuPassThroughOptionType = TabMenuPassThroughAttributes | ((options: TabMenuPassThroughMethodOptions) => TabMenuPassThroughAttributes | string) | string | null | undefined;
|
|
16
17
|
|
|
@@ -18,10 +19,26 @@ export declare type TabMenuPassThroughOptionType = TabMenuPassThroughAttributes
|
|
|
18
19
|
* Custom passthrough(pt) option method.
|
|
19
20
|
*/
|
|
20
21
|
export interface TabMenuPassThroughMethodOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Defines instance.
|
|
24
|
+
*/
|
|
21
25
|
instance: any;
|
|
26
|
+
/**
|
|
27
|
+
* Defines valid properties.
|
|
28
|
+
*/
|
|
22
29
|
props: TabMenuProps;
|
|
30
|
+
/**
|
|
31
|
+
* Defines current inline state.
|
|
32
|
+
*/
|
|
23
33
|
state: TabMenuState;
|
|
34
|
+
/**
|
|
35
|
+
* Defines current options.
|
|
36
|
+
*/
|
|
24
37
|
context: TabMenuContext;
|
|
38
|
+
/**
|
|
39
|
+
* Defines passthrough(pt) options in global config.
|
|
40
|
+
*/
|
|
41
|
+
global: object | undefined;
|
|
25
42
|
}
|
|
26
43
|
|
|
27
44
|
/**
|
|
@@ -111,6 +128,24 @@ export interface TabMenuChangeEvent {
|
|
|
111
128
|
index: number;
|
|
112
129
|
}
|
|
113
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Defines valid router binding props in TabMenu component.
|
|
133
|
+
*/
|
|
134
|
+
export interface TabMenuRouterBindProps {
|
|
135
|
+
/**
|
|
136
|
+
* Action element binding
|
|
137
|
+
*/
|
|
138
|
+
action: object;
|
|
139
|
+
/**
|
|
140
|
+
* Icon element binding
|
|
141
|
+
*/
|
|
142
|
+
icon: object;
|
|
143
|
+
/**
|
|
144
|
+
* Label element binding
|
|
145
|
+
*/
|
|
146
|
+
label: object;
|
|
147
|
+
}
|
|
148
|
+
|
|
114
149
|
/**
|
|
115
150
|
* Defines valid properties in TabMenu component.
|
|
116
151
|
*/
|
|
@@ -141,7 +176,12 @@ export interface TabMenuProps {
|
|
|
141
176
|
* Used to pass attributes to DOM elements inside the component.
|
|
142
177
|
* @type {TabMenuPassThroughOptions}
|
|
143
178
|
*/
|
|
144
|
-
pt?:
|
|
179
|
+
pt?: PassThrough<TabMenuPassThroughOptions>;
|
|
180
|
+
/**
|
|
181
|
+
* Used to configure passthrough(pt) options of the component.
|
|
182
|
+
* @type {PassThroughOptions}
|
|
183
|
+
*/
|
|
184
|
+
ptOptions?: PassThroughOptions;
|
|
145
185
|
/**
|
|
146
186
|
* When enabled, it removes component related styles in the core.
|
|
147
187
|
* @defaultValue false
|
|
@@ -162,6 +202,14 @@ export interface TabMenuSlots {
|
|
|
162
202
|
* Menuitem instance
|
|
163
203
|
*/
|
|
164
204
|
item: MenuItem;
|
|
205
|
+
/**
|
|
206
|
+
* Label property of the menuitem
|
|
207
|
+
*/
|
|
208
|
+
label: string | ((...args: any) => string) | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Binding properties of the menuitem
|
|
211
|
+
*/
|
|
212
|
+
props: TabMenuRouterBindProps;
|
|
165
213
|
}): VNode[];
|
|
166
214
|
/**
|
|
167
215
|
* Custom item icon template.
|
package/tabmenu/TabMenu.vue
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
<span :class="cx('label')" v-bind="getPTOptions('label', item, i)">{{ label(item) }}</span>
|
|
54
54
|
</a>
|
|
55
55
|
</template>
|
|
56
|
-
<component v-else :is="$slots.item" :item="item" :index="i"></component>
|
|
56
|
+
<component v-else :is="$slots.item" :item="item" :index="i" :label="label(item)" :props="getMenuItemProps(item, i)"></component>
|
|
57
57
|
</li>
|
|
58
58
|
</template>
|
|
59
59
|
<li ref="inkbar" role="none" :class="cx('inkbar')" v-bind="ptm('inkbar')"></li>
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
<script>
|
|
65
65
|
import Ripple from 'primevue/ripple';
|
|
66
66
|
import { DomHandler } from 'primevue/utils';
|
|
67
|
+
import { mergeProps } from 'vue';
|
|
67
68
|
import BaseTabMenu from './BaseTabMenu.vue';
|
|
68
69
|
|
|
69
70
|
export default {
|
|
@@ -263,6 +264,31 @@ export default {
|
|
|
263
264
|
this.$refs.inkbar.style.width = '0px';
|
|
264
265
|
this.$refs.inkbar.style.left = '0px';
|
|
265
266
|
}
|
|
267
|
+
},
|
|
268
|
+
getMenuItemProps(item, index) {
|
|
269
|
+
return {
|
|
270
|
+
action: mergeProps(
|
|
271
|
+
{
|
|
272
|
+
class: this.cx('action'),
|
|
273
|
+
tabindex: -1,
|
|
274
|
+
onClick: ($event) => this.onItemClick($event, item, index),
|
|
275
|
+
onKeyDown: ($event) => this.onKeydownItem($event, item, index)
|
|
276
|
+
},
|
|
277
|
+
this.getPTOptions('action', item, index)
|
|
278
|
+
),
|
|
279
|
+
icon: mergeProps(
|
|
280
|
+
{
|
|
281
|
+
class: [this.cx('icon'), item.icon]
|
|
282
|
+
},
|
|
283
|
+
this.getPTOptions('icon', item, index)
|
|
284
|
+
),
|
|
285
|
+
label: mergeProps(
|
|
286
|
+
{
|
|
287
|
+
class: this.cx('label')
|
|
288
|
+
},
|
|
289
|
+
this.getPTOptions('label', item, index)
|
|
290
|
+
)
|
|
291
|
+
};
|
|
266
292
|
}
|
|
267
293
|
},
|
|
268
294
|
directives: {
|
package/tabmenu/tabmenu.cjs.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Ripple = require('primevue/ripple');
|
|
4
4
|
var utils = require('primevue/utils');
|
|
5
|
+
var vue = require('vue');
|
|
5
6
|
var BaseComponent = require('primevue/basecomponent');
|
|
6
7
|
var usestyle = require('primevue/usestyle');
|
|
7
|
-
var vue = require('vue');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
10
|
|
|
@@ -250,6 +250,27 @@ var script = {
|
|
|
250
250
|
this.$refs.inkbar.style.width = '0px';
|
|
251
251
|
this.$refs.inkbar.style.left = '0px';
|
|
252
252
|
}
|
|
253
|
+
},
|
|
254
|
+
getMenuItemProps: function getMenuItemProps(item, index) {
|
|
255
|
+
var _this2 = this;
|
|
256
|
+
return {
|
|
257
|
+
action: vue.mergeProps({
|
|
258
|
+
"class": this.cx('action'),
|
|
259
|
+
tabindex: -1,
|
|
260
|
+
onClick: function onClick($event) {
|
|
261
|
+
return _this2.onItemClick($event, item, index);
|
|
262
|
+
},
|
|
263
|
+
onKeyDown: function onKeyDown($event) {
|
|
264
|
+
return _this2.onKeydownItem($event, item, index);
|
|
265
|
+
}
|
|
266
|
+
}, this.getPTOptions('action', item, index)),
|
|
267
|
+
icon: vue.mergeProps({
|
|
268
|
+
"class": [this.cx('icon'), item.icon]
|
|
269
|
+
}, this.getPTOptions('icon', item, index)),
|
|
270
|
+
label: vue.mergeProps({
|
|
271
|
+
"class": this.cx('label')
|
|
272
|
+
}, this.getPTOptions('label', item, index))
|
|
273
|
+
};
|
|
253
274
|
}
|
|
254
275
|
},
|
|
255
276
|
directives: {
|
|
@@ -375,8 +396,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
375
396
|
}, $options.getPTOptions('label', item, i)), vue.toDisplayString($options.label(item)), 17)], 16, _hoisted_5)), [[_directive_ripple]]) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.item), {
|
|
376
397
|
key: 1,
|
|
377
398
|
item: item,
|
|
378
|
-
index: i
|
|
379
|
-
|
|
399
|
+
index: i,
|
|
400
|
+
label: $options.label(item),
|
|
401
|
+
props: $options.getMenuItemProps(item, i)
|
|
402
|
+
}, null, 8, ["item", "index", "label", "props"]))], 16, _hoisted_4)) : vue.createCommentVNode("", true)], 64);
|
|
380
403
|
}), 128)), vue.createElementVNode("li", vue.mergeProps({
|
|
381
404
|
ref: "inkbar",
|
|
382
405
|
role: "none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/ripple"),t=require("primevue/utils"),n=require("
|
|
1
|
+
"use strict";var e=require("primevue/ripple"),t=require("primevue/utils"),n=require("vue"),i=require("primevue/basecomponent"),a=require("primevue/usestyle");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e),r=l(i),s=a.useStyle("\n.p-tabmenu {\n overflow-x: auto;\n}\n\n.p-tabmenu-nav {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n flex-wrap: nowrap;\n}\n\n.p-tabmenu-nav a {\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n",{name:"tabmenu",manual:!0}),c={name:"TabMenu",extends:{name:"BaseTabMenu",extends:r.default,props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},activeIndex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:"p-tabmenu p-component",menu:"p-tabmenu-nav p-reset",menuitem:function(e){var t=e.instance;return["p-tabmenuitem",{"p-highlight":(e.props.exact?e.isExactActive:e.isActive)||t.d_activeIndex===e.index,"p-disabled":t.disabled(e.item)}]},action:"p-menuitem-link",icon:"p-menuitem-icon",label:"p-menuitem-text",inkbar:"p-tabmenu-ink-bar"},loadStyle:s.load},provide:function(){return{$parentInstance:this}}},emits:["update:activeIndex","tab-change"],timeout:null,data:function(){return{d_activeIndex:this.activeIndex}},watch:{$route:function(){var e=this;this.timeout=setTimeout((function(){return e.updateInkBar()}),50)},activeIndex:function(e){this.d_activeIndex=e}},mounted:function(){this.updateInkBar();var e=this.findActiveItem();e&&(e.tabIndex="0")},updated:function(){this.updateInkBar()},beforeUnmount:function(){clearTimeout(this.timeout)},methods:{getPTOptions:function(e,t,n){return this.ptm(e,{context:{item:t,index:n}})},onItemClick:function(e,t,n,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&i&&i(e),n!==this.d_activeIndex&&(this.d_activeIndex=n,this.$emit("update:activeIndex",this.d_activeIndex)),this.$emit("tab-change",{originalEvent:e,index:n}))},onKeydownItem:function(e,t,n,i){switch(e.code){case"ArrowRight":this.navigateToNextItem(e.target),e.preventDefault();break;case"ArrowLeft":this.navigateToPrevItem(e.target),e.preventDefault();break;case"Home":this.navigateToFirstItem(e.target),e.preventDefault();break;case"End":this.navigateToLastItem(e.target),e.preventDefault();break;case"Space":case"Enter":this.onItemClick(e,t,n,i),e.preventDefault();break;case"Tab":this.onTabKey()}},navigateToNextItem:function(e){var t=this.findNextItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToPrevItem:function(e){var t=this.findPrevItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToFirstItem:function(e){var t=this.findFirstItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToLastItem:function(e){var t=this.findLastItem(e);t&&this.setFocusToMenuitem(e,t)},findNextItem:function(e){var n=e.parentElement.nextElementSibling;return n?!0===t.DomHandler.getAttribute(n,"data-p-disabled")?this.findNextItem(n.children[0]):n.children[0]:null},findPrevItem:function(e){var n=e.parentElement.previousElementSibling;return n?!0===t.DomHandler.getAttribute(n,"data-p-disabled")?this.findPrevItem(n.children[0]):n.children[0]:null},findFirstItem:function(){var e=t.DomHandler.findSingle(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"]');return e?e.children[0]:null},findLastItem:function(){var e=t.DomHandler.find(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"]');return e?e[e.length-1].children[0]:null},findActiveItem:function(){var e=t.DomHandler.findSingle(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"][data-p-highlight="true"]');return e?e.children[0]:null},setFocusToMenuitem:function(e,t){e.tabIndex="-1",t.tabIndex="0",t.focus()},onTabKey:function(){var e=t.DomHandler.findSingle(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"][data-p-highlight="true"]'),n=t.DomHandler.findSingle(this.$refs.nav,'[data-pc-section="action"][tabindex="0"]');n!==e.children[0]&&(e&&(e.children[0].tabIndex="0"),n.tabIndex="-1")},visible:function(e){return"function"==typeof e.visible?e.visible():!1!==e.visible},disabled:function(e){return"function"==typeof e.disabled?e.disabled():!0===e.disabled},label:function(e){return"function"==typeof e.label?e.label():e.label},updateInkBar:function(){for(var e=this.$refs.nav.children,n=!1,i=0;i<e.length;i++){var a=e[i];t.DomHandler.getAttribute(a,"data-p-highlight")&&(this.$refs.inkbar.style.width=t.DomHandler.getWidth(a)+"px",this.$refs.inkbar.style.left=t.DomHandler.getOffset(a).left-t.DomHandler.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")},getMenuItemProps:function(e,t){var i=this;return{action:n.mergeProps({class:this.cx("action"),tabindex:-1,onClick:function(n){return i.onItemClick(n,e,t)},onKeyDown:function(n){return i.onKeydownItem(n,e,t)}},this.getPTOptions("action",e,t)),icon:n.mergeProps({class:[this.cx("icon"),e.icon]},this.getPTOptions("icon",e,t)),label:n.mergeProps({class:this.cx("label")},this.getPTOptions("label",e,t))}}},directives:{ripple:o.default}},d=["aria-labelledby","aria-label"],m=["data-p-highlight","data-p-disabled"],u=["href","aria-label","aria-disabled","onClick","onKeydown"],p=["onClick","onKeydown","data-p-highlight","data-p-disabled"],f=["href","target","aria-label","aria-disabled"];c.render=function(e,t,i,a,l,o){var r=n.resolveComponent("router-link"),s=n.resolveDirective("ripple");return n.openBlock(),n.createElementBlock("div",n.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"tabmenu"}),[n.createElementVNode("ul",n.mergeProps({ref:"nav",class:e.cx("menu"),role:"menubar","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel},e.ptm("menu")),[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.model,(function(t,i){return n.openBlock(),n.createElementBlock(n.Fragment,{key:o.label(t)+"_"+i.toString()},[t.to&&!o.disabled(t)?(n.openBlock(),n.createBlock(r,{key:0,to:t.to,custom:""},{default:n.withCtx((function(a){var l=a.navigate,r=a.href,c=a.isActive,d=a.isExactActive;return[o.visible(t)?(n.openBlock(),n.createElementBlock("li",n.mergeProps({key:0,ref_for:!0,ref:"tab",class:[e.cx("menuitem",{item:t,isActive:c,isExactActive:d}),t.class],style:t.style,role:"presentation"},o.getPTOptions("menuitem",t,i),{"data-p-highlight":e.exact?d:c,"data-p-disabled":o.disabled(t)}),[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t,index:i},null,8,["item","index"])):n.withDirectives((n.openBlock(),n.createElementBlock("a",n.mergeProps({key:0,ref_for:!0,ref:"tabLink",role:"menuitem",href:r,class:e.cx("action"),"aria-label":o.label(t),"aria-disabled":o.disabled(t),tabindex:-1,onClick:function(e){return o.onItemClick(e,t,i,l)},onKeydown:function(e){return o.onKeydownItem(e,t,i,l)}},o.getPTOptions("action",t,i)),[e.$slots.itemicon?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.itemicon),{key:0,item:t,class:n.normalizeClass([e.cx("icon"),t.icon])},null,8,["item","class"])):t.icon?(n.openBlock(),n.createElementBlock("span",n.mergeProps({key:1,class:[e.cx("icon"),t.icon]},o.getPTOptions("icon",t,i)),null,16)):n.createCommentVNode("",!0),n.createElementVNode("span",n.mergeProps({class:e.cx("label")},o.getPTOptions("label",t,i)),n.toDisplayString(o.label(t)),17)],16,u)),[[s]])],16,m)):n.createCommentVNode("",!0)]})),_:2},1032,["to"])):o.visible(t)?(n.openBlock(),n.createElementBlock("li",n.mergeProps({key:1,ref_for:!0,ref:"tab",class:[e.cx("menuitem",{item:t,index:i}),t.class],role:"presentation",onClick:function(e){return o.onItemClick(e,t,i)},onKeydown:function(e){return o.onKeydownItem(e,t,i)}},o.getPTOptions("menuitem",t,i),{"data-p-highlight":l.d_activeIndex===i,"data-p-disabled":o.disabled(t)}),[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t,index:i,label:o.label(t),props:o.getMenuItemProps(t,i)},null,8,["item","index","label","props"])):n.withDirectives((n.openBlock(),n.createElementBlock("a",n.mergeProps({key:0,ref_for:!0,ref:"tabLink",role:"menuitem",href:t.url,class:e.cx("action"),target:t.target,"aria-label":o.label(t),"aria-disabled":o.disabled(t),tabindex:-1},o.getPTOptions("action",t,i)),[e.$slots.itemicon?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.itemicon),{key:0,item:t,class:n.normalizeClass([e.cx("icon"),t.icon])},null,8,["item","class"])):t.icon?(n.openBlock(),n.createElementBlock("span",n.mergeProps({key:1,class:[e.cx("icon"),t.icon]},o.getPTOptions("icon",t,i)),null,16)):n.createCommentVNode("",!0),n.createElementVNode("span",n.mergeProps({class:e.cx("label")},o.getPTOptions("label",t,i)),n.toDisplayString(o.label(t)),17)],16,f)),[[s]])],16,p)):n.createCommentVNode("",!0)],64)})),128)),n.createElementVNode("li",n.mergeProps({ref:"inkbar",role:"none",class:e.cx("inkbar")},e.ptm("inkbar")),null,16)],16,d)],16)},module.exports=c;
|
package/tabmenu/tabmenu.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Ripple from 'primevue/ripple';
|
|
2
2
|
import { DomHandler } from 'primevue/utils';
|
|
3
|
+
import { mergeProps, resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createBlock, withCtx, withDirectives, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString } from 'vue';
|
|
3
4
|
import BaseComponent from 'primevue/basecomponent';
|
|
4
5
|
import { useStyle } from 'primevue/usestyle';
|
|
5
|
-
import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, createElementVNode, Fragment, renderList, createBlock, withCtx, withDirectives, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString } from 'vue';
|
|
6
6
|
|
|
7
7
|
var styles = "\n.p-tabmenu {\n overflow-x: auto;\n}\n\n.p-tabmenu-nav {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n flex-wrap: nowrap;\n}\n\n.p-tabmenu-nav a {\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n";
|
|
8
8
|
var classes = {
|
|
@@ -243,6 +243,27 @@ var script = {
|
|
|
243
243
|
this.$refs.inkbar.style.width = '0px';
|
|
244
244
|
this.$refs.inkbar.style.left = '0px';
|
|
245
245
|
}
|
|
246
|
+
},
|
|
247
|
+
getMenuItemProps: function getMenuItemProps(item, index) {
|
|
248
|
+
var _this2 = this;
|
|
249
|
+
return {
|
|
250
|
+
action: mergeProps({
|
|
251
|
+
"class": this.cx('action'),
|
|
252
|
+
tabindex: -1,
|
|
253
|
+
onClick: function onClick($event) {
|
|
254
|
+
return _this2.onItemClick($event, item, index);
|
|
255
|
+
},
|
|
256
|
+
onKeyDown: function onKeyDown($event) {
|
|
257
|
+
return _this2.onKeydownItem($event, item, index);
|
|
258
|
+
}
|
|
259
|
+
}, this.getPTOptions('action', item, index)),
|
|
260
|
+
icon: mergeProps({
|
|
261
|
+
"class": [this.cx('icon'), item.icon]
|
|
262
|
+
}, this.getPTOptions('icon', item, index)),
|
|
263
|
+
label: mergeProps({
|
|
264
|
+
"class": this.cx('label')
|
|
265
|
+
}, this.getPTOptions('label', item, index))
|
|
266
|
+
};
|
|
246
267
|
}
|
|
247
268
|
},
|
|
248
269
|
directives: {
|
|
@@ -368,8 +389,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
368
389
|
}, $options.getPTOptions('label', item, i)), toDisplayString($options.label(item)), 17)], 16, _hoisted_5)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.item), {
|
|
369
390
|
key: 1,
|
|
370
391
|
item: item,
|
|
371
|
-
index: i
|
|
372
|
-
|
|
392
|
+
index: i,
|
|
393
|
+
label: $options.label(item),
|
|
394
|
+
props: $options.getMenuItemProps(item, i)
|
|
395
|
+
}, null, 8, ["item", "index", "label", "props"]))], 16, _hoisted_4)) : createCommentVNode("", true)], 64);
|
|
373
396
|
}), 128)), createElementVNode("li", mergeProps({
|
|
374
397
|
ref: "inkbar",
|
|
375
398
|
role: "none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/ripple";import{DomHandler as t}from"primevue/utils";import
|
|
1
|
+
import e from"primevue/ripple";import{DomHandler as t}from"primevue/utils";import{mergeProps as n,resolveComponent as i,resolveDirective as a,openBlock as l,createElementBlock as s,createElementVNode as r,Fragment as o,renderList as c,createBlock as d,withCtx as u,withDirectives as m,resolveDynamicComponent as p,normalizeClass as f,createCommentVNode as b,toDisplayString as h}from"vue";import v from"primevue/basecomponent";import{useStyle as x}from"primevue/usestyle";var g=x("\n.p-tabmenu {\n overflow-x: auto;\n}\n\n.p-tabmenu-nav {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n flex-wrap: nowrap;\n}\n\n.p-tabmenu-nav a {\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n",{name:"tabmenu",manual:!0}),I={name:"TabMenu",extends:{name:"BaseTabMenu",extends:v,props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},activeIndex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:"p-tabmenu p-component",menu:"p-tabmenu-nav p-reset",menuitem:function(e){var t=e.instance;return["p-tabmenuitem",{"p-highlight":(e.props.exact?e.isExactActive:e.isActive)||t.d_activeIndex===e.index,"p-disabled":t.disabled(e.item)}]},action:"p-menuitem-link",icon:"p-menuitem-icon",label:"p-menuitem-text",inkbar:"p-tabmenu-ink-bar"},loadStyle:g.load},provide:function(){return{$parentInstance:this}}},emits:["update:activeIndex","tab-change"],timeout:null,data:function(){return{d_activeIndex:this.activeIndex}},watch:{$route:function(){var e=this;this.timeout=setTimeout((function(){return e.updateInkBar()}),50)},activeIndex:function(e){this.d_activeIndex=e}},mounted:function(){this.updateInkBar();var e=this.findActiveItem();e&&(e.tabIndex="0")},updated:function(){this.updateInkBar()},beforeUnmount:function(){clearTimeout(this.timeout)},methods:{getPTOptions:function(e,t,n){return this.ptm(e,{context:{item:t,index:n}})},onItemClick:function(e,t,n,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&i&&i(e),n!==this.d_activeIndex&&(this.d_activeIndex=n,this.$emit("update:activeIndex",this.d_activeIndex)),this.$emit("tab-change",{originalEvent:e,index:n}))},onKeydownItem:function(e,t,n,i){switch(e.code){case"ArrowRight":this.navigateToNextItem(e.target),e.preventDefault();break;case"ArrowLeft":this.navigateToPrevItem(e.target),e.preventDefault();break;case"Home":this.navigateToFirstItem(e.target),e.preventDefault();break;case"End":this.navigateToLastItem(e.target),e.preventDefault();break;case"Space":case"Enter":this.onItemClick(e,t,n,i),e.preventDefault();break;case"Tab":this.onTabKey()}},navigateToNextItem:function(e){var t=this.findNextItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToPrevItem:function(e){var t=this.findPrevItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToFirstItem:function(e){var t=this.findFirstItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToLastItem:function(e){var t=this.findLastItem(e);t&&this.setFocusToMenuitem(e,t)},findNextItem:function(e){var n=e.parentElement.nextElementSibling;return n?!0===t.getAttribute(n,"data-p-disabled")?this.findNextItem(n.children[0]):n.children[0]:null},findPrevItem:function(e){var n=e.parentElement.previousElementSibling;return n?!0===t.getAttribute(n,"data-p-disabled")?this.findPrevItem(n.children[0]):n.children[0]:null},findFirstItem:function(){var e=t.findSingle(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"]');return e?e.children[0]:null},findLastItem:function(){var e=t.find(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"]');return e?e[e.length-1].children[0]:null},findActiveItem:function(){var e=t.findSingle(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"][data-p-highlight="true"]');return e?e.children[0]:null},setFocusToMenuitem:function(e,t){e.tabIndex="-1",t.tabIndex="0",t.focus()},onTabKey:function(){var e=t.findSingle(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"][data-p-highlight="true"]'),n=t.findSingle(this.$refs.nav,'[data-pc-section="action"][tabindex="0"]');n!==e.children[0]&&(e&&(e.children[0].tabIndex="0"),n.tabIndex="-1")},visible:function(e){return"function"==typeof e.visible?e.visible():!1!==e.visible},disabled:function(e){return"function"==typeof e.disabled?e.disabled():!0===e.disabled},label:function(e){return"function"==typeof e.label?e.label():e.label},updateInkBar:function(){for(var e=this.$refs.nav.children,n=!1,i=0;i<e.length;i++){var a=e[i];t.getAttribute(a,"data-p-highlight")&&(this.$refs.inkbar.style.width=t.getWidth(a)+"px",this.$refs.inkbar.style.left=t.getOffset(a).left-t.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")},getMenuItemProps:function(e,t){var i=this;return{action:n({class:this.cx("action"),tabindex:-1,onClick:function(n){return i.onItemClick(n,e,t)},onKeyDown:function(n){return i.onKeydownItem(n,e,t)}},this.getPTOptions("action",e,t)),icon:n({class:[this.cx("icon"),e.icon]},this.getPTOptions("icon",e,t)),label:n({class:this.cx("label")},this.getPTOptions("label",e,t))}}},directives:{ripple:e}},y=["aria-labelledby","aria-label"],k=["data-p-highlight","data-p-disabled"],T=["href","aria-label","aria-disabled","onClick","onKeydown"],$=["onClick","onKeydown","data-p-highlight","data-p-disabled"],w=["href","target","aria-label","aria-disabled"];I.render=function(e,t,v,x,g,I){var P=i("router-link"),A=a("ripple");return l(),s("div",n({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"tabmenu"}),[r("ul",n({ref:"nav",class:e.cx("menu"),role:"menubar","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel},e.ptm("menu")),[(l(!0),s(o,null,c(e.model,(function(t,i){return l(),s(o,{key:I.label(t)+"_"+i.toString()},[t.to&&!I.disabled(t)?(l(),d(P,{key:0,to:t.to,custom:""},{default:u((function(a){var o=a.navigate,c=a.href,u=a.isActive,v=a.isExactActive;return[I.visible(t)?(l(),s("li",n({key:0,ref_for:!0,ref:"tab",class:[e.cx("menuitem",{item:t,isActive:u,isExactActive:v}),t.class],style:t.style,role:"presentation"},I.getPTOptions("menuitem",t,i),{"data-p-highlight":e.exact?v:u,"data-p-disabled":I.disabled(t)}),[e.$slots.item?(l(),d(p(e.$slots.item),{key:1,item:t,index:i},null,8,["item","index"])):m((l(),s("a",n({key:0,ref_for:!0,ref:"tabLink",role:"menuitem",href:c,class:e.cx("action"),"aria-label":I.label(t),"aria-disabled":I.disabled(t),tabindex:-1,onClick:function(e){return I.onItemClick(e,t,i,o)},onKeydown:function(e){return I.onKeydownItem(e,t,i,o)}},I.getPTOptions("action",t,i)),[e.$slots.itemicon?(l(),d(p(e.$slots.itemicon),{key:0,item:t,class:f([e.cx("icon"),t.icon])},null,8,["item","class"])):t.icon?(l(),s("span",n({key:1,class:[e.cx("icon"),t.icon]},I.getPTOptions("icon",t,i)),null,16)):b("",!0),r("span",n({class:e.cx("label")},I.getPTOptions("label",t,i)),h(I.label(t)),17)],16,T)),[[A]])],16,k)):b("",!0)]})),_:2},1032,["to"])):I.visible(t)?(l(),s("li",n({key:1,ref_for:!0,ref:"tab",class:[e.cx("menuitem",{item:t,index:i}),t.class],role:"presentation",onClick:function(e){return I.onItemClick(e,t,i)},onKeydown:function(e){return I.onKeydownItem(e,t,i)}},I.getPTOptions("menuitem",t,i),{"data-p-highlight":g.d_activeIndex===i,"data-p-disabled":I.disabled(t)}),[e.$slots.item?(l(),d(p(e.$slots.item),{key:1,item:t,index:i,label:I.label(t),props:I.getMenuItemProps(t,i)},null,8,["item","index","label","props"])):m((l(),s("a",n({key:0,ref_for:!0,ref:"tabLink",role:"menuitem",href:t.url,class:e.cx("action"),target:t.target,"aria-label":I.label(t),"aria-disabled":I.disabled(t),tabindex:-1},I.getPTOptions("action",t,i)),[e.$slots.itemicon?(l(),d(p(e.$slots.itemicon),{key:0,item:t,class:f([e.cx("icon"),t.icon])},null,8,["item","class"])):t.icon?(l(),s("span",n({key:1,class:[e.cx("icon"),t.icon]},I.getPTOptions("icon",t,i)),null,16)):b("",!0),r("span",n({class:e.cx("label")},I.getPTOptions("label",t,i)),h(I.label(t)),17)],16,w)),[[A]])],16,$)):b("",!0)],64)})),128)),r("li",n({ref:"inkbar",role:"none",class:e.cx("inkbar")},e.ptm("inkbar")),null,16)],16,y)],16)};export{I as default};
|
package/tabmenu/tabmenu.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.tabmenu = (function (Ripple, utils, BaseComponent, usestyle
|
|
2
|
+
this.primevue.tabmenu = (function (Ripple, utils, vue, BaseComponent, usestyle) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -246,6 +246,27 @@ this.primevue.tabmenu = (function (Ripple, utils, BaseComponent, usestyle, vue)
|
|
|
246
246
|
this.$refs.inkbar.style.width = '0px';
|
|
247
247
|
this.$refs.inkbar.style.left = '0px';
|
|
248
248
|
}
|
|
249
|
+
},
|
|
250
|
+
getMenuItemProps: function getMenuItemProps(item, index) {
|
|
251
|
+
var _this2 = this;
|
|
252
|
+
return {
|
|
253
|
+
action: vue.mergeProps({
|
|
254
|
+
"class": this.cx('action'),
|
|
255
|
+
tabindex: -1,
|
|
256
|
+
onClick: function onClick($event) {
|
|
257
|
+
return _this2.onItemClick($event, item, index);
|
|
258
|
+
},
|
|
259
|
+
onKeyDown: function onKeyDown($event) {
|
|
260
|
+
return _this2.onKeydownItem($event, item, index);
|
|
261
|
+
}
|
|
262
|
+
}, this.getPTOptions('action', item, index)),
|
|
263
|
+
icon: vue.mergeProps({
|
|
264
|
+
"class": [this.cx('icon'), item.icon]
|
|
265
|
+
}, this.getPTOptions('icon', item, index)),
|
|
266
|
+
label: vue.mergeProps({
|
|
267
|
+
"class": this.cx('label')
|
|
268
|
+
}, this.getPTOptions('label', item, index))
|
|
269
|
+
};
|
|
249
270
|
}
|
|
250
271
|
},
|
|
251
272
|
directives: {
|
|
@@ -371,8 +392,10 @@ this.primevue.tabmenu = (function (Ripple, utils, BaseComponent, usestyle, vue)
|
|
|
371
392
|
}, $options.getPTOptions('label', item, i)), vue.toDisplayString($options.label(item)), 17)], 16, _hoisted_5)), [[_directive_ripple]]) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.item), {
|
|
372
393
|
key: 1,
|
|
373
394
|
item: item,
|
|
374
|
-
index: i
|
|
375
|
-
|
|
395
|
+
index: i,
|
|
396
|
+
label: $options.label(item),
|
|
397
|
+
props: $options.getMenuItemProps(item, i)
|
|
398
|
+
}, null, 8, ["item", "index", "label", "props"]))], 16, _hoisted_4)) : vue.createCommentVNode("", true)], 64);
|
|
376
399
|
}), 128)), vue.createElementVNode("li", vue.mergeProps({
|
|
377
400
|
ref: "inkbar",
|
|
378
401
|
role: "none",
|
|
@@ -384,4 +407,4 @@ this.primevue.tabmenu = (function (Ripple, utils, BaseComponent, usestyle, vue)
|
|
|
384
407
|
|
|
385
408
|
return script;
|
|
386
409
|
|
|
387
|
-
})(primevue.ripple, primevue.utils, primevue.basecomponent, primevue.usestyle
|
|
410
|
+
})(primevue.ripple, primevue.utils, Vue, primevue.basecomponent, primevue.usestyle);
|
package/tabmenu/tabmenu.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.tabmenu=function(e,t,n,i,a){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e),r=l(
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.tabmenu=function(e,t,n,i,a){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e),r=l(i),s=a.useStyle("\n.p-tabmenu {\n overflow-x: auto;\n}\n\n.p-tabmenu-nav {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n flex-wrap: nowrap;\n}\n\n.p-tabmenu-nav a {\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n position: relative;\n text-decoration: none;\n text-decoration: none;\n overflow: hidden;\n}\n\n.p-tabmenu-nav a:focus {\n z-index: 1;\n}\n\n.p-tabmenu-nav .p-menuitem-text {\n line-height: 1;\n}\n\n.p-tabmenu-ink-bar {\n display: none;\n z-index: 1;\n}\n\n.p-tabmenu::-webkit-scrollbar {\n display: none;\n}\n",{name:"tabmenu",manual:!0}),c={name:"TabMenu",extends:{name:"BaseTabMenu",extends:r.default,props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},activeIndex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:"p-tabmenu p-component",menu:"p-tabmenu-nav p-reset",menuitem:function(e){var t=e.instance;return["p-tabmenuitem",{"p-highlight":(e.props.exact?e.isExactActive:e.isActive)||t.d_activeIndex===e.index,"p-disabled":t.disabled(e.item)}]},action:"p-menuitem-link",icon:"p-menuitem-icon",label:"p-menuitem-text",inkbar:"p-tabmenu-ink-bar"},loadStyle:s.load},provide:function(){return{$parentInstance:this}}},emits:["update:activeIndex","tab-change"],timeout:null,data:function(){return{d_activeIndex:this.activeIndex}},watch:{$route:function(){var e=this;this.timeout=setTimeout((function(){return e.updateInkBar()}),50)},activeIndex:function(e){this.d_activeIndex=e}},mounted:function(){this.updateInkBar();var e=this.findActiveItem();e&&(e.tabIndex="0")},updated:function(){this.updateInkBar()},beforeUnmount:function(){clearTimeout(this.timeout)},methods:{getPTOptions:function(e,t,n){return this.ptm(e,{context:{item:t,index:n}})},onItemClick:function(e,t,n,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&i&&i(e),n!==this.d_activeIndex&&(this.d_activeIndex=n,this.$emit("update:activeIndex",this.d_activeIndex)),this.$emit("tab-change",{originalEvent:e,index:n}))},onKeydownItem:function(e,t,n,i){switch(e.code){case"ArrowRight":this.navigateToNextItem(e.target),e.preventDefault();break;case"ArrowLeft":this.navigateToPrevItem(e.target),e.preventDefault();break;case"Home":this.navigateToFirstItem(e.target),e.preventDefault();break;case"End":this.navigateToLastItem(e.target),e.preventDefault();break;case"Space":case"Enter":this.onItemClick(e,t,n,i),e.preventDefault();break;case"Tab":this.onTabKey()}},navigateToNextItem:function(e){var t=this.findNextItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToPrevItem:function(e){var t=this.findPrevItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToFirstItem:function(e){var t=this.findFirstItem(e);t&&this.setFocusToMenuitem(e,t)},navigateToLastItem:function(e){var t=this.findLastItem(e);t&&this.setFocusToMenuitem(e,t)},findNextItem:function(e){var n=e.parentElement.nextElementSibling;return n?!0===t.DomHandler.getAttribute(n,"data-p-disabled")?this.findNextItem(n.children[0]):n.children[0]:null},findPrevItem:function(e){var n=e.parentElement.previousElementSibling;return n?!0===t.DomHandler.getAttribute(n,"data-p-disabled")?this.findPrevItem(n.children[0]):n.children[0]:null},findFirstItem:function(){var e=t.DomHandler.findSingle(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"]');return e?e.children[0]:null},findLastItem:function(){var e=t.DomHandler.find(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"]');return e?e[e.length-1].children[0]:null},findActiveItem:function(){var e=t.DomHandler.findSingle(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"][data-p-highlight="true"]');return e?e.children[0]:null},setFocusToMenuitem:function(e,t){e.tabIndex="-1",t.tabIndex="0",t.focus()},onTabKey:function(){var e=t.DomHandler.findSingle(this.$refs.nav,'[data-pc-section="menuitem"][data-p-disabled="false"][data-p-highlight="true"]'),n=t.DomHandler.findSingle(this.$refs.nav,'[data-pc-section="action"][tabindex="0"]');n!==e.children[0]&&(e&&(e.children[0].tabIndex="0"),n.tabIndex="-1")},visible:function(e){return"function"==typeof e.visible?e.visible():!1!==e.visible},disabled:function(e){return"function"==typeof e.disabled?e.disabled():!0===e.disabled},label:function(e){return"function"==typeof e.label?e.label():e.label},updateInkBar:function(){for(var e=this.$refs.nav.children,n=!1,i=0;i<e.length;i++){var a=e[i];t.DomHandler.getAttribute(a,"data-p-highlight")&&(this.$refs.inkbar.style.width=t.DomHandler.getWidth(a)+"px",this.$refs.inkbar.style.left=t.DomHandler.getOffset(a).left-t.DomHandler.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")},getMenuItemProps:function(e,t){var i=this;return{action:n.mergeProps({class:this.cx("action"),tabindex:-1,onClick:function(n){return i.onItemClick(n,e,t)},onKeyDown:function(n){return i.onKeydownItem(n,e,t)}},this.getPTOptions("action",e,t)),icon:n.mergeProps({class:[this.cx("icon"),e.icon]},this.getPTOptions("icon",e,t)),label:n.mergeProps({class:this.cx("label")},this.getPTOptions("label",e,t))}}},directives:{ripple:o.default}},d=["aria-labelledby","aria-label"],m=["data-p-highlight","data-p-disabled"],u=["href","aria-label","aria-disabled","onClick","onKeydown"],p=["onClick","onKeydown","data-p-highlight","data-p-disabled"],f=["href","target","aria-label","aria-disabled"];return c.render=function(e,t,i,a,l,o){var r=n.resolveComponent("router-link"),s=n.resolveDirective("ripple");return n.openBlock(),n.createElementBlock("div",n.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"tabmenu"}),[n.createElementVNode("ul",n.mergeProps({ref:"nav",class:e.cx("menu"),role:"menubar","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel},e.ptm("menu")),[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.model,(function(t,i){return n.openBlock(),n.createElementBlock(n.Fragment,{key:o.label(t)+"_"+i.toString()},[t.to&&!o.disabled(t)?(n.openBlock(),n.createBlock(r,{key:0,to:t.to,custom:""},{default:n.withCtx((function(a){var l=a.navigate,r=a.href,c=a.isActive,d=a.isExactActive;return[o.visible(t)?(n.openBlock(),n.createElementBlock("li",n.mergeProps({key:0,ref_for:!0,ref:"tab",class:[e.cx("menuitem",{item:t,isActive:c,isExactActive:d}),t.class],style:t.style,role:"presentation"},o.getPTOptions("menuitem",t,i),{"data-p-highlight":e.exact?d:c,"data-p-disabled":o.disabled(t)}),[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t,index:i},null,8,["item","index"])):n.withDirectives((n.openBlock(),n.createElementBlock("a",n.mergeProps({key:0,ref_for:!0,ref:"tabLink",role:"menuitem",href:r,class:e.cx("action"),"aria-label":o.label(t),"aria-disabled":o.disabled(t),tabindex:-1,onClick:function(e){return o.onItemClick(e,t,i,l)},onKeydown:function(e){return o.onKeydownItem(e,t,i,l)}},o.getPTOptions("action",t,i)),[e.$slots.itemicon?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.itemicon),{key:0,item:t,class:n.normalizeClass([e.cx("icon"),t.icon])},null,8,["item","class"])):t.icon?(n.openBlock(),n.createElementBlock("span",n.mergeProps({key:1,class:[e.cx("icon"),t.icon]},o.getPTOptions("icon",t,i)),null,16)):n.createCommentVNode("",!0),n.createElementVNode("span",n.mergeProps({class:e.cx("label")},o.getPTOptions("label",t,i)),n.toDisplayString(o.label(t)),17)],16,u)),[[s]])],16,m)):n.createCommentVNode("",!0)]})),_:2},1032,["to"])):o.visible(t)?(n.openBlock(),n.createElementBlock("li",n.mergeProps({key:1,ref_for:!0,ref:"tab",class:[e.cx("menuitem",{item:t,index:i}),t.class],role:"presentation",onClick:function(e){return o.onItemClick(e,t,i)},onKeydown:function(e){return o.onKeydownItem(e,t,i)}},o.getPTOptions("menuitem",t,i),{"data-p-highlight":l.d_activeIndex===i,"data-p-disabled":o.disabled(t)}),[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t,index:i,label:o.label(t),props:o.getMenuItemProps(t,i)},null,8,["item","index","label","props"])):n.withDirectives((n.openBlock(),n.createElementBlock("a",n.mergeProps({key:0,ref_for:!0,ref:"tabLink",role:"menuitem",href:t.url,class:e.cx("action"),target:t.target,"aria-label":o.label(t),"aria-disabled":o.disabled(t),tabindex:-1},o.getPTOptions("action",t,i)),[e.$slots.itemicon?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.itemicon),{key:0,item:t,class:n.normalizeClass([e.cx("icon"),t.icon])},null,8,["item","class"])):t.icon?(n.openBlock(),n.createElementBlock("span",n.mergeProps({key:1,class:[e.cx("icon"),t.icon]},o.getPTOptions("icon",t,i)),null,16)):n.createCommentVNode("",!0),n.createElementVNode("span",n.mergeProps({class:e.cx("label")},o.getPTOptions("label",t,i)),n.toDisplayString(o.label(t)),17)],16,f)),[[s]])],16,p)):n.createCommentVNode("",!0)],64)})),128)),n.createElementVNode("li",n.mergeProps({ref:"inkbar",role:"none",class:e.cx("inkbar")},e.ptm("inkbar")),null,16)],16,d)],16)},c}(primevue.ripple,primevue.utils,Vue,primevue.basecomponent,primevue.usestyle);
|
package/tabpanel/TabPanel.d.ts
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { AnchorHTMLAttributes, HTMLAttributes, LiHTMLAttributes, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
+
import { PassThroughOptions } from '../passthrough';
|
|
12
13
|
import { TabViewPassThroughOptions } from '../tabview';
|
|
13
|
-
import { ClassComponent, GlobalComponentConstructor,
|
|
14
|
+
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
|
14
15
|
|
|
15
16
|
export declare type TabPanelPassThroughOptionType = TabPanelPassThroughAttributes | ((options: TabPanelPassThroughMethodOptions) => TabPanelPassThroughAttributes | string) | string | null | undefined;
|
|
16
17
|
|
|
@@ -18,10 +19,26 @@ export declare type TabPanelPassThroughOptionType = TabPanelPassThroughAttribute
|
|
|
18
19
|
* Custom passthrough(pt) option method.
|
|
19
20
|
*/
|
|
20
21
|
export interface TabPanelPassThroughMethodOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Defines instance.
|
|
24
|
+
*/
|
|
21
25
|
instance: any;
|
|
26
|
+
/**
|
|
27
|
+
* Defines valid properties.
|
|
28
|
+
*/
|
|
22
29
|
props: TabPanelProps;
|
|
30
|
+
/**
|
|
31
|
+
* Defines parent instance.
|
|
32
|
+
*/
|
|
23
33
|
parent: TabViewPassThroughOptions;
|
|
34
|
+
/**
|
|
35
|
+
* Defines current options.
|
|
36
|
+
*/
|
|
24
37
|
context: TabPanelContext;
|
|
38
|
+
/**
|
|
39
|
+
* Defines passthrough(pt) options in global config.
|
|
40
|
+
*/
|
|
41
|
+
global: object | undefined;
|
|
25
42
|
}
|
|
26
43
|
|
|
27
44
|
/**
|
|
@@ -108,7 +125,12 @@ export interface TabPanelProps {
|
|
|
108
125
|
* Used to pass attributes to DOM elements inside the component.
|
|
109
126
|
* @type {TabPanelPassThroughOptions}
|
|
110
127
|
*/
|
|
111
|
-
pt?:
|
|
128
|
+
pt?: PassThrough<TabPanelPassThroughOptions>;
|
|
129
|
+
/**
|
|
130
|
+
* Used to configure passthrough(pt) options of the component.
|
|
131
|
+
* @type {PassThroughOptions}
|
|
132
|
+
*/
|
|
133
|
+
ptOptions?: PassThroughOptions;
|
|
112
134
|
}
|
|
113
135
|
|
|
114
136
|
/**
|
package/tabview/TabView.d.ts
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { ButtonHTMLAttributes, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
+
import { PassThroughOptions } from '../passthrough';
|
|
12
13
|
import { TabPanelPassThroughOptionType } from '../tabpanel';
|
|
13
|
-
import { ClassComponent, GlobalComponentConstructor,
|
|
14
|
+
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
|
14
15
|
|
|
15
16
|
export declare type TabViewPassThroughOptionType = TabViewPassThroughAttributes | ((options: { props: TabViewProps; state: TabViewState }) => TabViewPassThroughAttributes | string) | string | null | undefined;
|
|
16
17
|
|
|
@@ -181,7 +182,12 @@ export interface TabViewProps {
|
|
|
181
182
|
* Used to pass attributes to DOM elements inside the component.
|
|
182
183
|
* @type {TabViewPassThroughOptions}
|
|
183
184
|
*/
|
|
184
|
-
pt?:
|
|
185
|
+
pt?: PassThrough<TabViewPassThroughOptions>;
|
|
186
|
+
/**
|
|
187
|
+
* Used to configure passthrough(pt) options of the component.
|
|
188
|
+
* @type {PassThroughOptions}
|
|
189
|
+
*/
|
|
190
|
+
ptOptions?: PassThroughOptions;
|
|
185
191
|
/**
|
|
186
192
|
* When enabled, it removes component related styles in the core.
|
|
187
193
|
* @defaultValue false
|
package/tabview/tabview.cjs.js
CHANGED
|
@@ -371,9 +371,9 @@ var script = {
|
|
|
371
371
|
}
|
|
372
372
|
};
|
|
373
373
|
|
|
374
|
-
function _typeof(
|
|
375
|
-
function ownKeys(
|
|
376
|
-
function _objectSpread(
|
|
374
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
375
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
376
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
377
377
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
378
378
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
379
379
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|