primevue 3.30.2 → 3.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/Accordion.d.ts +5 -5
- package/accordion/Accordion.vue +1 -1
- package/accordion/accordion.cjs.js +3 -3
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -3
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +3 -3
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +18 -12
- package/autocomplete/AutoComplete.d.ts +34 -23
- package/autocomplete/AutoComplete.vue +3 -3
- package/autocomplete/BaseAutoComplete.vue +4 -0
- package/autocomplete/autocomplete.cjs.js +9 -5
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +9 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +9 -5
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +7 -7
- package/avatar/Avatar.vue +2 -2
- package/avatar/avatar.cjs.js +2 -2
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -2
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -2
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +3 -3
- package/badge/Badge.d.ts +3 -3
- package/badgedirective/BadgeDirective.d.ts +45 -4
- package/badgedirective/badgedirective.cjs.js +11 -1
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +11 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +11 -1
- package/badgedirective/badgedirective.min.js +1 -1
- package/basecomponent/BaseComponent.vue +51 -25
- package/basecomponent/basecomponent.cjs.js +66 -42
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +66 -42
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +66 -42
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +9 -3
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +9 -3
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +9 -3
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BaseBlockUI.vue +0 -8
- package/blockui/BlockUI.d.ts +7 -3
- package/blockui/BlockUI.vue +35 -10
- package/blockui/blockui.cjs.js +34 -12
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +34 -12
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +34 -12
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +25 -10
- package/breadcrumb/BreadcrumbItem.vue +18 -8
- package/breadcrumb/breadcrumb.cjs.js +18 -8
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +18 -8
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +18 -8
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +8 -7
- package/button/Button.vue +4 -0
- package/button/button.cjs.js +5 -0
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +5 -0
- package/button/button.esm.min.js +1 -1
- package/button/button.js +5 -0
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +129 -53
- package/calendar/Calendar.vue +49 -7
- package/calendar/calendar.cjs.js +72 -35
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +72 -35
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +72 -35
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +9 -9
- package/carousel/Carousel.d.ts +32 -20
- package/carousel/Carousel.vue +10 -2
- package/carousel/carousel.cjs.js +11 -2
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +11 -2
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +11 -2
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +25 -19
- package/cascadeselect/CascadeSelect.vue +2 -1
- package/cascadeselect/CascadeSelectSub.vue +1 -0
- package/cascadeselect/cascadeselect.cjs.js +9 -7
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +9 -7
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +9 -7
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +5 -5
- package/checkbox/Checkbox.d.ts +8 -8
- package/chip/Chip.d.ts +7 -7
- package/chips/Chips.d.ts +10 -10
- package/colorpicker/ColorPicker.d.ts +18 -11
- package/colorpicker/ColorPicker.vue +1 -1
- package/colorpicker/colorpicker.cjs.js +3 -3
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +3 -3
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +3 -3
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +58 -58
- package/columngroup/ColumnGroup.d.ts +3 -3
- package/config/PrimeVue.d.ts +22 -0
- package/config/config.cjs.js +4 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +4 -1
- package/config/config.esm.min.js +1 -1
- package/config/config.js +4 -1
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +14 -14
- package/confirmpopup/ConfirmPopup.d.ts +16 -10
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +3 -3
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +4 -4
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +3 -3
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +27 -13
- package/contextmenu/ContextMenu.vue +1 -1
- package/contextmenu/ContextMenuSub.vue +14 -12
- package/contextmenu/contextmenu.cjs.js +19 -17
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +20 -18
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +19 -17
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +4538 -507
- package/core/core.min.js +19 -15
- package/datatable/BaseDataTable.vue +1 -1
- package/datatable/BodyCell.vue +1 -0
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.d.ts +37 -31
- package/datatable/DataTable.vue +4 -1
- package/datatable/datatable.cjs.js +10 -5
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +10 -5
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +10 -5
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +10 -10
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +7 -7
- package/deferredcontent/DeferredContent.d.ts +3 -3
- package/dialog/BaseDialog.vue +3 -7
- package/dialog/Dialog.d.ts +21 -15
- package/dialog/Dialog.vue +2 -1
- package/dialog/dialog.cjs.js +9 -6
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +9 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +9 -6
- package/dialog/dialog.min.js +1 -1
- package/divider/BaseDivider.vue +9 -24
- package/divider/Divider.d.ts +4 -4
- package/divider/Divider.vue +1 -1
- package/divider/divider.cjs.js +15 -2
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +15 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +15 -2
- package/divider/divider.min.js +1 -1
- package/dock/BaseDock.vue +1 -1
- package/dock/Dock.d.ts +13 -9
- package/dock/Dock.vue +19 -2
- package/dock/DockSub.vue +8 -7
- package/dock/dock.cjs.js +18 -11
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +18 -11
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +18 -11
- package/dock/dock.min.js +1 -1
- package/dropdown/BaseDropdown.vue +5 -5
- package/dropdown/Dropdown.d.ts +34 -28
- package/dropdown/Dropdown.vue +2 -2
- package/dropdown/dropdown.cjs.js +9 -9
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +9 -9
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +9 -9
- package/dropdown/dropdown.min.js +1 -1
- package/editor/BaseEditor.vue +0 -14
- package/editor/Editor.d.ts +19 -19
- package/editor/Editor.vue +20 -20
- package/editor/editor.cjs.js +20 -34
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +20 -34
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +20 -34
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +17 -11
- package/fieldset/Fieldset.vue +1 -1
- package/fieldset/fieldset.cjs.js +3 -3
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -3
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +3 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.d.ts +24 -24
- package/fileupload/FileUpload.vue +4 -4
- package/fileupload/fileupload.cjs.js +10 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +10 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +10 -4
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +5 -5
- package/galleria/Galleria.d.ts +53 -34
- package/galleria/Galleria.vue +1 -1
- package/galleria/GalleriaItem.vue +9 -2
- package/galleria/GalleriaThumbnails.vue +1 -0
- package/galleria/galleria.cjs.js +14 -5
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +14 -5
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +14 -5
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +28 -21
- package/image/Image.vue +4 -4
- package/image/image.cjs.js +6 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +6 -5
- package/image/image.esm.min.js +1 -1
- package/image/image.js +6 -5
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +5 -5
- package/inplace/Inplace.d.ts +8 -8
- package/inputmask/InputMask.d.ts +32 -4
- package/inputmask/InputMask.vue +9 -1
- package/inputmask/inputmask.cjs.js +9 -1
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +9 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +9 -1
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +10 -10
- package/inputswitch/InputSwitch.d.ts +9 -9
- package/inputtext/InputText.d.ts +3 -3
- package/knob/Knob.d.ts +7 -7
- package/listbox/Listbox.d.ts +18 -18
- package/megamenu/MegaMenu.d.ts +26 -18
- package/megamenu/MegaMenuSub.vue +14 -11
- package/megamenu/megamenu.cjs.js +15 -12
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +15 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +15 -12
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +28 -14
- package/menu/Menu.vue +2 -2
- package/menu/Menuitem.vue +4 -1
- package/menu/menu.cjs.js +9 -5
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +9 -5
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +9 -5
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +29 -17
- package/menubar/MenubarSub.vue +15 -11
- package/menubar/menubar.cjs.js +16 -12
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +16 -12
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +16 -12
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +18 -12
- package/message/Message.vue +1 -1
- package/message/message.cjs.js +3 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +4 -4
- package/message/message.esm.min.js +1 -1
- package/message/message.js +3 -3
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +47 -41
- package/multiselect/MultiSelect.vue +1 -1
- package/multiselect/multiselect.cjs.js +3 -3
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +3 -3
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +3 -3
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +24 -18
- package/orderlist/OrderList.vue +2 -1
- package/orderlist/orderlist.cjs.js +3 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +3 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +3 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +15 -15
- package/overlaypanel/OverlayPanel.d.ts +13 -7
- package/overlaypanel/OverlayPanel.vue +2 -1
- package/overlaypanel/overlaypanel.cjs.js +5 -3
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +6 -4
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +5 -3
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +15 -15
- package/paginator/Paginator.d.ts +20 -20
- package/paginator/Paginator.vue +2 -1
- package/paginator/paginator.cjs.js +2 -0
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +3 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -0
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +19 -13
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +3 -3
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -3
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +3 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +35 -21
- package/panelmenu/PanelMenu.vue +13 -12
- package/panelmenu/PanelMenuSub.vue +14 -12
- package/panelmenu/panelmenu.cjs.js +31 -28
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +31 -28
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +31 -28
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +74 -0
- package/passthrough/index.cjs.min.js +1 -0
- package/passthrough/index.d.ts +15 -0
- package/passthrough/index.esm.js +70 -0
- package/passthrough/index.esm.min.js +1 -0
- package/passthrough/index.js +77 -0
- package/passthrough/index.min.js +1 -0
- package/passthrough/package.json +6 -0
- package/passthrough/tailwind/index.cjs.js +3828 -0
- package/passthrough/tailwind/index.cjs.min.js +1 -0
- package/passthrough/tailwind/index.d.ts +5 -0
- package/passthrough/tailwind/index.esm.js +3823 -0
- package/passthrough/tailwind/index.esm.min.js +1 -0
- package/passthrough/tailwind/index.js +3835 -0
- package/passthrough/tailwind/index.min.js +1 -0
- package/passthrough/tailwind/package.json +6 -0
- package/password/Password.d.ts +25 -14
- package/password/Password.vue +2 -1
- package/password/password.cjs.js +4 -3
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +4 -3
- package/password/password.esm.min.js +1 -1
- package/password/password.js +4 -3
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +42 -36
- package/picklist/PickList.vue +3 -2
- package/picklist/picklist.cjs.js +4 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +4 -2
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +4 -2
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +5 -5
- package/progressspinner/ProgressSpinner.d.ts +5 -5
- package/radiobutton/RadioButton.d.ts +10 -10
- package/rating/Rating.d.ts +12 -12
- package/rating/Rating.vue +3 -3
- package/rating/rating.cjs.js +3 -3
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +3 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +3 -3
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +7 -0
- package/resources/themes/arya-green/theme.css +7 -0
- package/resources/themes/arya-orange/theme.css +7 -0
- package/resources/themes/arya-purple/theme.css +7 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +7 -0
- package/resources/themes/bootstrap4-dark-purple/theme.css +7 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +7 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +7 -0
- package/resources/themes/fluent-light/theme.css +7 -0
- package/resources/themes/lara-dark-blue/theme.css +7 -0
- package/resources/themes/lara-dark-indigo/theme.css +7 -0
- package/resources/themes/lara-dark-purple/theme.css +7 -0
- package/resources/themes/lara-dark-teal/theme.css +7 -0
- package/resources/themes/lara-light-blue/theme.css +7 -0
- package/resources/themes/lara-light-indigo/theme.css +7 -0
- package/resources/themes/lara-light-purple/theme.css +7 -0
- package/resources/themes/lara-light-teal/theme.css +7 -0
- package/resources/themes/luna-amber/theme.css +7 -0
- package/resources/themes/luna-blue/theme.css +7 -0
- package/resources/themes/luna-green/theme.css +7 -0
- package/resources/themes/luna-pink/theme.css +7 -0
- package/resources/themes/md-dark-deeppurple/theme.css +7 -0
- package/resources/themes/md-dark-indigo/theme.css +7 -0
- package/resources/themes/md-light-deeppurple/theme.css +7 -0
- package/resources/themes/md-light-indigo/theme.css +7 -0
- package/resources/themes/mdc-dark-deeppurple/theme.css +7 -0
- package/resources/themes/mdc-dark-indigo/theme.css +7 -0
- package/resources/themes/mdc-light-deeppurple/theme.css +7 -0
- package/resources/themes/mdc-light-indigo/theme.css +7 -0
- package/resources/themes/mira/theme.css +7 -0
- package/resources/themes/nano/theme.css +7 -0
- package/resources/themes/nova/theme.css +7 -0
- package/resources/themes/nova-accent/theme.css +7 -0
- package/resources/themes/nova-alt/theme.css +7 -0
- package/resources/themes/nova-vue/theme.css +7 -0
- package/resources/themes/rhea/theme.css +7 -0
- package/resources/themes/saga-blue/theme.css +7 -0
- package/resources/themes/saga-green/theme.css +7 -0
- package/resources/themes/saga-orange/theme.css +7 -0
- package/resources/themes/saga-purple/theme.css +7 -0
- package/resources/themes/soho-dark/theme.css +7 -0
- package/resources/themes/soho-light/theme.css +7 -0
- package/resources/themes/tailwind-light/theme.css +7 -0
- package/resources/themes/vela-blue/theme.css +7 -0
- package/resources/themes/vela-green/theme.css +7 -0
- package/resources/themes/vela-orange/theme.css +7 -0
- package/resources/themes/vela-purple/theme.css +7 -0
- package/resources/themes/viva-dark/theme.css +7 -0
- package/resources/themes/viva-light/theme.css +7 -0
- package/ripple/Ripple.d.ts +3 -3
- package/row/Row.d.ts +2 -2
- package/scrollpanel/ScrollPanel.d.ts +7 -7
- package/scrolltop/ScrollTop.d.ts +11 -5
- package/scrolltop/ScrollTop.vue +1 -1
- package/scrolltop/scrolltop.cjs.js +3 -3
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +4 -4
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +3 -3
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +5 -5
- package/sidebar/Sidebar.d.ts +16 -10
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +3 -3
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +3 -3
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +3 -3
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +3 -3
- package/slider/Slider.d.ts +7 -7
- package/speeddial/BaseSpeedDial.vue +12 -36
- package/speeddial/SpeedDial.d.ts +14 -9
- package/speeddial/SpeedDial.vue +5 -4
- package/speeddial/speeddial.cjs.js +44 -23
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +44 -23
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +44 -23
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +8 -8
- package/splitbutton/SplitButton.vue +22 -3
- package/splitbutton/splitbutton.cjs.js +17 -5
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +17 -5
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +17 -5
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +16 -5
- package/splitter/Splitter.vue +8 -1
- package/splitter/splitter.cjs.js +9 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +9 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +9 -1
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.d.ts +14 -3
- package/splitterpanel/SplitterPanel.vue +8 -1
- package/splitterpanel/splitterpanel.cjs.js +8 -1
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +8 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +8 -1
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/steps/BaseSteps.vue +1 -1
- package/steps/Steps.d.ts +33 -8
- package/steps/Steps.vue +17 -7
- package/steps/steps.cjs.js +19 -9
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +19 -9
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +19 -9
- package/steps/steps.min.js +1 -1
- package/styleclass/StyleClass.d.ts +2 -2
- package/tabmenu/TabMenu.d.ts +15 -11
- package/tabmenu/TabMenu.vue +11 -10
- package/tabmenu/tabmenu.cjs.js +11 -10
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +11 -10
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +11 -10
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +10 -10
- package/tabview/TabView.d.ts +16 -16
- package/tabview/TabView.vue +1 -0
- package/tabview/tabview.cjs.js +2 -1
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +2 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +2 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +5 -5
- package/terminal/Terminal.d.ts +11 -11
- package/textarea/Textarea.d.ts +3 -3
- package/tieredmenu/TieredMenu.d.ts +27 -13
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/TieredMenuSub.vue +13 -11
- package/tieredmenu/tieredmenu.cjs.js +16 -14
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +16 -14
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +16 -14
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +9 -9
- package/toast/BaseToast.vue +4 -0
- package/toast/Toast.d.ts +23 -17
- package/toast/Toast.vue +3 -2
- package/toast/toast.cjs.js +4 -2
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +5 -3
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +4 -2
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +31 -9
- package/togglebutton/ToggleButton.vue +12 -3
- package/togglebutton/togglebutton.cjs.js +12 -3
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +12 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +12 -3
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +6 -6
- package/toolbar/Toolbar.vue +3 -3
- package/toolbar/toolbar.cjs.js +3 -6
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -6
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +3 -6
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/Tooltip.d.ts +35 -6
- package/tooltip/tooltip.cjs.js +17 -4
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +17 -4
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +413 -400
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +20 -20
- package/tree/Tree.vue +1 -0
- package/tree/tree.cjs.js +3 -2
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +3 -2
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +3 -2
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +23 -17
- package/treeselect/TreeSelect.vue +2 -2
- package/treeselect/treeselect.cjs.js +4 -4
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +4 -4
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +4 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +21 -21
- package/treetable/TreeTable.vue +2 -1
- package/treetable/treetable.cjs.js +1 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +1 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +11 -11
- package/usestyle/UseStyle.d.ts +2 -1
- package/usestyle/usestyle.cjs.js +20 -7
- package/usestyle/usestyle.cjs.min.js +1 -1
- package/usestyle/usestyle.esm.js +20 -7
- package/usestyle/usestyle.esm.min.js +1 -1
- package/usestyle/usestyle.js +20 -7
- package/usestyle/usestyle.min.js +1 -1
- package/utils/Utils.d.ts +4 -0
- package/utils/utils.cjs.js +48 -8
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +48 -8
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +48 -8
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +129 -125
- package/vetur-tags.json +1 -0
- package/virtualscroller/BaseVirtualScroller.vue +1 -1
- package/virtualscroller/VirtualScroller.d.ts +7 -7
- package/virtualscroller/virtualscroller.cjs.js +2 -1
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +2 -1
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +2 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +160 -127
package/speeddial/SpeedDial.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :ref="containerRef" :class="containerClass" :style="style" v-bind="ptm('root')" data-pc-name="speeddial">
|
|
2
|
+
<div :ref="containerRef" :class="containerClass" :style="[style, sx('root')]" v-bind="ptm('root')" data-pc-name="speeddial">
|
|
3
3
|
<slot name="button" :toggle="onClick">
|
|
4
4
|
<SDButton
|
|
5
5
|
type="button"
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
</SDButton>
|
|
25
25
|
</slot>
|
|
26
|
-
<ul :ref="listRef" :id="id + '_list'" :class="cx('menu')"
|
|
26
|
+
<ul :ref="listRef" :id="id + '_list'" :class="cx('menu')" :style="sx('menu')" role="menu" :aria-activedescendant="focused ? focusedOptionId : undefined" tabindex="-1" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" v-bind="ptm('menu')">
|
|
27
27
|
<template v-for="(item, index) of model" :key="index">
|
|
28
28
|
<li v-if="isItemVisible(item)" :id="`${id}_${index}`" :aria-controls="`${id}_item`" :class="cx('menuitem', { id: `${id}_${index}` })" :style="getItemStyle(index)" role="menuitem" v-bind="getPTOptions(`${id}_${index}`, 'menuitem')">
|
|
29
29
|
<template v-if="!$slots.item">
|
|
30
30
|
<a
|
|
31
|
-
v-tooltip:[tooltipOptions]="{ value: item.label, disabled: !tooltipOptions }"
|
|
32
31
|
v-ripple
|
|
32
|
+
v-tooltip:[tooltipOptions]="{ value: item.label, disabled: !tooltipOptions }"
|
|
33
33
|
:tabindex="-1"
|
|
34
34
|
:href="item.url || '#'"
|
|
35
35
|
role="menuitem"
|
|
@@ -111,7 +111,8 @@ export default {
|
|
|
111
111
|
getPTOptions(id, key) {
|
|
112
112
|
return this.ptm(key, {
|
|
113
113
|
context: {
|
|
114
|
-
active: this.isItemActive(id)
|
|
114
|
+
active: this.isItemActive(id),
|
|
115
|
+
hidden: !this.d_visible
|
|
115
116
|
}
|
|
116
117
|
});
|
|
117
118
|
},
|
|
@@ -21,37 +21,55 @@ function _typeof$1(obj) { "@babel/helpers - typeof"; return _typeof$1 = "functio
|
|
|
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 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
|
|
25
|
-
|
|
24
|
+
var styles = "\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";
|
|
25
|
+
|
|
26
|
+
/* Direction */
|
|
27
|
+
var inlineStyles = {
|
|
26
28
|
root: function root(_ref) {
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
props
|
|
30
|
-
|
|
29
|
+
var props = _ref.props;
|
|
30
|
+
return {
|
|
31
|
+
alignItems: props.direction === 'up' || props.direction === 'down' ? 'center' : '',
|
|
32
|
+
justifyContent: props.direction === 'left' || props.direction === 'right' ? 'center' : '',
|
|
33
|
+
flexDirection: props.direction === 'up' ? 'column-reverse' : props.direction === 'down' ? 'column' : props.direction === 'left' ? 'row-reverse' : props.direction === 'right' ? 'row' : null
|
|
34
|
+
};
|
|
31
35
|
},
|
|
32
|
-
|
|
33
|
-
var props =
|
|
36
|
+
menu: function menu(_ref2) {
|
|
37
|
+
var props = _ref2.props;
|
|
38
|
+
return {
|
|
39
|
+
flexDirection: props.direction === 'up' ? 'column-reverse' : props.direction === 'down' ? 'column' : props.direction === 'left' ? 'row-reverse' : props.direction === 'right' ? 'row' : null
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var classes = {
|
|
44
|
+
root: function root(_ref3) {
|
|
45
|
+
var _ref4;
|
|
46
|
+
var instance = _ref3.instance,
|
|
47
|
+
props = _ref3.props;
|
|
48
|
+
return ["p-speeddial p-component p-speeddial-".concat(props.type), (_ref4 = {}, _defineProperty$1(_ref4, "p-speeddial-direction-".concat(props.direction), props.type !== 'circle'), _defineProperty$1(_ref4, 'p-speeddial-opened', instance.d_visible), _defineProperty$1(_ref4, 'p-disabled', props.disabled), _ref4)];
|
|
49
|
+
},
|
|
50
|
+
button: function button(_ref5) {
|
|
51
|
+
var props = _ref5.props;
|
|
34
52
|
return ['p-speeddial-button p-button-rounded', {
|
|
35
53
|
'p-speeddial-rotate': props.rotateAnimation && !props.hideIcon
|
|
36
54
|
}];
|
|
37
55
|
},
|
|
38
56
|
menu: 'p-speeddial-list',
|
|
39
|
-
menuitem: function menuitem(
|
|
40
|
-
var instance =
|
|
41
|
-
id =
|
|
57
|
+
menuitem: function menuitem(_ref6) {
|
|
58
|
+
var instance = _ref6.instance,
|
|
59
|
+
id = _ref6.id;
|
|
42
60
|
return ['p-speeddial-item', {
|
|
43
61
|
'p-focus': instance.isItemActive(id)
|
|
44
62
|
}];
|
|
45
63
|
},
|
|
46
|
-
action: function action(
|
|
47
|
-
var item =
|
|
64
|
+
action: function action(_ref7) {
|
|
65
|
+
var item = _ref7.item;
|
|
48
66
|
return ['p-speeddial-action', {
|
|
49
67
|
'p-disabled': item.disabled
|
|
50
68
|
}];
|
|
51
69
|
},
|
|
52
70
|
actionIcon: 'p-speeddial-action-icon',
|
|
53
|
-
mask: function mask(
|
|
54
|
-
var instance =
|
|
71
|
+
mask: function mask(_ref8) {
|
|
72
|
+
var instance = _ref8.instance;
|
|
55
73
|
return ['p-speeddial-mask', {
|
|
56
74
|
'p-speeddial-mask-visible': instance.d_visible
|
|
57
75
|
}];
|
|
@@ -128,6 +146,7 @@ var script$1 = {
|
|
|
128
146
|
},
|
|
129
147
|
css: {
|
|
130
148
|
classes: classes,
|
|
149
|
+
inlineStyles: inlineStyles,
|
|
131
150
|
loadStyle: loadStyle
|
|
132
151
|
},
|
|
133
152
|
provide: function provide() {
|
|
@@ -196,7 +215,8 @@ var script = {
|
|
|
196
215
|
getPTOptions: function getPTOptions(id, key) {
|
|
197
216
|
return this.ptm(key, {
|
|
198
217
|
context: {
|
|
199
|
-
active: this.isItemActive(id)
|
|
218
|
+
active: this.isItemActive(id),
|
|
219
|
+
hidden: !this.d_visible
|
|
200
220
|
}
|
|
201
221
|
});
|
|
202
222
|
},
|
|
@@ -536,12 +556,12 @@ var _hoisted_2 = ["id", "aria-controls"];
|
|
|
536
556
|
var _hoisted_3 = ["href", "target", "onClick", "aria-label"];
|
|
537
557
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
538
558
|
var _component_SDButton = vue.resolveComponent("SDButton");
|
|
539
|
-
var _directive_tooltip = vue.resolveDirective("tooltip");
|
|
540
559
|
var _directive_ripple = vue.resolveDirective("ripple");
|
|
560
|
+
var _directive_tooltip = vue.resolveDirective("tooltip");
|
|
541
561
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [vue.createElementVNode("div", vue.mergeProps({
|
|
542
562
|
ref: $options.containerRef,
|
|
543
563
|
"class": $options.containerClass,
|
|
544
|
-
style: _ctx.style
|
|
564
|
+
style: [_ctx.style, _ctx.sx('root')]
|
|
545
565
|
}, _ctx.ptm('root'), {
|
|
546
566
|
"data-pc-name": "speeddial"
|
|
547
567
|
}), [vue.renderSlot(_ctx.$slots, "button", {
|
|
@@ -582,7 +602,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
582
602
|
ref: $options.listRef,
|
|
583
603
|
id: $data.id + '_list',
|
|
584
604
|
"class": _ctx.cx('menu'),
|
|
605
|
+
style: _ctx.sx('menu'),
|
|
585
606
|
role: "menu",
|
|
607
|
+
"aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
|
|
608
|
+
tabindex: "-1",
|
|
586
609
|
onFocus: _cache[1] || (_cache[1] = function () {
|
|
587
610
|
return $options.onFocus && $options.onFocus.apply($options, arguments);
|
|
588
611
|
}),
|
|
@@ -591,9 +614,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
591
614
|
}),
|
|
592
615
|
onKeydown: _cache[3] || (_cache[3] = function () {
|
|
593
616
|
return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);
|
|
594
|
-
})
|
|
595
|
-
"aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
|
|
596
|
-
tabindex: "-1"
|
|
617
|
+
})
|
|
597
618
|
}, _ctx.ptm('menu')), [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.model, function (item, index) {
|
|
598
619
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
599
620
|
key: index
|
|
@@ -622,10 +643,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
622
643
|
}, $options.getPTOptions("".concat($data.id, "_").concat(index), 'action')), [item.icon ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
623
644
|
key: 0,
|
|
624
645
|
"class": [_ctx.cx('actionIcon'), item.icon]
|
|
625
|
-
}, $options.getPTOptions("".concat($data.id, "_").concat(index), 'actionIcon')), null, 16)) : vue.createCommentVNode("", true)], 16, _hoisted_3)), [[_directive_tooltip, {
|
|
646
|
+
}, $options.getPTOptions("".concat($data.id, "_").concat(index), 'actionIcon')), null, 16)) : vue.createCommentVNode("", true)], 16, _hoisted_3)), [[_directive_ripple], [_directive_tooltip, {
|
|
626
647
|
value: item.label,
|
|
627
648
|
disabled: !_ctx.tooltipOptions
|
|
628
|
-
}, _ctx.tooltipOptions]
|
|
649
|
+
}, _ctx.tooltipOptions]]) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.item), {
|
|
629
650
|
key: 1,
|
|
630
651
|
item: item,
|
|
631
652
|
onClick: function onClick(event) {
|
|
@@ -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 l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(e),d=l(t),u=l(n),p=l(i),f=l(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\n/* Direction */\n.p-speeddial-direction-up {\n align-items: center;\n flex-direction: column-reverse;\n}\n\n.p-speeddial-direction-up .p-speeddial-list {\n flex-direction: column-reverse;\n}\n\n.p-speeddial-direction-down {\n align-items: center;\n flex-direction: column;\n}\n\n.p-speeddial-direction-down .p-speeddial-list {\n flex-direction: column;\n}\n\n.p-speeddial-direction-left {\n justify-content: center;\n flex-direction: row-reverse;\n}\n\n.p-speeddial-direction-left .p-speeddial-list {\n flex-direction: row-reverse;\n}\n\n.p-speeddial-direction-right {\n justify-content: center;\n flex-direction: row;\n}\n\n.p-speeddial-direction-right .p-speeddial-list {\n flex-direction: row;\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=O(e,"string");return"symbol"===k(t)?t:String(t)}function O(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 C(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,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)}})},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=C(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=C(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=C(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=C(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))"),l="calc(".concat(i*Math.sin(s*e),"px + var(--item-diff-y, 0px))");if("up"===r)return{left:a,bottom:l};if("down"===r)return{left:a,top:l};if("left"===r)return{right:l,top:a};if("right"===r)return{left:l,top:a}}else if("quarter-circle"===t){var c=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"===c)return{right:u,bottom:p};if("up-right"===c)return{left:u,bottom:p};if("down-left"===c)return{right:p,top:u};if("down-right"===c)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:c.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"),l=a.resolveDirective("tooltip"),c=a.resolveDirective("ripple");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",a.mergeProps({ref:r.containerRef,class:r.containerClass,style:e.style},e.ptm("root"),{"data-pc-name":"speeddial"}),[a.renderSlot(e.$slots,"button",{toggle: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"),role:"menu",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)}),"aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:"-1"},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)),[[l,{value:t.label,disabled:!e.tooltipOptions},e.tooltipOptions],[c]])],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.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",{toggle: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;
|
|
@@ -11,37 +11,55 @@ function _typeof$1(obj) { "@babel/helpers - typeof"; return _typeof$1 = "functio
|
|
|
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 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
|
|
15
|
-
|
|
14
|
+
var styles = "\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";
|
|
15
|
+
|
|
16
|
+
/* Direction */
|
|
17
|
+
var inlineStyles = {
|
|
16
18
|
root: function root(_ref) {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
props
|
|
20
|
-
|
|
19
|
+
var props = _ref.props;
|
|
20
|
+
return {
|
|
21
|
+
alignItems: props.direction === 'up' || props.direction === 'down' ? 'center' : '',
|
|
22
|
+
justifyContent: props.direction === 'left' || props.direction === 'right' ? 'center' : '',
|
|
23
|
+
flexDirection: props.direction === 'up' ? 'column-reverse' : props.direction === 'down' ? 'column' : props.direction === 'left' ? 'row-reverse' : props.direction === 'right' ? 'row' : null
|
|
24
|
+
};
|
|
21
25
|
},
|
|
22
|
-
|
|
23
|
-
var props =
|
|
26
|
+
menu: function menu(_ref2) {
|
|
27
|
+
var props = _ref2.props;
|
|
28
|
+
return {
|
|
29
|
+
flexDirection: props.direction === 'up' ? 'column-reverse' : props.direction === 'down' ? 'column' : props.direction === 'left' ? 'row-reverse' : props.direction === 'right' ? 'row' : null
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var classes = {
|
|
34
|
+
root: function root(_ref3) {
|
|
35
|
+
var _ref4;
|
|
36
|
+
var instance = _ref3.instance,
|
|
37
|
+
props = _ref3.props;
|
|
38
|
+
return ["p-speeddial p-component p-speeddial-".concat(props.type), (_ref4 = {}, _defineProperty$1(_ref4, "p-speeddial-direction-".concat(props.direction), props.type !== 'circle'), _defineProperty$1(_ref4, 'p-speeddial-opened', instance.d_visible), _defineProperty$1(_ref4, 'p-disabled', props.disabled), _ref4)];
|
|
39
|
+
},
|
|
40
|
+
button: function button(_ref5) {
|
|
41
|
+
var props = _ref5.props;
|
|
24
42
|
return ['p-speeddial-button p-button-rounded', {
|
|
25
43
|
'p-speeddial-rotate': props.rotateAnimation && !props.hideIcon
|
|
26
44
|
}];
|
|
27
45
|
},
|
|
28
46
|
menu: 'p-speeddial-list',
|
|
29
|
-
menuitem: function menuitem(
|
|
30
|
-
var instance =
|
|
31
|
-
id =
|
|
47
|
+
menuitem: function menuitem(_ref6) {
|
|
48
|
+
var instance = _ref6.instance,
|
|
49
|
+
id = _ref6.id;
|
|
32
50
|
return ['p-speeddial-item', {
|
|
33
51
|
'p-focus': instance.isItemActive(id)
|
|
34
52
|
}];
|
|
35
53
|
},
|
|
36
|
-
action: function action(
|
|
37
|
-
var item =
|
|
54
|
+
action: function action(_ref7) {
|
|
55
|
+
var item = _ref7.item;
|
|
38
56
|
return ['p-speeddial-action', {
|
|
39
57
|
'p-disabled': item.disabled
|
|
40
58
|
}];
|
|
41
59
|
},
|
|
42
60
|
actionIcon: 'p-speeddial-action-icon',
|
|
43
|
-
mask: function mask(
|
|
44
|
-
var instance =
|
|
61
|
+
mask: function mask(_ref8) {
|
|
62
|
+
var instance = _ref8.instance;
|
|
45
63
|
return ['p-speeddial-mask', {
|
|
46
64
|
'p-speeddial-mask-visible': instance.d_visible
|
|
47
65
|
}];
|
|
@@ -118,6 +136,7 @@ var script$1 = {
|
|
|
118
136
|
},
|
|
119
137
|
css: {
|
|
120
138
|
classes: classes,
|
|
139
|
+
inlineStyles: inlineStyles,
|
|
121
140
|
loadStyle: loadStyle
|
|
122
141
|
},
|
|
123
142
|
provide: function provide() {
|
|
@@ -186,7 +205,8 @@ var script = {
|
|
|
186
205
|
getPTOptions: function getPTOptions(id, key) {
|
|
187
206
|
return this.ptm(key, {
|
|
188
207
|
context: {
|
|
189
|
-
active: this.isItemActive(id)
|
|
208
|
+
active: this.isItemActive(id),
|
|
209
|
+
hidden: !this.d_visible
|
|
190
210
|
}
|
|
191
211
|
});
|
|
192
212
|
},
|
|
@@ -526,12 +546,12 @@ var _hoisted_2 = ["id", "aria-controls"];
|
|
|
526
546
|
var _hoisted_3 = ["href", "target", "onClick", "aria-label"];
|
|
527
547
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
528
548
|
var _component_SDButton = resolveComponent("SDButton");
|
|
529
|
-
var _directive_tooltip = resolveDirective("tooltip");
|
|
530
549
|
var _directive_ripple = resolveDirective("ripple");
|
|
550
|
+
var _directive_tooltip = resolveDirective("tooltip");
|
|
531
551
|
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", mergeProps({
|
|
532
552
|
ref: $options.containerRef,
|
|
533
553
|
"class": $options.containerClass,
|
|
534
|
-
style: _ctx.style
|
|
554
|
+
style: [_ctx.style, _ctx.sx('root')]
|
|
535
555
|
}, _ctx.ptm('root'), {
|
|
536
556
|
"data-pc-name": "speeddial"
|
|
537
557
|
}), [renderSlot(_ctx.$slots, "button", {
|
|
@@ -572,7 +592,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
572
592
|
ref: $options.listRef,
|
|
573
593
|
id: $data.id + '_list',
|
|
574
594
|
"class": _ctx.cx('menu'),
|
|
595
|
+
style: _ctx.sx('menu'),
|
|
575
596
|
role: "menu",
|
|
597
|
+
"aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
|
|
598
|
+
tabindex: "-1",
|
|
576
599
|
onFocus: _cache[1] || (_cache[1] = function () {
|
|
577
600
|
return $options.onFocus && $options.onFocus.apply($options, arguments);
|
|
578
601
|
}),
|
|
@@ -581,9 +604,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
581
604
|
}),
|
|
582
605
|
onKeydown: _cache[3] || (_cache[3] = function () {
|
|
583
606
|
return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);
|
|
584
|
-
})
|
|
585
|
-
"aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
|
|
586
|
-
tabindex: "-1"
|
|
607
|
+
})
|
|
587
608
|
}, _ctx.ptm('menu')), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.model, function (item, index) {
|
|
588
609
|
return openBlock(), createElementBlock(Fragment, {
|
|
589
610
|
key: index
|
|
@@ -612,10 +633,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
612
633
|
}, $options.getPTOptions("".concat($data.id, "_").concat(index), 'action')), [item.icon ? (openBlock(), createElementBlock("span", mergeProps({
|
|
613
634
|
key: 0,
|
|
614
635
|
"class": [_ctx.cx('actionIcon'), item.icon]
|
|
615
|
-
}, $options.getPTOptions("".concat($data.id, "_").concat(index), 'actionIcon')), null, 16)) : createCommentVNode("", true)], 16, _hoisted_3)), [[_directive_tooltip, {
|
|
636
|
+
}, $options.getPTOptions("".concat($data.id, "_").concat(index), 'actionIcon')), null, 16)) : createCommentVNode("", true)], 16, _hoisted_3)), [[_directive_ripple], [_directive_tooltip, {
|
|
616
637
|
value: item.label,
|
|
617
638
|
disabled: !_ctx.tooltipOptions
|
|
618
|
-
}, _ctx.tooltipOptions]
|
|
639
|
+
}, _ctx.tooltipOptions]]) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.item), {
|
|
619
640
|
key: 1,
|
|
620
641
|
item: item,
|
|
621
642
|
onClick: function onClick(event) {
|
|
@@ -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 d,createElementBlock as u,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\n/* Direction */\n.p-speeddial-direction-up {\n align-items: center;\n flex-direction: column-reverse;\n}\n\n.p-speeddial-direction-up .p-speeddial-list {\n flex-direction: column-reverse;\n}\n\n.p-speeddial-direction-down {\n align-items: center;\n flex-direction: column;\n}\n\n.p-speeddial-direction-down .p-speeddial-list {\n flex-direction: column;\n}\n\n.p-speeddial-direction-left {\n justify-content: center;\n flex-direction: row-reverse;\n}\n\n.p-speeddial-direction-left .p-speeddial-list {\n flex-direction: row-reverse;\n}\n\n.p-speeddial-direction-right {\n justify-content: center;\n flex-direction: row;\n}\n\n.p-speeddial-direction-right .p-speeddial-list {\n flex-direction: row;\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,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)}})},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,d=Math.PI/(2*(n-1)),u="calc(".concat(i*Math.cos(d*t),"px + var(--item-diff-x, 0px))"),p="calc(".concat(i*Math.sin(d*t),"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(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("tooltip"),O=l("ripple");return d(),u(p,null,[f("div",m({ref:r.containerRef,class:r.containerClass,style:t.style},t.ptm("root"),{"data-pc-name":"speeddial"}),[h(t.$slots,"button",{toggle: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?(d(),g(w(t.hideIcon?"span":"PlusIcon"),m({key:0,class:t.cx("buttonIcon")},t.ptm("button").icon),null,16,["class"])):(d(),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"),role:"menu",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)}),"aria-activedescendant":o.focused?r.focusedOptionId:void 0,tabindex:"-1"},t.ptm("menu")),[(d(!0),u(p,null,I(t.model,(function(e,n){return d(),u(p,{key:n},[r.isItemVisible(e)?(d(),u("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?(d(),g(w(t.$slots.item),{key:1,item:e,onClick:function(t){return r.onItemClick(t,e)}},null,8,["item","onClick"])):x((d(),u("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?(d(),u("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,{value:e.label,disabled:!t.tooltipOptions},t.tooltipOptions],[O]])],16,H)):k("",!0)],64)})),128))],16,z)],16),t.mask?(d(),u("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.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",{toggle: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};
|