primevue 3.34.0 → 3.35.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/README.md +1 -0
- package/accordion/BaseAccordion.vue +17 -15
- package/accordion/accordion.cjs.js +1 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -1
- package/accordion/accordion.min.js +1 -1
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/BaseAutoComplete.vue +81 -79
- package/autocomplete/autocomplete.cjs.js +4 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +4 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +4 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/BaseAvatar.vue +30 -28
- package/avatar/avatar.cjs.js +1 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +1 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +1 -1
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/BaseAvatarGroup.vue +9 -7
- package/avatargroup/avatargroup.cjs.js +1 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +1 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +1 -1
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/BaseBadge.vue +33 -31
- package/badge/badge.cjs.js +1 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +1 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +1 -1
- package/badge/badge.min.js +1 -1
- package/badgedirective/badgedirective.cjs.js +1 -1
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +1 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +1 -1
- package/badgedirective/badgedirective.min.js +1 -1
- package/base/base.cjs.js +1 -1
- package/base/base.cjs.min.js +1 -1
- package/base/base.esm.js +1 -1
- package/base/base.esm.min.js +1 -1
- package/base/base.js +1 -1
- package/base/base.min.js +1 -1
- package/basecomponent/BaseComponent.vue +11 -8
- package/basecomponent/basecomponent.cjs.js +18 -13
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +18 -13
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +18 -13
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +7 -6
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +7 -6
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +7 -6
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BaseBlockUI.vue +12 -10
- package/blockui/BlockUI.vue +2 -0
- package/blockui/blockui.cjs.js +3 -1
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +3 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +3 -1
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/BaseBreadcrumb.vue +32 -30
- package/breadcrumb/Breadcrumb.vue +1 -1
- package/breadcrumb/breadcrumb.cjs.js +2 -2
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +2 -2
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +2 -2
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/BaseCalendar.vue +149 -146
- package/calendar/Calendar.d.ts +11 -5
- package/calendar/Calendar.vue +85 -47
- package/calendar/calendar.cjs.js +162 -118
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +162 -118
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +162 -118
- package/calendar/calendar.min.js +1 -1
- package/carousel/BaseCarousel.vue +70 -68
- package/carousel/carousel.cjs.js +1 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +1 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +1 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/BaseCascadeSelect.vue +81 -79
- package/cascadeselect/cascadeselect.cjs.js +1 -1
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +1 -1
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +1 -1
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/BaseChart.vue +4 -2
- package/chart/chart.cjs.js +1 -1
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +1 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +1 -1
- package/chart/chart.min.js +1 -1
- package/chip/BaseChip.vue +22 -20
- package/chip/chip.cjs.js +1 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +1 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +1 -1
- package/chip/chip.min.js +1 -1
- package/chips/BaseChips.vue +46 -44
- package/chips/chips.cjs.js +1 -1
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -1
- package/chips/chips.min.js +1 -1
- package/colorpicker/BaseColorPicker.vue +8 -6
- package/colorpicker/colorpicker.cjs.js +1 -1
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +1 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +1 -1
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +8 -0
- package/config/PrimeVue.d.ts +3 -0
- package/config/config.cjs.js +5 -0
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +5 -0
- package/config/config.esm.min.js +1 -1
- package/config/config.js +5 -0
- package/config/config.min.js +1 -1
- package/confirmdialog/BaseConfirmDialog.vue +2 -2
- package/confirmdialog/ConfirmDialog.d.ts +22 -0
- package/confirmdialog/ConfirmDialog.vue +15 -10
- package/confirmdialog/confirmdialog.cjs.js +42 -29
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +43 -30
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +42 -29
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/BaseConfirmPopup.vue +72 -70
- package/confirmpopup/ConfirmPopup.d.ts +18 -0
- package/confirmpopup/ConfirmPopup.vue +45 -24
- package/confirmpopup/confirmpopup.cjs.js +14 -10
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +15 -11
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +14 -10
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/BaseContextMenu.vue +41 -39
- package/contextmenu/contextmenu.cjs.js +1 -1
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +1 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +1 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +138 -76
- package/core/core.min.js +18 -18
- package/datatable/BaseDataTable.vue +235 -233
- package/datatable/BodyCell.vue +1 -1
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.d.ts +48 -4
- package/datatable/DataTable.vue +32 -19
- package/datatable/TableBody.vue +1 -1
- package/datatable/datatable.cjs.js +74 -24
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +74 -24
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +74 -24
- package/datatable/datatable.min.js +1 -1
- package/dialog/BaseDialog.vue +136 -130
- package/dialog/Dialog.d.ts +20 -0
- package/dialog/Dialog.vue +54 -50
- package/dialog/dialog.cjs.js +24 -9
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +25 -10
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +24 -9
- package/dialog/dialog.min.js +1 -1
- package/divider/BaseDivider.vue +61 -59
- package/divider/divider.cjs.js +1 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -1
- package/divider/divider.min.js +1 -1
- package/dock/BaseDock.vue +106 -104
- package/dock/dock.cjs.js +1 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +1 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/BaseDropdown.vue +93 -91
- package/dropdown/dropdown.cjs.js +1 -1
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -1
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -1
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/BaseFieldset.vue +19 -17
- package/fieldset/fieldset.cjs.js +1 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +1 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +1 -1
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/BaseFileUpload.vue +44 -42
- package/fileupload/fileupload.cjs.js +1 -1
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +1 -1
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +1 -1
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/BaseGalleria.vue +283 -281
- package/galleria/Galleria.vue +3 -0
- package/galleria/galleria.cjs.js +4 -1
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +4 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +4 -1
- package/galleria/galleria.min.js +1 -1
- package/image/BaseImage.vue +64 -62
- package/image/Image.vue +4 -0
- package/image/image.cjs.js +5 -1
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +5 -1
- package/image/image.esm.min.js +1 -1
- package/image/image.js +5 -1
- package/image/image.min.js +1 -1
- package/inlinemessage/BaseInlineMessage.vue +16 -14
- package/inlinemessage/inlinemessage.cjs.js +1 -1
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +1 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +1 -1
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/BaseInplace.vue +18 -16
- package/inplace/Inplace.vue +1 -1
- package/inplace/inplace.cjs.js +4 -2
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +4 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +4 -2
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/BaseInputNumber.vue +101 -99
- package/inputnumber/InputNumber.vue +4 -4
- package/inputnumber/inputnumber.cjs.js +13 -5
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +13 -5
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +13 -5
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/BaseInputSwitch.vue +20 -18
- package/inputswitch/inputswitch.cjs.js +1 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +1 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +1 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/knob/BaseKnob.vue +14 -12
- package/knob/knob.cjs.js +1 -1
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +1 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +1 -1
- package/knob/knob.min.js +1 -1
- package/listbox/BaseListbox.vue +34 -32
- package/listbox/listbox.cjs.js +1 -1
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +1 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +1 -1
- package/listbox/listbox.min.js +1 -1
- package/megamenu/BaseMegaMenu.vue +111 -109
- package/megamenu/megamenu.cjs.js +1 -1
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +1 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +1 -1
- package/megamenu/megamenu.min.js +1 -1
- package/menu/BaseMenu.vue +19 -17
- package/menu/menu.cjs.js +1 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +1 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +1 -1
- package/menu/menu.min.js +1 -1
- package/menubar/BaseMenubar.vue +72 -70
- package/menubar/Menubar.vue +2 -2
- package/menubar/menubar.cjs.js +3 -3
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +3 -3
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +3 -3
- package/menubar/menubar.min.js +1 -1
- package/message/BaseMessage.vue +49 -47
- package/message/Message.d.ts +10 -0
- package/message/Message.vue +2 -1
- package/message/message.cjs.js +7 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +8 -4
- package/message/message.esm.min.js +1 -1
- package/message/message.js +7 -3
- package/message/message.min.js +1 -1
- package/multiselect/BaseMultiSelect.vue +106 -104
- package/multiselect/multiselect.cjs.js +1 -1
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -1
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -1
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/BaseOrderList.vue +38 -36
- package/orderlist/OrderList.vue +4 -4
- package/orderlist/orderlist.cjs.js +13 -5
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +14 -6
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +13 -5
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/BaseOrganizationChart.vue +53 -51
- package/organizationchart/organizationchart.cjs.js +1 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +1 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/BaseOverlayPanel.vue +70 -68
- package/overlaypanel/OverlayPanel.d.ts +15 -0
- package/overlaypanel/OverlayPanel.vue +11 -8
- package/overlaypanel/overlaypanel.cjs.js +11 -3
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +12 -4
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +11 -3
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/BasePaginator.vue +40 -38
- package/paginator/JumpToPageDropdown.vue +7 -2
- package/paginator/Paginator.d.ts +20 -0
- package/paginator/Paginator.vue +7 -4
- package/paginator/RowsPerPageDropdown.vue +7 -2
- package/paginator/paginator.cjs.js +41 -12
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +42 -13
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +41 -12
- package/paginator/paginator.min.js +1 -1
- package/panel/BasePanel.vue +20 -18
- package/panel/panel.cjs.js +1 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +1 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +1 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/BasePanelMenu.vue +33 -31
- package/panelmenu/panelmenu.cjs.js +1 -1
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1 -1
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +2 -9
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.esm.js +2 -9
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +2 -9
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +5 -5
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +5 -5
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +5 -5
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/BasePassword.vue +27 -25
- package/password/password.cjs.js +1 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +1 -1
- package/password/password.min.js +1 -1
- package/picklist/BasePickList.vue +34 -32
- package/picklist/PickList.vue +12 -12
- package/picklist/picklist.cjs.js +37 -13
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +38 -14
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +37 -13
- package/picklist/picklist.min.js +1 -1
- package/progressbar/BaseProgressBar.vue +99 -97
- package/progressbar/progressbar.cjs.js +1 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +1 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +1 -1
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/BaseProgressSpinner.vue +26 -24
- package/progressspinner/progressspinner.cjs.js +1 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +1 -1
- package/progressspinner/progressspinner.min.js +1 -1
- package/rating/BaseRating.vue +19 -17
- package/rating/Rating.vue +4 -1
- package/rating/rating.cjs.js +7 -5
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +7 -5
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +7 -5
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +5601 -5585
- package/resources/themes/arya-green/theme.css +5601 -5585
- package/resources/themes/arya-orange/theme.css +5601 -5585
- package/resources/themes/arya-purple/theme.css +5601 -5585
- package/resources/themes/bootstrap4-dark-blue/theme.css +5538 -5523
- package/resources/themes/bootstrap4-dark-purple/theme.css +5538 -5523
- package/resources/themes/bootstrap4-light-blue/theme.css +5607 -5592
- package/resources/themes/bootstrap4-light-purple/theme.css +5607 -5592
- package/resources/themes/fluent-light/theme.css +5734 -5718
- package/resources/themes/lara-dark-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5590 -5556
- package/resources/themes/lara-dark-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5590 -5556
- package/resources/themes/lara-dark-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5590 -5556
- package/resources/themes/lara-dark-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5590 -5556
- package/resources/themes/lara-light-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5604 -5570
- package/resources/themes/lara-light-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5604 -5570
- package/resources/themes/lara-light-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5604 -5570
- package/resources/themes/lara-light-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5604 -5570
- package/resources/themes/luna-amber/theme.css +5553 -5539
- package/resources/themes/luna-blue/theme.css +5553 -5539
- package/resources/themes/luna-green/theme.css +5553 -5539
- package/resources/themes/luna-pink/theme.css +5553 -5539
- package/resources/themes/md-dark-deeppurple/theme.css +7052 -7037
- package/resources/themes/md-dark-indigo/theme.css +7052 -7037
- package/resources/themes/md-light-deeppurple/theme.css +7073 -7058
- package/resources/themes/md-light-indigo/theme.css +7073 -7058
- package/resources/themes/mdc-dark-deeppurple/theme.css +7067 -7052
- package/resources/themes/mdc-dark-indigo/theme.css +7067 -7052
- package/resources/themes/mdc-light-deeppurple/theme.css +7074 -7059
- package/resources/themes/mdc-light-indigo/theme.css +7074 -7059
- package/resources/themes/mira/theme.css +5773 -5757
- package/resources/themes/nano/theme.css +5574 -5559
- package/resources/themes/nova/theme.css +5563 -5548
- package/resources/themes/nova-accent/theme.css +5539 -5524
- package/resources/themes/nova-alt/theme.css +5550 -5535
- package/resources/themes/nova-vue/theme.css +5563 -5548
- package/resources/themes/rhea/theme.css +5530 -5515
- package/resources/themes/saga-blue/theme.css +5590 -5574
- package/resources/themes/saga-green/theme.css +5590 -5574
- package/resources/themes/saga-orange/theme.css +5590 -5574
- package/resources/themes/saga-purple/theme.css +5590 -5574
- package/resources/themes/soho-dark/theme.css +5542 -5526
- package/resources/themes/soho-light/theme.css +5602 -5586
- package/resources/themes/tailwind-light/theme.css +5653 -5637
- package/resources/themes/vela-blue/theme.css +5590 -5574
- package/resources/themes/vela-green/theme.css +5590 -5574
- package/resources/themes/vela-orange/theme.css +5590 -5574
- package/resources/themes/vela-purple/theme.css +5590 -5574
- package/resources/themes/viva-dark/theme.css +5709 -5693
- package/resources/themes/viva-light/theme.css +5692 -5676
- package/ripple/ripple.cjs.js +1 -1
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +1 -1
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -1
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/BaseScrollPanel.vue +56 -54
- package/scrollpanel/scrollpanel.cjs.js +1 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +1 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +1 -1
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/BaseScrollTop.vue +33 -31
- package/scrolltop/scrolltop.cjs.js +1 -1
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +1 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +1 -1
- package/scrolltop/scrolltop.min.js +1 -1
- package/sidebar/BaseSidebar.vue +146 -144
- package/sidebar/Sidebar.d.ts +10 -0
- package/sidebar/Sidebar.vue +17 -12
- package/sidebar/sidebar.cjs.js +10 -3
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +11 -4
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +10 -3
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/BaseSkeleton.vue +30 -28
- package/skeleton/skeleton.cjs.js +1 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +1 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +1 -1
- package/skeleton/skeleton.min.js +1 -1
- package/slider/BaseSlider.vue +39 -37
- package/slider/slider.cjs.js +1 -2
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +1 -2
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +1 -2
- package/slider/slider.min.js +1 -1
- package/speeddial/BaseSpeedDial.vue +77 -75
- package/speeddial/SpeedDial.vue +2 -2
- package/speeddial/speeddial.cjs.js +7 -3
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +7 -3
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +7 -3
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/BaseSplitButton.vue +32 -30
- package/splitbutton/SplitButton.vue +2 -1
- package/splitbutton/splitbutton.cjs.js +3 -2
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +3 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +3 -2
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/BaseSplitter.vue +46 -44
- package/splitter/splitter.cjs.js +1 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +1 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +1 -1
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/BaseSplitterPanel.vue +13 -11
- package/splitterpanel/splitterpanel.cjs.js +1 -1
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +1 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +1 -1
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/steps/BaseSteps.vue +52 -50
- package/steps/steps.cjs.js +1 -1
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +1 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +1 -1
- package/steps/steps.min.js +1 -1
- package/tabmenu/BaseTabMenu.vue +40 -38
- package/tabmenu/TabMenu.vue +5 -0
- package/tabmenu/tabmenu.cjs.js +6 -1
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +6 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +6 -1
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/BaseTabView.vue +70 -68
- package/tabview/tabview.cjs.js +1 -1
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +1 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/BaseTag.vue +16 -14
- package/tag/tag.cjs.js +1 -1
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +1 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +1 -1
- package/tag/tag.min.js +1 -1
- package/terminal/BaseTerminal.vue +23 -21
- package/terminal/terminal.cjs.js +1 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +1 -1
- package/terminal/terminal.min.js +1 -1
- package/textarea/BaseTextarea.vue +9 -7
- package/textarea/Textarea.vue +1 -3
- package/textarea/textarea.cjs.js +2 -3
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +2 -3
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +2 -3
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/BaseTieredMenu.vue +40 -38
- package/tieredmenu/tieredmenu.cjs.js +1 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +1 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/BaseTimeline.vue +111 -109
- package/timeline/timeline.cjs.js +1 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +1 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +1 -1
- package/timeline/timeline.min.js +1 -1
- package/toast/BaseToast.vue +73 -71
- package/toast/Toast.d.ts +14 -0
- package/toast/ToastMessage.vue +3 -2
- package/toast/toast.cjs.js +9 -4
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +10 -5
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +9 -4
- package/toast/toast.min.js +1 -1
- package/toolbar/BaseToolbar.vue +21 -19
- package/toolbar/toolbar.cjs.js +1 -2
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +1 -2
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +1 -2
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +1 -1
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +1 -1
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tree/BaseTree.vue +82 -80
- package/tree/Tree.vue +1 -1
- package/tree/TreeNode.vue +1 -1
- package/tree/tree.cjs.js +8 -6
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +9 -7
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +8 -6
- package/tree/tree.min.js +1 -1
- package/treeselect/BaseTreeSelect.vue +51 -49
- package/treeselect/treeselect.cjs.js +1 -1
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +1 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +1 -1
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BaseTreeTable.vue +169 -167
- package/treetable/BodyCell.vue +1 -1
- package/treetable/TreeTable.d.ts +48 -4
- package/treetable/TreeTable.vue +28 -16
- package/treetable/treetable.cjs.js +66 -18
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +66 -18
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +66 -18
- package/treetable/treetable.min.js +1 -1
- package/vetur-attributes.json +4 -0
- package/vetur-tags.json +1 -0
- package/web-types.json +46 -1
package/slider/slider.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.slider=function(e,t,n,i){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(t),o=n.useStyle("\n.p-slider {\n position: relative;\n}\n\n.p-slider .p-slider-handle {\n cursor: grab;\n touch-action: none;\n display: block;\n}\n\n.p-slider-range {\n display: block;\n}\n\n.p-slider-horizontal .p-slider-range {\n top: 0;\n left: 0;\n height: 100%;\n}\n\n.p-slider-horizontal .p-slider-handle {\n top: 50%;\n}\n\n.p-slider-vertical {\n height: 100px;\n}\n\n.p-slider-vertical .p-slider-handle {\n left: 50%;\n}\n\n.p-slider-vertical .p-slider-range {\n bottom: 0;\n left: 0;\n width: 100%;\n}\n",{name:"slider",manual:!0});function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e){if(Array.isArray(e))return h(e)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var m={name:"Slider",extends:{name:"BaseSlider",extends:r.default,props:{modelValue:[Number,Array],min:{type:Number,default:0},max:{type:Number,default:100},orientation:{type:String,default:"horizontal"},step:{type:Number,default:null},range:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.props;return["p-slider p-component",{"p-disabled":t.disabled,"p-slider-horizontal":"horizontal"===t.orientation,"p-slider-vertical":"vertical"===t.orientation}]},range:"p-slider-range",handle:"p-slider-handle"},inlineStyles:{handle:{position:"absolute"},range:{position:"absolute"}},loadStyle:o.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","slideend"],dragging:!1,handleIndex:null,initX:null,initY:null,barWidth:null,barHeight:null,dragListener:null,dragEndListener:null,beforeUnmount:function(){this.unbindDragListeners()},methods:{updateDomData:function(){var t=this.$el.getBoundingClientRect();this.initX=t.left+e.DomHandler.getWindowScrollLeft(),this.initY=t.top+e.DomHandler.getWindowScrollTop(),this.barWidth=this.$el.offsetWidth,this.barHeight=this.$el.offsetHeight},setValue:function(e){var t=("horizontal"===this.orientation?100*((e.touches?e.touches[0].pageX:e.pageX)-this.initX)/this.barWidth:100*(this.initY+this.barHeight-(e.touches?e.touches[0].pageY:e.pageY))/this.barHeight)/100*(this.max-this.min)+this.min;if(this.step){var n=this.range?this.modelValue[this.handleIndex]:this.modelValue,i=t-n;i<0?t=n+Math.ceil(t/this.step-n/this.step)*this.step:i>0&&(t=n+Math.floor(t/this.step-n/this.step)*this.step)}else t=Math.floor(t);this.updateModel(e,t)},updateModel:function(e,t){var n,i,a=parseFloat(t.toFixed(10));this.range?(n=this.modelValue?u(i=this.modelValue)||d(i)||s(i)||l():[],0==this.handleIndex?(a<this.min?a=this.min:a>=this.max&&(a=this.max),n[0]=a):(a>this.max?a=this.max:a<=this.min&&(a=this.min),n[1]=a)):(a<this.min?a=this.min:a>this.max&&(a=this.max),n=a),this.$emit("update:modelValue",n),this.$emit("change",n)},onDragStart:function(e,t){this.disabled||(this.$el.setAttribute("data-p-sliding",!0),this.dragging=!0,this.updateDomData(),this.handleIndex=this.range&&this.modelValue[0]===this.max?0:t,e.currentTarget.focus(),e.preventDefault())},onDrag:function(e){this.dragging&&(this.setValue(e),e.preventDefault())},onDragEnd:function(e){this.dragging&&(this.dragging=!1,this.$el.setAttribute("data-p-sliding",!1),this.$emit("slideend",{originalEvent:e,value:this.modelValue}))},onBarClick:function(t){this.disabled||"handle"!==e.DomHandler.getAttribute(t.target,"data-pc-section")&&(this.updateDomData(),this.setValue(t))},onMouseDown:function(e,t){this.bindDragListeners(),this.onDragStart(e,t)},onKeyDown:function(e,t){switch(this.handleIndex=t,e.code){case"ArrowDown":case"ArrowLeft":this.decrementValue(e,t),e.preventDefault();break;case"ArrowUp":case"ArrowRight":this.incrementValue(e,t),e.preventDefault();break;case"PageDown":this.decrementValue(e,t,!0),e.preventDefault();break;case"PageUp":this.incrementValue(e,t,!0),e.preventDefault();break;case"Home":this.updateModel(e,this.min),e.preventDefault();break;case"End":this.updateModel(e,this.max),e.preventDefault()}},decrementValue:function(e,t){this.updateModel(e,this.range?this.step?this.modelValue[t]-this.step:this.modelValue[t]-1:this.step?this.modelValue-this.step:!this.step&&(arguments.length>2&&void 0!==arguments[2]&&arguments[2])?this.modelValue-10:this.modelValue-1),e.preventDefault()},incrementValue:function(e,t){this.updateModel(e,this.range?this.step?this.modelValue[t]+this.step:this.modelValue[t]+1:this.step?this.modelValue+this.step:!this.step&&(arguments.length>2&&void 0!==arguments[2]&&arguments[2])?this.modelValue+10:this.modelValue+1),e.preventDefault()},bindDragListeners:function(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.dragEndListener))},unbindDragListeners:function(){this.dragListener&&(document.removeEventListener("mousemove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("mouseup",this.dragEndListener),this.dragEndListener=null)}},computed:{horizontal:function(){return"horizontal"===this.orientation},vertical:function(){return"vertical"===this.orientation},rangeStyle:function(){if(this.range){var e=this.rangeEndPosition>this.rangeStartPosition?this.rangeEndPosition-this.rangeStartPosition:this.rangeStartPosition-this.rangeEndPosition,t=this.rangeEndPosition>this.rangeStartPosition?this.rangeStartPosition:this.rangeEndPosition;return this.horizontal?{left:t+"%",width:e+"%"}:{bottom:t+"%",height:e+"%"}}return this.horizontal?{width:this.handlePosition+"%"}:{height:this.handlePosition+"%"}},handleStyle:function(){return this.horizontal?{left:this.handlePosition+"%"}:{bottom:this.handlePosition+"%"}},handlePosition:function(){return this.modelValue<this.min?0:this.modelValue>this.max?100:100*(this.modelValue-this.min)/(this.max-this.min)},rangeStartPosition:function(){return this.modelValue&&this.modelValue[0]?100*(this.modelValue[0]<this.min?0:this.modelValue[0]-this.min)/(this.max-this.min):0},rangeEndPosition:function(){return this.modelValue&&2===this.modelValue.length?100*(this.modelValue[1]>this.max?100:this.modelValue[1]-this.min)/(this.max-this.min):100},rangeStartHandleStyle:function(){return this.horizontal?{left:this.rangeStartPosition+"%"}:{bottom:this.rangeStartPosition+"%"}},rangeEndHandleStyle:function(){return this.horizontal?{left:this.rangeEndPosition+"%"}:{bottom:this.rangeEndPosition+"%"}}}},c=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],p=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],g=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"];return m.render=function(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root"),onClick:t[15]||(t[15]=function(){return o.onBarClick&&o.onBarClick.apply(o,arguments)})},e.ptm("root"),{"data-p-sliding":!1,"data-pc-name":"slider"}),[i.createElementVNode("span",i.mergeProps({class:e.cx("range"),style:[e.sx("range"),o.rangeStyle]},e.ptm("range")),null,16),e.range?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:0,class:e.cx("handle"),style:[e.sx("handle"),o.handleStyle],onTouchstart:t[0]||(t[0]=function(e){return o.onDragStart(e)}),onTouchmove:t[1]||(t[1]=function(e){return o.onDrag(e)}),onTouchend:t[2]||(t[2]=function(e){return o.onDragEnd(e)}),onMousedown:t[3]||(t[3]=function(e){return o.onMouseDown(e)}),onKeydown:t[4]||(t[4]=function(e){return o.onKeyDown(e)}),tabindex:e.tabindex,role:"slider","aria-valuemin":e.min,"aria-valuenow":e.modelValue,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm("handle")),null,16,c)),e.range?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:1,class:e.cx("handle"),style:[e.sx("handle"),o.rangeStartHandleStyle],onTouchstart:t[5]||(t[5]=function(e){return o.onDragStart(e,0)}),onTouchmove:t[6]||(t[6]=function(e){return o.onDrag(e)}),onTouchend:t[7]||(t[7]=function(e){return o.onDragEnd(e)}),onMousedown:t[8]||(t[8]=function(e){return o.onMouseDown(e,0)}),onKeydown:t[9]||(t[9]=function(e){return o.onKeyDown(e,0)}),tabindex:e.tabindex,role:"slider","aria-valuemin":e.min,"aria-valuenow":e.modelValue?e.modelValue[0]:null,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm("startHandler")),null,16,p)):i.createCommentVNode("",!0),e.range?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:2,class:e.cx("handle"),style:[e.sx("handle"),o.rangeEndHandleStyle],onTouchstart:t[10]||(t[10]=function(e){return o.onDragStart(e,1)}),onTouchmove:t[11]||(t[11]=function(e){return o.onDrag(e)}),onTouchend:t[12]||(t[12]=function(e){return o.onDragEnd(e)}),onMousedown:t[13]||(t[13]=function(e){return o.onMouseDown(e,1)}),onKeydown:t[14]||(t[14]=function(e){return o.onKeyDown(e,1)}),tabindex:e.tabindex,role:"slider","aria-valuemin":e.min,"aria-valuenow":e.modelValue?e.modelValue[1]:null,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm("endHandler")),null,16,g)):i.createCommentVNode("",!0)],16)},m}(primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.slider=function(e,t,n,i){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(t),o=n.useStyle("\n@layer primevue {\n .p-slider {\n position: relative;\n }\n \n .p-slider .p-slider-handle {\n cursor: grab;\n touch-action: none;\n display: block;\n }\n \n .p-slider-range {\n display: block;\n }\n \n .p-slider-horizontal .p-slider-range {\n top: 0;\n left: 0;\n height: 100%;\n }\n \n .p-slider-horizontal .p-slider-handle {\n top: 50%;\n }\n \n .p-slider-vertical {\n height: 100px;\n }\n \n .p-slider-vertical .p-slider-handle {\n left: 50%;\n }\n \n .p-slider-vertical .p-slider-range {\n bottom: 0;\n left: 0;\n width: 100%;\n }\n}\n",{name:"slider",manual:!0});function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e){if(Array.isArray(e))return h(e)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var m={name:"Slider",extends:{name:"BaseSlider",extends:r.default,props:{modelValue:[Number,Array],min:{type:Number,default:0},max:{type:Number,default:100},orientation:{type:String,default:"horizontal"},step:{type:Number,default:null},range:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.props;return["p-slider p-component",{"p-disabled":t.disabled,"p-slider-horizontal":"horizontal"===t.orientation,"p-slider-vertical":"vertical"===t.orientation}]},range:"p-slider-range",handle:"p-slider-handle"},inlineStyles:{handle:{position:"absolute"},range:{position:"absolute"}},loadStyle:o.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","slideend"],dragging:!1,handleIndex:null,initX:null,initY:null,barWidth:null,barHeight:null,dragListener:null,dragEndListener:null,beforeUnmount:function(){this.unbindDragListeners()},methods:{updateDomData:function(){var t=this.$el.getBoundingClientRect();this.initX=t.left+e.DomHandler.getWindowScrollLeft(),this.initY=t.top+e.DomHandler.getWindowScrollTop(),this.barWidth=this.$el.offsetWidth,this.barHeight=this.$el.offsetHeight},setValue:function(e){var t=("horizontal"===this.orientation?100*((e.touches?e.touches[0].pageX:e.pageX)-this.initX)/this.barWidth:100*(this.initY+this.barHeight-(e.touches?e.touches[0].pageY:e.pageY))/this.barHeight)/100*(this.max-this.min)+this.min;if(this.step){var n=this.range?this.modelValue[this.handleIndex]:this.modelValue,i=t-n;i<0?t=n+Math.ceil(t/this.step-n/this.step)*this.step:i>0&&(t=n+Math.floor(t/this.step-n/this.step)*this.step)}else t=Math.floor(t);this.updateModel(e,t)},updateModel:function(e,t){var n,i,a=parseFloat(t.toFixed(10));this.range?(n=this.modelValue?u(i=this.modelValue)||d(i)||s(i)||l():[],0==this.handleIndex?(a<this.min?a=this.min:a>=this.max&&(a=this.max),n[0]=a):(a>this.max?a=this.max:a<=this.min&&(a=this.min),n[1]=a)):(a<this.min?a=this.min:a>this.max&&(a=this.max),n=a),this.$emit("update:modelValue",n),this.$emit("change",n)},onDragStart:function(e,t){this.disabled||(this.$el.setAttribute("data-p-sliding",!0),this.dragging=!0,this.updateDomData(),this.handleIndex=this.range&&this.modelValue[0]===this.max?0:t,e.currentTarget.focus(),e.preventDefault())},onDrag:function(e){this.dragging&&(this.setValue(e),e.preventDefault())},onDragEnd:function(e){this.dragging&&(this.dragging=!1,this.$el.setAttribute("data-p-sliding",!1),this.$emit("slideend",{originalEvent:e,value:this.modelValue}))},onBarClick:function(t){this.disabled||"handle"!==e.DomHandler.getAttribute(t.target,"data-pc-section")&&(this.updateDomData(),this.setValue(t))},onMouseDown:function(e,t){this.bindDragListeners(),this.onDragStart(e,t)},onKeyDown:function(e,t){switch(this.handleIndex=t,e.code){case"ArrowDown":case"ArrowLeft":this.decrementValue(e,t),e.preventDefault();break;case"ArrowUp":case"ArrowRight":this.incrementValue(e,t),e.preventDefault();break;case"PageDown":this.decrementValue(e,t,!0),e.preventDefault();break;case"PageUp":this.incrementValue(e,t,!0),e.preventDefault();break;case"Home":this.updateModel(e,this.min),e.preventDefault();break;case"End":this.updateModel(e,this.max),e.preventDefault()}},decrementValue:function(e,t){this.updateModel(e,this.range?this.step?this.modelValue[t]-this.step:this.modelValue[t]-1:this.step?this.modelValue-this.step:!this.step&&(arguments.length>2&&void 0!==arguments[2]&&arguments[2])?this.modelValue-10:this.modelValue-1),e.preventDefault()},incrementValue:function(e,t){this.updateModel(e,this.range?this.step?this.modelValue[t]+this.step:this.modelValue[t]+1:this.step?this.modelValue+this.step:!this.step&&(arguments.length>2&&void 0!==arguments[2]&&arguments[2])?this.modelValue+10:this.modelValue+1),e.preventDefault()},bindDragListeners:function(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.dragEndListener))},unbindDragListeners:function(){this.dragListener&&(document.removeEventListener("mousemove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("mouseup",this.dragEndListener),this.dragEndListener=null)}},computed:{horizontal:function(){return"horizontal"===this.orientation},vertical:function(){return"vertical"===this.orientation},rangeStyle:function(){if(this.range){var e=this.rangeEndPosition>this.rangeStartPosition?this.rangeEndPosition-this.rangeStartPosition:this.rangeStartPosition-this.rangeEndPosition,t=this.rangeEndPosition>this.rangeStartPosition?this.rangeStartPosition:this.rangeEndPosition;return this.horizontal?{left:t+"%",width:e+"%"}:{bottom:t+"%",height:e+"%"}}return this.horizontal?{width:this.handlePosition+"%"}:{height:this.handlePosition+"%"}},handleStyle:function(){return this.horizontal?{left:this.handlePosition+"%"}:{bottom:this.handlePosition+"%"}},handlePosition:function(){return this.modelValue<this.min?0:this.modelValue>this.max?100:100*(this.modelValue-this.min)/(this.max-this.min)},rangeStartPosition:function(){return this.modelValue&&this.modelValue[0]?100*(this.modelValue[0]<this.min?0:this.modelValue[0]-this.min)/(this.max-this.min):0},rangeEndPosition:function(){return this.modelValue&&2===this.modelValue.length?100*(this.modelValue[1]>this.max?100:this.modelValue[1]-this.min)/(this.max-this.min):100},rangeStartHandleStyle:function(){return this.horizontal?{left:this.rangeStartPosition+"%"}:{bottom:this.rangeStartPosition+"%"}},rangeEndHandleStyle:function(){return this.horizontal?{left:this.rangeEndPosition+"%"}:{bottom:this.rangeEndPosition+"%"}}}},c=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],p=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],g=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"];return m.render=function(e,t,n,a,r,o){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root"),onClick:t[15]||(t[15]=function(){return o.onBarClick&&o.onBarClick.apply(o,arguments)})},e.ptm("root"),{"data-p-sliding":!1,"data-pc-name":"slider"}),[i.createElementVNode("span",i.mergeProps({class:e.cx("range"),style:[e.sx("range"),o.rangeStyle]},e.ptm("range")),null,16),e.range?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:0,class:e.cx("handle"),style:[e.sx("handle"),o.handleStyle],onTouchstart:t[0]||(t[0]=function(e){return o.onDragStart(e)}),onTouchmove:t[1]||(t[1]=function(e){return o.onDrag(e)}),onTouchend:t[2]||(t[2]=function(e){return o.onDragEnd(e)}),onMousedown:t[3]||(t[3]=function(e){return o.onMouseDown(e)}),onKeydown:t[4]||(t[4]=function(e){return o.onKeyDown(e)}),tabindex:e.tabindex,role:"slider","aria-valuemin":e.min,"aria-valuenow":e.modelValue,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm("handle")),null,16,c)),e.range?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:1,class:e.cx("handle"),style:[e.sx("handle"),o.rangeStartHandleStyle],onTouchstart:t[5]||(t[5]=function(e){return o.onDragStart(e,0)}),onTouchmove:t[6]||(t[6]=function(e){return o.onDrag(e)}),onTouchend:t[7]||(t[7]=function(e){return o.onDragEnd(e)}),onMousedown:t[8]||(t[8]=function(e){return o.onMouseDown(e,0)}),onKeydown:t[9]||(t[9]=function(e){return o.onKeyDown(e,0)}),tabindex:e.tabindex,role:"slider","aria-valuemin":e.min,"aria-valuenow":e.modelValue?e.modelValue[0]:null,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm("startHandler")),null,16,p)):i.createCommentVNode("",!0),e.range?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:2,class:e.cx("handle"),style:[e.sx("handle"),o.rangeEndHandleStyle],onTouchstart:t[10]||(t[10]=function(e){return o.onDragStart(e,1)}),onTouchmove:t[11]||(t[11]=function(e){return o.onDrag(e)}),onTouchend:t[12]||(t[12]=function(e){return o.onDragEnd(e)}),onMousedown:t[13]||(t[13]=function(e){return o.onMouseDown(e,1)}),onKeydown:t[14]||(t[14]=function(e){return o.onKeyDown(e,1)}),tabindex:e.tabindex,role:"slider","aria-valuemin":e.min,"aria-valuenow":e.modelValue?e.modelValue[1]:null,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm("endHandler")),null,16,g)):i.createCommentVNode("",!0)],16)},m}(primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
@@ -3,81 +3,83 @@ import BaseComponent from 'primevue/basecomponent';
|
|
|
3
3
|
import { useStyle } from 'primevue/usestyle';
|
|
4
4
|
|
|
5
5
|
const styles = `
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.p-speeddial-
|
|
45
|
-
.p-speeddial-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
6
|
+
@layer primevue {
|
|
7
|
+
.p-speeddial {
|
|
8
|
+
position: absolute;
|
|
9
|
+
display: flex;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.p-speeddial-button {
|
|
13
|
+
z-index: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.p-speeddial-list {
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
list-style: none;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
transition: top 0s linear 0.2s;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
z-index: 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.p-speeddial-item {
|
|
29
|
+
transform: scale(0);
|
|
30
|
+
opacity: 0;
|
|
31
|
+
transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;
|
|
32
|
+
will-change: transform;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.p-speeddial-action {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
border-radius: 50%;
|
|
40
|
+
position: relative;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.p-speeddial-circle .p-speeddial-item,
|
|
45
|
+
.p-speeddial-semi-circle .p-speeddial-item,
|
|
46
|
+
.p-speeddial-quarter-circle .p-speeddial-item {
|
|
47
|
+
position: absolute;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.p-speeddial-rotate {
|
|
51
|
+
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
52
|
+
will-change: transform;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.p-speeddial-mask {
|
|
56
|
+
position: absolute;
|
|
57
|
+
left: 0;
|
|
58
|
+
top: 0;
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
opacity: 0;
|
|
62
|
+
transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.p-speeddial-mask-visible {
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
opacity: 1;
|
|
68
|
+
transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.p-speeddial-opened .p-speeddial-list {
|
|
72
|
+
pointer-events: auto;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.p-speeddial-opened .p-speeddial-item {
|
|
76
|
+
transform: scale(1);
|
|
77
|
+
opacity: 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.p-speeddial-opened .p-speeddial-rotate {
|
|
81
|
+
transform: rotate(45deg);
|
|
82
|
+
}
|
|
81
83
|
}
|
|
82
84
|
`;
|
|
83
85
|
|
package/speeddial/SpeedDial.vue
CHANGED
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
>
|
|
18
18
|
<template #icon>
|
|
19
19
|
<slot name="icon" :visible="d_visible">
|
|
20
|
-
<component v-if="d_visible && !!hideIcon" :is="hideIcon ? 'span' : 'PlusIcon'" :class="cx('buttonIcon')" v-bind="ptm('button')['icon']" />
|
|
21
|
-
<component v-else :is="showIcon ? 'span' : 'PlusIcon'" :class="d_visible && !!hideIcon ? hideIcon : showIcon" v-bind="ptm('button')['icon']" />
|
|
20
|
+
<component v-if="d_visible && !!hideIcon" :is="hideIcon ? 'span' : 'PlusIcon'" :class="cx('buttonIcon')" v-bind="ptm('button')['icon']" data-pc-section="icon" />
|
|
21
|
+
<component v-else :is="showIcon ? 'span' : 'PlusIcon'" :class="d_visible && !!hideIcon ? hideIcon : showIcon" v-bind="ptm('button')['icon']" data-pc-section="icon" />
|
|
22
22
|
</slot>
|
|
23
23
|
</template>
|
|
24
24
|
</SDButton>
|
|
@@ -21,7 +21,7 @@ function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function"
|
|
|
21
21
|
function _defineProperty$1(obj, key, value) { key = _toPropertyKey$1(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22
22
|
function _toPropertyKey$1(arg) { var key = _toPrimitive$1(arg, "string"); return _typeof$1(key) === "symbol" ? key : String(key); }
|
|
23
23
|
function _toPrimitive$1(input, hint) { if (_typeof$1(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$1(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
|
-
var styles = "\n.p-speeddial {\n
|
|
24
|
+
var styles = "\n@layer primevue {\n .p-speeddial {\n position: absolute;\n display: flex;\n }\n \n .p-speeddial-button {\n z-index: 1;\n }\n \n .p-speeddial-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: top 0s linear 0.2s;\n pointer-events: none;\n z-index: 2;\n }\n \n .p-speeddial-item {\n transform: scale(0);\n opacity: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;\n will-change: transform;\n }\n \n .p-speeddial-action {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n position: relative;\n overflow: hidden;\n }\n \n .p-speeddial-circle .p-speeddial-item,\n .p-speeddial-semi-circle .p-speeddial-item,\n .p-speeddial-quarter-circle .p-speeddial-item {\n position: absolute;\n }\n \n .p-speeddial-rotate {\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n will-change: transform;\n }\n \n .p-speeddial-mask {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-mask-visible {\n pointer-events: none;\n opacity: 1;\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-opened .p-speeddial-list {\n pointer-events: auto;\n }\n \n .p-speeddial-opened .p-speeddial-item {\n transform: scale(1);\n opacity: 1;\n }\n \n .p-speeddial-opened .p-speeddial-rotate {\n transform: rotate(45deg);\n }\n}\n";
|
|
25
25
|
|
|
26
26
|
/* Direction */
|
|
27
27
|
var inlineStyles = {
|
|
@@ -590,10 +590,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
590
590
|
return [$data.d_visible && !!_ctx.hideIcon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.hideIcon ? 'span' : 'PlusIcon'), vue.mergeProps({
|
|
591
591
|
key: 0,
|
|
592
592
|
"class": _ctx.cx('buttonIcon')
|
|
593
|
-
}, _ctx.ptm('button')['icon']
|
|
593
|
+
}, _ctx.ptm('button')['icon'], {
|
|
594
|
+
"data-pc-section": "icon"
|
|
595
|
+
}), null, 16, ["class"])) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.showIcon ? 'span' : 'PlusIcon'), vue.mergeProps({
|
|
594
596
|
key: 1,
|
|
595
597
|
"class": $data.d_visible && !!_ctx.hideIcon ? _ctx.hideIcon : _ctx.showIcon
|
|
596
|
-
}, _ctx.ptm('button')['icon']
|
|
598
|
+
}, _ctx.ptm('button')['icon'], {
|
|
599
|
+
"data-pc-section": "icon"
|
|
600
|
+
}), null, 16, ["class"]))];
|
|
597
601
|
})];
|
|
598
602
|
}),
|
|
599
603
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/button"),t=require("primevue/icons/plus"),n=require("primevue/ripple"),i=require("primevue/tooltip"),o=require("primevue/utils"),r=require("primevue/basecomponent"),s=require("primevue/usestyle"),a=require("vue");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(e),d=c(t),u=c(n),p=c(i),f=c(r);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){var t=y(e,"string");return"symbol"===m(t)?t:String(t)}function y(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==m(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var v={root:function(e){var t,n=e.instance,i=e.props;return["p-speeddial p-component p-speeddial-".concat(i.type),(t={},h(t,"p-speeddial-direction-".concat(i.direction),"circle"!==i.type),h(t,"p-speeddial-opened",n.d_visible),h(t,"p-disabled",i.disabled),t)]},button:function(e){var t=e.props;return["p-speeddial-button p-button-rounded",{"p-speeddial-rotate":t.rotateAnimation&&!t.hideIcon}]},menu:"p-speeddial-list",menuitem:function(e){return["p-speeddial-item",{"p-focus":e.instance.isItemActive(e.id)}]},action:function(e){return["p-speeddial-action",{"p-disabled":e.item.disabled}]},actionIcon:"p-speeddial-action-icon",mask:function(e){return["p-speeddial-mask",{"p-speeddial-mask-visible":e.instance.d_visible}]}},g=s.useStyle("\n.p-speeddial {\n position: absolute;\n display: flex;\n}\n\n.p-speeddial-button {\n z-index: 1;\n}\n\n.p-speeddial-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: top 0s linear 0.2s;\n pointer-events: none;\n z-index: 2;\n}\n\n.p-speeddial-item {\n transform: scale(0);\n opacity: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;\n will-change: transform;\n}\n\n.p-speeddial-action {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n position: relative;\n overflow: hidden;\n}\n\n.p-speeddial-circle .p-speeddial-item,\n.p-speeddial-semi-circle .p-speeddial-item,\n.p-speeddial-quarter-circle .p-speeddial-item {\n position: absolute;\n}\n\n.p-speeddial-rotate {\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n will-change: transform;\n}\n\n.p-speeddial-mask {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.p-speeddial-mask-visible {\n pointer-events: none;\n opacity: 1;\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.p-speeddial-opened .p-speeddial-list {\n pointer-events: auto;\n}\n\n.p-speeddial-opened .p-speeddial-item {\n transform: scale(1);\n opacity: 1;\n}\n\n.p-speeddial-opened .p-speeddial-rotate {\n transform: rotate(45deg);\n}\n",{name:"speeddial",manual:!0});function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){var t=C(e,"string");return"symbol"===k(t)?t:String(t)}function C(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==k(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function O(e){return B(e)||A(e)||P(e)||S()}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function A(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function B(e){if(Array.isArray(e))return E(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var j={name:"SpeedDial",extends:{name:"BaseSpeedDial",extends:f.default,props:{model:null,visible:{type:Boolean,default:!1},direction:{type:String,default:"up"},transitionDelay:{type:Number,default:30},type:{type:String,default:"linear"},radius:{type:Number,default:0},mask:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hideOnClickOutside:{type:Boolean,default:!0},buttonClass:null,maskStyle:null,maskClass:null,showIcon:{type:String,default:void 0},hideIcon:{type:String,default:void 0},rotateAnimation:{type:Boolean,default:!0},tooltipOptions:null,style:null,class:null,"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:v,inlineStyles:{root:function(e){var t=e.props;return{alignItems:"up"===t.direction||"down"===t.direction?"center":"",justifyContent:"left"===t.direction||"right"===t.direction?"center":"",flexDirection:"up"===t.direction?"column-reverse":"down"===t.direction?"column":"left"===t.direction?"row-reverse":"right"===t.direction?"row":null}},menu:function(e){var t=e.props;return{flexDirection:"up"===t.direction?"column-reverse":"down"===t.direction?"column":"left"===t.direction?"row-reverse":"right"===t.direction?"row":null}}},loadStyle:g.load},provide:function(){return{$parentInstance:this}}},emits:["click","show","hide","focus","blur"],documentClickListener:null,container:null,list:null,data:function(){return{id:this.$attrs.id,d_visible:this.visible,isItemClicked:!1,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||o.UniqueComponentId()},visible:function(e){this.d_visible=e}},mounted:function(){if(this.id=this.id||o.UniqueComponentId(),"linear"!==this.type){var e=o.DomHandler.findSingle(this.container,'[data-pc-section="button"]'),t=o.DomHandler.findSingle(this.list,'[data-pc-section="menuitem"]');if(e&&t){var n=Math.abs(e.offsetWidth-t.offsetWidth),i=Math.abs(e.offsetHeight-t.offsetHeight);this.list.style.setProperty("--item-diff-x","".concat(n/2,"px")),this.list.style.setProperty("--item-diff-y","".concat(i/2,"px"))}}this.hideOnClickOutside&&this.bindDocumentClickListener()},beforeMount:function(){this.unbindDocumentClickListener()},methods:{getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isItemActive(e),hidden:!this.d_visible}})},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onItemClick:function(e,t){t.command&&t.command({originalEvent:e,item:t}),this.hide(),this.isItemClicked=!0,e.preventDefault()},onClick:function(e){this.d_visible?this.hide():this.show(),this.isItemClicked=!0,this.$emit("click",e)},show:function(){this.d_visible=!0,this.$emit("show")},hide:function(){this.d_visible=!1,this.$emit("hide")},calculateTransitionDelay:function(e){return(this.d_visible?e:this.model.length-e-1)*this.transitionDelay},onTogglerKeydown:function(e){switch(e.code){case"ArrowDown":case"ArrowLeft":this.onTogglerArrowDown(e);break;case"ArrowUp":case"ArrowRight":this.onTogglerArrowUp(e);break;case"Escape":this.onEscapeKey()}},onKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"ArrowRight":this.onArrowRight(e);break;case"Enter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e)}},onTogglerArrowUp:function(e){this.focused=!0,o.DomHandler.focus(this.list),this.show(),this.navigatePrevItem(e),e.preventDefault()},onTogglerArrowDown:function(e){this.focused=!0,o.DomHandler.focus(this.list),this.show(),this.navigateNextItem(e),e.preventDefault()},onEnterKey:function(e){var t=this,n=O(o.DomHandler.find(this.container,'[data-pc-section="menuitem"]')).findIndex((function(e){return e.id===t.focusedOptionIndex}));this.onItemClick(e,this.model[n]),this.onBlur(e);var i=o.DomHandler.findSingle(this.container,"button");i&&o.DomHandler.focus(i)},onEscapeKey:function(){this.hide();var e=o.DomHandler.findSingle(this.container,"button");e&&o.DomHandler.focus(e)},onArrowUp:function(e){"up"===this.direction?this.navigateNextItem(e):"down"===this.direction?this.navigatePrevItem(e):this.navigateNextItem(e)},onArrowDown:function(e){"up"===this.direction?this.navigatePrevItem(e):"down"===this.direction?this.navigateNextItem(e):this.navigatePrevItem(e)},onArrowLeft:function(e){["left","up-right","down-left"].includes(this.direction)?this.navigateNextItem(e):(["right","up-left","down-right"].includes(this.direction),this.navigatePrevItem(e))},onArrowRight:function(e){["left","up-right","down-left"].includes(this.direction)?this.navigatePrevItem(e):(["right","up-left","down-right"].includes(this.direction),this.navigateNextItem(e))},onEndKey:function(e){e.preventDefault(),this.focusedOptionIndex=-1,this.navigatePrevItem(e)},onHomeKey:function(e){e.preventDefault(),this.focusedOptionIndex=-1,this.navigateNextItem(e)},navigateNextItem:function(e){var t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()},navigatePrevItem:function(e){var t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()},changeFocusedOptionIndex:function(e){var t=O(o.DomHandler.find(this.container,'[data-pc-section="menuitem"]')).filter((function(e){return!o.DomHandler.hasClass(o.DomHandler.findSingle(e,"a"),"p-disabled")}));t[e]&&(this.focusedOptionIndex=t[e].getAttribute("id"))},findPrevOptionIndex:function(e){var t=O(o.DomHandler.find(this.container,'[data-pc-section="menuitem"]')).filter((function(e){return!o.DomHandler.hasClass(o.DomHandler.findSingle(e,"a"),"p-disabled")})),n=-1===e?t[t.length-1].id:e,i=t.findIndex((function(e){return e.getAttribute("id")===n}));return i=-1===e?t.length-1:i-1},findNextOptionIndex:function(e){var t=O(o.DomHandler.find(this.container,'[data-pc-section="menuitem"]')).filter((function(e){return!o.DomHandler.hasClass(o.DomHandler.findSingle(e,"a"),"p-disabled")})),n=-1===e?t[0].id:e,i=t.findIndex((function(e){return e.getAttribute("id")===n}));return i=-1===e?0:i+1},calculatePointStyle:function(e){var t=this.type;if("linear"!==t){var n=this.model.length,i=this.radius||20*n;if("circle"===t){var o=2*Math.PI/n;return{left:"calc(".concat(i*Math.cos(o*e),"px + var(--item-diff-x, 0px))"),top:"calc(".concat(i*Math.sin(o*e),"px + var(--item-diff-y, 0px))")}}if("semi-circle"===t){var r=this.direction,s=Math.PI/(n-1),a="calc(".concat(i*Math.cos(s*e),"px + var(--item-diff-x, 0px))"),c="calc(".concat(i*Math.sin(s*e),"px + var(--item-diff-y, 0px))");if("up"===r)return{left:a,bottom:c};if("down"===r)return{left:a,top:c};if("left"===r)return{right:c,top:a};if("right"===r)return{left:c,top:a}}else if("quarter-circle"===t){var l=this.direction,d=Math.PI/(2*(n-1)),u="calc(".concat(i*Math.cos(d*e),"px + var(--item-diff-x, 0px))"),p="calc(".concat(i*Math.sin(d*e),"px + var(--item-diff-y, 0px))");if("up-left"===l)return{right:u,bottom:p};if("up-right"===l)return{left:u,bottom:p};if("down-left"===l)return{right:p,top:u};if("down-right"===l)return{left:p,top:u}}}return{}},getItemStyle:function(e){var t=this.calculateTransitionDelay(e),n=this.calculatePointStyle(e);return I({transitionDelay:"".concat(t,"ms")},n)},bindDocumentClickListener:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.d_visible&&e.isOutsideClicked(t)&&e.hide(),e.isItemClicked=!1},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},isOutsideClicked:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.isItemClicked)},isItemVisible:function(e){return"function"==typeof e.visible?e.visible():!1!==e.visible},isItemActive:function(e){return e===this.focusedOptionId},containerRef:function(e){this.container=e},listRef:function(e){this.list=e}},computed:{containerClass:function(){return[this.cx("root"),this.class]},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},components:{SDButton:l.default,PlusIcon:d.default},directives:{ripple:u.default,tooltip:p.default}},H=["id","aria-activedescendant"],_=["id","aria-controls"],N=["href","target","onClick","aria-label"];j.render=function(e,t,n,i,o,r){var s=a.resolveComponent("SDButton"),c=a.resolveDirective("ripple"),l=a.resolveDirective("tooltip");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",a.mergeProps({ref:r.containerRef,class:r.containerClass,style:[e.style,e.sx("root")]},e.ptm("root"),{"data-pc-name":"speeddial"}),[a.renderSlot(e.$slots,"button",{onClick:r.onClick},(function(){return[a.createVNode(s,{type:"button",class:a.normalizeClass([e.cx("button"),e.buttonClass]),onClick:t[0]||(t[0]=function(e){return r.onClick(e)}),disabled:e.disabled,onKeydown:r.onTogglerKeydown,"aria-expanded":o.d_visible,"aria-haspopup":!0,"aria-controls":o.id+"_list","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,pt:e.ptm("button"),unstyled:e.unstyled},{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"icon",{visible:o.d_visible},(function(){return[o.d_visible&&e.hideIcon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"span":"PlusIcon"),a.mergeProps({key:0,class:e.cx("buttonIcon")},e.ptm("button").icon),null,16,["class"])):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"span":"PlusIcon"),a.mergeProps({key:1,class:o.d_visible&&e.hideIcon?e.hideIcon:e.showIcon},e.ptm("button").icon),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onKeydown","aria-expanded","aria-controls","aria-label","aria-labelledby","pt","unstyled"])]})),a.createElementVNode("ul",a.mergeProps({ref:r.listRef,id:o.id+"_list",class:e.cx("menu"),style:e.sx("menu"),role:"menu","aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:"-1",onFocus:t[1]||(t[1]=function(){return r.onFocus&&r.onFocus.apply(r,arguments)}),onBlur:t[2]||(t[2]=function(){return r.onBlur&&r.onBlur.apply(r,arguments)}),onKeydown:t[3]||(t[3]=function(){return r.onKeyDown&&r.onKeyDown.apply(r,arguments)})},e.ptm("menu")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.model,(function(t,n){return a.openBlock(),a.createElementBlock(a.Fragment,{key:n},[r.isItemVisible(t)?(a.openBlock(),a.createElementBlock("li",a.mergeProps({key:0,id:"".concat(o.id,"_").concat(n),"aria-controls":"".concat(o.id,"_item"),class:e.cx("menuitem",{id:"".concat(o.id,"_").concat(n)}),style:r.getItemStyle(n),role:"menuitem"},r.getPTOptions("".concat(o.id,"_").concat(n),"menuitem")),[e.$slots.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.$slots.item),{key:1,item:t,onClick:function(e){return r.onItemClick(e,t)}},null,8,["item","onClick"])):a.withDirectives((a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,tabindex:-1,href:t.url||"#",role:"menuitem",class:e.cx("action",{item:t}),target:t.target,onClick:function(e){return r.onItemClick(e,t)},"aria-label":t.label},r.getPTOptions("".concat(o.id,"_").concat(n),"action")),[t.icon?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:0,class:[e.cx("actionIcon"),t.icon]},r.getPTOptions("".concat(o.id,"_").concat(n),"actionIcon")),null,16)):a.createCommentVNode("",!0)],16,N)),[[c],[l,{value:t.label,disabled:!e.tooltipOptions},e.tooltipOptions]])],16,_)):a.createCommentVNode("",!0)],64)})),128))],16,H)],16),e.mask?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:[e.cx("mask"),e.maskClass],style:e.maskStyle},e.ptm("mask")),null,16)):a.createCommentVNode("",!0)],64)},module.exports=j;
|
|
1
|
+
"use strict";var e=require("primevue/button"),t=require("primevue/icons/plus"),n=require("primevue/ripple"),i=require("primevue/tooltip"),o=require("primevue/utils"),r=require("primevue/basecomponent"),s=require("primevue/usestyle"),a=require("vue");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(e),d=c(t),u=c(n),p=c(i),f=c(r);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){var t=y(e,"string");return"symbol"===m(t)?t:String(t)}function y(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==m(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var v={root:function(e){var t,n=e.instance,i=e.props;return["p-speeddial p-component p-speeddial-".concat(i.type),(t={},h(t,"p-speeddial-direction-".concat(i.direction),"circle"!==i.type),h(t,"p-speeddial-opened",n.d_visible),h(t,"p-disabled",i.disabled),t)]},button:function(e){var t=e.props;return["p-speeddial-button p-button-rounded",{"p-speeddial-rotate":t.rotateAnimation&&!t.hideIcon}]},menu:"p-speeddial-list",menuitem:function(e){return["p-speeddial-item",{"p-focus":e.instance.isItemActive(e.id)}]},action:function(e){return["p-speeddial-action",{"p-disabled":e.item.disabled}]},actionIcon:"p-speeddial-action-icon",mask:function(e){return["p-speeddial-mask",{"p-speeddial-mask-visible":e.instance.d_visible}]}},g=s.useStyle("\n@layer primevue {\n .p-speeddial {\n position: absolute;\n display: flex;\n }\n \n .p-speeddial-button {\n z-index: 1;\n }\n \n .p-speeddial-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: top 0s linear 0.2s;\n pointer-events: none;\n z-index: 2;\n }\n \n .p-speeddial-item {\n transform: scale(0);\n opacity: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;\n will-change: transform;\n }\n \n .p-speeddial-action {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n position: relative;\n overflow: hidden;\n }\n \n .p-speeddial-circle .p-speeddial-item,\n .p-speeddial-semi-circle .p-speeddial-item,\n .p-speeddial-quarter-circle .p-speeddial-item {\n position: absolute;\n }\n \n .p-speeddial-rotate {\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n will-change: transform;\n }\n \n .p-speeddial-mask {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-mask-visible {\n pointer-events: none;\n opacity: 1;\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-opened .p-speeddial-list {\n pointer-events: auto;\n }\n \n .p-speeddial-opened .p-speeddial-item {\n transform: scale(1);\n opacity: 1;\n }\n \n .p-speeddial-opened .p-speeddial-rotate {\n transform: rotate(45deg);\n }\n}\n",{name:"speeddial",manual:!0});function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){var t=C(e,"string");return"symbol"===k(t)?t:String(t)}function C(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==k(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function O(e){return B(e)||A(e)||P(e)||S()}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function A(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function B(e){if(Array.isArray(e))return E(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var j={name:"SpeedDial",extends:{name:"BaseSpeedDial",extends:f.default,props:{model:null,visible:{type:Boolean,default:!1},direction:{type:String,default:"up"},transitionDelay:{type:Number,default:30},type:{type:String,default:"linear"},radius:{type:Number,default:0},mask:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hideOnClickOutside:{type:Boolean,default:!0},buttonClass:null,maskStyle:null,maskClass:null,showIcon:{type:String,default:void 0},hideIcon:{type:String,default:void 0},rotateAnimation:{type:Boolean,default:!0},tooltipOptions:null,style:null,class:null,"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:v,inlineStyles:{root:function(e){var t=e.props;return{alignItems:"up"===t.direction||"down"===t.direction?"center":"",justifyContent:"left"===t.direction||"right"===t.direction?"center":"",flexDirection:"up"===t.direction?"column-reverse":"down"===t.direction?"column":"left"===t.direction?"row-reverse":"right"===t.direction?"row":null}},menu:function(e){var t=e.props;return{flexDirection:"up"===t.direction?"column-reverse":"down"===t.direction?"column":"left"===t.direction?"row-reverse":"right"===t.direction?"row":null}}},loadStyle:g.load},provide:function(){return{$parentInstance:this}}},emits:["click","show","hide","focus","blur"],documentClickListener:null,container:null,list:null,data:function(){return{id:this.$attrs.id,d_visible:this.visible,isItemClicked:!1,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||o.UniqueComponentId()},visible:function(e){this.d_visible=e}},mounted:function(){if(this.id=this.id||o.UniqueComponentId(),"linear"!==this.type){var e=o.DomHandler.findSingle(this.container,'[data-pc-section="button"]'),t=o.DomHandler.findSingle(this.list,'[data-pc-section="menuitem"]');if(e&&t){var n=Math.abs(e.offsetWidth-t.offsetWidth),i=Math.abs(e.offsetHeight-t.offsetHeight);this.list.style.setProperty("--item-diff-x","".concat(n/2,"px")),this.list.style.setProperty("--item-diff-y","".concat(i/2,"px"))}}this.hideOnClickOutside&&this.bindDocumentClickListener()},beforeMount:function(){this.unbindDocumentClickListener()},methods:{getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isItemActive(e),hidden:!this.d_visible}})},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onItemClick:function(e,t){t.command&&t.command({originalEvent:e,item:t}),this.hide(),this.isItemClicked=!0,e.preventDefault()},onClick:function(e){this.d_visible?this.hide():this.show(),this.isItemClicked=!0,this.$emit("click",e)},show:function(){this.d_visible=!0,this.$emit("show")},hide:function(){this.d_visible=!1,this.$emit("hide")},calculateTransitionDelay:function(e){return(this.d_visible?e:this.model.length-e-1)*this.transitionDelay},onTogglerKeydown:function(e){switch(e.code){case"ArrowDown":case"ArrowLeft":this.onTogglerArrowDown(e);break;case"ArrowUp":case"ArrowRight":this.onTogglerArrowUp(e);break;case"Escape":this.onEscapeKey()}},onKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"ArrowRight":this.onArrowRight(e);break;case"Enter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e)}},onTogglerArrowUp:function(e){this.focused=!0,o.DomHandler.focus(this.list),this.show(),this.navigatePrevItem(e),e.preventDefault()},onTogglerArrowDown:function(e){this.focused=!0,o.DomHandler.focus(this.list),this.show(),this.navigateNextItem(e),e.preventDefault()},onEnterKey:function(e){var t=this,n=O(o.DomHandler.find(this.container,'[data-pc-section="menuitem"]')).findIndex((function(e){return e.id===t.focusedOptionIndex}));this.onItemClick(e,this.model[n]),this.onBlur(e);var i=o.DomHandler.findSingle(this.container,"button");i&&o.DomHandler.focus(i)},onEscapeKey:function(){this.hide();var e=o.DomHandler.findSingle(this.container,"button");e&&o.DomHandler.focus(e)},onArrowUp:function(e){"up"===this.direction?this.navigateNextItem(e):"down"===this.direction?this.navigatePrevItem(e):this.navigateNextItem(e)},onArrowDown:function(e){"up"===this.direction?this.navigatePrevItem(e):"down"===this.direction?this.navigateNextItem(e):this.navigatePrevItem(e)},onArrowLeft:function(e){["left","up-right","down-left"].includes(this.direction)?this.navigateNextItem(e):(["right","up-left","down-right"].includes(this.direction),this.navigatePrevItem(e))},onArrowRight:function(e){["left","up-right","down-left"].includes(this.direction)?this.navigatePrevItem(e):(["right","up-left","down-right"].includes(this.direction),this.navigateNextItem(e))},onEndKey:function(e){e.preventDefault(),this.focusedOptionIndex=-1,this.navigatePrevItem(e)},onHomeKey:function(e){e.preventDefault(),this.focusedOptionIndex=-1,this.navigateNextItem(e)},navigateNextItem:function(e){var t=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()},navigatePrevItem:function(e){var t=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(t),e.preventDefault()},changeFocusedOptionIndex:function(e){var t=O(o.DomHandler.find(this.container,'[data-pc-section="menuitem"]')).filter((function(e){return!o.DomHandler.hasClass(o.DomHandler.findSingle(e,"a"),"p-disabled")}));t[e]&&(this.focusedOptionIndex=t[e].getAttribute("id"))},findPrevOptionIndex:function(e){var t=O(o.DomHandler.find(this.container,'[data-pc-section="menuitem"]')).filter((function(e){return!o.DomHandler.hasClass(o.DomHandler.findSingle(e,"a"),"p-disabled")})),n=-1===e?t[t.length-1].id:e,i=t.findIndex((function(e){return e.getAttribute("id")===n}));return i=-1===e?t.length-1:i-1},findNextOptionIndex:function(e){var t=O(o.DomHandler.find(this.container,'[data-pc-section="menuitem"]')).filter((function(e){return!o.DomHandler.hasClass(o.DomHandler.findSingle(e,"a"),"p-disabled")})),n=-1===e?t[0].id:e,i=t.findIndex((function(e){return e.getAttribute("id")===n}));return i=-1===e?0:i+1},calculatePointStyle:function(e){var t=this.type;if("linear"!==t){var n=this.model.length,i=this.radius||20*n;if("circle"===t){var o=2*Math.PI/n;return{left:"calc(".concat(i*Math.cos(o*e),"px + var(--item-diff-x, 0px))"),top:"calc(".concat(i*Math.sin(o*e),"px + var(--item-diff-y, 0px))")}}if("semi-circle"===t){var r=this.direction,s=Math.PI/(n-1),a="calc(".concat(i*Math.cos(s*e),"px + var(--item-diff-x, 0px))"),c="calc(".concat(i*Math.sin(s*e),"px + var(--item-diff-y, 0px))");if("up"===r)return{left:a,bottom:c};if("down"===r)return{left:a,top:c};if("left"===r)return{right:c,top:a};if("right"===r)return{left:c,top:a}}else if("quarter-circle"===t){var l=this.direction,d=Math.PI/(2*(n-1)),u="calc(".concat(i*Math.cos(d*e),"px + var(--item-diff-x, 0px))"),p="calc(".concat(i*Math.sin(d*e),"px + var(--item-diff-y, 0px))");if("up-left"===l)return{right:u,bottom:p};if("up-right"===l)return{left:u,bottom:p};if("down-left"===l)return{right:p,top:u};if("down-right"===l)return{left:p,top:u}}}return{}},getItemStyle:function(e){var t=this.calculateTransitionDelay(e),n=this.calculatePointStyle(e);return I({transitionDelay:"".concat(t,"ms")},n)},bindDocumentClickListener:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.d_visible&&e.isOutsideClicked(t)&&e.hide(),e.isItemClicked=!1},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},isOutsideClicked:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.isItemClicked)},isItemVisible:function(e){return"function"==typeof e.visible?e.visible():!1!==e.visible},isItemActive:function(e){return e===this.focusedOptionId},containerRef:function(e){this.container=e},listRef:function(e){this.list=e}},computed:{containerClass:function(){return[this.cx("root"),this.class]},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},components:{SDButton:l.default,PlusIcon:d.default},directives:{ripple:u.default,tooltip:p.default}},H=["id","aria-activedescendant"],_=["id","aria-controls"],N=["href","target","onClick","aria-label"];j.render=function(e,t,n,i,o,r){var s=a.resolveComponent("SDButton"),c=a.resolveDirective("ripple"),l=a.resolveDirective("tooltip");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",a.mergeProps({ref:r.containerRef,class:r.containerClass,style:[e.style,e.sx("root")]},e.ptm("root"),{"data-pc-name":"speeddial"}),[a.renderSlot(e.$slots,"button",{onClick:r.onClick},(function(){return[a.createVNode(s,{type:"button",class:a.normalizeClass([e.cx("button"),e.buttonClass]),onClick:t[0]||(t[0]=function(e){return r.onClick(e)}),disabled:e.disabled,onKeydown:r.onTogglerKeydown,"aria-expanded":o.d_visible,"aria-haspopup":!0,"aria-controls":o.id+"_list","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,pt:e.ptm("button"),unstyled:e.unstyled},{icon:a.withCtx((function(){return[a.renderSlot(e.$slots,"icon",{visible:o.d_visible},(function(){return[o.d_visible&&e.hideIcon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"span":"PlusIcon"),a.mergeProps({key:0,class:e.cx("buttonIcon")},e.ptm("button").icon,{"data-pc-section":"icon"}),null,16,["class"])):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"span":"PlusIcon"),a.mergeProps({key:1,class:o.d_visible&&e.hideIcon?e.hideIcon:e.showIcon},e.ptm("button").icon,{"data-pc-section":"icon"}),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onKeydown","aria-expanded","aria-controls","aria-label","aria-labelledby","pt","unstyled"])]})),a.createElementVNode("ul",a.mergeProps({ref:r.listRef,id:o.id+"_list",class:e.cx("menu"),style:e.sx("menu"),role:"menu","aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:"-1",onFocus:t[1]||(t[1]=function(){return r.onFocus&&r.onFocus.apply(r,arguments)}),onBlur:t[2]||(t[2]=function(){return r.onBlur&&r.onBlur.apply(r,arguments)}),onKeydown:t[3]||(t[3]=function(){return r.onKeyDown&&r.onKeyDown.apply(r,arguments)})},e.ptm("menu")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.model,(function(t,n){return a.openBlock(),a.createElementBlock(a.Fragment,{key:n},[r.isItemVisible(t)?(a.openBlock(),a.createElementBlock("li",a.mergeProps({key:0,id:"".concat(o.id,"_").concat(n),"aria-controls":"".concat(o.id,"_item"),class:e.cx("menuitem",{id:"".concat(o.id,"_").concat(n)}),style:r.getItemStyle(n),role:"menuitem"},r.getPTOptions("".concat(o.id,"_").concat(n),"menuitem")),[e.$slots.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.$slots.item),{key:1,item:t,onClick:function(e){return r.onItemClick(e,t)}},null,8,["item","onClick"])):a.withDirectives((a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,tabindex:-1,href:t.url||"#",role:"menuitem",class:e.cx("action",{item:t}),target:t.target,onClick:function(e){return r.onItemClick(e,t)},"aria-label":t.label},r.getPTOptions("".concat(o.id,"_").concat(n),"action")),[t.icon?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:0,class:[e.cx("actionIcon"),t.icon]},r.getPTOptions("".concat(o.id,"_").concat(n),"actionIcon")),null,16)):a.createCommentVNode("",!0)],16,N)),[[c],[l,{value:t.label,disabled:!e.tooltipOptions},e.tooltipOptions]])],16,_)):a.createCommentVNode("",!0)],64)})),128))],16,H)],16),e.mask?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:[e.cx("mask"),e.maskClass],style:e.maskStyle},e.ptm("mask")),null,16)):a.createCommentVNode("",!0)],64)},module.exports=j;
|
|
@@ -11,7 +11,7 @@ function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function"
|
|
|
11
11
|
function _defineProperty$1(obj, key, value) { key = _toPropertyKey$1(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
12
|
function _toPropertyKey$1(arg) { var key = _toPrimitive$1(arg, "string"); return _typeof$1(key) === "symbol" ? key : String(key); }
|
|
13
13
|
function _toPrimitive$1(input, hint) { if (_typeof$1(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$1(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
-
var styles = "\n.p-speeddial {\n
|
|
14
|
+
var styles = "\n@layer primevue {\n .p-speeddial {\n position: absolute;\n display: flex;\n }\n \n .p-speeddial-button {\n z-index: 1;\n }\n \n .p-speeddial-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: top 0s linear 0.2s;\n pointer-events: none;\n z-index: 2;\n }\n \n .p-speeddial-item {\n transform: scale(0);\n opacity: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;\n will-change: transform;\n }\n \n .p-speeddial-action {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n position: relative;\n overflow: hidden;\n }\n \n .p-speeddial-circle .p-speeddial-item,\n .p-speeddial-semi-circle .p-speeddial-item,\n .p-speeddial-quarter-circle .p-speeddial-item {\n position: absolute;\n }\n \n .p-speeddial-rotate {\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n will-change: transform;\n }\n \n .p-speeddial-mask {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-mask-visible {\n pointer-events: none;\n opacity: 1;\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-opened .p-speeddial-list {\n pointer-events: auto;\n }\n \n .p-speeddial-opened .p-speeddial-item {\n transform: scale(1);\n opacity: 1;\n }\n \n .p-speeddial-opened .p-speeddial-rotate {\n transform: rotate(45deg);\n }\n}\n";
|
|
15
15
|
|
|
16
16
|
/* Direction */
|
|
17
17
|
var inlineStyles = {
|
|
@@ -580,10 +580,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
580
580
|
return [$data.d_visible && !!_ctx.hideIcon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.hideIcon ? 'span' : 'PlusIcon'), mergeProps({
|
|
581
581
|
key: 0,
|
|
582
582
|
"class": _ctx.cx('buttonIcon')
|
|
583
|
-
}, _ctx.ptm('button')['icon']
|
|
583
|
+
}, _ctx.ptm('button')['icon'], {
|
|
584
|
+
"data-pc-section": "icon"
|
|
585
|
+
}), null, 16, ["class"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showIcon ? 'span' : 'PlusIcon'), mergeProps({
|
|
584
586
|
key: 1,
|
|
585
587
|
"class": $data.d_visible && !!_ctx.hideIcon ? _ctx.hideIcon : _ctx.showIcon
|
|
586
|
-
}, _ctx.ptm('button')['icon']
|
|
588
|
+
}, _ctx.ptm('button')['icon'], {
|
|
589
|
+
"data-pc-section": "icon"
|
|
590
|
+
}), null, 16, ["class"]))];
|
|
587
591
|
})];
|
|
588
592
|
}),
|
|
589
593
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/button";import e from"primevue/icons/plus";import n from"primevue/ripple";import i from"primevue/tooltip";import{UniqueComponentId as o,DomHandler as r}from"primevue/utils";import s from"primevue/basecomponent";import{useStyle as a}from"primevue/usestyle";import{resolveComponent as c,resolveDirective as l,openBlock as u,createElementBlock as d,Fragment as p,createElementVNode as f,mergeProps as m,renderSlot as h,createVNode as b,normalizeClass as y,withCtx as v,createBlock as g,resolveDynamicComponent as w,renderList as I,withDirectives as x,createCommentVNode as k}from"vue";function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function S(t,e,n){return(e=C(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t){var e=P(t,"string");return"symbol"===O(e)?e:String(e)}function P(t,e){if("object"!==O(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==O(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var A={root:function(t){var e,n=t.instance,i=t.props;return["p-speeddial p-component p-speeddial-".concat(i.type),(e={},S(e,"p-speeddial-direction-".concat(i.direction),"circle"!==i.type),S(e,"p-speeddial-opened",n.d_visible),S(e,"p-disabled",i.disabled),e)]},button:function(t){var e=t.props;return["p-speeddial-button p-button-rounded",{"p-speeddial-rotate":e.rotateAnimation&&!e.hideIcon}]},menu:"p-speeddial-list",menuitem:function(t){return["p-speeddial-item",{"p-focus":t.instance.isItemActive(t.id)}]},action:function(t){return["p-speeddial-action",{"p-disabled":t.item.disabled}]},actionIcon:"p-speeddial-action-icon",mask:function(t){return["p-speeddial-mask",{"p-speeddial-mask-visible":t.instance.d_visible}]}},D=a("\n.p-speeddial {\n position: absolute;\n display: flex;\n}\n\n.p-speeddial-button {\n z-index: 1;\n}\n\n.p-speeddial-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: top 0s linear 0.2s;\n pointer-events: none;\n z-index: 2;\n}\n\n.p-speeddial-item {\n transform: scale(0);\n opacity: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;\n will-change: transform;\n}\n\n.p-speeddial-action {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n position: relative;\n overflow: hidden;\n}\n\n.p-speeddial-circle .p-speeddial-item,\n.p-speeddial-semi-circle .p-speeddial-item,\n.p-speeddial-quarter-circle .p-speeddial-item {\n position: absolute;\n}\n\n.p-speeddial-rotate {\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n will-change: transform;\n}\n\n.p-speeddial-mask {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.p-speeddial-mask-visible {\n pointer-events: none;\n opacity: 1;\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.p-speeddial-opened .p-speeddial-list {\n pointer-events: auto;\n}\n\n.p-speeddial-opened .p-speeddial-item {\n transform: scale(1);\n opacity: 1;\n}\n\n.p-speeddial-opened .p-speeddial-rotate {\n transform: rotate(45deg);\n}\n",{name:"speeddial",manual:!0});function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){L(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function L(t,e,n){return(e=K(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function K(t){var e=N(t,"string");return"symbol"===j(e)?e:String(e)}function N(t,e){if("object"!==j(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==j(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function T(t){return R(t)||$(t)||M(t)||B()}function B(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(t,e){if(t){if("string"==typeof t)return F(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(t,e):void 0}}function $(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function R(t){if(Array.isArray(t))return F(t)}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var U={name:"SpeedDial",extends:{name:"BaseSpeedDial",extends:s,props:{model:null,visible:{type:Boolean,default:!1},direction:{type:String,default:"up"},transitionDelay:{type:Number,default:30},type:{type:String,default:"linear"},radius:{type:Number,default:0},mask:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hideOnClickOutside:{type:Boolean,default:!0},buttonClass:null,maskStyle:null,maskClass:null,showIcon:{type:String,default:void 0},hideIcon:{type:String,default:void 0},rotateAnimation:{type:Boolean,default:!0},tooltipOptions:null,style:null,class:null,"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:A,inlineStyles:{root:function(t){var e=t.props;return{alignItems:"up"===e.direction||"down"===e.direction?"center":"",justifyContent:"left"===e.direction||"right"===e.direction?"center":"",flexDirection:"up"===e.direction?"column-reverse":"down"===e.direction?"column":"left"===e.direction?"row-reverse":"right"===e.direction?"row":null}},menu:function(t){var e=t.props;return{flexDirection:"up"===e.direction?"column-reverse":"down"===e.direction?"column":"left"===e.direction?"row-reverse":"right"===e.direction?"row":null}}},loadStyle:D.load},provide:function(){return{$parentInstance:this}}},emits:["click","show","hide","focus","blur"],documentClickListener:null,container:null,list:null,data:function(){return{id:this.$attrs.id,d_visible:this.visible,isItemClicked:!1,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(t){this.id=t||o()},visible:function(t){this.d_visible=t}},mounted:function(){if(this.id=this.id||o(),"linear"!==this.type){var t=r.findSingle(this.container,'[data-pc-section="button"]'),e=r.findSingle(this.list,'[data-pc-section="menuitem"]');if(t&&e){var n=Math.abs(t.offsetWidth-e.offsetWidth),i=Math.abs(t.offsetHeight-e.offsetHeight);this.list.style.setProperty("--item-diff-x","".concat(n/2,"px")),this.list.style.setProperty("--item-diff-y","".concat(i/2,"px"))}}this.hideOnClickOutside&&this.bindDocumentClickListener()},beforeMount:function(){this.unbindDocumentClickListener()},methods:{getPTOptions:function(t,e){return this.ptm(e,{context:{active:this.isItemActive(t),hidden:!this.d_visible}})},onFocus:function(t){this.focused=!0,this.$emit("focus",t)},onBlur:function(t){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",t)},onItemClick:function(t,e){e.command&&e.command({originalEvent:t,item:e}),this.hide(),this.isItemClicked=!0,t.preventDefault()},onClick:function(t){this.d_visible?this.hide():this.show(),this.isItemClicked=!0,this.$emit("click",t)},show:function(){this.d_visible=!0,this.$emit("show")},hide:function(){this.d_visible=!1,this.$emit("hide")},calculateTransitionDelay:function(t){return(this.d_visible?t:this.model.length-t-1)*this.transitionDelay},onTogglerKeydown:function(t){switch(t.code){case"ArrowDown":case"ArrowLeft":this.onTogglerArrowDown(t);break;case"ArrowUp":case"ArrowRight":this.onTogglerArrowUp(t);break;case"Escape":this.onEscapeKey()}},onKeyDown:function(t){switch(t.code){case"ArrowDown":this.onArrowDown(t);break;case"ArrowUp":this.onArrowUp(t);break;case"ArrowLeft":this.onArrowLeft(t);break;case"ArrowRight":this.onArrowRight(t);break;case"Enter":case"Space":this.onEnterKey(t);break;case"Escape":this.onEscapeKey(t);break;case"Home":this.onHomeKey(t);break;case"End":this.onEndKey(t)}},onTogglerArrowUp:function(t){this.focused=!0,r.focus(this.list),this.show(),this.navigatePrevItem(t),t.preventDefault()},onTogglerArrowDown:function(t){this.focused=!0,r.focus(this.list),this.show(),this.navigateNextItem(t),t.preventDefault()},onEnterKey:function(t){var e=this,n=T(r.find(this.container,'[data-pc-section="menuitem"]')).findIndex((function(t){return t.id===e.focusedOptionIndex}));this.onItemClick(t,this.model[n]),this.onBlur(t);var i=r.findSingle(this.container,"button");i&&r.focus(i)},onEscapeKey:function(){this.hide();var t=r.findSingle(this.container,"button");t&&r.focus(t)},onArrowUp:function(t){"up"===this.direction?this.navigateNextItem(t):"down"===this.direction?this.navigatePrevItem(t):this.navigateNextItem(t)},onArrowDown:function(t){"up"===this.direction?this.navigatePrevItem(t):"down"===this.direction?this.navigateNextItem(t):this.navigatePrevItem(t)},onArrowLeft:function(t){["left","up-right","down-left"].includes(this.direction)?this.navigateNextItem(t):(["right","up-left","down-right"].includes(this.direction),this.navigatePrevItem(t))},onArrowRight:function(t){["left","up-right","down-left"].includes(this.direction)?this.navigatePrevItem(t):(["right","up-left","down-right"].includes(this.direction),this.navigateNextItem(t))},onEndKey:function(t){t.preventDefault(),this.focusedOptionIndex=-1,this.navigatePrevItem(t)},onHomeKey:function(t){t.preventDefault(),this.focusedOptionIndex=-1,this.navigateNextItem(t)},navigateNextItem:function(t){var e=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e),t.preventDefault()},navigatePrevItem:function(t){var e=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e),t.preventDefault()},changeFocusedOptionIndex:function(t){var e=T(r.find(this.container,'[data-pc-section="menuitem"]')).filter((function(t){return!r.hasClass(r.findSingle(t,"a"),"p-disabled")}));e[t]&&(this.focusedOptionIndex=e[t].getAttribute("id"))},findPrevOptionIndex:function(t){var e=T(r.find(this.container,'[data-pc-section="menuitem"]')).filter((function(t){return!r.hasClass(r.findSingle(t,"a"),"p-disabled")})),n=-1===t?e[e.length-1].id:t,i=e.findIndex((function(t){return t.getAttribute("id")===n}));return i=-1===t?e.length-1:i-1},findNextOptionIndex:function(t){var e=T(r.find(this.container,'[data-pc-section="menuitem"]')).filter((function(t){return!r.hasClass(r.findSingle(t,"a"),"p-disabled")})),n=-1===t?e[0].id:t,i=e.findIndex((function(t){return t.getAttribute("id")===n}));return i=-1===t?0:i+1},calculatePointStyle:function(t){var e=this.type;if("linear"!==e){var n=this.model.length,i=this.radius||20*n;if("circle"===e){var o=2*Math.PI/n;return{left:"calc(".concat(i*Math.cos(o*t),"px + var(--item-diff-x, 0px))"),top:"calc(".concat(i*Math.sin(o*t),"px + var(--item-diff-y, 0px))")}}if("semi-circle"===e){var r=this.direction,s=Math.PI/(n-1),a="calc(".concat(i*Math.cos(s*t),"px + var(--item-diff-x, 0px))"),c="calc(".concat(i*Math.sin(s*t),"px + var(--item-diff-y, 0px))");if("up"===r)return{left:a,bottom:c};if("down"===r)return{left:a,top:c};if("left"===r)return{right:c,top:a};if("right"===r)return{left:c,top:a}}else if("quarter-circle"===e){var l=this.direction,u=Math.PI/(2*(n-1)),d="calc(".concat(i*Math.cos(u*t),"px + var(--item-diff-x, 0px))"),p="calc(".concat(i*Math.sin(u*t),"px + var(--item-diff-y, 0px))");if("up-left"===l)return{right:d,bottom:p};if("up-right"===l)return{left:d,bottom:p};if("down-left"===l)return{right:p,top:d};if("down-right"===l)return{left:p,top:d}}}return{}},getItemStyle:function(t){var e=this.calculateTransitionDelay(t),n=this.calculatePointStyle(t);return E({transitionDelay:"".concat(e,"ms")},n)},bindDocumentClickListener:function(){var t=this;this.documentClickListener||(this.documentClickListener=function(e){t.d_visible&&t.isOutsideClicked(e)&&t.hide(),t.isItemClicked=!1},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},isOutsideClicked:function(t){return this.container&&!(this.container.isSameNode(t.target)||this.container.contains(t.target)||this.isItemClicked)},isItemVisible:function(t){return"function"==typeof t.visible?t.visible():!1!==t.visible},isItemActive:function(t){return t===this.focusedOptionId},containerRef:function(t){this.container=t},listRef:function(t){this.list=t}},computed:{containerClass:function(){return[this.cx("root"),this.class]},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},components:{SDButton:t,PlusIcon:e},directives:{ripple:n,tooltip:i}},z=["id","aria-activedescendant"],H=["id","aria-controls"],q=["href","target","onClick","aria-label"];U.render=function(t,e,n,i,o,r){var s=c("SDButton"),a=l("ripple"),O=l("tooltip");return u(),d(p,null,[f("div",m({ref:r.containerRef,class:r.containerClass,style:[t.style,t.sx("root")]},t.ptm("root"),{"data-pc-name":"speeddial"}),[h(t.$slots,"button",{onClick:r.onClick},(function(){return[b(s,{type:"button",class:y([t.cx("button"),t.buttonClass]),onClick:e[0]||(e[0]=function(t){return r.onClick(t)}),disabled:t.disabled,onKeydown:r.onTogglerKeydown,"aria-expanded":o.d_visible,"aria-haspopup":!0,"aria-controls":o.id+"_list","aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,pt:t.ptm("button"),unstyled:t.unstyled},{icon:v((function(){return[h(t.$slots,"icon",{visible:o.d_visible},(function(){return[o.d_visible&&t.hideIcon?(u(),g(w(t.hideIcon?"span":"PlusIcon"),m({key:0,class:t.cx("buttonIcon")},t.ptm("button").icon),null,16,["class"])):(u(),g(w(t.showIcon?"span":"PlusIcon"),m({key:1,class:o.d_visible&&t.hideIcon?t.hideIcon:t.showIcon},t.ptm("button").icon),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onKeydown","aria-expanded","aria-controls","aria-label","aria-labelledby","pt","unstyled"])]})),f("ul",m({ref:r.listRef,id:o.id+"_list",class:t.cx("menu"),style:t.sx("menu"),role:"menu","aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:"-1",onFocus:e[1]||(e[1]=function(){return r.onFocus&&r.onFocus.apply(r,arguments)}),onBlur:e[2]||(e[2]=function(){return r.onBlur&&r.onBlur.apply(r,arguments)}),onKeydown:e[3]||(e[3]=function(){return r.onKeyDown&&r.onKeyDown.apply(r,arguments)})},t.ptm("menu")),[(u(!0),d(p,null,I(t.model,(function(e,n){return u(),d(p,{key:n},[r.isItemVisible(e)?(u(),d("li",m({key:0,id:"".concat(o.id,"_").concat(n),"aria-controls":"".concat(o.id,"_item"),class:t.cx("menuitem",{id:"".concat(o.id,"_").concat(n)}),style:r.getItemStyle(n),role:"menuitem"},r.getPTOptions("".concat(o.id,"_").concat(n),"menuitem")),[t.$slots.item?(u(),g(w(t.$slots.item),{key:1,item:e,onClick:function(t){return r.onItemClick(t,e)}},null,8,["item","onClick"])):x((u(),d("a",m({key:0,tabindex:-1,href:e.url||"#",role:"menuitem",class:t.cx("action",{item:e}),target:e.target,onClick:function(t){return r.onItemClick(t,e)},"aria-label":e.label},r.getPTOptions("".concat(o.id,"_").concat(n),"action")),[e.icon?(u(),d("span",m({key:0,class:[t.cx("actionIcon"),e.icon]},r.getPTOptions("".concat(o.id,"_").concat(n),"actionIcon")),null,16)):k("",!0)],16,q)),[[a],[O,{value:e.label,disabled:!t.tooltipOptions},t.tooltipOptions]])],16,H)):k("",!0)],64)})),128))],16,z)],16),t.mask?(u(),d("div",m({key:0,class:[t.cx("mask"),t.maskClass],style:t.maskStyle},t.ptm("mask")),null,16)):k("",!0)],64)};export{U as default};
|
|
1
|
+
import t from"primevue/button";import e from"primevue/icons/plus";import n from"primevue/ripple";import i from"primevue/tooltip";import{UniqueComponentId as o,DomHandler as r}from"primevue/utils";import s from"primevue/basecomponent";import{useStyle as a}from"primevue/usestyle";import{resolveComponent as c,resolveDirective as l,openBlock as u,createElementBlock as d,Fragment as p,createElementVNode as f,mergeProps as m,renderSlot as h,createVNode as b,normalizeClass as y,withCtx as v,createBlock as g,resolveDynamicComponent as w,renderList as I,withDirectives as x,createCommentVNode as k}from"vue";function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function S(t,e,n){return(e=C(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t){var e=P(t,"string");return"symbol"===O(e)?e:String(e)}function P(t,e){if("object"!==O(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==O(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var A={root:function(t){var e,n=t.instance,i=t.props;return["p-speeddial p-component p-speeddial-".concat(i.type),(e={},S(e,"p-speeddial-direction-".concat(i.direction),"circle"!==i.type),S(e,"p-speeddial-opened",n.d_visible),S(e,"p-disabled",i.disabled),e)]},button:function(t){var e=t.props;return["p-speeddial-button p-button-rounded",{"p-speeddial-rotate":e.rotateAnimation&&!e.hideIcon}]},menu:"p-speeddial-list",menuitem:function(t){return["p-speeddial-item",{"p-focus":t.instance.isItemActive(t.id)}]},action:function(t){return["p-speeddial-action",{"p-disabled":t.item.disabled}]},actionIcon:"p-speeddial-action-icon",mask:function(t){return["p-speeddial-mask",{"p-speeddial-mask-visible":t.instance.d_visible}]}},D=a("\n@layer primevue {\n .p-speeddial {\n position: absolute;\n display: flex;\n }\n \n .p-speeddial-button {\n z-index: 1;\n }\n \n .p-speeddial-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: top 0s linear 0.2s;\n pointer-events: none;\n z-index: 2;\n }\n \n .p-speeddial-item {\n transform: scale(0);\n opacity: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;\n will-change: transform;\n }\n \n .p-speeddial-action {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n position: relative;\n overflow: hidden;\n }\n \n .p-speeddial-circle .p-speeddial-item,\n .p-speeddial-semi-circle .p-speeddial-item,\n .p-speeddial-quarter-circle .p-speeddial-item {\n position: absolute;\n }\n \n .p-speeddial-rotate {\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n will-change: transform;\n }\n \n .p-speeddial-mask {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-mask-visible {\n pointer-events: none;\n opacity: 1;\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-opened .p-speeddial-list {\n pointer-events: auto;\n }\n \n .p-speeddial-opened .p-speeddial-item {\n transform: scale(1);\n opacity: 1;\n }\n \n .p-speeddial-opened .p-speeddial-rotate {\n transform: rotate(45deg);\n }\n}\n",{name:"speeddial",manual:!0});function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){L(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function L(t,e,n){return(e=K(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function K(t){var e=N(t,"string");return"symbol"===j(e)?e:String(e)}function N(t,e){if("object"!==j(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==j(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function T(t){return R(t)||$(t)||M(t)||B()}function B(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(t,e){if(t){if("string"==typeof t)return F(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(t,e):void 0}}function $(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function R(t){if(Array.isArray(t))return F(t)}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var U={name:"SpeedDial",extends:{name:"BaseSpeedDial",extends:s,props:{model:null,visible:{type:Boolean,default:!1},direction:{type:String,default:"up"},transitionDelay:{type:Number,default:30},type:{type:String,default:"linear"},radius:{type:Number,default:0},mask:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hideOnClickOutside:{type:Boolean,default:!0},buttonClass:null,maskStyle:null,maskClass:null,showIcon:{type:String,default:void 0},hideIcon:{type:String,default:void 0},rotateAnimation:{type:Boolean,default:!0},tooltipOptions:null,style:null,class:null,"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:A,inlineStyles:{root:function(t){var e=t.props;return{alignItems:"up"===e.direction||"down"===e.direction?"center":"",justifyContent:"left"===e.direction||"right"===e.direction?"center":"",flexDirection:"up"===e.direction?"column-reverse":"down"===e.direction?"column":"left"===e.direction?"row-reverse":"right"===e.direction?"row":null}},menu:function(t){var e=t.props;return{flexDirection:"up"===e.direction?"column-reverse":"down"===e.direction?"column":"left"===e.direction?"row-reverse":"right"===e.direction?"row":null}}},loadStyle:D.load},provide:function(){return{$parentInstance:this}}},emits:["click","show","hide","focus","blur"],documentClickListener:null,container:null,list:null,data:function(){return{id:this.$attrs.id,d_visible:this.visible,isItemClicked:!1,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(t){this.id=t||o()},visible:function(t){this.d_visible=t}},mounted:function(){if(this.id=this.id||o(),"linear"!==this.type){var t=r.findSingle(this.container,'[data-pc-section="button"]'),e=r.findSingle(this.list,'[data-pc-section="menuitem"]');if(t&&e){var n=Math.abs(t.offsetWidth-e.offsetWidth),i=Math.abs(t.offsetHeight-e.offsetHeight);this.list.style.setProperty("--item-diff-x","".concat(n/2,"px")),this.list.style.setProperty("--item-diff-y","".concat(i/2,"px"))}}this.hideOnClickOutside&&this.bindDocumentClickListener()},beforeMount:function(){this.unbindDocumentClickListener()},methods:{getPTOptions:function(t,e){return this.ptm(e,{context:{active:this.isItemActive(t),hidden:!this.d_visible}})},onFocus:function(t){this.focused=!0,this.$emit("focus",t)},onBlur:function(t){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",t)},onItemClick:function(t,e){e.command&&e.command({originalEvent:t,item:e}),this.hide(),this.isItemClicked=!0,t.preventDefault()},onClick:function(t){this.d_visible?this.hide():this.show(),this.isItemClicked=!0,this.$emit("click",t)},show:function(){this.d_visible=!0,this.$emit("show")},hide:function(){this.d_visible=!1,this.$emit("hide")},calculateTransitionDelay:function(t){return(this.d_visible?t:this.model.length-t-1)*this.transitionDelay},onTogglerKeydown:function(t){switch(t.code){case"ArrowDown":case"ArrowLeft":this.onTogglerArrowDown(t);break;case"ArrowUp":case"ArrowRight":this.onTogglerArrowUp(t);break;case"Escape":this.onEscapeKey()}},onKeyDown:function(t){switch(t.code){case"ArrowDown":this.onArrowDown(t);break;case"ArrowUp":this.onArrowUp(t);break;case"ArrowLeft":this.onArrowLeft(t);break;case"ArrowRight":this.onArrowRight(t);break;case"Enter":case"Space":this.onEnterKey(t);break;case"Escape":this.onEscapeKey(t);break;case"Home":this.onHomeKey(t);break;case"End":this.onEndKey(t)}},onTogglerArrowUp:function(t){this.focused=!0,r.focus(this.list),this.show(),this.navigatePrevItem(t),t.preventDefault()},onTogglerArrowDown:function(t){this.focused=!0,r.focus(this.list),this.show(),this.navigateNextItem(t),t.preventDefault()},onEnterKey:function(t){var e=this,n=T(r.find(this.container,'[data-pc-section="menuitem"]')).findIndex((function(t){return t.id===e.focusedOptionIndex}));this.onItemClick(t,this.model[n]),this.onBlur(t);var i=r.findSingle(this.container,"button");i&&r.focus(i)},onEscapeKey:function(){this.hide();var t=r.findSingle(this.container,"button");t&&r.focus(t)},onArrowUp:function(t){"up"===this.direction?this.navigateNextItem(t):"down"===this.direction?this.navigatePrevItem(t):this.navigateNextItem(t)},onArrowDown:function(t){"up"===this.direction?this.navigatePrevItem(t):"down"===this.direction?this.navigateNextItem(t):this.navigatePrevItem(t)},onArrowLeft:function(t){["left","up-right","down-left"].includes(this.direction)?this.navigateNextItem(t):(["right","up-left","down-right"].includes(this.direction),this.navigatePrevItem(t))},onArrowRight:function(t){["left","up-right","down-left"].includes(this.direction)?this.navigatePrevItem(t):(["right","up-left","down-right"].includes(this.direction),this.navigateNextItem(t))},onEndKey:function(t){t.preventDefault(),this.focusedOptionIndex=-1,this.navigatePrevItem(t)},onHomeKey:function(t){t.preventDefault(),this.focusedOptionIndex=-1,this.navigateNextItem(t)},navigateNextItem:function(t){var e=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e),t.preventDefault()},navigatePrevItem:function(t){var e=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e),t.preventDefault()},changeFocusedOptionIndex:function(t){var e=T(r.find(this.container,'[data-pc-section="menuitem"]')).filter((function(t){return!r.hasClass(r.findSingle(t,"a"),"p-disabled")}));e[t]&&(this.focusedOptionIndex=e[t].getAttribute("id"))},findPrevOptionIndex:function(t){var e=T(r.find(this.container,'[data-pc-section="menuitem"]')).filter((function(t){return!r.hasClass(r.findSingle(t,"a"),"p-disabled")})),n=-1===t?e[e.length-1].id:t,i=e.findIndex((function(t){return t.getAttribute("id")===n}));return i=-1===t?e.length-1:i-1},findNextOptionIndex:function(t){var e=T(r.find(this.container,'[data-pc-section="menuitem"]')).filter((function(t){return!r.hasClass(r.findSingle(t,"a"),"p-disabled")})),n=-1===t?e[0].id:t,i=e.findIndex((function(t){return t.getAttribute("id")===n}));return i=-1===t?0:i+1},calculatePointStyle:function(t){var e=this.type;if("linear"!==e){var n=this.model.length,i=this.radius||20*n;if("circle"===e){var o=2*Math.PI/n;return{left:"calc(".concat(i*Math.cos(o*t),"px + var(--item-diff-x, 0px))"),top:"calc(".concat(i*Math.sin(o*t),"px + var(--item-diff-y, 0px))")}}if("semi-circle"===e){var r=this.direction,s=Math.PI/(n-1),a="calc(".concat(i*Math.cos(s*t),"px + var(--item-diff-x, 0px))"),c="calc(".concat(i*Math.sin(s*t),"px + var(--item-diff-y, 0px))");if("up"===r)return{left:a,bottom:c};if("down"===r)return{left:a,top:c};if("left"===r)return{right:c,top:a};if("right"===r)return{left:c,top:a}}else if("quarter-circle"===e){var l=this.direction,u=Math.PI/(2*(n-1)),d="calc(".concat(i*Math.cos(u*t),"px + var(--item-diff-x, 0px))"),p="calc(".concat(i*Math.sin(u*t),"px + var(--item-diff-y, 0px))");if("up-left"===l)return{right:d,bottom:p};if("up-right"===l)return{left:d,bottom:p};if("down-left"===l)return{right:p,top:d};if("down-right"===l)return{left:p,top:d}}}return{}},getItemStyle:function(t){var e=this.calculateTransitionDelay(t),n=this.calculatePointStyle(t);return E({transitionDelay:"".concat(e,"ms")},n)},bindDocumentClickListener:function(){var t=this;this.documentClickListener||(this.documentClickListener=function(e){t.d_visible&&t.isOutsideClicked(e)&&t.hide(),t.isItemClicked=!1},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},isOutsideClicked:function(t){return this.container&&!(this.container.isSameNode(t.target)||this.container.contains(t.target)||this.isItemClicked)},isItemVisible:function(t){return"function"==typeof t.visible?t.visible():!1!==t.visible},isItemActive:function(t){return t===this.focusedOptionId},containerRef:function(t){this.container=t},listRef:function(t){this.list=t}},computed:{containerClass:function(){return[this.cx("root"),this.class]},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null}},components:{SDButton:t,PlusIcon:e},directives:{ripple:n,tooltip:i}},z=["id","aria-activedescendant"],H=["id","aria-controls"],q=["href","target","onClick","aria-label"];U.render=function(t,e,n,i,o,r){var s=c("SDButton"),a=l("ripple"),O=l("tooltip");return u(),d(p,null,[f("div",m({ref:r.containerRef,class:r.containerClass,style:[t.style,t.sx("root")]},t.ptm("root"),{"data-pc-name":"speeddial"}),[h(t.$slots,"button",{onClick:r.onClick},(function(){return[b(s,{type:"button",class:y([t.cx("button"),t.buttonClass]),onClick:e[0]||(e[0]=function(t){return r.onClick(t)}),disabled:t.disabled,onKeydown:r.onTogglerKeydown,"aria-expanded":o.d_visible,"aria-haspopup":!0,"aria-controls":o.id+"_list","aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,pt:t.ptm("button"),unstyled:t.unstyled},{icon:v((function(){return[h(t.$slots,"icon",{visible:o.d_visible},(function(){return[o.d_visible&&t.hideIcon?(u(),g(w(t.hideIcon?"span":"PlusIcon"),m({key:0,class:t.cx("buttonIcon")},t.ptm("button").icon,{"data-pc-section":"icon"}),null,16,["class"])):(u(),g(w(t.showIcon?"span":"PlusIcon"),m({key:1,class:o.d_visible&&t.hideIcon?t.hideIcon:t.showIcon},t.ptm("button").icon,{"data-pc-section":"icon"}),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onKeydown","aria-expanded","aria-controls","aria-label","aria-labelledby","pt","unstyled"])]})),f("ul",m({ref:r.listRef,id:o.id+"_list",class:t.cx("menu"),style:t.sx("menu"),role:"menu","aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:"-1",onFocus:e[1]||(e[1]=function(){return r.onFocus&&r.onFocus.apply(r,arguments)}),onBlur:e[2]||(e[2]=function(){return r.onBlur&&r.onBlur.apply(r,arguments)}),onKeydown:e[3]||(e[3]=function(){return r.onKeyDown&&r.onKeyDown.apply(r,arguments)})},t.ptm("menu")),[(u(!0),d(p,null,I(t.model,(function(e,n){return u(),d(p,{key:n},[r.isItemVisible(e)?(u(),d("li",m({key:0,id:"".concat(o.id,"_").concat(n),"aria-controls":"".concat(o.id,"_item"),class:t.cx("menuitem",{id:"".concat(o.id,"_").concat(n)}),style:r.getItemStyle(n),role:"menuitem"},r.getPTOptions("".concat(o.id,"_").concat(n),"menuitem")),[t.$slots.item?(u(),g(w(t.$slots.item),{key:1,item:e,onClick:function(t){return r.onItemClick(t,e)}},null,8,["item","onClick"])):x((u(),d("a",m({key:0,tabindex:-1,href:e.url||"#",role:"menuitem",class:t.cx("action",{item:e}),target:e.target,onClick:function(t){return r.onItemClick(t,e)},"aria-label":e.label},r.getPTOptions("".concat(o.id,"_").concat(n),"action")),[e.icon?(u(),d("span",m({key:0,class:[t.cx("actionIcon"),e.icon]},r.getPTOptions("".concat(o.id,"_").concat(n),"actionIcon")),null,16)):k("",!0)],16,q)),[[a],[O,{value:e.label,disabled:!t.tooltipOptions},t.tooltipOptions]])],16,H)):k("",!0)],64)})),128))],16,z)],16),t.mask?(u(),d("div",m({key:0,class:[t.cx("mask"),t.maskClass],style:t.maskStyle},t.ptm("mask")),null,16)):k("",!0)],64)};export{U as default};
|
package/speeddial/speeddial.js
CHANGED
|
@@ -14,7 +14,7 @@ this.primevue.speeddial = (function (Button, PlusIcon, Ripple, Tooltip, utils, B
|
|
|
14
14
|
function _defineProperty$1(obj, key, value) { key = _toPropertyKey$1(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
15
|
function _toPropertyKey$1(arg) { var key = _toPrimitive$1(arg, "string"); return _typeof$1(key) === "symbol" ? key : String(key); }
|
|
16
16
|
function _toPrimitive$1(input, hint) { if (_typeof$1(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$1(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
-
var styles = "\n.p-speeddial {\n
|
|
17
|
+
var styles = "\n@layer primevue {\n .p-speeddial {\n position: absolute;\n display: flex;\n }\n \n .p-speeddial-button {\n z-index: 1;\n }\n \n .p-speeddial-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: top 0s linear 0.2s;\n pointer-events: none;\n z-index: 2;\n }\n \n .p-speeddial-item {\n transform: scale(0);\n opacity: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;\n will-change: transform;\n }\n \n .p-speeddial-action {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n position: relative;\n overflow: hidden;\n }\n \n .p-speeddial-circle .p-speeddial-item,\n .p-speeddial-semi-circle .p-speeddial-item,\n .p-speeddial-quarter-circle .p-speeddial-item {\n position: absolute;\n }\n \n .p-speeddial-rotate {\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n will-change: transform;\n }\n \n .p-speeddial-mask {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-mask-visible {\n pointer-events: none;\n opacity: 1;\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n }\n \n .p-speeddial-opened .p-speeddial-list {\n pointer-events: auto;\n }\n \n .p-speeddial-opened .p-speeddial-item {\n transform: scale(1);\n opacity: 1;\n }\n \n .p-speeddial-opened .p-speeddial-rotate {\n transform: rotate(45deg);\n }\n}\n";
|
|
18
18
|
|
|
19
19
|
/* Direction */
|
|
20
20
|
var inlineStyles = {
|
|
@@ -583,10 +583,14 @@ this.primevue.speeddial = (function (Button, PlusIcon, Ripple, Tooltip, utils, B
|
|
|
583
583
|
return [$data.d_visible && !!_ctx.hideIcon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.hideIcon ? 'span' : 'PlusIcon'), vue.mergeProps({
|
|
584
584
|
key: 0,
|
|
585
585
|
"class": _ctx.cx('buttonIcon')
|
|
586
|
-
}, _ctx.ptm('button')['icon']
|
|
586
|
+
}, _ctx.ptm('button')['icon'], {
|
|
587
|
+
"data-pc-section": "icon"
|
|
588
|
+
}), null, 16, ["class"])) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.showIcon ? 'span' : 'PlusIcon'), vue.mergeProps({
|
|
587
589
|
key: 1,
|
|
588
590
|
"class": $data.d_visible && !!_ctx.hideIcon ? _ctx.hideIcon : _ctx.showIcon
|
|
589
|
-
}, _ctx.ptm('button')['icon']
|
|
591
|
+
}, _ctx.ptm('button')['icon'], {
|
|
592
|
+
"data-pc-section": "icon"
|
|
593
|
+
}), null, 16, ["class"]))];
|
|
590
594
|
})];
|
|
591
595
|
}),
|
|
592
596
|
_: 3
|