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
|
@@ -10,13 +10,89 @@
|
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { CSSTransitionProps } from '../csstransition';
|
|
12
12
|
import { MenuItem } from '../menuitem';
|
|
13
|
-
import { IconType } from '../utils/utils';
|
|
13
|
+
import { IconType, PassThroughType } from '../utils/utils';
|
|
14
|
+
|
|
15
|
+
export declare type TieredMenuPassThroughType<T> = PassThroughType<T, TieredMenuPassThroughMethodOptions>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Custom passthrough(pt) option method.
|
|
19
|
+
*/
|
|
20
|
+
export interface TieredMenuPassThroughMethodOptions {
|
|
21
|
+
props: TieredMenuProps;
|
|
22
|
+
state: TieredMenuState;
|
|
23
|
+
context: TieredMenuContext;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Custom passthrough(pt) options.
|
|
28
|
+
* @see {@link TieredMenuProps.pt}
|
|
29
|
+
*/
|
|
30
|
+
export interface TieredMenuPassThroughOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Uses to pass attributes to the root's DOM element.
|
|
33
|
+
*/
|
|
34
|
+
root?: TieredMenuPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
35
|
+
/**
|
|
36
|
+
* Uses to pass attributes to the list's DOM element.
|
|
37
|
+
*/
|
|
38
|
+
menu?: TieredMenuPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
|
|
39
|
+
/**
|
|
40
|
+
* Uses to pass attributes to the list item's DOM element.
|
|
41
|
+
*/
|
|
42
|
+
menuitem?: TieredMenuPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
43
|
+
/**
|
|
44
|
+
* Uses to pass attributes to the action's DOM element.
|
|
45
|
+
*/
|
|
46
|
+
action?: TieredMenuPassThroughType<React.HTMLAttributes<HTMLAnchorElement>>;
|
|
47
|
+
/**
|
|
48
|
+
* Uses to pass attributes to the icon's DOM element.
|
|
49
|
+
*/
|
|
50
|
+
icon?: TieredMenuPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
51
|
+
/**
|
|
52
|
+
* Uses to pass attributes to the label's DOM element.
|
|
53
|
+
*/
|
|
54
|
+
label?: TieredMenuPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
|
|
55
|
+
/**
|
|
56
|
+
* Uses to pass attributes to the submenu icon's DOM element.
|
|
57
|
+
*/
|
|
58
|
+
submenuIcon?: TieredMenuPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
59
|
+
/**
|
|
60
|
+
* Uses to pass attributes to the separator's DOM element.
|
|
61
|
+
*/
|
|
62
|
+
separator?: TieredMenuPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Defines current inline state in TieredMenu component.
|
|
67
|
+
*/
|
|
68
|
+
export interface TieredMenuState {
|
|
69
|
+
/**
|
|
70
|
+
* Current attributeSelector visible state as a string.
|
|
71
|
+
*/
|
|
72
|
+
attributeSelector: string;
|
|
73
|
+
/**
|
|
74
|
+
* Current visible state as a boolean.
|
|
75
|
+
* @defaultValue true
|
|
76
|
+
*/
|
|
77
|
+
visible: boolean;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Defines current options in TieredMenu component.
|
|
82
|
+
*/
|
|
83
|
+
export interface TieredMenuContext {
|
|
84
|
+
/**
|
|
85
|
+
* Current active state of menuitem as a boolean.
|
|
86
|
+
* @defaultValue false
|
|
87
|
+
*/
|
|
88
|
+
active: boolean;
|
|
89
|
+
}
|
|
14
90
|
|
|
15
91
|
/**
|
|
16
92
|
* Defines valid properties in TieredMenu component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
17
93
|
* @group Properties
|
|
18
94
|
*/
|
|
19
|
-
export interface TieredMenuProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref'> {
|
|
95
|
+
export interface TieredMenuProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref' | 'pt'> {
|
|
20
96
|
/**
|
|
21
97
|
* An array of menuitems.
|
|
22
98
|
*/
|
|
@@ -74,6 +150,11 @@ export interface TieredMenuProps extends Omit<React.DetailedHTMLProps<React.HTML
|
|
|
74
150
|
* @readonly
|
|
75
151
|
*/
|
|
76
152
|
children?: React.ReactNode | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
155
|
+
* @type {TieredMenuPassThroughOptions}
|
|
156
|
+
*/
|
|
157
|
+
pt?: TieredMenuPassThroughOptions;
|
|
77
158
|
}
|
|
78
159
|
|
|
79
160
|
/**
|
|
@@ -4,25 +4,11 @@ import { CSSTransition } from 'primereact/csstransition';
|
|
|
4
4
|
import { useEventListener, useResizeListener, useMountEffect, useUpdateEffect, useMatchMedia, useOverlayListener, useUnmountEffect } from 'primereact/hooks';
|
|
5
5
|
import { OverlayService } from 'primereact/overlayservice';
|
|
6
6
|
import { Portal } from 'primereact/portal';
|
|
7
|
-
import {
|
|
7
|
+
import { classNames, mergeProps, DomHandler, IconUtils, ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primereact/utils';
|
|
8
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
8
9
|
import { Ripple } from 'primereact/ripple';
|
|
9
10
|
import { AngleRightIcon } from 'primereact/icons/angleright';
|
|
10
11
|
|
|
11
|
-
function _extends() {
|
|
12
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
13
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
14
|
-
var source = arguments[i];
|
|
15
|
-
for (var key in source) {
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
17
|
-
target[key] = source[key];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return target;
|
|
22
|
-
};
|
|
23
|
-
return _extends.apply(this, arguments);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
12
|
function _arrayWithHoles(arr) {
|
|
27
13
|
if (Array.isArray(arr)) return arr;
|
|
28
14
|
}
|
|
@@ -78,7 +64,7 @@ function _slicedToArray(arr, i) {
|
|
|
78
64
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
79
65
|
}
|
|
80
66
|
|
|
81
|
-
var TieredMenuBase = {
|
|
67
|
+
var TieredMenuBase = ComponentBase.extend({
|
|
82
68
|
defaultProps: {
|
|
83
69
|
__TYPE: 'TieredMenu',
|
|
84
70
|
id: null,
|
|
@@ -96,21 +82,65 @@ var TieredMenuBase = {
|
|
|
96
82
|
onHide: null,
|
|
97
83
|
submenuIcon: null,
|
|
98
84
|
children: undefined
|
|
99
|
-
},
|
|
100
|
-
getProps: function getProps(props) {
|
|
101
|
-
return ObjectUtils.getMergedProps(props, TieredMenuBase.defaultProps);
|
|
102
|
-
},
|
|
103
|
-
getOtherProps: function getOtherProps(props) {
|
|
104
|
-
return ObjectUtils.getDiffProps(props, TieredMenuBase.defaultProps);
|
|
105
85
|
}
|
|
106
|
-
};
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
function _typeof(obj) {
|
|
89
|
+
"@babel/helpers - typeof";
|
|
90
|
+
|
|
91
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
92
|
+
return typeof obj;
|
|
93
|
+
} : function (obj) {
|
|
94
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
95
|
+
}, _typeof(obj);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function _toPrimitive(input, hint) {
|
|
99
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
100
|
+
var prim = input[Symbol.toPrimitive];
|
|
101
|
+
if (prim !== undefined) {
|
|
102
|
+
var res = prim.call(input, hint || "default");
|
|
103
|
+
if (_typeof(res) !== "object") return res;
|
|
104
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
105
|
+
}
|
|
106
|
+
return (hint === "string" ? String : Number)(input);
|
|
107
|
+
}
|
|
107
108
|
|
|
109
|
+
function _toPropertyKey(arg) {
|
|
110
|
+
var key = _toPrimitive(arg, "string");
|
|
111
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function _defineProperty(obj, key, value) {
|
|
115
|
+
key = _toPropertyKey(key);
|
|
116
|
+
if (key in obj) {
|
|
117
|
+
Object.defineProperty(obj, key, {
|
|
118
|
+
value: value,
|
|
119
|
+
enumerable: true,
|
|
120
|
+
configurable: true,
|
|
121
|
+
writable: true
|
|
122
|
+
});
|
|
123
|
+
} else {
|
|
124
|
+
obj[key] = value;
|
|
125
|
+
}
|
|
126
|
+
return obj;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
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; }
|
|
130
|
+
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; }
|
|
108
131
|
var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
|
|
109
132
|
var _React$useState = React.useState(null),
|
|
110
133
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
111
134
|
activeItemState = _React$useState2[0],
|
|
112
135
|
setActiveItemState = _React$useState2[1];
|
|
113
136
|
var elementRef = React.useRef(null);
|
|
137
|
+
var getPTOptions = function getPTOptions(item, key) {
|
|
138
|
+
return props.ptm(key, {
|
|
139
|
+
context: {
|
|
140
|
+
active: activeItemState === item
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
};
|
|
114
144
|
var _useEventListener = useEventListener({
|
|
115
145
|
type: 'click',
|
|
116
146
|
listener: function listener(event) {
|
|
@@ -251,11 +281,12 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
|
|
|
251
281
|
}, [activeItemState]);
|
|
252
282
|
var createSeparator = function createSeparator(index) {
|
|
253
283
|
var key = 'separator_' + index;
|
|
254
|
-
|
|
284
|
+
var separatorProps = mergeProps({
|
|
255
285
|
key: key,
|
|
256
|
-
className:
|
|
257
|
-
role:
|
|
258
|
-
});
|
|
286
|
+
className: 'p-menu-separator',
|
|
287
|
+
role: 'separator'
|
|
288
|
+
}, props.ptm('separator'));
|
|
289
|
+
return /*#__PURE__*/React.createElement("li", separatorProps);
|
|
259
290
|
};
|
|
260
291
|
var createSubmenu = function createSubmenu(item) {
|
|
261
292
|
if (item.items) {
|
|
@@ -268,7 +299,8 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
|
|
|
268
299
|
parentActive: item === activeItemState,
|
|
269
300
|
isMobileMode: props.isMobileMode,
|
|
270
301
|
onItemToggle: props.onItemToggle,
|
|
271
|
-
submenuIcon: props.submenuIcon
|
|
302
|
+
submenuIcon: props.submenuIcon,
|
|
303
|
+
ptm: props.ptm
|
|
272
304
|
});
|
|
273
305
|
}
|
|
274
306
|
return null;
|
|
@@ -296,37 +328,39 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
|
|
|
296
328
|
'p-disabled': disabled
|
|
297
329
|
});
|
|
298
330
|
var iconClassName = classNames('p-menuitem-icon', _icon);
|
|
299
|
-
var
|
|
300
|
-
className:
|
|
301
|
-
},
|
|
331
|
+
var iconProps = mergeProps({
|
|
332
|
+
className: iconClassName
|
|
333
|
+
}, getPTOptions(item, 'icon'));
|
|
334
|
+
var icon = IconUtils.getJSXIcon(_icon, _objectSpread({}, iconProps), {
|
|
302
335
|
props: props.menuProps
|
|
303
336
|
});
|
|
304
|
-
var
|
|
305
|
-
className:
|
|
306
|
-
},
|
|
337
|
+
var labelProps = mergeProps({
|
|
338
|
+
className: 'p-menuitem-text'
|
|
339
|
+
}, getPTOptions(item, 'label'));
|
|
340
|
+
var label = _label && /*#__PURE__*/React.createElement("span", labelProps, _label);
|
|
307
341
|
var submenuIconClassName = 'p-submenu-icon';
|
|
308
|
-
var
|
|
342
|
+
var submenuIconProps = mergeProps({
|
|
309
343
|
className: submenuIconClassName
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
}, {
|
|
344
|
+
}, getPTOptions(item, 'submenuIcon'));
|
|
345
|
+
var submenuIcon = item.items && IconUtils.getJSXIcon(props.submenuIcon || /*#__PURE__*/React.createElement(AngleRightIcon, submenuIconProps), _objectSpread({}, submenuIconProps), {
|
|
313
346
|
props: props.menuProps
|
|
314
347
|
});
|
|
315
348
|
var submenu = createSubmenu(item);
|
|
316
|
-
var
|
|
349
|
+
var actionProps = mergeProps({
|
|
317
350
|
href: url || '#',
|
|
318
351
|
className: linkClassName,
|
|
319
352
|
target: target,
|
|
320
|
-
role:
|
|
321
|
-
|
|
353
|
+
role: 'menuitem',
|
|
354
|
+
'aria-haspopup': items != null,
|
|
322
355
|
onClick: function onClick(event) {
|
|
323
356
|
return onItemClick(event, item);
|
|
324
357
|
},
|
|
325
358
|
onKeyDown: function onKeyDown(event) {
|
|
326
359
|
return onItemKeyDown(event, item);
|
|
327
360
|
},
|
|
328
|
-
|
|
329
|
-
},
|
|
361
|
+
'aria-disabled': disabled
|
|
362
|
+
}, getPTOptions(item, 'action'));
|
|
363
|
+
var content = /*#__PURE__*/React.createElement("a", actionProps, icon, label, submenuIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
330
364
|
if (template) {
|
|
331
365
|
var defaultContentOptions = {
|
|
332
366
|
onClick: function onClick(event) {
|
|
@@ -346,7 +380,7 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
|
|
|
346
380
|
};
|
|
347
381
|
content = ObjectUtils.getJSXElement(template, item, defaultContentOptions);
|
|
348
382
|
}
|
|
349
|
-
|
|
383
|
+
var menuitemProps = mergeProps({
|
|
350
384
|
key: key,
|
|
351
385
|
id: item.id,
|
|
352
386
|
className: className,
|
|
@@ -354,8 +388,9 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
|
|
|
354
388
|
onMouseEnter: function onMouseEnter(event) {
|
|
355
389
|
return onItemMouseEnter(event, item);
|
|
356
390
|
},
|
|
357
|
-
role:
|
|
358
|
-
},
|
|
391
|
+
role: 'none'
|
|
392
|
+
}, getPTOptions(item, 'menuitem'));
|
|
393
|
+
return /*#__PURE__*/React.createElement("li", menuitemProps, content, submenu);
|
|
359
394
|
};
|
|
360
395
|
var createItem = function createItem(item, index) {
|
|
361
396
|
return item.separator ? createSeparator(index) : createMenuItem(item, index);
|
|
@@ -367,12 +402,13 @@ var TieredMenuSub = /*#__PURE__*/React.memo(function (props) {
|
|
|
367
402
|
'p-submenu-list': !props.root
|
|
368
403
|
});
|
|
369
404
|
var submenu = createMenu();
|
|
370
|
-
|
|
405
|
+
var menuProps = mergeProps({
|
|
371
406
|
ref: elementRef,
|
|
372
407
|
className: className,
|
|
373
408
|
role: props.root ? 'menubar' : 'menu',
|
|
374
|
-
|
|
375
|
-
},
|
|
409
|
+
'aria-orientation': 'horizontal'
|
|
410
|
+
}, props.ptm('menu'));
|
|
411
|
+
return /*#__PURE__*/React.createElement("ul", menuProps, submenu);
|
|
376
412
|
});
|
|
377
413
|
TieredMenuSub.displayName = 'TieredMenuSub';
|
|
378
414
|
|
|
@@ -386,6 +422,14 @@ var TieredMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
386
422
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
387
423
|
attributeSelectorState = _React$useState4[0],
|
|
388
424
|
setAttributeSelectorState = _React$useState4[1];
|
|
425
|
+
var _TieredMenuBase$setMe = TieredMenuBase.setMetaData({
|
|
426
|
+
props: props,
|
|
427
|
+
state: {
|
|
428
|
+
visible: visibleState,
|
|
429
|
+
attributeSelector: attributeSelectorState
|
|
430
|
+
}
|
|
431
|
+
}),
|
|
432
|
+
ptm = _TieredMenuBase$setMe.ptm;
|
|
389
433
|
var menuRef = React.useRef(null);
|
|
390
434
|
var targetRef = React.useRef(null);
|
|
391
435
|
var styleElementRef = React.useRef(null);
|
|
@@ -493,12 +537,19 @@ var TieredMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
493
537
|
};
|
|
494
538
|
});
|
|
495
539
|
var createElement = function createElement() {
|
|
496
|
-
|
|
540
|
+
TieredMenuBase.getOtherProps(props);
|
|
497
541
|
var className = classNames('p-tieredmenu p-component', {
|
|
498
542
|
'p-tieredmenu-overlay': props.popup,
|
|
499
543
|
'p-input-filled': PrimeReact.inputStyle === 'filled',
|
|
500
544
|
'p-ripple-disabled': PrimeReact.ripple === false
|
|
501
545
|
}, props.className);
|
|
546
|
+
var rootProps = mergeProps({
|
|
547
|
+
ref: menuRef,
|
|
548
|
+
id: props.id,
|
|
549
|
+
className: className,
|
|
550
|
+
style: props.style,
|
|
551
|
+
onClick: onPanelClick
|
|
552
|
+
}, TieredMenuBase.getOtherProps(props), ptm('root'));
|
|
502
553
|
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
503
554
|
nodeRef: menuRef,
|
|
504
555
|
classNames: "p-connected-overlay",
|
|
@@ -513,14 +564,7 @@ var TieredMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
513
564
|
onEntered: onEntered,
|
|
514
565
|
onExit: onExit,
|
|
515
566
|
onExited: onExited
|
|
516
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
517
|
-
ref: menuRef,
|
|
518
|
-
id: props.id,
|
|
519
|
-
className: className,
|
|
520
|
-
style: props.style
|
|
521
|
-
}, otherProps, {
|
|
522
|
-
onClick: onPanelClick
|
|
523
|
-
}), /*#__PURE__*/React.createElement(TieredMenuSub, {
|
|
567
|
+
}, /*#__PURE__*/React.createElement("div", rootProps, /*#__PURE__*/React.createElement(TieredMenuSub, {
|
|
524
568
|
menuProps: props,
|
|
525
569
|
model: props.model,
|
|
526
570
|
root: true,
|
|
@@ -528,7 +572,8 @@ var TieredMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
528
572
|
onHide: hide,
|
|
529
573
|
isMobileMode: isMobileMode,
|
|
530
574
|
onItemToggle: onItemToggle,
|
|
531
|
-
submenuIcon: props.submenuIcon
|
|
575
|
+
submenuIcon: props.submenuIcon,
|
|
576
|
+
ptm: ptm
|
|
532
577
|
})));
|
|
533
578
|
};
|
|
534
579
|
var element = createElement();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import n from"primereact/api";import{CSSTransition as t}from"primereact/csstransition";import{useEventListener as r,useResizeListener as o,useMountEffect as i,useUpdateEffect as u,useMatchMedia as l,useOverlayListener as a,useUnmountEffect as c}from"primereact/hooks";import{OverlayService as s}from"primereact/overlayservice";import{Portal as p}from"primereact/portal";import{ObjectUtils as m,classNames as f,DomHandler as d,IconUtils as b,UniqueComponentId as g,ZIndexUtils as h}from"primereact/utils";import{Ripple as v}from"primereact/ripple";import{AngleRightIcon as y}from"primereact/icons/angleright";function E(){return E=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},E.apply(this,arguments)}function I(e){if(Array.isArray(e))return e}function w(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,u,l=[],a=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;a=!1}else for(;!(a=(r=i.call(t)).done)&&(l.push(r.value),l.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(c)throw o}}return l}}function M(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function S(e,n){if(e){if("string"==typeof e)return M(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?M(e,n):void 0}}function k(){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 x(e,n){return I(e)||w(e,n)||S(e,n)||k()}var N={defaultProps:{__TYPE:"TieredMenu",id:null,model:null,popup:!1,style:null,className:null,autoZIndex:!0,baseZIndex:0,breakpoint:void 0,scrollHeight:"400px",appendTo:null,transitionOptions:null,onShow:null,onHide:null,submenuIcon:null,children:void 0},getProps:function(e){return m.getMergedProps(e,N.defaultProps)},getOtherProps:function(e){return m.getDiffProps(e,N.defaultProps)}},P=e.memo((function(n){var t=x(e.useState(null),2),l=t[0],a=t[1],c=e.useRef(null),s=x(r({type:"click",listener:function(e){n.isMobileMode||!c.current||c.current.contains(e.target)||a(null)}}),1)[0],p=x(o({listener:function(){!n.isMobileMode&&a(null)}}),1)[0],g=function(){if(c.current){var e=c.current.parentElement,n=d.getOffset(e),t=d.getViewport(),r=c.current.offsetParent?c.current.offsetWidth:d.getHiddenElementOuterWidth(c.current),o=d.getOuterWidth(e.children[0]),i=parseInt(n.top,10)+c.current.offsetHeight-d.getWindowScrollTop();c.current.style.top=i>t.height?t.height-i+"px":"0px",parseInt(n.left,10)+o+r>t.width-d.calculateScrollbarWidth()&&d.addClass(c.current,"p-submenu-list-flipped")}},h=function(e,t){t.disabled||n.isMobileMode?e.preventDefault():n.root?(l||n.popup)&&a(t):a(t)},E=function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),(n.root||n.isMobileMode)&&t.items&&a(l&&t===l?null:t),t.items||k(e))},I=function(e,t){var r=e.currentTarget.parentElement;switch(e.which){case 40:var o=M(r);o&&o.children[0].focus(),e.preventDefault();break;case 38:var i=S(r);i&&i.children[0].focus(),e.preventDefault();break;case 39:t.items&&(a(t),setTimeout((function(){r.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}n.onKeyDown&&n.onKeyDown(e,r)},w=function(e,n){37===e.which&&(a(null),n.parentElement.previousElementSibling.focus())},M=function e(n){var t=n.nextElementSibling;return t?d.hasClass(t,"p-disabled")||!d.hasClass(t,"p-menuitem")?e(t):t:null},S=function e(n){var t=n.previousElementSibling;return t?d.hasClass(t,"p-disabled")||!d.hasClass(t,"p-menuitem")?e(t):t:null},k=function(e){n.isMobileMode&&!n.popup||(a(null),n.onLeafClick&&n.onLeafClick(e),n.onHide&&n.onHide(e))};i((function(){s(),p()})),u((function(){n.parentActive||a(null),n.root||!n.parentActive||n.isMobileMode||g()}),[n.parentActive]),u((function(){n.onItemToggle&&n.onItemToggle()}),[l]);var N=function(n){return e.createElement("li",{key:"separator_"+n,className:"p-menu-separator",role:"separator"})},T=function(t){return t.items?e.createElement(P,{menuProps:n.menuProps,model:t.items,onLeafClick:k,popup:n.popup,onKeyDown:w,parentActive:t===l,isMobileMode:n.isMobileMode,onItemToggle:n.onItemToggle,submenuIcon:n.submenuIcon}):null},O=function(t,r){if(!1===t.visible)return null;var o=t.style,i=t.disabled,u=t.icon,a=t.label,c=t.items,s=t.target,p=t.url,d=t.template,g=a+"_"+r,w=l===t,M=f("p-menuitem",{"p-menuitem-active":w},t.className),S=f("p-menuitem-link",{"p-disabled":i}),k=f("p-menuitem-icon",u),x=b.getJSXIcon(u,{className:"p-menuitem-icon"},{props:n.menuProps}),N=a&&e.createElement("span",{className:"p-menuitem-text"},a),P="p-submenu-icon",O=t.items&&b.getJSXIcon(n.submenuIcon||e.createElement(y,{className:P}),{className:P},{props:n.menuProps}),C=T(t),H=e.createElement("a",{href:p||"#",className:S,target:s,role:"menuitem","aria-haspopup":null!=c,onClick:function(e){return E(e,t)},onKeyDown:function(e){return I(e,t)},"aria-disabled":i},x,N,O,e.createElement(v,null));d&&(H=m.getJSXElement(d,t,{onClick:function(e){return E(e,t)},onKeyDown:function(e){return I(e,t)},className:S,labelClassName:"p-menuitem-text",iconClassName:k,submenuIconClassName:P,element:H,props:n,active:w,disabled:i}));return e.createElement("li",{key:g,id:t.id,className:M,style:o,onMouseEnter:function(e){return h(e,t)},role:"none"},H,C)},C=function(e,n){return e.separator?N(n):O(e,n)},H=f({"p-submenu-list":!n.root}),A=n.model?n.model.map(C):null;return e.createElement("ul",{ref:c,className:H,role:n.root?"menubar":"menu","aria-orientation":"horizontal"},A)}));P.displayName="TieredMenuSub";var T=e.memo(e.forwardRef((function(r,o){var m=N.getProps(r),b=x(e.useState(!m.popup),2),v=b[0],y=b[1],I=x(e.useState(null),2),w=I[0],M=I[1],S=e.useRef(null),k=e.useRef(null),T=e.useRef(null),O=l("screen and (max-width: ".concat(m.breakpoint,")"),!!m.breakpoint),C=x(a({target:k,overlay:S,listener:function(e,n){n.valid&&K(e)},when:v}),2),H=C[0],A=C[1],D=function(e){m.popup&&s.emit("overlay-click",{originalEvent:e,target:k.current})},j=function(e){m.popup&&(v?K(e):R(e))},R=function(e){k.current=e.currentTarget,y(!0),m.onShow&&m.onShow(e)},K=function(e){m.popup&&(k.current=e.currentTarget,y(!1),m.onHide&&m.onHide(e))},W=function(){m.popup&&O&&d.absolutePosition(S.current,k.current)},Z=function(){if(!T.current){T.current=d.createInlineStyle(n.nonce);var e="".concat(w),t="\n@media screen and (max-width: ".concat(m.breakpoint,") {\n .p-tieredmenu[").concat(e,"] > ul {\n max-height: ").concat(m.scrollHeight,";\n overflow: ").concat(m.scrollHeight?"auto":"",";\n }\n\n .p-tieredmenu[").concat(e,"] .p-submenu-list {\n position: relative;\n }\n\n .p-tieredmenu[").concat(e,"] .p-menuitem-active > .p-submenu-list {\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n padding: 0 0 0 calc(var(--inline-spacing) * 2); /* @todo */\n }\n\n .p-tieredmenu[").concat(e,"] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-tieredmenu[").concat(e,'] .p-submenu-icon:before {\n content: "\\e930";\n }\n\n ').concat(m.popup?"":".p-tieredmenu[".concat(e,"] { width: 100%; }"),"\n}\n");T.current.innerHTML=t}},L=function(){T.current=d.removeInlineStyle(T.current)},_=function(){m.autoZIndex&&h.set("menu",S.current,n.autoZIndex,m.baseZIndex||n.zIndex.menu),d.absolutePosition(S.current,k.current),w&&m.breakpoint&&(S.current.setAttribute(w,""),Z())},J=function(){H()},X=function(){k.current=null,A()},z=function(){h.clear(S.current),L()};i((function(){m.breakpoint&&!w&&M(g())})),u((function(){return w&&S.current&&(S.current.setAttribute(w,""),Z()),function(){L()}}),[w,m.breakpoint]),c((function(){h.clear(S.current)})),e.useImperativeHandle(o,(function(){return{props:m,toggle:j,show:R,hide:K,getElement:function(){return S.current}}}));var U,V,Y=(U=N.getOtherProps(m),V=f("p-tieredmenu p-component",{"p-tieredmenu-overlay":m.popup,"p-input-filled":"filled"===n.inputStyle,"p-ripple-disabled":!1===n.ripple},m.className),e.createElement(t,{nodeRef:S,classNames:"p-connected-overlay",in:v,timeout:{enter:120,exit:100},options:m.transitionOptions,unmountOnExit:!0,onEnter:_,onEntered:J,onExit:X,onExited:z},e.createElement("div",E({ref:S,id:m.id,className:V,style:m.style},U,{onClick:D}),e.createElement(P,{menuProps:m,model:m.model,root:!0,popup:m.popup,onHide:K,isMobileMode:O,onItemToggle:W,submenuIcon:m.submenuIcon}))));return m.popup?e.createElement(p,{element:Y,appendTo:m.appendTo}):Y})));T.displayName="TieredMenu";export{T as TieredMenu};
|
|
1
|
+
import*as e from"react";import n from"primereact/api";import{CSSTransition as t}from"primereact/csstransition";import{useEventListener as r,useResizeListener as o,useMountEffect as i,useUpdateEffect as u,useMatchMedia as l,useOverlayListener as a,useUnmountEffect as c}from"primereact/hooks";import{OverlayService as p}from"primereact/overlayservice";import{Portal as s}from"primereact/portal";import{classNames as m,mergeProps as f,DomHandler as d,IconUtils as b,ObjectUtils as v,UniqueComponentId as y,ZIndexUtils as g}from"primereact/utils";import{ComponentBase as h}from"primereact/componentbase";import{Ripple as w}from"primereact/ripple";import{AngleRightIcon as E}from"primereact/icons/angleright";function S(e){if(Array.isArray(e))return e}function O(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,u,l=[],a=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;a=!1}else for(;!(a=(r=i.call(t)).done)&&(l.push(r.value),l.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(c)throw o}}return l}}function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function M(e,n){if(e){if("string"==typeof e)return I(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?I(e,n):void 0}}function x(){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 P(e,n){return S(e)||O(e,n)||M(e,n)||x()}var k=h.extend({defaultProps:{__TYPE:"TieredMenu",id:null,model:null,popup:!1,style:null,className:null,autoZIndex:!0,baseZIndex:0,breakpoint:void 0,scrollHeight:"400px",appendTo:null,transitionOptions:null,onShow:null,onHide:null,submenuIcon:null,children:void 0}});function T(e){return T="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},T(e)}function j(e,n){if("object"!==T(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function N(e){var n=j(e,"string");return"symbol"===T(n)?n:String(n)}function D(e,n,t){return(n=N(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C(Object(t),!0).forEach((function(n){D(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var A=e.memo((function(n){var t=P(e.useState(null),2),l=t[0],a=t[1],c=e.useRef(null),p=function(e,t){return n.ptm(t,{context:{active:l===e}})},s=P(r({type:"click",listener:function(e){n.isMobileMode||!c.current||c.current.contains(e.target)||a(null)}}),1)[0],y=P(o({listener:function(){!n.isMobileMode&&a(null)}}),1)[0],g=function(){if(c.current){var e=c.current.parentElement,n=d.getOffset(e),t=d.getViewport(),r=c.current.offsetParent?c.current.offsetWidth:d.getHiddenElementOuterWidth(c.current),o=d.getOuterWidth(e.children[0]),i=parseInt(n.top,10)+c.current.offsetHeight-d.getWindowScrollTop();c.current.style.top=i>t.height?t.height-i+"px":"0px",parseInt(n.left,10)+o+r>t.width-d.calculateScrollbarWidth()&&d.addClass(c.current,"p-submenu-list-flipped")}},h=function(e,t){t.disabled||n.isMobileMode?e.preventDefault():n.root?(l||n.popup)&&a(t):a(t)},S=function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),(n.root||n.isMobileMode)&&t.items&&a(l&&t===l?null:t),t.items||k(e))},O=function(e,t){var r=e.currentTarget.parentElement;switch(e.which){case 40:var o=M(r);o&&o.children[0].focus(),e.preventDefault();break;case 38:var i=x(r);i&&i.children[0].focus(),e.preventDefault();break;case 39:t.items&&(a(t),setTimeout((function(){r.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}n.onKeyDown&&n.onKeyDown(e,r)},I=function(e,n){37===e.which&&(a(null),n.parentElement.previousElementSibling.focus())},M=function e(n){var t=n.nextElementSibling;return t?d.hasClass(t,"p-disabled")||!d.hasClass(t,"p-menuitem")?e(t):t:null},x=function e(n){var t=n.previousElementSibling;return t?d.hasClass(t,"p-disabled")||!d.hasClass(t,"p-menuitem")?e(t):t:null},k=function(e){n.isMobileMode&&!n.popup||(a(null),n.onLeafClick&&n.onLeafClick(e),n.onHide&&n.onHide(e))};i((function(){s(),y()})),u((function(){n.parentActive||a(null),n.root||!n.parentActive||n.isMobileMode||g()}),[n.parentActive]),u((function(){n.onItemToggle&&n.onItemToggle()}),[l]);var T=function(t){var r=f({key:"separator_"+t,className:"p-menu-separator",role:"separator"},n.ptm("separator"));return e.createElement("li",r)},j=function(t){return t.items?e.createElement(A,{menuProps:n.menuProps,model:t.items,onLeafClick:k,popup:n.popup,onKeyDown:I,parentActive:t===l,isMobileMode:n.isMobileMode,onItemToggle:n.onItemToggle,submenuIcon:n.submenuIcon,ptm:n.ptm}):null},N=function(t,r){if(!1===t.visible)return null;var o=t.style,i=t.disabled,u=t.icon,a=t.label,c=t.items,s=t.target,d=t.url,y=t.template,g=a+"_"+r,I=l===t,M=m("p-menuitem",{"p-menuitem-active":I},t.className),x=m("p-menuitem-link",{"p-disabled":i}),P=m("p-menuitem-icon",u),k=f({className:P},p(t,"icon")),T=b.getJSXIcon(u,H({},k),{props:n.menuProps}),N=f({className:"p-menuitem-text"},p(t,"label")),D=a&&e.createElement("span",N,a),C="p-submenu-icon",A=f({className:C},p(t,"submenuIcon")),R=t.items&&b.getJSXIcon(n.submenuIcon||e.createElement(E,A),H({},A),{props:n.menuProps}),K=j(t),W=f({href:d||"#",className:x,target:s,role:"menuitem","aria-haspopup":null!=c,onClick:function(e){return S(e,t)},onKeyDown:function(e){return O(e,t)},"aria-disabled":i},p(t,"action")),Z=e.createElement("a",W,T,D,R,e.createElement(w,null));y&&(Z=v.getJSXElement(y,t,{onClick:function(e){return S(e,t)},onKeyDown:function(e){return O(e,t)},className:x,labelClassName:"p-menuitem-text",iconClassName:P,submenuIconClassName:C,element:Z,props:n,active:I,disabled:i}));var L=f({key:g,id:t.id,className:M,style:o,onMouseEnter:function(e){return h(e,t)},role:"none"},p(t,"menuitem"));return e.createElement("li",L,Z,K)},D=function(e,n){return e.separator?T(n):N(e,n)},C=m({"p-submenu-list":!n.root}),R=n.model?n.model.map(D):null,K=f({ref:c,className:C,role:n.root?"menubar":"menu","aria-orientation":"horizontal"},n.ptm("menu"));return e.createElement("ul",K,R)}));A.displayName="TieredMenuSub";var R=e.memo(e.forwardRef((function(r,o){var b=k.getProps(r),v=P(e.useState(!b.popup),2),h=v[0],w=v[1],E=P(e.useState(null),2),S=E[0],O=E[1],I=k.setMetaData({props:b,state:{visible:h,attributeSelector:S}}).ptm,M=e.useRef(null),x=e.useRef(null),T=e.useRef(null),j=l("screen and (max-width: ".concat(b.breakpoint,")"),!!b.breakpoint),N=P(a({target:x,overlay:M,listener:function(e,n){n.valid&&W(e)},when:h}),2),D=N[0],C=N[1],H=function(e){b.popup&&p.emit("overlay-click",{originalEvent:e,target:x.current})},R=function(e){b.popup&&(h?W(e):K(e))},K=function(e){x.current=e.currentTarget,w(!0),b.onShow&&b.onShow(e)},W=function(e){b.popup&&(x.current=e.currentTarget,w(!1),b.onHide&&b.onHide(e))},Z=function(){b.popup&&j&&d.absolutePosition(M.current,x.current)},L=function(){if(!T.current){T.current=d.createInlineStyle(n.nonce);var e="".concat(S),t="\n@media screen and (max-width: ".concat(b.breakpoint,") {\n .p-tieredmenu[").concat(e,"] > ul {\n max-height: ").concat(b.scrollHeight,";\n overflow: ").concat(b.scrollHeight?"auto":"",";\n }\n\n .p-tieredmenu[").concat(e,"] .p-submenu-list {\n position: relative;\n }\n\n .p-tieredmenu[").concat(e,"] .p-menuitem-active > .p-submenu-list {\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n padding: 0 0 0 calc(var(--inline-spacing) * 2); /* @todo */\n }\n\n .p-tieredmenu[").concat(e,"] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-tieredmenu[").concat(e,'] .p-submenu-icon:before {\n content: "\\e930";\n }\n\n ').concat(b.popup?"":".p-tieredmenu[".concat(e,"] { width: 100%; }"),"\n}\n");T.current.innerHTML=t}},_=function(){T.current=d.removeInlineStyle(T.current)},J=function(){b.autoZIndex&&g.set("menu",M.current,n.autoZIndex,b.baseZIndex||n.zIndex.menu),d.absolutePosition(M.current,x.current),S&&b.breakpoint&&(M.current.setAttribute(S,""),L())},X=function(){D()},z=function(){x.current=null,C()},U=function(){g.clear(M.current),_()};i((function(){b.breakpoint&&!S&&O(y())})),u((function(){return S&&M.current&&(M.current.setAttribute(S,""),L()),function(){_()}}),[S,b.breakpoint]),c((function(){g.clear(M.current)})),e.useImperativeHandle(o,(function(){return{props:b,toggle:R,show:K,hide:W,getElement:function(){return M.current}}}));var V=function(){k.getOtherProps(b);var r=m("p-tieredmenu p-component",{"p-tieredmenu-overlay":b.popup,"p-input-filled":"filled"===n.inputStyle,"p-ripple-disabled":!1===n.ripple},b.className),o=f({ref:M,id:b.id,className:r,style:b.style,onClick:H},k.getOtherProps(b),I("root"));return e.createElement(t,{nodeRef:M,classNames:"p-connected-overlay",in:h,timeout:{enter:120,exit:100},options:b.transitionOptions,unmountOnExit:!0,onEnter:J,onEntered:X,onExit:z,onExited:U},e.createElement("div",o,e.createElement(A,{menuProps:b,model:b.model,root:!0,popup:b.popup,onHide:W,isMobileMode:j,onItemToggle:Z,submenuIcon:b.submenuIcon,ptm:I})))}();return b.popup?e.createElement(s,{element:V,appendTo:b.appendTo}):V})));R.displayName="TieredMenu";export{R as TieredMenu};
|