primevue 3.34.1 → 3.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/accordion/BaseAccordion.vue +17 -15
- package/accordion/accordion.cjs.js +1 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -1
- package/accordion/accordion.min.js +1 -1
- package/autocomplete/BaseAutoComplete.vue +81 -79
- package/autocomplete/autocomplete.cjs.js +1 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +1 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/BaseAvatar.vue +30 -28
- package/avatar/avatar.cjs.js +1 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +1 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +1 -1
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/BaseAvatarGroup.vue +9 -7
- package/avatargroup/avatargroup.cjs.js +1 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +1 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +1 -1
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/BaseBadge.vue +33 -31
- package/badge/badge.cjs.js +1 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +1 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +1 -1
- package/badge/badge.min.js +1 -1
- package/badgedirective/badgedirective.cjs.js +1 -1
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +1 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +1 -1
- package/badgedirective/badgedirective.min.js +1 -1
- package/base/base.cjs.js +1 -1
- package/base/base.cjs.min.js +1 -1
- package/base/base.esm.js +1 -1
- package/base/base.esm.min.js +1 -1
- package/base/base.js +1 -1
- package/base/base.min.js +1 -1
- package/basecomponent/BaseComponent.vue +8 -8
- package/basecomponent/basecomponent.cjs.js +14 -13
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +14 -13
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +14 -13
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +7 -6
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +7 -6
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +7 -6
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BaseBlockUI.vue +12 -10
- package/blockui/BlockUI.vue +2 -0
- package/blockui/blockui.cjs.js +3 -1
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +3 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +3 -1
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/BaseBreadcrumb.vue +32 -30
- package/breadcrumb/breadcrumb.cjs.js +1 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +1 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/BaseCalendar.vue +149 -146
- package/calendar/Calendar.vue +27 -19
- package/calendar/calendar.cjs.js +32 -24
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +32 -24
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +32 -24
- package/calendar/calendar.min.js +1 -1
- package/carousel/BaseCarousel.vue +70 -68
- package/carousel/carousel.cjs.js +1 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +1 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +1 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/BaseCascadeSelect.vue +81 -79
- package/cascadeselect/cascadeselect.cjs.js +1 -1
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +1 -1
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +1 -1
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/BaseChart.vue +4 -2
- package/chart/chart.cjs.js +1 -1
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +1 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +1 -1
- package/chart/chart.min.js +1 -1
- package/chip/BaseChip.vue +22 -20
- package/chip/chip.cjs.js +1 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +1 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +1 -1
- package/chip/chip.min.js +1 -1
- package/chips/BaseChips.vue +46 -44
- package/chips/chips.cjs.js +1 -1
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -1
- package/chips/chips.min.js +1 -1
- package/colorpicker/BaseColorPicker.vue +8 -6
- package/colorpicker/colorpicker.cjs.js +1 -1
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +1 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +1 -1
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +4 -0
- package/config/PrimeVue.d.ts +2 -0
- package/config/config.cjs.js +4 -0
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +4 -0
- package/config/config.esm.min.js +1 -1
- package/config/config.js +4 -0
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +22 -0
- package/confirmdialog/ConfirmDialog.vue +13 -8
- package/confirmdialog/confirmdialog.cjs.js +38 -22
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +39 -23
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +38 -22
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/BaseConfirmPopup.vue +72 -70
- package/confirmpopup/ConfirmPopup.d.ts +18 -0
- package/confirmpopup/ConfirmPopup.vue +45 -24
- package/confirmpopup/confirmpopup.cjs.js +14 -10
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +15 -11
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +14 -10
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/BaseContextMenu.vue +41 -39
- package/contextmenu/contextmenu.cjs.js +1 -1
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +1 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +1 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +73 -55
- package/core/core.min.js +18 -18
- package/datatable/BaseDataTable.vue +235 -233
- package/datatable/DataTable.vue +1 -1
- package/datatable/datatable.cjs.js +2 -2
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +2 -2
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +2 -2
- package/datatable/datatable.min.js +1 -1
- package/dialog/BaseDialog.vue +136 -130
- package/dialog/Dialog.d.ts +20 -0
- package/dialog/Dialog.vue +54 -50
- package/dialog/dialog.cjs.js +24 -9
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +25 -10
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +24 -9
- package/dialog/dialog.min.js +1 -1
- package/divider/BaseDivider.vue +61 -59
- package/divider/divider.cjs.js +1 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -1
- package/divider/divider.min.js +1 -1
- package/dock/BaseDock.vue +106 -104
- package/dock/dock.cjs.js +1 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +1 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/BaseDropdown.vue +93 -91
- package/dropdown/dropdown.cjs.js +1 -1
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -1
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -1
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/BaseFieldset.vue +19 -17
- package/fieldset/fieldset.cjs.js +1 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +1 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +1 -1
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/BaseFileUpload.vue +44 -42
- package/fileupload/fileupload.cjs.js +1 -1
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +1 -1
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +1 -1
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/BaseGalleria.vue +283 -281
- package/galleria/Galleria.vue +3 -0
- package/galleria/galleria.cjs.js +4 -1
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +4 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +4 -1
- package/galleria/galleria.min.js +1 -1
- package/image/BaseImage.vue +64 -62
- package/image/Image.vue +3 -0
- package/image/image.cjs.js +4 -1
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +4 -1
- package/image/image.esm.min.js +1 -1
- package/image/image.js +4 -1
- package/image/image.min.js +1 -1
- package/inlinemessage/BaseInlineMessage.vue +16 -14
- package/inlinemessage/inlinemessage.cjs.js +1 -1
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +1 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +1 -1
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/BaseInplace.vue +18 -16
- package/inplace/inplace.cjs.js +1 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +1 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +1 -1
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/BaseInputNumber.vue +101 -99
- package/inputnumber/inputnumber.cjs.js +1 -1
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +1 -1
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +1 -1
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/BaseInputSwitch.vue +20 -18
- package/inputswitch/inputswitch.cjs.js +1 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +1 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +1 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/knob/BaseKnob.vue +14 -12
- package/knob/knob.cjs.js +1 -1
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +1 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +1 -1
- package/knob/knob.min.js +1 -1
- package/listbox/BaseListbox.vue +34 -32
- package/listbox/listbox.cjs.js +1 -1
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +1 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +1 -1
- package/listbox/listbox.min.js +1 -1
- package/megamenu/BaseMegaMenu.vue +111 -109
- package/megamenu/megamenu.cjs.js +1 -1
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +1 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +1 -1
- package/megamenu/megamenu.min.js +1 -1
- package/menu/BaseMenu.vue +19 -17
- package/menu/menu.cjs.js +1 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +1 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +1 -1
- package/menu/menu.min.js +1 -1
- package/menubar/BaseMenubar.vue +72 -70
- package/menubar/menubar.cjs.js +1 -1
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +1 -1
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +1 -1
- package/menubar/menubar.min.js +1 -1
- package/message/BaseMessage.vue +49 -47
- package/message/Message.d.ts +10 -0
- package/message/Message.vue +2 -1
- package/message/message.cjs.js +7 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +8 -4
- package/message/message.esm.min.js +1 -1
- package/message/message.js +7 -3
- package/message/message.min.js +1 -1
- package/multiselect/BaseMultiSelect.vue +106 -104
- package/multiselect/multiselect.cjs.js +1 -1
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -1
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -1
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/BaseOrderList.vue +38 -36
- package/orderlist/orderlist.cjs.js +1 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +1 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +1 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/BaseOrganizationChart.vue +53 -51
- package/organizationchart/organizationchart.cjs.js +1 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +1 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/BaseOverlayPanel.vue +70 -68
- package/overlaypanel/OverlayPanel.d.ts +15 -0
- package/overlaypanel/OverlayPanel.vue +11 -8
- package/overlaypanel/overlaypanel.cjs.js +11 -3
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +12 -4
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +11 -3
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/BasePaginator.vue +40 -38
- package/paginator/paginator.cjs.js +1 -1
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +1 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +1 -1
- package/paginator/paginator.min.js +1 -1
- package/panel/BasePanel.vue +20 -18
- package/panel/panel.cjs.js +1 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +1 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +1 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/BasePanelMenu.vue +33 -31
- package/panelmenu/panelmenu.cjs.js +1 -1
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1 -1
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +2 -9
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.esm.js +2 -9
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +2 -9
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +4 -4
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +4 -4
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +4 -4
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/BasePassword.vue +27 -25
- package/password/password.cjs.js +1 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +1 -1
- package/password/password.min.js +1 -1
- package/picklist/BasePickList.vue +34 -32
- package/picklist/picklist.cjs.js +1 -1
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +1 -1
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +1 -1
- package/picklist/picklist.min.js +1 -1
- package/progressbar/BaseProgressBar.vue +99 -97
- package/progressbar/progressbar.cjs.js +1 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +1 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +1 -1
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/BaseProgressSpinner.vue +26 -24
- package/progressspinner/progressspinner.cjs.js +1 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +1 -1
- package/progressspinner/progressspinner.min.js +1 -1
- package/rating/BaseRating.vue +19 -17
- package/rating/Rating.vue +4 -1
- package/rating/rating.cjs.js +7 -5
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +7 -5
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +7 -5
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +5601 -5585
- package/resources/themes/arya-green/theme.css +5601 -5585
- package/resources/themes/arya-orange/theme.css +5601 -5585
- package/resources/themes/arya-purple/theme.css +5601 -5585
- package/resources/themes/bootstrap4-dark-blue/theme.css +5538 -5523
- package/resources/themes/bootstrap4-dark-purple/theme.css +5538 -5523
- package/resources/themes/bootstrap4-light-blue/theme.css +5607 -5592
- package/resources/themes/bootstrap4-light-purple/theme.css +5607 -5592
- package/resources/themes/fluent-light/theme.css +5734 -5718
- package/resources/themes/lara-dark-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5590 -5556
- package/resources/themes/lara-dark-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5590 -5556
- package/resources/themes/lara-dark-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5590 -5556
- package/resources/themes/lara-dark-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5590 -5556
- package/resources/themes/lara-light-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5604 -5570
- package/resources/themes/lara-light-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5604 -5570
- package/resources/themes/lara-light-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5604 -5570
- package/resources/themes/lara-light-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5604 -5570
- package/resources/themes/luna-amber/theme.css +5553 -5539
- package/resources/themes/luna-blue/theme.css +5553 -5539
- package/resources/themes/luna-green/theme.css +5553 -5539
- package/resources/themes/luna-pink/theme.css +5553 -5539
- package/resources/themes/md-dark-deeppurple/theme.css +7052 -7037
- package/resources/themes/md-dark-indigo/theme.css +7052 -7037
- package/resources/themes/md-light-deeppurple/theme.css +7073 -7058
- package/resources/themes/md-light-indigo/theme.css +7073 -7058
- package/resources/themes/mdc-dark-deeppurple/theme.css +7067 -7052
- package/resources/themes/mdc-dark-indigo/theme.css +7067 -7052
- package/resources/themes/mdc-light-deeppurple/theme.css +7074 -7059
- package/resources/themes/mdc-light-indigo/theme.css +7074 -7059
- package/resources/themes/mira/theme.css +5773 -5757
- package/resources/themes/nano/theme.css +5574 -5559
- package/resources/themes/nova/theme.css +5563 -5548
- package/resources/themes/nova-accent/theme.css +5539 -5524
- package/resources/themes/nova-alt/theme.css +5550 -5535
- package/resources/themes/nova-vue/theme.css +5563 -5548
- package/resources/themes/rhea/theme.css +5530 -5515
- package/resources/themes/saga-blue/theme.css +5590 -5574
- package/resources/themes/saga-green/theme.css +5590 -5574
- package/resources/themes/saga-orange/theme.css +5590 -5574
- package/resources/themes/saga-purple/theme.css +5590 -5574
- package/resources/themes/soho-dark/theme.css +5542 -5526
- package/resources/themes/soho-light/theme.css +5602 -5586
- package/resources/themes/tailwind-light/theme.css +5653 -5637
- package/resources/themes/vela-blue/theme.css +5590 -5574
- package/resources/themes/vela-green/theme.css +5590 -5574
- package/resources/themes/vela-orange/theme.css +5590 -5574
- package/resources/themes/vela-purple/theme.css +5590 -5574
- package/resources/themes/viva-dark/theme.css +5709 -5693
- package/resources/themes/viva-light/theme.css +5692 -5676
- package/ripple/ripple.cjs.js +1 -1
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +1 -1
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -1
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/BaseScrollPanel.vue +56 -54
- package/scrollpanel/scrollpanel.cjs.js +1 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +1 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +1 -1
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/BaseScrollTop.vue +33 -31
- package/scrolltop/scrolltop.cjs.js +1 -1
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +1 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +1 -1
- package/scrolltop/scrolltop.min.js +1 -1
- package/sidebar/BaseSidebar.vue +146 -144
- package/sidebar/Sidebar.d.ts +10 -0
- package/sidebar/Sidebar.vue +17 -12
- package/sidebar/sidebar.cjs.js +10 -3
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +11 -4
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +10 -3
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/BaseSkeleton.vue +30 -28
- package/skeleton/skeleton.cjs.js +1 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +1 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +1 -1
- package/skeleton/skeleton.min.js +1 -1
- package/slider/BaseSlider.vue +39 -37
- package/slider/slider.cjs.js +1 -2
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +1 -2
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +1 -2
- package/slider/slider.min.js +1 -1
- package/speeddial/BaseSpeedDial.vue +77 -75
- package/speeddial/speeddial.cjs.js +1 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +1 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +1 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/BaseSplitButton.vue +32 -30
- package/splitbutton/splitbutton.cjs.js +1 -1
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +1 -1
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +1 -1
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/BaseSplitter.vue +46 -44
- package/splitter/splitter.cjs.js +1 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +1 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +1 -1
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/BaseSplitterPanel.vue +13 -11
- package/splitterpanel/splitterpanel.cjs.js +1 -1
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +1 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +1 -1
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/steps/BaseSteps.vue +52 -50
- package/steps/steps.cjs.js +1 -1
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +1 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +1 -1
- package/steps/steps.min.js +1 -1
- package/tabmenu/BaseTabMenu.vue +40 -38
- package/tabmenu/tabmenu.cjs.js +1 -1
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +1 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +1 -1
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/BaseTabView.vue +70 -68
- package/tabview/tabview.cjs.js +1 -1
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +1 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/BaseTag.vue +16 -14
- package/tag/tag.cjs.js +1 -1
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +1 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +1 -1
- package/tag/tag.min.js +1 -1
- package/terminal/BaseTerminal.vue +23 -21
- package/terminal/terminal.cjs.js +1 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +1 -1
- package/terminal/terminal.min.js +1 -1
- package/textarea/BaseTextarea.vue +9 -7
- package/textarea/Textarea.vue +1 -3
- package/textarea/textarea.cjs.js +2 -3
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +2 -3
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +2 -3
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/BaseTieredMenu.vue +40 -38
- package/tieredmenu/tieredmenu.cjs.js +1 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +1 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/BaseTimeline.vue +111 -109
- package/timeline/timeline.cjs.js +1 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +1 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +1 -1
- package/timeline/timeline.min.js +1 -1
- package/toast/BaseToast.vue +73 -71
- package/toast/Toast.d.ts +14 -0
- package/toast/ToastMessage.vue +3 -2
- package/toast/toast.cjs.js +9 -4
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +10 -5
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +9 -4
- package/toast/toast.min.js +1 -1
- package/toolbar/BaseToolbar.vue +21 -19
- package/toolbar/toolbar.cjs.js +1 -2
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +1 -2
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +1 -2
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +1 -1
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +1 -1
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tree/BaseTree.vue +82 -80
- package/tree/tree.cjs.js +1 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +1 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +1 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/BaseTreeSelect.vue +51 -49
- package/treeselect/treeselect.cjs.js +1 -1
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +1 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +1 -1
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BaseTreeTable.vue +169 -167
- package/treetable/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/vetur-attributes.json +4 -0
- package/vetur-tags.json +1 -0
- package/web-types.json +46 -1
package/timeline/timeline.js
CHANGED
|
@@ -6,7 +6,7 @@ this.primevue.timeline = (function (utils, BaseComponent, usestyle, vue) {
|
|
|
6
6
|
|
|
7
7
|
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
8
8
|
|
|
9
|
-
var styles = "\n.p-timeline {\n
|
|
9
|
+
var styles = "\n@layer primevue {\n .p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n }\n \n .p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n }\n \n .p-timeline-left .p-timeline-event-content {\n text-align: left;\n }\n \n .p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n }\n \n .p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n }\n \n .p-timeline-right .p-timeline-event-content {\n text-align: right;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n }\n \n .p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n }\n \n .p-timeline-event:last-child {\n min-height: 0;\n }\n \n .p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n }\n \n .p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n }\n \n .p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n }\n \n .p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n }\n \n .p-timeline-event-connector {\n flex-grow: 1;\n }\n \n .p-timeline-horizontal {\n flex-direction: row;\n }\n \n .p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n }\n \n .p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n }\n \n .p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n }\n \n .p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n }\n \n .p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n }\n \n .p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n }\n}\n";
|
|
10
10
|
var classes = {
|
|
11
11
|
root: function root(_ref) {
|
|
12
12
|
var props = _ref.props;
|
package/timeline/timeline.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.timeline=function(e,n,t,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(n),r=t.useStyle("\n.p-timeline {\n
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.timeline=function(e,n,t,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(n),r=t.useStyle("\n@layer primevue {\n .p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n }\n \n .p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n }\n \n .p-timeline-left .p-timeline-event-content {\n text-align: left;\n }\n \n .p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n }\n \n .p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n }\n \n .p-timeline-right .p-timeline-event-content {\n text-align: right;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n }\n \n .p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n }\n \n .p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n }\n \n .p-timeline-event:last-child {\n min-height: 0;\n }\n \n .p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n }\n \n .p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n }\n \n .p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n }\n \n .p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n }\n \n .p-timeline-event-connector {\n flex-grow: 1;\n }\n \n .p-timeline-horizontal {\n flex-direction: row;\n }\n \n .p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n }\n \n .p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n }\n \n .p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n }\n \n .p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n }\n \n .p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n }\n \n .p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n }\n}\n",{name:"timeline",manual:!0}),p={name:"Timeline",extends:{name:"BaseTimeline",extends:o.default,props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},css:{classes:{root:function(e){var n=e.props;return["p-timeline p-component","p-timeline-"+n.align,"p-timeline-"+n.layout]},event:"p-timeline-event",opposite:"p-timeline-event-opposite",separator:"p-timeline-event-separator",marker:"p-timeline-event-marker",connector:"p-timeline-event-connector",content:"p-timeline-event-content"},loadStyle:r.load},provide:function(){return{$parentInstance:this}}},methods:{getKey:function(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t},getPTOptions:function(e,n){return this.ptm(e,{context:{index:n,count:this.value.length}})}}};return p.render=function(e,n,t,l,o,r){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"timeline"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.value,(function(n,t){return i.openBlock(),i.createElementBlock("div",i.mergeProps({key:r.getKey(n,t),class:e.cx("event")},r.getPTOptions("event",t)),[i.createElementVNode("div",i.mergeProps({class:e.cx("opposite",{index:t})},r.getPTOptions("opposite",t)),[i.renderSlot(e.$slots,"opposite",{item:n,index:t})],16),i.createElementVNode("div",i.mergeProps({class:e.cx("separator")},r.getPTOptions("separator",t)),[i.renderSlot(e.$slots,"marker",{item:n,index:t},(function(){return[i.createElementVNode("div",i.mergeProps({class:e.cx("marker")},r.getPTOptions("marker",t)),null,16)]})),t!==e.value.length-1?i.renderSlot(e.$slots,"connector",{key:0,item:n,index:t},(function(){return[i.createElementVNode("div",i.mergeProps({class:e.cx("connector")},r.getPTOptions("connector",t)),null,16)]})):i.createCommentVNode("",!0)],16),i.createElementVNode("div",i.mergeProps({class:e.cx("content")},r.getPTOptions("content",t)),[i.renderSlot(e.$slots,"content",{item:n,index:t})],16)],16)})),128))],16)},p}(primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
package/toast/BaseToast.vue
CHANGED
|
@@ -3,77 +3,79 @@ import BaseComponent from 'primevue/basecomponent';
|
|
|
3
3
|
import { useStyle } from 'primevue/usestyle';
|
|
4
4
|
|
|
5
5
|
const styles = `
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
|
|
6
|
+
@layer primevue {
|
|
7
|
+
.p-toast {
|
|
8
|
+
width: 25rem;
|
|
9
|
+
white-space: pre-line;
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.p-toast-message-icon {
|
|
14
|
+
flex-shrink: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.p-toast-message-content {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.p-toast-message-text {
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.p-toast-top-center {
|
|
27
|
+
transform: translateX(-50%);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.p-toast-bottom-center {
|
|
31
|
+
transform: translateX(-50%);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.p-toast-center {
|
|
35
|
+
min-width: 20vw;
|
|
36
|
+
transform: translate(-50%, -50%);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.p-toast-icon-close {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
position: relative;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.p-toast-icon-close.p-link {
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Animations */
|
|
52
|
+
.p-toast-message-enter-from {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
-webkit-transform: translateY(50%);
|
|
55
|
+
-ms-transform: translateY(50%);
|
|
56
|
+
transform: translateY(50%);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.p-toast-message-leave-from {
|
|
60
|
+
max-height: 1000px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.p-toast .p-toast-message.p-toast-message-leave-to {
|
|
64
|
+
max-height: 0;
|
|
65
|
+
opacity: 0;
|
|
66
|
+
margin-bottom: 0;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.p-toast-message-enter-active {
|
|
71
|
+
-webkit-transition: transform 0.3s, opacity 0.3s;
|
|
72
|
+
transition: transform 0.3s, opacity 0.3s;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.p-toast-message-leave-active {
|
|
76
|
+
-webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;
|
|
77
|
+
transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;
|
|
78
|
+
}
|
|
77
79
|
}
|
|
78
80
|
`;
|
|
79
81
|
|
package/toast/Toast.d.ts
CHANGED
|
@@ -289,6 +289,20 @@ export interface ToastSlots {
|
|
|
289
289
|
*/
|
|
290
290
|
class: any;
|
|
291
291
|
}): VNode[];
|
|
292
|
+
/**
|
|
293
|
+
* Custom container slot.
|
|
294
|
+
* @param {Object} scope - container slot's params.
|
|
295
|
+
*/
|
|
296
|
+
container(scope: {
|
|
297
|
+
/**
|
|
298
|
+
* Message of the component
|
|
299
|
+
*/
|
|
300
|
+
message: any;
|
|
301
|
+
/**
|
|
302
|
+
* Close toast function
|
|
303
|
+
*/
|
|
304
|
+
onClose: () => void;
|
|
305
|
+
}): VNode[];
|
|
292
306
|
}
|
|
293
307
|
|
|
294
308
|
/**
|
package/toast/ToastMessage.vue
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="cx('container')" role="alert" aria-live="assertive" aria-atomic="true" v-bind="ptm('container')">
|
|
3
|
-
<
|
|
2
|
+
<div :class="[cx('container'), message.styleClass]" role="alert" aria-live="assertive" aria-atomic="true" v-bind="ptm('container')">
|
|
3
|
+
<component v-if="templates.container" :is="templates.container" :message="message" :onClose="onCloseClick" />
|
|
4
|
+
<div v-else :class="[cx('content'), message.contentStyleClass]" v-bind="ptm('content')">
|
|
4
5
|
<template v-if="!templates.message">
|
|
5
6
|
<component :is="templates.icon ? templates.icon : iconComponent && iconComponent.name ? iconComponent : 'span'" :class="cx('icon')" v-bind="ptm('icon')" />
|
|
6
7
|
<div :class="cx('text')" v-bind="ptm('text')">
|
package/toast/toast.cjs.js
CHANGED
|
@@ -29,7 +29,7 @@ function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function"
|
|
|
29
29
|
function _defineProperty$2(obj, key, value) { key = _toPropertyKey$2(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
30
30
|
function _toPropertyKey$2(arg) { var key = _toPrimitive$2(arg, "string"); return _typeof$2(key) === "symbol" ? key : String(key); }
|
|
31
31
|
function _toPrimitive$2(input, hint) { if (_typeof$2(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$2(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
32
|
-
var styles = "\n.p-toast {\n
|
|
32
|
+
var styles = "\n@layer primevue {\n .p-toast {\n width: 25rem;\n white-space: pre-line;\n word-break: break-word;\n }\n \n .p-toast-message-icon {\n flex-shrink: 0;\n }\n \n .p-toast-message-content {\n display: flex;\n align-items: flex-start;\n }\n \n .p-toast-message-text {\n flex: 1 1 auto;\n }\n \n .p-toast-top-center {\n transform: translateX(-50%);\n }\n \n .p-toast-bottom-center {\n transform: translateX(-50%);\n }\n \n .p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n }\n \n .p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-toast-icon-close.p-link {\n cursor: pointer;\n }\n \n /* Animations */\n .p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n }\n \n .p-toast-message-leave-from {\n max-height: 1000px;\n }\n \n .p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n }\n \n .p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n }\n \n .p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n }\n}\n";
|
|
33
33
|
|
|
34
34
|
// Position
|
|
35
35
|
var inlineStyles = {
|
|
@@ -247,11 +247,16 @@ var _hoisted_1 = ["aria-label"];
|
|
|
247
247
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
248
248
|
var _directive_ripple = vue.resolveDirective("ripple");
|
|
249
249
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
250
|
-
"class": _ctx.cx('container'),
|
|
250
|
+
"class": [_ctx.cx('container'), $props.message.styleClass],
|
|
251
251
|
role: "alert",
|
|
252
252
|
"aria-live": "assertive",
|
|
253
253
|
"aria-atomic": "true"
|
|
254
|
-
}, _ctx.ptm('container')), [vue.
|
|
254
|
+
}, _ctx.ptm('container')), [$props.templates.container ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.container), {
|
|
255
|
+
key: 0,
|
|
256
|
+
message: $props.message,
|
|
257
|
+
onClose: $options.onCloseClick
|
|
258
|
+
}, null, 40, ["message", "onClose"])) : (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
259
|
+
key: 1,
|
|
255
260
|
"class": [_ctx.cx('content'), $props.message.contentStyleClass]
|
|
256
261
|
}, _ctx.ptm('content')), [!$props.templates.message ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
257
262
|
key: 0
|
|
@@ -278,7 +283,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
278
283
|
autofocus: ""
|
|
279
284
|
}, _objectSpread$1(_objectSpread$1(_objectSpread$1({}, $props.closeButtonProps), _ctx.ptm('button')), _ctx.ptm('closeButton'))), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.closeicon || 'TimesIcon'), vue.mergeProps({
|
|
280
285
|
"class": [_ctx.cx('closeIcon'), $props.closeIcon]
|
|
281
|
-
}, _objectSpread$1(_objectSpread$1({}, _ctx.ptm('buttonIcon')), _ctx.ptm('closeIcon'))), null, 16, ["class"]))], 16, _hoisted_1)), [[_directive_ripple]])], 16)) : vue.createCommentVNode("", true)], 16)], 16);
|
|
286
|
+
}, _objectSpread$1(_objectSpread$1({}, _ctx.ptm('buttonIcon')), _ctx.ptm('closeIcon'))), null, 16, ["class"]))], 16, _hoisted_1)), [[_directive_ripple]])], 16)) : vue.createCommentVNode("", true)], 16))], 16);
|
|
282
287
|
}
|
|
283
288
|
|
|
284
289
|
script$1.render = render$1;
|
package/toast/toast.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/portal"),t=require("primevue/toasteventbus"),n=require("primevue/utils"),o=require("primevue/basecomponent"),r=require("primevue/usestyle"),s=require("primevue/icons/check"),i=require("primevue/icons/exclamationtriangle"),a=require("primevue/icons/infocircle"),l=require("primevue/icons/times"),c=require("primevue/icons/timescircle"),u=require("primevue/ripple"),m=require("vue");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=p(e),d=p(t),y=p(o),g=p(s),v=p(i),b=p(a),h=p(l),I=p(c),S=p(u);function w(e){return w="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},w(e)}function x(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=P(e,"string");return"symbol"===w(t)?t:String(t)}function P(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==w(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var O={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},x(t,n.infoIcon,"info"===n.message.severity),x(t,n.warnIcon,"warn"===n.message.severity),x(t,n.errorIcon,"error"===n.message.severity),x(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},j=r.useStyle("\n.p-toast {\n width: 25rem;\n white-space: pre-line;\n word-break: break-word;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n",{name:"toast",manual:!0}),E={name:"BaseToast",extends:y.default,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:O,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:j.load},provide:function(){return{$parentInstance:this}}},C={name:"ToastMessage",hostName:"Toast",extends:y.default,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&b.default,success:!this.successIcon&&g.default,warn:!this.warnIcon&&v.default,error:!this.errorIcon&&I.default}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:h.default,InfoCircleIcon:b.default,CheckIcon:g.default,ExclamationTriangleIcon:v.default,TimesCircleIcon:I.default},directives:{ripple:S.default}};function B(e){return B="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},B(e)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(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=q(e,"string");return"symbol"===B(t)?t:String(t)}function q(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==B(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var N=["aria-label"];function U(){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 Z(e,t){if(e){if("string"==typeof e)return V(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)?V(e,t):void 0}}function L(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function G(e){if(Array.isArray(e))return V(e)}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}C.render=function(e,t,n,o,r,s){var i=m.resolveDirective("ripple");return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:e.cx("container"),role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[m.createElementVNode("div",m.mergeProps({class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.message),{key:1,message:n.message},null,8,["message"])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),m.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),m.createElementVNode("div",m.mergeProps({class:e.cx("text")},e.ptm("text")),[m.createElementVNode("span",m.mergeProps({class:e.cx("summary")},e.ptm("summary")),m.toDisplayString(n.message.summary),17),m.createElementVNode("div",m.mergeProps({class:e.cx("detail")},e.ptm("detail")),m.toDisplayString(n.message.detail),17)],16)],64)),!1!==n.message.closable?(m.openBlock(),m.createElementBlock("div",m.normalizeProps(m.mergeProps({key:2},e.ptm("buttonContainer"))),[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},A(A(A({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.closeicon||"TimesIcon"),m.mergeProps({class:[e.cx("closeIcon"),n.closeIcon]},A(A({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,N)),[[i]])],16)):m.createCommentVNode("",!0)],16)],16)};var R=0,M={name:"Toast",extends:E,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){d.default.on("add",this.onAdd),d.default.on("remove-group",this.onRemoveGroup),d.default.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.ZIndexUtils.clear(this.$refs.container),d.default.off("add",this.onAdd),d.default.off("remove-group",this.onRemoveGroup),d.default.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=R++),this.messages=[].concat(G(t=this.messages)||L(t)||Z(t)||U(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.ZIndexUtils.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&n.ObjectUtils.isEmpty(this.messages)&&setTimeout((function(){n.ZIndexUtils.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",n.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var o in this.breakpoints){var r="";for(var s in this.breakpoints[o])r+=s+":"+this.breakpoints[o][s]+"!important;";t+="\n @media screen and (max-width: ".concat(o,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(r,"\n }\n }\n ")}this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return n.UniqueComponentId()}},components:{ToastMessage:C,Portal:f.default}};function z(e){return z="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},z(e)}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e){var t=_(e,"string");return"symbol"===z(t)?t:String(t)}function _(e,t){if("object"!==z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==z(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}M.render=function(e,t,n,o,r,s){var i=m.resolveComponent("ToastMessage"),a=m.resolveComponent("Portal");return m.openBlock(),m.createBlock(a,null,{default:m.withCtx((function(){return[m.createElementVNode("div",m.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},F(F({},e.$attrs),e.ptm("root"))),[m.createVNode(m.TransitionGroup,m.mergeProps({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},F(F({},e.ptm("message")),e.ptm("transition"))),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.messages,(function(n){return m.openBlock(),m.createBlock(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})},module.exports=M;
|
|
1
|
+
"use strict";var e=require("primevue/portal"),t=require("primevue/toasteventbus"),n=require("primevue/utils"),o=require("primevue/basecomponent"),r=require("primevue/usestyle"),s=require("primevue/icons/check"),i=require("primevue/icons/exclamationtriangle"),a=require("primevue/icons/infocircle"),l=require("primevue/icons/times"),c=require("primevue/icons/timescircle"),u=require("primevue/ripple"),m=require("vue");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=p(e),y=p(t),d=p(o),g=p(s),v=p(i),b=p(a),h=p(l),I=p(c),S=p(u);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,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){var t=P(e,"string");return"symbol"===k(t)?t:String(t)}function P(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==k(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var O={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},w(t,n.infoIcon,"info"===n.message.severity),w(t,n.warnIcon,"warn"===n.message.severity),w(t,n.errorIcon,"error"===n.message.severity),w(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},j=r.useStyle("\n@layer primevue {\n .p-toast {\n width: 25rem;\n white-space: pre-line;\n word-break: break-word;\n }\n \n .p-toast-message-icon {\n flex-shrink: 0;\n }\n \n .p-toast-message-content {\n display: flex;\n align-items: flex-start;\n }\n \n .p-toast-message-text {\n flex: 1 1 auto;\n }\n \n .p-toast-top-center {\n transform: translateX(-50%);\n }\n \n .p-toast-bottom-center {\n transform: translateX(-50%);\n }\n \n .p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n }\n \n .p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-toast-icon-close.p-link {\n cursor: pointer;\n }\n \n /* Animations */\n .p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n }\n \n .p-toast-message-leave-from {\n max-height: 1000px;\n }\n \n .p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n }\n \n .p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n }\n \n .p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n }\n}\n",{name:"toast",manual:!0}),C={name:"BaseToast",extends:d.default,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:O,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:j.load},provide:function(){return{$parentInstance:this}}},B={name:"ToastMessage",hostName:"Toast",extends:d.default,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&b.default,success:!this.successIcon&&g.default,warn:!this.warnIcon&&v.default,error:!this.errorIcon&&I.default}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:h.default,InfoCircleIcon:b.default,CheckIcon:g.default,ExclamationTriangleIcon:v.default,TimesCircleIcon:I.default},directives:{ripple:S.default}};function E(e){return E="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},E(e)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(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=q(e,"string");return"symbol"===E(t)?t:String(t)}function q(e,t){if("object"!==E(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==E(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var N=["aria-label"];function U(){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 Z(e,t){if(e){if("string"==typeof e)return R(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)?R(e,t):void 0}}function L(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function G(e){if(Array.isArray(e))return R(e)}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}B.render=function(e,t,n,o,r,s){var i=m.resolveDirective("ripple");return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:[e.cx("container"),n.message.styleClass],role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[n.templates.container?(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.container),{key:0,message:n.message,onClose:s.onCloseClick},null,40,["message","onClose"])):(m.openBlock(),m.createElementBlock("div",m.mergeProps({key:1,class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.message),{key:1,message:n.message},null,8,["message"])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),m.mergeProps({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),m.createElementVNode("div",m.mergeProps({class:e.cx("text")},e.ptm("text")),[m.createElementVNode("span",m.mergeProps({class:e.cx("summary")},e.ptm("summary")),m.toDisplayString(n.message.summary),17),m.createElementVNode("div",m.mergeProps({class:e.cx("detail")},e.ptm("detail")),m.toDisplayString(n.message.detail),17)],16)],64)),!1!==n.message.closable?(m.openBlock(),m.createElementBlock("div",m.normalizeProps(m.mergeProps({key:2},e.ptm("buttonContainer"))),[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},A(A(A({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(n.templates.closeicon||"TimesIcon"),m.mergeProps({class:[e.cx("closeIcon"),n.closeIcon]},A(A({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,N)),[[i]])],16)):m.createCommentVNode("",!0)],16))],16)};var V=0,M={name:"Toast",extends:C,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){y.default.on("add",this.onAdd),y.default.on("remove-group",this.onRemoveGroup),y.default.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.ZIndexUtils.clear(this.$refs.container),y.default.off("add",this.onAdd),y.default.off("remove-group",this.onRemoveGroup),y.default.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=V++),this.messages=[].concat(G(t=this.messages)||L(t)||Z(t)||U(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.ZIndexUtils.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&n.ObjectUtils.isEmpty(this.messages)&&setTimeout((function(){n.ZIndexUtils.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",n.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var o in this.breakpoints){var r="";for(var s in this.breakpoints[o])r+=s+":"+this.breakpoints[o][s]+"!important;";t+="\n @media screen and (max-width: ".concat(o,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(r,"\n }\n }\n ")}this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return n.UniqueComponentId()}},components:{ToastMessage:B,Portal:f.default}};function z(e){return z="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},z(e)}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e){var t=_(e,"string");return"symbol"===z(t)?t:String(t)}function _(e,t){if("object"!==z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==z(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}M.render=function(e,t,n,o,r,s){var i=m.resolveComponent("ToastMessage"),a=m.resolveComponent("Portal");return m.openBlock(),m.createBlock(a,null,{default:m.withCtx((function(){return[m.createElementVNode("div",m.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},F(F({},e.$attrs),e.ptm("root"))),[m.createVNode(m.TransitionGroup,m.mergeProps({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},F(F({},e.ptm("message")),e.ptm("transition"))),{default:m.withCtx((function(){return[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.messages,(function(n){return m.openBlock(),m.createBlock(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})},module.exports=M;
|
package/toast/toast.esm.js
CHANGED
|
@@ -9,13 +9,13 @@ import InfoCircleIcon from 'primevue/icons/infocircle';
|
|
|
9
9
|
import TimesIcon from 'primevue/icons/times';
|
|
10
10
|
import TimesCircleIcon from 'primevue/icons/timescircle';
|
|
11
11
|
import Ripple from 'primevue/ripple';
|
|
12
|
-
import { resolveDirective, openBlock, createElementBlock, mergeProps,
|
|
12
|
+
import { resolveDirective, openBlock, createElementBlock, mergeProps, createBlock, resolveDynamicComponent, Fragment, createElementVNode, toDisplayString, normalizeProps, withDirectives, createCommentVNode, resolveComponent, withCtx, createVNode, TransitionGroup, renderList } from 'vue';
|
|
13
13
|
|
|
14
14
|
function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
|
|
15
15
|
function _defineProperty$2(obj, key, value) { key = _toPropertyKey$2(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
16
|
function _toPropertyKey$2(arg) { var key = _toPrimitive$2(arg, "string"); return _typeof$2(key) === "symbol" ? key : String(key); }
|
|
17
17
|
function _toPrimitive$2(input, hint) { if (_typeof$2(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$2(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
|
-
var styles = "\n.p-toast {\n
|
|
18
|
+
var styles = "\n@layer primevue {\n .p-toast {\n width: 25rem;\n white-space: pre-line;\n word-break: break-word;\n }\n \n .p-toast-message-icon {\n flex-shrink: 0;\n }\n \n .p-toast-message-content {\n display: flex;\n align-items: flex-start;\n }\n \n .p-toast-message-text {\n flex: 1 1 auto;\n }\n \n .p-toast-top-center {\n transform: translateX(-50%);\n }\n \n .p-toast-bottom-center {\n transform: translateX(-50%);\n }\n \n .p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n }\n \n .p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-toast-icon-close.p-link {\n cursor: pointer;\n }\n \n /* Animations */\n .p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n }\n \n .p-toast-message-leave-from {\n max-height: 1000px;\n }\n \n .p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n }\n \n .p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n }\n \n .p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n }\n}\n";
|
|
19
19
|
|
|
20
20
|
// Position
|
|
21
21
|
var inlineStyles = {
|
|
@@ -233,11 +233,16 @@ var _hoisted_1 = ["aria-label"];
|
|
|
233
233
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
234
234
|
var _directive_ripple = resolveDirective("ripple");
|
|
235
235
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
236
|
-
"class": _ctx.cx('container'),
|
|
236
|
+
"class": [_ctx.cx('container'), $props.message.styleClass],
|
|
237
237
|
role: "alert",
|
|
238
238
|
"aria-live": "assertive",
|
|
239
239
|
"aria-atomic": "true"
|
|
240
|
-
}, _ctx.ptm('container')), [
|
|
240
|
+
}, _ctx.ptm('container')), [$props.templates.container ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.container), {
|
|
241
|
+
key: 0,
|
|
242
|
+
message: $props.message,
|
|
243
|
+
onClose: $options.onCloseClick
|
|
244
|
+
}, null, 40, ["message", "onClose"])) : (openBlock(), createElementBlock("div", mergeProps({
|
|
245
|
+
key: 1,
|
|
241
246
|
"class": [_ctx.cx('content'), $props.message.contentStyleClass]
|
|
242
247
|
}, _ctx.ptm('content')), [!$props.templates.message ? (openBlock(), createElementBlock(Fragment, {
|
|
243
248
|
key: 0
|
|
@@ -264,7 +269,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
264
269
|
autofocus: ""
|
|
265
270
|
}, _objectSpread$1(_objectSpread$1(_objectSpread$1({}, $props.closeButtonProps), _ctx.ptm('button')), _ctx.ptm('closeButton'))), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.closeicon || 'TimesIcon'), mergeProps({
|
|
266
271
|
"class": [_ctx.cx('closeIcon'), $props.closeIcon]
|
|
267
|
-
}, _objectSpread$1(_objectSpread$1({}, _ctx.ptm('buttonIcon')), _ctx.ptm('closeIcon'))), null, 16, ["class"]))], 16, _hoisted_1)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16)], 16);
|
|
272
|
+
}, _objectSpread$1(_objectSpread$1({}, _ctx.ptm('buttonIcon')), _ctx.ptm('closeIcon'))), null, 16, ["class"]))], 16, _hoisted_1)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 16);
|
|
268
273
|
}
|
|
269
274
|
|
|
270
275
|
script$1.render = render$1;
|
package/toast/toast.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/portal";import t from"primevue/toasteventbus";import{ZIndexUtils as n,ObjectUtils as o,DomHandler as r,UniqueComponentId as s}from"primevue/utils";import i from"primevue/basecomponent";import{useStyle as a}from"primevue/usestyle";import c from"primevue/icons/check";import l from"primevue/icons/exclamationtriangle";import u from"primevue/icons/infocircle";import m from"primevue/icons/times";import p from"primevue/icons/timescircle";import f from"primevue/ripple";import{resolveDirective as y,openBlock as g,createElementBlock as d,mergeProps as b,createElementVNode as v,Fragment as h,createBlock as I,resolveDynamicComponent as S,toDisplayString as w,normalizeProps as x,withDirectives as O,createCommentVNode as j,resolveComponent as P,withCtx as k,createVNode as T,TransitionGroup as E,renderList as C}from"vue";function A(e){return A="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},A(e)}function $(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=D(e,"string");return"symbol"===A(t)?t:String(t)}function D(e,t){if("object"!==A(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==A(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},$(t,n.infoIcon,"info"===n.message.severity),$(t,n.warnIcon,"warn"===n.message.severity),$(t,n.errorIcon,"error"===n.message.severity),$(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},G=a("\n.p-toast {\n width: 25rem;\n white-space: pre-line;\n word-break: break-word;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n",{name:"toast",manual:!0}),R={name:"BaseToast",extends:i,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:L,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:G.load},provide:function(){return{$parentInstance:this}}},Z={name:"ToastMessage",hostName:"Toast",extends:i,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&u,success:!this.successIcon&&c,warn:!this.warnIcon&&l,error:!this.errorIcon&&p}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:m,InfoCircleIcon:u,CheckIcon:c,ExclamationTriangleIcon:l,TimesCircleIcon:p},directives:{ripple:f}};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 N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e,t,n){return(t=Y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y(e){var t=X(e,"string");return"symbol"===M(t)?t:String(t)}function X(e,t){if("object"!==M(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==M(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _=["aria-label"];function H(){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 q(e,t){if(e){if("string"==typeof e)return K(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)?K(e,t):void 0}}function F(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function J(e){if(Array.isArray(e))return K(e)}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}Z.render=function(e,t,n,o,r,s){var i=y("ripple");return g(),d("div",b({class:e.cx("container"),role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[v("div",b({class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(g(),I(S(n.templates.message),{key:1,message:n.message},null,8,["message"])):(g(),d(h,{key:0},[(g(),I(S(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),b({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),v("div",b({class:e.cx("text")},e.ptm("text")),[v("span",b({class:e.cx("summary")},e.ptm("summary")),w(n.message.summary),17),v("div",b({class:e.cx("detail")},e.ptm("detail")),w(n.message.detail),17)],16)],64)),!1!==n.message.closable?(g(),d("div",x(b({key:2},e.ptm("buttonContainer"))),[O((g(),d("button",b({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},U(U(U({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(g(),I(S(n.templates.closeicon||"TimesIcon"),b({class:[e.cx("closeIcon"),n.closeIcon]},U(U({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,_)),[[i]])],16)):j("",!0)],16)],16)};var Q=0,V={name:"Toast",extends:R,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){t.on("add",this.onAdd),t.on("remove-group",this.onRemoveGroup),t.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.clear(this.$refs.container),t.off("add",this.onAdd),t.off("remove-group",this.onRemoveGroup),t.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=Q++),this.messages=[].concat(J(t=this.messages)||F(t)||q(t)||H(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&o.isEmpty(this.messages)&&setTimeout((function(){n.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",r.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints){var o="";for(var s in this.breakpoints[n])o+=s+":"+this.breakpoints[n][s]+"!important;";t+="\n @media screen and (max-width: ".concat(n,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(o,"\n }\n }\n ")}this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return s()}},components:{ToastMessage:Z,Portal:e}};function W(e){return W="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},W(e)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return(t=oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e){var t=re(e,"string");return"symbol"===W(t)?t:String(t)}function re(e,t){if("object"!==W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==W(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}V.render=function(e,t,n,o,r,s){var i=P("ToastMessage"),a=P("Portal");return g(),I(a,null,{default:k((function(){return[v("div",b({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},te(te({},e.$attrs),e.ptm("root"))),[T(E,b({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},te(te({},e.ptm("message")),e.ptm("transition"))),{default:k((function(){return[(g(!0),d(h,null,C(r.messages,(function(n){return g(),I(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})};export{V as default};
|
|
1
|
+
import e from"primevue/portal";import t from"primevue/toasteventbus";import{ZIndexUtils as n,ObjectUtils as o,DomHandler as r,UniqueComponentId as s}from"primevue/utils";import i from"primevue/basecomponent";import{useStyle as a}from"primevue/usestyle";import c from"primevue/icons/check";import l from"primevue/icons/exclamationtriangle";import u from"primevue/icons/infocircle";import m from"primevue/icons/times";import p from"primevue/icons/timescircle";import f from"primevue/ripple";import{resolveDirective as y,openBlock as g,createElementBlock as d,mergeProps as b,createBlock as v,resolveDynamicComponent as h,Fragment as I,createElementVNode as S,toDisplayString as w,normalizeProps as x,withDirectives as O,createCommentVNode as j,resolveComponent as P,withCtx as k,createVNode as C,TransitionGroup as T,renderList as E}from"vue";function A(e){return A="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},A(e)}function $(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=D(e,"string");return"symbol"===A(t)?t:String(t)}function D(e,t){if("object"!==A(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==A(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L={root:function(e){var t=e.instance;return["p-toast p-component p-toast-"+e.props.position,{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},container:function(e){var t=e.props;return["p-toast-message",{"p-toast-message-info":"info"===t.message.severity||void 0===t.message.severity,"p-toast-message-warn":"warn"===t.message.severity,"p-toast-message-error":"error"===t.message.severity,"p-toast-message-success":"success"===t.message.severity}]},content:"p-toast-message-content",icon:function(e){var t,n=e.props;return["p-toast-message-icon",(t={},$(t,n.infoIcon,"info"===n.message.severity),$(t,n.warnIcon,"warn"===n.message.severity),$(t,n.errorIcon,"error"===n.message.severity),$(t,n.successIcon,"success"===n.message.severity),t)]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},G=a("\n@layer primevue {\n .p-toast {\n width: 25rem;\n white-space: pre-line;\n word-break: break-word;\n }\n \n .p-toast-message-icon {\n flex-shrink: 0;\n }\n \n .p-toast-message-content {\n display: flex;\n align-items: flex-start;\n }\n \n .p-toast-message-text {\n flex: 1 1 auto;\n }\n \n .p-toast-top-center {\n transform: translateX(-50%);\n }\n \n .p-toast-bottom-center {\n transform: translateX(-50%);\n }\n \n .p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n }\n \n .p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-toast-icon-close.p-link {\n cursor: pointer;\n }\n \n /* Animations */\n .p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n }\n \n .p-toast-message-leave-from {\n max-height: 1000px;\n }\n \n .p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n }\n \n .p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n }\n \n .p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n }\n}\n",{name:"toast",manual:!0}),R={name:"BaseToast",extends:i,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},css:{classes:L,inlineStyles:{root:function(e){var t=e.position;return{position:"fixed",top:"top-right"===t||"top-left"===t||"top-center"===t?"20px":"center"===t?"50%":null,right:("top-right"===t||"bottom-right"===t)&&"20px",bottom:("bottom-left"===t||"bottom-right"===t||"bottom-center"===t)&&"20px",left:"top-left"===t||"bottom-left"===t?"20px":"center"===t||"top-center"===t||"bottom-center"===t?"50%":null}}},loadStyle:G.load},provide:function(){return{$parentInstance:this}}},Z={name:"ToastMessage",hostName:"Toast",extends:i,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout((function(){e.close({message:e.message,type:"life-end"})}),this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&u,success:!this.successIcon&&c,warn:!this.warnIcon&&l,error:!this.errorIcon&&p}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:m,InfoCircleIcon:u,CheckIcon:c,ExclamationTriangleIcon:l,TimesCircleIcon:p},directives:{ripple:f}};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 N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e,t,n){return(t=Y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y(e){var t=X(e,"string");return"symbol"===M(t)?t:String(t)}function X(e,t){if("object"!==M(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==M(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _=["aria-label"];function H(){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 q(e,t){if(e){if("string"==typeof e)return K(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)?K(e,t):void 0}}function F(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function J(e){if(Array.isArray(e))return K(e)}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}Z.render=function(e,t,n,o,r,s){var i=y("ripple");return g(),d("div",b({class:[e.cx("container"),n.message.styleClass],role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("container")),[n.templates.container?(g(),v(h(n.templates.container),{key:0,message:n.message,onClose:s.onCloseClick},null,40,["message","onClose"])):(g(),d("div",b({key:1,class:[e.cx("content"),n.message.contentStyleClass]},e.ptm("content")),[n.templates.message?(g(),v(h(n.templates.message),{key:1,message:n.message},null,8,["message"])):(g(),d(I,{key:0},[(g(),v(h(n.templates.icon?n.templates.icon:s.iconComponent&&s.iconComponent.name?s.iconComponent:"span"),b({class:e.cx("icon")},e.ptm("icon")),null,16,["class"])),S("div",b({class:e.cx("text")},e.ptm("text")),[S("span",b({class:e.cx("summary")},e.ptm("summary")),w(n.message.summary),17),S("div",b({class:e.cx("detail")},e.ptm("detail")),w(n.message.detail),17)],16)],64)),!1!==n.message.closable?(g(),d("div",x(b({key:2},e.ptm("buttonContainer"))),[O((g(),d("button",b({class:e.cx("closeButton"),type:"button","aria-label":s.closeAriaLabel,onClick:t[0]||(t[0]=function(){return s.onCloseClick&&s.onCloseClick.apply(s,arguments)}),autofocus:""},U(U(U({},n.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[(g(),v(h(n.templates.closeicon||"TimesIcon"),b({class:[e.cx("closeIcon"),n.closeIcon]},U(U({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))],16,_)),[[i]])],16)):j("",!0)],16))],16)};var Q=0,V={name:"Toast",extends:R,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){t.on("add",this.onAdd),t.on("remove-group",this.onRemoveGroup),t.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&n.clear(this.$refs.container),t.off("add",this.onAdd),t.off("remove-group",this.onRemoveGroup),t.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){var t;null==e.id&&(e.id=Q++),this.messages=[].concat(J(t=this.messages)||F(t)||q(t)||H(),[e])},remove:function(e){for(var t=-1,n=0;n<this.messages.length;n++)if(this.messages[n]===e.message){t=n;break}this.messages.splice(t,1),this.$emit(e.type,{message:e.message})},onAdd:function(e){this.group==e.group&&this.add(e)},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&n.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&o.isEmpty(this.messages)&&setTimeout((function(){n.clear(e.$refs.container)}),200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",r.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints){var o="";for(var s in this.breakpoints[n])o+=s+":"+this.breakpoints[n][s]+"!important;";t+="\n @media screen and (max-width: ".concat(n,") {\n .p-toast[").concat(this.attributeSelector,"] {\n ").concat(o,"\n }\n }\n ")}this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return s()}},components:{ToastMessage:Z,Portal:e}};function W(e){return W="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},W(e)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return(t=oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e){var t=re(e,"string");return"symbol"===W(t)?t:String(t)}function re(e,t){if("object"!==W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==W(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}V.render=function(e,t,n,o,r,s){var i=P("ToastMessage"),a=P("Portal");return g(),v(a,null,{default:k((function(){return[S("div",b({ref:"container",class:e.cx("root"),style:e.sx("root",!0,{position:e.position})},te(te({},e.$attrs),e.ptm("root"))),[C(T,b({name:"p-toast-message",tag:"div",onEnter:s.onEnter,onLeave:s.onLeave},te(te({},e.ptm("message")),e.ptm("transition"))),{default:k((function(){return[(g(!0),d(I,null,E(r.messages,(function(n){return g(),v(i,{key:n.id,message:n,templates:e.$slots,closeIcon:e.closeIcon,infoIcon:e.infoIcon,warnIcon:e.warnIcon,errorIcon:e.errorIcon,successIcon:e.successIcon,closeButtonProps:e.closeButtonProps,onClose:t[0]||(t[0]=function(e){return s.remove(e)}),pt:e.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])})),128))]})),_:1},16,["onEnter","onLeave"])],16)]})),_:1})};export{V as default};
|
package/toast/toast.js
CHANGED
|
@@ -18,7 +18,7 @@ this.primevue.toast = (function (Portal, ToastEventBus, utils, BaseComponent, us
|
|
|
18
18
|
function _defineProperty$2(obj, key, value) { key = _toPropertyKey$2(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
function _toPropertyKey$2(arg) { var key = _toPrimitive$2(arg, "string"); return _typeof$2(key) === "symbol" ? key : String(key); }
|
|
20
20
|
function _toPrimitive$2(input, hint) { if (_typeof$2(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$2(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
21
|
-
var styles = "\n.p-toast {\n
|
|
21
|
+
var styles = "\n@layer primevue {\n .p-toast {\n width: 25rem;\n white-space: pre-line;\n word-break: break-word;\n }\n \n .p-toast-message-icon {\n flex-shrink: 0;\n }\n \n .p-toast-message-content {\n display: flex;\n align-items: flex-start;\n }\n \n .p-toast-message-text {\n flex: 1 1 auto;\n }\n \n .p-toast-top-center {\n transform: translateX(-50%);\n }\n \n .p-toast-bottom-center {\n transform: translateX(-50%);\n }\n \n .p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n }\n \n .p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-toast-icon-close.p-link {\n cursor: pointer;\n }\n \n /* Animations */\n .p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n }\n \n .p-toast-message-leave-from {\n max-height: 1000px;\n }\n \n .p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n }\n \n .p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n }\n \n .p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n }\n}\n";
|
|
22
22
|
|
|
23
23
|
// Position
|
|
24
24
|
var inlineStyles = {
|
|
@@ -236,11 +236,16 @@ this.primevue.toast = (function (Portal, ToastEventBus, utils, BaseComponent, us
|
|
|
236
236
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
237
237
|
var _directive_ripple = vue.resolveDirective("ripple");
|
|
238
238
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
239
|
-
"class": _ctx.cx('container'),
|
|
239
|
+
"class": [_ctx.cx('container'), $props.message.styleClass],
|
|
240
240
|
role: "alert",
|
|
241
241
|
"aria-live": "assertive",
|
|
242
242
|
"aria-atomic": "true"
|
|
243
|
-
}, _ctx.ptm('container')), [vue.
|
|
243
|
+
}, _ctx.ptm('container')), [$props.templates.container ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.container), {
|
|
244
|
+
key: 0,
|
|
245
|
+
message: $props.message,
|
|
246
|
+
onClose: $options.onCloseClick
|
|
247
|
+
}, null, 40, ["message", "onClose"])) : (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
248
|
+
key: 1,
|
|
244
249
|
"class": [_ctx.cx('content'), $props.message.contentStyleClass]
|
|
245
250
|
}, _ctx.ptm('content')), [!$props.templates.message ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
246
251
|
key: 0
|
|
@@ -267,7 +272,7 @@ this.primevue.toast = (function (Portal, ToastEventBus, utils, BaseComponent, us
|
|
|
267
272
|
autofocus: ""
|
|
268
273
|
}, _objectSpread$1(_objectSpread$1(_objectSpread$1({}, $props.closeButtonProps), _ctx.ptm('button')), _ctx.ptm('closeButton'))), [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates.closeicon || 'TimesIcon'), vue.mergeProps({
|
|
269
274
|
"class": [_ctx.cx('closeIcon'), $props.closeIcon]
|
|
270
|
-
}, _objectSpread$1(_objectSpread$1({}, _ctx.ptm('buttonIcon')), _ctx.ptm('closeIcon'))), null, 16, ["class"]))], 16, _hoisted_1)), [[_directive_ripple]])], 16)) : vue.createCommentVNode("", true)], 16)], 16);
|
|
275
|
+
}, _objectSpread$1(_objectSpread$1({}, _ctx.ptm('buttonIcon')), _ctx.ptm('closeIcon'))), null, 16, ["class"]))], 16, _hoisted_1)), [[_directive_ripple]])], 16)) : vue.createCommentVNode("", true)], 16))], 16);
|
|
271
276
|
}
|
|
272
277
|
|
|
273
278
|
script$1.render = render$1;
|