primereact 10.8.5 → 10.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/accordion/accordion.cjs.js +55 -43
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +55 -43
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +55 -43
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +59 -44
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +59 -44
- package/api/api.esm.min.js +1 -1
- package/api/api.js +59 -44
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +59 -47
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +1 -1
- package/autocomplete/autocomplete.esm.js +59 -47
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +59 -47
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +49 -37
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +49 -37
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +49 -37
- package/avatar/avatar.min.js +1 -1
- package/badge/badge.cjs.js +23 -17
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +23 -17
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +23 -17
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +49 -37
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +49 -37
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +49 -37
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +49 -37
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +49 -37
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +49 -37
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +34 -23
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +34 -23
- package/button/button.esm.min.js +1 -1
- package/button/button.js +34 -23
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +67 -49
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +67 -49
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +67 -49
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +55 -43
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +55 -43
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +55 -43
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +52 -40
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +52 -40
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +52 -40
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/checkbox.cjs.js +55 -43
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +55 -43
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +55 -43
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +56 -40
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +56 -40
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +56 -40
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +68 -50
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +68 -50
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +68 -50
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +49 -37
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +49 -37
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +49 -37
- package/colorpicker/colorpicker.min.js +1 -1
- package/componentbase/componentbase.cjs.js +42 -35
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +42 -35
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +42 -35
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +57 -43
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +57 -43
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +57 -43
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +49 -37
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +49 -37
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +49 -37
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +49 -37
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +49 -37
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +49 -37
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1482 -1020
- package/core/core.min.js +68 -68
- package/csstransition/csstransition.cjs.js +23 -17
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +23 -17
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +23 -17
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +32 -26
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +32 -26
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +32 -26
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +114 -87
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +114 -87
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +114 -87
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +58 -46
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +58 -46
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +58 -46
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +15 -14
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +15 -14
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +15 -14
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +62 -50
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +62 -50
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +62 -50
- package/dialog/dialog.min.js +1 -1
- package/dock/dock.cjs.js +55 -43
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +55 -43
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +55 -43
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +74 -52
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -2
- package/dropdown/dropdown.esm.js +74 -52
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +74 -52
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +49 -37
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +49 -37
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +49 -37
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +26 -20
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +26 -20
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +26 -20
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +60 -48
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +60 -48
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +60 -48
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/focustrap.cjs.js +30 -24
- package/focustrap/focustrap.cjs.min.js +1 -1
- package/focustrap/focustrap.esm.js +30 -24
- package/focustrap/focustrap.esm.min.js +1 -1
- package/focustrap/focustrap.js +30 -24
- package/focustrap/focustrap.min.js +1 -1
- package/galleria/galleria.cjs.js +55 -43
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +55 -43
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +55 -43
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +44 -37
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +44 -37
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +44 -37
- package/hooks/hooks.min.js +1 -1
- package/iconbase/iconbase.cjs.js +1 -1
- package/iconbase/iconbase.cjs.min.js +1 -1
- package/iconbase/iconbase.esm.js +1 -1
- package/iconbase/iconbase.esm.min.js +1 -1
- package/iconbase/iconbase.js +1 -1
- package/iconbase/iconbase.min.js +1 -1
- package/iconfield/iconfield.cjs.js +34 -23
- package/iconfield/iconfield.cjs.min.js +1 -1
- package/iconfield/iconfield.esm.js +34 -23
- package/iconfield/iconfield.esm.min.js +1 -1
- package/iconfield/iconfield.js +34 -23
- package/iconfield/iconfield.min.js +1 -1
- package/icons/angledoubledown/index.cjs.js +11 -6
- package/icons/angledoubledown/index.cjs.min.js +1 -1
- package/icons/angledoubledown/index.esm.js +11 -6
- package/icons/angledoubledown/index.esm.min.js +1 -1
- package/icons/angledoubledown/index.js +11 -6
- package/icons/angledoubledown/index.min.js +1 -1
- package/icons/angledoubleleft/index.cjs.js +11 -6
- package/icons/angledoubleleft/index.cjs.min.js +1 -1
- package/icons/angledoubleleft/index.esm.js +11 -6
- package/icons/angledoubleleft/index.esm.min.js +1 -1
- package/icons/angledoubleleft/index.js +11 -6
- package/icons/angledoubleleft/index.min.js +1 -1
- package/icons/angledoubleright/index.cjs.js +11 -6
- package/icons/angledoubleright/index.cjs.min.js +1 -1
- package/icons/angledoubleright/index.esm.js +11 -6
- package/icons/angledoubleright/index.esm.min.js +1 -1
- package/icons/angledoubleright/index.js +11 -6
- package/icons/angledoubleright/index.min.js +1 -1
- package/icons/angledoubleup/index.cjs.js +11 -6
- package/icons/angledoubleup/index.cjs.min.js +1 -1
- package/icons/angledoubleup/index.esm.js +11 -6
- package/icons/angledoubleup/index.esm.min.js +1 -1
- package/icons/angledoubleup/index.js +11 -6
- package/icons/angledoubleup/index.min.js +1 -1
- package/icons/angledown/index.cjs.js +11 -6
- package/icons/angledown/index.cjs.min.js +1 -1
- package/icons/angledown/index.esm.js +11 -6
- package/icons/angledown/index.esm.min.js +1 -1
- package/icons/angledown/index.js +11 -6
- package/icons/angledown/index.min.js +1 -1
- package/icons/angleleft/index.cjs.js +11 -6
- package/icons/angleleft/index.cjs.min.js +1 -1
- package/icons/angleleft/index.esm.js +11 -6
- package/icons/angleleft/index.esm.min.js +1 -1
- package/icons/angleleft/index.js +11 -6
- package/icons/angleleft/index.min.js +1 -1
- package/icons/angleright/index.cjs.js +11 -6
- package/icons/angleright/index.cjs.min.js +1 -1
- package/icons/angleright/index.esm.js +11 -6
- package/icons/angleright/index.esm.min.js +1 -1
- package/icons/angleright/index.js +11 -6
- package/icons/angleright/index.min.js +1 -1
- package/icons/angleup/index.cjs.js +11 -6
- package/icons/angleup/index.cjs.min.js +1 -1
- package/icons/angleup/index.esm.js +11 -6
- package/icons/angleup/index.esm.min.js +1 -1
- package/icons/angleup/index.js +11 -6
- package/icons/angleup/index.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +11 -6
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +11 -6
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +11 -6
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +11 -6
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +11 -6
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +11 -6
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +11 -6
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +11 -6
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +11 -6
- package/icons/ban/index.min.js +1 -1
- package/icons/bars/index.cjs.js +11 -6
- package/icons/bars/index.cjs.min.js +1 -1
- package/icons/bars/index.esm.js +11 -6
- package/icons/bars/index.esm.min.js +1 -1
- package/icons/bars/index.js +11 -6
- package/icons/bars/index.min.js +1 -1
- package/icons/blank/index.cjs.js +11 -6
- package/icons/blank/index.cjs.min.js +1 -1
- package/icons/blank/index.esm.js +11 -6
- package/icons/blank/index.esm.min.js +1 -1
- package/icons/blank/index.js +11 -6
- package/icons/blank/index.min.js +1 -1
- package/icons/calendar/index.cjs.js +11 -6
- package/icons/calendar/index.cjs.min.js +1 -1
- package/icons/calendar/index.esm.js +11 -6
- package/icons/calendar/index.esm.min.js +1 -1
- package/icons/calendar/index.js +11 -6
- package/icons/calendar/index.min.js +1 -1
- package/icons/check/index.cjs.js +11 -6
- package/icons/check/index.cjs.min.js +1 -1
- package/icons/check/index.esm.js +11 -6
- package/icons/check/index.esm.min.js +1 -1
- package/icons/check/index.js +11 -6
- package/icons/check/index.min.js +1 -1
- package/icons/chevrondown/index.cjs.js +11 -6
- package/icons/chevrondown/index.cjs.min.js +1 -1
- package/icons/chevrondown/index.esm.js +11 -6
- package/icons/chevrondown/index.esm.min.js +1 -1
- package/icons/chevrondown/index.js +11 -6
- package/icons/chevrondown/index.min.js +1 -1
- package/icons/chevronleft/index.cjs.js +11 -6
- package/icons/chevronleft/index.cjs.min.js +1 -1
- package/icons/chevronleft/index.esm.js +11 -6
- package/icons/chevronleft/index.esm.min.js +1 -1
- package/icons/chevronleft/index.js +11 -6
- package/icons/chevronleft/index.min.js +1 -1
- package/icons/chevronright/index.cjs.js +11 -6
- package/icons/chevronright/index.cjs.min.js +1 -1
- package/icons/chevronright/index.esm.js +11 -6
- package/icons/chevronright/index.esm.min.js +1 -1
- package/icons/chevronright/index.js +11 -6
- package/icons/chevronright/index.min.js +1 -1
- package/icons/chevronup/index.cjs.js +11 -6
- package/icons/chevronup/index.cjs.min.js +1 -1
- package/icons/chevronup/index.esm.js +11 -6
- package/icons/chevronup/index.esm.min.js +1 -1
- package/icons/chevronup/index.js +11 -6
- package/icons/chevronup/index.min.js +1 -1
- package/icons/download/index.cjs.js +11 -6
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +11 -6
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +11 -6
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +11 -6
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +11 -6
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +11 -6
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eye/index.cjs.js +11 -6
- package/icons/eye/index.cjs.min.js +1 -1
- package/icons/eye/index.esm.js +11 -6
- package/icons/eye/index.esm.min.js +1 -1
- package/icons/eye/index.js +11 -6
- package/icons/eye/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +11 -6
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +11 -6
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +11 -6
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +11 -6
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +11 -6
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +11 -6
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +11 -6
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +11 -6
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +11 -6
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +11 -6
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +11 -6
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +11 -6
- package/icons/infocircle/index.min.js +1 -1
- package/icons/minus/index.cjs.js +11 -6
- package/icons/minus/index.cjs.min.js +1 -1
- package/icons/minus/index.esm.js +11 -6
- package/icons/minus/index.esm.min.js +1 -1
- package/icons/minus/index.js +11 -6
- package/icons/minus/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +11 -6
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +11 -6
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +11 -6
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +11 -6
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +11 -6
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +11 -6
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +11 -6
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +11 -6
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +11 -6
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +11 -6
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +11 -6
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +11 -6
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +11 -6
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +11 -6
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +11 -6
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +11 -6
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +11 -6
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +11 -6
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +11 -6
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +11 -6
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +11 -6
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +11 -6
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +11 -6
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +11 -6
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +11 -6
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +11 -6
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +11 -6
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +11 -6
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +11 -6
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +11 -6
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +11 -6
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +11 -6
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +11 -6
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +11 -6
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +11 -6
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +11 -6
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +11 -6
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +11 -6
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +11 -6
- package/icons/thlarge/index.min.js +1 -1
- package/icons/times/index.cjs.js +11 -6
- package/icons/times/index.cjs.min.js +1 -1
- package/icons/times/index.esm.js +11 -6
- package/icons/times/index.esm.min.js +1 -1
- package/icons/times/index.js +11 -6
- package/icons/times/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +11 -6
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +11 -6
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +11 -6
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +11 -6
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +11 -6
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +11 -6
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +11 -6
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +11 -6
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +11 -6
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +11 -6
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +11 -6
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +11 -6
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +11 -6
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +11 -6
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +11 -6
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +11 -6
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +11 -6
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +11 -6
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +49 -37
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +49 -37
- package/image/image.esm.min.js +1 -1
- package/image/image.js +49 -37
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +15 -14
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +15 -14
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +15 -14
- package/inplace/inplace.min.js +1 -1
- package/inputicon/inputicon.cjs.js +34 -23
- package/inputicon/inputicon.cjs.min.js +1 -1
- package/inputicon/inputicon.esm.js +34 -23
- package/inputicon/inputicon.esm.min.js +1 -1
- package/inputicon/inputicon.js +34 -23
- package/inputicon/inputicon.min.js +1 -1
- package/inputmask/inputmask.cjs.js +11 -6
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +11 -6
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +11 -6
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +55 -43
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +55 -43
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +55 -43
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/inputotp.cjs.js +55 -43
- package/inputotp/inputotp.cjs.min.js +1 -1
- package/inputotp/inputotp.esm.js +55 -43
- package/inputotp/inputotp.esm.min.js +1 -1
- package/inputotp/inputotp.js +55 -43
- package/inputotp/inputotp.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +34 -23
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +34 -23
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +34 -23
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +34 -23
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +34 -23
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +34 -23
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +43 -24
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +43 -24
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +43 -24
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +17 -16
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +17 -16
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +17 -16
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +15 -14
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +15 -14
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +15 -14
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +58 -46
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +58 -46
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +58 -46
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +51 -39
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +51 -39
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +51 -39
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +64 -44
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +64 -44
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +64 -44
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +73 -54
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +73 -54
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +73 -54
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +49 -37
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +49 -37
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +49 -37
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +34 -23
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +34 -23
- package/message/message.esm.min.js +1 -1
- package/message/message.js +34 -23
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +56 -44
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +56 -44
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +56 -44
- package/messages/messages.min.js +1 -1
- package/metergroup/metergroup.cjs.js +34 -23
- package/metergroup/metergroup.cjs.min.js +1 -1
- package/metergroup/metergroup.esm.js +34 -23
- package/metergroup/metergroup.esm.min.js +1 -1
- package/metergroup/metergroup.js +34 -23
- package/metergroup/metergroup.min.js +1 -1
- package/multiselect/multiselect.cjs.js +67 -55
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +68 -56
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +67 -55
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +56 -44
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +56 -44
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +56 -44
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +55 -43
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +55 -43
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +55 -43
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +55 -43
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +55 -43
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +55 -43
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +50 -39
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +51 -40
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +50 -39
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +56 -41
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +56 -41
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +56 -41
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +26 -20
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +26 -20
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +26 -20
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +49 -37
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +49 -37
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +49 -37
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +23 -17
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.esm.js +23 -17
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +23 -17
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +15 -14
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +15 -14
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +15 -14
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +49 -37
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +49 -37
- package/password/password.esm.min.js +1 -1
- package/password/password.js +49 -37
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +64 -49
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +64 -49
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +64 -49
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +15 -14
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +15 -14
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +15 -14
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +348 -242
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +348 -242
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +348 -242
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +34 -23
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +34 -23
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +34 -23
- package/progressbar/progressbar.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +34 -23
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +34 -23
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +34 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +49 -37
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +49 -37
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +49 -37
- package/rating/rating.min.js +1 -1
- package/ripple/ripple.cjs.js +49 -37
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +49 -37
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +49 -37
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +27 -20
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +27 -20
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +27 -20
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +49 -37
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +49 -37
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +49 -37
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +32 -26
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +32 -26
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +32 -26
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +50 -39
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +51 -40
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +50 -39
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +23 -17
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +23 -17
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +23 -17
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +49 -37
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +49 -37
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +49 -37
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +55 -43
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +55 -43
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +55 -43
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +55 -43
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +55 -43
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +55 -43
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +49 -37
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +49 -37
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +49 -37
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +55 -43
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +55 -43
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +55 -43
- package/splitter/splitter.min.js +1 -1
- package/stepper/stepper.cjs.js +49 -37
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.esm.js +49 -37
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +49 -37
- package/stepper/stepper.min.js +1 -1
- package/steps/steps.cjs.js +49 -37
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +49 -37
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +49 -37
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +15 -14
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +15 -14
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +15 -14
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +49 -37
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +49 -37
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +49 -37
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +61 -38
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +61 -38
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +61 -38
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +23 -17
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +23 -17
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +23 -17
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +21 -20
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +21 -20
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +21 -20
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +49 -37
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +49 -37
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +49 -37
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +34 -23
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +34 -23
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +34 -23
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +60 -277
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +61 -278
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +60 -277
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +34 -23
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +34 -23
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +34 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.cjs.js +59 -45
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +60 -46
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +59 -45
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +67 -55
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +67 -55
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +67 -55
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +59 -47
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +60 -48
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +59 -47
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +111 -91
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +111 -91
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +111 -91
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +50 -38
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +50 -38
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +50 -38
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +88 -67
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +88 -67
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +88 -67
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +63 -40
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +64 -41
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +63 -40
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +4 -4
package/menu/menu.cjs.js
CHANGED
|
@@ -46,73 +46,85 @@ function _typeof(o) {
|
|
|
46
46
|
}, _typeof(o);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
function
|
|
50
|
-
if ("object"
|
|
51
|
-
var
|
|
52
|
-
if (
|
|
53
|
-
var
|
|
54
|
-
if ("object"
|
|
49
|
+
function _toPrimitive(input, hint) {
|
|
50
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
51
|
+
var prim = input[Symbol.toPrimitive];
|
|
52
|
+
if (prim !== undefined) {
|
|
53
|
+
var res = prim.call(input, hint || "default");
|
|
54
|
+
if (_typeof(res) !== "object") return res;
|
|
55
55
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
56
56
|
}
|
|
57
|
-
return ("string"
|
|
57
|
+
return (hint === "string" ? String : Number)(input);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
function
|
|
61
|
-
var
|
|
62
|
-
return "symbol"
|
|
60
|
+
function _toPropertyKey(arg) {
|
|
61
|
+
var key = _toPrimitive(arg, "string");
|
|
62
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
function _defineProperty(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
function _defineProperty(obj, key, value) {
|
|
66
|
+
key = _toPropertyKey(key);
|
|
67
|
+
if (key in obj) {
|
|
68
|
+
Object.defineProperty(obj, key, {
|
|
69
|
+
value: value,
|
|
70
|
+
enumerable: true,
|
|
71
|
+
configurable: true,
|
|
72
|
+
writable: true
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
obj[key] = value;
|
|
76
|
+
}
|
|
77
|
+
return obj;
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
function _extends() {
|
|
75
|
-
|
|
76
|
-
for (var
|
|
77
|
-
var
|
|
78
|
-
for (var
|
|
81
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
82
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
83
|
+
var source = arguments[i];
|
|
84
|
+
for (var key in source) {
|
|
85
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
86
|
+
target[key] = source[key];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
79
89
|
}
|
|
80
|
-
return
|
|
81
|
-
}
|
|
90
|
+
return target;
|
|
91
|
+
};
|
|
92
|
+
return _extends.apply(this, arguments);
|
|
82
93
|
}
|
|
83
94
|
|
|
84
|
-
function _arrayLikeToArray(
|
|
85
|
-
(
|
|
86
|
-
for (var
|
|
87
|
-
return
|
|
95
|
+
function _arrayLikeToArray(arr, len) {
|
|
96
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
97
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
98
|
+
return arr2;
|
|
88
99
|
}
|
|
89
100
|
|
|
90
|
-
function _arrayWithoutHoles(
|
|
91
|
-
if (Array.isArray(
|
|
101
|
+
function _arrayWithoutHoles(arr) {
|
|
102
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
92
103
|
}
|
|
93
104
|
|
|
94
|
-
function _iterableToArray(
|
|
95
|
-
if (
|
|
105
|
+
function _iterableToArray(iter) {
|
|
106
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
96
107
|
}
|
|
97
108
|
|
|
98
|
-
function _unsupportedIterableToArray(
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
109
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
110
|
+
if (!o) return;
|
|
111
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
112
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
113
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
114
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
115
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
104
116
|
}
|
|
105
117
|
|
|
106
118
|
function _nonIterableSpread() {
|
|
107
119
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
108
120
|
}
|
|
109
121
|
|
|
110
|
-
function _toConsumableArray(
|
|
111
|
-
return _arrayWithoutHoles(
|
|
122
|
+
function _toConsumableArray(arr) {
|
|
123
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
112
124
|
}
|
|
113
125
|
|
|
114
|
-
function _arrayWithHoles(
|
|
115
|
-
if (Array.isArray(
|
|
126
|
+
function _arrayWithHoles(arr) {
|
|
127
|
+
if (Array.isArray(arr)) return arr;
|
|
116
128
|
}
|
|
117
129
|
|
|
118
130
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -147,8 +159,8 @@ function _nonIterableRest() {
|
|
|
147
159
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
148
160
|
}
|
|
149
161
|
|
|
150
|
-
function _slicedToArray(
|
|
151
|
-
return _arrayWithHoles(
|
|
162
|
+
function _slicedToArray(arr, i) {
|
|
163
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
var styles = "\n@layer primereact {\n .p-menu-overlay {\n position: absolute;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n\n .p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-menu .p-menuitem-text {\n line-height: 1;\n }\n}\n";
|
|
@@ -163,21 +175,26 @@ var classes = {
|
|
|
163
175
|
});
|
|
164
176
|
},
|
|
165
177
|
menu: 'p-menu-list p-reset',
|
|
166
|
-
content:
|
|
167
|
-
action: function action(_ref2) {
|
|
178
|
+
content: function content(_ref2) {
|
|
168
179
|
var item = _ref2.item;
|
|
180
|
+
return utils.classNames('p-menuitem-content', {
|
|
181
|
+
'p-disabled': item.disabled
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
action: function action(_ref3) {
|
|
185
|
+
var item = _ref3.item;
|
|
169
186
|
return utils.classNames('p-menuitem-link', {
|
|
170
187
|
'p-disabled': item.disabled
|
|
171
188
|
});
|
|
172
189
|
},
|
|
173
|
-
menuitem: function menuitem(
|
|
174
|
-
var focused =
|
|
190
|
+
menuitem: function menuitem(_ref4) {
|
|
191
|
+
var focused = _ref4.focused;
|
|
175
192
|
return utils.classNames('p-menuitem', {
|
|
176
193
|
'p-focus': focused
|
|
177
194
|
});
|
|
178
195
|
},
|
|
179
|
-
submenuHeader: function submenuHeader(
|
|
180
|
-
var submenu =
|
|
196
|
+
submenuHeader: function submenuHeader(_ref5) {
|
|
197
|
+
var submenu = _ref5.submenu;
|
|
181
198
|
return utils.classNames('p-submenu-header', {
|
|
182
199
|
'p-disabled': submenu.disabled
|
|
183
200
|
});
|
|
@@ -188,12 +205,12 @@ var classes = {
|
|
|
188
205
|
transition: 'p-connected-overlay'
|
|
189
206
|
};
|
|
190
207
|
var inlineStyles = {
|
|
191
|
-
submenuHeader: function submenuHeader(
|
|
192
|
-
var submenu =
|
|
208
|
+
submenuHeader: function submenuHeader(_ref6) {
|
|
209
|
+
var submenu = _ref6.submenu;
|
|
193
210
|
return submenu.style;
|
|
194
211
|
},
|
|
195
|
-
menuitem: function menuitem(
|
|
196
|
-
var item =
|
|
212
|
+
menuitem: function menuitem(_ref7) {
|
|
213
|
+
var item = _ref7.item;
|
|
197
214
|
return item.style;
|
|
198
215
|
}
|
|
199
216
|
};
|
|
@@ -561,7 +578,9 @@ var Menu = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forw
|
|
|
561
578
|
onMouseMove: function onMouseMove(event) {
|
|
562
579
|
return onItemMouseMove(event, key);
|
|
563
580
|
},
|
|
564
|
-
className: cx('content'
|
|
581
|
+
className: cx('content', {
|
|
582
|
+
item: item
|
|
583
|
+
})
|
|
565
584
|
}, getMenuItemPTOptions('content', menuContext));
|
|
566
585
|
var actionProps = mergeProps({
|
|
567
586
|
href: item.url || '#',
|
package/menu/menu.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/csstransition"),a=require("primereact/hooks"),i=require("primereact/overlayservice"),o=require("primereact/portal"),u=require("primereact/ripple"),l=require("primereact/utils");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var p=s(e),m=c(n);function d(e){return d="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},d(e)}function f(e,n){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function b(e){var n=f(e,"string");return"symbol"==d(n)?n:n+""}function y(e,n,t){return(n=b(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},v.apply(null,arguments)}function g(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function O(e){if(Array.isArray(e))return g(e)}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function E(e,n){if(e){if("string"==typeof e)return g(e,n);var t={}.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)?g(e,n):void 0}}function x(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(e){return O(e)||h(e)||E(e)||x()}function N(e){if(Array.isArray(e))return e}function I(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,i,o,u=[],l=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw a}}return u}}function D(){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 N(e)||I(e,n)||E(e,n)||D()}var w=t.ComponentBase.extend({defaultProps:{__TYPE:"Menu",id:null,ariaLabel:null,ariaLabelledBy:null,tabIndex:0,model:null,popup:!1,popupAlignment:"left",style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,onFocus:null,onBlur:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var n=e.context;return l.classNames("p-menu p-component",{"p-menu-overlay":e.props.popup,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===m.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===m.default.ripple})},menu:"p-menu-list p-reset",content:"p-menuitem-content",action:function(e){return l.classNames("p-menuitem-link",{"p-disabled":e.item.disabled})},menuitem:function(e){return l.classNames("p-menuitem",{"p-focus":e.focused})},submenuHeader:function(e){return l.classNames("p-submenu-header",{"p-disabled":e.submenu.disabled})},separator:"p-menu-separator",label:"p-menuitem-text",icon:"p-menuitem-icon",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-menu-overlay {\n position: absolute;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n\n .p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-menu .p-menuitem-text {\n line-height: 1;\n }\n}\n",inlineStyles:{submenuHeader:function(e){return e.submenu.style},menuitem:function(e){return e.item.style}}}});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 k(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){y(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 H=p.memo(p.forwardRef((function(e,c){var s=a.useMergeProps(),d=p.useContext(n.PrimeReactContext),f=w.getProps(e,d),b=j(p.useState(f.id),2),y=b[0],g=b[1],O=j(p.useState(!f.popup),2),h=O[0],E=O[1],x=j(p.useState(-1),2),N=x[0],I=x[1],D=j(p.useState(-1),2),P=D[0],H=D[1],A=j(p.useState(!1),2),_=A[0],T=A[1],C=w.setMetaData({props:f,state:{id:y,visible:h,focused:_}}),M=C.ptm,U=C.cx,q=C.sx,R=function(e,n){return M(e,{context:n})};t.useHandleStyle(w.css.styles,C.isUnstyled,{name:"menu"});var Z=p.useRef(null),B=p.useRef(null),F=p.useRef(null),L=!!(h&&f.popup&&f.closeOnEscape),K=a.useDisplayOrder("menu",L);a.useGlobalOnEscapeKey({callback:function(e){pe(e)},when:L&&K,priority:[a.ESC_KEY_HANDLING_PRIORITIES.MENU,K]});var z=j(a.useOverlayListener({target:F,overlay:Z,listener:function(e,n){n.valid&&(pe(e),I(-1))},when:h}),2),G=z[0],J=z[1],X=function(e,n,t){n.disabled?e.preventDefault():(n.command&&n.command({originalEvent:e,item:n}),f.popup&&pe(e),f.popup||N===t||I(t),n.url||(e.preventDefault(),e.stopPropagation()))},Y=function(e,n){e&&f.popup&&N!==n&&I(n)},$=function(e){T(!0),f.popup||(-1!==P?(ue(P),H(-1)):ue(0)),f.onFocus&&f.onFocus(e)},Q=function(e){T(!1),I(-1),f.onBlur&&f.onBlur(e)},V=function(e){switch(e.code){case"ArrowDown":W(e);break;case"ArrowUp":ee(e);break;case"Home":ne(e);break;case"End":te(e);break;case"Enter":case"NumpadEnter":re(e);break;case"Space":ae(e);break;case"Escape":f.popup&&(l.DomHandler.focus(F.current),pe(e));case"Tab":f.popup&&h&&pe(e)}},W=function(e){var n=ie(N);ue(n),e.preventDefault()},ee=function(e){if(e.altKey&&f.popup)l.DomHandler.focus(F.current),pe(e),e.preventDefault();else{var n=oe(N);ue(n),e.preventDefault()}},ne=function(e){ue(0),e.preventDefault()},te=function(e){ue(l.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()},re=function(e){var n=l.DomHandler.findSingle(Z.current,'li[id="'.concat("".concat(N),'"]')),t=n&&l.DomHandler.findSingle(n,'a[data-pc-section="action"]');f.popup&&l.DomHandler.focus(F.current),t?t.click():n&&n.click(),e.preventDefault()},ae=function(e){re(e)},ie=function(e){var n=S(l.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n+1:0},oe=function(e){var n=S(l.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n-1:0},ue=function(e){var n=l.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),t=e>=n.length?n.length-1:e<0?0:e;t>-1&&I(n[t].getAttribute("id"))},le=function(){return-1!==N?N:null},ce=function(e){f.popup&&(h?pe(e):se(e))},se=function(e){F.current=e.currentTarget,E(!0),f.onShow&&f.onShow(e)},pe=function(e){F.current=e.currentTarget,E(!1),f.onHide&&f.onHide(e)},me=function(){l.DomHandler.addStyles(Z.current,{position:"absolute",top:"0",left:"0"}),l.ZIndexUtils.set("menu",Z.current,d&&d.autoZIndex||m.default.autoZIndex,f.baseZIndex||d&&d.zIndex.menu||m.default.zIndex.menu),l.DomHandler.absolutePosition(Z.current,F.current,f.popupAlignment),f.popup&&(l.DomHandler.focus(B.current),ue(0))},de=function(){G()},fe=function(){F.current=null,J()},be=function(){l.ZIndexUtils.clear(Z.current)};a.useMountEffect((function(){y||g(l.UniqueComponentId())})),a.useUnmountEffect((function(){l.ZIndexUtils.clear(Z.current)})),p.useImperativeHandle(c,(function(){return{props:f,toggle:ce,show:se,hide:pe,getElement:function(){return Z.current},getTarget:function(){return F.current}}}));var ye=function(e,n){var t=y+"_sub_"+n,r=e.items.map((function(e,n){return ge(e,n,t)})),a=s({id:t,role:"none",className:l.classNames(e.className,U("submenuHeader",{submenu:e})),style:q("submenuHeader",{submenu:e}),"data-p-disabled":e.disabled},M("submenuHeader"));return p.createElement(p.Fragment,{key:t},p.createElement("li",v({},a,{key:t}),e.label),r)},ve=function(e,n){var t=y+"_separator_"+n,r=s({id:t,className:l.classNames(e.className,U("separator")),role:"separator"},M("separator"));return p.createElement("li",v({},r,{key:t}))},ge=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r={item:e,index:n,parentId:t},a=l.classNames("p-menuitem-link",{"p-disabled":e.disabled}),i=l.classNames("p-menuitem-icon",e.icon),o=s({className:U("icon")},R("icon",r)),c=l.IconUtils.getJSXIcon(e.icon,k({},o),{props:f}),m=s({className:U("label")},R("label",r)),d=e.label&&p.createElement("span",m,e.label),b=e.id||(t||y)+"_"+n,g=s({onClick:function(n){return X(n,e,b)},onMouseMove:function(e){return Y(e,b)},className:U("content")},R("content",r)),O=s({href:e.url||"#",className:U("action",{item:e}),onFocus:function(e){return e.stopPropagation()},target:e.target,tabIndex:"-1","aria-label":e.label,"aria-hidden":!0,"aria-disabled":e.disabled,"data-p-disabled":e.disabled},R("action",r)),h=p.createElement("div",g,p.createElement("a",O,c,d,p.createElement(u.Ripple,null)));e.template&&(h=l.ObjectUtils.getJSXElement(e.template,e,{onClick:function(n){return X(n,e,b)},className:a,tabIndex:"-1",labelClassName:"p-menuitem-text",iconClassName:i,element:h,props:f}));var E=s({id:b,className:l.classNames(e.className,U("menuitem",{focused:N===b})),style:q("menuitem",{item:e}),role:"menuitem","aria-label":e.label,"aria-disabled":e.disabled,"data-p-focused":le()===b,"data-p-disabled":e.disabled||!1},R("menuitem",r));return p.createElement("li",v({},E,{key:b}),h)},Oe=function(e,n){return!1===e.visible?null:e.separator?ve(e,n):e.items?ye(e,n):ge(e,n)},he=function(){if(f.model){var e=f.model.map(Oe),n=s({className:l.classNames(f.className,U("root",{context:d})),style:f.style,onClick:function(e){return n=e,void(f.popup&&i.OverlayService.emit("overlay-click",{originalEvent:n,target:F.current}));var n}},w.getOtherProps(f),M("root")),t=s({ref:B,className:U("menu"),id:y+"_list",tabIndex:f.tabIndex||"0",role:"menu","aria-label":f.ariaLabel,"aria-labelledby":f.ariaLabelledBy,"aria-activedescendant":_?le():void 0,onFocus:$,onKeyDown:V,onBlur:Q},M("menu")),a=s({classNames:U("transition"),in:h,timeout:{enter:120,exit:100},options:f.transitionOptions,unmountOnExit:!0,onEnter:me,onEntered:de,onExit:fe,onExited:be},M("transition"));return p.createElement(r.CSSTransition,v({nodeRef:Z},a),p.createElement("div",v({id:f.id,ref:Z},n),p.createElement("ul",t,e)))}return null}();return f.popup?p.createElement(o.Portal,{element:he,appendTo:f.appendTo}):he})));H.displayName="Menu",exports.Menu=H;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/csstransition"),a=require("primereact/hooks"),i=require("primereact/overlayservice"),o=require("primereact/portal"),l=require("primereact/ripple"),u=require("primereact/utils");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var p=s(e),m=c(n);function d(e){return d="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},d(e)}function f(e,n){if("object"!==d(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function b(e){var n=f(e,"string");return"symbol"===d(n)?n:String(n)}function y(){return y=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},y.apply(this,arguments)}function v(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 g(e){if(Array.isArray(e))return v(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function h(e,n){if(e){if("string"==typeof e)return v(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)?v(e,n):void 0}}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(e){return g(e)||O(e)||h(e)||E()}function x(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,i,o,l=[],u=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==n);u=!0);}catch(e){c=!0,a=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}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 I(e,n){return x(e)||N(e,n)||h(e,n)||j()}var w=t.ComponentBase.extend({defaultProps:{__TYPE:"Menu",id:null,ariaLabel:null,ariaLabelledBy:null,tabIndex:0,model:null,popup:!1,popupAlignment:"left",style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,onFocus:null,onBlur:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var n=e.context;return u.classNames("p-menu p-component",{"p-menu-overlay":e.props.popup,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===m.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===m.default.ripple})},menu:"p-menu-list p-reset",content:function(e){return u.classNames("p-menuitem-content",{"p-disabled":e.item.disabled})},action:function(e){return u.classNames("p-menuitem-link",{"p-disabled":e.item.disabled})},menuitem:function(e){return u.classNames("p-menuitem",{"p-focus":e.focused})},submenuHeader:function(e){return u.classNames("p-submenu-header",{"p-disabled":e.submenu.disabled})},separator:"p-menu-separator",label:"p-menuitem-text",icon:"p-menuitem-icon",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-menu-overlay {\n position: absolute;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n\n .p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-menu .p-menuitem-text {\n line-height: 1;\n }\n}\n",inlineStyles:{submenuHeader:function(e){return e.submenu.style},menuitem:function(e){return e.item.style}}}});function D(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 P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){var r,a,i;r=e,i=t[n],(a=b(a=n))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=p.memo(p.forwardRef((function(e,c){var s=a.useMergeProps(),d=p.useContext(n.PrimeReactContext),f=w.getProps(e,d),b=I(p.useState(f.id),2),v=b[0],g=b[1],O=I(p.useState(!f.popup),2),h=O[0],E=O[1],x=I(p.useState(-1),2),N=x[0],j=x[1],D=I(p.useState(-1),2),k=D[0],H=D[1],A=I(p.useState(!1),2),_=A[0],T=A[1],C=w.setMetaData({props:f,state:{id:v,visible:h,focused:_}}),M=C.ptm,U=C.cx,q=C.sx,R=function(e,n){return M(e,{context:n})};t.useHandleStyle(w.css.styles,C.isUnstyled,{name:"menu"});var Z=p.useRef(null),B=p.useRef(null),F=p.useRef(null),L=!!(h&&f.popup&&f.closeOnEscape),K=a.useDisplayOrder("menu",L);a.useGlobalOnEscapeKey({callback:function(e){pe(e)},when:L&&K,priority:[a.ESC_KEY_HANDLING_PRIORITIES.MENU,K]});var z=I(a.useOverlayListener({target:F,overlay:Z,listener:function(e,n){n.valid&&(pe(e),j(-1))},when:h}),2),G=z[0],J=z[1],X=function(e,n,t){n.disabled?e.preventDefault():(n.command&&n.command({originalEvent:e,item:n}),f.popup&&pe(e),f.popup||N===t||j(t),n.url||(e.preventDefault(),e.stopPropagation()))},Y=function(e,n){e&&f.popup&&N!==n&&j(n)},$=function(e){T(!0),f.popup||(-1!==k?(le(k),H(-1)):le(0)),f.onFocus&&f.onFocus(e)},Q=function(e){T(!1),j(-1),f.onBlur&&f.onBlur(e)},V=function(e){switch(e.code){case"ArrowDown":W(e);break;case"ArrowUp":ee(e);break;case"Home":ne(e);break;case"End":te(e);break;case"Enter":case"NumpadEnter":re(e);break;case"Space":ae(e);break;case"Escape":f.popup&&(u.DomHandler.focus(F.current),pe(e));case"Tab":f.popup&&h&&pe(e)}},W=function(e){var n=ie(N);le(n),e.preventDefault()},ee=function(e){if(e.altKey&&f.popup)u.DomHandler.focus(F.current),pe(e),e.preventDefault();else{var n=oe(N);le(n),e.preventDefault()}},ne=function(e){le(0),e.preventDefault()},te=function(e){le(u.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()},re=function(e){var n=u.DomHandler.findSingle(Z.current,'li[id="'.concat("".concat(N),'"]')),t=n&&u.DomHandler.findSingle(n,'a[data-pc-section="action"]');f.popup&&u.DomHandler.focus(F.current),t?t.click():n&&n.click(),e.preventDefault()},ae=function(e){re(e)},ie=function(e){var n=S(u.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n+1:0},oe=function(e){var n=S(u.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n-1:0},le=function(e){var n=u.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),t=e>=n.length?n.length-1:e<0?0:e;t>-1&&j(n[t].getAttribute("id"))},ue=function(){return-1!==N?N:null},ce=function(e){f.popup&&(h?pe(e):se(e))},se=function(e){F.current=e.currentTarget,E(!0),f.onShow&&f.onShow(e)},pe=function(e){F.current=e.currentTarget,E(!1),f.onHide&&f.onHide(e)},me=function(){u.DomHandler.addStyles(Z.current,{position:"absolute",top:"0",left:"0"}),u.ZIndexUtils.set("menu",Z.current,d&&d.autoZIndex||m.default.autoZIndex,f.baseZIndex||d&&d.zIndex.menu||m.default.zIndex.menu),u.DomHandler.absolutePosition(Z.current,F.current,f.popupAlignment),f.popup&&(u.DomHandler.focus(B.current),le(0))},de=function(){G()},fe=function(){F.current=null,J()},be=function(){u.ZIndexUtils.clear(Z.current)};a.useMountEffect((function(){v||g(u.UniqueComponentId())})),a.useUnmountEffect((function(){u.ZIndexUtils.clear(Z.current)})),p.useImperativeHandle(c,(function(){return{props:f,toggle:ce,show:se,hide:pe,getElement:function(){return Z.current},getTarget:function(){return F.current}}}));var ye=function(e,n){var t=v+"_sub_"+n,r=e.items.map((function(e,n){return ge(e,n,t)})),a=s({id:t,role:"none",className:u.classNames(e.className,U("submenuHeader",{submenu:e})),style:q("submenuHeader",{submenu:e}),"data-p-disabled":e.disabled},M("submenuHeader"));return p.createElement(p.Fragment,{key:t},p.createElement("li",y({},a,{key:t}),e.label),r)},ve=function(e,n){var t=v+"_separator_"+n,r=s({id:t,className:u.classNames(e.className,U("separator")),role:"separator"},M("separator"));return p.createElement("li",y({},r,{key:t}))},ge=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r={item:e,index:n,parentId:t},a=u.classNames("p-menuitem-link",{"p-disabled":e.disabled}),i=u.classNames("p-menuitem-icon",e.icon),o=s({className:U("icon")},R("icon",r)),c=u.IconUtils.getJSXIcon(e.icon,P({},o),{props:f}),m=s({className:U("label")},R("label",r)),d=e.label&&p.createElement("span",m,e.label),b=e.id||(t||v)+"_"+n,g=s({onClick:function(n){return X(n,e,b)},onMouseMove:function(e){return Y(e,b)},className:U("content",{item:e})},R("content",r)),O=s({href:e.url||"#",className:U("action",{item:e}),onFocus:function(e){return e.stopPropagation()},target:e.target,tabIndex:"-1","aria-label":e.label,"aria-hidden":!0,"aria-disabled":e.disabled,"data-p-disabled":e.disabled},R("action",r)),h=p.createElement("div",g,p.createElement("a",O,c,d,p.createElement(l.Ripple,null)));e.template&&(h=u.ObjectUtils.getJSXElement(e.template,e,{onClick:function(n){return X(n,e,b)},className:a,tabIndex:"-1",labelClassName:"p-menuitem-text",iconClassName:i,element:h,props:f}));var E=s({id:b,className:u.classNames(e.className,U("menuitem",{focused:N===b})),style:q("menuitem",{item:e}),role:"menuitem","aria-label":e.label,"aria-disabled":e.disabled,"data-p-focused":ue()===b,"data-p-disabled":e.disabled||!1},R("menuitem",r));return p.createElement("li",y({},E,{key:b}),h)},Oe=function(e,n){return!1===e.visible?null:e.separator?ve(e,n):e.items?ye(e,n):ge(e,n)},he=function(){if(f.model){var e=f.model.map(Oe),n=s({className:u.classNames(f.className,U("root",{context:d})),style:f.style,onClick:function(e){return n=e,void(f.popup&&i.OverlayService.emit("overlay-click",{originalEvent:n,target:F.current}));var n}},w.getOtherProps(f),M("root")),t=s({ref:B,className:U("menu"),id:v+"_list",tabIndex:f.tabIndex||"0",role:"menu","aria-label":f.ariaLabel,"aria-labelledby":f.ariaLabelledBy,"aria-activedescendant":_?ue():void 0,onFocus:$,onKeyDown:V,onBlur:Q},M("menu")),a=s({classNames:U("transition"),in:h,timeout:{enter:120,exit:100},options:f.transitionOptions,unmountOnExit:!0,onEnter:me,onEntered:de,onExit:fe,onExited:be},M("transition"));return p.createElement(r.CSSTransition,y({nodeRef:Z},a),p.createElement("div",y({id:f.id,ref:Z},n),p.createElement("ul",t,e)))}return null}();return f.popup?p.createElement(o.Portal,{element:he,appendTo:f.appendTo}):he})));k.displayName="Menu",exports.Menu=k;
|
package/menu/menu.esm.js
CHANGED
|
@@ -19,73 +19,85 @@ function _typeof(o) {
|
|
|
19
19
|
}, _typeof(o);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
function
|
|
23
|
-
if ("object"
|
|
24
|
-
var
|
|
25
|
-
if (
|
|
26
|
-
var
|
|
27
|
-
if ("object"
|
|
22
|
+
function _toPrimitive(input, hint) {
|
|
23
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
24
|
+
var prim = input[Symbol.toPrimitive];
|
|
25
|
+
if (prim !== undefined) {
|
|
26
|
+
var res = prim.call(input, hint || "default");
|
|
27
|
+
if (_typeof(res) !== "object") return res;
|
|
28
28
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
29
29
|
}
|
|
30
|
-
return ("string"
|
|
30
|
+
return (hint === "string" ? String : Number)(input);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function
|
|
34
|
-
var
|
|
35
|
-
return "symbol"
|
|
33
|
+
function _toPropertyKey(arg) {
|
|
34
|
+
var key = _toPrimitive(arg, "string");
|
|
35
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function _defineProperty(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
function _defineProperty(obj, key, value) {
|
|
39
|
+
key = _toPropertyKey(key);
|
|
40
|
+
if (key in obj) {
|
|
41
|
+
Object.defineProperty(obj, key, {
|
|
42
|
+
value: value,
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
obj[key] = value;
|
|
49
|
+
}
|
|
50
|
+
return obj;
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
function _extends() {
|
|
48
|
-
|
|
49
|
-
for (var
|
|
50
|
-
var
|
|
51
|
-
for (var
|
|
54
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
55
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
56
|
+
var source = arguments[i];
|
|
57
|
+
for (var key in source) {
|
|
58
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
59
|
+
target[key] = source[key];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
52
62
|
}
|
|
53
|
-
return
|
|
54
|
-
}
|
|
63
|
+
return target;
|
|
64
|
+
};
|
|
65
|
+
return _extends.apply(this, arguments);
|
|
55
66
|
}
|
|
56
67
|
|
|
57
|
-
function _arrayLikeToArray(
|
|
58
|
-
(
|
|
59
|
-
for (var
|
|
60
|
-
return
|
|
68
|
+
function _arrayLikeToArray(arr, len) {
|
|
69
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
70
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
71
|
+
return arr2;
|
|
61
72
|
}
|
|
62
73
|
|
|
63
|
-
function _arrayWithoutHoles(
|
|
64
|
-
if (Array.isArray(
|
|
74
|
+
function _arrayWithoutHoles(arr) {
|
|
75
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
65
76
|
}
|
|
66
77
|
|
|
67
|
-
function _iterableToArray(
|
|
68
|
-
if (
|
|
78
|
+
function _iterableToArray(iter) {
|
|
79
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
69
80
|
}
|
|
70
81
|
|
|
71
|
-
function _unsupportedIterableToArray(
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
83
|
+
if (!o) return;
|
|
84
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
85
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
86
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
87
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
88
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
77
89
|
}
|
|
78
90
|
|
|
79
91
|
function _nonIterableSpread() {
|
|
80
92
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
81
93
|
}
|
|
82
94
|
|
|
83
|
-
function _toConsumableArray(
|
|
84
|
-
return _arrayWithoutHoles(
|
|
95
|
+
function _toConsumableArray(arr) {
|
|
96
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
85
97
|
}
|
|
86
98
|
|
|
87
|
-
function _arrayWithHoles(
|
|
88
|
-
if (Array.isArray(
|
|
99
|
+
function _arrayWithHoles(arr) {
|
|
100
|
+
if (Array.isArray(arr)) return arr;
|
|
89
101
|
}
|
|
90
102
|
|
|
91
103
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -120,8 +132,8 @@ function _nonIterableRest() {
|
|
|
120
132
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
121
133
|
}
|
|
122
134
|
|
|
123
|
-
function _slicedToArray(
|
|
124
|
-
return _arrayWithHoles(
|
|
135
|
+
function _slicedToArray(arr, i) {
|
|
136
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
125
137
|
}
|
|
126
138
|
|
|
127
139
|
var styles = "\n@layer primereact {\n .p-menu-overlay {\n position: absolute;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n\n .p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-menu .p-menuitem-text {\n line-height: 1;\n }\n}\n";
|
|
@@ -136,21 +148,26 @@ var classes = {
|
|
|
136
148
|
});
|
|
137
149
|
},
|
|
138
150
|
menu: 'p-menu-list p-reset',
|
|
139
|
-
content:
|
|
140
|
-
action: function action(_ref2) {
|
|
151
|
+
content: function content(_ref2) {
|
|
141
152
|
var item = _ref2.item;
|
|
153
|
+
return classNames('p-menuitem-content', {
|
|
154
|
+
'p-disabled': item.disabled
|
|
155
|
+
});
|
|
156
|
+
},
|
|
157
|
+
action: function action(_ref3) {
|
|
158
|
+
var item = _ref3.item;
|
|
142
159
|
return classNames('p-menuitem-link', {
|
|
143
160
|
'p-disabled': item.disabled
|
|
144
161
|
});
|
|
145
162
|
},
|
|
146
|
-
menuitem: function menuitem(
|
|
147
|
-
var focused =
|
|
163
|
+
menuitem: function menuitem(_ref4) {
|
|
164
|
+
var focused = _ref4.focused;
|
|
148
165
|
return classNames('p-menuitem', {
|
|
149
166
|
'p-focus': focused
|
|
150
167
|
});
|
|
151
168
|
},
|
|
152
|
-
submenuHeader: function submenuHeader(
|
|
153
|
-
var submenu =
|
|
169
|
+
submenuHeader: function submenuHeader(_ref5) {
|
|
170
|
+
var submenu = _ref5.submenu;
|
|
154
171
|
return classNames('p-submenu-header', {
|
|
155
172
|
'p-disabled': submenu.disabled
|
|
156
173
|
});
|
|
@@ -161,12 +178,12 @@ var classes = {
|
|
|
161
178
|
transition: 'p-connected-overlay'
|
|
162
179
|
};
|
|
163
180
|
var inlineStyles = {
|
|
164
|
-
submenuHeader: function submenuHeader(
|
|
165
|
-
var submenu =
|
|
181
|
+
submenuHeader: function submenuHeader(_ref6) {
|
|
182
|
+
var submenu = _ref6.submenu;
|
|
166
183
|
return submenu.style;
|
|
167
184
|
},
|
|
168
|
-
menuitem: function menuitem(
|
|
169
|
-
var item =
|
|
185
|
+
menuitem: function menuitem(_ref7) {
|
|
186
|
+
var item = _ref7.item;
|
|
170
187
|
return item.style;
|
|
171
188
|
}
|
|
172
189
|
};
|
|
@@ -534,7 +551,9 @@ var Menu = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
534
551
|
onMouseMove: function onMouseMove(event) {
|
|
535
552
|
return onItemMouseMove(event, key);
|
|
536
553
|
},
|
|
537
|
-
className: cx('content'
|
|
554
|
+
className: cx('content', {
|
|
555
|
+
item: item
|
|
556
|
+
})
|
|
538
557
|
}, getMenuItemPTOptions('content', menuContext));
|
|
539
558
|
var actionProps = mergeProps({
|
|
540
559
|
href: item.url || '#',
|
package/menu/menu.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import n,{PrimeReactContext as t}from"primereact/api";import{ComponentBase as r,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as o}from"primereact/csstransition";import{useMergeProps as i,useDisplayOrder as u,useGlobalOnEscapeKey as l,ESC_KEY_HANDLING_PRIORITIES as c,useOverlayListener as s,useMountEffect as p,useUnmountEffect as m}from"primereact/hooks";import{OverlayService as d}from"primereact/overlayservice";import{Portal as f}from"primereact/portal";import{Ripple as b}from"primereact/ripple";import{classNames as y,UniqueComponentId as v,ZIndexUtils as g,DomHandler as h,IconUtils as x,ObjectUtils as E}from"primereact/utils";function S(e){return S="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},S(e)}function O(e,n){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function w(e){var n=O(e,"string");return"symbol"==S(n)?n:n+""}function k(e,n,t){return(n=w(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function I(){return I=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},I.apply(null,arguments)}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function j(e){if(Array.isArray(e))return N(e)}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function D(e,n){if(e){if("string"==typeof e)return N(e,n);var t={}.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)?N(e,n):void 0}}function A(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e){return j(e)||P(e)||D(e)||A()}function H(e){if(Array.isArray(e))return e}function _(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,o,i,u=[],l=!0,c=!1;try{if(o=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=o.call(t)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw a}}return u}}function C(){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 M(e,n){return H(e)||_(e,n)||D(e,n)||C()}var B=r.extend({defaultProps:{__TYPE:"Menu",id:null,ariaLabel:null,ariaLabelledBy:null,tabIndex:0,model:null,popup:!1,popupAlignment:"left",style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,onFocus:null,onBlur:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var t=e.context;return y("p-menu p-component",{"p-menu-overlay":e.props.popup,"p-input-filled":t&&"filled"===t.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===n.ripple})},menu:"p-menu-list p-reset",content:"p-menuitem-content",action:function(e){return y("p-menuitem-link",{"p-disabled":e.item.disabled})},menuitem:function(e){return y("p-menuitem",{"p-focus":e.focused})},submenuHeader:function(e){return y("p-submenu-header",{"p-disabled":e.submenu.disabled})},separator:"p-menu-separator",label:"p-menuitem-text",icon:"p-menuitem-icon",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-menu-overlay {\n position: absolute;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n\n .p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-menu .p-menuitem-text {\n line-height: 1;\n }\n}\n",inlineStyles:{submenuHeader:function(e){return e.submenu.style},menuitem:function(e){return e.item.style}}}});function F(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 R(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){k(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=e.memo(e.forwardRef((function(r,S){var O=i(),w=e.useContext(t),k=B.getProps(r,w),N=M(e.useState(k.id),2),j=N[0],P=N[1],D=M(e.useState(!k.popup),2),A=D[0],H=D[1],_=M(e.useState(-1),2),C=_[0],F=_[1],Z=M(e.useState(-1),2),L=Z[0],U=Z[1],z=M(e.useState(!1),2),J=z[0],K=z[1],X=B.setMetaData({props:k,state:{id:j,visible:A,focused:J}}),G=X.ptm,Y=X.cx,$=X.sx,q=function(e,n){return G(e,{context:n})};a(B.css.styles,X.isUnstyled,{name:"menu"});var Q=e.useRef(null),V=e.useRef(null),W=e.useRef(null),ee=!!(A&&k.popup&&k.closeOnEscape),ne=u("menu",ee);l({callback:function(e){Se(e)},when:ee&&ne,priority:[c.MENU,ne]});var te=M(s({target:W,overlay:Q,listener:function(e,n){n.valid&&(Se(e),F(-1))},when:A}),2),re=te[0],ae=te[1],oe=function(e,n,t){n.disabled?e.preventDefault():(n.command&&n.command({originalEvent:e,item:n}),k.popup&&Se(e),k.popup||C===t||F(t),n.url||(e.preventDefault(),e.stopPropagation()))},ie=function(e,n){e&&k.popup&&C!==n&&F(n)},ue=function(e){K(!0),k.popup||(-1!==L?(ge(L),U(-1)):ge(0)),k.onFocus&&k.onFocus(e)},le=function(e){K(!1),F(-1),k.onBlur&&k.onBlur(e)},ce=function(e){switch(e.code){case"ArrowDown":se(e);break;case"ArrowUp":pe(e);break;case"Home":me(e);break;case"End":de(e);break;case"Enter":case"NumpadEnter":fe(e);break;case"Space":be(e);break;case"Escape":k.popup&&(h.focus(W.current),Se(e));case"Tab":k.popup&&A&&Se(e)}},se=function(e){var n=ye(C);ge(n),e.preventDefault()},pe=function(e){if(e.altKey&&k.popup)h.focus(W.current),Se(e),e.preventDefault();else{var n=ve(C);ge(n),e.preventDefault()}},me=function(e){ge(0),e.preventDefault()},de=function(e){ge(h.find(Q.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()},fe=function(e){var n=h.findSingle(Q.current,'li[id="'.concat("".concat(C),'"]')),t=n&&h.findSingle(n,'a[data-pc-section="action"]');k.popup&&h.focus(W.current),t?t.click():n&&n.click(),e.preventDefault()},be=function(e){fe(e)},ye=function(e){var n=T(h.find(Q.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n+1:0},ve=function(e){var n=T(h.find(Q.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n-1:0},ge=function(e){var n=h.find(Q.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),t=e>=n.length?n.length-1:e<0?0:e;t>-1&&F(n[t].getAttribute("id"))},he=function(){return-1!==C?C:null},xe=function(e){k.popup&&(A?Se(e):Ee(e))},Ee=function(e){W.current=e.currentTarget,H(!0),k.onShow&&k.onShow(e)},Se=function(e){W.current=e.currentTarget,H(!1),k.onHide&&k.onHide(e)},Oe=function(){h.addStyles(Q.current,{position:"absolute",top:"0",left:"0"}),g.set("menu",Q.current,w&&w.autoZIndex||n.autoZIndex,k.baseZIndex||w&&w.zIndex.menu||n.zIndex.menu),h.absolutePosition(Q.current,W.current,k.popupAlignment),k.popup&&(h.focus(V.current),ge(0))},we=function(){re()},ke=function(){W.current=null,ae()},Ie=function(){g.clear(Q.current)};p((function(){j||P(v())})),m((function(){g.clear(Q.current)})),e.useImperativeHandle(S,(function(){return{props:k,toggle:xe,show:Ee,hide:Se,getElement:function(){return Q.current},getTarget:function(){return W.current}}}));var Ne=function(n,t){var r=j+"_sub_"+t,a=n.items.map((function(e,n){return Pe(e,n,r)})),o=O({id:r,role:"none",className:y(n.className,Y("submenuHeader",{submenu:n})),style:$("submenuHeader",{submenu:n}),"data-p-disabled":n.disabled},G("submenuHeader"));return e.createElement(e.Fragment,{key:r},e.createElement("li",I({},o,{key:r}),n.label),a)},je=function(n,t){var r=j+"_separator_"+t,a=O({id:r,className:y(n.className,Y("separator")),role:"separator"},G("separator"));return e.createElement("li",I({},a,{key:r}))},Pe=function(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a={item:n,index:t,parentId:r},o=y("p-menuitem-link",{"p-disabled":n.disabled}),i=y("p-menuitem-icon",n.icon),u=O({className:Y("icon")},q("icon",a)),l=x.getJSXIcon(n.icon,R({},u),{props:k}),c=O({className:Y("label")},q("label",a)),s=n.label&&e.createElement("span",c,n.label),p=n.id||(r||j)+"_"+t,m=O({onClick:function(e){return oe(e,n,p)},onMouseMove:function(e){return ie(e,p)},className:Y("content")},q("content",a)),d=O({href:n.url||"#",className:Y("action",{item:n}),onFocus:function(e){return e.stopPropagation()},target:n.target,tabIndex:"-1","aria-label":n.label,"aria-hidden":!0,"aria-disabled":n.disabled,"data-p-disabled":n.disabled},q("action",a)),f=e.createElement("div",m,e.createElement("a",d,l,s,e.createElement(b,null)));n.template&&(f=E.getJSXElement(n.template,n,{onClick:function(e){return oe(e,n,p)},className:o,tabIndex:"-1",labelClassName:"p-menuitem-text",iconClassName:i,element:f,props:k}));var v=O({id:p,className:y(n.className,Y("menuitem",{focused:C===p})),style:$("menuitem",{item:n}),role:"menuitem","aria-label":n.label,"aria-disabled":n.disabled,"data-p-focused":he()===p,"data-p-disabled":n.disabled||!1},q("menuitem",a));return e.createElement("li",I({},v,{key:p}),f)},De=function(e,n){return!1===e.visible?null:e.separator?je(e,n):e.items?Ne(e,n):Pe(e,n)},Ae=function(){if(k.model){var n=k.model.map(De),t=O({className:y(k.className,Y("root",{context:w})),style:k.style,onClick:function(e){return n=e,void(k.popup&&d.emit("overlay-click",{originalEvent:n,target:W.current}));var n}},B.getOtherProps(k),G("root")),r=O({ref:V,className:Y("menu"),id:j+"_list",tabIndex:k.tabIndex||"0",role:"menu","aria-label":k.ariaLabel,"aria-labelledby":k.ariaLabelledBy,"aria-activedescendant":J?he():void 0,onFocus:ue,onKeyDown:ce,onBlur:le},G("menu")),a=O({classNames:Y("transition"),in:A,timeout:{enter:120,exit:100},options:k.transitionOptions,unmountOnExit:!0,onEnter:Oe,onEntered:we,onExit:ke,onExited:Ie},G("transition"));return e.createElement(o,I({nodeRef:Q},a),e.createElement("div",I({id:k.id,ref:Q},t),e.createElement("ul",r,n)))}return null}();return k.popup?e.createElement(f,{element:Ae,appendTo:k.appendTo}):Ae})));Z.displayName="Menu";export{Z as Menu};
|
|
1
|
+
import*as e from"react";import n,{PrimeReactContext as t}from"primereact/api";import{ComponentBase as r,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as o}from"primereact/csstransition";import{useMergeProps as i,useDisplayOrder as u,useGlobalOnEscapeKey as l,ESC_KEY_HANDLING_PRIORITIES as c,useOverlayListener as s,useMountEffect as p,useUnmountEffect as m}from"primereact/hooks";import{OverlayService as d}from"primereact/overlayservice";import{Portal as f}from"primereact/portal";import{Ripple as b}from"primereact/ripple";import{classNames as y,UniqueComponentId as v,ZIndexUtils as g,DomHandler as h,IconUtils as x,ObjectUtils as S}from"primereact/utils";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 O(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 w(e){var n=O(e,"string");return"symbol"===E(n)?n:String(n)}function j(){return j=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},j.apply(this,arguments)}function k(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 I(e){if(Array.isArray(e))return k(e)}function N(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function P(e,n){if(e){if("string"==typeof e)return k(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)?k(e,n):void 0}}function D(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e){return I(e)||N(e)||P(e)||D()}function T(e){if(Array.isArray(e))return e}function H(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,o,i,u=[],l=!0,c=!1;try{if(o=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=o.call(t)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw a}}return u}}function _(){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 C(e,n){return T(e)||H(e,n)||P(e,n)||_()}var M=r.extend({defaultProps:{__TYPE:"Menu",id:null,ariaLabel:null,ariaLabelledBy:null,tabIndex:0,model:null,popup:!1,popupAlignment:"left",style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,onFocus:null,onBlur:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var t=e.context;return y("p-menu p-component",{"p-menu-overlay":e.props.popup,"p-input-filled":t&&"filled"===t.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===n.ripple})},menu:"p-menu-list p-reset",content:function(e){return y("p-menuitem-content",{"p-disabled":e.item.disabled})},action:function(e){return y("p-menuitem-link",{"p-disabled":e.item.disabled})},menuitem:function(e){return y("p-menuitem",{"p-focus":e.focused})},submenuHeader:function(e){return y("p-submenu-header",{"p-disabled":e.submenu.disabled})},separator:"p-menu-separator",label:"p-menuitem-text",icon:"p-menuitem-icon",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-menu-overlay {\n position: absolute;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n\n .p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-menu .p-menuitem-text {\n line-height: 1;\n }\n}\n",inlineStyles:{submenuHeader:function(e){return e.submenu.style},menuitem:function(e){return e.item.style}}}});function B(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 F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B(Object(t),!0).forEach((function(n){var r,a,o;r=e,o=t[n],(a=w(a=n))in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var R=e.memo(e.forwardRef((function(r,E){var O=i(),w=e.useContext(t),k=M.getProps(r,w),I=C(e.useState(k.id),2),N=I[0],P=I[1],D=C(e.useState(!k.popup),2),T=D[0],H=D[1],_=C(e.useState(-1),2),B=_[0],R=_[1],Z=C(e.useState(-1),2),L=Z[0],U=Z[1],z=C(e.useState(!1),2),J=z[0],K=z[1],X=M.setMetaData({props:k,state:{id:N,visible:T,focused:J}}),G=X.ptm,Y=X.cx,$=X.sx,q=function(e,n){return G(e,{context:n})};a(M.css.styles,X.isUnstyled,{name:"menu"});var Q=e.useRef(null),V=e.useRef(null),W=e.useRef(null),ee=!!(T&&k.popup&&k.closeOnEscape),ne=u("menu",ee);l({callback:function(e){Ee(e)},when:ee&&ne,priority:[c.MENU,ne]});var te=C(s({target:W,overlay:Q,listener:function(e,n){n.valid&&(Ee(e),R(-1))},when:T}),2),re=te[0],ae=te[1],oe=function(e,n,t){n.disabled?e.preventDefault():(n.command&&n.command({originalEvent:e,item:n}),k.popup&&Ee(e),k.popup||B===t||R(t),n.url||(e.preventDefault(),e.stopPropagation()))},ie=function(e,n){e&&k.popup&&B!==n&&R(n)},ue=function(e){K(!0),k.popup||(-1!==L?(ge(L),U(-1)):ge(0)),k.onFocus&&k.onFocus(e)},le=function(e){K(!1),R(-1),k.onBlur&&k.onBlur(e)},ce=function(e){switch(e.code){case"ArrowDown":se(e);break;case"ArrowUp":pe(e);break;case"Home":me(e);break;case"End":de(e);break;case"Enter":case"NumpadEnter":fe(e);break;case"Space":be(e);break;case"Escape":k.popup&&(h.focus(W.current),Ee(e));case"Tab":k.popup&&T&&Ee(e)}},se=function(e){var n=ye(B);ge(n),e.preventDefault()},pe=function(e){if(e.altKey&&k.popup)h.focus(W.current),Ee(e),e.preventDefault();else{var n=ve(B);ge(n),e.preventDefault()}},me=function(e){ge(0),e.preventDefault()},de=function(e){ge(h.find(Q.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()},fe=function(e){var n=h.findSingle(Q.current,'li[id="'.concat("".concat(B),'"]')),t=n&&h.findSingle(n,'a[data-pc-section="action"]');k.popup&&h.focus(W.current),t?t.click():n&&n.click(),e.preventDefault()},be=function(e){fe(e)},ye=function(e){var n=A(h.find(Q.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n+1:0},ve=function(e){var n=A(h.find(Q.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n-1:0},ge=function(e){var n=h.find(Q.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),t=e>=n.length?n.length-1:e<0?0:e;t>-1&&R(n[t].getAttribute("id"))},he=function(){return-1!==B?B:null},xe=function(e){k.popup&&(T?Ee(e):Se(e))},Se=function(e){W.current=e.currentTarget,H(!0),k.onShow&&k.onShow(e)},Ee=function(e){W.current=e.currentTarget,H(!1),k.onHide&&k.onHide(e)},Oe=function(){h.addStyles(Q.current,{position:"absolute",top:"0",left:"0"}),g.set("menu",Q.current,w&&w.autoZIndex||n.autoZIndex,k.baseZIndex||w&&w.zIndex.menu||n.zIndex.menu),h.absolutePosition(Q.current,W.current,k.popupAlignment),k.popup&&(h.focus(V.current),ge(0))},we=function(){re()},je=function(){W.current=null,ae()},ke=function(){g.clear(Q.current)};p((function(){N||P(v())})),m((function(){g.clear(Q.current)})),e.useImperativeHandle(E,(function(){return{props:k,toggle:xe,show:Se,hide:Ee,getElement:function(){return Q.current},getTarget:function(){return W.current}}}));var Ie=function(n,t){var r=N+"_sub_"+t,a=n.items.map((function(e,n){return Pe(e,n,r)})),o=O({id:r,role:"none",className:y(n.className,Y("submenuHeader",{submenu:n})),style:$("submenuHeader",{submenu:n}),"data-p-disabled":n.disabled},G("submenuHeader"));return e.createElement(e.Fragment,{key:r},e.createElement("li",j({},o,{key:r}),n.label),a)},Ne=function(n,t){var r=N+"_separator_"+t,a=O({id:r,className:y(n.className,Y("separator")),role:"separator"},G("separator"));return e.createElement("li",j({},a,{key:r}))},Pe=function(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a={item:n,index:t,parentId:r},o=y("p-menuitem-link",{"p-disabled":n.disabled}),i=y("p-menuitem-icon",n.icon),u=O({className:Y("icon")},q("icon",a)),l=x.getJSXIcon(n.icon,F({},u),{props:k}),c=O({className:Y("label")},q("label",a)),s=n.label&&e.createElement("span",c,n.label),p=n.id||(r||N)+"_"+t,m=O({onClick:function(e){return oe(e,n,p)},onMouseMove:function(e){return ie(e,p)},className:Y("content",{item:n})},q("content",a)),d=O({href:n.url||"#",className:Y("action",{item:n}),onFocus:function(e){return e.stopPropagation()},target:n.target,tabIndex:"-1","aria-label":n.label,"aria-hidden":!0,"aria-disabled":n.disabled,"data-p-disabled":n.disabled},q("action",a)),f=e.createElement("div",m,e.createElement("a",d,l,s,e.createElement(b,null)));n.template&&(f=S.getJSXElement(n.template,n,{onClick:function(e){return oe(e,n,p)},className:o,tabIndex:"-1",labelClassName:"p-menuitem-text",iconClassName:i,element:f,props:k}));var v=O({id:p,className:y(n.className,Y("menuitem",{focused:B===p})),style:$("menuitem",{item:n}),role:"menuitem","aria-label":n.label,"aria-disabled":n.disabled,"data-p-focused":he()===p,"data-p-disabled":n.disabled||!1},q("menuitem",a));return e.createElement("li",j({},v,{key:p}),f)},De=function(e,n){return!1===e.visible?null:e.separator?Ne(e,n):e.items?Ie(e,n):Pe(e,n)},Ae=function(){if(k.model){var n=k.model.map(De),t=O({className:y(k.className,Y("root",{context:w})),style:k.style,onClick:function(e){return n=e,void(k.popup&&d.emit("overlay-click",{originalEvent:n,target:W.current}));var n}},M.getOtherProps(k),G("root")),r=O({ref:V,className:Y("menu"),id:N+"_list",tabIndex:k.tabIndex||"0",role:"menu","aria-label":k.ariaLabel,"aria-labelledby":k.ariaLabelledBy,"aria-activedescendant":J?he():void 0,onFocus:ue,onKeyDown:ce,onBlur:le},G("menu")),a=O({classNames:Y("transition"),in:T,timeout:{enter:120,exit:100},options:k.transitionOptions,unmountOnExit:!0,onEnter:Oe,onEntered:we,onExit:je,onExited:ke},G("transition"));return e.createElement(o,j({nodeRef:Q},a),e.createElement("div",j({id:k.id,ref:Q},t),e.createElement("ul",r,n)))}return null}();return k.popup?e.createElement(f,{element:Ae,appendTo:k.appendTo}):Ae})));R.displayName="Menu";export{R as Menu};
|