primereact 9.3.1 → 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/README.md +18 -31
- package/accordion/accordion.cjs.js +88 -90
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +90 -1
- package/accordion/accordion.esm.js +89 -91
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +89 -92
- package/accordion/accordion.min.js +1 -1
- package/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 +33 -11
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +4 -0
- package/autocomplete/autocomplete.esm.js +33 -11
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +32 -10
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +71 -22
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +37 -1
- package/avatar/avatar.esm.js +72 -23
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +72 -24
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +26 -42
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.d.ts +24 -0
- package/avatargroup/avatargroup.esm.js +13 -29
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +52 -69
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +12 -28
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +26 -0
- package/badge/badge.esm.js +13 -29
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +13 -30
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +12 -28
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +38 -0
- package/blockui/blockui.esm.js +13 -29
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +13 -30
- package/blockui/blockui.min.js +1 -1
- package/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/button/button.cjs.js +49 -42
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +42 -1
- package/button/button.esm.js +50 -43
- package/button/button.esm.min.js +1 -1
- package/button/button.js +49 -43
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +37 -23
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -2
- package/calendar/calendar.esm.js +37 -23
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +34 -20
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +52 -63
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +56 -0
- package/card/card.esm.js +39 -50
- package/card/card.esm.min.js +1 -1
- package/card/card.js +86 -98
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +151 -110
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +113 -1
- package/carousel/carousel.esm.js +151 -110
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +148 -108
- 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 +31 -42
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +35 -0
- package/chart/chart.esm.js +18 -29
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +140 -152
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +40 -19
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +19 -1
- package/checkbox/checkbox.esm.js +41 -20
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +41 -20
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +45 -42
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +53 -1
- package/chip/chip.esm.js +46 -43
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +46 -44
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +37 -22
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +5 -0
- package/chips/chips.esm.js +37 -22
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +37 -23
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +11 -4
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +13 -0
- package/colorpicker/colorpicker.esm.js +11 -4
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +11 -4
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +6 -2
- package/componentbase/componentbase.cjs.js +105 -0
- package/componentbase/componentbase.cjs.min.js +1 -0
- package/componentbase/componentbase.esm.js +101 -0
- package/componentbase/componentbase.esm.min.js +1 -0
- package/componentbase/componentbase.js +109 -0
- package/componentbase/componentbase.min.js +1 -0
- package/componentbase/package.json +6 -0
- package/confirmdialog/confirmdialog.cjs.js +44 -27
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +90 -2
- package/confirmdialog/confirmdialog.esm.js +45 -28
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +45 -29
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +53 -50
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +70 -1
- package/confirmpopup/confirmpopup.esm.js +54 -51
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +54 -52
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/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 +16510 -5273
- package/core/core.min.js +41 -39
- package/datatable/datatable.cjs.js +253 -210
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +20 -7
- package/datatable/datatable.esm.js +253 -210
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +246 -203
- package/datatable/datatable.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +13 -26
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +38 -0
- package/deferredcontent/deferredcontent.esm.js +14 -27
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +14 -28
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +83 -83
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +85 -3
- package/dialog/dialog.esm.js +83 -83
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +81 -82
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +35 -51
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.d.ts +30 -0
- package/divider/divider.esm.js +22 -38
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +66 -83
- package/divider/divider.min.js +1 -1
- package/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 +46 -20
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +6 -1
- package/dropdown/dropdown.esm.js +46 -20
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +45 -19
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +55 -54
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +77 -1
- package/fieldset/fieldset.esm.js +56 -55
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +56 -56
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +181 -151
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +150 -1
- package/fileupload/fileupload.esm.js +182 -152
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +182 -153
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +136 -118
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +137 -119
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +135 -118
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +20 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +17 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +21 -5
- 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 +506 -103
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +507 -104
- package/image/image.esm.min.js +1 -1
- package/image/image.js +503 -101
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +33 -51
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +51 -1
- package/inplace/inplace.esm.js +33 -51
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +33 -52
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +24 -18
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +24 -18
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +24 -18
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +8 -6
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +8 -6
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +8 -6
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +13 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +5 -0
- package/inputswitch/inputswitch.esm.js +13 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +14 -4
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -8
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +7 -8
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -8
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +3 -4
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +3 -4
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +3 -4
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/listbox/listbox.cjs.js +12 -4
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +12 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +12 -4
- package/listbox/listbox.min.js +1 -1
- package/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/mention/mention.cjs.js +3 -4
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +3 -4
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +3 -4
- package/mention/mention.min.js +1 -1
- package/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/menuitem/menuitem.d.ts +0 -2
- 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 +78 -74
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +78 -74
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +78 -75
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +74 -47
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +9 -0
- package/multiselect/multiselect.esm.js +75 -48
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +73 -46
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +21 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +5 -0
- package/multistatecheckbox/multistatecheckbox.esm.js +21 -13
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +21 -13
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +18 -2
- package/overlaypanel/overlaypanel.cjs.js +40 -46
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +45 -1
- package/overlaypanel/overlaypanel.esm.js +41 -47
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -48
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +3 -3
- package/panel/panel.cjs.js +78 -63
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +100 -1
- package/panel/panel.esm.js +79 -64
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +79 -65
- package/panel/panel.min.js +1 -1
- package/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 +4240 -3058
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +4240 -3059
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +4240 -3058
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +45 -57
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.d.ts +38 -0
- package/progressbar/progressbar.esm.js +32 -44
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +105 -118
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +37 -51
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.d.ts +34 -0
- package/progressspinner/progressspinner.esm.js +24 -38
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +75 -90
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +42 -20
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +19 -1
- package/radiobutton/radiobutton.esm.js +42 -20
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +43 -22
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +15 -7
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +15 -7
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +14 -6
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +195 -187
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +16 -7
- package/resources/themes/arya-green/theme.css +16 -7
- package/resources/themes/arya-orange/theme.css +16 -7
- package/resources/themes/arya-purple/theme.css +16 -7
- package/resources/themes/bootstrap4-dark-blue/theme.css +16 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +16 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +16 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +16 -7
- package/resources/themes/fluent-light/theme.css +16 -7
- package/resources/themes/lara-dark-blue/theme.css +16 -7
- package/resources/themes/lara-dark-indigo/theme.css +16 -7
- package/resources/themes/lara-dark-purple/theme.css +16 -7
- package/resources/themes/lara-dark-teal/theme.css +16 -7
- package/resources/themes/lara-light-blue/theme.css +16 -7
- package/resources/themes/lara-light-indigo/theme.css +16 -7
- package/resources/themes/lara-light-purple/theme.css +16 -7
- package/resources/themes/lara-light-teal/theme.css +16 -7
- package/resources/themes/luna-amber/theme.css +16 -7
- package/resources/themes/luna-blue/theme.css +16 -7
- package/resources/themes/luna-green/theme.css +16 -7
- package/resources/themes/luna-pink/theme.css +16 -7
- package/resources/themes/md-dark-deeppurple/theme.css +16 -7
- package/resources/themes/md-dark-indigo/theme.css +16 -7
- package/resources/themes/md-light-deeppurple/theme.css +16 -7
- package/resources/themes/md-light-indigo/theme.css +16 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +16 -7
- package/resources/themes/mdc-dark-indigo/theme.css +16 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +16 -7
- package/resources/themes/mdc-light-indigo/theme.css +16 -7
- package/resources/themes/mira/theme.css +16 -7
- package/resources/themes/nano/theme.css +16 -7
- package/resources/themes/nova/theme.css +16 -7
- package/resources/themes/nova-accent/theme.css +16 -7
- package/resources/themes/nova-alt/theme.css +16 -7
- package/resources/themes/rhea/theme.css +16 -7
- package/resources/themes/saga-blue/theme.css +16 -7
- package/resources/themes/saga-green/theme.css +16 -7
- package/resources/themes/saga-orange/theme.css +16 -7
- package/resources/themes/saga-purple/theme.css +16 -7
- package/resources/themes/soho-dark/theme.css +16 -7
- package/resources/themes/soho-light/theme.css +16 -7
- package/resources/themes/tailwind-light/theme.css +16 -7
- package/resources/themes/vela-blue/theme.css +16 -7
- package/resources/themes/vela-green/theme.css +16 -7
- package/resources/themes/vela-orange/theme.css +16 -7
- package/resources/themes/vela-purple/theme.css +16 -7
- package/resources/themes/viva-dark/theme.css +16 -7
- package/resources/themes/viva-light/theme.css +16 -7
- package/scrollpanel/scrollpanel.cjs.js +39 -52
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.d.ts +42 -0
- package/scrollpanel/scrollpanel.esm.js +26 -39
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +193 -207
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +64 -36
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +42 -1
- package/scrolltop/scrolltop.esm.js +65 -37
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +65 -38
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +6 -2
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +6 -2
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +6 -2
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +88 -52
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +58 -1
- package/sidebar/sidebar.esm.js +89 -53
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +89 -54
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +26 -42
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.d.ts +26 -0
- package/skeleton/skeleton.esm.js +13 -29
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +70 -87
- package/skeleton/skeleton.min.js +1 -1
- package/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/speeddial/speeddial.cjs.js +63 -56
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +64 -1
- package/speeddial/speeddial.esm.js +64 -57
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +62 -56
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +50 -40
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +59 -1
- package/splitbutton/splitbutton.esm.js +51 -41
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +50 -41
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +68 -70
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +60 -0
- package/splitter/splitter.esm.js +69 -71
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +69 -72
- package/splitter/splitter.min.js +1 -1
- package/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/styleclass/styleclass.cjs.js +9 -7
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +9 -7
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +9 -7
- package/styleclass/styleclass.min.js +1 -1
- package/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/tabview/tabview.cjs.js +142 -122
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +132 -1
- package/tabview/tabview.esm.js +143 -123
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +143 -124
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +18 -30
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +34 -1
- package/tag/tag.esm.js +19 -31
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +19 -32
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +49 -52
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +73 -0
- package/terminal/terminal.esm.js +50 -53
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +50 -54
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +1 -1
- package/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/timeline/timeline.d.ts +1 -1
- package/toast/toast.cjs.js +85 -81
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +124 -2
- package/toast/toast.esm.js +86 -82
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +83 -80
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +12 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +12 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +13 -4
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +35 -49
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +44 -0
- package/toolbar/toolbar.esm.js +22 -36
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +72 -87
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +31 -37
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +55 -0
- package/tooltip/tooltip.esm.js +32 -38
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +32 -39
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +5 -0
- package/tree/tree.d.ts +1 -1
- package/treenode/treenode.d.ts +5 -1
- package/treeselect/treeselect.cjs.js +12 -5
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +6 -1
- package/treeselect/treeselect.esm.js +12 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +11 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +10 -3
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +1 -1
- package/treetable/treetable.esm.js +10 -3
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +10 -3
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +22 -11
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +5 -0
- package/tristatecheckbox/tristatecheckbox.esm.js +22 -11
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +21 -11
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +735 -676
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +5 -1
- package/utils/utils.esm.js +732 -677
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +736 -678
- package/utils/utils.min.js +1 -1
- package/web-types.json +13 -1
package/megamenu/megamenu.d.ts
CHANGED
|
@@ -9,13 +9,148 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { MenuItem } from '../menuitem';
|
|
12
|
-
import { IconType } from '../utils/utils';
|
|
12
|
+
import { IconType, PassThroughType } from '../utils/utils';
|
|
13
|
+
|
|
14
|
+
export declare type MegaMenuPassThroughType<T> = PassThroughType<T, MegaMenuPassThroughMethodOptions>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Custom passthrough(pt) option method.
|
|
18
|
+
*/
|
|
19
|
+
export interface MegaMenuPassThroughMethodOptions {
|
|
20
|
+
props: MegaMenuProps;
|
|
21
|
+
state: MegaMenuState;
|
|
22
|
+
context: MegaMenuContext;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Custom passthrough(pt) options.
|
|
27
|
+
* @see {@link MegaMenuProps.pt}
|
|
28
|
+
*/
|
|
29
|
+
export interface MegaMenuPassThroughOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Uses to pass attributes to the root's DOM element.
|
|
32
|
+
*/
|
|
33
|
+
root?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
34
|
+
/**
|
|
35
|
+
* Uses to pass attributes to the list's DOM element.
|
|
36
|
+
*/
|
|
37
|
+
menu?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
|
|
38
|
+
/**
|
|
39
|
+
* Uses to pass attributes to the list item's DOM element.
|
|
40
|
+
*/
|
|
41
|
+
menuitem?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
42
|
+
/**
|
|
43
|
+
* Uses to pass attributes to the header action's DOM element.
|
|
44
|
+
*/
|
|
45
|
+
headerAction?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLAnchorElement>>;
|
|
46
|
+
/**
|
|
47
|
+
* Uses to pass attributes to the action's DOM element.
|
|
48
|
+
*/
|
|
49
|
+
action?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLAnchorElement>>;
|
|
50
|
+
/**
|
|
51
|
+
* Uses to pass attributes to the icon's DOM element.
|
|
52
|
+
*/
|
|
53
|
+
icon?: MegaMenuPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
54
|
+
/**
|
|
55
|
+
* Uses to pass attributes to the label's DOM element.
|
|
56
|
+
*/
|
|
57
|
+
label?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
|
|
58
|
+
/**
|
|
59
|
+
* Uses to pass attributes to the submenu icon's DOM element.
|
|
60
|
+
*/
|
|
61
|
+
submenuIcon?: MegaMenuPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
62
|
+
/**
|
|
63
|
+
* Uses to pass attributes to the panel's DOM element.
|
|
64
|
+
*/
|
|
65
|
+
panel?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
66
|
+
/**
|
|
67
|
+
* Uses to pass attributes to the grid's DOM element.
|
|
68
|
+
*/
|
|
69
|
+
grid?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
70
|
+
/**
|
|
71
|
+
* Uses to pass attributes to the column's DOM element.
|
|
72
|
+
*/
|
|
73
|
+
column?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
74
|
+
/**
|
|
75
|
+
* Uses to pass attributes to the submenu's DOM element.
|
|
76
|
+
*/
|
|
77
|
+
submenu?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
|
|
78
|
+
/**
|
|
79
|
+
* Uses to pass attributes to the submenu items's DOM element.
|
|
80
|
+
*/
|
|
81
|
+
submenuItem?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
82
|
+
/**
|
|
83
|
+
* Uses to pass attributes to the submenu header's DOM element.
|
|
84
|
+
*/
|
|
85
|
+
submenuHeader?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
86
|
+
/**
|
|
87
|
+
* Uses to pass attributes to the separator's DOM element.
|
|
88
|
+
*/
|
|
89
|
+
separator?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
90
|
+
/**
|
|
91
|
+
* Uses to pass attributes to the start of the component.
|
|
92
|
+
*/
|
|
93
|
+
start?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
94
|
+
/**
|
|
95
|
+
* Uses to pass attributes to the end of the component.
|
|
96
|
+
*/
|
|
97
|
+
end?: MegaMenuPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Defines focused item info
|
|
102
|
+
*/
|
|
103
|
+
export interface MegaMenuFocusedItemInfo {
|
|
104
|
+
/**
|
|
105
|
+
* Active item index
|
|
106
|
+
*/
|
|
107
|
+
index: number;
|
|
108
|
+
/**
|
|
109
|
+
* Active item level
|
|
110
|
+
*/
|
|
111
|
+
level: number;
|
|
112
|
+
/**
|
|
113
|
+
* Parent key info
|
|
114
|
+
*/
|
|
115
|
+
parentKey: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Defines current inline state in MegaMenu component.
|
|
120
|
+
*/
|
|
121
|
+
export interface MegaMenuState {
|
|
122
|
+
/**
|
|
123
|
+
* Current mobileActive state as a boolean.
|
|
124
|
+
* @defaultValue false
|
|
125
|
+
*/
|
|
126
|
+
mobileActive: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Current attributeSelector visible state as a string.
|
|
129
|
+
*/
|
|
130
|
+
attributeSelector: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Active item path.
|
|
133
|
+
* @type {MenuItem}
|
|
134
|
+
*/
|
|
135
|
+
activeItem: MenuItem;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Defines current options in MegaMenu component.
|
|
140
|
+
*/
|
|
141
|
+
export interface MegaMenuContext {
|
|
142
|
+
/**
|
|
143
|
+
* Current active state of menuitem as a boolean.
|
|
144
|
+
* @defaultValue false
|
|
145
|
+
*/
|
|
146
|
+
active: boolean;
|
|
147
|
+
}
|
|
13
148
|
|
|
14
149
|
/**
|
|
15
150
|
* Defines valid properties in MegaMenu component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
16
151
|
* @group Properties
|
|
17
152
|
*/
|
|
18
|
-
export interface MegaMenuProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref'> {
|
|
153
|
+
export interface MegaMenuProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref' | 'pt'> {
|
|
19
154
|
/**
|
|
20
155
|
* An array of menuitems.
|
|
21
156
|
*/
|
|
@@ -55,6 +190,11 @@ export interface MegaMenuProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
|
|
|
55
190
|
* @readonly
|
|
56
191
|
*/
|
|
57
192
|
children?: React.ReactNode | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
195
|
+
* @type {MegaMenuPassThroughOptions}
|
|
196
|
+
*/
|
|
197
|
+
pt?: MegaMenuPassThroughOptions;
|
|
58
198
|
}
|
|
59
199
|
|
|
60
200
|
/**
|
package/megamenu/megamenu.esm.js
CHANGED
|
@@ -1,25 +1,52 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PrimeReact 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,15 +119,11 @@ 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
128
|
var props = MegaMenuBase.getProps(inProps);
|
|
106
129
|
var _React$useState = React.useState(null),
|
|
@@ -121,6 +144,22 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
121
144
|
var horizontal = props.orientation === 'horizontal';
|
|
122
145
|
var vertical = props.orientation === 'vertical';
|
|
123
146
|
var isMobileMode = useMatchMedia("screen and (max-width: ".concat(props.breakpoint, ")"), !!props.breakpoint);
|
|
147
|
+
var _MegaMenuBase$setMeta = MegaMenuBase.setMetaData({
|
|
148
|
+
props: props,
|
|
149
|
+
state: {
|
|
150
|
+
activeItem: activeItemState,
|
|
151
|
+
attributeSelector: attributeSelectorState,
|
|
152
|
+
mobileActive: mobileActiveState
|
|
153
|
+
}
|
|
154
|
+
}),
|
|
155
|
+
ptm = _MegaMenuBase$setMeta.ptm;
|
|
156
|
+
var getPTOptions = function getPTOptions(item, key) {
|
|
157
|
+
return ptm(key, {
|
|
158
|
+
context: {
|
|
159
|
+
active: activeItemState === item
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
};
|
|
124
163
|
var _useEventListener = useEventListener({
|
|
125
164
|
type: 'click',
|
|
126
165
|
listener: function listener(event) {
|
|
@@ -303,23 +342,21 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
303
342
|
}, [activeItemState]);
|
|
304
343
|
var createSeparator = function createSeparator(index) {
|
|
305
344
|
var key = 'separator_' + index;
|
|
306
|
-
|
|
345
|
+
var separatorProps = mergeProps({
|
|
307
346
|
key: key,
|
|
308
|
-
className:
|
|
309
|
-
role:
|
|
310
|
-
});
|
|
347
|
+
className: 'p-menu-separator',
|
|
348
|
+
role: 'separator'
|
|
349
|
+
}, ptm('separator'));
|
|
350
|
+
return /*#__PURE__*/React.createElement("li", separatorProps);
|
|
311
351
|
};
|
|
312
352
|
var createSubmenuIcon = function createSubmenuIcon(item) {
|
|
313
353
|
if (item.items) {
|
|
314
354
|
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, {
|
|
355
|
+
var submenuIconProps = mergeProps({
|
|
321
356
|
className: iconClassName
|
|
322
|
-
},
|
|
357
|
+
}, ptm('submenuIcon'));
|
|
358
|
+
var icon = vertical ? props.submenuIcon || /*#__PURE__*/React.createElement(AngleRightIcon, submenuIconProps) : props.submenuIcon || /*#__PURE__*/React.createElement(AngleDownIcon, submenuIconProps);
|
|
359
|
+
var submenuIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, submenuIconProps), {
|
|
323
360
|
props: props
|
|
324
361
|
});
|
|
325
362
|
return submenuIcon;
|
|
@@ -347,16 +384,24 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
347
384
|
var label = item.label && /*#__PURE__*/React.createElement("span", {
|
|
348
385
|
className: "p-menuitem-text"
|
|
349
386
|
}, item.label);
|
|
350
|
-
var
|
|
387
|
+
var actionProps = mergeProps({
|
|
351
388
|
href: item.url || '#',
|
|
352
389
|
className: linkClassName,
|
|
353
390
|
target: item.target,
|
|
354
391
|
onClick: function onClick(event) {
|
|
355
392
|
return onLeafClick(event, item);
|
|
356
393
|
},
|
|
357
|
-
role:
|
|
358
|
-
|
|
359
|
-
},
|
|
394
|
+
role: 'menuitem',
|
|
395
|
+
'aria-disabled': item.disabled
|
|
396
|
+
}, getPTOptions(item, 'action'));
|
|
397
|
+
var submenuItemProps = mergeProps({
|
|
398
|
+
key: key,
|
|
399
|
+
id: item.id,
|
|
400
|
+
className: _className,
|
|
401
|
+
style: item.style,
|
|
402
|
+
role: 'none'
|
|
403
|
+
}, getPTOptions(item, 'submenuItem'));
|
|
404
|
+
var content = /*#__PURE__*/React.createElement("a", actionProps, icon, label, /*#__PURE__*/React.createElement(Ripple, null));
|
|
360
405
|
if (item.template) {
|
|
361
406
|
var defaultContentOptions = {
|
|
362
407
|
onClick: function onClick(event) {
|
|
@@ -370,13 +415,7 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
370
415
|
};
|
|
371
416
|
content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);
|
|
372
417
|
}
|
|
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);
|
|
418
|
+
return /*#__PURE__*/React.createElement("li", submenuItemProps, content);
|
|
380
419
|
}
|
|
381
420
|
};
|
|
382
421
|
var createSubmenu = function createSubmenu(submenu) {
|
|
@@ -387,14 +426,15 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
387
426
|
'p-disabled': submenu.disabled
|
|
388
427
|
}, submenu.className);
|
|
389
428
|
var items = submenu.items.map(createSubmenuItem);
|
|
390
|
-
|
|
391
|
-
key: submenu.label
|
|
392
|
-
}, /*#__PURE__*/React.createElement("li", {
|
|
429
|
+
var submenuHeaderProps = mergeProps({
|
|
393
430
|
id: submenu.id,
|
|
394
431
|
className: className,
|
|
395
432
|
style: submenu.style,
|
|
396
|
-
role:
|
|
397
|
-
},
|
|
433
|
+
role: 'presentation'
|
|
434
|
+
}, ptm('submenuHeader'));
|
|
435
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
436
|
+
key: submenu.label
|
|
437
|
+
}, /*#__PURE__*/React.createElement("li", submenuHeaderProps, submenu.label), items);
|
|
398
438
|
};
|
|
399
439
|
var createSubmenus = function createSubmenus(column) {
|
|
400
440
|
return column.map(createSubmenu);
|
|
@@ -402,13 +442,15 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
402
442
|
var createColumn = function createColumn(category, column, index, columnClassName) {
|
|
403
443
|
var key = category.label + '_column_' + index;
|
|
404
444
|
var submenus = createSubmenus(column);
|
|
405
|
-
|
|
445
|
+
var columnProps = mergeProps({
|
|
406
446
|
key: key,
|
|
407
447
|
className: columnClassName
|
|
408
|
-
},
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
448
|
+
}, ptm('column'));
|
|
449
|
+
var submenuProps = mergeProps({
|
|
450
|
+
className: 'p-megamenu-submenu',
|
|
451
|
+
role: 'menu'
|
|
452
|
+
}, ptm('submenu'));
|
|
453
|
+
return /*#__PURE__*/React.createElement("div", columnProps, /*#__PURE__*/React.createElement("ul", submenuProps, submenus));
|
|
412
454
|
};
|
|
413
455
|
var createColumns = function createColumns(category) {
|
|
414
456
|
if (category.items) {
|
|
@@ -422,11 +464,13 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
422
464
|
var createCategoryPanel = function createCategoryPanel(category) {
|
|
423
465
|
if (category.items) {
|
|
424
466
|
var columns = createColumns(category);
|
|
425
|
-
|
|
426
|
-
className:
|
|
427
|
-
},
|
|
428
|
-
|
|
429
|
-
|
|
467
|
+
var panelProps = mergeProps({
|
|
468
|
+
className: 'p-megamenu-panel'
|
|
469
|
+
}, ptm('panel'));
|
|
470
|
+
var gridProps = mergeProps({
|
|
471
|
+
className: 'p-megamenu-grid'
|
|
472
|
+
}, ptm('grid'));
|
|
473
|
+
return /*#__PURE__*/React.createElement("div", panelProps, /*#__PURE__*/React.createElement("div", gridProps, columns));
|
|
430
474
|
}
|
|
431
475
|
return null;
|
|
432
476
|
};
|
|
@@ -457,27 +501,20 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
457
501
|
var linkClassName = classNames('p-menuitem-link', {
|
|
458
502
|
'p-disabled': category.disabled
|
|
459
503
|
});
|
|
460
|
-
var
|
|
504
|
+
var iconProps = mergeProps({
|
|
461
505
|
className: 'p-menuitem-icon'
|
|
462
|
-
},
|
|
506
|
+
}, getPTOptions(category, 'icon'));
|
|
507
|
+
var icon = IconUtils.getJSXIcon(category.icon, _objectSpread({}, iconProps), {
|
|
463
508
|
props: props
|
|
464
509
|
});
|
|
465
|
-
var
|
|
466
|
-
className:
|
|
467
|
-
}, category
|
|
510
|
+
var labelProps = mergeProps({
|
|
511
|
+
className: 'p-menuitem-text'
|
|
512
|
+
}, getPTOptions(category, 'label'));
|
|
513
|
+
var label = category.label && /*#__PURE__*/React.createElement("span", labelProps, category.label);
|
|
468
514
|
var itemContent = category.template ? ObjectUtils.getJSXElement(category.template, category) : null;
|
|
469
515
|
var submenuIcon = createSubmenuIcon(category);
|
|
470
516
|
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", {
|
|
517
|
+
var headerActionProps = mergeProps({
|
|
481
518
|
href: category.url || '#',
|
|
482
519
|
className: linkClassName,
|
|
483
520
|
target: category.target,
|
|
@@ -487,36 +524,50 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
487
524
|
onKeyDown: function onKeyDown(e) {
|
|
488
525
|
return onCategoryKeyDown(e, category);
|
|
489
526
|
},
|
|
490
|
-
role:
|
|
491
|
-
|
|
492
|
-
},
|
|
527
|
+
role: 'menuitem',
|
|
528
|
+
'aria-haspopup': category.items != null
|
|
529
|
+
}, getPTOptions(category, 'headerAction'));
|
|
530
|
+
var menuItemProps = mergeProps({
|
|
531
|
+
key: category.label + '_' + index,
|
|
532
|
+
id: category.id,
|
|
533
|
+
className: className,
|
|
534
|
+
style: category.style,
|
|
535
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
536
|
+
return onCategoryMouseEnter(e, category);
|
|
537
|
+
},
|
|
538
|
+
role: 'none'
|
|
539
|
+
}, getPTOptions(category, 'menuitem'));
|
|
540
|
+
return /*#__PURE__*/React.createElement("li", menuItemProps, /*#__PURE__*/React.createElement("a", headerActionProps, icon, label, itemContent, submenuIcon, /*#__PURE__*/React.createElement(Ripple, null)), panel);
|
|
493
541
|
};
|
|
494
542
|
var createMenu = function createMenu() {
|
|
543
|
+
var menuProps = mergeProps({
|
|
544
|
+
className: 'p-megamenu-root-list',
|
|
545
|
+
role: 'menubar'
|
|
546
|
+
}, ptm('menu'));
|
|
495
547
|
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) {
|
|
548
|
+
return /*#__PURE__*/React.createElement("ul", menuProps, props.model.map(function (item, index) {
|
|
500
549
|
return createCategory(item, index);
|
|
501
550
|
}));
|
|
502
551
|
}
|
|
503
552
|
return null;
|
|
504
553
|
};
|
|
505
554
|
var createStartContent = function createStartContent() {
|
|
555
|
+
var startProps = mergeProps({
|
|
556
|
+
className: 'p-megamenu-start'
|
|
557
|
+
}, ptm('start'));
|
|
506
558
|
if (props.start) {
|
|
507
559
|
var _start = ObjectUtils.getJSXElement(props.start, props);
|
|
508
|
-
return /*#__PURE__*/React.createElement("div",
|
|
509
|
-
className: "p-megamenu-start"
|
|
510
|
-
}, _start);
|
|
560
|
+
return /*#__PURE__*/React.createElement("div", startProps, _start);
|
|
511
561
|
}
|
|
512
562
|
return null;
|
|
513
563
|
};
|
|
514
564
|
var createEndContent = function createEndContent() {
|
|
565
|
+
var endProps = mergeProps({
|
|
566
|
+
className: 'p-megamenu-end'
|
|
567
|
+
}, ptm('end'));
|
|
515
568
|
if (props.end) {
|
|
516
569
|
var _end = ObjectUtils.getJSXElement(props.end, props);
|
|
517
|
-
return /*#__PURE__*/React.createElement("div",
|
|
518
|
-
className: "p-megamenu-end"
|
|
519
|
-
}, _end);
|
|
570
|
+
return /*#__PURE__*/React.createElement("div", endProps, _end);
|
|
520
571
|
}
|
|
521
572
|
return null;
|
|
522
573
|
};
|
|
@@ -541,22 +592,22 @@ var MegaMenu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
541
592
|
|
|
542
593
|
return button;
|
|
543
594
|
};
|
|
544
|
-
var otherProps = MegaMenuBase.getOtherProps(props);
|
|
545
595
|
var className = classNames('p-megamenu p-component', {
|
|
546
596
|
'p-megamenu-horizontal': props.orientation === 'horizontal',
|
|
547
597
|
'p-megamenu-vertical': props.orientation === 'vertical',
|
|
548
598
|
'p-megamenu-mobile-active': mobileActiveState
|
|
549
599
|
}, props.className);
|
|
550
|
-
var
|
|
551
|
-
var start = createStartContent();
|
|
552
|
-
var end = createEndContent();
|
|
553
|
-
var menuButton = createMenuButton();
|
|
554
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
600
|
+
var rootProps = mergeProps({
|
|
555
601
|
ref: elementRef,
|
|
556
602
|
id: props.id,
|
|
557
603
|
className: className,
|
|
558
604
|
style: props.style
|
|
559
|
-
},
|
|
605
|
+
}, MegaMenuBase.getOtherProps(props), ptm('root'));
|
|
606
|
+
var menu = createMenu();
|
|
607
|
+
var start = createStartContent();
|
|
608
|
+
var end = createEndContent();
|
|
609
|
+
var menuButton = createMenuButton();
|
|
610
|
+
return /*#__PURE__*/React.createElement("div", rootProps, start, menuButton, menu, end);
|
|
560
611
|
}));
|
|
561
612
|
MegaMenu.displayName = 'MegaMenu';
|
|
562
613
|
|
|
@@ -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 from"primereact/api";import{useMatchMedia as t,useEventListener as r,useResizeListener as a,useMountEffect as l,useUpdateEffect as i}from"primereact/hooks";import{AngleDownIcon as o}from"primereact/icons/angledown";import{AngleRightIcon as u}from"primereact/icons/angleright";import{BarsIcon as m}from"primereact/icons/bars";import{Ripple as c}from"primereact/ripple";import{UniqueComponentId as s,DomHandler as p,ZIndexUtils as f,classNames as d,mergeProps as b,ObjectUtils as g,IconUtils as v}from"primereact/utils";import{ComponentBase as y}from"primereact/componentbase";function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function E(e,n){if("object"!==h(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function S(e){var n=E(e,"string");return"symbol"===h(n)?n:String(n)}function k(e,n,t){return(n=S(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function w(e){if(Array.isArray(e))return e}function N(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 O(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 x(e,n){if(e){if("string"==typeof e)return O(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)?O(e,n):void 0}}function I(){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 j(e,n){return w(e)||N(e,n)||x(e,n)||I()}var D=y.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 P(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 C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){k(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=e.memo(e.forwardRef((function(y,h){var E=D.getProps(y),S=j(e.useState(null),2),k=S[0],w=S[1],N=j(e.useState(null),2),O=N[0],x=N[1],I=j(e.useState(!1),2),P=I[0],z=I[1],A=e.useRef(null),J=e.useRef(null),M=e.useRef(null),X="horizontal"===E.orientation,_="vertical"===E.orientation,H=t("screen and (max-width: ".concat(E.breakpoint,")"),!!E.breakpoint),T=D.setMetaData({props:E,state:{activeItem:k,attributeSelector:O,mobileActive:P}}).ptm,R=function(e,n){return T(n,{context:{active:k===e}})},F=j(r({type:"click",listener:function(e){H&&!P||!Q(e)||(w(null),z(!1))}}),1)[0],K=j(a({listener:function(){H&&!P||(w(null),z(!1))}}),1)[0],L=function(e,n){n.disabled?e.preventDefault():(n.url||e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),w(null),z(!1))},U=function(e,n){var t=e.currentTarget.parentElement;switch(e.which){case 40:X?V(n):B(t),e.preventDefault();break;case 38:_?G(t):n.items&&n===k&&Y(),e.preventDefault();break;case 39:X?B(t):V(n),e.preventDefault();break;case 37:X?G(t):n.items&&n===k&&Y(),e.preventDefault()}},V=function(e){e.items&&w(e)},Y=function(e){w(null)},Z=function(e){e.preventDefault(),z((function(e){return!e})),w(null)},$=function e(n){var t=n.nextElementSibling;return t?p.hasClass(t,"p-disabled")||!p.hasClass(t,"p-menuitem")?e(t):t:null},q=function e(n){var t=n.previousElementSibling;return t?p.hasClass(t,"p-disabled")||!p.hasClass(t,"p-menuitem")?e(t):t:null},B=function(e){var n=$(e);n&&n.children[0].focus()},G=function(e){var n=q(e);n&&n.children[0].focus()},Q=function(e){return A.current&&!(A.current.isSameNode(e.target)||A.current.contains(e.target)||M.current&&M.current.contains(e.target))},W=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(h,(function(){return{props:E,getElement:function(){return A.current}}})),l((function(){E.breakpoint&&!O&&x(s()),F(),K()})),i((function(){var e=p.findSingle(A.current,".p-menuitem-active > .p-megamenu-panel");return k&&!H&&f.set("menu",e,n.autoZIndex,n.zIndex.menu),H&&e&&e.previousElementSibling.scrollIntoView({block:"nearest",inline:"nearest"}),function(){f.clear(e)}}),[k]);var ee=function(n){var t=b({key:"separator_"+n,className:"p-menu-separator",role:"separator"},T("separator"));return e.createElement("li",t)},ne=function(n){if(n.items){var t=b({className:"p-submenu-icon"},T("submenuIcon"));return v.getJSXIcon(_?E.submenuIcon||e.createElement(u,t):E.submenuIcon||e.createElement(o,t),C({},t),{props:E})}return null},te=function(n,t){if(!1===n.visible)return null;if(n.separator)return ee(t);var r=n.label+"_"+t,a=d("p-menuitem",n.className),l=d("p-menuitem-link",{"p-disabled":n.disabled}),i=d(n.icon,"p-menuitem-icon"),o=v.getJSXIcon(n.icon,{className:"p-menuitem-icon"},{props:E}),u=n.label&&e.createElement("span",{className:"p-menuitem-text"},n.label),m=b({href:n.url||"#",className:l,target:n.target,onClick:function(e){return L(e,n)},role:"menuitem","aria-disabled":n.disabled},R(n,"action")),s=b({key:r,id:n.id,className:a,style:n.style,role:"none"},R(n,"submenuItem")),p=e.createElement("a",m,o,u,e.createElement(c,null));return n.template&&(p=g.getJSXElement(n.template,n,{onClick:function(e){return L(e,n)},className:l,labelClassName:"p-menuitem-text",iconClassName:i,element:p,props:E})),e.createElement("li",s,p)},re=function(n){if(!1===n.visible)return null;var t=d("p-megamenu-submenu-header",{"p-disabled":n.disabled},n.className),r=n.items.map(te),a=b({id:n.id,className:t,style:n.style,role:"presentation"},T("submenuHeader"));return e.createElement(e.Fragment,{key:n.label},e.createElement("li",a,n.label),r)},ae=function(e){return e.map(re)},le=function(n,t,r,a){var l=n.label+"_column_"+r,i=ae(t),o=b({key:l,className:a},T("column")),u=b({className:"p-megamenu-submenu",role:"menu"},T("submenu"));return e.createElement("div",o,e.createElement("ul",u,i))},ie=function(e){if(e.items){var n=W(e);return e.items.map((function(t,r){return le(e,t,r,n)}))}return null},oe=function(n){if(n.items){var t=ie(n),r=b({className:"p-megamenu-panel"},T("panel")),a=b({className:"p-megamenu-grid"},T("grid"));return e.createElement("div",r,e.createElement("div",a,t))}return null},ue=function(){if(!J.current){J.current=p.createInlineStyle(n.nonce);var e="".concat(O),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(_?"\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 O&&A.current&&(A.current.setAttribute(O,""),ue()),function(){J.current=p.removeInlineStyle(J.current)}}),[O,E.breakpoint]);var me,ce=function(n,t){var r=d("p-menuitem",{"p-menuitem-active":n===k},n.className),a=d("p-menuitem-link",{"p-disabled":n.disabled}),l=b({className:"p-menuitem-icon"},R(n,"icon")),i=v.getJSXIcon(n.icon,C({},l),{props:E}),o=b({className:"p-menuitem-text"},R(n,"label")),u=n.label&&e.createElement("span",o,n.label),m=n.template?g.getJSXElement(n.template,n):null,s=ne(n),p=oe(n),f=b({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&&w(k&&k===r?null:r)),void t.preventDefault();var t,r},onKeyDown:function(e){return U(e,n)},role:"menuitem","aria-haspopup":null!=n.items},R(n,"headerAction")),y=b({key:n.label+"_"+t,id:n.id,className:r,style:n.style,onMouseEnter:function(e){return t=e,void((r=n).disabled||H?t.preventDefault():k&&w(r));var t,r},role:"none"},R(n,"menuitem"));return e.createElement("li",y,e.createElement("a",f,i,u,m,s,e.createElement(c,null)),p)},se=d("p-megamenu p-component",{"p-megamenu-horizontal":"horizontal"===E.orientation,"p-megamenu-vertical":"vertical"===E.orientation,"p-megamenu-mobile-active":P},E.className),pe=b({ref:A,id:E.id,className:se,style:E.style},D.getOtherProps(E),T("root")),fe=(me=b({className:"p-megamenu-root-list",role:"menubar"},T("menu")),E.model?e.createElement("ul",me,E.model.map((function(e,n){return ce(e,n)}))):null),de=function(){var n=b({className:"p-megamenu-start"},T("start"));if(E.start){var t=g.getJSXElement(E.start,E);return e.createElement("div",n,t)}return null}(),be=function(){var n=b({className:"p-megamenu-end"},T("end"));if(E.end){var t=g.getJSXElement(E.end,E);return e.createElement("div",n,t)}return null}(),ge=function(){if("vertical"===E.orientation||E.model&&E.model.length<1)return null;var n=v.getJSXIcon(E.menuIcon||e.createElement(m,null),void 0,{props:E});return e.createElement("a",{ref:M,href:"#",role:"button",tabIndex:0,className:"p-megamenu-button",onClick:Z},n)}();return e.createElement("div",pe,de,ge,fe,be)})));z.displayName="MegaMenu";export{z as MegaMenu};
|