primereact 9.4.0 → 9.5.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/api/api.cjs.js +1 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +7 -6
- package/api/api.esm.js +1 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +1 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +24 -6
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +4 -0
- package/autocomplete/autocomplete.esm.js +24 -6
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +24 -6
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +87 -49
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +88 -50
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +88 -51
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/calendar.cjs.js +8 -1
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -2
- package/calendar/calendar.esm.js +8 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +8 -1
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +135 -82
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +113 -1
- package/carousel/carousel.esm.js +136 -83
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +136 -84
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +27 -23
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +5 -0
- package/cascadeselect/cascadeselect.esm.js +27 -23
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +28 -24
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +28 -43
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +30 -0
- package/chart/chart.esm.js +15 -30
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +140 -156
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +21 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +5 -0
- package/checkbox/checkbox.esm.js +22 -16
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +21 -15
- package/checkbox/checkbox.min.js +1 -1
- package/chips/chips.cjs.js +24 -17
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +5 -0
- package/chips/chips.esm.js +24 -17
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +25 -19
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +4 -0
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +5 -0
- package/colorpicker/colorpicker.esm.js +4 -0
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +4 -0
- package/colorpicker/colorpicker.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +2 -2
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +2 -2
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +2 -2
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +111 -61
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +112 -62
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +112 -63
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +12873 -1829
- package/core/core.min.js +34 -34
- package/datatable/datatable.cjs.js +181 -175
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +181 -175
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +181 -175
- package/datatable/datatable.min.js +1 -1
- package/dock/dock.cjs.js +82 -45
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +83 -46
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +83 -47
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +2 -2
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +2 -2
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +3 -3
- package/dropdown/dropdown.min.js +1 -1
- package/fileupload/fileupload.cjs.js +168 -137
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +150 -1
- package/fileupload/fileupload.esm.js +169 -138
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +168 -137
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +131 -118
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +132 -119
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +130 -118
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +5 -1
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +2 -1
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +6 -3
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +410 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +410 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +410 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +410 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +410 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +410 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +410 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +410 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +410 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +410 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +410 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +410 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +410 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +410 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +410 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +410 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +410 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +410 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +410 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +410 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +410 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +410 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +410 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +410 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +410 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +410 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +410 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +410 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +410 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +410 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +410 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +410 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +410 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +410 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +410 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +410 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +410 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +410 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +410 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +410 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +410 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +410 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +410 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +410 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +410 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +410 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +410 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +410 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +410 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +410 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +410 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +410 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +410 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +410 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +410 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +410 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +410 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +410 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +410 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +410 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +410 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +410 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +410 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +410 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +410 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +410 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +410 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +410 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +410 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +410 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +410 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +410 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +410 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +410 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +410 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +410 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +410 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +410 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +410 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +410 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +410 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +410 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +410 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +410 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +472 -78
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +474 -80
- package/image/image.esm.min.js +1 -1
- package/image/image.js +473 -80
- package/image/image.min.js +1 -1
- package/inputmask/inputmask.cjs.js +18 -16
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +18 -16
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +18 -16
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +0 -2
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +0 -2
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +0 -2
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +7 -0
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +5 -0
- package/inputswitch/inputswitch.esm.js +7 -0
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +8 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/megamenu/megamenu.cjs.js +147 -96
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +147 -96
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +145 -95
- package/megamenu/megamenu.min.js +1 -1
- package/menu/menu.cjs.js +94 -55
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +95 -56
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +95 -57
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +118 -110
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +119 -111
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +119 -112
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +66 -46
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +67 -47
- package/message/message.esm.min.js +1 -1
- package/message/message.js +67 -48
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +63 -62
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +63 -62
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +63 -63
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +32 -29
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -0
- package/multiselect/multiselect.esm.js +33 -30
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +32 -29
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +15 -11
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +5 -0
- package/multistatecheckbox/multistatecheckbox.esm.js +15 -11
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +15 -11
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +3 -3
- package/panelmenu/panelmenu.cjs.js +145 -83
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +145 -83
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +144 -83
- package/panelmenu/panelmenu.min.js +1 -1
- package/primereact.all.cjs.js +2250 -1578
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2250 -1578
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2250 -1578
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +16 -9
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +5 -0
- package/radiobutton/radiobutton.esm.js +16 -9
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +17 -11
- package/radiobutton/radiobutton.min.js +1 -1
- package/resources/primereact.css +275 -267
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +13 -7
- package/resources/themes/arya-green/theme.css +13 -7
- package/resources/themes/arya-orange/theme.css +13 -7
- package/resources/themes/arya-purple/theme.css +13 -7
- package/resources/themes/bootstrap4-dark-blue/theme.css +13 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +13 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +13 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +13 -7
- package/resources/themes/fluent-light/theme.css +13 -7
- package/resources/themes/lara-dark-blue/theme.css +13 -7
- package/resources/themes/lara-dark-indigo/theme.css +13 -7
- package/resources/themes/lara-dark-purple/theme.css +13 -7
- package/resources/themes/lara-dark-teal/theme.css +13 -7
- package/resources/themes/lara-light-blue/theme.css +13 -7
- package/resources/themes/lara-light-indigo/theme.css +13 -7
- package/resources/themes/lara-light-purple/theme.css +13 -7
- package/resources/themes/lara-light-teal/theme.css +13 -7
- package/resources/themes/luna-amber/theme.css +13 -7
- package/resources/themes/luna-blue/theme.css +13 -7
- package/resources/themes/luna-green/theme.css +13 -7
- package/resources/themes/luna-pink/theme.css +13 -7
- package/resources/themes/md-dark-deeppurple/theme.css +13 -7
- package/resources/themes/md-dark-indigo/theme.css +13 -7
- package/resources/themes/md-light-deeppurple/theme.css +13 -7
- package/resources/themes/md-light-indigo/theme.css +13 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +13 -7
- package/resources/themes/mdc-dark-indigo/theme.css +13 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +13 -7
- package/resources/themes/mdc-light-indigo/theme.css +13 -7
- package/resources/themes/mira/theme.css +13 -7
- package/resources/themes/nano/theme.css +13 -7
- package/resources/themes/nova/theme.css +13 -7
- package/resources/themes/nova-accent/theme.css +13 -7
- package/resources/themes/nova-alt/theme.css +13 -7
- package/resources/themes/rhea/theme.css +13 -7
- package/resources/themes/saga-blue/theme.css +13 -7
- package/resources/themes/saga-green/theme.css +13 -7
- package/resources/themes/saga-orange/theme.css +13 -7
- package/resources/themes/saga-purple/theme.css +13 -7
- package/resources/themes/soho-dark/theme.css +13 -7
- package/resources/themes/soho-light/theme.css +13 -7
- package/resources/themes/tailwind-light/theme.css +13 -7
- package/resources/themes/vela-blue/theme.css +13 -7
- package/resources/themes/vela-green/theme.css +13 -7
- package/resources/themes/vela-orange/theme.css +13 -7
- package/resources/themes/vela-purple/theme.css +13 -7
- package/resources/themes/viva-dark/theme.css +13 -7
- package/resources/themes/viva-light/theme.css +13 -7
- package/slidemenu/slidemenu.cjs.js +121 -111
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +98 -1
- package/slidemenu/slidemenu.esm.js +122 -112
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +122 -113
- package/slidemenu/slidemenu.min.js +1 -1
- package/steps/steps.cjs.js +78 -45
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +79 -46
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +79 -47
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +83 -47
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +84 -48
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +84 -49
- package/tabmenu/tabmenu.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +104 -59
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +105 -60
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +105 -61
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +72 -71
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +120 -2
- package/toast/toast.esm.js +73 -72
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +70 -70
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +6 -0
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +6 -0
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +7 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/treeselect/treeselect.cjs.js +3 -0
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +5 -0
- package/treeselect/treeselect.esm.js +3 -0
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +3 -0
- package/treeselect/treeselect.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +14 -7
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +5 -0
- package/tristatecheckbox/tristatecheckbox.esm.js +14 -7
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +15 -9
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +25 -4
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +22 -4
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +26 -6
- package/utils/utils.min.js +1 -1
- package/web-types.json +1 -1
package/menubar/menubar.cjs.js
CHANGED
|
@@ -6,6 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var PrimeReact = require('primereact/api');
|
|
7
7
|
var hooks = require('primereact/hooks');
|
|
8
8
|
var utils = require('primereact/utils');
|
|
9
|
+
var componentbase = require('primereact/componentbase');
|
|
9
10
|
var ripple = require('primereact/ripple');
|
|
10
11
|
var angleright = require('primereact/icons/angleright');
|
|
11
12
|
var angledown = require('primereact/icons/angledown');
|
|
@@ -34,19 +35,45 @@ function _interopNamespace(e) {
|
|
|
34
35
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
35
36
|
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
36
37
|
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
function _typeof(obj) {
|
|
39
|
+
"@babel/helpers - typeof";
|
|
40
|
+
|
|
41
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
42
|
+
return typeof obj;
|
|
43
|
+
} : function (obj) {
|
|
44
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
45
|
+
}, _typeof(obj);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _toPrimitive(input, hint) {
|
|
49
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
50
|
+
var prim = input[Symbol.toPrimitive];
|
|
51
|
+
if (prim !== undefined) {
|
|
52
|
+
var res = prim.call(input, hint || "default");
|
|
53
|
+
if (_typeof(res) !== "object") return res;
|
|
54
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
55
|
+
}
|
|
56
|
+
return (hint === "string" ? String : Number)(input);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function _toPropertyKey(arg) {
|
|
60
|
+
var key = _toPrimitive(arg, "string");
|
|
61
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _defineProperty(obj, key, value) {
|
|
65
|
+
key = _toPropertyKey(key);
|
|
66
|
+
if (key in obj) {
|
|
67
|
+
Object.defineProperty(obj, key, {
|
|
68
|
+
value: value,
|
|
69
|
+
enumerable: true,
|
|
70
|
+
configurable: true,
|
|
71
|
+
writable: true
|
|
72
|
+
});
|
|
73
|
+
} else {
|
|
74
|
+
obj[key] = value;
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
50
77
|
}
|
|
51
78
|
|
|
52
79
|
function _arrayWithHoles(arr) {
|
|
@@ -104,7 +131,7 @@ function _slicedToArray(arr, i) {
|
|
|
104
131
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
105
132
|
}
|
|
106
133
|
|
|
107
|
-
var MenubarBase = {
|
|
134
|
+
var MenubarBase = componentbase.ComponentBase.extend({
|
|
108
135
|
defaultProps: {
|
|
109
136
|
__TYPE: 'Menubar',
|
|
110
137
|
id: null,
|
|
@@ -116,63 +143,23 @@ var MenubarBase = {
|
|
|
116
143
|
menuIcon: null,
|
|
117
144
|
end: null,
|
|
118
145
|
children: undefined
|
|
119
|
-
},
|
|
120
|
-
getProps: function getProps(props) {
|
|
121
|
-
return utils.ObjectUtils.getMergedProps(props, MenubarBase.defaultProps);
|
|
122
|
-
},
|
|
123
|
-
getOtherProps: function getOtherProps(props) {
|
|
124
|
-
return utils.ObjectUtils.getDiffProps(props, MenubarBase.defaultProps);
|
|
125
146
|
}
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
function _typeof(obj) {
|
|
129
|
-
"@babel/helpers - typeof";
|
|
130
|
-
|
|
131
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
132
|
-
return typeof obj;
|
|
133
|
-
} : function (obj) {
|
|
134
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
135
|
-
}, _typeof(obj);
|
|
136
|
-
}
|
|
147
|
+
});
|
|
137
148
|
|
|
138
|
-
function
|
|
139
|
-
|
|
140
|
-
var prim = input[Symbol.toPrimitive];
|
|
141
|
-
if (prim !== undefined) {
|
|
142
|
-
var res = prim.call(input, hint || "default");
|
|
143
|
-
if (_typeof(res) !== "object") return res;
|
|
144
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
145
|
-
}
|
|
146
|
-
return (hint === "string" ? String : Number)(input);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function _toPropertyKey(arg) {
|
|
150
|
-
var key = _toPrimitive(arg, "string");
|
|
151
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function _defineProperty(obj, key, value) {
|
|
155
|
-
key = _toPropertyKey(key);
|
|
156
|
-
if (key in obj) {
|
|
157
|
-
Object.defineProperty(obj, key, {
|
|
158
|
-
value: value,
|
|
159
|
-
enumerable: true,
|
|
160
|
-
configurable: true,
|
|
161
|
-
writable: true
|
|
162
|
-
});
|
|
163
|
-
} else {
|
|
164
|
-
obj[key] = value;
|
|
165
|
-
}
|
|
166
|
-
return obj;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
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; }
|
|
170
|
-
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; }
|
|
149
|
+
function ownKeys$1(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
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
171
151
|
var MenubarSub = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
172
152
|
var _React$useState = React__namespace.useState(null),
|
|
173
153
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
174
154
|
activeItemState = _React$useState2[0],
|
|
175
155
|
setActiveItemState = _React$useState2[1];
|
|
156
|
+
var getPTOptions = function getPTOptions(item, key) {
|
|
157
|
+
return props.ptm(key, {
|
|
158
|
+
context: {
|
|
159
|
+
active: activeItemState === item
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
};
|
|
176
163
|
var _useEventListener = hooks.useEventListener({
|
|
177
164
|
type: 'click',
|
|
178
165
|
listener: function listener(event) {
|
|
@@ -297,11 +284,12 @@ var MenubarSub = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
|
|
|
297
284
|
}, [props.parentActive]);
|
|
298
285
|
var createSeparator = function createSeparator(index) {
|
|
299
286
|
var key = 'separator_' + index;
|
|
300
|
-
|
|
287
|
+
var separatorProps = utils.mergeProps({
|
|
301
288
|
key: key,
|
|
302
|
-
className:
|
|
303
|
-
role:
|
|
304
|
-
});
|
|
289
|
+
className: 'p-menu-separator',
|
|
290
|
+
role: 'separator'
|
|
291
|
+
}, props.ptm('separator'));
|
|
292
|
+
return /*#__PURE__*/React__namespace.createElement("li", separatorProps);
|
|
305
293
|
};
|
|
306
294
|
var createSubmenu = function createSubmenu(item) {
|
|
307
295
|
if (item.items) {
|
|
@@ -312,7 +300,8 @@ var MenubarSub = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
|
|
|
312
300
|
onLeafClick: onLeafClick,
|
|
313
301
|
onKeyDown: onChildItemKeyDown,
|
|
314
302
|
parentActive: item === activeItemState,
|
|
315
|
-
submenuIcon: props.submenuIcon
|
|
303
|
+
submenuIcon: props.submenuIcon,
|
|
304
|
+
ptm: props.ptm
|
|
316
305
|
});
|
|
317
306
|
}
|
|
318
307
|
return null;
|
|
@@ -329,40 +318,40 @@ var MenubarSub = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
|
|
|
329
318
|
'p-disabled': item.disabled
|
|
330
319
|
});
|
|
331
320
|
var iconClassName = utils.classNames('p-menuitem-icon', item.icon);
|
|
332
|
-
var
|
|
321
|
+
var iconProps = utils.mergeProps({
|
|
333
322
|
className: 'p-menuitem-icon'
|
|
334
|
-
},
|
|
323
|
+
}, getPTOptions(item, 'icon'));
|
|
324
|
+
var icon = utils.IconUtils.getJSXIcon(item.icon, _objectSpread$1({}, iconProps), {
|
|
335
325
|
props: props.menuProps
|
|
336
326
|
});
|
|
337
|
-
var
|
|
338
|
-
className:
|
|
339
|
-
}, item
|
|
327
|
+
var labelProps = utils.mergeProps({
|
|
328
|
+
className: 'p-menuitem-text'
|
|
329
|
+
}, getPTOptions(item, 'label'));
|
|
330
|
+
var label = item.label && /*#__PURE__*/React__namespace.createElement("span", labelProps, item.label);
|
|
340
331
|
var submenuIconClassName = 'p-submenu-icon';
|
|
341
|
-
var
|
|
342
|
-
className: submenuIconClassName
|
|
343
|
-
}) : props.submenuIcon || /*#__PURE__*/React__namespace.createElement(angledown.AngleDownIcon, {
|
|
344
|
-
className: submenuIconClassName
|
|
345
|
-
}), {
|
|
332
|
+
var submenuIconProps = utils.mergeProps({
|
|
346
333
|
className: submenuIconClassName
|
|
347
|
-
},
|
|
348
|
-
|
|
334
|
+
}, getPTOptions(item, 'submenuIcon'));
|
|
335
|
+
var submenuIcon = item.items && utils.IconUtils.getJSXIcon(!props.root ? props.submenuIcon || /*#__PURE__*/React__namespace.createElement(angleright.AngleRightIcon, submenuIconProps) : props.submenuIcon || /*#__PURE__*/React__namespace.createElement(angledown.AngleDownIcon, submenuIconProps), _objectSpread$1({}, submenuIconProps), {
|
|
336
|
+
props: _objectSpread$1({
|
|
349
337
|
menuProps: props.menuProps
|
|
350
338
|
}, props)
|
|
351
339
|
});
|
|
352
340
|
var submenu = createSubmenu(item);
|
|
353
|
-
var
|
|
341
|
+
var actionProps = utils.mergeProps({
|
|
354
342
|
href: item.url || '#',
|
|
355
|
-
role:
|
|
343
|
+
role: 'menuitem',
|
|
356
344
|
className: linkClassName,
|
|
357
345
|
target: item.target,
|
|
358
|
-
|
|
346
|
+
'aria-haspopup': item.items != null,
|
|
359
347
|
onClick: function onClick(event) {
|
|
360
348
|
return onItemClick(event, item);
|
|
361
349
|
},
|
|
362
350
|
onKeyDown: function onKeyDown(event) {
|
|
363
351
|
return onItemKeyDown(event, item);
|
|
364
352
|
}
|
|
365
|
-
},
|
|
353
|
+
}, getPTOptions(item, 'action'));
|
|
354
|
+
var content = /*#__PURE__*/React__namespace.createElement("a", actionProps, icon, label, submenuIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
366
355
|
if (item.template) {
|
|
367
356
|
var defaultContentOptions = {
|
|
368
357
|
onClick: function onClick(event) {
|
|
@@ -380,16 +369,17 @@ var MenubarSub = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
|
|
|
380
369
|
};
|
|
381
370
|
content = utils.ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);
|
|
382
371
|
}
|
|
383
|
-
|
|
372
|
+
var menuitemProps = utils.mergeProps({
|
|
384
373
|
key: key,
|
|
385
|
-
role:
|
|
374
|
+
role: 'none',
|
|
386
375
|
id: item.id,
|
|
387
376
|
className: className,
|
|
388
377
|
style: item.style,
|
|
389
378
|
onMouseEnter: function onMouseEnter(event) {
|
|
390
379
|
return onItemMouseEnter(event, item);
|
|
391
380
|
}
|
|
392
|
-
},
|
|
381
|
+
}, getPTOptions(item, 'menuitem'));
|
|
382
|
+
return /*#__PURE__*/React__namespace.createElement("li", menuitemProps, content, submenu);
|
|
393
383
|
};
|
|
394
384
|
var createItem = function createItem(item, index) {
|
|
395
385
|
return item.separator ? createSeparator(index) : createMenuitem(item, index);
|
|
@@ -403,14 +393,17 @@ var MenubarSub = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespa
|
|
|
403
393
|
'p-menubar-root-list': props.root
|
|
404
394
|
});
|
|
405
395
|
var submenu = createMenu();
|
|
406
|
-
|
|
396
|
+
var menuProps = utils.mergeProps({
|
|
407
397
|
ref: ref,
|
|
408
398
|
className: className,
|
|
409
399
|
role: role
|
|
410
|
-
},
|
|
400
|
+
}, props.ptm('menu'));
|
|
401
|
+
return /*#__PURE__*/React__namespace.createElement("ul", menuProps, submenu);
|
|
411
402
|
}));
|
|
412
403
|
MenubarSub.displayName = 'MenubarSub';
|
|
413
404
|
|
|
405
|
+
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; }
|
|
406
|
+
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; }
|
|
414
407
|
var Menubar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
415
408
|
var props = MenubarBase.getProps(inProps);
|
|
416
409
|
var _React$useState = React__namespace.useState(false),
|
|
@@ -420,6 +413,13 @@ var Menubar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
420
413
|
var elementRef = React__namespace.useRef(null);
|
|
421
414
|
var rootMenuRef = React__namespace.useRef(null);
|
|
422
415
|
var menuButtonRef = React__namespace.useRef(null);
|
|
416
|
+
var _MenubarBase$setMetaD = MenubarBase.setMetaData({
|
|
417
|
+
props: props,
|
|
418
|
+
state: {
|
|
419
|
+
mobileActive: mobileActiveState
|
|
420
|
+
}
|
|
421
|
+
}),
|
|
422
|
+
ptm = _MenubarBase$setMetaD.ptm;
|
|
423
423
|
var _useEventListener = hooks.useEventListener({
|
|
424
424
|
type: 'click',
|
|
425
425
|
listener: function listener(event) {
|
|
@@ -474,18 +474,20 @@ var Menubar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
474
474
|
var createStartContent = function createStartContent() {
|
|
475
475
|
if (props.start) {
|
|
476
476
|
var _start = utils.ObjectUtils.getJSXElement(props.start, props);
|
|
477
|
-
|
|
478
|
-
className:
|
|
479
|
-
},
|
|
477
|
+
var startProps = utils.mergeProps({
|
|
478
|
+
className: 'p-menubar-start'
|
|
479
|
+
}, ptm('start'));
|
|
480
|
+
return /*#__PURE__*/React__namespace.createElement("div", startProps, _start);
|
|
480
481
|
}
|
|
481
482
|
return null;
|
|
482
483
|
};
|
|
483
484
|
var createEndContent = function createEndContent() {
|
|
484
485
|
if (props.end) {
|
|
485
486
|
var _end = utils.ObjectUtils.getJSXElement(props.end, props);
|
|
486
|
-
|
|
487
|
-
className:
|
|
488
|
-
},
|
|
487
|
+
var endProps = utils.mergeProps({
|
|
488
|
+
className: 'p-menubar-end'
|
|
489
|
+
}, ptm('end'));
|
|
490
|
+
return /*#__PURE__*/React__namespace.createElement("div", endProps, _end);
|
|
489
491
|
}
|
|
490
492
|
return null;
|
|
491
493
|
};
|
|
@@ -493,24 +495,28 @@ var Menubar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
493
495
|
if (props.model && props.model.length < 1) {
|
|
494
496
|
return null;
|
|
495
497
|
}
|
|
496
|
-
var
|
|
497
|
-
var menuIcon = utils.IconUtils.getJSXIcon(icon, undefined, {
|
|
498
|
-
props: props
|
|
499
|
-
});
|
|
500
|
-
/* eslint-disable */
|
|
501
|
-
var button = /*#__PURE__*/React__namespace.createElement("a", {
|
|
498
|
+
var buttonProps = utils.mergeProps({
|
|
502
499
|
ref: menuButtonRef,
|
|
503
500
|
href: '#',
|
|
504
|
-
role:
|
|
501
|
+
role: 'button',
|
|
505
502
|
tabIndex: 0,
|
|
506
|
-
className:
|
|
507
|
-
onClick:
|
|
508
|
-
|
|
503
|
+
className: 'p-menubar-button',
|
|
504
|
+
onClick: function onClick(e) {
|
|
505
|
+
return toggle(e);
|
|
506
|
+
}
|
|
507
|
+
}, ptm('button'));
|
|
508
|
+
var popupIconProps = utils.mergeProps(ptm('popupIcon'));
|
|
509
|
+
var icon = props.menuIcon || /*#__PURE__*/React__namespace.createElement(bars.BarsIcon, popupIconProps);
|
|
510
|
+
var menuIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, popupIconProps), {
|
|
511
|
+
props: props
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
/* eslint-disable */
|
|
515
|
+
var button = /*#__PURE__*/React__namespace.createElement("a", buttonProps, menuIcon);
|
|
509
516
|
/* eslint-enable */
|
|
510
517
|
|
|
511
518
|
return button;
|
|
512
519
|
};
|
|
513
|
-
var otherProps = MenubarBase.getOtherProps(props);
|
|
514
520
|
var className = utils.classNames('p-menubar p-component', {
|
|
515
521
|
'p-menubar-mobile-active': mobileActiveState
|
|
516
522
|
}, props.className);
|
|
@@ -524,13 +530,15 @@ var Menubar = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.
|
|
|
524
530
|
root: true,
|
|
525
531
|
mobileActive: mobileActiveState,
|
|
526
532
|
onLeafClick: onLeafClick,
|
|
527
|
-
submenuIcon: props.submenuIcon
|
|
533
|
+
submenuIcon: props.submenuIcon,
|
|
534
|
+
ptm: ptm
|
|
528
535
|
});
|
|
529
|
-
|
|
536
|
+
var rootProps = utils.mergeProps({
|
|
530
537
|
id: props.id,
|
|
531
538
|
className: className,
|
|
532
539
|
style: props.style
|
|
533
|
-
},
|
|
540
|
+
}, MenubarBase.getOtherProps(props), ptm('root'));
|
|
541
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, start, menuButton, submenu, end);
|
|
534
542
|
}));
|
|
535
543
|
Menubar.displayName = 'Menubar';
|
|
536
544
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/hooks"),r=require("primereact/utils"),o=require("primereact/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/hooks"),r=require("primereact/utils"),o=require("primereact/componentbase"),u=require("primereact/ripple"),l=require("primereact/icons/angleright"),i=require("primereact/icons/angledown"),a=require("primereact/icons/bars");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var m=s(e),p=c(t);function f(e){return f="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},f(e)}function b(e,t){if("object"!==f(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e){var t=b(e,"string");return"symbol"===f(t)?t:String(t)}function v(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){if(Array.isArray(e))return e}function g(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,u,l,i=[],a=!0,c=!1;try{if(u=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=u.call(n)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw o}}return i}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function P(){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 y(e)||g(e,t)||h(e,t)||P()}var j=o.ComponentBase.extend({defaultProps:{__TYPE:"Menubar",id:null,model:null,style:null,className:null,start:null,submenuIcon:null,menuIcon:null,end:null,children:void 0}});function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=m.memo(m.forwardRef((function(e,t){var o=E(m.useState(null),2),a=o[0],c=o[1],s=function(t,n){return e.ptm(n,{context:{active:a===t}})},p=E(n.useEventListener({type:"click",listener:function(e){t&&t.current&&!t.current.contains(e.target)&&c(null)}}),1)[0],f=function(t,n){n.disabled||e.mobileActive?t.preventDefault():e.root?(a||e.popup)&&c(n):c(n)},b=function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),t.items?c(a&&t===a?null:t):w())},d=function(t,n){var r=t.currentTarget.parentElement;switch(t.which){case 40:e.root?n.items&&y(n,r):O(r),t.preventDefault();break;case 38:!e.root&&h(r),t.preventDefault();break;case 39:if(e.root){var o=P(r);o&&o.children[0].focus()}else n.items&&y(n,r);t.preventDefault();break;case 37:e.root&&h(r),t.preventDefault()}e.onKeyDown&&e.onKeyDown(t,r)},v=function(t,n){e.root?38===t.which&&null==n.previousElementSibling&&g(n):37===t.which&&g(n)},y=function(e,t){c(e),setTimeout((function(){t.children[1].children[0].children[0].focus()}),50)},g=function(e){c(null),e.parentElement.previousElementSibling.focus()},O=function(e){var t=P(e);t&&t.children[0].focus()},h=function(e){var t=j(e);t&&t.children[0].focus()},P=function e(t){var n=t.nextElementSibling;return n?r.DomHandler.hasClass(n,"p-disabled")||!r.DomHandler.hasClass(n,"p-menuitem")?e(n):n:null},j=function e(t){var n=t.previousElementSibling;return n?r.DomHandler.hasClass(n,"p-disabled")||!r.DomHandler.hasClass(n,"p-menuitem")?e(n):n:null},w=function(){c(null),e.onLeafClick&&e.onLeafClick()};n.useMountEffect((function(){p()})),n.useUpdateEffect((function(){!e.parentActive&&c(null)}),[e.parentActive]);var D=function(t){var n=r.mergeProps({key:"separator_"+t,className:"p-menu-separator",role:"separator"},e.ptm("separator"));return m.createElement("li",n)},N=function(t){return t.items?m.createElement(S,{menuProps:e.menuProps,model:t.items,mobileActive:e.mobileActive,onLeafClick:w,onKeyDown:v,parentActive:t===a,submenuIcon:e.submenuIcon,ptm:e.ptm}):null},C=function(t,n){if(!1===t.visible)return null;var o=t.label+"_"+n,c=r.classNames("p-menuitem",{"p-menuitem-active":a===t},t.className),p=r.classNames("p-menuitem-link",{"p-disabled":t.disabled}),v=r.classNames("p-menuitem-icon",t.icon),y=r.mergeProps({className:"p-menuitem-icon"},s(t,"icon")),g=r.IconUtils.getJSXIcon(t.icon,I({},y),{props:e.menuProps}),O=r.mergeProps({className:"p-menuitem-text"},s(t,"label")),h=t.label&&m.createElement("span",O,t.label),P="p-submenu-icon",E=r.mergeProps({className:P},s(t,"submenuIcon")),j=t.items&&r.IconUtils.getJSXIcon(e.root?e.submenuIcon||m.createElement(i.AngleDownIcon,E):e.submenuIcon||m.createElement(l.AngleRightIcon,E),I({},E),{props:I({menuProps:e.menuProps},e)}),w=N(t),S=r.mergeProps({href:t.url||"#",role:"menuitem",className:p,target:t.target,"aria-haspopup":null!=t.items,onClick:function(e){return b(e,t)},onKeyDown:function(e){return d(e,t)}},s(t,"action")),D=m.createElement("a",S,g,h,j,m.createElement(u.Ripple,null));t.template&&(D=r.ObjectUtils.getJSXElement(t.template,t,{onClick:function(e){return b(e,t)},onKeyDown:function(e){return d(e,t)},className:p,labelClassName:"p-menuitem-text",iconClassName:v,submenuIconClassName:P,element:D,props:e}));var C=r.mergeProps({key:o,role:"none",id:t.id,className:c,style:t.style,onMouseEnter:function(e){return f(e,t)}},s(t,"menuitem"));return m.createElement("li",C,D,w)},k=function(e,t){return e.separator?D(t):C(e,t)},A=e.root?"menubar":"menu",x=r.classNames({"p-submenu-list":!e.root,"p-menubar-root-list":e.root}),U=e.model?e.model.map(k):null,M=r.mergeProps({ref:t,className:x,role:A},e.ptm("menu"));return m.createElement("ul",M,U)})));function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}S.displayName="MenubarSub";var C=m.memo(m.forwardRef((function(e,t){var o=j.getProps(e),u=E(m.useState(!1),2),l=u[0],i=u[1],c=m.useRef(null),s=m.useRef(null),f=m.useRef(null),b=j.setMetaData({props:o,state:{mobileActive:l}}).ptm,d=E(n.useEventListener({type:"click",listener:function(e){l&&O(e)&&i(!1)}}),2),v=d[0],y=d[1],g=function(e){e.preventDefault(),i((function(e){return!e}))},O=function(e){return s.current!==e.target&&!s.current.contains(e.target)&&f.current!==e.target&&!f.current.contains(e.target)};n.useUpdateEffect((function(){l?(r.ZIndexUtils.set("menu",s.current,p.default.autoZIndex,p.default.zIndex.menu),v()):(y(),r.ZIndexUtils.clear(s.current))}),[l]),n.useUnmountEffect((function(){r.ZIndexUtils.clear(s.current)})),m.useImperativeHandle(t,(function(){return{props:o,toggle:g,useCustomContent:useCustomContent,getElement:function(){return c.current},getRootMenu:function(){return s.current},getMenuButton:function(){return f.current}}}));var h=r.classNames("p-menubar p-component",{"p-menubar-mobile-active":l},o.className),P=function(){if(o.start){var e=r.ObjectUtils.getJSXElement(o.start,o),t=r.mergeProps({className:"p-menubar-start"},b("start"));return m.createElement("div",t,e)}return null}(),w=function(){if(o.end){var e=r.ObjectUtils.getJSXElement(o.end,o),t=r.mergeProps({className:"p-menubar-end"},b("end"));return m.createElement("div",t,e)}return null}(),I=function(){if(o.model&&o.model.length<1)return null;var e=r.mergeProps({ref:f,href:"#",role:"button",tabIndex:0,className:"p-menubar-button",onClick:function(e){return g(e)}},b("button")),t=r.mergeProps(b("popupIcon")),n=r.IconUtils.getJSXIcon(o.menuIcon||m.createElement(a.BarsIcon,t),N({},t),{props:o});return m.createElement("a",e,n)}(),D=m.createElement(S,{ref:s,menuProps:o,model:o.model,root:!0,mobileActive:l,onLeafClick:function(){i(!1)},submenuIcon:o.submenuIcon,ptm:b}),C=r.mergeProps({id:o.id,className:h,style:o.style},j.getOtherProps(o),b("root"));return m.createElement("div",C,P,I,D,w)})));C.displayName="Menubar",exports.Menubar=C;
|
package/menubar/menubar.d.ts
CHANGED
|
@@ -9,7 +9,95 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { MenuItem } from '../menuitem';
|
|
12
|
-
import { IconType } from '../utils/utils';
|
|
12
|
+
import { IconType, PassThroughType } from '../utils/utils';
|
|
13
|
+
|
|
14
|
+
export declare type MenubarPassThroughType<T> = PassThroughType<T, MenubarPassThroughMethodOptions>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Custom passthrough(pt) option method.
|
|
18
|
+
*/
|
|
19
|
+
export interface MenubarPassThroughMethodOptions {
|
|
20
|
+
props: MenubarProps;
|
|
21
|
+
state: MenubarState;
|
|
22
|
+
context: MenubarContext;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Custom passthrough(pt) options.
|
|
27
|
+
* @see {@link MenubarProps.pt}
|
|
28
|
+
*/
|
|
29
|
+
export interface MenubarPassThroughOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Uses to pass attributes to the root's DOM element.
|
|
32
|
+
*/
|
|
33
|
+
root?: MenubarPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
34
|
+
/**
|
|
35
|
+
* Uses to pass attributes to the list's DOM element.
|
|
36
|
+
*/
|
|
37
|
+
menu?: MenubarPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
|
|
38
|
+
/**
|
|
39
|
+
* Uses to pass attributes to the list item's DOM element.
|
|
40
|
+
*/
|
|
41
|
+
menuitem?: MenubarPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
42
|
+
/**
|
|
43
|
+
* Uses to pass attributes to the action's DOM element.
|
|
44
|
+
*/
|
|
45
|
+
action?: MenubarPassThroughType<React.HTMLAttributes<HTMLAnchorElement>>;
|
|
46
|
+
/**
|
|
47
|
+
* Uses to pass attributes to the icon's DOM element.
|
|
48
|
+
*/
|
|
49
|
+
icon?: MenubarPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
50
|
+
/**
|
|
51
|
+
* Uses to pass attributes to the label's DOM element.
|
|
52
|
+
*/
|
|
53
|
+
label?: MenubarPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
|
|
54
|
+
/**
|
|
55
|
+
* Uses to pass attributes to the submenu icon's DOM element.
|
|
56
|
+
*/
|
|
57
|
+
submenuIcon?: MenubarPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
58
|
+
/**
|
|
59
|
+
* Uses to pass attributes to the separator's DOM element.
|
|
60
|
+
*/
|
|
61
|
+
separator?: MenubarPassThroughType<React.HTMLAttributes<HTMLElement>>;
|
|
62
|
+
/**
|
|
63
|
+
* Uses to pass attributes to the mobile popup menu button's DOM element.
|
|
64
|
+
*/
|
|
65
|
+
button?: MenubarPassThroughType<React.HTMLAttributes<HTMLElement>>;
|
|
66
|
+
/**
|
|
67
|
+
* Uses to pass attributes to the mobile popup menu button icon's DOM element.
|
|
68
|
+
*/
|
|
69
|
+
popupIcon?: MenubarPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
70
|
+
/**
|
|
71
|
+
* Uses to pass attributes to the start of the component.
|
|
72
|
+
*/
|
|
73
|
+
start?: MenubarPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
74
|
+
/**
|
|
75
|
+
* Uses to pass attributes to the end of the component.
|
|
76
|
+
*/
|
|
77
|
+
end?: MenubarPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Defines current inline state in Menubar component.
|
|
82
|
+
*/
|
|
83
|
+
export interface MenubarState {
|
|
84
|
+
/**
|
|
85
|
+
* Current mobile menu active state as a boolean.
|
|
86
|
+
* @defaultValue false
|
|
87
|
+
*/
|
|
88
|
+
mobileActive: boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Defines current options in Menubar component.
|
|
93
|
+
*/
|
|
94
|
+
export interface MenubarContext {
|
|
95
|
+
/**
|
|
96
|
+
* Current active state of menuitem as a boolean.
|
|
97
|
+
* @defaultValue false
|
|
98
|
+
*/
|
|
99
|
+
active: boolean;
|
|
100
|
+
}
|
|
13
101
|
|
|
14
102
|
/**
|
|
15
103
|
* Defines valid properties in Menubar component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
@@ -41,6 +129,11 @@ export interface MenubarProps extends Omit<React.DetailedHTMLProps<React.HTMLAtt
|
|
|
41
129
|
* @readonly
|
|
42
130
|
*/
|
|
43
131
|
children?: React.ReactNode | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
134
|
+
* @type {MenubarPassThroughOptions}
|
|
135
|
+
*/
|
|
136
|
+
pt?: MenubarPassThroughOptions;
|
|
44
137
|
}
|
|
45
138
|
|
|
46
139
|
/**
|