primereact 10.9.3 → 10.9.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 +43 -55
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +2 -2
- package/accordion/accordion.esm.js +43 -55
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +43 -55
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +44 -59
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +44 -59
- package/api/api.esm.min.js +1 -1
- package/api/api.js +44 -59
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +56 -56
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +27 -25
- package/autocomplete/autocomplete.esm.js +57 -57
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +56 -56
- 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.d.ts +2 -2
- 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/avatargroup/avatargroup.d.ts +2 -2
- package/badge/badge.cjs.js +17 -23
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +2 -2
- package/badge/badge.esm.js +17 -23
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +17 -23
- 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.d.ts +2 -2
- 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 +39 -50
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +2 -2
- package/breadcrumb/breadcrumb.esm.js +39 -50
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +39 -50
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +23 -34
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +23 -34
- package/button/button.esm.min.js +1 -1
- package/button/button.js +23 -34
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +56 -60
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +6 -6
- package/calendar/calendar.esm.js +57 -61
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +56 -60
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +43 -55
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +2 -2
- package/carousel/carousel.esm.js +43 -55
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +43 -55
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +49 -54
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +17 -8
- package/cascadeselect/cascadeselect.esm.js +49 -54
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +49 -54
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.d.ts +2 -2
- package/checkbox/checkbox.cjs.js +38 -50
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +4 -4
- 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 +52 -51
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +2 -2
- package/chip/chip.esm.js +54 -53
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +52 -51
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +44 -56
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +2 -2
- package/chips/chips.esm.js +44 -56
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +44 -56
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +47 -51
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +6 -6
- package/colorpicker/colorpicker.esm.js +47 -51
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +47 -51
- package/colorpicker/colorpicker.min.js +1 -1
- package/componentbase/componentbase.cjs.js +33 -40
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +33 -40
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +33 -40
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +37 -49
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +37 -49
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +37 -49
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +47 -51
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +47 -51
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +47 -51
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +37 -49
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -2
- package/contextmenu/contextmenu.esm.js +37 -49
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +37 -49
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1151 -1449
- package/core/core.min.js +65 -65
- package/csstransition/csstransition.cjs.js +17 -23
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +17 -23
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +17 -23
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +26 -32
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +2 -2
- package/datascroller/datascroller.esm.js +26 -32
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +26 -32
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +411 -358
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +6 -5
- package/datatable/datatable.esm.js +412 -359
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +411 -358
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +46 -58
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +2 -2
- package/dataview/dataview.esm.js +46 -58
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +46 -58
- 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.d.ts +2 -2
- 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 +43 -55
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +12 -12
- package/dialog/dialog.esm.js +43 -55
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +43 -55
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.d.ts +2 -2
- package/dock/dock.cjs.js +43 -55
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +2 -2
- package/dock/dock.esm.js +43 -55
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +43 -55
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +53 -57
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +14 -10
- package/dropdown/dropdown.esm.js +53 -57
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +53 -57
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +37 -49
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +6 -6
- package/editor/editor.esm.js +37 -49
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +37 -49
- 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.d.ts +4 -4
- 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 +48 -60
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -4
- package/fileupload/fileupload.esm.js +48 -60
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +48 -60
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/focustrap.cjs.js +17 -23
- package/focustrap/focustrap.cjs.min.js +1 -1
- package/focustrap/focustrap.esm.js +17 -23
- package/focustrap/focustrap.esm.min.js +1 -1
- package/focustrap/focustrap.js +17 -23
- package/focustrap/focustrap.min.js +1 -1
- package/galleria/galleria.cjs.js +43 -55
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -2
- package/galleria/galleria.esm.js +43 -55
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +43 -55
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +53 -50
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +53 -50
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +53 -50
- package/hooks/hooks.min.js +1 -1
- package/iconfield/iconfield.cjs.js +23 -34
- package/iconfield/iconfield.cjs.min.js +1 -1
- package/iconfield/iconfield.esm.js +23 -34
- package/iconfield/iconfield.esm.min.js +1 -1
- package/iconfield/iconfield.js +23 -34
- package/iconfield/iconfield.min.js +1 -1
- package/icons/angledoubledown/index.cjs.js +6 -11
- package/icons/angledoubledown/index.cjs.min.js +1 -1
- package/icons/angledoubledown/index.esm.js +6 -11
- package/icons/angledoubledown/index.esm.min.js +1 -1
- package/icons/angledoubledown/index.js +6 -11
- package/icons/angledoubledown/index.min.js +1 -1
- package/icons/angledoubleleft/index.cjs.js +6 -11
- package/icons/angledoubleleft/index.cjs.min.js +1 -1
- package/icons/angledoubleleft/index.esm.js +6 -11
- package/icons/angledoubleleft/index.esm.min.js +1 -1
- package/icons/angledoubleleft/index.js +6 -11
- package/icons/angledoubleleft/index.min.js +1 -1
- package/icons/angledoubleright/index.cjs.js +6 -11
- package/icons/angledoubleright/index.cjs.min.js +1 -1
- package/icons/angledoubleright/index.esm.js +6 -11
- package/icons/angledoubleright/index.esm.min.js +1 -1
- package/icons/angledoubleright/index.js +6 -11
- package/icons/angledoubleright/index.min.js +1 -1
- package/icons/angledoubleup/index.cjs.js +6 -11
- package/icons/angledoubleup/index.cjs.min.js +1 -1
- package/icons/angledoubleup/index.esm.js +6 -11
- package/icons/angledoubleup/index.esm.min.js +1 -1
- package/icons/angledoubleup/index.js +6 -11
- package/icons/angledoubleup/index.min.js +1 -1
- package/icons/angledown/index.cjs.js +6 -11
- package/icons/angledown/index.cjs.min.js +1 -1
- package/icons/angledown/index.esm.js +6 -11
- package/icons/angledown/index.esm.min.js +1 -1
- package/icons/angledown/index.js +6 -11
- package/icons/angledown/index.min.js +1 -1
- package/icons/angleleft/index.cjs.js +6 -11
- package/icons/angleleft/index.cjs.min.js +1 -1
- package/icons/angleleft/index.esm.js +6 -11
- package/icons/angleleft/index.esm.min.js +1 -1
- package/icons/angleleft/index.js +6 -11
- package/icons/angleleft/index.min.js +1 -1
- package/icons/angleright/index.cjs.js +6 -11
- package/icons/angleright/index.cjs.min.js +1 -1
- package/icons/angleright/index.esm.js +6 -11
- package/icons/angleright/index.esm.min.js +1 -1
- package/icons/angleright/index.js +6 -11
- package/icons/angleright/index.min.js +1 -1
- package/icons/angleup/index.cjs.js +6 -11
- package/icons/angleup/index.cjs.min.js +1 -1
- package/icons/angleup/index.esm.js +6 -11
- package/icons/angleup/index.esm.min.js +1 -1
- package/icons/angleup/index.js +6 -11
- package/icons/angleup/index.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +6 -11
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +6 -11
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +6 -11
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +6 -11
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +6 -11
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +6 -11
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +6 -11
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +6 -11
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +6 -11
- package/icons/ban/index.min.js +1 -1
- package/icons/bars/index.cjs.js +6 -11
- package/icons/bars/index.cjs.min.js +1 -1
- package/icons/bars/index.esm.js +6 -11
- package/icons/bars/index.esm.min.js +1 -1
- package/icons/bars/index.js +6 -11
- package/icons/bars/index.min.js +1 -1
- package/icons/blank/index.cjs.js +6 -11
- package/icons/blank/index.cjs.min.js +1 -1
- package/icons/blank/index.esm.js +6 -11
- package/icons/blank/index.esm.min.js +1 -1
- package/icons/blank/index.js +6 -11
- package/icons/blank/index.min.js +1 -1
- package/icons/calendar/index.cjs.js +6 -11
- package/icons/calendar/index.cjs.min.js +1 -1
- package/icons/calendar/index.esm.js +6 -11
- package/icons/calendar/index.esm.min.js +1 -1
- package/icons/calendar/index.js +6 -11
- package/icons/calendar/index.min.js +1 -1
- package/icons/check/index.cjs.js +6 -11
- package/icons/check/index.cjs.min.js +1 -1
- package/icons/check/index.esm.js +6 -11
- package/icons/check/index.esm.min.js +1 -1
- package/icons/check/index.js +6 -11
- package/icons/check/index.min.js +1 -1
- package/icons/chevrondown/index.cjs.js +6 -11
- package/icons/chevrondown/index.cjs.min.js +1 -1
- package/icons/chevrondown/index.esm.js +6 -11
- package/icons/chevrondown/index.esm.min.js +1 -1
- package/icons/chevrondown/index.js +6 -11
- package/icons/chevrondown/index.min.js +1 -1
- package/icons/chevronleft/index.cjs.js +6 -11
- package/icons/chevronleft/index.cjs.min.js +1 -1
- package/icons/chevronleft/index.esm.js +6 -11
- package/icons/chevronleft/index.esm.min.js +1 -1
- package/icons/chevronleft/index.js +6 -11
- package/icons/chevronleft/index.min.js +1 -1
- package/icons/chevronright/index.cjs.js +6 -11
- package/icons/chevronright/index.cjs.min.js +1 -1
- package/icons/chevronright/index.esm.js +6 -11
- package/icons/chevronright/index.esm.min.js +1 -1
- package/icons/chevronright/index.js +6 -11
- package/icons/chevronright/index.min.js +1 -1
- package/icons/chevronup/index.cjs.js +6 -11
- package/icons/chevronup/index.cjs.min.js +1 -1
- package/icons/chevronup/index.esm.js +6 -11
- package/icons/chevronup/index.esm.min.js +1 -1
- package/icons/chevronup/index.js +6 -11
- package/icons/chevronup/index.min.js +1 -1
- package/icons/download/index.cjs.js +6 -11
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +6 -11
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +6 -11
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +6 -11
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +6 -11
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +6 -11
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eye/index.cjs.js +6 -11
- package/icons/eye/index.cjs.min.js +1 -1
- package/icons/eye/index.esm.js +6 -11
- package/icons/eye/index.esm.min.js +1 -1
- package/icons/eye/index.js +6 -11
- package/icons/eye/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +6 -11
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +6 -11
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +6 -11
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +6 -11
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +6 -11
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +6 -11
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +6 -11
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +6 -11
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +6 -11
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +6 -11
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +6 -11
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +6 -11
- package/icons/infocircle/index.min.js +1 -1
- package/icons/minus/index.cjs.js +6 -11
- package/icons/minus/index.cjs.min.js +1 -1
- package/icons/minus/index.esm.js +6 -11
- package/icons/minus/index.esm.min.js +1 -1
- package/icons/minus/index.js +6 -11
- package/icons/minus/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +6 -11
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +6 -11
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +6 -11
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +6 -11
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +6 -11
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +6 -11
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +6 -11
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +6 -11
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +6 -11
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +6 -11
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +6 -11
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +6 -11
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +6 -11
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +6 -11
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +6 -11
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +6 -11
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +6 -11
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +6 -11
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +6 -11
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +6 -11
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +6 -11
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +6 -11
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +6 -11
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +6 -11
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +6 -11
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +6 -11
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +6 -11
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +6 -11
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +6 -11
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +6 -11
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +6 -11
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +6 -11
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +6 -11
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +6 -11
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +6 -11
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +6 -11
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +6 -11
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +6 -11
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +6 -11
- package/icons/thlarge/index.min.js +1 -1
- package/icons/times/index.cjs.js +6 -11
- package/icons/times/index.cjs.min.js +1 -1
- package/icons/times/index.esm.js +6 -11
- package/icons/times/index.esm.min.js +1 -1
- package/icons/times/index.js +6 -11
- package/icons/times/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +6 -11
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +6 -11
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +6 -11
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +6 -11
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +6 -11
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +6 -11
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +6 -11
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +6 -11
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +6 -11
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +6 -11
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +6 -11
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +6 -11
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +6 -11
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +6 -11
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +6 -11
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +6 -11
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +6 -11
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +6 -11
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +37 -49
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +4 -4
- package/image/image.esm.js +37 -49
- package/image/image.esm.min.js +1 -1
- package/image/image.js +37 -49
- 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.d.ts +2 -2
- 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 +23 -34
- package/inputicon/inputicon.cjs.min.js +1 -1
- package/inputicon/inputicon.esm.js +23 -34
- package/inputicon/inputicon.esm.min.js +1 -1
- package/inputicon/inputicon.js +23 -34
- package/inputicon/inputicon.min.js +1 -1
- package/inputmask/inputmask.cjs.js +7 -12
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +2 -2
- package/inputmask/inputmask.esm.js +7 -12
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +7 -12
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +49 -58
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +49 -58
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +49 -58
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/inputotp.cjs.js +65 -56
- package/inputotp/inputotp.cjs.min.js +1 -1
- package/inputotp/inputotp.esm.js +65 -56
- package/inputotp/inputotp.esm.min.js +1 -1
- package/inputotp/inputotp.js +65 -56
- package/inputotp/inputotp.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +23 -34
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +4 -4
- package/inputswitch/inputswitch.esm.js +23 -34
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +23 -34
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -35
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +25 -35
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +25 -35
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +23 -34
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +23 -34
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +23 -34
- 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.d.ts +2 -2
- 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 +46 -58
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +4 -4
- package/listbox/listbox.esm.js +46 -58
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +46 -58
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +37 -49
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +2 -2
- package/megamenu/megamenu.esm.js +37 -49
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +37 -49
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +61 -64
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +11 -6
- package/mention/mention.esm.js +61 -64
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +61 -64
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +57 -58
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +2 -2
- package/menu/menu.esm.js +58 -59
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +57 -58
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +43 -58
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +8 -8
- package/menubar/menubar.esm.js +43 -58
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +43 -58
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +23 -34
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +2 -2
- package/message/message.esm.js +23 -34
- package/message/message.esm.min.js +1 -1
- package/message/message.js +23 -34
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +43 -55
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -2
- package/messages/messages.esm.js +43 -55
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +43 -55
- 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 +70 -82
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +6 -6
- package/multiselect/multiselect.esm.js +70 -82
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +70 -82
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +38 -50
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -2
- package/multistatecheckbox/multistatecheckbox.esm.js +38 -50
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +38 -50
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +77 -58
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +2 -2
- package/orderlist/orderlist.esm.js +77 -58
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +77 -58
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +43 -55
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +2 -2
- package/organizationchart/organizationchart.esm.js +43 -55
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +43 -55
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +46 -59
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +2 -2
- package/overlaypanel/overlaypanel.esm.js +46 -59
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +46 -59
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +41 -56
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +2 -2
- package/paginator/paginator.esm.js +41 -56
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +41 -56
- 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.d.ts +4 -4
- 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 +37 -49
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -2
- package/panelmenu/panelmenu.esm.js +37 -49
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +37 -49
- 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 +14 -15
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +14 -15
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +14 -15
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +46 -51
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +6 -6
- package/password/password.esm.js +47 -52
- package/password/password.esm.min.js +1 -1
- package/password/password.js +46 -51
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +50 -65
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +2 -2
- package/picklist/picklist.esm.js +50 -65
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +50 -65
- 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 +858 -539
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +859 -540
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +858 -539
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +23 -34
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.d.ts +2 -2
- package/progressbar/progressbar.esm.js +23 -34
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +23 -34
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.d.ts +2 -2
- package/radiobutton/radiobutton.cjs.js +25 -36
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +5 -5
- package/radiobutton/radiobutton.esm.js +25 -36
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +25 -36
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +37 -49
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +2 -2
- package/rating/rating.esm.js +37 -49
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +37 -49
- package/rating/rating.min.js +1 -1
- package/ripple/ripple.cjs.js +37 -49
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +37 -49
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +37 -49
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +20 -26
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.d.ts +8 -8
- package/scrollpanel/scrollpanel.esm.js +20 -26
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +20 -26
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +37 -49
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +2 -2
- package/scrolltop/scrolltop.esm.js +37 -49
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +37 -49
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +26 -32
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +2 -2
- package/selectbutton/selectbutton.esm.js +26 -32
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +26 -32
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +37 -49
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +6 -6
- package/sidebar/sidebar.esm.js +37 -49
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +37 -49
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +17 -23
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.d.ts +2 -2
- package/skeleton/skeleton.esm.js +17 -23
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +17 -23
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +46 -51
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -2
- package/slidemenu/slidemenu.esm.js +47 -52
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +46 -51
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +43 -55
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +3 -2
- package/slider/slider.esm.js +43 -55
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +43 -55
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +43 -55
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +2 -2
- package/speeddial/speeddial.esm.js +43 -55
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +43 -55
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +37 -49
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +2 -2
- package/splitbutton/splitbutton.esm.js +37 -49
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +37 -49
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +43 -55
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +2 -2
- package/splitter/splitter.esm.js +43 -55
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +43 -55
- package/splitter/splitter.min.js +1 -1
- package/stepper/stepper.cjs.js +39 -50
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.d.ts +8 -3
- package/stepper/stepper.esm.js +39 -50
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +39 -50
- package/stepper/stepper.min.js +1 -1
- package/steps/steps.cjs.js +37 -49
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +2 -2
- package/steps/steps.esm.js +37 -49
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +37 -49
- 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.d.ts +4 -4
- 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 +37 -49
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +2 -2
- package/tabmenu/tabmenu.esm.js +37 -49
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +37 -49
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +37 -44
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +2 -2
- package/tabview/tabview.esm.js +37 -44
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +37 -44
- 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.d.ts +2 -2
- 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 +20 -21
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +2 -2
- package/terminal/terminal.esm.js +20 -21
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +20 -21
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +37 -49
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -2
- package/tieredmenu/tieredmenu.esm.js +37 -49
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +37 -49
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +23 -34
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +4 -4
- package/timeline/timeline.esm.js +23 -34
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +23 -34
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +43 -55
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +2 -2
- package/toast/toast.esm.js +43 -55
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +43 -55
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +23 -34
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +2 -2
- package/togglebutton/togglebutton.esm.js +23 -34
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +23 -34
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.d.ts +2 -2
- package/tooltip/tooltip.cjs.js +43 -55
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +3 -3
- package/tooltip/tooltip.esm.js +43 -55
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +43 -55
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +52 -64
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +2 -2
- package/tree/tree.esm.js +52 -64
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +52 -64
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +61 -66
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +2 -2
- package/treeselect/treeselect.esm.js +61 -66
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +61 -66
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +57 -69
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +2 -2
- package/treetable/treetable.esm.js +57 -69
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +57 -69
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +43 -55
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +2 -2
- package/tristatecheckbox/tristatecheckbox.esm.js +43 -55
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +43 -55
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +197 -99
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +5 -1
- package/utils/utils.esm.js +197 -99
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +197 -99
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +37 -49
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +37 -49
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +37 -49
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +46 -10
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";
|
|
@@ -306,10 +294,15 @@ var Menu = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forw
|
|
|
306
294
|
target: targetRef,
|
|
307
295
|
overlay: menuRef,
|
|
308
296
|
listener: function listener(event, _ref) {
|
|
309
|
-
var valid = _ref.valid
|
|
297
|
+
var valid = _ref.valid,
|
|
298
|
+
type = _ref.type;
|
|
310
299
|
if (valid) {
|
|
311
|
-
|
|
312
|
-
|
|
300
|
+
if (context.hideOverlaysOnDocumentScrolling || type === 'outside') {
|
|
301
|
+
hide(event);
|
|
302
|
+
setFocusedOptionIndex(-1);
|
|
303
|
+
} else if (!utils.DomHandler.isDocument(event.target)) {
|
|
304
|
+
utils.DomHandler.absolutePosition(menuRef.current, targetRef.current, props.popupAlignment);
|
|
305
|
+
}
|
|
313
306
|
}
|
|
314
307
|
},
|
|
315
308
|
when: visibleState
|
|
@@ -365,6 +358,9 @@ var Menu = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forw
|
|
|
365
358
|
props.onFocus && props.onFocus(event);
|
|
366
359
|
};
|
|
367
360
|
var onListBlur = function onListBlur(event) {
|
|
361
|
+
var currentTarget = event.currentTarget,
|
|
362
|
+
relatedTarget = event.relatedTarget;
|
|
363
|
+
if (relatedTarget && currentTarget.contains(relatedTarget)) return;
|
|
368
364
|
setFocused(false);
|
|
369
365
|
setFocusedOptionIndex(-1);
|
|
370
366
|
props.onBlur && props.onBlur(event);
|
|
@@ -608,6 +604,9 @@ var Menu = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forw
|
|
|
608
604
|
onClick: function onClick(event) {
|
|
609
605
|
return onItemClick(event, item, key);
|
|
610
606
|
},
|
|
607
|
+
onMouseMove: function onMouseMove(event) {
|
|
608
|
+
return onItemMouseMove(event, key);
|
|
609
|
+
},
|
|
611
610
|
className: linkClassName,
|
|
612
611
|
tabIndex: '-1',
|
|
613
612
|
labelClassName: 'p-menuitem-text',
|
package/menu/menu.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/csstransition"),a=require("primereact/hooks"),i=require("primereact/overlayservice"),o=require("primereact/portal"),l=require("primereact/ripple"),u=require("primereact/utils");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var p=s(e),m=c(n);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,n){if("object"!==d(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function b(e){var n=f(e,"string");return"symbol"===d(n)?n:String(n)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y.apply(this,arguments)}function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function g(e){if(Array.isArray(e))return v(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function h(e,n){if(e){if("string"==typeof e)return v(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,n):void 0}}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(e){return g(e)||O(e)||h(e)||E()}function x(e){if(Array.isArray(e))return e}function N(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,i,o,l=[],u=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==n);u=!0);}catch(e){c=!0,a=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}function j(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I(e,n){return x(e)||N(e,n)||h(e,n)||j()}var w=t.ComponentBase.extend({defaultProps:{__TYPE:"Menu",id:null,ariaLabel:null,ariaLabelledBy:null,tabIndex:0,model:null,popup:!1,popupAlignment:"left",style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,onFocus:null,onBlur:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var n=e.context;return u.classNames("p-menu p-component",{"p-menu-overlay":e.props.popup,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===m.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===m.default.ripple})},menu:"p-menu-list p-reset",content:function(e){return u.classNames("p-menuitem-content",{"p-disabled":e.item.disabled})},action:function(e){return u.classNames("p-menuitem-link",{"p-disabled":e.item.disabled})},menuitem:function(e){return u.classNames("p-menuitem",{"p-focus":e.focused})},submenuHeader:function(e){return u.classNames("p-submenu-header",{"p-disabled":e.submenu.disabled})},separator:"p-menu-separator",label:"p-menuitem-text",icon:"p-menuitem-icon",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-menu-overlay {\n position: absolute;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n\n .p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-menu .p-menuitem-text {\n line-height: 1;\n }\n}\n",inlineStyles:{submenuHeader:function(e){return e.submenu.style},menuitem:function(e){return e.item.style}}}});function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){var r,a,i;r=e,i=t[n],(a=b(a=n))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=p.memo(p.forwardRef((function(e,c){var s=a.useMergeProps(),d=p.useContext(n.PrimeReactContext),f=w.getProps(e,d),b=I(p.useState(f.id),2),v=b[0],g=b[1],O=I(p.useState(!f.popup),2),h=O[0],E=O[1],x=I(p.useState(-1),2),N=x[0],j=x[1],D=I(p.useState(-1),2),k=D[0],H=D[1],A=I(p.useState(!1),2),_=A[0],T=A[1],C=w.setMetaData({props:f,state:{id:v,visible:h,focused:_}}),M=C.ptm,U=C.cx,q=C.sx,R=function(e,n){return M(e,{context:n})};t.useHandleStyle(w.css.styles,C.isUnstyled,{name:"menu"});var Z=p.useRef(null),B=p.useRef(null),F=p.useRef(null),L=!!(h&&f.popup&&f.closeOnEscape),K=a.useDisplayOrder("menu",L);a.useGlobalOnEscapeKey({callback:function(e){pe(e)},when:L&&K,priority:[a.ESC_KEY_HANDLING_PRIORITIES.MENU,K]});var z=I(a.useOverlayListener({target:F,overlay:Z,listener:function(e,n){n.valid&&(pe(e),j(-1))},when:h}),2),G=z[0],J=z[1],X=function(e,n,t){n.disabled?e.preventDefault():(n.command&&n.command({originalEvent:e,item:n}),f.popup&&pe(e),f.popup||N===t||j(t),n.url||(e.preventDefault(),e.stopPropagation()))},Y=function(e,n){e&&f.popup&&N!==n&&j(n)},$=function(e){T(!0),f.popup||(-1!==k?(le(k),H(-1)):le(0)),f.onFocus&&f.onFocus(e)},Q=function(e){T(!1),j(-1),f.onBlur&&f.onBlur(e)},V=function(e){switch(e.code){case"ArrowDown":W(e);break;case"ArrowUp":ee(e);break;case"Home":ne(e);break;case"End":te(e);break;case"Enter":case"NumpadEnter":re(e);break;case"Space":ae(e);break;case"Escape":f.popup&&(u.DomHandler.focus(F.current),pe(e));case"Tab":f.popup&&h&&pe(e)}},W=function(e){var n=ie(N);le(n),e.preventDefault()},ee=function(e){if(e.altKey&&f.popup)u.DomHandler.focus(F.current),pe(e),e.preventDefault();else{var n=oe(N);le(n),e.preventDefault()}},ne=function(e){le(0),e.preventDefault()},te=function(e){le(u.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()},re=function(e){var n=u.DomHandler.findSingle(Z.current,'li[id="'.concat("".concat(N),'"]')),t=n&&u.DomHandler.findSingle(n,'a[data-pc-section="action"]');f.popup&&u.DomHandler.focus(F.current),t?t.click():n&&n.click(),e.preventDefault()},ae=function(e){re(e)},ie=function(e){var n=S(u.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n+1:0},oe=function(e){var n=S(u.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n-1:0},le=function(e){var n=u.DomHandler.find(Z.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),t=e>=n.length?n.length-1:e<0?0:e;t>-1&&j(n[t].getAttribute("id"))},ue=function(){return-1!==N?N:null},ce=function(e){f.popup&&(h?pe(e):se(e))},se=function(e){F.current=e.currentTarget,E(!0),f.onShow&&f.onShow(e)},pe=function(e){F.current=e.currentTarget,E(!1),f.onHide&&f.onHide(e)},me=function(){u.DomHandler.addStyles(Z.current,{position:"absolute",top:"0",left:"0"}),u.ZIndexUtils.set("menu",Z.current,d&&d.autoZIndex||m.default.autoZIndex,f.baseZIndex||d&&d.zIndex.menu||m.default.zIndex.menu),u.DomHandler.absolutePosition(Z.current,F.current,f.popupAlignment),f.popup&&(u.DomHandler.focus(B.current),le(0))},de=function(){G()},fe=function(){F.current=null,J()},be=function(){u.ZIndexUtils.clear(Z.current)};a.useMountEffect((function(){v||g(u.UniqueComponentId())})),a.useUnmountEffect((function(){u.ZIndexUtils.clear(Z.current)})),p.useImperativeHandle(c,(function(){return{props:f,toggle:ce,show:se,hide:pe,getElement:function(){return Z.current},getTarget:function(){return F.current}}}));var ye=function(e,n){var t=v+"_sub_"+n,r=e.items.map((function(e,n){return ge(e,n,t)})),a=s({id:t,role:"none",className:u.classNames(e.className,U("submenuHeader",{submenu:e})),style:q("submenuHeader",{submenu:e}),"data-p-disabled":e.disabled},M("submenuHeader"));return p.createElement(p.Fragment,{key:t},p.createElement("li",y({},a,{key:t}),e.label),r)},ve=function(e,n){if(!1===e.visible)return null;var t=v+"_separator_"+n,r=s({id:t,className:u.classNames(e.className,U("separator")),role:"separator"},M("separator"));return p.createElement("li",y({},r,{key:t}))},ge=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!1===e.visible)return null;var r={item:e,index:n,parentId:t},a=u.classNames("p-menuitem-link",{"p-disabled":e.disabled}),i=u.classNames("p-menuitem-icon",e.icon),o=s({className:U("icon")},R("icon",r)),c=u.IconUtils.getJSXIcon(e.icon,P({},o),{props:f}),m=s({className:U("label")},R("label",r)),d=e.label&&p.createElement("span",m,e.label),b=e.id||(t||v)+"_"+n,g=s({onClick:function(n){return X(n,e,b)},onMouseMove:function(e){return Y(e,b)},className:U("content",{item:e})},R("content",r)),O=s({href:e.url||"#",className:U("action",{item:e}),onFocus:function(e){return e.stopPropagation()},target:e.target,tabIndex:"-1","aria-label":e.label,"aria-disabled":e.disabled,"data-p-disabled":e.disabled},R("action",r)),h=p.createElement("div",g,p.createElement("a",O,c,d,p.createElement(l.Ripple,null)));e.template&&(h=u.ObjectUtils.getJSXElement(e.template,e,{onClick:function(n){return X(n,e,b)},className:a,tabIndex:"-1",labelClassName:"p-menuitem-text",iconClassName:i,element:h,props:f}));var E=s({id:b,className:u.classNames(e.className,U("menuitem",{focused:N===b})),style:q("menuitem",{item:e}),role:"menuitem","aria-label":e.label,"aria-disabled":e.disabled,"data-p-focused":ue()===b,"data-p-disabled":e.disabled||!1},R("menuitem",r));return p.createElement("li",y({},E,{key:b}),h)},Oe=function(e,n){return!1===e.visible?null:e.separator?ve(e,n):e.items?ye(e,n):ge(e,n)},he=function(){if(f.model){var e=f.model.map(Oe),n=s({className:u.classNames(f.className,U("root",{context:d})),style:f.style,onClick:function(e){return n=e,void(f.popup&&i.OverlayService.emit("overlay-click",{originalEvent:n,target:F.current}));var n}},w.getOtherProps(f),M("root")),t=s({ref:B,className:U("menu"),id:v+"_list",tabIndex:f.tabIndex||"0",role:"menu","aria-label":f.ariaLabel,"aria-labelledby":f.ariaLabelledBy,"aria-activedescendant":_?ue():void 0,onFocus:$,onKeyDown:V,onBlur:Q},M("menu")),a=s({classNames:U("transition"),in:h,timeout:{enter:120,exit:100},options:f.transitionOptions,unmountOnExit:!0,onEnter:me,onEntered:de,onExit:fe,onExited:be},M("transition"));return p.createElement(r.CSSTransition,y({nodeRef:Z},a),p.createElement("div",y({id:f.id,ref:Z},n),p.createElement("ul",t,e)))}return null}();return f.popup?p.createElement(o.Portal,{element:he,appendTo:f.appendTo}):he})));k.displayName="Menu",exports.Menu=k;
|
|
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 S(){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 x(e){return O(e)||h(e)||E(e)||S()}function N(e){if(Array.isArray(e))return e}function D(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 I(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function j(e,n){return N(e)||D(e,n)||E(e,n)||I()}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:function(e){return l.classNames("p-menuitem-content",{"p-disabled":e.item.disabled})},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 H(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 k=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],S=j(p.useState(-1),2),N=S[0],D=S[1],I=j(p.useState(-1),2),P=I[0],k=I[1],A=j(p.useState(!1),2),T=A[0],_=A[1],M=w.setMetaData({props:f,state:{id:y,visible:h,focused:T}}),C=M.ptm,U=M.cx,q=M.sx,R=function(e,n){return C(e,{context:n})};t.useHandleStyle(w.css.styles,M.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&&(d.hideOverlaysOnDocumentScrolling||"outside"===n.type?(pe(e),D(-1)):l.DomHandler.isDocument(e.target)||l.DomHandler.absolutePosition(Z.current,F.current,f.popupAlignment))},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||D(t),n.url||(e.preventDefault(),e.stopPropagation()))},Y=function(e,n){e&&f.popup&&N!==n&&D(n)},$=function(e){_(!0),f.popup||(-1!==P?(ue(P),k(-1)):ue(0)),f.onFocus&&f.onFocus(e)},Q=function(e){var n=e.relatedTarget;n&&e.currentTarget.contains(n)||(_(!1),D(-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=x(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=x(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&&D(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},C("submenuHeader"));return p.createElement(p.Fragment,{key:t},p.createElement("li",v({},a,{key:t}),e.label),r)},ve=function(e,n){if(!1===e.visible)return null;var t=y+"_separator_"+n,r=s({id:t,className:l.classNames(e.className,U("separator")),role:"separator"},C("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;if(!1===e.visible)return null;var 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,H({},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",{item:e})},R("content",r)),O=s({href:e.url||"#",className:U("action",{item:e}),onFocus:function(e){return e.stopPropagation()},target:e.target,tabIndex:"-1","aria-label":e.label,"aria-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)},onMouseMove:function(e){return Y(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),C("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":T?le():void 0,onFocus:$,onKeyDown:V,onBlur:Q},C("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},C("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})));k.displayName="Menu",exports.Menu=k;
|
package/menu/menu.d.ts
CHANGED
|
@@ -237,9 +237,9 @@ export declare class Menu extends React.Component<MenuProps, any> {
|
|
|
237
237
|
public hide(event: React.SyntheticEvent): void;
|
|
238
238
|
/**
|
|
239
239
|
* Used to get container element.
|
|
240
|
-
* @return {HTMLDivElement} Container element
|
|
240
|
+
* @return {HTMLDivElement | null} Container element
|
|
241
241
|
*/
|
|
242
|
-
public getElement(): HTMLDivElement;
|
|
242
|
+
public getElement(): HTMLDivElement | null;
|
|
243
243
|
/**
|
|
244
244
|
* Used to get target element.
|
|
245
245
|
* @return {EventTarget} Target element
|
package/menu/menu.esm.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useMergeProps, useDisplayOrder, useGlobalOnEscapeKey, ESC_KEY_HANDLING_
|
|
|
7
7
|
import { OverlayService } from 'primereact/overlayservice';
|
|
8
8
|
import { Portal } from 'primereact/portal';
|
|
9
9
|
import { Ripple } from 'primereact/ripple';
|
|
10
|
-
import { classNames, UniqueComponentId, ZIndexUtils,
|
|
10
|
+
import { classNames, DomHandler, UniqueComponentId, ZIndexUtils, IconUtils, ObjectUtils } from 'primereact/utils';
|
|
11
11
|
|
|
12
12
|
function _typeof(o) {
|
|
13
13
|
"@babel/helpers - typeof";
|
|
@@ -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";
|
|
@@ -279,10 +267,15 @@ var Menu = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
279
267
|
target: targetRef,
|
|
280
268
|
overlay: menuRef,
|
|
281
269
|
listener: function listener(event, _ref) {
|
|
282
|
-
var valid = _ref.valid
|
|
270
|
+
var valid = _ref.valid,
|
|
271
|
+
type = _ref.type;
|
|
283
272
|
if (valid) {
|
|
284
|
-
|
|
285
|
-
|
|
273
|
+
if (context.hideOverlaysOnDocumentScrolling || type === 'outside') {
|
|
274
|
+
hide(event);
|
|
275
|
+
setFocusedOptionIndex(-1);
|
|
276
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
277
|
+
DomHandler.absolutePosition(menuRef.current, targetRef.current, props.popupAlignment);
|
|
278
|
+
}
|
|
286
279
|
}
|
|
287
280
|
},
|
|
288
281
|
when: visibleState
|
|
@@ -338,6 +331,9 @@ var Menu = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
338
331
|
props.onFocus && props.onFocus(event);
|
|
339
332
|
};
|
|
340
333
|
var onListBlur = function onListBlur(event) {
|
|
334
|
+
var currentTarget = event.currentTarget,
|
|
335
|
+
relatedTarget = event.relatedTarget;
|
|
336
|
+
if (relatedTarget && currentTarget.contains(relatedTarget)) return;
|
|
341
337
|
setFocused(false);
|
|
342
338
|
setFocusedOptionIndex(-1);
|
|
343
339
|
props.onBlur && props.onBlur(event);
|
|
@@ -581,6 +577,9 @@ var Menu = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
581
577
|
onClick: function onClick(event) {
|
|
582
578
|
return onItemClick(event, item, key);
|
|
583
579
|
},
|
|
580
|
+
onMouseMove: function onMouseMove(event) {
|
|
581
|
+
return onItemMouseMove(event, key);
|
|
582
|
+
},
|
|
584
583
|
className: linkClassName,
|
|
585
584
|
tabIndex: '-1',
|
|
586
585
|
labelClassName: 'p-menuitem-text',
|
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 i}from"primereact/csstransition";import{useMergeProps as o,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,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 _(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,n){return T(e)||H(e,n)||P(e,n)||_()}var M=r.extend({defaultProps:{__TYPE:"Menu",id:null,ariaLabel:null,ariaLabelledBy:null,tabIndex:0,model:null,popup:!1,popupAlignment:"left",style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,onFocus:null,onBlur:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var t=e.context;return y("p-menu p-component",{"p-menu-overlay":e.props.popup,"p-input-filled":t&&"filled"===t.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===n.ripple})},menu:"p-menu-list p-reset",content:function(e){return y("p-menuitem-content",{"p-disabled":e.item.disabled})},action:function(e){return y("p-menuitem-link",{"p-disabled":e.item.disabled})},menuitem:function(e){return y("p-menuitem",{"p-focus":e.focused})},submenuHeader:function(e){return y("p-submenu-header",{"p-disabled":e.submenu.disabled})},separator:"p-menu-separator",label:"p-menuitem-text",icon:"p-menuitem-icon",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-menu-overlay {\n position: absolute;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n\n .p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-menu .p-menuitem-text {\n line-height: 1;\n }\n}\n",inlineStyles:{submenuHeader:function(e){return e.submenu.style},menuitem:function(e){return e.item.style}}}});function B(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B(Object(t),!0).forEach((function(n){var r,a,i;r=e,i=t[n],(a=w(a=n))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):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=o(),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],ie=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()))},oe=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)})),i=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({},i,{key:r}),n.label),a)},Ne=function(n,t){if(!1===n.visible)return null;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},i=y("p-menuitem-link",{"p-disabled":n.disabled}),o=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 ie(e,n,p)},onMouseMove:function(e){return oe(e,p)},className:Y("content",{item:n})},q("content",a)),d=O({href:n.url||"#",className:Y("action",{item:n}),onFocus:function(e){return e.stopPropagation()},target:n.target,tabIndex:"-1","aria-label":n.label,"aria-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 ie(e,n,p)},className:i,tabIndex:"-1",labelClassName:"p-menuitem-text",iconClassName:o,element:f,props:k}));var v=O({id:p,className:y(n.className,Y("menuitem",{focused:B===p})),style:$("menuitem",{item:n}),role:"menuitem","aria-label":n.label,"aria-disabled":n.disabled,"data-p-focused":he()===p,"data-p-disabled":n.disabled||!1},q("menuitem",a));return e.createElement("li",j({},v,{key:p}),f)},De=function(e,n){return!1===e.visible?null:e.separator?Ne(e,n):e.items?Ie(e,n):Pe(e,n)},Ae=function(){if(k.model){var n=k.model.map(De),t=O({className:y(k.className,Y("root",{context:w})),style:k.style,onClick:function(e){return n=e,void(k.popup&&d.emit("overlay-click",{originalEvent:n,target:W.current}));var n}},M.getOtherProps(k),G("root")),r=O({ref:V,className:Y("menu"),id:N+"_list",tabIndex:k.tabIndex||"0",role:"menu","aria-label":k.ariaLabel,"aria-labelledby":k.ariaLabelledBy,"aria-activedescendant":J?he():void 0,onFocus:ue,onKeyDown:ce,onBlur:le},G("menu")),a=O({classNames:Y("transition"),in:T,timeout:{enter:120,exit:100},options:k.transitionOptions,unmountOnExit:!0,onEnter:Oe,onEntered:we,onExit:je,onExited:ke},G("transition"));return e.createElement(i,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 i}from"primereact/componentbase";import{CSSTransition as o}from"primereact/csstransition";import{useMergeProps as a,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,DomHandler as v,UniqueComponentId as g,ZIndexUtils 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)||!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: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 M(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,o,a,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,i=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw i}}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 H(e)||M(e,n)||D(e,n)||_()}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:function(e){return y("p-menuitem-content",{"p-disabled":e.item.disabled})},action:function(e){return y("p-menuitem-link",{"p-disabled":e.item.disabled})},menuitem:function(e){return y("p-menuitem",{"p-focus":e.focused})},submenuHeader:function(e){return y("p-submenu-header",{"p-disabled":e.submenu.disabled})},separator:"p-menu-separator",label:"p-menuitem-text",icon:"p-menuitem-icon",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-menu-overlay {\n position: absolute;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n\n .p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-menu .p-menuitem-text {\n line-height: 1;\n }\n}\n",inlineStyles:{submenuHeader:function(e){return e.submenu.style},menuitem:function(e){return e.item.style}}}});function 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,E){var O=a(),w=e.useContext(t),k=B.getProps(r,w),N=C(e.useState(k.id),2),j=N[0],P=N[1],D=C(e.useState(!k.popup),2),A=D[0],H=D[1],M=C(e.useState(-1),2),_=M[0],F=M[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=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})};i(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){Ee(e)},when:ee&&ne,priority:[c.MENU,ne]});var te=C(s({target:W,overlay:Q,listener:function(e,n){n.valid&&(w.hideOverlaysOnDocumentScrolling||"outside"===n.type?(Ee(e),F(-1)):v.isDocument(e.target)||v.absolutePosition(Q.current,W.current,k.popupAlignment))},when:A}),2),re=te[0],ie=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||_===t||F(t),n.url||(e.preventDefault(),e.stopPropagation()))},ae=function(e,n){e&&k.popup&&_!==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){var n=e.relatedTarget;n&&e.currentTarget.contains(n)||(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&&(v.focus(W.current),Ee(e));case"Tab":k.popup&&A&&Ee(e)}},se=function(e){var n=ye(_);ge(n),e.preventDefault()},pe=function(e){if(e.altKey&&k.popup)v.focus(W.current),Ee(e),e.preventDefault();else{var n=ve(_);ge(n),e.preventDefault()}},me=function(e){ge(0),e.preventDefault()},de=function(e){ge(v.find(Q.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()},fe=function(e){var n=v.findSingle(Q.current,'li[id="'.concat("".concat(_),'"]')),t=n&&v.findSingle(n,'a[data-pc-section="action"]');k.popup&&v.focus(W.current),t?t.click():n&&n.click(),e.preventDefault()},be=function(e){fe(e)},ye=function(e){var n=T(v.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(v.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=v.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!==_?_:null},xe=function(e){k.popup&&(A?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(){v.addStyles(Q.current,{position:"absolute",top:"0",left:"0"}),h.set("menu",Q.current,w&&w.autoZIndex||n.autoZIndex,k.baseZIndex||w&&w.zIndex.menu||n.zIndex.menu),v.absolutePosition(Q.current,W.current,k.popupAlignment),k.popup&&(v.focus(V.current),ge(0))},we=function(){re()},ke=function(){W.current=null,ie()},Ie=function(){h.clear(Q.current)};p((function(){j||P(g())})),m((function(){h.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 Ne=function(n,t){var r=j+"_sub_"+t,i=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),i)},je=function(n,t){if(!1===n.visible)return null;var r=j+"_separator_"+t,i=O({id:r,className:y(n.className,Y("separator")),role:"separator"},G("separator"));return e.createElement("li",I({},i,{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 i={item:n,index:t,parentId:r},o=y("p-menuitem-link",{"p-disabled":n.disabled}),a=y("p-menuitem-icon",n.icon),u=O({className:Y("icon")},q("icon",i)),l=x.getJSXIcon(n.icon,R({},u),{props:k}),c=O({className:Y("label")},q("label",i)),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 ae(e,p)},className:Y("content",{item:n})},q("content",i)),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-disabled":n.disabled,"data-p-disabled":n.disabled},q("action",i)),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)},onMouseMove:function(e){return ae(e,p)},className:o,tabIndex:"-1",labelClassName:"p-menuitem-text",iconClassName:a,element:f,props:k}));var v=O({id:p,className:y(n.className,Y("menuitem",{focused:_===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",i));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")),i=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},i),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};
|