primereact 9.3.1 → 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 +18 -31
- 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/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/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 +29 -22
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +29 -22
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +26 -19
- 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.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/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/core/core.js +1159 -966
- package/core/core.min.js +13 -11
- package/datatable/datatable.cjs.js +72 -35
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +20 -7
- package/datatable/datatable.esm.js +72 -35
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +65 -28
- package/datatable/datatable.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.esm.js +5 -0
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +5 -0
- 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 +41 -32
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +41 -32
- package/image/image.esm.min.js +1 -1
- package/image/image.js +39 -30
- 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.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 +3 -4
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +3 -4
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +3 -4
- 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 +12 -4
- package/listbox/listbox.min.js +1 -1
- package/mention/mention.cjs.js +3 -4
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +3 -4
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +3 -4
- package/mention/mention.min.js +1 -1
- package/menuitem/menuitem.d.ts +0 -2
- package/messages/messages.cjs.js +15 -12
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +15 -12
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +15 -12
- 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/organizationchart/organizationchart.d.ts +18 -2
- 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/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/primereact.all.cjs.js +2222 -1712
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2222 -1713
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2222 -1712
- 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 +72 -72
- 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/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 +142 -122
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +132 -1
- package/tabview/tabview.esm.js +143 -123
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +143 -124
- 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/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 +13 -10
- 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/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 +10 -3
- 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/web-types.json +13 -1
|
@@ -2,23 +2,40 @@ import * as React from 'react';
|
|
|
2
2
|
import { ariaLabel } from 'primereact/api';
|
|
3
3
|
import { CSSTransition } from 'primereact/csstransition';
|
|
4
4
|
import { useMountEffect } from 'primereact/hooks';
|
|
5
|
-
import { ObjectUtils, UniqueComponentId, classNames, IconUtils } from 'primereact/utils';
|
|
5
|
+
import { ObjectUtils, UniqueComponentId, classNames, mergeProps, IconUtils } from 'primereact/utils';
|
|
6
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
6
7
|
import { ChevronRightIcon } from 'primereact/icons/chevronright';
|
|
7
8
|
import { ChevronDownIcon } from 'primereact/icons/chevrondown';
|
|
8
9
|
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
function _arrayLikeToArray(arr, len) {
|
|
11
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
12
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
13
|
+
return arr2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function _arrayWithoutHoles(arr) {
|
|
17
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function _iterableToArray(iter) {
|
|
21
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
25
|
+
if (!o) return;
|
|
26
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
27
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
28
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
29
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
30
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function _nonIterableSpread() {
|
|
34
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function _toConsumableArray(arr) {
|
|
38
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
22
39
|
}
|
|
23
40
|
|
|
24
41
|
function _typeof(obj) {
|
|
@@ -62,37 +79,6 @@ function _defineProperty(obj, key, value) {
|
|
|
62
79
|
return obj;
|
|
63
80
|
}
|
|
64
81
|
|
|
65
|
-
function _arrayLikeToArray(arr, len) {
|
|
66
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
67
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
68
|
-
return arr2;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function _arrayWithoutHoles(arr) {
|
|
72
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function _iterableToArray(iter) {
|
|
76
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
80
|
-
if (!o) return;
|
|
81
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
82
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
83
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
84
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
85
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function _nonIterableSpread() {
|
|
89
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function _toConsumableArray(arr) {
|
|
93
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
82
|
function _arrayWithHoles(arr) {
|
|
97
83
|
if (Array.isArray(arr)) return arr;
|
|
98
84
|
}
|
|
@@ -133,7 +119,7 @@ function _slicedToArray(arr, i) {
|
|
|
133
119
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
134
120
|
}
|
|
135
121
|
|
|
136
|
-
var AccordionBase = {
|
|
122
|
+
var AccordionBase = ComponentBase.extend({
|
|
137
123
|
defaultProps: {
|
|
138
124
|
__TYPE: 'Accordion',
|
|
139
125
|
id: null,
|
|
@@ -148,15 +134,9 @@ var AccordionBase = {
|
|
|
148
134
|
onTabClose: null,
|
|
149
135
|
onTabChange: null,
|
|
150
136
|
children: undefined
|
|
151
|
-
},
|
|
152
|
-
getProps: function getProps(props) {
|
|
153
|
-
return ObjectUtils.getMergedProps(props, AccordionBase.defaultProps);
|
|
154
|
-
},
|
|
155
|
-
getOtherProps: function getOtherProps(props) {
|
|
156
|
-
return ObjectUtils.getDiffProps(props, AccordionBase.defaultProps);
|
|
157
137
|
}
|
|
158
|
-
};
|
|
159
|
-
var AccordionTabBase = {
|
|
138
|
+
});
|
|
139
|
+
var AccordionTabBase = ComponentBase.extend({
|
|
160
140
|
defaultProps: {
|
|
161
141
|
__TYPE: 'AccordionTab',
|
|
162
142
|
className: null,
|
|
@@ -180,7 +160,7 @@ var AccordionTabBase = {
|
|
|
180
160
|
getCOtherProps: function getCOtherProps(tab) {
|
|
181
161
|
return ObjectUtils.getComponentDiffProps(tab, AccordionTabBase.defaultProps);
|
|
182
162
|
}
|
|
183
|
-
};
|
|
163
|
+
});
|
|
184
164
|
|
|
185
165
|
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; }
|
|
186
166
|
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; }
|
|
@@ -197,6 +177,22 @@ var Accordion = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
197
177
|
setActiveIndexState = _React$useState4[1];
|
|
198
178
|
var elementRef = React.useRef(null);
|
|
199
179
|
var activeIndex = props.onTabChange ? props.activeIndex : activeIndexState;
|
|
180
|
+
var metaData = {
|
|
181
|
+
props: props,
|
|
182
|
+
state: {
|
|
183
|
+
id: idState,
|
|
184
|
+
activeIndex: activeIndexState
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
var _AccordionBase$setMet = AccordionBase.setMetaData(_objectSpread({}, metaData)),
|
|
188
|
+
ptm = _AccordionBase$setMet.ptm,
|
|
189
|
+
ptmo = _AccordionBase$setMet.ptmo;
|
|
190
|
+
var getTabPT = function getTabPT(tab, key) {
|
|
191
|
+
return ptmo(getTabProp(tab, 'pt'), key, {
|
|
192
|
+
props: tab.props,
|
|
193
|
+
parent: metaData
|
|
194
|
+
});
|
|
195
|
+
};
|
|
200
196
|
var getTabProp = function getTabProp(tab, name) {
|
|
201
197
|
return AccordionTabBase.getCProp(tab, name);
|
|
202
198
|
};
|
|
@@ -258,38 +254,38 @@ var Accordion = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
258
254
|
var headerId = idState + '_header_' + index;
|
|
259
255
|
var ariaControls = idState + '_content_' + index;
|
|
260
256
|
var tabIndex = getTabProp(tab, 'disabled') ? -1 : getTabProp(tab, 'tabIndex');
|
|
261
|
-
var
|
|
262
|
-
className:
|
|
263
|
-
},
|
|
257
|
+
var headerTitleProps = mergeProps({
|
|
258
|
+
className: 'p-accordion-header-text'
|
|
259
|
+
}, getTabPT(tab, 'headertitle'));
|
|
260
|
+
var header = getTabProp(tab, 'headerTemplate') ? ObjectUtils.getJSXElement(getTabProp(tab, 'headerTemplate'), AccordionTabBase.getCProps(tab)) : /*#__PURE__*/React.createElement("span", headerTitleProps, getTabProp(tab, 'header'));
|
|
264
261
|
var iconClassName = 'p-accordion-toggle-icon';
|
|
265
|
-
var
|
|
262
|
+
var headerIconProps = mergeProps({
|
|
266
263
|
className: iconClassName
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
})
|
|
270
|
-
var toggleIcon = IconUtils.getJSXIcon(icon, {
|
|
271
|
-
className: iconClassName
|
|
272
|
-
}, {
|
|
264
|
+
}, getTabPT(tab, 'headericon'));
|
|
265
|
+
var icon = selected ? props.collapseIcon || /*#__PURE__*/React.createElement(ChevronDownIcon, headerIconProps) : props.expandIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, headerIconProps);
|
|
266
|
+
var toggleIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, headerIconProps), {
|
|
273
267
|
props: props,
|
|
274
268
|
selected: selected
|
|
275
269
|
});
|
|
276
270
|
var label = selected ? ariaLabel('collapseLabel') : ariaLabel('expandLabel');
|
|
277
|
-
|
|
271
|
+
var headerProps = mergeProps({
|
|
278
272
|
className: className,
|
|
279
273
|
style: style
|
|
280
|
-
},
|
|
281
|
-
|
|
274
|
+
}, getTabPT(tab, 'header'));
|
|
275
|
+
var headerActionProps = mergeProps({
|
|
282
276
|
id: headerId,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
role:
|
|
286
|
-
|
|
277
|
+
href: '#' + ariaControls,
|
|
278
|
+
className: 'p-accordion-header-link',
|
|
279
|
+
role: 'tab',
|
|
280
|
+
tabIndex: tabIndex,
|
|
287
281
|
onClick: function onClick(e) {
|
|
288
282
|
return onTabHeaderClick(e, tab, index);
|
|
289
283
|
},
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
284
|
+
'aria-label': label,
|
|
285
|
+
'aria-controls': ariaControls,
|
|
286
|
+
'aria-expanded': selected
|
|
287
|
+
}, getTabPT(tab, 'headeraction'));
|
|
288
|
+
return /*#__PURE__*/React.createElement("div", headerProps, /*#__PURE__*/React.createElement("a", headerActionProps, toggleIcon, header));
|
|
293
289
|
};
|
|
294
290
|
var createTabContent = function createTabContent(tab, selected, index) {
|
|
295
291
|
var style = _objectSpread(_objectSpread({}, getTabProp(tab, 'style') || {}), getTabProp(tab, 'contentStyle') || {});
|
|
@@ -297,6 +293,17 @@ var Accordion = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
297
293
|
var contentId = idState + '_content_' + index;
|
|
298
294
|
var ariaLabelledby = idState + '_header_' + index;
|
|
299
295
|
var contentRef = /*#__PURE__*/React.createRef();
|
|
296
|
+
var toggleableContentProps = mergeProps({
|
|
297
|
+
id: contentId,
|
|
298
|
+
ref: contentRef,
|
|
299
|
+
className: className,
|
|
300
|
+
style: style,
|
|
301
|
+
role: 'region',
|
|
302
|
+
'aria-labelledby': ariaLabelledby
|
|
303
|
+
}, getTabPT(tab, 'toggleablecontent'));
|
|
304
|
+
var contentProps = mergeProps({
|
|
305
|
+
className: 'p-accordion-content'
|
|
306
|
+
}, getTabPT(tab, 'content'));
|
|
300
307
|
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
301
308
|
nodeRef: contentRef,
|
|
302
309
|
classNames: "p-toggleable-content",
|
|
@@ -307,46 +314,37 @@ var Accordion = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
307
314
|
"in": selected,
|
|
308
315
|
unmountOnExit: true,
|
|
309
316
|
options: props.transitionOptions
|
|
310
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
311
|
-
ref: contentRef,
|
|
312
|
-
id: contentId,
|
|
313
|
-
className: className,
|
|
314
|
-
style: style,
|
|
315
|
-
role: "region",
|
|
316
|
-
"aria-labelledby": ariaLabelledby
|
|
317
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
318
|
-
className: "p-accordion-content"
|
|
319
|
-
}, getTabProp(tab, 'children'))));
|
|
317
|
+
}, /*#__PURE__*/React.createElement("div", toggleableContentProps, /*#__PURE__*/React.createElement("div", contentProps, getTabProp(tab, 'children'))));
|
|
320
318
|
};
|
|
321
319
|
var createTab = function createTab(tab, index) {
|
|
322
320
|
if (ObjectUtils.isValidChild(tab, 'AccordionTab')) {
|
|
323
321
|
var key = idState + '_' + index;
|
|
324
322
|
var selected = isSelected(index);
|
|
325
|
-
var _otherProps = AccordionTabBase.getCOtherProps(tab);
|
|
326
323
|
var tabHeader = createTabHeader(tab, selected, index);
|
|
327
324
|
var tabContent = createTabContent(tab, selected, index);
|
|
328
325
|
var tabClassName = classNames('p-accordion-tab', {
|
|
329
326
|
'p-accordion-tab-active': selected
|
|
330
327
|
});
|
|
331
|
-
|
|
328
|
+
var _rootProps = mergeProps({
|
|
332
329
|
key: key,
|
|
333
330
|
className: tabClassName
|
|
334
|
-
},
|
|
331
|
+
}, AccordionTabBase.getCOtherProps(tab), getTabPT(tab, 'root'));
|
|
332
|
+
return /*#__PURE__*/React.createElement("div", _rootProps, tabHeader, tabContent);
|
|
335
333
|
}
|
|
336
334
|
return null;
|
|
337
335
|
};
|
|
338
336
|
var createTabs = function createTabs() {
|
|
339
337
|
return React.Children.map(props.children, createTab);
|
|
340
338
|
};
|
|
341
|
-
var otherProps = AccordionBase.getOtherProps(props);
|
|
342
339
|
var className = classNames('p-accordion p-component', props.className);
|
|
343
340
|
var tabs = createTabs();
|
|
344
|
-
|
|
341
|
+
var rootProps = mergeProps({
|
|
345
342
|
id: idState,
|
|
346
343
|
ref: elementRef,
|
|
347
344
|
className: className,
|
|
348
345
|
style: props.style
|
|
349
|
-
},
|
|
346
|
+
}, AccordionBase.getOtherProps(props), ptm('root'));
|
|
347
|
+
return /*#__PURE__*/React.createElement("div", rootProps, tabs);
|
|
350
348
|
});
|
|
351
349
|
AccordionTab.displayName = 'AccordionTab';
|
|
352
350
|
Accordion.displayName = 'Accordion';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{ariaLabel as t}from"primereact/api";import{CSSTransition as r}from"primereact/csstransition";import{useMountEffect as n}from"primereact/hooks";import{ObjectUtils as o,UniqueComponentId as a,classNames as l,IconUtils as
|
|
1
|
+
import*as e from"react";import{ariaLabel as t}from"primereact/api";import{CSSTransition as r}from"primereact/csstransition";import{useMountEffect as n}from"primereact/hooks";import{ObjectUtils as o,UniqueComponentId as a,classNames as l,mergeProps as i,IconUtils as c}from"primereact/utils";import{ComponentBase as u}from"primereact/componentbase";import{ChevronRightIcon as s}from"primereact/icons/chevronright";import{ChevronDownIcon as p}from"primereact/icons/chevrondown";function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e){if(Array.isArray(e))return d(e)}function m(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e){return h="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},h(e)}function v(e,t){if("object"!==h(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e){var t=v(e,"string");return"symbol"===h(t)?t:String(t)}function O(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e){if(Array.isArray(e))return e}function S(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return i}}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(e,t){return P(e)||S(e,t)||b(e,t)||C()}var N=u.extend({defaultProps:{__TYPE:"Accordion",id:null,activeIndex:null,className:null,style:null,multiple:!1,expandIcon:null,collapseIcon:null,transitionOptions:null,onTabOpen:null,onTabClose:null,onTabChange:null,children:void 0}}),j=u.extend({defaultProps:{__TYPE:"AccordionTab",className:null,contentClassName:null,contentStyle:null,disabled:!1,header:null,headerClassName:null,headerStyle:null,headerTemplate:null,style:null,tabIndex:0,children:void 0},getCProp:function(e,t){return o.getComponentProp(e,t,j.defaultProps)},getCProps:function(e){return o.getComponentProps(e,j.defaultProps)},getCOtherProps:function(e){return o.getComponentDiffProps(e,j.defaultProps)}});function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var I=function(){},w=e.forwardRef((function(u,d){var h=N.getProps(u),v=E(e.useState(h.id),2),g=v[0],O=v[1],P=E(e.useState(h.activeIndex),2),S=P[0],C=P[1],x=e.useRef(null),I=h.onTabChange?h.activeIndex:S,w={props:h,state:{id:g,activeIndex:S}},A=N.setMetaData(T({},w)),_=A.ptm,D=A.ptmo,k=function(e,t){return D(R(e,"pt"),t,{props:e.props,parent:w})},R=function(e,t){return j.getCProp(e,t)},J=function(e,t,r){if(!R(t,"disabled")){var n=L(r),o=null;if(h.multiple){var a=I||[];o=n?a.filter((function(e){return e!==r})):[].concat(f(i=a)||m(i)||b(i)||y(),[r])}else o=n?null:r;var l=n?h.onTabClose:h.onTabOpen;l&&l({originalEvent:e,index:r}),h.onTabChange?h.onTabChange({originalEvent:e,index:o}):C(o)}var i;e.preventDefault()},L=function(e){return h.multiple?I&&I.some((function(t){return t===e})):I===e};if(e.useImperativeHandle(d,(function(){return{props:h,getElement:function(){return x.current}}})),n((function(){g||O(a())})),!g)return null;var M=function(r,n,a){var u=T(T({},R(r,"style")||{}),R(r,"headerStyle")||{}),d=l("p-accordion-header",{"p-highlight":n,"p-disabled":R(r,"disabled")},R(r,"headerClassName"),R(r,"className")),f=g+"_header_"+a,m=g+"_content_"+a,b=R(r,"disabled")?-1:R(r,"tabIndex"),y=i({className:"p-accordion-header-text"},k(r,"headertitle")),v=R(r,"headerTemplate")?o.getJSXElement(R(r,"headerTemplate"),j.getCProps(r)):e.createElement("span",y,R(r,"header")),O=i({className:"p-accordion-toggle-icon"},k(r,"headericon")),P=c.getJSXIcon(n?h.collapseIcon||e.createElement(p,O):h.expandIcon||e.createElement(s,O),T({},O),{props:h,selected:n}),S=t(n?"collapseLabel":"expandLabel"),C=i({className:d,style:u},k(r,"header")),E=i({id:f,href:"#"+m,className:"p-accordion-header-link",role:"tab",tabIndex:b,onClick:function(e){return J(e,r,a)},"aria-label":S,"aria-controls":m,"aria-expanded":n},k(r,"headeraction"));return e.createElement("div",C,e.createElement("a",E,P,v))},X=function(t,n,o){var a=T(T({},R(t,"style")||{}),R(t,"contentStyle")||{}),c=l("p-toggleable-content",R(t,"contentClassName"),R(t,"className")),u=g+"_content_"+o,s=g+"_header_"+o,p=e.createRef(),d=i({id:u,ref:p,className:c,style:a,role:"region","aria-labelledby":s},k(t,"toggleablecontent")),f=i({className:"p-accordion-content"},k(t,"content"));return e.createElement(r,{nodeRef:p,classNames:"p-toggleable-content",timeout:{enter:1e3,exit:450},in:n,unmountOnExit:!0,options:h.transitionOptions},e.createElement("div",d,e.createElement("div",f,R(t,"children"))))},Y=function(t,r){if(o.isValidChild(t,"AccordionTab")){var n=g+"_"+r,a=L(r),c=M(t,a,r),u=X(t,a,r),s=l("p-accordion-tab",{"p-accordion-tab-active":a}),p=i({key:n,className:s},j.getCOtherProps(t),k(t,"root"));return e.createElement("div",p,c,u)}return null},H=l("p-accordion p-component",h.className),U=e.Children.map(h.children,Y),V=i({id:g,ref:x,className:H,style:h.style},N.getOtherProps(h),_("root"));return e.createElement("div",V,U)}));I.displayName="AccordionTab",w.displayName="Accordion";export{w as Accordion,I as AccordionTab};
|
package/accordion/accordion.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.accordion = (function (exports, React, api, csstransition, hooks, utils, chevronright, chevrondown) {
|
|
2
|
+
this.primereact.accordion = (function (exports, React, api, csstransition, hooks, utils, componentbase, chevronright, chevrondown) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -22,19 +22,35 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
22
22
|
|
|
23
23
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
24
24
|
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
function _arrayLikeToArray(arr, len) {
|
|
26
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
27
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
28
|
+
return arr2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function _arrayWithoutHoles(arr) {
|
|
32
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function _iterableToArray(iter) {
|
|
36
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
40
|
+
if (!o) return;
|
|
41
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
42
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
43
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
44
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
45
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _nonIterableSpread() {
|
|
49
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function _toConsumableArray(arr) {
|
|
53
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
38
54
|
}
|
|
39
55
|
|
|
40
56
|
function _typeof(obj) {
|
|
@@ -78,37 +94,6 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
78
94
|
return obj;
|
|
79
95
|
}
|
|
80
96
|
|
|
81
|
-
function _arrayLikeToArray(arr, len) {
|
|
82
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
83
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
84
|
-
return arr2;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function _arrayWithoutHoles(arr) {
|
|
88
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function _iterableToArray(iter) {
|
|
92
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
96
|
-
if (!o) return;
|
|
97
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
98
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
99
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
100
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
101
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _nonIterableSpread() {
|
|
105
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _toConsumableArray(arr) {
|
|
109
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
97
|
function _arrayWithHoles(arr) {
|
|
113
98
|
if (Array.isArray(arr)) return arr;
|
|
114
99
|
}
|
|
@@ -149,7 +134,7 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
149
134
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
150
135
|
}
|
|
151
136
|
|
|
152
|
-
var AccordionBase = {
|
|
137
|
+
var AccordionBase = componentbase.ComponentBase.extend({
|
|
153
138
|
defaultProps: {
|
|
154
139
|
__TYPE: 'Accordion',
|
|
155
140
|
id: null,
|
|
@@ -164,15 +149,9 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
164
149
|
onTabClose: null,
|
|
165
150
|
onTabChange: null,
|
|
166
151
|
children: undefined
|
|
167
|
-
},
|
|
168
|
-
getProps: function getProps(props) {
|
|
169
|
-
return utils.ObjectUtils.getMergedProps(props, AccordionBase.defaultProps);
|
|
170
|
-
},
|
|
171
|
-
getOtherProps: function getOtherProps(props) {
|
|
172
|
-
return utils.ObjectUtils.getDiffProps(props, AccordionBase.defaultProps);
|
|
173
152
|
}
|
|
174
|
-
};
|
|
175
|
-
var AccordionTabBase = {
|
|
153
|
+
});
|
|
154
|
+
var AccordionTabBase = componentbase.ComponentBase.extend({
|
|
176
155
|
defaultProps: {
|
|
177
156
|
__TYPE: 'AccordionTab',
|
|
178
157
|
className: null,
|
|
@@ -196,7 +175,7 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
196
175
|
getCOtherProps: function getCOtherProps(tab) {
|
|
197
176
|
return utils.ObjectUtils.getComponentDiffProps(tab, AccordionTabBase.defaultProps);
|
|
198
177
|
}
|
|
199
|
-
};
|
|
178
|
+
});
|
|
200
179
|
|
|
201
180
|
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; }
|
|
202
181
|
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; }
|
|
@@ -213,6 +192,22 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
213
192
|
setActiveIndexState = _React$useState4[1];
|
|
214
193
|
var elementRef = React__namespace.useRef(null);
|
|
215
194
|
var activeIndex = props.onTabChange ? props.activeIndex : activeIndexState;
|
|
195
|
+
var metaData = {
|
|
196
|
+
props: props,
|
|
197
|
+
state: {
|
|
198
|
+
id: idState,
|
|
199
|
+
activeIndex: activeIndexState
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
var _AccordionBase$setMet = AccordionBase.setMetaData(_objectSpread({}, metaData)),
|
|
203
|
+
ptm = _AccordionBase$setMet.ptm,
|
|
204
|
+
ptmo = _AccordionBase$setMet.ptmo;
|
|
205
|
+
var getTabPT = function getTabPT(tab, key) {
|
|
206
|
+
return ptmo(getTabProp(tab, 'pt'), key, {
|
|
207
|
+
props: tab.props,
|
|
208
|
+
parent: metaData
|
|
209
|
+
});
|
|
210
|
+
};
|
|
216
211
|
var getTabProp = function getTabProp(tab, name) {
|
|
217
212
|
return AccordionTabBase.getCProp(tab, name);
|
|
218
213
|
};
|
|
@@ -274,38 +269,38 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
274
269
|
var headerId = idState + '_header_' + index;
|
|
275
270
|
var ariaControls = idState + '_content_' + index;
|
|
276
271
|
var tabIndex = getTabProp(tab, 'disabled') ? -1 : getTabProp(tab, 'tabIndex');
|
|
277
|
-
var
|
|
278
|
-
className:
|
|
279
|
-
},
|
|
272
|
+
var headerTitleProps = utils.mergeProps({
|
|
273
|
+
className: 'p-accordion-header-text'
|
|
274
|
+
}, getTabPT(tab, 'headertitle'));
|
|
275
|
+
var header = getTabProp(tab, 'headerTemplate') ? utils.ObjectUtils.getJSXElement(getTabProp(tab, 'headerTemplate'), AccordionTabBase.getCProps(tab)) : /*#__PURE__*/React__namespace.createElement("span", headerTitleProps, getTabProp(tab, 'header'));
|
|
280
276
|
var iconClassName = 'p-accordion-toggle-icon';
|
|
281
|
-
var
|
|
277
|
+
var headerIconProps = utils.mergeProps({
|
|
282
278
|
className: iconClassName
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
})
|
|
286
|
-
var toggleIcon = utils.IconUtils.getJSXIcon(icon, {
|
|
287
|
-
className: iconClassName
|
|
288
|
-
}, {
|
|
279
|
+
}, getTabPT(tab, 'headericon'));
|
|
280
|
+
var icon = selected ? props.collapseIcon || /*#__PURE__*/React__namespace.createElement(chevrondown.ChevronDownIcon, headerIconProps) : props.expandIcon || /*#__PURE__*/React__namespace.createElement(chevronright.ChevronRightIcon, headerIconProps);
|
|
281
|
+
var toggleIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, headerIconProps), {
|
|
289
282
|
props: props,
|
|
290
283
|
selected: selected
|
|
291
284
|
});
|
|
292
285
|
var label = selected ? api.ariaLabel('collapseLabel') : api.ariaLabel('expandLabel');
|
|
293
|
-
|
|
286
|
+
var headerProps = utils.mergeProps({
|
|
294
287
|
className: className,
|
|
295
288
|
style: style
|
|
296
|
-
},
|
|
297
|
-
|
|
289
|
+
}, getTabPT(tab, 'header'));
|
|
290
|
+
var headerActionProps = utils.mergeProps({
|
|
298
291
|
id: headerId,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
role:
|
|
302
|
-
|
|
292
|
+
href: '#' + ariaControls,
|
|
293
|
+
className: 'p-accordion-header-link',
|
|
294
|
+
role: 'tab',
|
|
295
|
+
tabIndex: tabIndex,
|
|
303
296
|
onClick: function onClick(e) {
|
|
304
297
|
return onTabHeaderClick(e, tab, index);
|
|
305
298
|
},
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
299
|
+
'aria-label': label,
|
|
300
|
+
'aria-controls': ariaControls,
|
|
301
|
+
'aria-expanded': selected
|
|
302
|
+
}, getTabPT(tab, 'headeraction'));
|
|
303
|
+
return /*#__PURE__*/React__namespace.createElement("div", headerProps, /*#__PURE__*/React__namespace.createElement("a", headerActionProps, toggleIcon, header));
|
|
309
304
|
};
|
|
310
305
|
var createTabContent = function createTabContent(tab, selected, index) {
|
|
311
306
|
var style = _objectSpread(_objectSpread({}, getTabProp(tab, 'style') || {}), getTabProp(tab, 'contentStyle') || {});
|
|
@@ -313,6 +308,17 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
313
308
|
var contentId = idState + '_content_' + index;
|
|
314
309
|
var ariaLabelledby = idState + '_header_' + index;
|
|
315
310
|
var contentRef = /*#__PURE__*/React__namespace.createRef();
|
|
311
|
+
var toggleableContentProps = utils.mergeProps({
|
|
312
|
+
id: contentId,
|
|
313
|
+
ref: contentRef,
|
|
314
|
+
className: className,
|
|
315
|
+
style: style,
|
|
316
|
+
role: 'region',
|
|
317
|
+
'aria-labelledby': ariaLabelledby
|
|
318
|
+
}, getTabPT(tab, 'toggleablecontent'));
|
|
319
|
+
var contentProps = utils.mergeProps({
|
|
320
|
+
className: 'p-accordion-content'
|
|
321
|
+
}, getTabPT(tab, 'content'));
|
|
316
322
|
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
317
323
|
nodeRef: contentRef,
|
|
318
324
|
classNames: "p-toggleable-content",
|
|
@@ -323,46 +329,37 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
323
329
|
"in": selected,
|
|
324
330
|
unmountOnExit: true,
|
|
325
331
|
options: props.transitionOptions
|
|
326
|
-
}, /*#__PURE__*/React__namespace.createElement("div",
|
|
327
|
-
ref: contentRef,
|
|
328
|
-
id: contentId,
|
|
329
|
-
className: className,
|
|
330
|
-
style: style,
|
|
331
|
-
role: "region",
|
|
332
|
-
"aria-labelledby": ariaLabelledby
|
|
333
|
-
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
334
|
-
className: "p-accordion-content"
|
|
335
|
-
}, getTabProp(tab, 'children'))));
|
|
332
|
+
}, /*#__PURE__*/React__namespace.createElement("div", toggleableContentProps, /*#__PURE__*/React__namespace.createElement("div", contentProps, getTabProp(tab, 'children'))));
|
|
336
333
|
};
|
|
337
334
|
var createTab = function createTab(tab, index) {
|
|
338
335
|
if (utils.ObjectUtils.isValidChild(tab, 'AccordionTab')) {
|
|
339
336
|
var key = idState + '_' + index;
|
|
340
337
|
var selected = isSelected(index);
|
|
341
|
-
var _otherProps = AccordionTabBase.getCOtherProps(tab);
|
|
342
338
|
var tabHeader = createTabHeader(tab, selected, index);
|
|
343
339
|
var tabContent = createTabContent(tab, selected, index);
|
|
344
340
|
var tabClassName = utils.classNames('p-accordion-tab', {
|
|
345
341
|
'p-accordion-tab-active': selected
|
|
346
342
|
});
|
|
347
|
-
|
|
343
|
+
var _rootProps = utils.mergeProps({
|
|
348
344
|
key: key,
|
|
349
345
|
className: tabClassName
|
|
350
|
-
},
|
|
346
|
+
}, AccordionTabBase.getCOtherProps(tab), getTabPT(tab, 'root'));
|
|
347
|
+
return /*#__PURE__*/React__namespace.createElement("div", _rootProps, tabHeader, tabContent);
|
|
351
348
|
}
|
|
352
349
|
return null;
|
|
353
350
|
};
|
|
354
351
|
var createTabs = function createTabs() {
|
|
355
352
|
return React__namespace.Children.map(props.children, createTab);
|
|
356
353
|
};
|
|
357
|
-
var otherProps = AccordionBase.getOtherProps(props);
|
|
358
354
|
var className = utils.classNames('p-accordion p-component', props.className);
|
|
359
355
|
var tabs = createTabs();
|
|
360
|
-
|
|
356
|
+
var rootProps = utils.mergeProps({
|
|
361
357
|
id: idState,
|
|
362
358
|
ref: elementRef,
|
|
363
359
|
className: className,
|
|
364
360
|
style: props.style
|
|
365
|
-
},
|
|
361
|
+
}, AccordionBase.getOtherProps(props), ptm('root'));
|
|
362
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, tabs);
|
|
366
363
|
});
|
|
367
364
|
AccordionTab.displayName = 'AccordionTab';
|
|
368
365
|
Accordion.displayName = 'Accordion';
|
|
@@ -374,4 +371,4 @@ this.primereact.accordion = (function (exports, React, api, csstransition, hooks
|
|
|
374
371
|
|
|
375
372
|
return exports;
|
|
376
373
|
|
|
377
|
-
})({}, React, primereact.api, primereact.csstransition, primereact.hooks, primereact.utils, primereact.icons.chevronright, primereact.icons.chevrondown);
|
|
374
|
+
})({}, React, primereact.api, primereact.csstransition, primereact.hooks, primereact.utils, primereact.componentbase, primereact.icons.chevronright, primereact.icons.chevrondown);
|