primereact 9.3.0 → 9.4.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 +21 -38
- package/accordion/accordion.cjs.js +88 -90
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +90 -1
- package/accordion/accordion.esm.js +89 -91
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +89 -92
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +1 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +1 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +1 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +9 -5
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +9 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +8 -4
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +71 -22
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +37 -1
- package/avatar/avatar.esm.js +72 -23
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +72 -24
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +26 -42
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.d.ts +24 -0
- package/avatargroup/avatargroup.esm.js +13 -29
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +52 -69
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +12 -28
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +26 -0
- package/badge/badge.esm.js +13 -29
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +13 -30
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +12 -28
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +38 -0
- package/blockui/blockui.esm.js +13 -29
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +13 -30
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +49 -42
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +42 -1
- package/button/button.esm.js +50 -43
- package/button/button.esm.min.js +1 -1
- package/button/button.js +49 -43
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +31 -23
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +1 -1
- package/calendar/calendar.esm.js +31 -23
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +28 -20
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +52 -63
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +56 -0
- package/card/card.esm.js +39 -50
- package/card/card.esm.min.js +1 -1
- package/card/card.js +86 -98
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +16 -28
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +2 -2
- package/carousel/carousel.esm.js +16 -28
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +14 -26
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.js +1 -1
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +5 -1
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +5 -0
- package/chart/chart.esm.js +5 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +5 -1
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +22 -7
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +14 -1
- package/checkbox/checkbox.esm.js +22 -7
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +23 -8
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +45 -42
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +53 -1
- package/chip/chip.esm.js +46 -43
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +46 -44
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +13 -5
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +13 -5
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +14 -6
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +7 -4
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +8 -0
- package/colorpicker/colorpicker.esm.js +7 -4
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +7 -4
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +6 -2
- package/componentbase/componentbase.cjs.js +105 -0
- package/componentbase/componentbase.cjs.min.js +1 -0
- package/componentbase/componentbase.esm.js +101 -0
- package/componentbase/componentbase.esm.min.js +1 -0
- package/componentbase/componentbase.js +109 -0
- package/componentbase/componentbase.min.js +1 -0
- package/componentbase/package.json +6 -0
- package/confirmdialog/confirmdialog.cjs.js +44 -27
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +90 -2
- package/confirmdialog/confirmdialog.esm.js +45 -28
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +45 -29
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +53 -50
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +70 -1
- package/confirmpopup/confirmpopup.esm.js +54 -51
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +54 -52
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.js +1 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1253 -1048
- package/core/core.min.js +17 -15
- package/datatable/datatable.cjs.js +82 -41
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +39 -10
- package/datatable/datatable.esm.js +82 -41
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +72 -31
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.js +1 -1
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +13 -26
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +38 -0
- package/deferredcontent/deferredcontent.esm.js +14 -27
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +14 -28
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +83 -83
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +85 -3
- package/dialog/dialog.esm.js +83 -83
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +81 -82
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +35 -51
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.d.ts +30 -0
- package/divider/divider.esm.js +22 -38
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +66 -83
- package/divider/divider.min.js +1 -1
- package/dropdown/dropdown.cjs.js +45 -19
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +6 -1
- package/dropdown/dropdown.esm.js +45 -19
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +45 -19
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +55 -54
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +77 -1
- package/fieldset/fieldset.esm.js +56 -55
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +56 -56
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +13 -14
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +14 -15
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +14 -16
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +5 -0
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +4 -4
- package/galleria/galleria.esm.js +5 -0
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +6 -1
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +15 -2
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +15 -2
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +15 -2
- package/hooks/hooks.min.js +1 -1
- package/image/image.cjs.js +63 -41
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +22 -6
- package/image/image.esm.js +63 -41
- package/image/image.esm.min.js +1 -1
- package/image/image.js +61 -39
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +33 -51
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +51 -1
- package/inplace/inplace.esm.js +33 -51
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +33 -52
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +6 -2
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +6 -2
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +6 -2
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +8 -4
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +8 -4
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +8 -4
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +6 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +6 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +6 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -8
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +7 -8
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -8
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +5 -6
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +5 -6
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +5 -6
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/listbox/listbox.cjs.js +12 -4
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +12 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +13 -5
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.js +1 -1
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +6 -6
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +6 -6
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +6 -6
- package/mention/mention.min.js +1 -1
- package/menubar/menubar.js +1 -1
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +0 -2
- package/message/message.d.ts +1 -1
- package/message/message.js +1 -1
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +64 -50
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +5 -0
- package/messages/messages.esm.js +64 -50
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +62 -48
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +46 -22
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +4 -0
- package/multiselect/multiselect.esm.js +46 -22
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +45 -21
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +6 -2
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +6 -2
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +6 -2
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.js +1 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +18 -2
- package/organizationchart/organizationchart.js +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +40 -46
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +45 -1
- package/overlaypanel/overlaypanel.esm.js +41 -47
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -48
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +1 -1
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +1 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -2
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +78 -63
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +100 -1
- package/panel/panel.esm.js +79 -64
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +79 -65
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.js +1 -1
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +3 -9
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +3 -9
- package/password/password.esm.min.js +1 -1
- package/password/password.js +4 -10
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +2 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +2 -2
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +3 -3
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +2310 -1775
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2310 -1776
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2310 -1775
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +45 -57
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.d.ts +38 -0
- package/progressbar/progressbar.esm.js +32 -44
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +105 -118
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +37 -51
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.d.ts +34 -0
- package/progressspinner/progressspinner.esm.js +24 -38
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +75 -90
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +29 -14
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +14 -1
- package/radiobutton/radiobutton.esm.js +29 -14
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +29 -14
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +15 -7
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +15 -7
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +14 -6
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +538 -538
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +3 -0
- package/resources/themes/arya-green/theme.css +3 -0
- package/resources/themes/arya-orange/theme.css +3 -0
- package/resources/themes/arya-purple/theme.css +3 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +3 -0
- package/resources/themes/bootstrap4-dark-purple/theme.css +3 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +3 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +3 -0
- package/resources/themes/fluent-light/theme.css +3 -0
- package/resources/themes/lara-dark-blue/theme.css +3 -0
- package/resources/themes/lara-dark-indigo/theme.css +3 -0
- package/resources/themes/lara-dark-purple/theme.css +3 -0
- package/resources/themes/lara-dark-teal/theme.css +3 -0
- package/resources/themes/lara-light-blue/theme.css +3 -0
- package/resources/themes/lara-light-indigo/theme.css +3 -0
- package/resources/themes/lara-light-purple/theme.css +3 -0
- package/resources/themes/lara-light-teal/theme.css +3 -0
- package/resources/themes/luna-amber/theme.css +3 -0
- package/resources/themes/luna-blue/theme.css +3 -0
- package/resources/themes/luna-green/theme.css +3 -0
- package/resources/themes/luna-pink/theme.css +3 -0
- package/resources/themes/md-dark-deeppurple/theme.css +3 -0
- package/resources/themes/md-dark-indigo/theme.css +3 -0
- package/resources/themes/md-light-deeppurple/theme.css +3 -0
- package/resources/themes/md-light-indigo/theme.css +3 -0
- package/resources/themes/mdc-dark-deeppurple/theme.css +3 -0
- package/resources/themes/mdc-dark-indigo/theme.css +3 -0
- package/resources/themes/mdc-light-deeppurple/theme.css +3 -0
- package/resources/themes/mdc-light-indigo/theme.css +3 -0
- package/resources/themes/mira/theme.css +3 -0
- package/resources/themes/nano/theme.css +3 -0
- package/resources/themes/nova/theme.css +3 -0
- package/resources/themes/nova-accent/theme.css +3 -0
- package/resources/themes/nova-alt/theme.css +3 -0
- package/resources/themes/rhea/theme.css +3 -0
- package/resources/themes/saga-blue/theme.css +3 -0
- package/resources/themes/saga-green/theme.css +3 -0
- package/resources/themes/saga-orange/theme.css +3 -0
- package/resources/themes/saga-purple/theme.css +3 -0
- package/resources/themes/soho-dark/theme.css +3 -0
- package/resources/themes/soho-light/theme.css +3 -0
- package/resources/themes/tailwind-light/theme.css +3 -0
- package/resources/themes/vela-blue/theme.css +3 -0
- package/resources/themes/vela-green/theme.css +3 -0
- package/resources/themes/vela-orange/theme.css +3 -0
- package/resources/themes/vela-purple/theme.css +3 -0
- package/resources/themes/viva-dark/theme.css +3 -0
- package/resources/themes/viva-light/theme.css +3 -0
- package/scrollpanel/scrollpanel.cjs.js +39 -52
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.d.ts +42 -0
- package/scrollpanel/scrollpanel.esm.js +26 -39
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +193 -207
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +64 -36
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +42 -1
- package/scrolltop/scrolltop.esm.js +65 -37
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +65 -38
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +6 -2
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +6 -2
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +6 -2
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +88 -52
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +58 -1
- package/sidebar/sidebar.esm.js +89 -53
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +89 -54
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +26 -42
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.d.ts +26 -0
- package/skeleton/skeleton.esm.js +13 -29
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +70 -87
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.js +1 -1
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.cjs.js +63 -56
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +64 -1
- package/speeddial/speeddial.esm.js +64 -57
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +62 -56
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +50 -40
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +59 -1
- package/splitbutton/splitbutton.esm.js +51 -41
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +50 -41
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +68 -70
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +60 -0
- package/splitter/splitter.esm.js +69 -71
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +69 -72
- package/splitter/splitter.min.js +1 -1
- package/styleclass/styleclass.cjs.js +9 -7
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +9 -7
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +9 -7
- package/styleclass/styleclass.min.js +1 -1
- package/tabview/tabview.cjs.js +143 -123
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +135 -4
- package/tabview/tabview.esm.js +144 -124
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +144 -125
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +18 -30
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +34 -1
- package/tag/tag.esm.js +19 -31
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +19 -32
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +49 -52
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +73 -0
- package/terminal/terminal.esm.js +50 -53
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +50 -54
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +1 -1
- package/tieredmenu/tieredmenu.cjs.js +1 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +2 -2
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.d.ts +1 -1
- package/toast/toast.cjs.js +13 -10
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +4 -0
- package/toast/toast.esm.js +13 -10
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +14 -11
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +6 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +6 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +6 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +35 -49
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +44 -0
- package/toolbar/toolbar.esm.js +22 -36
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +72 -87
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +31 -37
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +55 -0
- package/tooltip/tooltip.esm.js +32 -38
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +32 -39
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +5 -0
- package/tree/tree.d.ts +1 -1
- package/tree/tree.js +1 -1
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +5 -1
- package/treeselect/treeselect.cjs.js +9 -5
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +1 -1
- package/treeselect/treeselect.esm.js +9 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +8 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +10 -3
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +1 -1
- package/treetable/treetable.esm.js +10 -3
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +11 -4
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +8 -4
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +8 -4
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +8 -4
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +710 -672
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +4 -0
- package/utils/utils.esm.js +710 -673
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +710 -672
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.js +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +17 -199
package/button/button.cjs.js
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var spinner = require('primereact/icons/spinner');
|
|
6
7
|
var ripple = require('primereact/ripple');
|
|
7
8
|
var tooltip = require('primereact/tooltip');
|
|
8
9
|
var utils = require('primereact/utils');
|
|
9
|
-
var
|
|
10
|
+
var componentbase = require('primereact/componentbase');
|
|
10
11
|
|
|
11
12
|
function _interopNamespace(e) {
|
|
12
13
|
if (e && e.__esModule) return e;
|
|
@@ -84,40 +85,41 @@ function _defineProperty(obj, key, value) {
|
|
|
84
85
|
return obj;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
var ButtonBase = {
|
|
88
|
+
var ButtonBase = componentbase.ComponentBase.extend({
|
|
88
89
|
defaultProps: {
|
|
89
90
|
__TYPE: 'Button',
|
|
90
|
-
|
|
91
|
+
badge: null,
|
|
92
|
+
badgeClassName: null,
|
|
93
|
+
className: null,
|
|
94
|
+
children: undefined,
|
|
95
|
+
disabled: false,
|
|
91
96
|
icon: null,
|
|
92
97
|
iconPos: 'left',
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
label: null,
|
|
99
|
+
link: false,
|
|
100
|
+
loading: false,
|
|
101
|
+
loadingIcon: null,
|
|
97
102
|
outlined: false,
|
|
103
|
+
raised: false,
|
|
104
|
+
rounded: false,
|
|
105
|
+
severity: null,
|
|
106
|
+
size: null,
|
|
98
107
|
text: false,
|
|
99
|
-
link: false,
|
|
100
|
-
badgeClassName: null,
|
|
101
108
|
tooltip: null,
|
|
102
|
-
size: null,
|
|
103
109
|
tooltipOptions: null,
|
|
104
|
-
|
|
105
|
-
loading: false,
|
|
106
|
-
loadingIcon: null,
|
|
107
|
-
visible: true,
|
|
108
|
-
children: undefined
|
|
109
|
-
},
|
|
110
|
-
getProps: function getProps(props) {
|
|
111
|
-
return utils.ObjectUtils.getMergedProps(props, ButtonBase.defaultProps);
|
|
112
|
-
},
|
|
113
|
-
getOtherProps: function getOtherProps(props) {
|
|
114
|
-
return utils.ObjectUtils.getDiffProps(props, ButtonBase.defaultProps);
|
|
110
|
+
visible: true
|
|
115
111
|
}
|
|
116
|
-
};
|
|
112
|
+
});
|
|
117
113
|
|
|
114
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
115
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
118
116
|
var Button = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
119
117
|
var _classNames2;
|
|
120
118
|
var props = ButtonBase.getProps(inProps);
|
|
119
|
+
var _ButtonBase$setMetaDa = ButtonBase.setMetaData({
|
|
120
|
+
props: props
|
|
121
|
+
}),
|
|
122
|
+
ptm = _ButtonBase$setMetaDa.ptm;
|
|
121
123
|
var elementRef = React__namespace.useRef(ref);
|
|
122
124
|
React__namespace.useEffect(function () {
|
|
123
125
|
utils.ObjectUtils.combinedRefs(elementRef, ref);
|
|
@@ -126,24 +128,29 @@ var Button = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
|
|
|
126
128
|
return null;
|
|
127
129
|
}
|
|
128
130
|
var createIcon = function createIcon() {
|
|
129
|
-
var className = utils.classNames('p-button-icon p-c', _defineProperty({
|
|
131
|
+
var className = utils.classNames('p-button-icon p-c', _defineProperty({}, "p-button-icon-".concat(props.iconPos), props.label));
|
|
132
|
+
var iconsProps = utils.mergeProps({
|
|
133
|
+
className: className
|
|
134
|
+
}, ptm('icon'));
|
|
135
|
+
className = utils.classNames(className, {
|
|
130
136
|
'p-button-loading-icon': props.loading
|
|
131
|
-
}
|
|
132
|
-
var
|
|
133
|
-
className: className,
|
|
134
|
-
spin: true
|
|
135
|
-
}) : props.icon;
|
|
136
|
-
return utils.IconUtils.getJSXIcon(icon, {
|
|
137
|
+
});
|
|
138
|
+
var loadingIconProps = utils.mergeProps({
|
|
137
139
|
className: className
|
|
138
|
-
},
|
|
140
|
+
}, ptm('loadingIcon'));
|
|
141
|
+
var icon = props.loading ? props.loadingIcon || /*#__PURE__*/React__namespace.createElement(spinner.SpinnerIcon, _extends({}, loadingIconProps, {
|
|
142
|
+
spin: true
|
|
143
|
+
})) : props.icon;
|
|
144
|
+
return utils.IconUtils.getJSXIcon(icon, _objectSpread({}, iconsProps), {
|
|
139
145
|
props: props
|
|
140
146
|
});
|
|
141
147
|
};
|
|
142
148
|
var createLabel = function createLabel() {
|
|
143
149
|
if (props.label) {
|
|
144
|
-
|
|
145
|
-
className:
|
|
146
|
-
},
|
|
150
|
+
var labelProps = utils.mergeProps({
|
|
151
|
+
className: 'p-button-label p-c'
|
|
152
|
+
}, ptm('label'));
|
|
153
|
+
return /*#__PURE__*/React__namespace.createElement("span", labelProps, props.label);
|
|
147
154
|
}
|
|
148
155
|
return !props.children && !props.label && /*#__PURE__*/React__namespace.createElement("span", {
|
|
149
156
|
className: "p-button-label p-c",
|
|
@@ -155,23 +162,23 @@ var Button = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
|
|
|
155
162
|
var createBadge = function createBadge() {
|
|
156
163
|
if (props.badge) {
|
|
157
164
|
var badgeClassName = utils.classNames('p-badge', props.badgeClassName);
|
|
158
|
-
|
|
165
|
+
var badgeProps = utils.mergeProps({
|
|
159
166
|
className: badgeClassName
|
|
160
|
-
},
|
|
167
|
+
}, ptm('badge'));
|
|
168
|
+
return /*#__PURE__*/React__namespace.createElement("span", badgeProps, props.badge);
|
|
161
169
|
}
|
|
162
170
|
return null;
|
|
163
171
|
};
|
|
164
172
|
var disabled = props.disabled || props.loading;
|
|
165
173
|
var showTooltip = !disabled || props.tooltipOptions && props.tooltipOptions.showOnDisabled;
|
|
166
174
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip) && showTooltip;
|
|
167
|
-
var otherProps = ButtonBase.getOtherProps(props);
|
|
168
175
|
var sizeMapping = {
|
|
169
176
|
large: 'lg',
|
|
170
177
|
small: 'sm'
|
|
171
178
|
};
|
|
172
179
|
var size = sizeMapping[props.size];
|
|
173
180
|
var className = utils.classNames('p-button p-component', props.className, (_classNames2 = {
|
|
174
|
-
'p-button-icon-only': (props.icon || props.loading
|
|
181
|
+
'p-button-icon-only': (props.icon || props.loading) && !props.label && !props.children,
|
|
175
182
|
'p-button-vertical': (props.iconPos === 'top' || props.iconPos === 'bottom') && props.label,
|
|
176
183
|
'p-disabled': disabled,
|
|
177
184
|
'p-button-loading': props.loading,
|
|
@@ -181,18 +188,18 @@ var Button = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.f
|
|
|
181
188
|
'p-button-text': props.text,
|
|
182
189
|
'p-button-rounded': props.rounded,
|
|
183
190
|
'p-button-loading-label-only': props.loading && !props.icon && props.label
|
|
184
|
-
}, _defineProperty(_classNames2, "p-button-loading-".concat(props.iconPos), props.loading && props.
|
|
191
|
+
}, _defineProperty(_classNames2, "p-button-loading-".concat(props.iconPos), props.loading && props.label), _defineProperty(_classNames2, "p-button-".concat(size), size), _defineProperty(_classNames2, "p-button-".concat(props.severity), props.severity), _classNames2));
|
|
185
192
|
var icon = createIcon();
|
|
186
193
|
var label = createLabel();
|
|
187
194
|
var badge = createBadge();
|
|
188
195
|
var defaultAriaLabel = props.label ? props.label + (props.badge ? ' ' + props.badge : '') : props['aria-label'];
|
|
189
|
-
|
|
196
|
+
var rootProps = utils.mergeProps({
|
|
190
197
|
ref: elementRef,
|
|
191
|
-
|
|
192
|
-
}, otherProps, {
|
|
198
|
+
'aria-label': defaultAriaLabel,
|
|
193
199
|
className: className,
|
|
194
200
|
disabled: disabled
|
|
195
|
-
}
|
|
201
|
+
}, ButtonBase.getOtherProps(props), ptm('root'));
|
|
202
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("button", rootProps, icon, label, props.children, badge, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null)), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
196
203
|
target: elementRef,
|
|
197
204
|
content: props.tooltip
|
|
198
205
|
}, props.tooltipOptions)));
|
package/button/button.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/icons/spinner"),n=require("primereact/ripple"),r=require("primereact/tooltip"),o=require("primereact/utils"),l=require("primereact/componentbase");function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=i(e);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e){var t=u(e,"string");return"symbol"===s(t)?t:String(t)}function b(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=l.ComponentBase.extend({defaultProps:{__TYPE:"Button",badge:null,badgeClassName:null,className:null,children:void 0,disabled:!1,icon:null,iconPos:"left",label:null,link:!1,loading:!1,loadingIcon:null,outlined:!1,raised:!1,rounded:!1,severity:null,size:null,text:!1,tooltip:null,tooltipOptions:null,visible:!0}});function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=a.memo(a.forwardRef((function(e,l){var i,s=d.getProps(e),u=d.setMetaData({props:s}).ptm,p=a.useRef(l);if(a.useEffect((function(){o.ObjectUtils.combinedRefs(p,l)}),[p,l]),!1===s.visible)return null;var m=s.disabled||s.loading,g=!m||s.tooltipOptions&&s.tooltipOptions.showOnDisabled,y=o.ObjectUtils.isNotEmpty(s.tooltip)&&g,O={large:"lg",small:"sm"}[s.size],v=o.classNames("p-button p-component",s.className,(b(i={"p-button-icon-only":(s.icon||s.loading)&&!s.label&&!s.children,"p-button-vertical":("top"===s.iconPos||"bottom"===s.iconPos)&&s.label,"p-disabled":m,"p-button-loading":s.loading,"p-button-outlined":s.outlined,"p-button-raised":s.raised,"p-button-link":s.link,"p-button-text":s.text,"p-button-rounded":s.rounded,"p-button-loading-label-only":s.loading&&!s.icon&&s.label},"p-button-loading-".concat(s.iconPos),s.loading&&s.label),b(i,"p-button-".concat(O),O),b(i,"p-button-".concat(s.severity),s.severity),i)),P=function(){var e=o.classNames("p-button-icon p-c",b({},"p-button-icon-".concat(s.iconPos),s.label)),n=o.mergeProps({className:e},u("icon"));e=o.classNames(e,{"p-button-loading-icon":s.loading});var r=o.mergeProps({className:e},u("loadingIcon")),l=s.loading?s.loadingIcon||a.createElement(t.SpinnerIcon,c({},r,{spin:!0})):s.icon;return o.IconUtils.getJSXIcon(l,f({},n),{props:s})}(),j=function(){if(s.label){var e=o.mergeProps({className:"p-button-label p-c"},u("label"));return a.createElement("span",e,s.label)}return!s.children&&!s.label&&a.createElement("span",{className:"p-button-label p-c",dangerouslySetInnerHTML:{__html:" "}})}(),N=function(){if(s.badge){var e=o.classNames("p-badge",s.badgeClassName),t=o.mergeProps({className:e},u("badge"));return a.createElement("span",t,s.badge)}return null}(),h=o.mergeProps({ref:p,"aria-label":s.label?s.label+(s.badge?" "+s.badge:""):s["aria-label"],className:v,disabled:m},d.getOtherProps(s),u("root"));return a.createElement(a.Fragment,null,a.createElement("button",h,P,j,s.children,N,a.createElement(n.Ripple,null)),y&&a.createElement(r.Tooltip,c({target:p,content:s.tooltip},s.tooltipOptions)))})));g.displayName="Button",exports.Button=g;
|
package/button/button.d.ts
CHANGED
|
@@ -9,7 +9,43 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { TooltipOptions } from '../tooltip/tooltipoptions';
|
|
12
|
-
import { IconType } from '../utils';
|
|
12
|
+
import { IconType, PassThroughType } from '../utils';
|
|
13
|
+
|
|
14
|
+
export declare type ButtonPassThroughType<T> = PassThroughType<T, ButtonPassThroughMethodOptions>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Custom passthrough(pt) option method.
|
|
18
|
+
*/
|
|
19
|
+
export interface ButtonPassThroughMethodOptions {
|
|
20
|
+
props: ButtonProps;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Custom passthrough(pt) options.
|
|
25
|
+
* @see {@link ButtonProps.pt}
|
|
26
|
+
*/
|
|
27
|
+
export interface ButtonPassThroughOptions {
|
|
28
|
+
/**
|
|
29
|
+
* Uses to pass attributes to the root's DOM element.
|
|
30
|
+
*/
|
|
31
|
+
root?: ButtonPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
|
|
32
|
+
/**
|
|
33
|
+
* Uses to pass attributes to the loading icon's DOM element.
|
|
34
|
+
*/
|
|
35
|
+
loadingIcon?: ButtonPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement | SVGSVGElement>>;
|
|
36
|
+
/**
|
|
37
|
+
* Uses to pass attributes to the icon's DOM element.
|
|
38
|
+
*/
|
|
39
|
+
icon?: ButtonPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement | SVGSVGElement>>;
|
|
40
|
+
/**
|
|
41
|
+
* Uses to pass attributes to the label's DOM element.
|
|
42
|
+
*/
|
|
43
|
+
label?: ButtonPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
|
|
44
|
+
/**
|
|
45
|
+
* Uses to pass attributes to the badge's DOM element.
|
|
46
|
+
*/
|
|
47
|
+
badge?: ButtonPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
|
|
48
|
+
}
|
|
13
49
|
|
|
14
50
|
/**
|
|
15
51
|
* Defines valid properties in Button component. In addition to these, all properties of HTMLButtonElement can be used in this component.
|
|
@@ -102,6 +138,11 @@ export interface ButtonProps extends Omit<React.DetailedHTMLProps<React.ButtonHT
|
|
|
102
138
|
* @defaultValue true
|
|
103
139
|
*/
|
|
104
140
|
visible?: boolean | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
143
|
+
* @type {ButtonPassThroughOptions}
|
|
144
|
+
*/
|
|
145
|
+
pt?: ButtonPassThroughOptions;
|
|
105
146
|
}
|
|
106
147
|
|
|
107
148
|
/**
|
package/button/button.esm.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { SpinnerIcon } from 'primereact/icons/spinner';
|
|
2
3
|
import { Ripple } from 'primereact/ripple';
|
|
3
4
|
import { Tooltip } from 'primereact/tooltip';
|
|
4
|
-
import { ObjectUtils, classNames, IconUtils } from 'primereact/utils';
|
|
5
|
-
import {
|
|
5
|
+
import { ObjectUtils, classNames, mergeProps, IconUtils } from 'primereact/utils';
|
|
6
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
6
7
|
|
|
7
8
|
function _extends() {
|
|
8
9
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -60,40 +61,41 @@ function _defineProperty(obj, key, value) {
|
|
|
60
61
|
return obj;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
var ButtonBase = {
|
|
64
|
+
var ButtonBase = ComponentBase.extend({
|
|
64
65
|
defaultProps: {
|
|
65
66
|
__TYPE: 'Button',
|
|
66
|
-
|
|
67
|
+
badge: null,
|
|
68
|
+
badgeClassName: null,
|
|
69
|
+
className: null,
|
|
70
|
+
children: undefined,
|
|
71
|
+
disabled: false,
|
|
67
72
|
icon: null,
|
|
68
73
|
iconPos: 'left',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
label: null,
|
|
75
|
+
link: false,
|
|
76
|
+
loading: false,
|
|
77
|
+
loadingIcon: null,
|
|
73
78
|
outlined: false,
|
|
79
|
+
raised: false,
|
|
80
|
+
rounded: false,
|
|
81
|
+
severity: null,
|
|
82
|
+
size: null,
|
|
74
83
|
text: false,
|
|
75
|
-
link: false,
|
|
76
|
-
badgeClassName: null,
|
|
77
84
|
tooltip: null,
|
|
78
|
-
size: null,
|
|
79
85
|
tooltipOptions: null,
|
|
80
|
-
|
|
81
|
-
loading: false,
|
|
82
|
-
loadingIcon: null,
|
|
83
|
-
visible: true,
|
|
84
|
-
children: undefined
|
|
85
|
-
},
|
|
86
|
-
getProps: function getProps(props) {
|
|
87
|
-
return ObjectUtils.getMergedProps(props, ButtonBase.defaultProps);
|
|
88
|
-
},
|
|
89
|
-
getOtherProps: function getOtherProps(props) {
|
|
90
|
-
return ObjectUtils.getDiffProps(props, ButtonBase.defaultProps);
|
|
86
|
+
visible: true
|
|
91
87
|
}
|
|
92
|
-
};
|
|
88
|
+
});
|
|
93
89
|
|
|
90
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
91
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
94
92
|
var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
95
93
|
var _classNames2;
|
|
96
94
|
var props = ButtonBase.getProps(inProps);
|
|
95
|
+
var _ButtonBase$setMetaDa = ButtonBase.setMetaData({
|
|
96
|
+
props: props
|
|
97
|
+
}),
|
|
98
|
+
ptm = _ButtonBase$setMetaDa.ptm;
|
|
97
99
|
var elementRef = React.useRef(ref);
|
|
98
100
|
React.useEffect(function () {
|
|
99
101
|
ObjectUtils.combinedRefs(elementRef, ref);
|
|
@@ -102,24 +104,29 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (in
|
|
|
102
104
|
return null;
|
|
103
105
|
}
|
|
104
106
|
var createIcon = function createIcon() {
|
|
105
|
-
var className = classNames('p-button-icon p-c', _defineProperty({
|
|
107
|
+
var className = classNames('p-button-icon p-c', _defineProperty({}, "p-button-icon-".concat(props.iconPos), props.label));
|
|
108
|
+
var iconsProps = mergeProps({
|
|
109
|
+
className: className
|
|
110
|
+
}, ptm('icon'));
|
|
111
|
+
className = classNames(className, {
|
|
106
112
|
'p-button-loading-icon': props.loading
|
|
107
|
-
}
|
|
108
|
-
var
|
|
109
|
-
className: className,
|
|
110
|
-
spin: true
|
|
111
|
-
}) : props.icon;
|
|
112
|
-
return IconUtils.getJSXIcon(icon, {
|
|
113
|
+
});
|
|
114
|
+
var loadingIconProps = mergeProps({
|
|
113
115
|
className: className
|
|
114
|
-
},
|
|
116
|
+
}, ptm('loadingIcon'));
|
|
117
|
+
var icon = props.loading ? props.loadingIcon || /*#__PURE__*/React.createElement(SpinnerIcon, _extends({}, loadingIconProps, {
|
|
118
|
+
spin: true
|
|
119
|
+
})) : props.icon;
|
|
120
|
+
return IconUtils.getJSXIcon(icon, _objectSpread({}, iconsProps), {
|
|
115
121
|
props: props
|
|
116
122
|
});
|
|
117
123
|
};
|
|
118
124
|
var createLabel = function createLabel() {
|
|
119
125
|
if (props.label) {
|
|
120
|
-
|
|
121
|
-
className:
|
|
122
|
-
},
|
|
126
|
+
var labelProps = mergeProps({
|
|
127
|
+
className: 'p-button-label p-c'
|
|
128
|
+
}, ptm('label'));
|
|
129
|
+
return /*#__PURE__*/React.createElement("span", labelProps, props.label);
|
|
123
130
|
}
|
|
124
131
|
return !props.children && !props.label && /*#__PURE__*/React.createElement("span", {
|
|
125
132
|
className: "p-button-label p-c",
|
|
@@ -131,23 +138,23 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (in
|
|
|
131
138
|
var createBadge = function createBadge() {
|
|
132
139
|
if (props.badge) {
|
|
133
140
|
var badgeClassName = classNames('p-badge', props.badgeClassName);
|
|
134
|
-
|
|
141
|
+
var badgeProps = mergeProps({
|
|
135
142
|
className: badgeClassName
|
|
136
|
-
},
|
|
143
|
+
}, ptm('badge'));
|
|
144
|
+
return /*#__PURE__*/React.createElement("span", badgeProps, props.badge);
|
|
137
145
|
}
|
|
138
146
|
return null;
|
|
139
147
|
};
|
|
140
148
|
var disabled = props.disabled || props.loading;
|
|
141
149
|
var showTooltip = !disabled || props.tooltipOptions && props.tooltipOptions.showOnDisabled;
|
|
142
150
|
var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip) && showTooltip;
|
|
143
|
-
var otherProps = ButtonBase.getOtherProps(props);
|
|
144
151
|
var sizeMapping = {
|
|
145
152
|
large: 'lg',
|
|
146
153
|
small: 'sm'
|
|
147
154
|
};
|
|
148
155
|
var size = sizeMapping[props.size];
|
|
149
156
|
var className = classNames('p-button p-component', props.className, (_classNames2 = {
|
|
150
|
-
'p-button-icon-only': (props.icon || props.loading
|
|
157
|
+
'p-button-icon-only': (props.icon || props.loading) && !props.label && !props.children,
|
|
151
158
|
'p-button-vertical': (props.iconPos === 'top' || props.iconPos === 'bottom') && props.label,
|
|
152
159
|
'p-disabled': disabled,
|
|
153
160
|
'p-button-loading': props.loading,
|
|
@@ -157,18 +164,18 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (in
|
|
|
157
164
|
'p-button-text': props.text,
|
|
158
165
|
'p-button-rounded': props.rounded,
|
|
159
166
|
'p-button-loading-label-only': props.loading && !props.icon && props.label
|
|
160
|
-
}, _defineProperty(_classNames2, "p-button-loading-".concat(props.iconPos), props.loading && props.
|
|
167
|
+
}, _defineProperty(_classNames2, "p-button-loading-".concat(props.iconPos), props.loading && props.label), _defineProperty(_classNames2, "p-button-".concat(size), size), _defineProperty(_classNames2, "p-button-".concat(props.severity), props.severity), _classNames2));
|
|
161
168
|
var icon = createIcon();
|
|
162
169
|
var label = createLabel();
|
|
163
170
|
var badge = createBadge();
|
|
164
171
|
var defaultAriaLabel = props.label ? props.label + (props.badge ? ' ' + props.badge : '') : props['aria-label'];
|
|
165
|
-
|
|
172
|
+
var rootProps = mergeProps({
|
|
166
173
|
ref: elementRef,
|
|
167
|
-
|
|
168
|
-
}, otherProps, {
|
|
174
|
+
'aria-label': defaultAriaLabel,
|
|
169
175
|
className: className,
|
|
170
176
|
disabled: disabled
|
|
171
|
-
}
|
|
177
|
+
}, ButtonBase.getOtherProps(props), ptm('root'));
|
|
178
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", rootProps, icon, label, props.children, badge, /*#__PURE__*/React.createElement(Ripple, null)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
172
179
|
target: elementRef,
|
|
173
180
|
content: props.tooltip
|
|
174
181
|
}, props.tooltipOptions)));
|
package/button/button.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{
|
|
1
|
+
import*as t from"react";import{SpinnerIcon as e}from"primereact/icons/spinner";import{Ripple as n}from"primereact/ripple";import{Tooltip as o}from"primereact/tooltip";import{ObjectUtils as r,classNames as l,mergeProps as i,IconUtils as a}from"primereact/utils";import{ComponentBase as c}from"primereact/componentbase";function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},p.apply(this,arguments)}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function s(t,e){if("object"!==u(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!==u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function b(t){var e=s(t,"string");return"symbol"===u(e)?e:String(e)}function m(t,e,n){return(e=b(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d=c.extend({defaultProps:{__TYPE:"Button",badge:null,badgeClassName:null,className:null,children:void 0,disabled:!1,icon:null,iconPos:"left",label:null,link:!1,loading:!1,loadingIcon:null,outlined:!1,raised:!1,rounded:!1,severity:null,size:null,text:!1,tooltip:null,tooltipOptions:null,visible:!0}});function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var y=t.memo(t.forwardRef((function(c,u){var s,b=d.getProps(c),f=d.setMetaData({props:b}).ptm,y=t.useRef(u);if(t.useEffect((function(){r.combinedRefs(y,u)}),[y,u]),!1===b.visible)return null;var v=b.disabled||b.loading,O=!v||b.tooltipOptions&&b.tooltipOptions.showOnDisabled,P=r.isNotEmpty(b.tooltip)&&O,j={large:"lg",small:"sm"}[b.size],h=l("p-button p-component",b.className,(m(s={"p-button-icon-only":(b.icon||b.loading)&&!b.label&&!b.children,"p-button-vertical":("top"===b.iconPos||"bottom"===b.iconPos)&&b.label,"p-disabled":v,"p-button-loading":b.loading,"p-button-outlined":b.outlined,"p-button-raised":b.raised,"p-button-link":b.link,"p-button-text":b.text,"p-button-rounded":b.rounded,"p-button-loading-label-only":b.loading&&!b.icon&&b.label},"p-button-loading-".concat(b.iconPos),b.loading&&b.label),m(s,"p-button-".concat(j),j),m(s,"p-button-".concat(b.severity),b.severity),s)),E=function(){var n=l("p-button-icon p-c",m({},"p-button-icon-".concat(b.iconPos),b.label)),o=i({className:n},f("icon"));n=l(n,{"p-button-loading-icon":b.loading});var r=i({className:n},f("loadingIcon")),c=b.loading?b.loadingIcon||t.createElement(e,p({},r,{spin:!0})):b.icon;return a.getJSXIcon(c,g({},o),{props:b})}(),N=function(){if(b.label){var e=i({className:"p-button-label p-c"},f("label"));return t.createElement("span",e,b.label)}return!b.children&&!b.label&&t.createElement("span",{className:"p-button-label p-c",dangerouslySetInnerHTML:{__html:" "}})}(),w=function(){if(b.badge){var e=l("p-badge",b.badgeClassName),n=i({className:e},f("badge"));return t.createElement("span",n,b.badge)}return null}(),S=i({ref:y,"aria-label":b.label?b.label+(b.badge?" "+b.badge:""):b["aria-label"],className:h,disabled:v},d.getOtherProps(b),f("root"));return t.createElement(t.Fragment,null,t.createElement("button",S,E,N,b.children,w,t.createElement(n,null)),P&&t.createElement(o,p({target:y,content:b.tooltip},b.tooltipOptions)))})));y.displayName="Button";export{y as Button};
|
package/button/button.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.button = (function (exports, React, ripple, tooltip, utils,
|
|
2
|
+
this.primereact.button = (function (exports, React, spinner, ripple, tooltip, utils, componentbase) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -78,40 +78,41 @@ this.primereact.button = (function (exports, React, ripple, tooltip, utils, spin
|
|
|
78
78
|
return obj;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
var ButtonBase = {
|
|
81
|
+
var ButtonBase = componentbase.ComponentBase.extend({
|
|
82
82
|
defaultProps: {
|
|
83
83
|
__TYPE: 'Button',
|
|
84
|
-
|
|
84
|
+
badge: null,
|
|
85
|
+
badgeClassName: null,
|
|
86
|
+
className: null,
|
|
87
|
+
children: undefined,
|
|
88
|
+
disabled: false,
|
|
85
89
|
icon: null,
|
|
86
90
|
iconPos: 'left',
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
label: null,
|
|
92
|
+
link: false,
|
|
93
|
+
loading: false,
|
|
94
|
+
loadingIcon: null,
|
|
91
95
|
outlined: false,
|
|
96
|
+
raised: false,
|
|
97
|
+
rounded: false,
|
|
98
|
+
severity: null,
|
|
99
|
+
size: null,
|
|
92
100
|
text: false,
|
|
93
|
-
link: false,
|
|
94
|
-
badgeClassName: null,
|
|
95
101
|
tooltip: null,
|
|
96
|
-
size: null,
|
|
97
102
|
tooltipOptions: null,
|
|
98
|
-
|
|
99
|
-
loading: false,
|
|
100
|
-
loadingIcon: null,
|
|
101
|
-
visible: true,
|
|
102
|
-
children: undefined
|
|
103
|
-
},
|
|
104
|
-
getProps: function getProps(props) {
|
|
105
|
-
return utils.ObjectUtils.getMergedProps(props, ButtonBase.defaultProps);
|
|
106
|
-
},
|
|
107
|
-
getOtherProps: function getOtherProps(props) {
|
|
108
|
-
return utils.ObjectUtils.getDiffProps(props, ButtonBase.defaultProps);
|
|
103
|
+
visible: true
|
|
109
104
|
}
|
|
110
|
-
};
|
|
105
|
+
});
|
|
111
106
|
|
|
107
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
108
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
112
109
|
var Button = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
113
110
|
var _classNames2;
|
|
114
111
|
var props = ButtonBase.getProps(inProps);
|
|
112
|
+
var _ButtonBase$setMetaDa = ButtonBase.setMetaData({
|
|
113
|
+
props: props
|
|
114
|
+
}),
|
|
115
|
+
ptm = _ButtonBase$setMetaDa.ptm;
|
|
115
116
|
var elementRef = React__namespace.useRef(ref);
|
|
116
117
|
React__namespace.useEffect(function () {
|
|
117
118
|
utils.ObjectUtils.combinedRefs(elementRef, ref);
|
|
@@ -120,24 +121,29 @@ this.primereact.button = (function (exports, React, ripple, tooltip, utils, spin
|
|
|
120
121
|
return null;
|
|
121
122
|
}
|
|
122
123
|
var createIcon = function createIcon() {
|
|
123
|
-
var className = utils.classNames('p-button-icon p-c', _defineProperty({
|
|
124
|
+
var className = utils.classNames('p-button-icon p-c', _defineProperty({}, "p-button-icon-".concat(props.iconPos), props.label));
|
|
125
|
+
var iconsProps = utils.mergeProps({
|
|
126
|
+
className: className
|
|
127
|
+
}, ptm('icon'));
|
|
128
|
+
className = utils.classNames(className, {
|
|
124
129
|
'p-button-loading-icon': props.loading
|
|
125
|
-
}
|
|
126
|
-
var
|
|
127
|
-
className: className,
|
|
128
|
-
spin: true
|
|
129
|
-
}) : props.icon;
|
|
130
|
-
return utils.IconUtils.getJSXIcon(icon, {
|
|
130
|
+
});
|
|
131
|
+
var loadingIconProps = utils.mergeProps({
|
|
131
132
|
className: className
|
|
132
|
-
},
|
|
133
|
+
}, ptm('loadingIcon'));
|
|
134
|
+
var icon = props.loading ? props.loadingIcon || /*#__PURE__*/React__namespace.createElement(spinner.SpinnerIcon, _extends({}, loadingIconProps, {
|
|
135
|
+
spin: true
|
|
136
|
+
})) : props.icon;
|
|
137
|
+
return utils.IconUtils.getJSXIcon(icon, _objectSpread({}, iconsProps), {
|
|
133
138
|
props: props
|
|
134
139
|
});
|
|
135
140
|
};
|
|
136
141
|
var createLabel = function createLabel() {
|
|
137
142
|
if (props.label) {
|
|
138
|
-
|
|
139
|
-
className:
|
|
140
|
-
},
|
|
143
|
+
var labelProps = utils.mergeProps({
|
|
144
|
+
className: 'p-button-label p-c'
|
|
145
|
+
}, ptm('label'));
|
|
146
|
+
return /*#__PURE__*/React__namespace.createElement("span", labelProps, props.label);
|
|
141
147
|
}
|
|
142
148
|
return !props.children && !props.label && /*#__PURE__*/React__namespace.createElement("span", {
|
|
143
149
|
className: "p-button-label p-c",
|
|
@@ -149,23 +155,23 @@ this.primereact.button = (function (exports, React, ripple, tooltip, utils, spin
|
|
|
149
155
|
var createBadge = function createBadge() {
|
|
150
156
|
if (props.badge) {
|
|
151
157
|
var badgeClassName = utils.classNames('p-badge', props.badgeClassName);
|
|
152
|
-
|
|
158
|
+
var badgeProps = utils.mergeProps({
|
|
153
159
|
className: badgeClassName
|
|
154
|
-
},
|
|
160
|
+
}, ptm('badge'));
|
|
161
|
+
return /*#__PURE__*/React__namespace.createElement("span", badgeProps, props.badge);
|
|
155
162
|
}
|
|
156
163
|
return null;
|
|
157
164
|
};
|
|
158
165
|
var disabled = props.disabled || props.loading;
|
|
159
166
|
var showTooltip = !disabled || props.tooltipOptions && props.tooltipOptions.showOnDisabled;
|
|
160
167
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip) && showTooltip;
|
|
161
|
-
var otherProps = ButtonBase.getOtherProps(props);
|
|
162
168
|
var sizeMapping = {
|
|
163
169
|
large: 'lg',
|
|
164
170
|
small: 'sm'
|
|
165
171
|
};
|
|
166
172
|
var size = sizeMapping[props.size];
|
|
167
173
|
var className = utils.classNames('p-button p-component', props.className, (_classNames2 = {
|
|
168
|
-
'p-button-icon-only': (props.icon || props.loading
|
|
174
|
+
'p-button-icon-only': (props.icon || props.loading) && !props.label && !props.children,
|
|
169
175
|
'p-button-vertical': (props.iconPos === 'top' || props.iconPos === 'bottom') && props.label,
|
|
170
176
|
'p-disabled': disabled,
|
|
171
177
|
'p-button-loading': props.loading,
|
|
@@ -175,18 +181,18 @@ this.primereact.button = (function (exports, React, ripple, tooltip, utils, spin
|
|
|
175
181
|
'p-button-text': props.text,
|
|
176
182
|
'p-button-rounded': props.rounded,
|
|
177
183
|
'p-button-loading-label-only': props.loading && !props.icon && props.label
|
|
178
|
-
}, _defineProperty(_classNames2, "p-button-loading-".concat(props.iconPos), props.loading && props.
|
|
184
|
+
}, _defineProperty(_classNames2, "p-button-loading-".concat(props.iconPos), props.loading && props.label), _defineProperty(_classNames2, "p-button-".concat(size), size), _defineProperty(_classNames2, "p-button-".concat(props.severity), props.severity), _classNames2));
|
|
179
185
|
var icon = createIcon();
|
|
180
186
|
var label = createLabel();
|
|
181
187
|
var badge = createBadge();
|
|
182
188
|
var defaultAriaLabel = props.label ? props.label + (props.badge ? ' ' + props.badge : '') : props['aria-label'];
|
|
183
|
-
|
|
189
|
+
var rootProps = utils.mergeProps({
|
|
184
190
|
ref: elementRef,
|
|
185
|
-
|
|
186
|
-
}, otherProps, {
|
|
191
|
+
'aria-label': defaultAriaLabel,
|
|
187
192
|
className: className,
|
|
188
193
|
disabled: disabled
|
|
189
|
-
}
|
|
194
|
+
}, ButtonBase.getOtherProps(props), ptm('root'));
|
|
195
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("button", rootProps, icon, label, props.children, badge, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null)), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
190
196
|
target: elementRef,
|
|
191
197
|
content: props.tooltip
|
|
192
198
|
}, props.tooltipOptions)));
|
|
@@ -199,4 +205,4 @@ this.primereact.button = (function (exports, React, ripple, tooltip, utils, spin
|
|
|
199
205
|
|
|
200
206
|
return exports;
|
|
201
207
|
|
|
202
|
-
})({}, React, primereact.ripple, primereact.tooltip, primereact.utils, primereact.
|
|
208
|
+
})({}, React, primereact.icons.spinner, primereact.ripple, primereact.tooltip, primereact.utils, primereact.componentbase);
|