primereact 7.0.0-rc.2 → 7.2.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/LICENSE.md +1 -1
- package/README.md +35 -10
- package/accordion/accordion.cjs.js +55 -42
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +7 -3
- package/accordion/accordion.esm.js +42 -29
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +55 -43
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +109 -52
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +96 -61
- package/api/api.esm.js +96 -39
- package/api/api.esm.min.js +1 -1
- package/api/api.js +110 -53
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +97 -89
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +11 -4
- package/autocomplete/autocomplete.esm.js +34 -26
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +93 -90
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +21 -20
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +16 -15
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +22 -21
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +14 -14
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +12 -12
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +15 -15
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +14 -14
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +12 -12
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +15 -15
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +38 -27
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +28 -18
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +37 -28
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +27 -27
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +12 -12
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +28 -28
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +44 -55
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +33 -44
- package/button/button.esm.min.js +1 -1
- package/button/button.js +43 -56
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +209 -170
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +7 -2
- package/calendar/calendar.esm.js +84 -45
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +205 -171
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +12 -12
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +11 -11
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +13 -13
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +24 -24
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +12 -12
- package/card/card.esm.min.js +1 -1
- package/card/card.js +25 -25
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +60 -58
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +24 -23
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +59 -59
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +65 -61
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +2 -1
- package/cascadeselect/cascadeselect.esm.js +21 -17
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +62 -62
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +19 -21
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +14 -14
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +18 -18
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +33 -28
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +26 -21
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +33 -29
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +27 -25
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +22 -20
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +28 -26
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +59 -33
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +50 -24
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +59 -34
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +50 -46
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +20 -6
- package/colorpicker/colorpicker.esm.js +22 -18
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +47 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +31 -12
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +28 -2
- package/column/column.esm.js +31 -12
- package/column/column.esm.min.js +1 -1
- package/column/column.js +32 -13
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +28 -12
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +28 -12
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +29 -13
- package/columngroup/columngroup.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +35 -33
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +19 -17
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +35 -34
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +60 -55
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +6 -4
- package/confirmpopup/confirmpopup.esm.js +26 -22
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +57 -55
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +81 -76
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -1
- package/contextmenu/contextmenu.esm.js +48 -44
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +78 -77
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11284 -852
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +62 -32
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +8 -0
- package/csstransition/csstransition.esm.js +61 -32
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +62 -34
- package/csstransition/csstransition.min.js +1 -1
- package/csstransition/package.json +2 -1
- package/datascroller/datascroller.cjs.js +23 -22
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +15 -14
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +23 -23
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +838 -632
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +38 -14
- package/datatable/datatable.esm.js +575 -369
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +835 -633
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +43 -40
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +17 -14
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +42 -41
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +12 -12
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +11 -11
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +13 -13
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +78 -73
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +3 -1
- package/dialog/dialog.esm.js +31 -27
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +75 -74
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +15 -15
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +12 -12
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +16 -16
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +62 -28
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +50 -16
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +62 -29
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +120 -98
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -1
- package/dropdown/dropdown.esm.js +58 -36
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +116 -99
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +58 -56
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +1 -0
- package/editor/editor.esm.js +22 -18
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +57 -53
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +31 -29
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +2 -1
- package/fieldset/fieldset.esm.js +17 -15
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +30 -30
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +79 -69
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -1
- package/fileupload/fileupload.esm.js +40 -30
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +79 -70
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +17 -19
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +12 -12
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +16 -16
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +85 -81
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -1
- package/galleria/galleria.esm.js +21 -18
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +82 -82
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +13 -13
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +12 -12
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +14 -14
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +69 -44
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +6 -5
- package/image/image.esm.js +44 -20
- package/image/image.esm.min.js +1 -1
- package/image/image.js +67 -45
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +19 -19
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +12 -12
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +20 -20
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +24 -23
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +17 -16
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +24 -24
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +90 -63
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +73 -46
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +89 -64
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +28 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +21 -18
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +28 -26
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -23
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +16 -14
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +24 -24
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +23 -22
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +15 -14
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +23 -23
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +9 -6
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +5 -2
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +10 -7
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +18 -18
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +12 -12
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +19 -19
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +52 -50
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +17 -15
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +51 -51
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +47 -46
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +13 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +47 -47
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +69 -62
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +2 -1
- package/mention/mention.esm.js +25 -19
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +64 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +45 -40
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +4 -1
- package/menu/menu.esm.js +19 -15
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +42 -41
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +49 -46
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +15 -13
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +48 -47
- package/menubar/menubar.min.css +1 -1
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +20 -19
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +14 -13
- package/message/message.esm.min.js +1 -1
- package/message/message.js +21 -20
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +30 -28
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -1
- package/messages/messages.esm.js +14 -12
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +29 -29
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +148 -136
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -2
- package/multiselect/multiselect.esm.js +64 -52
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +144 -137
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +27 -26
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +15 -14
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +27 -27
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +46 -45
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +13 -12
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +46 -46
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +37 -37
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +12 -12
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +38 -38
- package/organizationchart/organizationchart.min.css +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +45 -42
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +3 -2
- package/overlaypanel/overlaypanel.esm.js +23 -21
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -43
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.cjs.js +2 -2
- package/overlayservice/overlayservice.cjs.min.js +1 -1
- package/overlayservice/overlayservice.esm.js +1 -1
- package/overlayservice/overlayservice.esm.min.js +1 -1
- package/overlayservice/overlayservice.js +3 -3
- package/overlayservice/overlayservice.min.js +1 -1
- package/package.json +11 -4
- package/paginator/paginator.cjs.js +61 -60
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +15 -14
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +61 -61
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +35 -32
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -3
- package/panel/panel.esm.js +20 -17
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +34 -33
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +53 -52
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -1
- package/panelmenu/panelmenu.esm.js +15 -14
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +53 -53
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +47 -43
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +3 -2
- package/password/password.esm.js +21 -17
- package/password/password.esm.min.js +1 -1
- package/password/password.js +44 -44
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +69 -65
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +25 -21
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +69 -66
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +17 -20
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +15 -18
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +18 -22
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +3793 -2921
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2567 -1694
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3792 -2918
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +20 -20
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +12 -12
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +21 -21
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +16 -16
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +12 -12
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +17 -17
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +23 -22
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +15 -14
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +23 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +23 -22
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +17 -16
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +23 -23
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +216 -140
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +94 -42
- package/resources/themes/arya-green/theme.css +94 -42
- package/resources/themes/arya-orange/theme.css +94 -42
- package/resources/themes/arya-purple/theme.css +94 -42
- package/resources/themes/bootstrap4-dark-blue/theme.css +75 -30
- package/resources/themes/bootstrap4-dark-purple/theme.css +75 -30
- package/resources/themes/bootstrap4-light-blue/theme.css +74 -29
- package/resources/themes/bootstrap4-light-purple/theme.css +74 -29
- package/resources/themes/fluent-light/theme.css +94 -42
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5707 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5707 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5707 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5707 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5707 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5707 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5707 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5707 -0
- package/resources/themes/luna-amber/theme.css +91 -46
- package/resources/themes/luna-blue/theme.css +91 -46
- package/resources/themes/luna-green/theme.css +91 -46
- package/resources/themes/luna-pink/theme.css +91 -46
- package/resources/themes/md-dark-deeppurple/theme.css +265 -53
- package/resources/themes/md-dark-indigo/theme.css +265 -53
- package/resources/themes/md-light-deeppurple/theme.css +265 -53
- package/resources/themes/md-light-indigo/theme.css +265 -53
- package/resources/themes/mdc-dark-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-dark-indigo/theme.css +265 -53
- package/resources/themes/mdc-light-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-light-indigo/theme.css +265 -53
- package/resources/themes/nova/theme.css +91 -46
- package/resources/themes/nova-accent/theme.css +91 -46
- package/resources/themes/nova-alt/theme.css +91 -46
- package/resources/themes/rhea/theme.css +91 -46
- package/resources/themes/saga-blue/theme.css +77 -25
- package/resources/themes/saga-green/theme.css +77 -25
- package/resources/themes/saga-orange/theme.css +77 -25
- package/resources/themes/saga-purple/theme.css +77 -25
- package/resources/themes/tailwind-light/theme.css +101 -49
- package/resources/themes/vela-blue/theme.css +94 -42
- package/resources/themes/vela-green/theme.css +94 -42
- package/resources/themes/vela-orange/theme.css +94 -42
- package/resources/themes/vela-purple/theme.css +94 -42
- package/ripple/ripple.cjs.js +22 -22
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +14 -14
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +23 -23
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +12 -12
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +11 -11
- package/row/row.esm.min.js +1 -1
- package/row/row.js +13 -13
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +30 -30
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +12 -12
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +31 -31
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +30 -25
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +4 -2
- package/scrolltop/scrolltop.esm.js +21 -17
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +28 -26
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +31 -29
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +17 -15
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +30 -30
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +154 -127
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +4 -1
- package/sidebar/sidebar.esm.js +145 -119
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +151 -128
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +14 -14
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +12 -12
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +15 -15
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +49 -44
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -1
- package/slidemenu/slidemenu.esm.js +19 -15
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +46 -45
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +40 -30
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +32 -22
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +41 -31
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +33 -32
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +15 -14
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +33 -33
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +58 -50
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +8 -6
- package/splitbutton/splitbutton.esm.js +28 -20
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +55 -51
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +31 -31
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +14 -14
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +32 -32
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +21 -21
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +12 -12
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +22 -22
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +28 -28
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +12 -12
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +29 -29
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +27 -26
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +13 -12
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +27 -27
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +224 -79
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +12 -1
- package/tabview/tabview.esm.js +194 -49
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +224 -80
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +20 -19
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +16 -15
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +21 -20
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +23 -23
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +12 -12
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +24 -24
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.cjs.js +2 -2
- package/terminalservice/terminalservice.cjs.min.js +1 -1
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +3 -3
- package/terminalservice/terminalservice.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +54 -48
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -1
- package/tieredmenu/tieredmenu.esm.js +20 -15
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +50 -49
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +23 -23
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +12 -12
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +24 -24
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +72 -55
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +5 -1
- package/toast/toast.esm.js +46 -30
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +69 -56
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +27 -22
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +21 -16
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +26 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +18 -18
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +12 -12
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +19 -19
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +78 -49
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +0 -1
- package/tooltip/tooltip.esm.js +49 -21
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +77 -50
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +2 -0
- package/tree/tree.cjs.js +69 -68
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +14 -3
- package/tree/tree.esm.js +19 -18
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +69 -69
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +4 -1
- package/treeselect/treeselect.cjs.js +66 -62
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +11 -3
- package/treeselect/treeselect.esm.js +26 -22
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +63 -63
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1393 -330
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +11 -3
- package/treetable/treetable.esm.js +1303 -240
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1392 -331
- package/treetable/treetable.min.css +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +24 -23
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +15 -14
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +24 -24
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +174 -51
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +18 -0
- package/utils/utils.esm.js +173 -51
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +175 -52
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +79 -53
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +64 -38
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +80 -54
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +45 -8
- package/core/core.cjs.js +0 -2987
- package/core/core.cjs.min.js +0 -1
- package/core/core.esm.js +0 -2963
- package/core/core.esm.min.js +0 -1
- package/core/package.json +0 -5
- package/util.d.ts +0 -1
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[](https://badge.fury.io/js/primereact)
|
|
3
3
|
[](https://discord.gg/gzKFYnpmCY)
|
|
4
4
|
|
|
5
|
-
[](https://www.primefaces.org/primereact)
|
|
6
6
|
|
|
7
7
|
# PrimeReact
|
|
8
8
|
|
|
@@ -13,16 +13,41 @@ PrimeReact is a rich set of open source UI Components for React. See [PrimeReact
|
|
|
13
13
|
PrimeReact is available at npm, if you have an existing application run the following command to download it to your project.
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
npm install primereact
|
|
17
|
-
npm install primeicons
|
|
16
|
+
npm install primereact
|
|
17
|
+
npm install primeicons
|
|
18
|
+
```
|
|
19
|
+
or
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
yarn add primereact
|
|
23
|
+
yarn add primeicons
|
|
18
24
|
```
|
|
19
25
|
|
|
20
26
|
## Import
|
|
21
27
|
|
|
28
|
+
#### Module
|
|
29
|
+
```javascript
|
|
30
|
+
//import { ComponentName } from 'primereact/{componentname}';
|
|
31
|
+
import { Dialog } from 'primereact/dialog';
|
|
32
|
+
import { Accordion, AccordionTab } from 'primereact/accordion';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### CDN
|
|
36
|
+
|
|
22
37
|
```javascript
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
<script src="https://unpkg.com/primereact/core/core.min.js"></script>
|
|
39
|
+
<script src="https://unpkg.com/primereact/accordion/accordion.min.js"></script>
|
|
40
|
+
//<script src="https://unpkg.com/primereact/{componentname}/{componentname}.min.js"></script>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
const { Dialog } = primereact.dialog;
|
|
45
|
+
const { Accordion, AccordionTab } = primereact.accordion;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Import all components and structures
|
|
49
|
+
```javascript
|
|
50
|
+
<script src="https://unpkg.com/primereact/primereact.all.min.js"></script>
|
|
26
51
|
```
|
|
27
52
|
|
|
28
53
|
## Dependencies
|
|
@@ -31,12 +56,12 @@ Majority of PrimeReact components (95%) are native and there are some exceptions
|
|
|
31
56
|
|
|
32
57
|
In addition, components require PrimeIcons for icons and react-transition-group for animations.
|
|
33
58
|
|
|
34
|
-
```
|
|
59
|
+
```javascript
|
|
35
60
|
dependencies: {
|
|
36
61
|
"react": "^17.0.1",
|
|
37
62
|
"react-dom": "^17.0.1",
|
|
38
63
|
"react-transition-group": "^4.4.1",
|
|
39
|
-
"primeicons": "^
|
|
64
|
+
"primeicons": "^5.0.0"
|
|
40
65
|
}
|
|
41
66
|
```
|
|
42
67
|
|
|
@@ -44,7 +69,7 @@ dependencies: {
|
|
|
44
69
|
The css dependencies are as follows, note that you may change the theme with another one of your choice.
|
|
45
70
|
|
|
46
71
|
```
|
|
47
|
-
primereact/resources/themes/
|
|
72
|
+
primereact/resources/themes/lara-light-indigo/theme.css
|
|
48
73
|
primereact/resources/primereact.min.css
|
|
49
74
|
primeicons/primeicons.css
|
|
50
75
|
```
|
|
@@ -52,7 +77,7 @@ primeicons/primeicons.css
|
|
|
52
77
|
If you are using a bundler such as webpack with a css loader you may also import them to your main application component, an example from create-react-app would be.
|
|
53
78
|
|
|
54
79
|
```javascript
|
|
55
|
-
import 'primereact/resources/themes/
|
|
80
|
+
import 'primereact/resources/themes/lara-light-indigo/theme.css';
|
|
56
81
|
import 'primereact/resources/primereact.min.css';
|
|
57
82
|
import 'primeicons/primeicons.css';
|
|
58
83
|
```
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var utils = require('primereact/utils');
|
|
7
|
+
var csstransition = require('primereact/csstransition');
|
|
7
8
|
|
|
8
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
10
|
|
|
@@ -57,6 +58,9 @@ function _defineProperties(target, props) {
|
|
|
57
58
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
58
59
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
59
60
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
61
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
62
|
+
writable: false
|
|
63
|
+
});
|
|
60
64
|
return Constructor;
|
|
61
65
|
}
|
|
62
66
|
|
|
@@ -87,23 +91,20 @@ function _inherits(subClass, superClass) {
|
|
|
87
91
|
configurable: true
|
|
88
92
|
}
|
|
89
93
|
});
|
|
94
|
+
Object.defineProperty(subClass, "prototype", {
|
|
95
|
+
writable: false
|
|
96
|
+
});
|
|
90
97
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
91
98
|
}
|
|
92
99
|
|
|
93
100
|
function _typeof(obj) {
|
|
94
101
|
"@babel/helpers - typeof";
|
|
95
102
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
_typeof = function _typeof(obj) {
|
|
102
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return _typeof(obj);
|
|
103
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
104
|
+
return typeof obj;
|
|
105
|
+
} : function (obj) {
|
|
106
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
107
|
+
}, _typeof(obj);
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
function _assertThisInitialized(self) {
|
|
@@ -146,9 +147,9 @@ function _defineProperty(obj, key, value) {
|
|
|
146
147
|
return obj;
|
|
147
148
|
}
|
|
148
149
|
|
|
149
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
150
|
+
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; }
|
|
150
151
|
|
|
151
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
152
|
+
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; }
|
|
152
153
|
|
|
153
154
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
154
155
|
|
|
@@ -164,12 +165,14 @@ var AccordionTab = /*#__PURE__*/function (_Component) {
|
|
|
164
165
|
return _super.apply(this, arguments);
|
|
165
166
|
}
|
|
166
167
|
|
|
167
|
-
return AccordionTab;
|
|
168
|
+
return _createClass(AccordionTab);
|
|
168
169
|
}(React.Component);
|
|
169
170
|
|
|
170
171
|
_defineProperty(AccordionTab, "defaultProps", {
|
|
171
172
|
header: null,
|
|
172
173
|
disabled: false,
|
|
174
|
+
style: null,
|
|
175
|
+
className: null,
|
|
173
176
|
headerStyle: null,
|
|
174
177
|
headerClassName: null,
|
|
175
178
|
headerTemplate: null,
|
|
@@ -199,11 +202,15 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
199
202
|
}
|
|
200
203
|
|
|
201
204
|
_this.state = state;
|
|
202
|
-
_this.contentWrappers = [];
|
|
203
205
|
return _this;
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
_createClass(Accordion, [{
|
|
209
|
+
key: "shouldTabRender",
|
|
210
|
+
value: function shouldTabRender(tab) {
|
|
211
|
+
return tab && tab.type === AccordionTab;
|
|
212
|
+
}
|
|
213
|
+
}, {
|
|
207
214
|
key: "onTabHeaderClick",
|
|
208
215
|
value: function onTabHeaderClick(event, tab, index) {
|
|
209
216
|
if (!tab.props.disabled) {
|
|
@@ -254,31 +261,32 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
254
261
|
value: function componentDidMount() {
|
|
255
262
|
if (!this.state.id) {
|
|
256
263
|
this.setState({
|
|
257
|
-
id:
|
|
264
|
+
id: utils.UniqueComponentId()
|
|
258
265
|
});
|
|
259
266
|
}
|
|
260
267
|
}
|
|
261
268
|
}, {
|
|
262
269
|
key: "renderTabHeader",
|
|
263
270
|
value: function renderTabHeader(tab, selected, index) {
|
|
264
|
-
var
|
|
265
|
-
_this2 = this;
|
|
271
|
+
var _this2 = this;
|
|
266
272
|
|
|
267
|
-
var
|
|
273
|
+
var style = _objectSpread(_objectSpread({}, tab.props.headerStyle || {}), tab.props.style || {});
|
|
274
|
+
|
|
275
|
+
var className = utils.classNames('p-accordion-header', {
|
|
268
276
|
'p-highlight': selected,
|
|
269
277
|
'p-disabled': tab.props.disabled
|
|
270
|
-
}, tab.props.headerClassName);
|
|
271
|
-
var iconClassName = core.classNames('p-accordion-toggle-icon', (_classNames = {}, _defineProperty(_classNames, "".concat(this.props.expandIcon), !selected), _defineProperty(_classNames, "".concat(this.props.collapseIcon), selected), _classNames));
|
|
278
|
+
}, tab.props.headerClassName, tab.props.className);
|
|
272
279
|
var id = this.state.id + '_header_' + index;
|
|
273
280
|
var ariaControls = this.state.id + '_content_' + index;
|
|
274
281
|
var tabIndex = tab.props.disabled ? -1 : null;
|
|
275
|
-
var header = tab.props.headerTemplate ?
|
|
282
|
+
var header = tab.props.headerTemplate ? utils.ObjectUtils.getJSXElement(tab.props.headerTemplate, tab.props) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
276
283
|
className: "p-accordion-header-text"
|
|
277
284
|
}, tab.props.header);
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
285
|
+
var icon = selected ? this.props.collapseIcon : this.props.expandIcon;
|
|
286
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
287
|
+
className: className,
|
|
288
|
+
style: style
|
|
289
|
+
}, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
282
290
|
href: '#' + ariaControls,
|
|
283
291
|
id: id,
|
|
284
292
|
className: "p-accordion-header-link",
|
|
@@ -289,34 +297,39 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
289
297
|
return _this2.onTabHeaderClick(event, tab, index);
|
|
290
298
|
},
|
|
291
299
|
tabIndex: tabIndex
|
|
292
|
-
},
|
|
293
|
-
className:
|
|
300
|
+
}, utils.IconUtils.getJSXIcon(icon, {
|
|
301
|
+
className: 'p-accordion-toggle-icon'
|
|
302
|
+
}, {
|
|
303
|
+
props: this.props,
|
|
304
|
+
selected: selected
|
|
294
305
|
}), header));
|
|
295
306
|
}
|
|
296
307
|
}, {
|
|
297
308
|
key: "renderTabContent",
|
|
298
309
|
value: function renderTabContent(tab, selected, index) {
|
|
299
|
-
var
|
|
310
|
+
var style = _objectSpread(_objectSpread({}, tab.props.contentStyle || {}), tab.props.style || {});
|
|
311
|
+
|
|
312
|
+
var className = utils.classNames('p-toggleable-content', tab.props.contentClassName, tab.props.className);
|
|
300
313
|
var id = this.state.id + '_content_' + index;
|
|
301
|
-
var toggleableContentRef = /*#__PURE__*/React__default[
|
|
302
|
-
return /*#__PURE__*/React__default[
|
|
314
|
+
var toggleableContentRef = /*#__PURE__*/React__default["default"].createRef();
|
|
315
|
+
return /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, {
|
|
303
316
|
nodeRef: toggleableContentRef,
|
|
304
317
|
classNames: "p-toggleable-content",
|
|
305
318
|
timeout: {
|
|
306
319
|
enter: 1000,
|
|
307
320
|
exit: 450
|
|
308
321
|
},
|
|
309
|
-
in: selected,
|
|
322
|
+
"in": selected,
|
|
310
323
|
unmountOnExit: true,
|
|
311
324
|
options: this.props.transitionOptions
|
|
312
|
-
}, /*#__PURE__*/React__default[
|
|
325
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
313
326
|
ref: toggleableContentRef,
|
|
314
327
|
id: id,
|
|
315
328
|
className: className,
|
|
316
|
-
style:
|
|
329
|
+
style: style,
|
|
317
330
|
role: "region",
|
|
318
331
|
"aria-labelledby": this.state.id + '_header_' + index
|
|
319
|
-
}, /*#__PURE__*/React__default[
|
|
332
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
320
333
|
className: "p-accordion-content"
|
|
321
334
|
}, tab.props.children)));
|
|
322
335
|
}
|
|
@@ -326,10 +339,10 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
326
339
|
var selected = this.isSelected(index);
|
|
327
340
|
var tabHeader = this.renderTabHeader(tab, selected, index);
|
|
328
341
|
var tabContent = this.renderTabContent(tab, selected, index);
|
|
329
|
-
var tabClassName =
|
|
342
|
+
var tabClassName = utils.classNames('p-accordion-tab', {
|
|
330
343
|
'p-accordion-tab-active': selected
|
|
331
344
|
});
|
|
332
|
-
return /*#__PURE__*/React__default[
|
|
345
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
333
346
|
key: tab.props.header,
|
|
334
347
|
className: tabClassName
|
|
335
348
|
}, tabHeader, tabContent);
|
|
@@ -339,8 +352,8 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
339
352
|
value: function renderTabs() {
|
|
340
353
|
var _this3 = this;
|
|
341
354
|
|
|
342
|
-
return React__default[
|
|
343
|
-
if (tab
|
|
355
|
+
return React__default["default"].Children.map(this.props.children, function (tab, index) {
|
|
356
|
+
if (_this3.shouldTabRender(tab)) {
|
|
344
357
|
return _this3.renderTab(tab, index);
|
|
345
358
|
}
|
|
346
359
|
});
|
|
@@ -350,9 +363,9 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
350
363
|
value: function render() {
|
|
351
364
|
var _this4 = this;
|
|
352
365
|
|
|
353
|
-
var className =
|
|
366
|
+
var className = utils.classNames('p-accordion p-component', this.props.className);
|
|
354
367
|
var tabs = this.renderTabs();
|
|
355
|
-
return /*#__PURE__*/React__default[
|
|
368
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
356
369
|
ref: function ref(el) {
|
|
357
370
|
return _this4.container = el;
|
|
358
371
|
},
|
|
@@ -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/utils"),r=require("primereact/csstransition");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e);function a(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 i(e){if(Array.isArray(e))return a(e)}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return a(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)?a(e,t):void 0}}function c(){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 u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(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?g(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(e){var t=S();return function(){var r,n=v(e);if(t){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function S(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var C=function(t){h(n,e.Component);var r=j(n);function n(){return d(this,n),r.apply(this,arguments)}return p(n)}();O(C,"defaultProps",{header:null,disabled:!1,style:null,className:null,headerStyle:null,headerClassName:null,headerTemplate:null,contentStyle:null,contentClassName:null});var w=function(n){h(u,e.Component);var a=j(u);function u(e){var t;d(this,u);var r={id:(t=a.call(this,e)).props.id};return t.props.onTabChange||(r=T(T({},r),{},{activeIndex:e.activeIndex})),t.state=r,t}return p(u,[{key:"shouldTabRender",value:function(e){return e&&e.type===C}},{key:"onTabHeaderClick",value:function(e,t,r){if(!t.props.disabled){var n=this.isSelected(r),o=null;if(this.props.multiple){var a=(this.props.onTabChange?this.props.activeIndex:this.state.activeIndex)||[];o=a=n?a.filter((function(e){return e!==r})):[].concat(i(p=a)||s(p)||l(p)||c(),[r])}else o=n?null:r;var u=n?this.props.onTabClose:this.props.onTabOpen;u&&u({originalEvent:e,index:r}),this.props.onTabChange?this.props.onTabChange({originalEvent:e,index:o}):this.setState({activeIndex:o})}var p;e.preventDefault()}},{key:"isSelected",value:function(e){var t=this.props.onTabChange?this.props.activeIndex:this.state.activeIndex;return this.props.multiple?t&&t.indexOf(e)>=0:t===e}},{key:"componentDidMount",value:function(){this.state.id||this.setState({id:t.UniqueComponentId()})}},{key:"renderTabHeader",value:function(e,r,n){var a=this,i=T(T({},e.props.headerStyle||{}),e.props.style||{}),s=t.classNames("p-accordion-header",{"p-highlight":r,"p-disabled":e.props.disabled},e.props.headerClassName,e.props.className),l=this.state.id+"_header_"+n,c=this.state.id+"_content_"+n,u=e.props.disabled?-1:null,p=e.props.headerTemplate?t.ObjectUtils.getJSXElement(e.props.headerTemplate,e.props):o.default.createElement("span",{className:"p-accordion-header-text"},e.props.header);return o.default.createElement("div",{className:s,style:i},o.default.createElement("a",{href:"#"+c,id:l,className:"p-accordion-header-link","aria-controls":c,role:"tab","aria-expanded":r,onClick:function(t){return a.onTabHeaderClick(t,e,n)},tabIndex:u},t.IconUtils.getJSXIcon(r?this.props.collapseIcon:this.props.expandIcon,{className:"p-accordion-toggle-icon"},{props:this.props,selected:r}),p))}},{key:"renderTabContent",value:function(e,n,a){var i=T(T({},e.props.contentStyle||{}),e.props.style||{}),s=t.classNames("p-toggleable-content",e.props.contentClassName,e.props.className),l=this.state.id+"_content_"+a,c=o.default.createRef();return o.default.createElement(r.CSSTransition,{nodeRef:c,classNames:"p-toggleable-content",timeout:{enter:1e3,exit:450},in:n,unmountOnExit:!0,options:this.props.transitionOptions},o.default.createElement("div",{ref:c,id:l,className:s,style:i,role:"region","aria-labelledby":this.state.id+"_header_"+a},o.default.createElement("div",{className:"p-accordion-content"},e.props.children)))}},{key:"renderTab",value:function(e,r){var n=this.isSelected(r),a=this.renderTabHeader(e,n,r),i=this.renderTabContent(e,n,r),s=t.classNames("p-accordion-tab",{"p-accordion-tab-active":n});return o.default.createElement("div",{key:e.props.header,className:s},a,i)}},{key:"renderTabs",value:function(){var e=this;return o.default.Children.map(this.props.children,(function(t,r){if(e.shouldTabRender(t))return e.renderTab(t,r)}))}},{key:"render",value:function(){var e=this,r=t.classNames("p-accordion p-component",this.props.className),n=this.renderTabs();return o.default.createElement("div",{ref:function(t){return e.container=t},id:this.state.id,className:r,style:this.props.style},n)}}]),u}();O(w,"defaultProps",{id:null,activeIndex:null,className:null,style:null,multiple:!1,expandIcon:"pi pi-chevron-right",collapseIcon:"pi pi-chevron-down",transitionOptions:null,onTabOpen:null,onTabClose:null,onTabChange:null}),exports.Accordion=w,exports.AccordionTab=C;
|
package/accordion/accordion.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { CSSTransitionProps } from '../csstransition';
|
|
3
|
+
import { IconType } from '../utils';
|
|
2
4
|
|
|
3
5
|
type AccordionTabHeaderTemplateType = React.ReactNode | ((props: AccordionTabProps) => React.ReactNode);
|
|
4
6
|
|
|
5
7
|
interface AccordionTabProps {
|
|
6
8
|
header?: React.ReactNode;
|
|
7
9
|
disabled?: boolean;
|
|
10
|
+
style?: object;
|
|
11
|
+
className?: string;
|
|
8
12
|
headerStyle?: object;
|
|
9
13
|
headerClassName?: string;
|
|
10
14
|
headerTemplate?: AccordionTabHeaderTemplateType;
|
|
@@ -27,9 +31,9 @@ export interface AccordionProps {
|
|
|
27
31
|
className?: string;
|
|
28
32
|
style?: object;
|
|
29
33
|
multiple?: boolean;
|
|
30
|
-
expandIcon?:
|
|
31
|
-
collapseIcon?:
|
|
32
|
-
transitionOptions?:
|
|
34
|
+
expandIcon?: IconType<AccordionProps>;
|
|
35
|
+
collapseIcon?: IconType<AccordionProps>;
|
|
36
|
+
transitionOptions?: CSSTransitionProps;
|
|
33
37
|
onTabOpen?(e: AccordionEventParams): void;
|
|
34
38
|
onTabClose?(e: AccordionEventParams): void;
|
|
35
39
|
onTabChange?(e: AccordionEventParams): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { UniqueComponentId, classNames, ObjectUtils,
|
|
2
|
+
import { UniqueComponentId, classNames, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
3
|
+
import { CSSTransition } from 'primereact/csstransition';
|
|
3
4
|
|
|
4
5
|
function _arrayLikeToArray(arr, len) {
|
|
5
6
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -49,6 +50,9 @@ function _defineProperties(target, props) {
|
|
|
49
50
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
50
51
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
51
52
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
53
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
54
|
+
writable: false
|
|
55
|
+
});
|
|
52
56
|
return Constructor;
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -79,23 +83,20 @@ function _inherits(subClass, superClass) {
|
|
|
79
83
|
configurable: true
|
|
80
84
|
}
|
|
81
85
|
});
|
|
86
|
+
Object.defineProperty(subClass, "prototype", {
|
|
87
|
+
writable: false
|
|
88
|
+
});
|
|
82
89
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
function _typeof(obj) {
|
|
86
93
|
"@babel/helpers - typeof";
|
|
87
94
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
_typeof = function _typeof(obj) {
|
|
94
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return _typeof(obj);
|
|
95
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
96
|
+
return typeof obj;
|
|
97
|
+
} : function (obj) {
|
|
98
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
99
|
+
}, _typeof(obj);
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
function _assertThisInitialized(self) {
|
|
@@ -138,9 +139,9 @@ function _defineProperty(obj, key, value) {
|
|
|
138
139
|
return obj;
|
|
139
140
|
}
|
|
140
141
|
|
|
141
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
142
|
+
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; }
|
|
142
143
|
|
|
143
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
144
|
+
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; }
|
|
144
145
|
|
|
145
146
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
146
147
|
|
|
@@ -156,12 +157,14 @@ var AccordionTab = /*#__PURE__*/function (_Component) {
|
|
|
156
157
|
return _super.apply(this, arguments);
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
return AccordionTab;
|
|
160
|
+
return _createClass(AccordionTab);
|
|
160
161
|
}(Component);
|
|
161
162
|
|
|
162
163
|
_defineProperty(AccordionTab, "defaultProps", {
|
|
163
164
|
header: null,
|
|
164
165
|
disabled: false,
|
|
166
|
+
style: null,
|
|
167
|
+
className: null,
|
|
165
168
|
headerStyle: null,
|
|
166
169
|
headerClassName: null,
|
|
167
170
|
headerTemplate: null,
|
|
@@ -191,11 +194,15 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
191
194
|
}
|
|
192
195
|
|
|
193
196
|
_this.state = state;
|
|
194
|
-
_this.contentWrappers = [];
|
|
195
197
|
return _this;
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
_createClass(Accordion, [{
|
|
201
|
+
key: "shouldTabRender",
|
|
202
|
+
value: function shouldTabRender(tab) {
|
|
203
|
+
return tab && tab.type === AccordionTab;
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
199
206
|
key: "onTabHeaderClick",
|
|
200
207
|
value: function onTabHeaderClick(event, tab, index) {
|
|
201
208
|
if (!tab.props.disabled) {
|
|
@@ -253,23 +260,24 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
253
260
|
}, {
|
|
254
261
|
key: "renderTabHeader",
|
|
255
262
|
value: function renderTabHeader(tab, selected, index) {
|
|
256
|
-
var
|
|
257
|
-
_this2 = this;
|
|
263
|
+
var _this2 = this;
|
|
258
264
|
|
|
259
|
-
var
|
|
265
|
+
var style = _objectSpread(_objectSpread({}, tab.props.headerStyle || {}), tab.props.style || {});
|
|
266
|
+
|
|
267
|
+
var className = classNames('p-accordion-header', {
|
|
260
268
|
'p-highlight': selected,
|
|
261
269
|
'p-disabled': tab.props.disabled
|
|
262
|
-
}, tab.props.headerClassName);
|
|
263
|
-
var iconClassName = classNames('p-accordion-toggle-icon', (_classNames = {}, _defineProperty(_classNames, "".concat(this.props.expandIcon), !selected), _defineProperty(_classNames, "".concat(this.props.collapseIcon), selected), _classNames));
|
|
270
|
+
}, tab.props.headerClassName, tab.props.className);
|
|
264
271
|
var id = this.state.id + '_header_' + index;
|
|
265
272
|
var ariaControls = this.state.id + '_content_' + index;
|
|
266
273
|
var tabIndex = tab.props.disabled ? -1 : null;
|
|
267
274
|
var header = tab.props.headerTemplate ? ObjectUtils.getJSXElement(tab.props.headerTemplate, tab.props) : /*#__PURE__*/React.createElement("span", {
|
|
268
275
|
className: "p-accordion-header-text"
|
|
269
276
|
}, tab.props.header);
|
|
277
|
+
var icon = selected ? this.props.collapseIcon : this.props.expandIcon;
|
|
270
278
|
return /*#__PURE__*/React.createElement("div", {
|
|
271
|
-
className:
|
|
272
|
-
style:
|
|
279
|
+
className: className,
|
|
280
|
+
style: style
|
|
273
281
|
}, /*#__PURE__*/React.createElement("a", {
|
|
274
282
|
href: '#' + ariaControls,
|
|
275
283
|
id: id,
|
|
@@ -281,14 +289,19 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
281
289
|
return _this2.onTabHeaderClick(event, tab, index);
|
|
282
290
|
},
|
|
283
291
|
tabIndex: tabIndex
|
|
284
|
-
},
|
|
285
|
-
className:
|
|
292
|
+
}, IconUtils.getJSXIcon(icon, {
|
|
293
|
+
className: 'p-accordion-toggle-icon'
|
|
294
|
+
}, {
|
|
295
|
+
props: this.props,
|
|
296
|
+
selected: selected
|
|
286
297
|
}), header));
|
|
287
298
|
}
|
|
288
299
|
}, {
|
|
289
300
|
key: "renderTabContent",
|
|
290
301
|
value: function renderTabContent(tab, selected, index) {
|
|
291
|
-
var
|
|
302
|
+
var style = _objectSpread(_objectSpread({}, tab.props.contentStyle || {}), tab.props.style || {});
|
|
303
|
+
|
|
304
|
+
var className = classNames('p-toggleable-content', tab.props.contentClassName, tab.props.className);
|
|
292
305
|
var id = this.state.id + '_content_' + index;
|
|
293
306
|
var toggleableContentRef = /*#__PURE__*/React.createRef();
|
|
294
307
|
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
@@ -298,14 +311,14 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
298
311
|
enter: 1000,
|
|
299
312
|
exit: 450
|
|
300
313
|
},
|
|
301
|
-
in: selected,
|
|
314
|
+
"in": selected,
|
|
302
315
|
unmountOnExit: true,
|
|
303
316
|
options: this.props.transitionOptions
|
|
304
317
|
}, /*#__PURE__*/React.createElement("div", {
|
|
305
318
|
ref: toggleableContentRef,
|
|
306
319
|
id: id,
|
|
307
320
|
className: className,
|
|
308
|
-
style:
|
|
321
|
+
style: style,
|
|
309
322
|
role: "region",
|
|
310
323
|
"aria-labelledby": this.state.id + '_header_' + index
|
|
311
324
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -332,7 +345,7 @@ var Accordion = /*#__PURE__*/function (_Component2) {
|
|
|
332
345
|
var _this3 = this;
|
|
333
346
|
|
|
334
347
|
return React.Children.map(this.props.children, function (tab, index) {
|
|
335
|
-
if (tab
|
|
348
|
+
if (_this3.shouldTabRender(tab)) {
|
|
336
349
|
return _this3.renderTab(tab, index);
|
|
337
350
|
}
|
|
338
351
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{Component as t}from"react";import{UniqueComponentId as
|
|
1
|
+
import e,{Component as t}from"react";import{UniqueComponentId as r,classNames as n,ObjectUtils as o,IconUtils as a}from"primereact/utils";import{CSSTransition as i}from"primereact/csstransition";function s(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 l(e){if(Array.isArray(e))return s(e)}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function p(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(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 S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){T(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function w(e){var t=x();return function(){var r,n=g(e);if(t){var o=g(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return O(this,r)}}function x(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var C=function(e){y(n,t);var r=w(n);function n(){return h(this,n),r.apply(this,arguments)}return d(n)}();T(C,"defaultProps",{header:null,disabled:!1,style:null,className:null,headerStyle:null,headerClassName:null,headerTemplate:null,contentStyle:null,contentClassName:null});var E=function(s){y(b,t);var f=w(b);function b(e){var t;h(this,b);var r={id:(t=f.call(this,e)).props.id};return t.props.onTabChange||(r=S(S({},r),{},{activeIndex:e.activeIndex})),t.state=r,t}return d(b,[{key:"shouldTabRender",value:function(e){return e&&e.type===C}},{key:"onTabHeaderClick",value:function(e,t,r){if(!t.props.disabled){var n=this.isSelected(r),o=null;if(this.props.multiple){var a=(this.props.onTabChange?this.props.activeIndex:this.state.activeIndex)||[];o=a=n?a.filter((function(e){return e!==r})):[].concat(l(s=a)||c(s)||p(s)||u(),[r])}else o=n?null:r;var i=n?this.props.onTabClose:this.props.onTabOpen;i&&i({originalEvent:e,index:r}),this.props.onTabChange?this.props.onTabChange({originalEvent:e,index:o}):this.setState({activeIndex:o})}var s;e.preventDefault()}},{key:"isSelected",value:function(e){var t=this.props.onTabChange?this.props.activeIndex:this.state.activeIndex;return this.props.multiple?t&&t.indexOf(e)>=0:t===e}},{key:"componentDidMount",value:function(){this.state.id||this.setState({id:r()})}},{key:"renderTabHeader",value:function(t,r,i){var s=this,l=S(S({},t.props.headerStyle||{}),t.props.style||{}),c=n("p-accordion-header",{"p-highlight":r,"p-disabled":t.props.disabled},t.props.headerClassName,t.props.className),p=this.state.id+"_header_"+i,u=this.state.id+"_content_"+i,f=t.props.disabled?-1:null,d=t.props.headerTemplate?o.getJSXElement(t.props.headerTemplate,t.props):e.createElement("span",{className:"p-accordion-header-text"},t.props.header);return e.createElement("div",{className:c,style:l},e.createElement("a",{href:"#"+u,id:p,className:"p-accordion-header-link","aria-controls":u,role:"tab","aria-expanded":r,onClick:function(e){return s.onTabHeaderClick(e,t,i)},tabIndex:f},a.getJSXIcon(r?this.props.collapseIcon:this.props.expandIcon,{className:"p-accordion-toggle-icon"},{props:this.props,selected:r}),d))}},{key:"renderTabContent",value:function(t,r,o){var a=S(S({},t.props.contentStyle||{}),t.props.style||{}),s=n("p-toggleable-content",t.props.contentClassName,t.props.className),l=this.state.id+"_content_"+o,c=e.createRef();return e.createElement(i,{nodeRef:c,classNames:"p-toggleable-content",timeout:{enter:1e3,exit:450},in:r,unmountOnExit:!0,options:this.props.transitionOptions},e.createElement("div",{ref:c,id:l,className:s,style:a,role:"region","aria-labelledby":this.state.id+"_header_"+o},e.createElement("div",{className:"p-accordion-content"},t.props.children)))}},{key:"renderTab",value:function(t,r){var o=this.isSelected(r),a=this.renderTabHeader(t,o,r),i=this.renderTabContent(t,o,r),s=n("p-accordion-tab",{"p-accordion-tab-active":o});return e.createElement("div",{key:t.props.header,className:s},a,i)}},{key:"renderTabs",value:function(){var t=this;return e.Children.map(this.props.children,(function(e,r){if(t.shouldTabRender(e))return t.renderTab(e,r)}))}},{key:"render",value:function(){var t=this,r=n("p-accordion p-component",this.props.className),o=this.renderTabs();return e.createElement("div",{ref:function(e){return t.container=e},id:this.state.id,className:r,style:this.props.style},o)}}]),b}();T(E,"defaultProps",{id:null,activeIndex:null,className:null,style:null,multiple:!1,expandIcon:"pi pi-chevron-right",collapseIcon:"pi pi-chevron-down",transitionOptions:null,onTabOpen:null,onTabClose:null,onTabChange:null});export{E as Accordion,C as AccordionTab};
|