primereact 10.8.3 → 10.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.cjs.js +51 -63
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +51 -63
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +51 -63
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +61 -75
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +61 -75
- package/api/api.esm.min.js +1 -1
- package/api/api.js +61 -75
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +81 -80
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +81 -80
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +81 -80
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +37 -49
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +37 -49
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +37 -49
- package/avatar/avatar.min.js +1 -1
- package/badge/badge.cjs.js +18 -24
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +18 -24
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +18 -24
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +37 -49
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +37 -49
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +37 -49
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +38 -50
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +38 -50
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +38 -50
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +25 -36
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +25 -36
- package/button/button.esm.min.js +1 -1
- package/button/button.js +25 -36
- package/button/button.min.js +1 -1
- package/buttongroup/buttongroup.cjs.js +1 -1
- package/buttongroup/buttongroup.esm.js +1 -1
- package/buttongroup/buttongroup.js +1 -1
- package/calendar/calendar.cjs.js +58 -68
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +59 -69
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +58 -68
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +44 -56
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +44 -56
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +44 -56
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +50 -62
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +50 -62
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +50 -62
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +1 -1
- package/chart/chart.esm.js +1 -1
- package/chart/chart.js +1 -1
- package/checkbox/checkbox.cjs.js +38 -50
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +38 -50
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +38 -50
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +40 -52
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +40 -52
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +40 -52
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +47 -57
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +47 -57
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +47 -57
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +38 -50
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +38 -50
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +38 -50
- package/colorpicker/colorpicker.min.js +1 -1
- package/componentbase/componentbase.cjs.js +47 -54
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +47 -54
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +47 -54
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +38 -50
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +38 -50
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +38 -50
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +41 -54
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +41 -54
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +41 -54
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +42 -51
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +42 -51
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +42 -51
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1147 -1571
- package/core/core.min.js +67 -67
- package/csstransition/csstransition.cjs.js +18 -23
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +18 -23
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +18 -23
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +27 -33
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +27 -33
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +27 -33
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +135 -151
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +135 -151
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +135 -151
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +47 -59
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +47 -59
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +47 -59
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +14 -15
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +14 -15
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +14 -15
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +47 -59
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +48 -60
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +47 -59
- package/dialog/dialog.min.js +1 -1
- package/dock/dock.cjs.js +44 -56
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +44 -56
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +44 -56
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +54 -68
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +54 -68
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +54 -68
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +38 -50
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +38 -50
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +38 -50
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +20 -26
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +20 -26
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +20 -26
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +50 -62
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +50 -62
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +50 -62
- package/fileupload/fileupload.min.js +1 -1
- package/floatlabel/floatlabel.cjs.js +1 -1
- package/floatlabel/floatlabel.esm.js +1 -1
- package/floatlabel/floatlabel.js +1 -1
- package/focustrap/focustrap.cjs.js +18 -24
- package/focustrap/focustrap.cjs.min.js +1 -1
- package/focustrap/focustrap.esm.js +18 -24
- package/focustrap/focustrap.esm.min.js +1 -1
- package/focustrap/focustrap.js +18 -24
- package/focustrap/focustrap.min.js +1 -1
- package/galleria/galleria.cjs.js +46 -58
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +46 -58
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +46 -58
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +37 -47
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +37 -47
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +37 -47
- package/hooks/hooks.min.js +1 -1
- package/iconfield/iconfield.cjs.js +24 -35
- package/iconfield/iconfield.cjs.min.js +1 -1
- package/iconfield/iconfield.esm.js +24 -35
- package/iconfield/iconfield.esm.min.js +1 -1
- package/iconfield/iconfield.js +24 -35
- package/iconfield/iconfield.min.js +1 -1
- package/icons/angledoubledown/index.cjs.js +7 -12
- package/icons/angledoubledown/index.cjs.min.js +1 -1
- package/icons/angledoubledown/index.esm.js +7 -12
- package/icons/angledoubledown/index.esm.min.js +1 -1
- package/icons/angledoubledown/index.js +7 -12
- package/icons/angledoubledown/index.min.js +1 -1
- package/icons/angledoubleleft/index.cjs.js +7 -12
- package/icons/angledoubleleft/index.cjs.min.js +1 -1
- package/icons/angledoubleleft/index.esm.js +7 -12
- package/icons/angledoubleleft/index.esm.min.js +1 -1
- package/icons/angledoubleleft/index.js +7 -12
- package/icons/angledoubleleft/index.min.js +1 -1
- package/icons/angledoubleright/index.cjs.js +7 -12
- package/icons/angledoubleright/index.cjs.min.js +1 -1
- package/icons/angledoubleright/index.esm.js +7 -12
- package/icons/angledoubleright/index.esm.min.js +1 -1
- package/icons/angledoubleright/index.js +7 -12
- package/icons/angledoubleright/index.min.js +1 -1
- package/icons/angledoubleup/index.cjs.js +7 -12
- package/icons/angledoubleup/index.cjs.min.js +1 -1
- package/icons/angledoubleup/index.esm.js +7 -12
- package/icons/angledoubleup/index.esm.min.js +1 -1
- package/icons/angledoubleup/index.js +7 -12
- package/icons/angledoubleup/index.min.js +1 -1
- package/icons/angledown/index.cjs.js +7 -12
- package/icons/angledown/index.cjs.min.js +1 -1
- package/icons/angledown/index.esm.js +7 -12
- package/icons/angledown/index.esm.min.js +1 -1
- package/icons/angledown/index.js +7 -12
- package/icons/angledown/index.min.js +1 -1
- package/icons/angleleft/index.cjs.js +7 -12
- package/icons/angleleft/index.cjs.min.js +1 -1
- package/icons/angleleft/index.esm.js +7 -12
- package/icons/angleleft/index.esm.min.js +1 -1
- package/icons/angleleft/index.js +7 -12
- package/icons/angleleft/index.min.js +1 -1
- package/icons/angleright/index.cjs.js +7 -12
- package/icons/angleright/index.cjs.min.js +1 -1
- package/icons/angleright/index.esm.js +7 -12
- package/icons/angleright/index.esm.min.js +1 -1
- package/icons/angleright/index.js +7 -12
- package/icons/angleright/index.min.js +1 -1
- package/icons/angleup/index.cjs.js +7 -12
- package/icons/angleup/index.cjs.min.js +1 -1
- package/icons/angleup/index.esm.js +7 -12
- package/icons/angleup/index.esm.min.js +1 -1
- package/icons/angleup/index.js +7 -12
- package/icons/angleup/index.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +7 -12
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +7 -12
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +7 -12
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +7 -12
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +7 -12
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +7 -12
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +7 -12
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +7 -12
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +7 -12
- package/icons/ban/index.min.js +1 -1
- package/icons/bars/index.cjs.js +7 -12
- package/icons/bars/index.cjs.min.js +1 -1
- package/icons/bars/index.esm.js +7 -12
- package/icons/bars/index.esm.min.js +1 -1
- package/icons/bars/index.js +7 -12
- package/icons/bars/index.min.js +1 -1
- package/icons/blank/index.cjs.js +7 -12
- package/icons/blank/index.cjs.min.js +1 -1
- package/icons/blank/index.esm.js +7 -12
- package/icons/blank/index.esm.min.js +1 -1
- package/icons/blank/index.js +7 -12
- package/icons/blank/index.min.js +1 -1
- package/icons/calendar/index.cjs.js +7 -12
- package/icons/calendar/index.cjs.min.js +1 -1
- package/icons/calendar/index.esm.js +7 -12
- package/icons/calendar/index.esm.min.js +1 -1
- package/icons/calendar/index.js +7 -12
- package/icons/calendar/index.min.js +1 -1
- package/icons/check/index.cjs.js +7 -12
- package/icons/check/index.cjs.min.js +1 -1
- package/icons/check/index.esm.js +7 -12
- package/icons/check/index.esm.min.js +1 -1
- package/icons/check/index.js +7 -12
- package/icons/check/index.min.js +1 -1
- package/icons/chevrondown/index.cjs.js +7 -12
- package/icons/chevrondown/index.cjs.min.js +1 -1
- package/icons/chevrondown/index.esm.js +7 -12
- package/icons/chevrondown/index.esm.min.js +1 -1
- package/icons/chevrondown/index.js +7 -12
- package/icons/chevrondown/index.min.js +1 -1
- package/icons/chevronleft/index.cjs.js +7 -12
- package/icons/chevronleft/index.cjs.min.js +1 -1
- package/icons/chevronleft/index.esm.js +7 -12
- package/icons/chevronleft/index.esm.min.js +1 -1
- package/icons/chevronleft/index.js +7 -12
- package/icons/chevronleft/index.min.js +1 -1
- package/icons/chevronright/index.cjs.js +7 -12
- package/icons/chevronright/index.cjs.min.js +1 -1
- package/icons/chevronright/index.esm.js +7 -12
- package/icons/chevronright/index.esm.min.js +1 -1
- package/icons/chevronright/index.js +7 -12
- package/icons/chevronright/index.min.js +1 -1
- package/icons/chevronup/index.cjs.js +7 -12
- package/icons/chevronup/index.cjs.min.js +1 -1
- package/icons/chevronup/index.esm.js +7 -12
- package/icons/chevronup/index.esm.min.js +1 -1
- package/icons/chevronup/index.js +7 -12
- package/icons/chevronup/index.min.js +1 -1
- package/icons/download/index.cjs.js +7 -12
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +7 -12
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +7 -12
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +7 -12
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +7 -12
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +7 -12
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eye/index.cjs.js +7 -12
- package/icons/eye/index.cjs.min.js +1 -1
- package/icons/eye/index.esm.js +7 -12
- package/icons/eye/index.esm.min.js +1 -1
- package/icons/eye/index.js +7 -12
- package/icons/eye/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +7 -12
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +7 -12
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +7 -12
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +7 -12
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +7 -12
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +7 -12
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +7 -12
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +7 -12
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +7 -12
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +7 -12
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +7 -12
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +7 -12
- package/icons/infocircle/index.min.js +1 -1
- package/icons/minus/index.cjs.js +7 -12
- package/icons/minus/index.cjs.min.js +1 -1
- package/icons/minus/index.esm.js +7 -12
- package/icons/minus/index.esm.min.js +1 -1
- package/icons/minus/index.js +7 -12
- package/icons/minus/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +7 -12
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +7 -12
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +7 -12
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +7 -12
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +7 -12
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +7 -12
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +7 -12
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +7 -12
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +7 -12
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +7 -12
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +7 -12
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +7 -12
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +7 -12
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +7 -12
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +7 -12
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +7 -12
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +7 -12
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +7 -12
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +7 -12
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +7 -12
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +7 -12
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +7 -12
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +7 -12
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +7 -12
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +7 -12
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +7 -12
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +7 -12
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +7 -12
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +7 -12
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +7 -12
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +7 -12
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +7 -12
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +7 -12
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +7 -12
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +7 -12
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +7 -12
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +7 -12
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +7 -12
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +7 -12
- package/icons/thlarge/index.min.js +1 -1
- package/icons/times/index.cjs.js +7 -12
- package/icons/times/index.cjs.min.js +1 -1
- package/icons/times/index.esm.js +7 -12
- package/icons/times/index.esm.min.js +1 -1
- package/icons/times/index.js +7 -12
- package/icons/times/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +7 -12
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +7 -12
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +7 -12
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +7 -12
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +7 -12
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +7 -12
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +7 -12
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +7 -12
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +7 -12
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +7 -12
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +7 -12
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +7 -12
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +7 -12
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +7 -12
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +7 -12
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +7 -12
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +7 -12
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +7 -12
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +39 -51
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +39 -51
- package/image/image.esm.min.js +1 -1
- package/image/image.js +39 -51
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +14 -15
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +14 -15
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +14 -15
- package/inplace/inplace.min.js +1 -1
- package/inputicon/inputicon.cjs.js +24 -35
- package/inputicon/inputicon.cjs.min.js +1 -1
- package/inputicon/inputicon.esm.js +24 -35
- package/inputicon/inputicon.esm.min.js +1 -1
- package/inputicon/inputicon.js +24 -35
- package/inputicon/inputicon.min.js +1 -1
- package/inputmask/inputmask.cjs.js +10 -13
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +10 -13
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +10 -13
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +59 -66
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +60 -67
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +59 -66
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/inputotp.cjs.js +53 -65
- package/inputotp/inputotp.cjs.min.js +1 -1
- package/inputotp/inputotp.esm.js +53 -65
- package/inputotp/inputotp.esm.min.js +1 -1
- package/inputotp/inputotp.js +53 -65
- package/inputotp/inputotp.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +24 -35
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +24 -35
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +24 -35
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +31 -35
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -0
- package/inputtext/inputtext.esm.js +31 -35
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +31 -35
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +26 -36
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +26 -36
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +26 -36
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +16 -17
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +16 -17
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +16 -17
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +15 -16
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +15 -16
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +15 -16
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +48 -60
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +48 -60
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +48 -60
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +44 -56
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +44 -56
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +44 -56
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +48 -58
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +8 -0
- package/mention/mention.esm.js +48 -58
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +48 -58
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +47 -59
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +14 -0
- package/menu/menu.esm.js +47 -59
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +47 -59
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +45 -54
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +45 -54
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +45 -54
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +24 -35
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +24 -35
- package/message/message.esm.min.js +1 -1
- package/message/message.js +24 -35
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +46 -59
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +47 -60
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +46 -59
- package/messages/messages.min.js +1 -1
- package/metergroup/metergroup.cjs.js +23 -34
- package/metergroup/metergroup.cjs.min.js +1 -1
- package/metergroup/metergroup.esm.js +23 -34
- package/metergroup/metergroup.esm.min.js +1 -1
- package/metergroup/metergroup.js +23 -34
- package/metergroup/metergroup.min.js +1 -1
- package/multiselect/multiselect.cjs.js +149 -163
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +149 -163
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +149 -163
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +39 -51
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +39 -51
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +39 -51
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +46 -58
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +46 -58
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +46 -58
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +46 -62
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +46 -62
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +46 -62
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +38 -50
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +38 -50
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +38 -50
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +42 -57
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +42 -57
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +42 -57
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +20 -26
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +20 -26
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +20 -26
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +59 -68
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +59 -68
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +59 -68
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +17 -23
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.esm.js +17 -23
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +17 -23
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +360 -334
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +360 -334
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +360 -334
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +47 -53
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +47 -53
- package/password/password.esm.min.js +1 -1
- package/password/password.js +47 -53
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +51 -66
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +51 -66
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +51 -66
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +14 -15
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +14 -15
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +14 -15
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +917 -858
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +917 -858
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +917 -858
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +24 -35
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +24 -35
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +24 -35
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.js +1 -1
- package/radiobutton/radiobutton.cjs.js +24 -35
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +24 -35
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +24 -35
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +38 -50
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +38 -50
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +38 -50
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +15 -25
- package/resources/themes/arya-green/theme.css +15 -25
- package/resources/themes/arya-orange/theme.css +15 -25
- package/resources/themes/arya-purple/theme.css +15 -25
- package/resources/themes/bootstrap4-dark-blue/theme.css +15 -25
- package/resources/themes/bootstrap4-dark-purple/theme.css +15 -25
- package/resources/themes/bootstrap4-light-blue/theme.css +15 -25
- package/resources/themes/bootstrap4-light-purple/theme.css +15 -25
- package/resources/themes/fluent-light/theme.css +15 -25
- package/resources/themes/lara-dark-amber/theme.css +15 -25
- package/resources/themes/lara-dark-blue/theme.css +15 -25
- package/resources/themes/lara-dark-cyan/theme.css +15 -25
- package/resources/themes/lara-dark-green/theme.css +15 -25
- package/resources/themes/lara-dark-indigo/theme.css +15 -25
- package/resources/themes/lara-dark-pink/theme.css +15 -25
- package/resources/themes/lara-dark-purple/theme.css +15 -25
- package/resources/themes/lara-dark-teal/theme.css +15 -25
- package/resources/themes/lara-light-amber/theme.css +15 -25
- package/resources/themes/lara-light-blue/theme.css +15 -25
- package/resources/themes/lara-light-cyan/theme.css +15 -25
- package/resources/themes/lara-light-green/theme.css +15 -25
- package/resources/themes/lara-light-indigo/theme.css +15 -25
- package/resources/themes/lara-light-pink/theme.css +15 -25
- package/resources/themes/lara-light-purple/theme.css +15 -25
- package/resources/themes/lara-light-teal/theme.css +15 -25
- package/resources/themes/luna-amber/theme.css +15 -25
- package/resources/themes/luna-blue/theme.css +15 -25
- package/resources/themes/luna-green/theme.css +15 -25
- package/resources/themes/luna-pink/theme.css +15 -25
- package/resources/themes/md-dark-deeppurple/theme.css +15 -25
- package/resources/themes/md-dark-indigo/theme.css +15 -25
- package/resources/themes/md-light-deeppurple/theme.css +15 -25
- package/resources/themes/md-light-indigo/theme.css +300 -310
- package/resources/themes/mdc-dark-deeppurple/theme.css +15 -25
- package/resources/themes/mdc-dark-indigo/theme.css +15 -25
- package/resources/themes/mdc-light-deeppurple/theme.css +15 -25
- package/resources/themes/mdc-light-indigo/theme.css +300 -310
- package/resources/themes/mira/theme.css +15 -25
- package/resources/themes/nano/theme.css +15 -25
- package/resources/themes/nova/theme.css +15 -25
- package/resources/themes/nova-accent/theme.css +15 -25
- package/resources/themes/nova-alt/theme.css +15 -25
- package/resources/themes/rhea/theme.css +15 -25
- package/resources/themes/saga-blue/theme.css +15 -25
- package/resources/themes/saga-green/theme.css +15 -25
- package/resources/themes/saga-orange/theme.css +15 -25
- package/resources/themes/saga-purple/theme.css +15 -25
- package/resources/themes/soho-dark/theme.css +15 -25
- package/resources/themes/soho-light/theme.css +15 -25
- package/resources/themes/tailwind-light/theme.css +15 -25
- package/resources/themes/vela-blue/theme.css +15 -25
- package/resources/themes/vela-green/theme.css +15 -25
- package/resources/themes/vela-orange/theme.css +15 -25
- package/resources/themes/vela-purple/theme.css +15 -25
- package/resources/themes/viva-dark/theme.css +15 -25
- package/resources/themes/viva-light/theme.css +15 -25
- package/ripple/ripple.cjs.js +38 -50
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +38 -50
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +38 -50
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +34 -32
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +34 -32
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +34 -32
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +38 -50
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +38 -50
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +38 -50
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +27 -33
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +27 -33
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +27 -33
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +38 -50
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +2 -1
- package/sidebar/sidebar.esm.js +38 -50
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +38 -50
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +18 -24
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +18 -24
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +18 -24
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +41 -50
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +41 -50
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +41 -50
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +44 -56
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +44 -56
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +44 -56
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +44 -56
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +44 -56
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +44 -56
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +60 -63
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +2 -2
- package/splitbutton/splitbutton.esm.js +60 -63
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +60 -63
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +48 -60
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +48 -60
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +48 -60
- package/splitter/splitter.min.js +1 -1
- package/stepper/stepper.cjs.js +41 -53
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.esm.js +41 -53
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +41 -53
- package/stepper/stepper.min.js +1 -1
- package/stepperpanel/stepperpanel.cjs.js +1 -1
- package/stepperpanel/stepperpanel.esm.js +1 -1
- package/stepperpanel/stepperpanel.js +1 -1
- package/steps/steps.cjs.js +42 -59
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +42 -59
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +42 -59
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +14 -15
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +14 -15
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +14 -15
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +44 -56
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +44 -56
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +44 -56
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +45 -52
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +45 -52
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +45 -52
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +17 -23
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +17 -23
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +17 -23
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +21 -22
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +21 -22
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +21 -22
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +53 -59
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +53 -59
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +53 -59
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +24 -35
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +24 -35
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +24 -35
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +55 -75
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +55 -75
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +55 -75
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +25 -36
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +25 -36
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +25 -36
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +1 -1
- package/toolbar/toolbar.esm.js +1 -1
- package/toolbar/toolbar.js +1 -1
- package/tooltip/tooltip.cjs.js +51 -57
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +51 -57
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +51 -57
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +76 -88
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +76 -88
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +76 -88
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +57 -68
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +57 -68
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +57 -68
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +98 -105
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +1 -1
- package/treetable/treetable.esm.js +98 -105
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +98 -105
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +100 -46
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +101 -46
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +100 -46
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +70 -90
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +70 -90
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +70 -90
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +38 -50
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +38 -50
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +38 -50
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +3 -3
package/menu/menu.cjs.js
CHANGED
|
@@ -46,85 +46,73 @@ function _typeof(o) {
|
|
|
46
46
|
}, _typeof(o);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
function
|
|
50
|
-
if (
|
|
51
|
-
var
|
|
52
|
-
if (
|
|
53
|
-
var
|
|
54
|
-
if (
|
|
49
|
+
function toPrimitive(t, r) {
|
|
50
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
51
|
+
var e = t[Symbol.toPrimitive];
|
|
52
|
+
if (void 0 !== e) {
|
|
53
|
+
var i = e.call(t, r || "default");
|
|
54
|
+
if ("object" != _typeof(i)) return i;
|
|
55
55
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
56
56
|
}
|
|
57
|
-
return (
|
|
57
|
+
return ("string" === r ? String : Number)(t);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
function
|
|
61
|
-
var
|
|
62
|
-
return _typeof(
|
|
60
|
+
function toPropertyKey(t) {
|
|
61
|
+
var i = toPrimitive(t, "string");
|
|
62
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
function _defineProperty(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
writable: true
|
|
73
|
-
});
|
|
74
|
-
} else {
|
|
75
|
-
obj[key] = value;
|
|
76
|
-
}
|
|
77
|
-
return obj;
|
|
65
|
+
function _defineProperty(e, r, t) {
|
|
66
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
67
|
+
value: t,
|
|
68
|
+
enumerable: !0,
|
|
69
|
+
configurable: !0,
|
|
70
|
+
writable: !0
|
|
71
|
+
}) : e[r] = t, e;
|
|
78
72
|
}
|
|
79
73
|
|
|
80
74
|
function _extends() {
|
|
81
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
82
|
-
for (var
|
|
83
|
-
var
|
|
84
|
-
for (var
|
|
85
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
86
|
-
target[key] = source[key];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
75
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
76
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
77
|
+
var t = arguments[e];
|
|
78
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
89
79
|
}
|
|
90
|
-
return
|
|
91
|
-
};
|
|
92
|
-
return _extends.apply(this, arguments);
|
|
80
|
+
return n;
|
|
81
|
+
}, _extends.apply(null, arguments);
|
|
93
82
|
}
|
|
94
83
|
|
|
95
|
-
function _arrayLikeToArray(
|
|
96
|
-
|
|
97
|
-
for (var
|
|
98
|
-
return
|
|
84
|
+
function _arrayLikeToArray(r, a) {
|
|
85
|
+
(null == a || a > r.length) && (a = r.length);
|
|
86
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
87
|
+
return n;
|
|
99
88
|
}
|
|
100
89
|
|
|
101
|
-
function _arrayWithoutHoles(
|
|
102
|
-
if (Array.isArray(
|
|
90
|
+
function _arrayWithoutHoles(r) {
|
|
91
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
103
92
|
}
|
|
104
93
|
|
|
105
|
-
function _iterableToArray(
|
|
106
|
-
if (typeof Symbol
|
|
94
|
+
function _iterableToArray(r) {
|
|
95
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
107
96
|
}
|
|
108
97
|
|
|
109
|
-
function _unsupportedIterableToArray(
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
98
|
+
function _unsupportedIterableToArray(r, a) {
|
|
99
|
+
if (r) {
|
|
100
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
101
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
102
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
103
|
+
}
|
|
116
104
|
}
|
|
117
105
|
|
|
118
106
|
function _nonIterableSpread() {
|
|
119
107
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
120
108
|
}
|
|
121
109
|
|
|
122
|
-
function _toConsumableArray(
|
|
123
|
-
return _arrayWithoutHoles(
|
|
110
|
+
function _toConsumableArray(r) {
|
|
111
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
124
112
|
}
|
|
125
113
|
|
|
126
|
-
function _arrayWithHoles(
|
|
127
|
-
if (Array.isArray(
|
|
114
|
+
function _arrayWithHoles(r) {
|
|
115
|
+
if (Array.isArray(r)) return r;
|
|
128
116
|
}
|
|
129
117
|
|
|
130
118
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -159,8 +147,8 @@ function _nonIterableRest() {
|
|
|
159
147
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
160
148
|
}
|
|
161
149
|
|
|
162
|
-
function _slicedToArray(
|
|
163
|
-
return _arrayWithHoles(
|
|
150
|
+
function _slicedToArray(r, e) {
|
|
151
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
164
152
|
}
|
|
165
153
|
|
|
166
154
|
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";
|
|
@@ -241,7 +229,7 @@ var MenuBase = componentbase.ComponentBase.extend({
|
|
|
241
229
|
|
|
242
230
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
243
231
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
244
|
-
var Menu = /*#__PURE__*/React__namespace.memo(
|
|
232
|
+
var Menu = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
245
233
|
var mergeProps = hooks.useMergeProps();
|
|
246
234
|
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
247
235
|
var props = MenuBase.getProps(inProps, context);
|
|
@@ -546,9 +534,6 @@ var Menu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
546
534
|
};
|
|
547
535
|
var createMenuItem = function createMenuItem(item, index) {
|
|
548
536
|
var parentId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
549
|
-
if (item.visible === false) {
|
|
550
|
-
return null;
|
|
551
|
-
}
|
|
552
537
|
var menuContext = {
|
|
553
538
|
item: item,
|
|
554
539
|
index: index,
|
|
@@ -627,6 +612,9 @@ var Menu = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
627
612
|
}), content);
|
|
628
613
|
};
|
|
629
614
|
var createItem = function createItem(item, index) {
|
|
615
|
+
if (item.visible === false) {
|
|
616
|
+
return null;
|
|
617
|
+
}
|
|
630
618
|
return item.separator ? createSeparator(item, index) : item.items ? createSubmenu(item, index) : createMenuItem(item, index);
|
|
631
619
|
};
|
|
632
620
|
var createMenu = function createMenu() {
|
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"),o=require("primereact/overlayservice"),i=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)||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,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 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 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 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,o;r=e,o=t[n],(a=b(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)):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?(ue(k),H(-1)):ue(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&&(l.DomHandler.focus(F.current),pe(e));case"Tab":f.popup&&h&&pe(e)}},W=function(e){var n=oe(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=ie(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)},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},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},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&&j(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(){v||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=v+"_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",y({},a,{key:t}),e.label),r)},ve=function(e,n){var t=v+"_separator_"+n,r=s({id:t,className:l.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;if(!1===e.visible)return null;var r={item:e,index:n,parentId:t},a=l.classNames("p-menuitem-link",{"p-disabled":e.disabled}),o=l.classNames("p-menuitem-icon",e.icon),i=s({className:U("icon")},R("icon",r)),c=l.IconUtils.getJSXIcon(e.icon,P({},i),{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")},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:o,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",y({},E,{key:b}),h)},Oe=function(e,n){return 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&&o.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":_?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,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(i.Portal,{element:he,appendTo:f.appendTo}):he})));k.displayName="Menu",exports.Menu=k;
|
|
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;
|
package/menu/menu.d.ts
CHANGED
|
@@ -58,6 +58,10 @@ export interface MenuPassThroughOptions {
|
|
|
58
58
|
* Uses to pass attributes to the list's DOM element.
|
|
59
59
|
*/
|
|
60
60
|
menu?: MenuPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
|
|
61
|
+
/**
|
|
62
|
+
* Uses to pass attributes to the content's DOM element.
|
|
63
|
+
*/
|
|
64
|
+
content?: MenuPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
61
65
|
/**
|
|
62
66
|
* Uses to pass attributes to the submenu header's DOM element.
|
|
63
67
|
*/
|
|
@@ -97,11 +101,21 @@ export interface MenuPassThroughOptions {
|
|
|
97
101
|
* Defines current inline state in Menu component.
|
|
98
102
|
*/
|
|
99
103
|
export interface MenuState {
|
|
104
|
+
/**
|
|
105
|
+
* Current element id.
|
|
106
|
+
* @defaultValue false
|
|
107
|
+
*/
|
|
108
|
+
id: string;
|
|
100
109
|
/**
|
|
101
110
|
* Current visible state as a boolean.
|
|
102
111
|
* @defaultValue true
|
|
103
112
|
*/
|
|
104
113
|
visible: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Current focused state as a boolean.
|
|
116
|
+
* @defaultValue false
|
|
117
|
+
*/
|
|
118
|
+
focused: boolean;
|
|
105
119
|
}
|
|
106
120
|
|
|
107
121
|
/**
|
package/menu/menu.esm.js
CHANGED
|
@@ -19,85 +19,73 @@ function _typeof(o) {
|
|
|
19
19
|
}, _typeof(o);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
function
|
|
23
|
-
if (
|
|
24
|
-
var
|
|
25
|
-
if (
|
|
26
|
-
var
|
|
27
|
-
if (
|
|
22
|
+
function toPrimitive(t, r) {
|
|
23
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
24
|
+
var e = t[Symbol.toPrimitive];
|
|
25
|
+
if (void 0 !== e) {
|
|
26
|
+
var i = e.call(t, r || "default");
|
|
27
|
+
if ("object" != _typeof(i)) return i;
|
|
28
28
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
29
29
|
}
|
|
30
|
-
return (
|
|
30
|
+
return ("string" === r ? String : Number)(t);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function
|
|
34
|
-
var
|
|
35
|
-
return _typeof(
|
|
33
|
+
function toPropertyKey(t) {
|
|
34
|
+
var i = toPrimitive(t, "string");
|
|
35
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function _defineProperty(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
writable: true
|
|
46
|
-
});
|
|
47
|
-
} else {
|
|
48
|
-
obj[key] = value;
|
|
49
|
-
}
|
|
50
|
-
return obj;
|
|
38
|
+
function _defineProperty(e, r, t) {
|
|
39
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
40
|
+
value: t,
|
|
41
|
+
enumerable: !0,
|
|
42
|
+
configurable: !0,
|
|
43
|
+
writable: !0
|
|
44
|
+
}) : e[r] = t, e;
|
|
51
45
|
}
|
|
52
46
|
|
|
53
47
|
function _extends() {
|
|
54
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
55
|
-
for (var
|
|
56
|
-
var
|
|
57
|
-
for (var
|
|
58
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
59
|
-
target[key] = source[key];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
48
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
49
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
50
|
+
var t = arguments[e];
|
|
51
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
62
52
|
}
|
|
63
|
-
return
|
|
64
|
-
};
|
|
65
|
-
return _extends.apply(this, arguments);
|
|
53
|
+
return n;
|
|
54
|
+
}, _extends.apply(null, arguments);
|
|
66
55
|
}
|
|
67
56
|
|
|
68
|
-
function _arrayLikeToArray(
|
|
69
|
-
|
|
70
|
-
for (var
|
|
71
|
-
return
|
|
57
|
+
function _arrayLikeToArray(r, a) {
|
|
58
|
+
(null == a || a > r.length) && (a = r.length);
|
|
59
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
60
|
+
return n;
|
|
72
61
|
}
|
|
73
62
|
|
|
74
|
-
function _arrayWithoutHoles(
|
|
75
|
-
if (Array.isArray(
|
|
63
|
+
function _arrayWithoutHoles(r) {
|
|
64
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
76
65
|
}
|
|
77
66
|
|
|
78
|
-
function _iterableToArray(
|
|
79
|
-
if (typeof Symbol
|
|
67
|
+
function _iterableToArray(r) {
|
|
68
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
80
69
|
}
|
|
81
70
|
|
|
82
|
-
function _unsupportedIterableToArray(
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
71
|
+
function _unsupportedIterableToArray(r, a) {
|
|
72
|
+
if (r) {
|
|
73
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
74
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
75
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
76
|
+
}
|
|
89
77
|
}
|
|
90
78
|
|
|
91
79
|
function _nonIterableSpread() {
|
|
92
80
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
93
81
|
}
|
|
94
82
|
|
|
95
|
-
function _toConsumableArray(
|
|
96
|
-
return _arrayWithoutHoles(
|
|
83
|
+
function _toConsumableArray(r) {
|
|
84
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
97
85
|
}
|
|
98
86
|
|
|
99
|
-
function _arrayWithHoles(
|
|
100
|
-
if (Array.isArray(
|
|
87
|
+
function _arrayWithHoles(r) {
|
|
88
|
+
if (Array.isArray(r)) return r;
|
|
101
89
|
}
|
|
102
90
|
|
|
103
91
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -132,8 +120,8 @@ function _nonIterableRest() {
|
|
|
132
120
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
133
121
|
}
|
|
134
122
|
|
|
135
|
-
function _slicedToArray(
|
|
136
|
-
return _arrayWithHoles(
|
|
123
|
+
function _slicedToArray(r, e) {
|
|
124
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
137
125
|
}
|
|
138
126
|
|
|
139
127
|
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";
|
|
@@ -214,7 +202,7 @@ var MenuBase = ComponentBase.extend({
|
|
|
214
202
|
|
|
215
203
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
216
204
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
217
|
-
var Menu = /*#__PURE__*/React.memo(
|
|
205
|
+
var Menu = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
218
206
|
var mergeProps = useMergeProps();
|
|
219
207
|
var context = React.useContext(PrimeReactContext);
|
|
220
208
|
var props = MenuBase.getProps(inProps, context);
|
|
@@ -519,9 +507,6 @@ var Menu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inPr
|
|
|
519
507
|
};
|
|
520
508
|
var createMenuItem = function createMenuItem(item, index) {
|
|
521
509
|
var parentId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
522
|
-
if (item.visible === false) {
|
|
523
|
-
return null;
|
|
524
|
-
}
|
|
525
510
|
var menuContext = {
|
|
526
511
|
item: item,
|
|
527
512
|
index: index,
|
|
@@ -600,6 +585,9 @@ var Menu = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inPr
|
|
|
600
585
|
}), content);
|
|
601
586
|
};
|
|
602
587
|
var createItem = function createItem(item, index) {
|
|
588
|
+
if (item.visible === false) {
|
|
589
|
+
return null;
|
|
590
|
+
}
|
|
603
591
|
return item.separator ? createSeparator(item, index) : item.items ? createSubmenu(item, index) : createMenuItem(item, index);
|
|
604
592
|
};
|
|
605
593
|
var createMenu = function createMenu() {
|
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 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:"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 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;if(!1===n.visible)return null;var 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")},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 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};
|
|
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};
|