primereact 9.4.0 → 9.6.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/accordion/accordion.cjs.js +2 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -2
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -1
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +215 -3
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +882 -8
- package/api/api.esm.js +210 -4
- package/api/api.esm.min.js +1 -1
- package/api/api.js +216 -5
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +148 -89
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +138 -2
- package/autocomplete/autocomplete.esm.js +150 -91
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +149 -91
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +3 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +1 -1
- package/avatar/avatar.esm.js +3 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +4 -3
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +3 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +4 -3
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +3 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +4 -3
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +4 -3
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +4 -3
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +5 -4
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +97 -52
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +97 -52
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +96 -53
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +6 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +6 -0
- package/button/button.esm.js +6 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +7 -4
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +322 -223
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +272 -3
- package/calendar/calendar.esm.js +324 -225
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +323 -225
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +3 -1
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +5 -11
- package/card/card.esm.js +3 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +4 -3
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +154 -92
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +121 -1
- package/carousel/carousel.esm.js +156 -94
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +155 -94
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +181 -108
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +100 -1
- package/cascadeselect/cascadeselect.esm.js +183 -110
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +180 -108
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +31 -44
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +30 -0
- package/chart/chart.esm.js +18 -31
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +141 -156
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +113 -48
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +65 -1
- package/checkbox/checkbox.esm.js +115 -50
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +113 -50
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +3 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +1 -1
- package/chip/chip.esm.js +3 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +4 -3
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +84 -55
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +78 -6
- package/chips/chips.esm.js +85 -56
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +83 -57
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +123 -49
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +81 -0
- package/colorpicker/colorpicker.esm.js +125 -51
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +124 -51
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +2 -0
- package/column/column.d.ts +298 -1
- package/column/column.esm.js +2 -0
- package/column/column.js +2 -0
- package/columngroup/columngroup.d.ts +28 -0
- package/componentbase/componentbase.cjs.js +29 -5
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +25 -5
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +30 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +4 -3
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +5 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +4 -3
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +5 -4
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +6 -5
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +5 -4
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +121 -69
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +123 -71
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +122 -71
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +14005 -2381
- package/core/core.min.js +47 -47
- package/csstransition/csstransition.cjs.js +3 -2
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +3 -2
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +4 -3
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +34 -43
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +51 -1
- package/datascroller/datascroller.esm.js +36 -45
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +35 -45
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +1089 -649
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +191 -3
- package/datatable/datatable.esm.js +1091 -651
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +1090 -651
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +125 -109
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +105 -2
- package/dataview/dataview.esm.js +127 -111
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +123 -108
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +3 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -3
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +6 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +7 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -5
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +3 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +4 -3
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +85 -46
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +86 -47
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +85 -48
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +170 -120
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +154 -2
- package/dropdown/dropdown.esm.js +172 -122
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +170 -121
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +95 -116
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +50 -0
- package/editor/editor.esm.js +96 -117
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +95 -118
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +3 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +4 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +234 -191
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +160 -1
- package/fileupload/fileupload.esm.js +235 -192
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +231 -188
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +139 -124
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +141 -126
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +138 -124
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +10 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +7 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +11 -5
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +415 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +415 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +415 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +415 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +415 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +415 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +415 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +415 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +415 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +415 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +415 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +415 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +415 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +415 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +415 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +415 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +415 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +415 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +415 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +415 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +415 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +415 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +415 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +415 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +415 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +415 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +415 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +415 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +415 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +415 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +415 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +415 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +415 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +415 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +415 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +415 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +415 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +415 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +415 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +415 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +415 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +415 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +415 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +415 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +415 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +415 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +415 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +415 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +415 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +415 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +415 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +415 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +415 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +415 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +415 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +415 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +415 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +415 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +415 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +415 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +415 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +415 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +415 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +415 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +415 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +415 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +415 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +415 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +415 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +415 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +415 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +415 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +415 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +415 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +415 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +415 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +415 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +415 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +415 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +415 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +415 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +415 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +415 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +415 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +480 -80
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +483 -83
- package/image/image.esm.min.js +1 -1
- package/image/image.js +481 -82
- package/image/image.min.css +1 -1
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +2 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +3 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -1
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +26 -26
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +7 -2
- package/inputmask/inputmask.esm.js +27 -27
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +26 -28
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +68 -48
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +62 -1
- package/inputnumber/inputnumber.esm.js +66 -49
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +68 -50
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +84 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +61 -0
- package/inputswitch/inputswitch.esm.js +85 -26
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +83 -27
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -15
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +32 -0
- package/inputtext/inputtext.esm.js +26 -16
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +25 -17
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +25 -15
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +33 -1
- package/inputtextarea/inputtextarea.esm.js +26 -16
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +25 -17
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +25 -9
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +25 -9
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +25 -11
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +44 -43
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +42 -0
- package/knob/knob.esm.js +45 -44
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +44 -45
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +86 -56
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +103 -3
- package/listbox/listbox.esm.js +88 -58
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +86 -57
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +151 -99
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +152 -100
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +149 -98
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +87 -61
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +80 -1
- package/mention/mention.esm.js +89 -63
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +88 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +99 -59
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +101 -61
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +100 -61
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +122 -114
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +124 -116
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +122 -115
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +69 -47
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +70 -48
- package/message/message.esm.min.js +1 -1
- package/message/message.js +69 -49
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +65 -63
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +66 -64
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +65 -64
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +249 -193
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +185 -3
- package/multiselect/multiselect.esm.js +252 -196
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +249 -194
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +47 -33
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +61 -2
- package/multistatecheckbox/multistatecheckbox.esm.js +49 -35
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +48 -35
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +188 -110
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +118 -2
- package/orderlist/orderlist.esm.js +190 -112
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +186 -109
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +139 -73
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +89 -2
- package/organizationchart/organizationchart.esm.js +140 -74
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +139 -75
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +7 -6
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +5 -0
- package/overlaypanel/overlaypanel.esm.js +8 -7
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +8 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +172 -166
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +111 -5
- package/paginator/paginator.esm.js +174 -168
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +172 -167
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +3 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +4 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +148 -84
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +148 -84
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +146 -84
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +89 -46
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +98 -2
- package/password/password.esm.js +91 -48
- package/password/password.esm.min.js +1 -1
- package/password/password.js +88 -46
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +146 -82
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +133 -1
- package/picklist/picklist.esm.js +148 -84
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +143 -80
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +3 -2
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +3 -2
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +4 -3
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +6656 -4389
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +6655 -4390
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +6656 -4389
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +3 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +4 -3
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +3 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +4 -3
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +90 -30
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +66 -1
- package/radiobutton/radiobutton.esm.js +91 -31
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +89 -32
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +47 -36
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +64 -1
- package/rating/rating.esm.js +48 -37
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +47 -38
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +475 -465
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +33 -8
- package/resources/themes/arya-green/theme.css +33 -8
- package/resources/themes/arya-orange/theme.css +33 -8
- package/resources/themes/arya-purple/theme.css +33 -8
- package/resources/themes/bootstrap4-dark-blue/theme.css +33 -8
- package/resources/themes/bootstrap4-dark-purple/theme.css +33 -8
- package/resources/themes/bootstrap4-light-blue/theme.css +33 -8
- package/resources/themes/bootstrap4-light-purple/theme.css +33 -8
- package/resources/themes/fluent-light/theme.css +33 -8
- package/resources/themes/lara-dark-blue/theme.css +33 -8
- package/resources/themes/lara-dark-indigo/theme.css +33 -8
- package/resources/themes/lara-dark-purple/theme.css +33 -8
- package/resources/themes/lara-dark-teal/theme.css +33 -8
- package/resources/themes/lara-light-blue/theme.css +33 -8
- package/resources/themes/lara-light-indigo/theme.css +33 -8
- package/resources/themes/lara-light-purple/theme.css +33 -8
- package/resources/themes/lara-light-teal/theme.css +33 -8
- package/resources/themes/luna-amber/theme.css +33 -8
- package/resources/themes/luna-blue/theme.css +33 -8
- package/resources/themes/luna-green/theme.css +33 -8
- package/resources/themes/luna-pink/theme.css +33 -8
- package/resources/themes/md-dark-deeppurple/theme.css +33 -8
- package/resources/themes/md-dark-indigo/theme.css +33 -8
- package/resources/themes/md-light-deeppurple/theme.css +33 -8
- package/resources/themes/md-light-indigo/theme.css +33 -8
- package/resources/themes/mdc-dark-deeppurple/theme.css +33 -8
- package/resources/themes/mdc-dark-indigo/theme.css +33 -8
- package/resources/themes/mdc-light-deeppurple/theme.css +33 -8
- package/resources/themes/mdc-light-indigo/theme.css +33 -8
- package/resources/themes/mira/theme.css +33 -8
- package/resources/themes/nano/theme.css +33 -8
- package/resources/themes/nova/theme.css +33 -8
- package/resources/themes/nova-accent/theme.css +33 -8
- package/resources/themes/nova-alt/theme.css +33 -8
- package/resources/themes/rhea/theme.css +33 -8
- package/resources/themes/saga-blue/theme.css +33 -8
- package/resources/themes/saga-green/theme.css +33 -8
- package/resources/themes/saga-orange/theme.css +33 -8
- package/resources/themes/saga-purple/theme.css +33 -8
- package/resources/themes/soho-dark/theme.css +33 -8
- package/resources/themes/soho-light/theme.css +33 -8
- package/resources/themes/tailwind-light/theme.css +45 -20
- package/resources/themes/vela-blue/theme.css +33 -8
- package/resources/themes/vela-green/theme.css +33 -8
- package/resources/themes/vela-orange/theme.css +33 -8
- package/resources/themes/vela-purple/theme.css +33 -8
- package/resources/themes/viva-dark/theme.css +33 -8
- package/resources/themes/viva-light/theme.css +33 -8
- package/ripple/ripple.cjs.js +3 -2
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +3 -2
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +4 -3
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +28 -41
- package/row/row.cjs.min.js +1 -1
- package/row/row.d.ts +28 -0
- package/row/row.esm.js +15 -28
- package/row/row.esm.min.js +1 -1
- package/row/row.js +49 -64
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +3 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +4 -3
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +9 -7
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +11 -9
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +10 -8
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +37 -25
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +52 -1
- package/selectbutton/selectbutton.esm.js +38 -26
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +37 -27
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +7 -6
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +8 -7
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +8 -7
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +4 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +4 -3
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +5 -5
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +125 -114
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +103 -1
- package/slidemenu/slidemenu.esm.js +127 -116
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +125 -115
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +71 -39
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +34 -1
- package/slider/slider.esm.js +72 -40
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +71 -41
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +3 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +3 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +4 -3
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +74 -63
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +39 -11
- package/splitbutton/splitbutton.esm.js +76 -65
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +74 -63
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +3 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +10 -0
- package/splitter/splitter.esm.js +3 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +4 -3
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +81 -46
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +82 -47
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +81 -48
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +3 -1
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +3 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +4 -3
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +86 -48
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +87 -49
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +86 -50
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +8 -5
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +9 -6
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +7 -4
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +3 -1
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +3 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +4 -3
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +3 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +4 -3
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +110 -64
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +112 -66
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +111 -66
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +51 -43
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +51 -1
- package/timeline/timeline.esm.js +52 -44
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +51 -45
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +118 -75
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +122 -4
- package/toast/toast.esm.js +120 -77
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +116 -74
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +74 -21
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +40 -2
- package/togglebutton/togglebutton.esm.js +75 -22
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +73 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +3 -1
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +5 -11
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +4 -3
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +3 -2
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +7 -7
- package/tooltip/tooltip.esm.js +4 -3
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +3 -2
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +118 -88
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +139 -1
- package/tree/tree.esm.js +120 -90
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +116 -87
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +135 -102
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +143 -2
- package/treeselect/treeselect.esm.js +137 -104
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +136 -104
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +385 -198
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +305 -2
- package/treetable/treetable.esm.js +387 -200
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +383 -197
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +97 -40
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +64 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +99 -42
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +97 -42
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +31 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +28 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +32 -7
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +43 -29
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +78 -1
- package/virtualscroller/virtualscroller.esm.js +44 -30
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +43 -31
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
package/megamenu/megamenu.esm.js
CHANGED
|
@@ -1,25 +1,52 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import PrimeReact from 'primereact/api';
|
|
2
|
+
import PrimeReact, { PrimeReactContext } from 'primereact/api';
|
|
3
3
|
import { useMatchMedia, useEventListener, useResizeListener, useMountEffect, useUpdateEffect } from 'primereact/hooks';
|
|
4
|
-
import { Ripple } from 'primereact/ripple';
|
|
5
|
-
import { ObjectUtils, UniqueComponentId, DomHandler, ZIndexUtils, classNames, IconUtils } from 'primereact/utils';
|
|
6
|
-
import { AngleRightIcon } from 'primereact/icons/angleright';
|
|
7
4
|
import { AngleDownIcon } from 'primereact/icons/angledown';
|
|
5
|
+
import { AngleRightIcon } from 'primereact/icons/angleright';
|
|
8
6
|
import { BarsIcon } from 'primereact/icons/bars';
|
|
7
|
+
import { Ripple } from 'primereact/ripple';
|
|
8
|
+
import { UniqueComponentId, DomHandler, ZIndexUtils, classNames, mergeProps, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
9
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
9
10
|
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
function _typeof(obj) {
|
|
12
|
+
"@babel/helpers - typeof";
|
|
13
|
+
|
|
14
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
15
|
+
return typeof obj;
|
|
16
|
+
} : function (obj) {
|
|
17
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
18
|
+
}, _typeof(obj);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function _toPrimitive(input, hint) {
|
|
22
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
23
|
+
var prim = input[Symbol.toPrimitive];
|
|
24
|
+
if (prim !== undefined) {
|
|
25
|
+
var res = prim.call(input, hint || "default");
|
|
26
|
+
if (_typeof(res) !== "object") return res;
|
|
27
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
28
|
+
}
|
|
29
|
+
return (hint === "string" ? String : Number)(input);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function _toPropertyKey(arg) {
|
|
33
|
+
var key = _toPrimitive(arg, "string");
|
|
34
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function _defineProperty(obj, key, value) {
|
|
38
|
+
key = _toPropertyKey(key);
|
|
39
|
+
if (key in obj) {
|
|
40
|
+
Object.defineProperty(obj, key, {
|
|
41
|
+
value: value,
|
|
42
|
+
enumerable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
writable: true
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
obj[key] = value;
|
|
48
|
+
}
|
|
49
|
+
return obj;
|
|
23
50
|
}
|
|
24
51
|
|
|
25
52
|
function _arrayWithHoles(arr) {
|
|
@@ -77,7 +104,7 @@ function _slicedToArray(arr, i) {
|
|
|
77
104
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
78
105
|
}
|
|
79
106
|
|
|
80
|
-
var MegaMenuBase = {
|
|
107
|
+
var MegaMenuBase = ComponentBase.extend({
|
|
81
108
|
defaultProps: {
|
|
82
109
|
__TYPE: 'MegaMenu',
|
|
83
110
|
id: null,
|
|
@@ -92,17 +119,14 @@ var MegaMenuBase = {
|
|
|
92
119
|
menuIcon: null,
|
|
93
120
|
end: null,
|
|
94
121
|
children: undefined
|
|
95
|
-
},
|
|
96
|
-
getProps: function getProps(props) {
|
|
97
|
-
return ObjectUtils.getMergedProps(props, MegaMenuBase.defaultProps);
|
|
98
|
-
},
|
|
99
|
-
getOtherProps: function getOtherProps(props) {
|
|
100
|
-
return ObjectUtils.getDiffProps(props, MegaMenuBase.defaultProps);
|
|
101
122
|
}
|
|
102
|
-
};
|
|
123
|
+
});
|
|
103
124
|
|
|
125
|
+
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; }
|
|
126
|
+
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; }
|
|
104
127
|
var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
105
|
-
var
|
|
128
|
+
var context = React.useContext(PrimeReactContext);
|
|
129
|
+
var props = MegaMenuBase.getProps(inProps, context);
|
|
106
130
|
var _React$useState = React.useState(null),
|
|
107
131
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
108
132
|
activeItemState = _React$useState2[0],
|
|
@@ -121,6 +145,22 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
121
145
|
var horizontal = props.orientation === 'horizontal';
|
|
122
146
|
var vertical = props.orientation === 'vertical';
|
|
123
147
|
var isMobileMode = useMatchMedia("screen and (max-width: ".concat(props.breakpoint, ")"), !!props.breakpoint);
|
|
148
|
+
var _MegaMenuBase$setMeta = MegaMenuBase.setMetaData({
|
|
149
|
+
props: props,
|
|
150
|
+
state: {
|
|
151
|
+
activeItem: activeItemState,
|
|
152
|
+
attributeSelector: attributeSelectorState,
|
|
153
|
+
mobileActive: mobileActiveState
|
|
154
|
+
}
|
|
155
|
+
}),
|
|
156
|
+
ptm = _MegaMenuBase$setMeta.ptm;
|
|
157
|
+
var getPTOptions = function getPTOptions(item, key) {
|
|
158
|
+
return ptm(key, {
|
|
159
|
+
context: {
|
|
160
|
+
active: activeItemState === item
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
};
|
|
124
164
|
var _useEventListener = useEventListener({
|
|
125
165
|
type: 'click',
|
|
126
166
|
listener: function listener(event) {
|
|
@@ -289,7 +329,7 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
289
329
|
useUpdateEffect(function () {
|
|
290
330
|
var currentPanel = DomHandler.findSingle(elementRef.current, '.p-menuitem-active > .p-megamenu-panel');
|
|
291
331
|
if (activeItemState && !isMobileMode) {
|
|
292
|
-
ZIndexUtils.set('menu', currentPanel, PrimeReact.autoZIndex, PrimeReact.zIndex['menu']);
|
|
332
|
+
ZIndexUtils.set('menu', currentPanel, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['menu'] || PrimeReact.zIndex['menu']);
|
|
293
333
|
}
|
|
294
334
|
if (isMobileMode) {
|
|
295
335
|
currentPanel && currentPanel.previousElementSibling.scrollIntoView({
|
|
@@ -303,23 +343,21 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
303
343
|
}, [activeItemState]);
|
|
304
344
|
var createSeparator = function createSeparator(index) {
|
|
305
345
|
var key = 'separator_' + index;
|
|
306
|
-
|
|
346
|
+
var separatorProps = mergeProps({
|
|
307
347
|
key: key,
|
|
308
|
-
className:
|
|
309
|
-
role:
|
|
310
|
-
});
|
|
348
|
+
className: 'p-menu-separator',
|
|
349
|
+
role: 'separator'
|
|
350
|
+
}, ptm('separator'));
|
|
351
|
+
return /*#__PURE__*/React.createElement("li", separatorProps);
|
|
311
352
|
};
|
|
312
353
|
var createSubmenuIcon = function createSubmenuIcon(item) {
|
|
313
354
|
if (item.items) {
|
|
314
355
|
var iconClassName = 'p-submenu-icon';
|
|
315
|
-
var
|
|
316
|
-
className: iconClassName
|
|
317
|
-
}) : props.submenuIcon || /*#__PURE__*/React.createElement(AngleDownIcon, {
|
|
318
|
-
className: iconClassName
|
|
319
|
-
});
|
|
320
|
-
var submenuIcon = IconUtils.getJSXIcon(icon, {
|
|
356
|
+
var submenuIconProps = mergeProps({
|
|
321
357
|
className: iconClassName
|
|
322
|
-
},
|
|
358
|
+
}, ptm('submenuIcon'));
|
|
359
|
+
var icon = vertical ? props.submenuIcon || /*#__PURE__*/React.createElement(AngleRightIcon, submenuIconProps) : props.submenuIcon || /*#__PURE__*/React.createElement(AngleDownIcon, submenuIconProps);
|
|
360
|
+
var submenuIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, submenuIconProps), {
|
|
323
361
|
props: props
|
|
324
362
|
});
|
|
325
363
|
return submenuIcon;
|
|
@@ -347,16 +385,24 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
347
385
|
var label = item.label && /*#__PURE__*/React.createElement("span", {
|
|
348
386
|
className: "p-menuitem-text"
|
|
349
387
|
}, item.label);
|
|
350
|
-
var
|
|
388
|
+
var actionProps = mergeProps({
|
|
351
389
|
href: item.url || '#',
|
|
352
390
|
className: linkClassName,
|
|
353
391
|
target: item.target,
|
|
354
392
|
onClick: function onClick(event) {
|
|
355
393
|
return onLeafClick(event, item);
|
|
356
394
|
},
|
|
357
|
-
role:
|
|
358
|
-
|
|
359
|
-
},
|
|
395
|
+
role: 'menuitem',
|
|
396
|
+
'aria-disabled': item.disabled
|
|
397
|
+
}, getPTOptions(item, 'action'));
|
|
398
|
+
var submenuItemProps = mergeProps({
|
|
399
|
+
key: key,
|
|
400
|
+
id: item.id,
|
|
401
|
+
className: _className,
|
|
402
|
+
style: item.style,
|
|
403
|
+
role: 'none'
|
|
404
|
+
}, getPTOptions(item, 'submenuItem'));
|
|
405
|
+
var content = /*#__PURE__*/React.createElement("a", actionProps, icon, label, /*#__PURE__*/React.createElement(Ripple, null));
|
|
360
406
|
if (item.template) {
|
|
361
407
|
var defaultContentOptions = {
|
|
362
408
|
onClick: function onClick(event) {
|
|
@@ -370,13 +416,7 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
370
416
|
};
|
|
371
417
|
content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);
|
|
372
418
|
}
|
|
373
|
-
return /*#__PURE__*/React.createElement("li",
|
|
374
|
-
key: key,
|
|
375
|
-
id: item.id,
|
|
376
|
-
className: _className,
|
|
377
|
-
style: item.style,
|
|
378
|
-
role: "none"
|
|
379
|
-
}, content);
|
|
419
|
+
return /*#__PURE__*/React.createElement("li", submenuItemProps, content);
|
|
380
420
|
}
|
|
381
421
|
};
|
|
382
422
|
var createSubmenu = function createSubmenu(submenu) {
|
|
@@ -387,14 +427,15 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
387
427
|
'p-disabled': submenu.disabled
|
|
388
428
|
}, submenu.className);
|
|
389
429
|
var items = submenu.items.map(createSubmenuItem);
|
|
390
|
-
|
|
391
|
-
key: submenu.label
|
|
392
|
-
}, /*#__PURE__*/React.createElement("li", {
|
|
430
|
+
var submenuHeaderProps = mergeProps({
|
|
393
431
|
id: submenu.id,
|
|
394
432
|
className: className,
|
|
395
433
|
style: submenu.style,
|
|
396
|
-
role:
|
|
397
|
-
},
|
|
434
|
+
role: 'presentation'
|
|
435
|
+
}, ptm('submenuHeader'));
|
|
436
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
437
|
+
key: submenu.label
|
|
438
|
+
}, /*#__PURE__*/React.createElement("li", submenuHeaderProps, submenu.label), items);
|
|
398
439
|
};
|
|
399
440
|
var createSubmenus = function createSubmenus(column) {
|
|
400
441
|
return column.map(createSubmenu);
|
|
@@ -402,13 +443,15 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
402
443
|
var createColumn = function createColumn(category, column, index, columnClassName) {
|
|
403
444
|
var key = category.label + '_column_' + index;
|
|
404
445
|
var submenus = createSubmenus(column);
|
|
405
|
-
|
|
446
|
+
var columnProps = mergeProps({
|
|
406
447
|
key: key,
|
|
407
448
|
className: columnClassName
|
|
408
|
-
},
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
449
|
+
}, ptm('column'));
|
|
450
|
+
var submenuProps = mergeProps({
|
|
451
|
+
className: 'p-megamenu-submenu',
|
|
452
|
+
role: 'menu'
|
|
453
|
+
}, ptm('submenu'));
|
|
454
|
+
return /*#__PURE__*/React.createElement("div", columnProps, /*#__PURE__*/React.createElement("ul", submenuProps, submenus));
|
|
412
455
|
};
|
|
413
456
|
var createColumns = function createColumns(category) {
|
|
414
457
|
if (category.items) {
|
|
@@ -422,17 +465,19 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
422
465
|
var createCategoryPanel = function createCategoryPanel(category) {
|
|
423
466
|
if (category.items) {
|
|
424
467
|
var columns = createColumns(category);
|
|
425
|
-
|
|
426
|
-
className:
|
|
427
|
-
},
|
|
428
|
-
|
|
429
|
-
|
|
468
|
+
var panelProps = mergeProps({
|
|
469
|
+
className: 'p-megamenu-panel'
|
|
470
|
+
}, ptm('panel'));
|
|
471
|
+
var gridProps = mergeProps({
|
|
472
|
+
className: 'p-megamenu-grid'
|
|
473
|
+
}, ptm('grid'));
|
|
474
|
+
return /*#__PURE__*/React.createElement("div", panelProps, /*#__PURE__*/React.createElement("div", gridProps, columns));
|
|
430
475
|
}
|
|
431
476
|
return null;
|
|
432
477
|
};
|
|
433
478
|
var createStyle = function createStyle() {
|
|
434
479
|
if (!styleElementRef.current) {
|
|
435
|
-
styleElementRef.current = DomHandler.createInlineStyle(PrimeReact.nonce);
|
|
480
|
+
styleElementRef.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce);
|
|
436
481
|
var selector = "".concat(attributeSelectorState);
|
|
437
482
|
var innerHTML = "\n@media screen and (max-width: ".concat(props.breakpoint, ") {\n .p-megamenu[").concat(selector, "] > .p-megamenu-root-list .p-menuitem-active .p-megamenu-panel {\n position: relative;\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n background: inherit;\n }\n\n .p-megamenu[").concat(selector, "] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-megamenu[").concat(selector, "] .p-megamenu-grid {\n flex-wrap: wrap;\n }\n\n ").concat(horizontal ? "\n.p-megamenu[".concat(selector, "] .p-megamenu-button {\n display: flex;\n}\n\n.p-megamenu[").concat(selector, "].p-megamenu-horizontal {\n position: relative;\n}\n\n.p-megamenu[").concat(selector, "].p-megamenu-horizontal .p-megamenu-root-list {\n display: none;\n}\n\n.p-megamenu-horizontal[").concat(selector, "] div[class*=\"p-megamenu-col-\"] {\n width: auto;\n flex: 1;\n padding: 0;\n}\n\n.p-megamenu[").concat(selector, "].p-megamenu-mobile-active .p-megamenu-root-list {\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n top: 100%;\n left: 0;\n z-index: 1;\n}\n ") : '', "\n\n ").concat(vertical ? "\n.p-megamenu-vertical[".concat(selector, "] {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(selector, "] .p-megamenu-root-list {\n max-height: ").concat(props.scrollHeight, ";\n overflow: ").concat(props.scrollHeight ? 'auto' : '', ";\n}\n.p-megamenu-vertical[").concat(selector, "] div[class*=\"p-megamenu-col-\"] {\n width: 100%;\n padding: 0;\n}\n\n.p-megamenu-vertical[").concat(selector, "] .p-megamenu-submenu {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(selector, "] div[class*=\"p-megamenu-col-\"] .p-megamenu-submenu-header {\n background: inherit;\n}\n\n.p-megamenu-vertical[").concat(selector, "] .p-submenu-icon:before {\n content: \"\\e930\";\n}\n ") : '', "\n}\n");
|
|
438
483
|
styleElementRef.current.innerHTML = innerHTML;
|
|
@@ -457,27 +502,20 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
457
502
|
var linkClassName = classNames('p-menuitem-link', {
|
|
458
503
|
'p-disabled': category.disabled
|
|
459
504
|
});
|
|
460
|
-
var
|
|
505
|
+
var iconProps = mergeProps({
|
|
461
506
|
className: 'p-menuitem-icon'
|
|
462
|
-
},
|
|
507
|
+
}, getPTOptions(category, 'icon'));
|
|
508
|
+
var icon = IconUtils.getJSXIcon(category.icon, _objectSpread({}, iconProps), {
|
|
463
509
|
props: props
|
|
464
510
|
});
|
|
465
|
-
var
|
|
466
|
-
className:
|
|
467
|
-
}, category
|
|
511
|
+
var labelProps = mergeProps({
|
|
512
|
+
className: 'p-menuitem-text'
|
|
513
|
+
}, getPTOptions(category, 'label'));
|
|
514
|
+
var label = category.label && /*#__PURE__*/React.createElement("span", labelProps, category.label);
|
|
468
515
|
var itemContent = category.template ? ObjectUtils.getJSXElement(category.template, category) : null;
|
|
469
516
|
var submenuIcon = createSubmenuIcon(category);
|
|
470
517
|
var panel = createCategoryPanel(category);
|
|
471
|
-
|
|
472
|
-
key: category.label + '_' + index,
|
|
473
|
-
id: category.id,
|
|
474
|
-
className: className,
|
|
475
|
-
style: category.style,
|
|
476
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
477
|
-
return onCategoryMouseEnter(e, category);
|
|
478
|
-
},
|
|
479
|
-
role: "none"
|
|
480
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
518
|
+
var headerActionProps = mergeProps({
|
|
481
519
|
href: category.url || '#',
|
|
482
520
|
className: linkClassName,
|
|
483
521
|
target: category.target,
|
|
@@ -487,36 +525,50 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
487
525
|
onKeyDown: function onKeyDown(e) {
|
|
488
526
|
return onCategoryKeyDown(e, category);
|
|
489
527
|
},
|
|
490
|
-
role:
|
|
491
|
-
|
|
492
|
-
},
|
|
528
|
+
role: 'menuitem',
|
|
529
|
+
'aria-haspopup': category.items != null
|
|
530
|
+
}, getPTOptions(category, 'headerAction'));
|
|
531
|
+
var menuItemProps = mergeProps({
|
|
532
|
+
key: category.label + '_' + index,
|
|
533
|
+
id: category.id,
|
|
534
|
+
className: className,
|
|
535
|
+
style: category.style,
|
|
536
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
537
|
+
return onCategoryMouseEnter(e, category);
|
|
538
|
+
},
|
|
539
|
+
role: 'none'
|
|
540
|
+
}, getPTOptions(category, 'menuitem'));
|
|
541
|
+
return /*#__PURE__*/React.createElement("li", menuItemProps, /*#__PURE__*/React.createElement("a", headerActionProps, icon, label, itemContent, submenuIcon, /*#__PURE__*/React.createElement(Ripple, null)), panel);
|
|
493
542
|
};
|
|
494
543
|
var createMenu = function createMenu() {
|
|
544
|
+
var menuProps = mergeProps({
|
|
545
|
+
className: 'p-megamenu-root-list',
|
|
546
|
+
role: 'menubar'
|
|
547
|
+
}, ptm('menu'));
|
|
495
548
|
if (props.model) {
|
|
496
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
497
|
-
className: "p-megamenu-root-list",
|
|
498
|
-
role: "menubar"
|
|
499
|
-
}, props.model.map(function (item, index) {
|
|
549
|
+
return /*#__PURE__*/React.createElement("ul", menuProps, props.model.map(function (item, index) {
|
|
500
550
|
return createCategory(item, index);
|
|
501
551
|
}));
|
|
502
552
|
}
|
|
503
553
|
return null;
|
|
504
554
|
};
|
|
505
555
|
var createStartContent = function createStartContent() {
|
|
556
|
+
var startProps = mergeProps({
|
|
557
|
+
className: 'p-megamenu-start'
|
|
558
|
+
}, ptm('start'));
|
|
506
559
|
if (props.start) {
|
|
507
560
|
var _start = ObjectUtils.getJSXElement(props.start, props);
|
|
508
|
-
return /*#__PURE__*/React.createElement("div",
|
|
509
|
-
className: "p-megamenu-start"
|
|
510
|
-
}, _start);
|
|
561
|
+
return /*#__PURE__*/React.createElement("div", startProps, _start);
|
|
511
562
|
}
|
|
512
563
|
return null;
|
|
513
564
|
};
|
|
514
565
|
var createEndContent = function createEndContent() {
|
|
566
|
+
var endProps = mergeProps({
|
|
567
|
+
className: 'p-megamenu-end'
|
|
568
|
+
}, ptm('end'));
|
|
515
569
|
if (props.end) {
|
|
516
570
|
var _end = ObjectUtils.getJSXElement(props.end, props);
|
|
517
|
-
return /*#__PURE__*/React.createElement("div",
|
|
518
|
-
className: "p-megamenu-end"
|
|
519
|
-
}, _end);
|
|
571
|
+
return /*#__PURE__*/React.createElement("div", endProps, _end);
|
|
520
572
|
}
|
|
521
573
|
return null;
|
|
522
574
|
};
|
|
@@ -541,22 +593,22 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
541
593
|
|
|
542
594
|
return button;
|
|
543
595
|
};
|
|
544
|
-
var otherProps = MegaMenuBase.getOtherProps(props);
|
|
545
596
|
var className = classNames('p-megamenu p-component', {
|
|
546
597
|
'p-megamenu-horizontal': props.orientation === 'horizontal',
|
|
547
598
|
'p-megamenu-vertical': props.orientation === 'vertical',
|
|
548
599
|
'p-megamenu-mobile-active': mobileActiveState
|
|
549
600
|
}, props.className);
|
|
550
|
-
var
|
|
551
|
-
var start = createStartContent();
|
|
552
|
-
var end = createEndContent();
|
|
553
|
-
var menuButton = createMenuButton();
|
|
554
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
601
|
+
var rootProps = mergeProps({
|
|
555
602
|
ref: elementRef,
|
|
556
603
|
id: props.id,
|
|
557
604
|
className: className,
|
|
558
605
|
style: props.style
|
|
559
|
-
},
|
|
606
|
+
}, MegaMenuBase.getOtherProps(props), ptm('root'));
|
|
607
|
+
var menu = createMenu();
|
|
608
|
+
var start = createStartContent();
|
|
609
|
+
var end = createEndContent();
|
|
610
|
+
var menuButton = createMenuButton();
|
|
611
|
+
return /*#__PURE__*/React.createElement("div", rootProps, start, menuButton, menu, end);
|
|
560
612
|
}));
|
|
561
613
|
MegaMenu.displayName = 'MegaMenu';
|
|
562
614
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import n from"primereact/api";import{useMatchMedia as t,useEventListener as r,useResizeListener as a,useMountEffect as l,useUpdateEffect as i}from"primereact/hooks";import{Ripple as u}from"primereact/ripple";import{ObjectUtils as o,UniqueComponentId as m,DomHandler as c,ZIndexUtils as s,classNames as p,IconUtils as f}from"primereact/utils";import{AngleRightIcon as d}from"primereact/icons/angleright";import{AngleDownIcon as g}from"primereact/icons/angledown";import{BarsIcon as v}from"primereact/icons/bars";function b(){return b=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},b.apply(this,arguments)}function h(e){if(Array.isArray(e))return e}function y(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,l,i,u=[],o=!0,m=!1;try{if(l=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;o=!1}else for(;!(o=(r=l.call(t)).done)&&(u.push(r.value),u.length!==n);o=!0);}catch(e){m=!0,a=e}finally{try{if(!o&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(m)throw a}}return u}}function E(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 N(e,n){if(e){if("string"==typeof e)return E(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)?E(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 w(e,n){return h(e)||y(e,n)||N(e,n)||k()}var S={defaultProps:{__TYPE:"MegaMenu",id:null,model:null,style:null,className:null,orientation:"horizontal",breakpoint:void 0,scrollHeight:"400px",start:null,submenuIcon:null,menuIcon:null,end:null,children:void 0},getProps:function(e){return o.getMergedProps(e,S.defaultProps)},getOtherProps:function(e){return o.getDiffProps(e,S.defaultProps)}},x=e.memo(e.forwardRef((function(h,y){var E=S.getProps(h),N=w(e.useState(null),2),k=N[0],x=N[1],I=w(e.useState(null),2),D=I[0],C=I[1],P=w(e.useState(!1),2),O=P[0],z=P[1],j=e.useRef(null),J=e.useRef(null),M=e.useRef(null),X="horizontal"===E.orientation,A="vertical"===E.orientation,_=t("screen and (max-width: ".concat(E.breakpoint,")"),!!E.breakpoint),H=w(r({type:"click",listener:function(e){_&&!O||!q(e)||(x(null),z(!1))}}),1)[0],R=w(a({listener:function(){_&&!O||(x(null),z(!1))}}),1)[0],T=function(e,n){n.disabled?e.preventDefault():(n.url||e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),x(null),z(!1))},F=function(e,n){var t=e.currentTarget.parentElement;switch(e.which){case 40:X?K(n):Z(t),e.preventDefault();break;case 38:A?$(t):n.items&&n===k&&L(),e.preventDefault();break;case 39:X?Z(t):K(n),e.preventDefault();break;case 37:X?$(t):n.items&&n===k&&L(),e.preventDefault()}},K=function(e){e.items&&x(e)},L=function(e){x(null)},U=function(e){e.preventDefault(),z((function(e){return!e})),x(null)},V=function e(n){var t=n.nextElementSibling;return t?c.hasClass(t,"p-disabled")||!c.hasClass(t,"p-menuitem")?e(t):t:null},Y=function e(n){var t=n.previousElementSibling;return t?c.hasClass(t,"p-disabled")||!c.hasClass(t,"p-menuitem")?e(t):t:null},Z=function(e){var n=V(e);n&&n.children[0].focus()},$=function(e){var n=Y(e);n&&n.children[0].focus()},q=function(e){return j.current&&!(j.current.isSameNode(e.target)||j.current.contains(e.target)||M.current&&M.current.contains(e.target))},B=function(e){var n;switch(e.items?e.items.length:0){case 2:n="p-megamenu-col-6";break;case 3:n="p-megamenu-col-4";break;case 4:n="p-megamenu-col-3";break;case 6:n="p-megamenu-col-2";break;default:n="p-megamenu-col-12"}return n};e.useImperativeHandle(y,(function(){return{props:E,getElement:function(){return j.current}}})),l((function(){E.breakpoint&&!D&&C(m()),H(),R()})),i((function(){var e=c.findSingle(j.current,".p-menuitem-active > .p-megamenu-panel");return k&&!_&&s.set("menu",e,n.autoZIndex,n.zIndex.menu),_&&e&&e.previousElementSibling.scrollIntoView({block:"nearest",inline:"nearest"}),function(){s.clear(e)}}),[k]);var G=function(n){return e.createElement("li",{key:"separator_"+n,className:"p-menu-separator",role:"separator"})},Q=function(n){if(n.items){var t="p-submenu-icon";return f.getJSXIcon(A?E.submenuIcon||e.createElement(d,{className:t}):E.submenuIcon||e.createElement(g,{className:t}),{className:t},{props:E})}return null},W=function(n,t){if(!1===n.visible)return null;if(n.separator)return G(t);var r=n.label+"_"+t,a=p("p-menuitem",n.className),l=p("p-menuitem-link",{"p-disabled":n.disabled}),i=p(n.icon,"p-menuitem-icon"),m=f.getJSXIcon(n.icon,{className:"p-menuitem-icon"},{props:E}),c=e.createElement("a",{href:n.url||"#",className:l,target:n.target,onClick:function(e){return T(e,n)},role:"menuitem","aria-disabled":n.disabled},m,n.label&&e.createElement("span",{className:"p-menuitem-text"},n.label),e.createElement(u,null));return n.template&&(c=o.getJSXElement(n.template,n,{onClick:function(e){return T(e,n)},className:l,labelClassName:"p-menuitem-text",iconClassName:i,element:c,props:E})),e.createElement("li",{key:r,id:n.id,className:a,style:n.style,role:"none"},c)},ee=function(n){if(!1===n.visible)return null;var t=p("p-megamenu-submenu-header",{"p-disabled":n.disabled},n.className),r=n.items.map(W);return e.createElement(e.Fragment,{key:n.label},e.createElement("li",{id:n.id,className:t,style:n.style,role:"presentation"},n.label),r)},ne=function(e){return e.map(ee)},te=function(n,t,r,a){var l=n.label+"_column_"+r,i=ne(t);return e.createElement("div",{key:l,className:a},e.createElement("ul",{className:"p-megamenu-submenu",role:"menu"},i))},re=function(e){if(e.items){var n=B(e);return e.items.map((function(t,r){return te(e,t,r,n)}))}return null},ae=function(n){if(n.items){var t=re(n);return e.createElement("div",{className:"p-megamenu-panel"},e.createElement("div",{className:"p-megamenu-grid"},t))}return null},le=function(){if(!J.current){J.current=c.createInlineStyle(n.nonce);var e="".concat(D),t="\n@media screen and (max-width: ".concat(E.breakpoint,") {\n .p-megamenu[").concat(e,"] > .p-megamenu-root-list .p-menuitem-active .p-megamenu-panel {\n position: relative;\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n background: inherit;\n }\n\n .p-megamenu[").concat(e,"] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-megamenu[").concat(e,"] .p-megamenu-grid {\n flex-wrap: wrap;\n }\n\n ").concat(X?"\n.p-megamenu[".concat(e,"] .p-megamenu-button {\n display: flex;\n}\n\n.p-megamenu[").concat(e,"].p-megamenu-horizontal {\n position: relative;\n}\n\n.p-megamenu[").concat(e,"].p-megamenu-horizontal .p-megamenu-root-list {\n display: none;\n}\n\n.p-megamenu-horizontal[").concat(e,'] div[class*="p-megamenu-col-"] {\n width: auto;\n flex: 1;\n padding: 0;\n}\n\n.p-megamenu[').concat(e,"].p-megamenu-mobile-active .p-megamenu-root-list {\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n top: 100%;\n left: 0;\n z-index: 1;\n}\n "):"","\n\n ").concat(A?"\n.p-megamenu-vertical[".concat(e,"] {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(e,"] .p-megamenu-root-list {\n max-height: ").concat(E.scrollHeight,";\n overflow: ").concat(E.scrollHeight?"auto":"",";\n}\n.p-megamenu-vertical[").concat(e,'] div[class*="p-megamenu-col-"] {\n width: 100%;\n padding: 0;\n}\n\n.p-megamenu-vertical[').concat(e,"] .p-megamenu-submenu {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(e,'] div[class*="p-megamenu-col-"] .p-megamenu-submenu-header {\n background: inherit;\n}\n\n.p-megamenu-vertical[').concat(e,'] .p-submenu-icon:before {\n content: "\\e930";\n}\n '):"","\n}\n");J.current.innerHTML=t}};i((function(){return D&&j.current&&(j.current.setAttribute(D,""),le()),function(){J.current=c.removeInlineStyle(J.current)}}),[D,E.breakpoint]);var ie=function(n,t){var r=p("p-menuitem",{"p-menuitem-active":n===k},n.className),a=p("p-menuitem-link",{"p-disabled":n.disabled}),l=f.getJSXIcon(n.icon,{className:"p-menuitem-icon"},{props:E}),i=n.label&&e.createElement("span",{className:"p-menuitem-text"},n.label),m=n.template?o.getJSXElement(n.template,n):null,c=Q(n),s=ae(n);return e.createElement("li",{key:n.label+"_"+t,id:n.id,className:r,style:n.style,onMouseEnter:function(e){return t=e,void((r=n).disabled||_?t.preventDefault():k&&x(r));var t,r},role:"none"},e.createElement("a",{href:n.url||"#",className:a,target:n.target,onClick:function(e){return t=e,(r=n).disabled||(r.url||t.preventDefault(),r.command&&r.command({originalEvent:t,item:E.item}),r.items&&x(k&&k===r?null:r)),void t.preventDefault();var t,r},onKeyDown:function(e){return F(e,n)},role:"menuitem","aria-haspopup":null!=n.items},l,i,m,c,e.createElement(u,null)),s)},ue=S.getOtherProps(E),oe=p("p-megamenu p-component",{"p-megamenu-horizontal":"horizontal"===E.orientation,"p-megamenu-vertical":"vertical"===E.orientation,"p-megamenu-mobile-active":O},E.className),me=E.model?e.createElement("ul",{className:"p-megamenu-root-list",role:"menubar"},E.model.map((function(e,n){return ie(e,n)}))):null,ce=function(){if(E.start){var n=o.getJSXElement(E.start,E);return e.createElement("div",{className:"p-megamenu-start"},n)}return null}(),se=function(){if(E.end){var n=o.getJSXElement(E.end,E);return e.createElement("div",{className:"p-megamenu-end"},n)}return null}(),pe=function(){if("vertical"===E.orientation||E.model&&E.model.length<1)return null;var n=f.getJSXIcon(E.menuIcon||e.createElement(v,null),void 0,{props:E});return e.createElement("a",{ref:M,href:"#",role:"button",tabIndex:0,className:"p-megamenu-button",onClick:U},n)}();return e.createElement("div",b({ref:j,id:E.id,className:oe,style:E.style},ue),ce,pe,me,se)})));x.displayName="MegaMenu";export{x as MegaMenu};
|
|
1
|
+
import*as e from"react";import n,{PrimeReactContext as t}from"primereact/api";import{useMatchMedia as r,useEventListener as a,useResizeListener as l,useMountEffect as i,useUpdateEffect as o}from"primereact/hooks";import{AngleDownIcon as u}from"primereact/icons/angledown";import{AngleRightIcon as m}from"primereact/icons/angleright";import{BarsIcon as c}from"primereact/icons/bars";import{Ripple as s}from"primereact/ripple";import{UniqueComponentId as p,DomHandler as f,ZIndexUtils as d,classNames as b,mergeProps as g,ObjectUtils as v,IconUtils as y}from"primereact/utils";import{ComponentBase as h}from"primereact/componentbase";function E(e){return E="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},E(e)}function S(e,n){if("object"!==E(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function k(e){var n=S(e,"string");return"symbol"===E(n)?n:String(n)}function w(e,n,t){return(n=k(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function N(e){if(Array.isArray(e))return e}function x(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,l,i,o=[],u=!0,m=!1;try{if(l=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=l.call(t)).done)&&(o.push(r.value),o.length!==n);u=!0);}catch(e){m=!0,a=e}finally{try{if(!u&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(m)throw a}}return o}}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 O(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 j(){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 D(e,n){return N(e)||x(e,n)||O(e,n)||j()}var P=h.extend({defaultProps:{__TYPE:"MegaMenu",id:null,model:null,style:null,className:null,orientation:"horizontal",breakpoint:void 0,scrollHeight:"400px",start:null,submenuIcon:null,menuIcon:null,end:null,children:void 0}});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 z(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){w(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(e.forwardRef((function(h,E){var S=e.useContext(t),k=P.getProps(h,S),w=D(e.useState(null),2),N=w[0],x=w[1],I=D(e.useState(null),2),O=I[0],j=I[1],C=D(e.useState(!1),2),A=C[0],J=C[1],M=e.useRef(null),X=e.useRef(null),_=e.useRef(null),H="horizontal"===k.orientation,T="vertical"===k.orientation,R=r("screen and (max-width: ".concat(k.breakpoint,")"),!!k.breakpoint),Z=P.setMetaData({props:k,state:{activeItem:N,attributeSelector:O,mobileActive:A}}).ptm,F=function(e,n){return Z(n,{context:{active:N===e}})},K=D(a({type:"click",listener:function(e){R&&!A||!ee(e)||(x(null),J(!1))}}),1)[0],L=D(l({listener:function(){R&&!A||(x(null),J(!1))}}),1)[0],U=function(e,n){n.disabled?e.preventDefault():(n.url||e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),x(null),J(!1))},V=function(e,n){var t=e.currentTarget.parentElement;switch(e.which){case 40:H?Y(n):Q(t),e.preventDefault();break;case 38:T?W(t):n.items&&n===N&&$(),e.preventDefault();break;case 39:H?Q(t):Y(n),e.preventDefault();break;case 37:H?W(t):n.items&&n===N&&$(),e.preventDefault()}},Y=function(e){e.items&&x(e)},$=function(e){x(null)},q=function(e){e.preventDefault(),J((function(e){return!e})),x(null)},B=function e(n){var t=n.nextElementSibling;return t?f.hasClass(t,"p-disabled")||!f.hasClass(t,"p-menuitem")?e(t):t:null},G=function e(n){var t=n.previousElementSibling;return t?f.hasClass(t,"p-disabled")||!f.hasClass(t,"p-menuitem")?e(t):t:null},Q=function(e){var n=B(e);n&&n.children[0].focus()},W=function(e){var n=G(e);n&&n.children[0].focus()},ee=function(e){return M.current&&!(M.current.isSameNode(e.target)||M.current.contains(e.target)||_.current&&_.current.contains(e.target))},ne=function(e){var n;switch(e.items?e.items.length:0){case 2:n="p-megamenu-col-6";break;case 3:n="p-megamenu-col-4";break;case 4:n="p-megamenu-col-3";break;case 6:n="p-megamenu-col-2";break;default:n="p-megamenu-col-12"}return n};e.useImperativeHandle(E,(function(){return{props:k,getElement:function(){return M.current}}})),i((function(){k.breakpoint&&!O&&j(p()),K(),L()})),o((function(){var e=f.findSingle(M.current,".p-menuitem-active > .p-megamenu-panel");return N&&!R&&d.set("menu",e,S&&S.autoZIndex||n.autoZIndex,S&&S.zIndex.menu||n.zIndex.menu),R&&e&&e.previousElementSibling.scrollIntoView({block:"nearest",inline:"nearest"}),function(){d.clear(e)}}),[N]);var te=function(n){var t=g({key:"separator_"+n,className:"p-menu-separator",role:"separator"},Z("separator"));return e.createElement("li",t)},re=function(n){if(n.items){var t=g({className:"p-submenu-icon"},Z("submenuIcon"));return y.getJSXIcon(T?k.submenuIcon||e.createElement(m,t):k.submenuIcon||e.createElement(u,t),z({},t),{props:k})}return null},ae=function(n,t){if(!1===n.visible)return null;if(n.separator)return te(t);var r=n.label+"_"+t,a=b("p-menuitem",n.className),l=b("p-menuitem-link",{"p-disabled":n.disabled}),i=b(n.icon,"p-menuitem-icon"),o=y.getJSXIcon(n.icon,{className:"p-menuitem-icon"},{props:k}),u=n.label&&e.createElement("span",{className:"p-menuitem-text"},n.label),m=g({href:n.url||"#",className:l,target:n.target,onClick:function(e){return U(e,n)},role:"menuitem","aria-disabled":n.disabled},F(n,"action")),c=g({key:r,id:n.id,className:a,style:n.style,role:"none"},F(n,"submenuItem")),p=e.createElement("a",m,o,u,e.createElement(s,null));return n.template&&(p=v.getJSXElement(n.template,n,{onClick:function(e){return U(e,n)},className:l,labelClassName:"p-menuitem-text",iconClassName:i,element:p,props:k})),e.createElement("li",c,p)},le=function(n){if(!1===n.visible)return null;var t=b("p-megamenu-submenu-header",{"p-disabled":n.disabled},n.className),r=n.items.map(ae),a=g({id:n.id,className:t,style:n.style,role:"presentation"},Z("submenuHeader"));return e.createElement(e.Fragment,{key:n.label},e.createElement("li",a,n.label),r)},ie=function(e){return e.map(le)},oe=function(n,t,r,a){var l=n.label+"_column_"+r,i=ie(t),o=g({key:l,className:a},Z("column")),u=g({className:"p-megamenu-submenu",role:"menu"},Z("submenu"));return e.createElement("div",o,e.createElement("ul",u,i))},ue=function(e){if(e.items){var n=ne(e);return e.items.map((function(t,r){return oe(e,t,r,n)}))}return null},me=function(n){if(n.items){var t=ue(n),r=g({className:"p-megamenu-panel"},Z("panel")),a=g({className:"p-megamenu-grid"},Z("grid"));return e.createElement("div",r,e.createElement("div",a,t))}return null},ce=function(){if(!X.current){X.current=f.createInlineStyle(S&&S.nonce||n.nonce);var e="".concat(O),t="\n@media screen and (max-width: ".concat(k.breakpoint,") {\n .p-megamenu[").concat(e,"] > .p-megamenu-root-list .p-menuitem-active .p-megamenu-panel {\n position: relative;\n left: 0 !important;\n box-shadow: none;\n border-radius: 0;\n background: inherit;\n }\n\n .p-megamenu[").concat(e,"] .p-menuitem-active > .p-menuitem-link > .p-submenu-icon {\n transform: rotate(-180deg);\n }\n\n .p-megamenu[").concat(e,"] .p-megamenu-grid {\n flex-wrap: wrap;\n }\n\n ").concat(H?"\n.p-megamenu[".concat(e,"] .p-megamenu-button {\n display: flex;\n}\n\n.p-megamenu[").concat(e,"].p-megamenu-horizontal {\n position: relative;\n}\n\n.p-megamenu[").concat(e,"].p-megamenu-horizontal .p-megamenu-root-list {\n display: none;\n}\n\n.p-megamenu-horizontal[").concat(e,'] div[class*="p-megamenu-col-"] {\n width: auto;\n flex: 1;\n padding: 0;\n}\n\n.p-megamenu[').concat(e,"].p-megamenu-mobile-active .p-megamenu-root-list {\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n top: 100%;\n left: 0;\n z-index: 1;\n}\n "):"","\n\n ").concat(T?"\n.p-megamenu-vertical[".concat(e,"] {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(e,"] .p-megamenu-root-list {\n max-height: ").concat(k.scrollHeight,";\n overflow: ").concat(k.scrollHeight?"auto":"",";\n}\n.p-megamenu-vertical[").concat(e,'] div[class*="p-megamenu-col-"] {\n width: 100%;\n padding: 0;\n}\n\n.p-megamenu-vertical[').concat(e,"] .p-megamenu-submenu {\n width: 100%;\n}\n\n.p-megamenu-vertical[").concat(e,'] div[class*="p-megamenu-col-"] .p-megamenu-submenu-header {\n background: inherit;\n}\n\n.p-megamenu-vertical[').concat(e,'] .p-submenu-icon:before {\n content: "\\e930";\n}\n '):"","\n}\n");X.current.innerHTML=t}};o((function(){return O&&M.current&&(M.current.setAttribute(O,""),ce()),function(){X.current=f.removeInlineStyle(X.current)}}),[O,k.breakpoint]);var se,pe=function(n,t){var r=b("p-menuitem",{"p-menuitem-active":n===N},n.className),a=b("p-menuitem-link",{"p-disabled":n.disabled}),l=g({className:"p-menuitem-icon"},F(n,"icon")),i=y.getJSXIcon(n.icon,z({},l),{props:k}),o=g({className:"p-menuitem-text"},F(n,"label")),u=n.label&&e.createElement("span",o,n.label),m=n.template?v.getJSXElement(n.template,n):null,c=re(n),p=me(n),f=g({href:n.url||"#",className:a,target:n.target,onClick:function(e){return t=e,(r=n).disabled||(r.url||t.preventDefault(),r.command&&r.command({originalEvent:t,item:k.item}),r.items&&x(N&&N===r?null:r)),void t.preventDefault();var t,r},onKeyDown:function(e){return V(e,n)},role:"menuitem","aria-haspopup":null!=n.items},F(n,"headerAction")),d=g({key:n.label+"_"+t,id:n.id,className:r,style:n.style,onMouseEnter:function(e){return t=e,void((r=n).disabled||R?t.preventDefault():N&&x(r));var t,r},role:"none"},F(n,"menuitem"));return e.createElement("li",d,e.createElement("a",f,i,u,m,c,e.createElement(s,null)),p)},fe=b("p-megamenu p-component",{"p-megamenu-horizontal":"horizontal"===k.orientation,"p-megamenu-vertical":"vertical"===k.orientation,"p-megamenu-mobile-active":A},k.className),de=g({ref:M,id:k.id,className:fe,style:k.style},P.getOtherProps(k),Z("root")),be=(se=g({className:"p-megamenu-root-list",role:"menubar"},Z("menu")),k.model?e.createElement("ul",se,k.model.map((function(e,n){return pe(e,n)}))):null),ge=function(){var n=g({className:"p-megamenu-start"},Z("start"));if(k.start){var t=v.getJSXElement(k.start,k);return e.createElement("div",n,t)}return null}(),ve=function(){var n=g({className:"p-megamenu-end"},Z("end"));if(k.end){var t=v.getJSXElement(k.end,k);return e.createElement("div",n,t)}return null}(),ye=function(){if("vertical"===k.orientation||k.model&&k.model.length<1)return null;var n=y.getJSXIcon(k.menuIcon||e.createElement(c,null),void 0,{props:k});return e.createElement("a",{ref:_,href:"#",role:"button",tabIndex:0,className:"p-megamenu-button",onClick:q},n)}();return e.createElement("div",de,ge,ye,be,ve)})));A.displayName="MegaMenu";export{A as MegaMenu};
|