primevue 3.27.0 → 3.28.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 -1
- package/autocomplete/AutoComplete.d.ts +10 -1
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/autocomplete.cjs.js +4 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +4 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +4 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +44 -0
- package/avatar/Avatar.vue +10 -8
- package/avatar/avatar.cjs.js +36 -34
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +33 -35
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +37 -36
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +27 -1
- package/avatargroup/AvatarGroup.vue +5 -2
- package/avatargroup/avatargroup.cjs.js +9 -5
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +6 -6
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +10 -7
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/Badge.d.ts +32 -0
- package/badge/Badge.vue +3 -1
- package/badge/badge.cjs.js +8 -4
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +5 -5
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +9 -6
- package/badge/badge.min.js +1 -1
- package/basecomponent/BaseComponent.vue +10 -3
- package/basecomponent/basecomponent.cjs.js +10 -3
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +10 -3
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +10 -3
- package/basecomponent/basecomponent.min.js +1 -1
- package/baseicon/BaseIcon.vue +2 -2
- package/baseicon/baseicon.cjs.js +2 -2
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +2 -2
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +2 -2
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BlockUI.d.ts +44 -0
- package/blockui/BlockUI.vue +3 -1
- package/blockui/blockui.cjs.js +9 -3
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +6 -4
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +10 -5
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +60 -0
- package/breadcrumb/Breadcrumb.vue +8 -6
- package/breadcrumb/BreadcrumbItem.vue +14 -10
- package/breadcrumb/breadcrumb.cjs.js +53 -51
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +53 -52
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +54 -53
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +48 -0
- package/button/Button.vue +10 -9
- package/button/button.cjs.js +43 -44
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +43 -45
- package/button/button.esm.min.js +1 -1
- package/button/button.js +44 -46
- package/button/button.min.js +1 -1
- package/chart/Chart.d.ts +36 -0
- package/chart/Chart.vue +5 -2
- package/chart/chart.cjs.js +10 -5
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +7 -6
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +11 -7
- package/chart/chart.min.js +1 -1
- package/chip/Chip.d.ts +60 -0
- package/chip/Chip.vue +10 -9
- package/chip/chip.cjs.js +35 -36
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +35 -37
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +36 -38
- package/chip/chip.min.js +1 -1
- package/config/PrimeVue.d.ts +8 -0
- package/config/config.cjs.js +3 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +3 -2
- package/config/config.esm.min.js +1 -1
- package/config/config.js +3 -1
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +88 -0
- package/confirmdialog/ConfirmDialog.vue +9 -6
- package/confirmdialog/confirmdialog.cjs.js +22 -18
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +22 -19
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +23 -20
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +75 -0
- package/confirmpopup/ConfirmPopup.vue +11 -9
- package/confirmpopup/confirmpopup.cjs.js +27 -25
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +27 -26
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +28 -27
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +135 -0
- package/contextmenu/ContextMenu.vue +4 -1
- package/contextmenu/ContextMenuSub.vue +46 -10
- package/contextmenu/contextmenu.cjs.js +57 -46
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +57 -47
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +58 -48
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +278 -246
- package/core/core.min.js +11 -11
- package/dialog/Dialog.d.ts +87 -0
- package/dialog/Dialog.vue +23 -10
- package/dialog/dialog.cjs.js +31 -30
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +31 -31
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +32 -32
- package/dialog/dialog.min.js +1 -1
- package/dock/Dock.d.ts +94 -0
- package/dock/Dock.vue +4 -2
- package/dock/DockSub.vue +30 -6
- package/dock/dock.cjs.js +52 -39
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +52 -40
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +53 -41
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.vue +1 -1
- 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/dynamicdialog/DynamicDialog.vue +3 -1
- package/dynamicdialog/dynamicdialog.cjs.js +5 -1
- package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
- package/dynamicdialog/dynamicdialog.esm.js +4 -1
- package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
- package/dynamicdialog/dynamicdialog.js +6 -3
- package/dynamicdialog/dynamicdialog.min.js +1 -1
- package/fileupload/FileContent.vue +11 -9
- package/fileupload/FileUpload.d.ts +154 -0
- package/fileupload/FileUpload.vue +26 -24
- package/fileupload/fileupload.cjs.js +100 -97
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +100 -98
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +101 -99
- package/fileupload/fileupload.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +52 -0
- package/inlinemessage/InlineMessage.vue +7 -3
- package/inlinemessage/inlinemessage.cjs.js +12 -11
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +12 -12
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +13 -13
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/Inplace.d.ts +59 -0
- package/inplace/Inplace.vue +7 -5
- package/inplace/inplace.cjs.js +17 -16
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +17 -17
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +18 -18
- package/inplace/inplace.min.js +1 -1
- package/listbox/Listbox.d.ts +1 -1
- package/megamenu/MegaMenu.d.ts +149 -0
- package/megamenu/MegaMenu.vue +6 -3
- package/megamenu/MegaMenuSub.vue +43 -15
- package/megamenu/megamenu.cjs.js +83 -75
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +83 -76
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +84 -77
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +113 -0
- package/menu/Menu.vue +11 -8
- package/menu/Menuitem.vue +20 -8
- package/menu/menu.cjs.js +73 -62
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +73 -63
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +74 -64
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +146 -0
- package/menubar/Menubar.vue +8 -5
- package/menubar/MenubarSub.vue +38 -10
- package/menubar/menubar.cjs.js +70 -60
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +70 -61
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +71 -62
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +64 -1
- package/message/Message.vue +9 -7
- package/message/message.cjs.js +22 -21
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +22 -22
- package/message/message.esm.min.js +1 -1
- package/message/message.js +23 -23
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +1 -1
- package/overlaypanel/OverlayPanel.d.ts +56 -0
- package/overlaypanel/OverlayPanel.vue +6 -4
- package/overlaypanel/overlaypanel.cjs.js +13 -10
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +13 -11
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +14 -12
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/panel/Panel.d.ts +10 -1
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +4 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +4 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +4 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +133 -0
- package/panelmenu/PanelMenu.vue +36 -13
- package/panelmenu/PanelMenuList.vue +3 -0
- package/panelmenu/PanelMenuSub.vue +33 -12
- package/panelmenu/panelmenu.cjs.js +115 -96
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +115 -97
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +116 -98
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.vue +2 -2
- package/password/password.cjs.js +2 -2
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -2
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -2
- package/password/password.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +40 -0
- package/progressbar/ProgressBar.vue +8 -5
- package/progressbar/progressbar.cjs.js +25 -23
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +22 -24
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +26 -25
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.d.ts +40 -0
- package/progressspinner/ProgressSpinner.vue +6 -3
- package/progressspinner/progressspinner.cjs.js +18 -13
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +15 -14
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +19 -15
- package/progressspinner/progressspinner.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +1 -1
- package/resources/themes/arya-green/theme.css +1 -1
- package/resources/themes/arya-orange/theme.css +1 -1
- package/resources/themes/arya-purple/theme.css +1 -1
- package/resources/themes/bootstrap4-dark-blue/theme.css +1 -1
- package/resources/themes/bootstrap4-dark-purple/theme.css +1 -1
- package/resources/themes/bootstrap4-light-blue/theme.css +1 -1
- package/resources/themes/bootstrap4-light-purple/theme.css +1 -1
- package/resources/themes/fluent-light/theme.css +1 -1
- package/resources/themes/lara-dark-blue/theme.css +1 -1
- package/resources/themes/lara-dark-indigo/theme.css +1 -1
- package/resources/themes/lara-dark-purple/theme.css +1 -1
- package/resources/themes/lara-dark-teal/theme.css +1 -1
- package/resources/themes/lara-light-blue/theme.css +1 -1
- package/resources/themes/lara-light-indigo/theme.css +1 -1
- package/resources/themes/lara-light-purple/theme.css +1 -1
- package/resources/themes/lara-light-teal/theme.css +1 -1
- package/resources/themes/luna-amber/theme.css +1 -1
- package/resources/themes/luna-blue/theme.css +1 -1
- package/resources/themes/luna-green/theme.css +1 -1
- package/resources/themes/luna-pink/theme.css +1 -1
- package/resources/themes/md-dark-deeppurple/theme.css +4 -1
- package/resources/themes/md-dark-indigo/theme.css +4 -1
- package/resources/themes/md-light-deeppurple/theme.css +4 -1
- package/resources/themes/md-light-indigo/theme.css +4 -1
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -1
- package/resources/themes/mdc-dark-indigo/theme.css +4 -1
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -1
- package/resources/themes/mdc-light-indigo/theme.css +4 -1
- package/resources/themes/mira/theme.css +1 -1
- package/resources/themes/nano/theme.css +1 -1
- package/resources/themes/nova/theme.css +1 -1
- package/resources/themes/nova-accent/theme.css +1 -1
- package/resources/themes/nova-alt/theme.css +1 -1
- package/resources/themes/nova-vue/theme.css +1 -1
- package/resources/themes/rhea/theme.css +1 -1
- package/resources/themes/saga-blue/theme.css +1 -1
- package/resources/themes/saga-green/theme.css +1 -1
- package/resources/themes/saga-orange/theme.css +1 -1
- package/resources/themes/saga-purple/theme.css +1 -1
- package/resources/themes/soho-dark/theme.css +1 -1
- package/resources/themes/soho-light/theme.css +1 -1
- package/resources/themes/tailwind-light/theme.css +1 -1
- package/resources/themes/vela-blue/theme.css +1 -1
- package/resources/themes/vela-green/theme.css +1 -1
- package/resources/themes/vela-orange/theme.css +1 -1
- package/resources/themes/vela-purple/theme.css +1 -1
- package/resources/themes/viva-dark/theme.css +1 -1
- package/resources/themes/viva-light/theme.css +1 -1
- package/scrolltop/ScrollTop.d.ts +48 -0
- package/scrolltop/ScrollTop.vue +5 -2
- package/scrolltop/scrolltop.cjs.js +10 -7
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +10 -8
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +11 -9
- package/scrolltop/scrolltop.min.js +1 -1
- package/sidebar/Sidebar.d.ts +68 -0
- package/sidebar/Sidebar.vue +9 -7
- package/sidebar/sidebar.cjs.js +26 -24
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +26 -25
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +27 -26
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +32 -0
- package/skeleton/Skeleton.vue +4 -1
- package/skeleton/skeleton.cjs.js +10 -4
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +7 -5
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +11 -6
- package/skeleton/skeleton.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +101 -0
- package/speeddial/SpeedDial.vue +31 -8
- package/speeddial/speeddial.cjs.js +47 -33
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +47 -34
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +48 -35
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +64 -0
- package/splitbutton/SplitButton.vue +8 -5
- package/splitbutton/splitbutton.cjs.js +23 -18
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +23 -19
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +24 -20
- package/splitbutton/splitbutton.min.js +1 -1
- package/steps/Steps.d.ts +52 -0
- package/steps/Steps.vue +11 -8
- package/steps/steps.cjs.js +34 -33
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +31 -34
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +35 -35
- package/steps/steps.min.js +1 -1
- package/tabmenu/TabMenu.d.ts +79 -0
- package/tabmenu/TabMenu.vue +20 -10
- package/tabmenu/tabmenu.cjs.js +47 -41
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +47 -42
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +48 -43
- package/tabmenu/tabmenu.min.js +1 -1
- package/tag/Tag.d.ts +40 -0
- package/tag/Tag.vue +7 -4
- package/tag/tag.cjs.js +14 -12
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +11 -13
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +15 -14
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.d.ts +79 -0
- package/terminal/Terminal.vue +12 -10
- package/terminal/terminal.cjs.js +23 -28
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +23 -29
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +24 -30
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +130 -0
- package/tieredmenu/TieredMenu.vue +4 -1
- package/tieredmenu/TieredMenuSub.vue +39 -11
- package/tieredmenu/tieredmenu.cjs.js +53 -41
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +53 -42
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +54 -43
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/Toast.d.ts +79 -0
- package/toast/Toast.vue +4 -1
- package/toast/ToastMessage.vue +12 -10
- package/toast/toast.cjs.js +31 -31
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +31 -32
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +32 -33
- package/toast/toast.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +1 -2
- package/vetur-attributes.json +160 -0
- package/vetur-tags.json +79 -34
- package/web-types.json +404 -2
package/password/password.cjs.js
CHANGED
|
@@ -422,7 +422,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
422
422
|
($props.toggleMask && $data.unmasked)
|
|
423
423
|
? vue.renderSlot(_ctx.$slots, "hideicon", {
|
|
424
424
|
key: 0,
|
|
425
|
-
onClick:
|
|
425
|
+
onClick: $options.onMaskToggle
|
|
426
426
|
}, () => [
|
|
427
427
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.hideIcon ? 'i' : 'EyeSlashIcon'), {
|
|
428
428
|
class: vue.normalizeClass($props.hideIcon),
|
|
@@ -433,7 +433,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
433
433
|
($props.toggleMask && !$data.unmasked)
|
|
434
434
|
? vue.renderSlot(_ctx.$slots, "showicon", {
|
|
435
435
|
key: 1,
|
|
436
|
-
onClick:
|
|
436
|
+
onClick: $options.onMaskToggle
|
|
437
437
|
}, () => [
|
|
438
438
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.showIcon ? 'i' : 'EyeIcon'), {
|
|
439
439
|
class: vue.normalizeClass($props.showIcon),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/icons/eye"),t=require("primevue/icons/eyeslash"),l=require("primevue/inputtext"),n=require("primevue/overlayeventbus"),i=require("primevue/portal"),s=require("primevue/utils"),r=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e),d=a(t),p=a(l),u=a(n),h=a(i),c={name:"Password",emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){s.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){s.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?s.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=s.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",s.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:n}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new s.ConnectedOverlayScrollHandler(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!s.DomHandler.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){u.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>s.UniqueComponentId()+"_panel"},components:{PInputText:p.default,Portal:h.default,EyeSlashIcon:d.default,EyeIcon:o.default}};const m={class:"p-hidden-accessible","aria-live":"polite"},y=["id"],v={class:"p-password-meter"},g={class:"p-password-info"};!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===l&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),c.render=function(e,t,l,n,i,s){const a=r.resolveComponent("PInputText"),o=r.resolveComponent("Portal");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(s.containerClass)},[r.createVNode(a,r.mergeProps({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},l.inputProps),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&i.unmasked?r.renderSlot(e.$slots,"hideicon",{key:0,onClick:
|
|
1
|
+
"use strict";var e=require("primevue/icons/eye"),t=require("primevue/icons/eyeslash"),l=require("primevue/inputtext"),n=require("primevue/overlayeventbus"),i=require("primevue/portal"),s=require("primevue/utils"),r=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e),d=a(t),p=a(l),u=a(n),h=a(i),c={name:"Password",emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){s.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){s.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?s.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=s.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",s.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:n}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new s.ConnectedOverlayScrollHandler(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!s.DomHandler.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){u.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>s.UniqueComponentId()+"_panel"},components:{PInputText:p.default,Portal:h.default,EyeSlashIcon:d.default,EyeIcon:o.default}};const m={class:"p-hidden-accessible","aria-live":"polite"},y=["id"],v={class:"p-password-meter"},g={class:"p-password-info"};!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===l&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),c.render=function(e,t,l,n,i,s){const a=r.resolveComponent("PInputText"),o=r.resolveComponent("Portal");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(s.containerClass)},[r.createVNode(a,r.mergeProps({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},l.inputProps),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&i.unmasked?r.renderSlot(e.$slots,"hideicon",{key:0,onClick:s.onMaskToggle},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.hideIcon?"i":"EyeSlashIcon"),{class:r.normalizeClass(l.hideIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):r.createCommentVNode("",!0),l.toggleMask&&!i.unmasked?r.renderSlot(e.$slots,"showicon",{key:1,onClick:s.onMaskToggle},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.showIcon?"i":"EyeIcon"),{class:r.normalizeClass(l.showIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):r.createCommentVNode("",!0),r.createElementVNode("span",m,r.toDisplayString(i.infoText),1),r.createVNode(o,{appendTo:l.appendTo},{default:r.withCtx((()=>[r.createVNode(r.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:r.withCtx((()=>[i.overlayVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:s.overlayRef,id:l.panelId||s.panelUniqueId,class:s.panelStyleClass,style:l.panelStyle,onClick:t[0]||(t[0]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},l.panelProps),[r.renderSlot(e.$slots,"header"),r.renderSlot(e.$slots,"content",{},(()=>[r.createElementVNode("div",v,[r.createElementVNode("div",{class:r.normalizeClass(s.strengthClass),style:r.normalizeStyle({width:i.meter?i.meter.width:""})},null,6)]),r.createElementVNode("div",g,r.toDisplayString(i.infoText),1)])),r.renderSlot(e.$slots,"footer")],16,y)):r.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],2)},module.exports=c;
|
package/password/password.esm.js
CHANGED
|
@@ -412,7 +412,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
412
412
|
($props.toggleMask && $data.unmasked)
|
|
413
413
|
? renderSlot(_ctx.$slots, "hideicon", {
|
|
414
414
|
key: 0,
|
|
415
|
-
onClick:
|
|
415
|
+
onClick: $options.onMaskToggle
|
|
416
416
|
}, () => [
|
|
417
417
|
(openBlock(), createBlock(resolveDynamicComponent($props.hideIcon ? 'i' : 'EyeSlashIcon'), {
|
|
418
418
|
class: normalizeClass($props.hideIcon),
|
|
@@ -423,7 +423,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
423
423
|
($props.toggleMask && !$data.unmasked)
|
|
424
424
|
? renderSlot(_ctx.$slots, "showicon", {
|
|
425
425
|
key: 1,
|
|
426
|
-
onClick:
|
|
426
|
+
onClick: $options.onMaskToggle
|
|
427
427
|
}, () => [
|
|
428
428
|
(openBlock(), createBlock(resolveDynamicComponent($props.showIcon ? 'i' : 'EyeIcon'), {
|
|
429
429
|
class: normalizeClass($props.showIcon),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/icons/eye";import t from"primevue/icons/eyeslash";import l from"primevue/inputtext";import i from"primevue/overlayeventbus";import n from"primevue/portal";import{ZIndexUtils as s,DomHandler as r,ConnectedOverlayScrollHandler as a,UniqueComponentId as o}from"primevue/utils";import{resolveComponent as p,openBlock as d,createElementBlock as u,normalizeClass as h,createVNode as c,mergeProps as m,renderSlot as y,createBlock as v,resolveDynamicComponent as f,createCommentVNode as g,createElementVNode as b,toDisplayString as w,withCtx as k,Transition as x,normalizeStyle as S}from"vue";var L={name:"Password",emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){s.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){s.clear(e)},alignOverlay(){"self"===this.appendTo?r.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=r.getOuterWidth(this.$refs.input.$el)+"px",r.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:i}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=i,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new a(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!r.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){i.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>o()+"_panel"},components:{PInputText:l,Portal:n,EyeSlashIcon:t,EyeIcon:e}};const T={class:"p-hidden-accessible","aria-live":"polite"},C=["id"],I={class:"p-password-meter"},$={class:"p-password-info"};!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),L.render=function(e,t,l,i,n,s){const r=p("PInputText"),a=p("Portal");return d(),u("div",{class:h(s.containerClass)},[c(r,m({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":n.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},l.inputProps),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&n.unmasked?y(e.$slots,"hideicon",{key:0,onClick:
|
|
1
|
+
import e from"primevue/icons/eye";import t from"primevue/icons/eyeslash";import l from"primevue/inputtext";import i from"primevue/overlayeventbus";import n from"primevue/portal";import{ZIndexUtils as s,DomHandler as r,ConnectedOverlayScrollHandler as a,UniqueComponentId as o}from"primevue/utils";import{resolveComponent as p,openBlock as d,createElementBlock as u,normalizeClass as h,createVNode as c,mergeProps as m,renderSlot as y,createBlock as v,resolveDynamicComponent as f,createCommentVNode as g,createElementVNode as b,toDisplayString as w,withCtx as k,Transition as x,normalizeStyle as S}from"vue";var L={name:"Password",emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){s.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){s.clear(e)},alignOverlay(){"self"===this.appendTo?r.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=r.getOuterWidth(this.$refs.input.$el)+"px",r.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:i}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=i,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new a(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!r.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){i.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>o()+"_panel"},components:{PInputText:l,Portal:n,EyeSlashIcon:t,EyeIcon:e}};const T={class:"p-hidden-accessible","aria-live":"polite"},C=["id"],I={class:"p-password-meter"},$={class:"p-password-info"};!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),L.render=function(e,t,l,i,n,s){const r=p("PInputText"),a=p("Portal");return d(),u("div",{class:h(s.containerClass)},[c(r,m({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":n.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},l.inputProps),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&n.unmasked?y(e.$slots,"hideicon",{key:0,onClick:s.onMaskToggle},(()=>[(d(),v(f(l.hideIcon?"i":"EyeSlashIcon"),{class:h(l.hideIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):g("",!0),l.toggleMask&&!n.unmasked?y(e.$slots,"showicon",{key:1,onClick:s.onMaskToggle},(()=>[(d(),v(f(l.showIcon?"i":"EyeIcon"),{class:h(l.showIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):g("",!0),b("span",T,w(n.infoText),1),c(a,{appendTo:l.appendTo},{default:k((()=>[c(x,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:k((()=>[n.overlayVisible?(d(),u("div",m({key:0,ref:s.overlayRef,id:l.panelId||s.panelUniqueId,class:s.panelStyleClass,style:l.panelStyle,onClick:t[0]||(t[0]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},l.panelProps),[y(e.$slots,"header"),y(e.$slots,"content",{},(()=>[b("div",I,[b("div",{class:h(s.strengthClass),style:S({width:n.meter?n.meter.width:""})},null,6)]),b("div",$,w(n.infoText),1)])),y(e.$slots,"footer")],16,C)):g("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],2)};export{L as default};
|
package/password/password.js
CHANGED
|
@@ -416,7 +416,7 @@ this.primevue.password = (function (EyeIcon, EyeSlashIcon, InputText, OverlayEve
|
|
|
416
416
|
($props.toggleMask && $data.unmasked)
|
|
417
417
|
? vue.renderSlot(_ctx.$slots, "hideicon", {
|
|
418
418
|
key: 0,
|
|
419
|
-
onClick:
|
|
419
|
+
onClick: $options.onMaskToggle
|
|
420
420
|
}, () => [
|
|
421
421
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.hideIcon ? 'i' : 'EyeSlashIcon'), {
|
|
422
422
|
class: vue.normalizeClass($props.hideIcon),
|
|
@@ -427,7 +427,7 @@ this.primevue.password = (function (EyeIcon, EyeSlashIcon, InputText, OverlayEve
|
|
|
427
427
|
($props.toggleMask && !$data.unmasked)
|
|
428
428
|
? vue.renderSlot(_ctx.$slots, "showicon", {
|
|
429
429
|
key: 1,
|
|
430
|
-
onClick:
|
|
430
|
+
onClick: $options.onMaskToggle
|
|
431
431
|
}, () => [
|
|
432
432
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.showIcon ? 'i' : 'EyeIcon'), {
|
|
433
433
|
class: vue.normalizeClass($props.showIcon),
|
package/password/password.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.password=function(e,t,l,n,i,s,r){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e),d=a(t),p=a(l),u=a(n),h=a(i),c={name:"Password",emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){s.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){s.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?s.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=s.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",s.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:n}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new s.ConnectedOverlayScrollHandler(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!s.DomHandler.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){u.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>s.UniqueComponentId()+"_panel"},components:{PInputText:p.default,Portal:h.default,EyeSlashIcon:d.default,EyeIcon:o.default}};const m={class:"p-hidden-accessible","aria-live":"polite"},y=["id"],v={class:"p-password-meter"},g={class:"p-password-info"};return function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===l&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),c.render=function(e,t,l,n,i,s){const a=r.resolveComponent("PInputText"),o=r.resolveComponent("Portal");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(s.containerClass)},[r.createVNode(a,r.mergeProps({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},l.inputProps),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&i.unmasked?r.renderSlot(e.$slots,"hideicon",{key:0,onClick:
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.password=function(e,t,l,n,i,s,r){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e),d=a(t),p=a(l),u=a(n),h=a(i),c={name:"Password",emits:["update:modelValue","change","focus","blur","invalid"],props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}),mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter(e){s.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave(e){s.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?s.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=s.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",s.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength(e){let t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput(e){this.$emit("update:modelValue",e.target.value)},onFocus(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp(e){if(this.feedback){const t=e.target.value,{meter:l,label:n}=this.checkPasswordStrength(t);if(this.meter=l,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter(){if(!this.modelValue)return;const{meter:e,label:t}=this.checkPasswordStrength(this.modelValue);this.meter=e,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength(e){let t=null,l=null;switch(this.testStrength(e)){case 1:t=this.weakText,l={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,l={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,l={strength:"strong",width:"100%"};break;default:t=this.promptText,l=null}return{label:t,meter:l}},onInvalid(e){this.$emit("invalid",e)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new s.ConnectedOverlayScrollHandler(this.$refs.input.$el,(()=>{this.overlayVisible&&(this.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!s.DomHandler.isTouchDevice()&&(this.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef(e){this.overlay=e},onMaskToggle(){this.unmasked=!this.unmasked},onOverlayClick(e){u.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{containerClass(){return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-input-icon-right":this.toggleMask}]},inputFieldClass(){return["p-password-input",this.inputClass,{"p-disabled":this.disabled}]},panelStyleClass(){return["p-password-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},strengthClass(){return`p-password-strength ${this.meter?this.meter.strength:""}`},inputType(){return this.unmasked?"text":"password"},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText(){return this.strongLabel||this.$primevue.config.locale.strong},promptText(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:()=>s.UniqueComponentId()+"_panel"},components:{PInputText:p.default,Portal:h.default,EyeSlashIcon:d.default,EyeIcon:o.default}};const m={class:"p-hidden-accessible","aria-live":"polite"},y=["id"],v={class:"p-password-meter"},g={class:"p-password-info"};return function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===l&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-password {\n position: relative;\n display: inline-flex;\n}\n.p-password-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-password .p-password-panel {\n min-width: 100%;\n}\n.p-password-meter {\n height: 10px;\n}\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n.p-fluid .p-password {\n display: flex;\n}\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n"),c.render=function(e,t,l,n,i,s){const a=r.resolveComponent("PInputText"),o=r.resolveComponent("Portal");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(s.containerClass)},[r.createVNode(a,r.mergeProps({ref:"input",id:l.inputId,type:s.inputType,class:s.inputFieldClass,style:l.inputStyle,value:l.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":l.panelProps&&l.panelProps.id||l.panelId||s.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:l.placeholder,required:l.required,onInput:s.onInput,onFocus:s.onFocus,onBlur:s.onBlur,onKeyup:s.onKeyUp,onInvalid:s.onInvalid},l.inputProps),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid"]),l.toggleMask&&i.unmasked?r.renderSlot(e.$slots,"hideicon",{key:0,onClick:s.onMaskToggle},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.hideIcon?"i":"EyeSlashIcon"),{class:r.normalizeClass(l.hideIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):r.createCommentVNode("",!0),l.toggleMask&&!i.unmasked?r.renderSlot(e.$slots,"showicon",{key:1,onClick:s.onMaskToggle},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.showIcon?"i":"EyeIcon"),{class:r.normalizeClass(l.showIcon),onClick:s.onMaskToggle},null,8,["class","onClick"]))])):r.createCommentVNode("",!0),r.createElementVNode("span",m,r.toDisplayString(i.infoText),1),r.createVNode(o,{appendTo:l.appendTo},{default:r.withCtx((()=>[r.createVNode(r.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:r.withCtx((()=>[i.overlayVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref:s.overlayRef,id:l.panelId||s.panelUniqueId,class:s.panelStyleClass,style:l.panelStyle,onClick:t[0]||(t[0]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},l.panelProps),[r.renderSlot(e.$slots,"header"),r.renderSlot(e.$slots,"content",{},(()=>[r.createElementVNode("div",v,[r.createElementVNode("div",{class:r.normalizeClass(s.strengthClass),style:r.normalizeStyle({width:i.meter?i.meter.width:""})},null,6)]),r.createElementVNode("div",g,r.toDisplayString(i.infoText),1)])),r.renderSlot(e.$slots,"footer")],16,y)):r.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],2)},c}(primevue.icons.eye,primevue.icons.eyeslash,primevue.inputtext,primevue.overlayeventbus,primevue.portal,primevue.utils,Vue);
|
|
@@ -10,6 +10,41 @@
|
|
|
10
10
|
import { VNode } from 'vue';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
+
export declare type ProgressBarPassThroughOptionType = ProgressBarPassThroughAttributes | ((options: ProgressBarPassThroughMethodOptions) => ProgressBarPassThroughAttributes) | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface ProgressBarPassThroughMethodOptions {
|
|
19
|
+
props: ProgressBarProps;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Custom passthrough(pt) options.
|
|
24
|
+
* @see {@link ProgressBarProps.pt}
|
|
25
|
+
*/
|
|
26
|
+
export interface ProgressBarPassThroughOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Uses to pass attributes to the root's DOM element.
|
|
29
|
+
*/
|
|
30
|
+
root?: ProgressBarPassThroughOptionType;
|
|
31
|
+
/**
|
|
32
|
+
* Uses to pass attributes to the value's DOM element.
|
|
33
|
+
*/
|
|
34
|
+
value?: ProgressBarPassThroughOptionType;
|
|
35
|
+
/**
|
|
36
|
+
* Uses to pass attributes to the label's DOM element.
|
|
37
|
+
*/
|
|
38
|
+
label?: ProgressBarPassThroughOptionType;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Custom passthrough attributes for each DOM elements
|
|
43
|
+
*/
|
|
44
|
+
export interface ProgressBarPassThroughAttributes {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}
|
|
47
|
+
|
|
13
48
|
/**
|
|
14
49
|
* Defines valid properties in ProgressBar component.
|
|
15
50
|
*/
|
|
@@ -28,6 +63,11 @@ export interface ProgressBarProps {
|
|
|
28
63
|
* @defaultValue true
|
|
29
64
|
*/
|
|
30
65
|
showValue?: boolean | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
68
|
+
* @type {ProgressBarPassThroughOptions}
|
|
69
|
+
*/
|
|
70
|
+
pt?: ProgressBarPassThroughOptions;
|
|
31
71
|
}
|
|
32
72
|
|
|
33
73
|
/**
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div role="progressbar" :class="containerClass" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100">
|
|
3
|
-
<div v-if="determinate" class="p-progressbar-value p-progressbar-value-animate" :style="progressStyle">
|
|
4
|
-
<div v-if="value != null && value !== 0 && showValue" class="p-progressbar-label">
|
|
2
|
+
<div role="progressbar" :class="containerClass" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100" v-bind="ptm('root')">
|
|
3
|
+
<div v-if="determinate" class="p-progressbar-value p-progressbar-value-animate" :style="progressStyle" v-bind="ptm('value')">
|
|
4
|
+
<div v-if="value != null && value !== 0 && showValue" class="p-progressbar-label" v-bind="ptm('label')">
|
|
5
5
|
<slot>{{ value + '%' }}</slot>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
|
-
<div v-if="indeterminate" class="p-progressbar-indeterminate-container">
|
|
9
|
-
<div class="p-progressbar-value p-progressbar-value-animate"></div>
|
|
8
|
+
<div v-if="indeterminate" class="p-progressbar-indeterminate-container" v-bind="ptm('root')">
|
|
9
|
+
<div class="p-progressbar-value p-progressbar-value-animate" v-bind="ptm('value')"></div>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
16
|
+
|
|
15
17
|
export default {
|
|
16
18
|
name: 'ProgressBar',
|
|
19
|
+
extends: BaseComponent,
|
|
17
20
|
props: {
|
|
18
21
|
value: {
|
|
19
22
|
type: Number,
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var vue = require('vue');
|
|
4
5
|
|
|
6
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
|
+
|
|
8
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
9
|
+
|
|
5
10
|
var script = {
|
|
6
11
|
name: 'ProgressBar',
|
|
12
|
+
extends: BaseComponent__default["default"],
|
|
7
13
|
props: {
|
|
8
14
|
value: {
|
|
9
15
|
type: Number,
|
|
@@ -44,46 +50,42 @@ var script = {
|
|
|
44
50
|
};
|
|
45
51
|
|
|
46
52
|
const _hoisted_1 = ["aria-valuenow"];
|
|
47
|
-
const _hoisted_2 = {
|
|
48
|
-
key: 0,
|
|
49
|
-
class: "p-progressbar-label"
|
|
50
|
-
};
|
|
51
|
-
const _hoisted_3 = {
|
|
52
|
-
key: 1,
|
|
53
|
-
class: "p-progressbar-indeterminate-container"
|
|
54
|
-
};
|
|
55
|
-
const _hoisted_4 = /*#__PURE__*/vue.createElementVNode("div", { class: "p-progressbar-value p-progressbar-value-animate" }, null, -1);
|
|
56
|
-
const _hoisted_5 = [
|
|
57
|
-
_hoisted_4
|
|
58
|
-
];
|
|
59
53
|
|
|
60
54
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
61
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
55
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
62
56
|
role: "progressbar",
|
|
63
|
-
class:
|
|
57
|
+
class: $options.containerClass,
|
|
64
58
|
"aria-valuemin": "0",
|
|
65
59
|
"aria-valuenow": $props.value,
|
|
66
60
|
"aria-valuemax": "100"
|
|
67
|
-
}, [
|
|
61
|
+
}, _ctx.ptm('root')), [
|
|
68
62
|
($options.determinate)
|
|
69
|
-
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
63
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
70
64
|
key: 0,
|
|
71
65
|
class: "p-progressbar-value p-progressbar-value-animate",
|
|
72
|
-
style:
|
|
73
|
-
}, [
|
|
66
|
+
style: $options.progressStyle
|
|
67
|
+
}, _ctx.ptm('value')), [
|
|
74
68
|
($props.value != null && $props.value !== 0 && $props.showValue)
|
|
75
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
69
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "p-progressbar-label"
|
|
72
|
+
}, _ctx.ptm('label')), [
|
|
76
73
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
77
74
|
vue.createTextVNode(vue.toDisplayString($props.value + '%'), 1)
|
|
78
75
|
])
|
|
79
|
-
]))
|
|
76
|
+
], 16))
|
|
80
77
|
: vue.createCommentVNode("", true)
|
|
81
|
-
],
|
|
78
|
+
], 16))
|
|
82
79
|
: vue.createCommentVNode("", true),
|
|
83
80
|
($options.indeterminate)
|
|
84
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
81
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
82
|
+
key: 1,
|
|
83
|
+
class: "p-progressbar-indeterminate-container"
|
|
84
|
+
}, _ctx.ptm('root')), [
|
|
85
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-progressbar-value p-progressbar-value-animate" }, _ctx.ptm('value')), null, 16)
|
|
86
|
+
], 16))
|
|
85
87
|
: vue.createCommentVNode("", true)
|
|
86
|
-
],
|
|
88
|
+
], 16, _hoisted_1))
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
function styleInject(css, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),n=require("vue");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r={name:"ProgressBar",extends:t(e).default,props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"flex"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const a=["aria-valuenow"];!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-label {\n display: inline-flex;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n transition: width 1s ease-in-out;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),r.render=function(e,t,r,i,o,s){return n.openBlock(),n.createElementBlock("div",n.mergeProps({role:"progressbar",class:s.containerClass,"aria-valuemin":"0","aria-valuenow":r.value,"aria-valuemax":"100"},e.ptm("root")),[s.determinate?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,class:"p-progressbar-value p-progressbar-value-animate",style:s.progressStyle},e.ptm("value")),[null!=r.value&&0!==r.value&&r.showValue?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,class:"p-progressbar-label"},e.ptm("label")),[n.renderSlot(e.$slots,"default",{},(()=>[n.createTextVNode(n.toDisplayString(r.value+"%"),1)]))],16)):n.createCommentVNode("",!0)],16)):n.createCommentVNode("",!0),s.indeterminate?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:1,class:"p-progressbar-indeterminate-container"},e.ptm("root")),[n.createElementVNode("div",n.mergeProps({class:"p-progressbar-value p-progressbar-value-animate"},e.ptm("value")),null,16)],16)):n.createCommentVNode("",!0)],16,a)},module.exports=r;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
2
|
+
import { openBlock, createElementBlock, mergeProps, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode } from 'vue';
|
|
2
3
|
|
|
3
4
|
var script = {
|
|
4
5
|
name: 'ProgressBar',
|
|
6
|
+
extends: BaseComponent,
|
|
5
7
|
props: {
|
|
6
8
|
value: {
|
|
7
9
|
type: Number,
|
|
@@ -42,46 +44,42 @@ var script = {
|
|
|
42
44
|
};
|
|
43
45
|
|
|
44
46
|
const _hoisted_1 = ["aria-valuenow"];
|
|
45
|
-
const _hoisted_2 = {
|
|
46
|
-
key: 0,
|
|
47
|
-
class: "p-progressbar-label"
|
|
48
|
-
};
|
|
49
|
-
const _hoisted_3 = {
|
|
50
|
-
key: 1,
|
|
51
|
-
class: "p-progressbar-indeterminate-container"
|
|
52
|
-
};
|
|
53
|
-
const _hoisted_4 = /*#__PURE__*/createElementVNode("div", { class: "p-progressbar-value p-progressbar-value-animate" }, null, -1);
|
|
54
|
-
const _hoisted_5 = [
|
|
55
|
-
_hoisted_4
|
|
56
|
-
];
|
|
57
47
|
|
|
58
48
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
59
|
-
return (openBlock(), createElementBlock("div", {
|
|
49
|
+
return (openBlock(), createElementBlock("div", mergeProps({
|
|
60
50
|
role: "progressbar",
|
|
61
|
-
class:
|
|
51
|
+
class: $options.containerClass,
|
|
62
52
|
"aria-valuemin": "0",
|
|
63
53
|
"aria-valuenow": $props.value,
|
|
64
54
|
"aria-valuemax": "100"
|
|
65
|
-
}, [
|
|
55
|
+
}, _ctx.ptm('root')), [
|
|
66
56
|
($options.determinate)
|
|
67
|
-
? (openBlock(), createElementBlock("div", {
|
|
57
|
+
? (openBlock(), createElementBlock("div", mergeProps({
|
|
68
58
|
key: 0,
|
|
69
59
|
class: "p-progressbar-value p-progressbar-value-animate",
|
|
70
|
-
style:
|
|
71
|
-
}, [
|
|
60
|
+
style: $options.progressStyle
|
|
61
|
+
}, _ctx.ptm('value')), [
|
|
72
62
|
($props.value != null && $props.value !== 0 && $props.showValue)
|
|
73
|
-
? (openBlock(), createElementBlock("div",
|
|
63
|
+
? (openBlock(), createElementBlock("div", mergeProps({
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "p-progressbar-label"
|
|
66
|
+
}, _ctx.ptm('label')), [
|
|
74
67
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
75
68
|
createTextVNode(toDisplayString($props.value + '%'), 1)
|
|
76
69
|
])
|
|
77
|
-
]))
|
|
70
|
+
], 16))
|
|
78
71
|
: createCommentVNode("", true)
|
|
79
|
-
],
|
|
72
|
+
], 16))
|
|
80
73
|
: createCommentVNode("", true),
|
|
81
74
|
($options.indeterminate)
|
|
82
|
-
? (openBlock(), createElementBlock("div",
|
|
75
|
+
? (openBlock(), createElementBlock("div", mergeProps({
|
|
76
|
+
key: 1,
|
|
77
|
+
class: "p-progressbar-indeterminate-container"
|
|
78
|
+
}, _ctx.ptm('root')), [
|
|
79
|
+
createElementVNode("div", mergeProps({ class: "p-progressbar-value p-progressbar-value-animate" }, _ctx.ptm('value')), null, 16)
|
|
80
|
+
], 16))
|
|
83
81
|
: createCommentVNode("", true)
|
|
84
|
-
],
|
|
82
|
+
], 16, _hoisted_1))
|
|
85
83
|
}
|
|
86
84
|
|
|
87
85
|
function styleInject(css, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{openBlock as
|
|
1
|
+
import e from"primevue/basecomponent";import{openBlock as n,createElementBlock as t,mergeProps as r,renderSlot as i,createTextVNode as a,toDisplayString as s,createCommentVNode as o,createElementVNode as l}from"vue";var p={name:"ProgressBar",extends:e,props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"flex"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const m=["aria-valuenow"];!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-label {\n display: inline-flex;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n transition: width 1s ease-in-out;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),p.render=function(e,p,d,u,b,g){return n(),t("div",r({role:"progressbar",class:g.containerClass,"aria-valuemin":"0","aria-valuenow":d.value,"aria-valuemax":"100"},e.ptm("root")),[g.determinate?(n(),t("div",r({key:0,class:"p-progressbar-value p-progressbar-value-animate",style:g.progressStyle},e.ptm("value")),[null!=d.value&&0!==d.value&&d.showValue?(n(),t("div",r({key:0,class:"p-progressbar-label"},e.ptm("label")),[i(e.$slots,"default",{},(()=>[a(s(d.value+"%"),1)]))],16)):o("",!0)],16)):o("",!0),g.indeterminate?(n(),t("div",r({key:1,class:"p-progressbar-indeterminate-container"},e.ptm("root")),[l("div",r({class:"p-progressbar-value p-progressbar-value-animate"},e.ptm("value")),null,16)],16)):o("",!0)],16,m)};export{p as default};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.progressbar = (function (vue) {
|
|
2
|
+
this.primevue.progressbar = (function (BaseComponent, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
8
|
+
|
|
5
9
|
var script = {
|
|
6
10
|
name: 'ProgressBar',
|
|
11
|
+
extends: BaseComponent__default["default"],
|
|
7
12
|
props: {
|
|
8
13
|
value: {
|
|
9
14
|
type: Number,
|
|
@@ -44,46 +49,42 @@ this.primevue.progressbar = (function (vue) {
|
|
|
44
49
|
};
|
|
45
50
|
|
|
46
51
|
const _hoisted_1 = ["aria-valuenow"];
|
|
47
|
-
const _hoisted_2 = {
|
|
48
|
-
key: 0,
|
|
49
|
-
class: "p-progressbar-label"
|
|
50
|
-
};
|
|
51
|
-
const _hoisted_3 = {
|
|
52
|
-
key: 1,
|
|
53
|
-
class: "p-progressbar-indeterminate-container"
|
|
54
|
-
};
|
|
55
|
-
const _hoisted_4 = /*#__PURE__*/vue.createElementVNode("div", { class: "p-progressbar-value p-progressbar-value-animate" }, null, -1);
|
|
56
|
-
const _hoisted_5 = [
|
|
57
|
-
_hoisted_4
|
|
58
|
-
];
|
|
59
52
|
|
|
60
53
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
61
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
54
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
62
55
|
role: "progressbar",
|
|
63
|
-
class:
|
|
56
|
+
class: $options.containerClass,
|
|
64
57
|
"aria-valuemin": "0",
|
|
65
58
|
"aria-valuenow": $props.value,
|
|
66
59
|
"aria-valuemax": "100"
|
|
67
|
-
}, [
|
|
60
|
+
}, _ctx.ptm('root')), [
|
|
68
61
|
($options.determinate)
|
|
69
|
-
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
62
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
70
63
|
key: 0,
|
|
71
64
|
class: "p-progressbar-value p-progressbar-value-animate",
|
|
72
|
-
style:
|
|
73
|
-
}, [
|
|
65
|
+
style: $options.progressStyle
|
|
66
|
+
}, _ctx.ptm('value')), [
|
|
74
67
|
($props.value != null && $props.value !== 0 && $props.showValue)
|
|
75
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
68
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "p-progressbar-label"
|
|
71
|
+
}, _ctx.ptm('label')), [
|
|
76
72
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
77
73
|
vue.createTextVNode(vue.toDisplayString($props.value + '%'), 1)
|
|
78
74
|
])
|
|
79
|
-
]))
|
|
75
|
+
], 16))
|
|
80
76
|
: vue.createCommentVNode("", true)
|
|
81
|
-
],
|
|
77
|
+
], 16))
|
|
82
78
|
: vue.createCommentVNode("", true),
|
|
83
79
|
($options.indeterminate)
|
|
84
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
80
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
81
|
+
key: 1,
|
|
82
|
+
class: "p-progressbar-indeterminate-container"
|
|
83
|
+
}, _ctx.ptm('root')), [
|
|
84
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-progressbar-value p-progressbar-value-animate" }, _ctx.ptm('value')), null, 16)
|
|
85
|
+
], 16))
|
|
85
86
|
: vue.createCommentVNode("", true)
|
|
86
|
-
],
|
|
87
|
+
], 16, _hoisted_1))
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
function styleInject(css, ref) {
|
|
@@ -120,4 +121,4 @@ this.primevue.progressbar = (function (vue) {
|
|
|
120
121
|
|
|
121
122
|
return script;
|
|
122
123
|
|
|
123
|
-
})(Vue);
|
|
124
|
+
})(primevue.basecomponent, Vue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.progressbar=function(e){"use strict";var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.progressbar=function(e,n){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r={name:"ProgressBar",extends:t(e).default,props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"flex"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const i=["aria-valuenow"];return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-label {\n display: inline-flex;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n transition: width 1s ease-in-out;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),r.render=function(e,t,r,a,o,s){return n.openBlock(),n.createElementBlock("div",n.mergeProps({role:"progressbar",class:s.containerClass,"aria-valuemin":"0","aria-valuenow":r.value,"aria-valuemax":"100"},e.ptm("root")),[s.determinate?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,class:"p-progressbar-value p-progressbar-value-animate",style:s.progressStyle},e.ptm("value")),[null!=r.value&&0!==r.value&&r.showValue?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,class:"p-progressbar-label"},e.ptm("label")),[n.renderSlot(e.$slots,"default",{},(()=>[n.createTextVNode(n.toDisplayString(r.value+"%"),1)]))],16)):n.createCommentVNode("",!0)],16)):n.createCommentVNode("",!0),s.indeterminate?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:1,class:"p-progressbar-indeterminate-container"},e.ptm("root")),[n.createElementVNode("div",n.mergeProps({class:"p-progressbar-value p-progressbar-value-animate"},e.ptm("value")),null,16)],16)):n.createCommentVNode("",!0)],16,i)},r}(primevue.basecomponent,Vue);
|