primereact 10.3.0 → 10.3.2
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 +24 -20
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +36 -1
- package/accordion/accordion.esm.js +16 -12
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +22 -18
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +39 -33
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +14 -3
- package/api/api.esm.js +39 -33
- package/api/api.esm.min.js +1 -1
- package/api/api.js +39 -33
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +24 -21
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -1
- package/autocomplete/autocomplete.esm.js +7 -4
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +24 -21
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +6 -4
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +3 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +7 -6
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +3 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +4 -3
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +3 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +4 -3
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +11 -7
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +11 -7
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +11 -7
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +12 -11
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +3 -2
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +12 -11
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +9 -6
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +4 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +10 -8
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +158 -113
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -5
- package/calendar/calendar.esm.js +92 -47
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +158 -113
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +11 -9
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +4 -2
- package/card/card.esm.min.js +1 -1
- package/card/card.js +10 -9
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +1 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +1 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +1 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +60 -36
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +27 -4
- package/cascadeselect/cascadeselect.esm.js +46 -22
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +61 -37
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +4 -3
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +3 -2
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +5 -4
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +31 -30
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +28 -27
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +32 -31
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +13 -7
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +17 -2
- package/chip/chip.esm.js +9 -3
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +14 -9
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +10 -8
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +5 -3
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +10 -8
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +9 -8
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/colorpicker/colorpicker.esm.js +2 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +9 -8
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +1 -1
- package/componentbase/componentbase.cjs.js +62 -50
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +63 -51
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +62 -50
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +32 -22
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +19 -3
- package/confirmdialog/confirmdialog.esm.js +30 -20
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +32 -22
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +41 -128
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +12 -2
- package/confirmpopup/confirmpopup.esm.js +36 -123
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +41 -128
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +14 -12
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +1 -1
- package/contextmenu/contextmenu.esm.js +5 -3
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +14 -12
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1232 -649
- package/core/core.min.js +44 -44
- package/datascroller/datascroller.cjs.js +8 -7
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +3 -2
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +8 -7
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +166 -146
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +4 -3
- package/datatable/datatable.esm.js +72 -52
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +166 -146
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.d.ts +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -3
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +3 -3
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -3
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +40 -130
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +2 -2
- package/dialog/dialog.esm.js +35 -125
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +41 -131
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +6 -4
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +4 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +5 -4
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +10 -9
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +3 -2
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +10 -9
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +46 -36
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +1 -1
- package/dropdown/dropdown.esm.js +21 -11
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +47 -37
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +8 -7
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +4 -3
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +8 -7
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +9 -8
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -2
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +9 -8
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +25 -24
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +5 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +26 -26
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +13 -12
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +4 -3
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +14 -13
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +254 -94
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +12 -4
- package/hooks/hooks.esm.js +253 -96
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +254 -94
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +1 -1
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +1 -1
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +1 -1
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +1 -1
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +1 -1
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +1 -1
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +1 -1
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +1 -1
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +1 -1
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +1 -1
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +1 -1
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +1 -1
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +1 -1
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +1 -1
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +1 -1
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +1 -1
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +1 -1
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +1 -1
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +1 -1
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +1 -1
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +1 -1
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +1 -1
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +1 -1
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +1 -1
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +1 -1
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +1 -1
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +1 -1
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +1 -1
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +1 -1
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +1 -1
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +1 -1
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +1 -1
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +1 -1
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +1 -1
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +1 -1
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +1 -1
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +1 -1
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +1 -1
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +1 -1
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +1 -1
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +1 -1
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +1 -1
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +1 -1
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +1 -1
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +1 -1
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +1 -1
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +1 -1
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +1 -1
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +1 -1
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +1 -1
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +1 -1
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +1 -1
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +1 -1
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +1 -1
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +1 -1
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +1 -1
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +1 -1
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +1 -1
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +1 -1
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +1 -1
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +1 -1
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +1 -1
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +1 -1
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +1 -1
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +1 -1
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +1 -1
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +1 -1
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +1 -1
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +1 -1
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +1 -1
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +1 -1
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +1 -1
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +1 -1
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +1 -1
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +1 -1
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +1 -1
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +1 -1
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +1 -1
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +1 -1
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +1 -1
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +1 -1
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +1 -1
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +1 -1
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +1 -1
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +45 -151
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +26 -132
- package/image/image.esm.min.js +1 -1
- package/image/image.js +46 -152
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +12 -4
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +9 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +13 -6
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +15 -6
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +15 -6
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +15 -6
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +84 -26
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +7 -0
- package/inputnumber/inputnumber.esm.js +80 -22
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +84 -26
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +8 -7
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +6 -5
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +8 -7
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +10 -7
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +10 -7
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +11 -9
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +3 -1
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +3 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +4 -3
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/knob/knob.cjs.js +7 -6
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +3 -2
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +8 -7
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +31 -14
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +8 -3
- package/listbox/listbox.esm.js +23 -6
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +31 -14
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +94 -92
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +73 -71
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +94 -92
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +133 -57
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +4 -0
- package/mention/mention.esm.js +128 -52
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +133 -57
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +22 -117
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +1 -1
- package/menu/menu.esm.js +15 -110
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +22 -117
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +15 -13
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +4 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +15 -13
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +5 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +3 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +6 -5
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +5 -4
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +3 -2
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +6 -5
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +89 -67
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -1
- package/multiselect/multiselect.esm.js +56 -34
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +90 -68
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +5 -4
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +3 -2
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +5 -4
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +21 -18
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +11 -1
- package/orderlist/orderlist.esm.js +6 -3
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +21 -18
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +32 -19
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +15 -2
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +31 -19
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +15 -109
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +12 -106
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +16 -110
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +271 -21
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +2 -2
- package/paginator/paginator.esm.js +265 -15
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +271 -21
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +11 -10
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -2
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +11 -10
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +39 -34
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +20 -15
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +39 -34
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +5 -3
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +1 -0
- package/passthrough/index.esm.js +5 -3
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +5 -3
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +401 -391
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +401 -391
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +401 -391
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +18 -12
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +11 -5
- package/password/password.esm.min.js +1 -1
- package/password/password.js +18 -12
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +725 -192
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +11 -1
- package/picklist/picklist.esm.js +713 -180
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +725 -192
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +7 -1
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +7 -1
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +7 -1
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +3715 -2447
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +3711 -2447
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3715 -2447
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +8 -6
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +9 -8
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +5 -3
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +6 -5
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +32 -31
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +29 -28
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +33 -32
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +9 -7
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +4 -2
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +9 -8
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +18 -9
- package/resources/themes/arya-green/theme.css +18 -9
- package/resources/themes/arya-orange/theme.css +18 -9
- package/resources/themes/arya-purple/theme.css +18 -9
- package/resources/themes/bootstrap4-dark-blue/theme.css +18 -9
- package/resources/themes/bootstrap4-dark-purple/theme.css +18 -9
- package/resources/themes/bootstrap4-light-blue/theme.css +18 -9
- package/resources/themes/bootstrap4-light-purple/theme.css +18 -9
- package/resources/themes/fluent-light/theme.css +18 -9
- package/resources/themes/lara-dark-amber/theme.css +18 -9
- package/resources/themes/lara-dark-blue/theme.css +18 -9
- package/resources/themes/lara-dark-cyan/theme.css +18 -9
- package/resources/themes/lara-dark-green/theme.css +18 -9
- package/resources/themes/lara-dark-indigo/theme.css +18 -9
- package/resources/themes/lara-dark-pink/theme.css +18 -9
- package/resources/themes/lara-dark-purple/theme.css +18 -9
- package/resources/themes/lara-dark-teal/theme.css +18 -9
- package/resources/themes/lara-light-amber/theme.css +18 -9
- package/resources/themes/lara-light-blue/theme.css +18 -9
- package/resources/themes/lara-light-cyan/theme.css +18 -9
- package/resources/themes/lara-light-green/theme.css +18 -9
- package/resources/themes/lara-light-indigo/theme.css +18 -9
- package/resources/themes/lara-light-pink/theme.css +18 -9
- package/resources/themes/lara-light-purple/theme.css +18 -9
- package/resources/themes/lara-light-teal/theme.css +18 -9
- package/resources/themes/luna-amber/theme.css +18 -9
- package/resources/themes/luna-blue/theme.css +18 -9
- package/resources/themes/luna-green/theme.css +18 -9
- package/resources/themes/luna-pink/theme.css +18 -9
- package/resources/themes/md-dark-deeppurple/theme.css +18 -9
- package/resources/themes/md-dark-indigo/theme.css +18 -9
- package/resources/themes/md-light-deeppurple/theme.css +18 -9
- package/resources/themes/md-light-indigo/theme.css +18 -9
- package/resources/themes/mdc-dark-deeppurple/theme.css +18 -9
- package/resources/themes/mdc-dark-indigo/theme.css +18 -9
- package/resources/themes/mdc-light-deeppurple/theme.css +18 -9
- package/resources/themes/mdc-light-indigo/theme.css +18 -9
- package/resources/themes/mira/theme.css +18 -9
- package/resources/themes/nano/theme.css +18 -9
- package/resources/themes/nova/theme.css +18 -9
- package/resources/themes/nova-accent/theme.css +18 -9
- package/resources/themes/nova-alt/theme.css +18 -9
- package/resources/themes/rhea/theme.css +18 -9
- package/resources/themes/saga-blue/theme.css +18 -9
- package/resources/themes/saga-green/theme.css +18 -9
- package/resources/themes/saga-orange/theme.css +18 -9
- package/resources/themes/saga-purple/theme.css +18 -9
- package/resources/themes/soho-dark/theme.css +18 -9
- package/resources/themes/soho-light/theme.css +18 -9
- package/resources/themes/tailwind-light/theme.css +18 -9
- package/resources/themes/vela-blue/theme.css +18 -9
- package/resources/themes/vela-green/theme.css +18 -9
- package/resources/themes/vela-orange/theme.css +18 -9
- package/resources/themes/vela-purple/theme.css +18 -9
- package/resources/themes/viva-dark/theme.css +18 -9
- package/resources/themes/viva-light/theme.css +18 -9
- package/ripple/ripple.cjs.js +8 -4
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +9 -5
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +8 -4
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +4 -2
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +4 -2
- package/row/row.esm.min.js +1 -1
- package/row/row.js +4 -3
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +7 -6
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -2
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +8 -7
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +4 -3
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +3 -2
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +4 -3
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +6 -3
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +4 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +7 -5
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +17 -113
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +3 -3
- package/sidebar/sidebar.esm.js +12 -108
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +18 -114
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +3 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +3 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +4 -3
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +23 -116
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +1 -1
- package/slidemenu/slidemenu.esm.js +12 -105
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +23 -116
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +6 -5
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +4 -3
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +6 -5
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +19 -10
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +14 -5
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +19 -10
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +105 -94
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +1 -1
- package/splitbutton/splitbutton.esm.js +94 -83
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +105 -94
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +5 -4
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +3 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +5 -4
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +8 -7
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -2
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +8 -7
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +17 -14
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +12 -9
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +17 -14
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +38 -22
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +35 -0
- package/tabview/tabview.esm.js +26 -10
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +38 -22
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +5 -3
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +3 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +6 -5
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +11 -9
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +12 -11
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +14 -12
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +1 -1
- package/tieredmenu/tieredmenu.esm.js +6 -4
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +14 -12
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +10 -8
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +10 -9
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +12 -10
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +2 -2
- package/toast/toast.esm.js +4 -2
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +12 -10
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +78 -7
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +77 -6
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +79 -8
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +7 -5
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +7 -6
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +4 -3
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +27 -0
- package/tooltip/tooltip.esm.js +3 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +4 -3
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +1 -1
- package/tree/tree.cjs.js +267 -150
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +8 -0
- package/tree/tree.esm.js +250 -133
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +268 -152
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +209 -71
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +26 -1
- package/treeselect/treeselect.esm.js +191 -53
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +210 -73
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +139 -107
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +3 -3
- package/treetable/treetable.esm.js +86 -54
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +139 -107
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +6 -5
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +3 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +6 -5
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +52 -9
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +3 -2
- package/utils/utils.esm.js +52 -10
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +52 -9
- package/utils/utils.min.js +1 -1
- package/web-types.json +137 -30
package/chip/chip.esm.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { PrimeReactContext } from 'primereact/api';
|
|
4
4
|
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
5
|
+
import { useMergeProps } from 'primereact/hooks';
|
|
5
6
|
import { TimesCircleIcon } from 'primereact/icons/timescircle';
|
|
6
|
-
import { classNames, ObjectUtils,
|
|
7
|
+
import { classNames, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
7
8
|
|
|
8
9
|
function _typeof(o) {
|
|
9
10
|
"@babel/helpers - typeof";
|
|
@@ -153,6 +154,7 @@ var ChipBase = ComponentBase.extend({
|
|
|
153
154
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
154
155
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
155
156
|
var Chip = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
157
|
+
var mergeProps = useMergeProps();
|
|
156
158
|
var context = React.useContext(PrimeReactContext);
|
|
157
159
|
var props = ChipBase.getProps(inProps, context);
|
|
158
160
|
var elementRef = React.useRef(null);
|
|
@@ -170,20 +172,24 @@ var Chip = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inPr
|
|
|
170
172
|
name: 'chip'
|
|
171
173
|
});
|
|
172
174
|
var onKeyDown = function onKeyDown(event) {
|
|
173
|
-
if (event.
|
|
175
|
+
if (event.code === 'Enter' || event.code === 'Backspace') {
|
|
174
176
|
close(event);
|
|
175
177
|
}
|
|
176
178
|
};
|
|
177
179
|
var close = function close(event) {
|
|
178
180
|
setVisibleState(false);
|
|
179
181
|
if (props.onRemove) {
|
|
180
|
-
props.onRemove(
|
|
182
|
+
props.onRemove({
|
|
183
|
+
originalEvent: event,
|
|
184
|
+
value: props.label || props.image || props.icon
|
|
185
|
+
});
|
|
181
186
|
}
|
|
182
187
|
};
|
|
183
188
|
var createContent = function createContent() {
|
|
184
189
|
var content = [];
|
|
185
190
|
var removeIconProps = mergeProps({
|
|
186
191
|
key: 'removeIcon',
|
|
192
|
+
role: 'button',
|
|
187
193
|
tabIndex: 0,
|
|
188
194
|
className: cx('removeIcon'),
|
|
189
195
|
onClick: close,
|
package/chip/chip.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{PrimeReactContext as r}from"primereact/api";import{ComponentBase as t,useHandleStyle as n}from"primereact/componentbase";import{
|
|
1
|
+
import*as e from"react";import{PrimeReactContext as r}from"primereact/api";import{ComponentBase as t,useHandleStyle as n}from"primereact/componentbase";import{useMergeProps as o}from"primereact/hooks";import{TimesCircleIcon as i}from"primereact/icons/timescircle";import{classNames as l,ObjectUtils as a,IconUtils as c}from"primereact/utils";function p(e){return p="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},p(e)}function u(e,r){if("object"!==p(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function m(e){var r=u(e,"string");return"symbol"===p(r)?r:String(r)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s.apply(this,arguments)}function f(e){if(Array.isArray(e))return e}function y(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i,l,a=[],c=!0,p=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(n=i.call(t)).done)&&(a.push(n.value),a.length!==r);c=!0);}catch(e){p=!0,o=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(p)throw o}}return a}}function b(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function v(e,r){if(e){if("string"==typeof e)return b(e,r);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)?b(e,r):void 0}}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h=t.extend({defaultProps:{__TYPE:"Chip",label:null,icon:null,image:null,removable:!1,removeIcon:null,className:null,style:null,template:null,imageAlt:"chip",onImageError:null,onRemove:null,children:void 0},css:{classes:{root:function(e){return l("p-chip p-component",{"p-chip-image":null!=e.props.image})},removeIcon:"p-chip-remove-icon",icon:"p-chip-icon",label:"p-chip-text"},styles:"\n@layer primereact {\n .p-chip {\n display: inline-flex;\n align-items: center;\n }\n \n .p-chip-text {\n line-height: 1.5;\n }\n \n .p-chip-icon.pi {\n line-height: 1.5;\n }\n \n .p-chip .p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n }\n \n .p-chip img {\n border-radius: 50%;\n }\n}\n"}});function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?d(Object(t),!0).forEach((function(r){var n,o,i;n=e,i=t[r],(o=m(o=r))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var j=e.memo(e.forwardRef((function(t,p){var u,m,b=o(),d=e.useContext(r),j=h.getProps(t,d),S=e.useRef(null),w=e.useState(!0),E=(m=2,f(u=w)||y(u,m)||v(u,m)||g()),P=E[0],I=E[1],x=h.setMetaData({props:j}),k=x.ptm,A=x.cx;n(h.css.styles,x.isUnstyled,{name:"chip"});var N,D,C=function(e){"Enter"!==e.code&&"Backspace"!==e.code||R(e)},R=function(e){I(!1),j.onRemove&&j.onRemove({originalEvent:e,value:j.label||j.image||j.icon})},J=function(){var r=[],t=b({key:"removeIcon",role:"button",tabIndex:0,className:A("removeIcon"),onClick:R,onKeyDown:C},k("removeIcon")),n=j.removeIcon||e.createElement(i,t);if(j.image){var o=b({key:"image",src:j.image,onError:j.onImageError},k("image"));r.push(e.createElement("img",s({alt:j.imageAlt},o)))}else if(j.icon){var l=b({key:"icon",className:A("icon")},k("icon"));r.push(c.getJSXIcon(j.icon,O({},l),{props:j}))}if(j.label){var a=b({key:"label",className:A("label")},k("label"));r.push(e.createElement("span",a,j.label))}return j.removable&&r.push(c.getJSXIcon(n,O({},t),{props:j})),r};return e.useImperativeHandle(p,(function(){return{props:j,getElement:function(){return S.current}}})),P&&(N=j.template?a.getJSXElement(j.template,j):J(),D=b({ref:S,style:j.style,className:l(j.className,A("root")),"aria-label":j.label},h.getOtherProps(j),k("root")),e.createElement("div",D,N))})));j.displayName="Chip";export{j as Chip};
|
package/chip/chip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.chip = (function (exports, React, api, componentbase, timescircle, utils) {
|
|
2
|
+
this.primereact.chip = (function (exports, React, api, componentbase, hooks, timescircle, utils) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -170,6 +170,7 @@ this.primereact.chip = (function (exports, React, api, componentbase, timescircl
|
|
|
170
170
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
171
171
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
172
172
|
var Chip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
173
|
+
var mergeProps = hooks.useMergeProps();
|
|
173
174
|
var context = React__namespace.useContext(api.PrimeReactContext);
|
|
174
175
|
var props = ChipBase.getProps(inProps, context);
|
|
175
176
|
var elementRef = React__namespace.useRef(null);
|
|
@@ -187,20 +188,24 @@ this.primereact.chip = (function (exports, React, api, componentbase, timescircl
|
|
|
187
188
|
name: 'chip'
|
|
188
189
|
});
|
|
189
190
|
var onKeyDown = function onKeyDown(event) {
|
|
190
|
-
if (event.
|
|
191
|
+
if (event.code === 'Enter' || event.code === 'Backspace') {
|
|
191
192
|
close(event);
|
|
192
193
|
}
|
|
193
194
|
};
|
|
194
195
|
var close = function close(event) {
|
|
195
196
|
setVisibleState(false);
|
|
196
197
|
if (props.onRemove) {
|
|
197
|
-
props.onRemove(
|
|
198
|
+
props.onRemove({
|
|
199
|
+
originalEvent: event,
|
|
200
|
+
value: props.label || props.image || props.icon
|
|
201
|
+
});
|
|
198
202
|
}
|
|
199
203
|
};
|
|
200
204
|
var createContent = function createContent() {
|
|
201
205
|
var content = [];
|
|
202
|
-
var removeIconProps =
|
|
206
|
+
var removeIconProps = mergeProps({
|
|
203
207
|
key: 'removeIcon',
|
|
208
|
+
role: 'button',
|
|
204
209
|
tabIndex: 0,
|
|
205
210
|
className: cx('removeIcon'),
|
|
206
211
|
onClick: close,
|
|
@@ -208,7 +213,7 @@ this.primereact.chip = (function (exports, React, api, componentbase, timescircl
|
|
|
208
213
|
}, ptm('removeIcon'));
|
|
209
214
|
var icon = props.removeIcon || /*#__PURE__*/React__namespace.createElement(timescircle.TimesCircleIcon, removeIconProps);
|
|
210
215
|
if (props.image) {
|
|
211
|
-
var imageProps =
|
|
216
|
+
var imageProps = mergeProps({
|
|
212
217
|
key: 'image',
|
|
213
218
|
src: props.image,
|
|
214
219
|
onError: props.onImageError
|
|
@@ -217,7 +222,7 @@ this.primereact.chip = (function (exports, React, api, componentbase, timescircl
|
|
|
217
222
|
alt: props.imageAlt
|
|
218
223
|
}, imageProps)));
|
|
219
224
|
} else if (props.icon) {
|
|
220
|
-
var chipIconProps =
|
|
225
|
+
var chipIconProps = mergeProps({
|
|
221
226
|
key: 'icon',
|
|
222
227
|
className: cx('icon')
|
|
223
228
|
}, ptm('icon'));
|
|
@@ -226,7 +231,7 @@ this.primereact.chip = (function (exports, React, api, componentbase, timescircl
|
|
|
226
231
|
}));
|
|
227
232
|
}
|
|
228
233
|
if (props.label) {
|
|
229
|
-
var labelProps =
|
|
234
|
+
var labelProps = mergeProps({
|
|
230
235
|
key: 'label',
|
|
231
236
|
className: cx('label')
|
|
232
237
|
}, ptm('label'));
|
|
@@ -241,7 +246,7 @@ this.primereact.chip = (function (exports, React, api, componentbase, timescircl
|
|
|
241
246
|
};
|
|
242
247
|
var createElement = function createElement() {
|
|
243
248
|
var content = props.template ? utils.ObjectUtils.getJSXElement(props.template, props) : createContent();
|
|
244
|
-
var rootProps =
|
|
249
|
+
var rootProps = mergeProps({
|
|
245
250
|
ref: elementRef,
|
|
246
251
|
style: props.style,
|
|
247
252
|
className: utils.classNames(props.className, cx('root')),
|
|
@@ -267,4 +272,4 @@ this.primereact.chip = (function (exports, React, api, componentbase, timescircl
|
|
|
267
272
|
|
|
268
273
|
return exports;
|
|
269
274
|
|
|
270
|
-
})({}, React, primereact.api, primereact.componentbase, primereact.icons.timescircle, primereact.utils);
|
|
275
|
+
})({}, React, primereact.api, primereact.componentbase, primereact.hooks, primereact.icons.timescircle, primereact.utils);
|
package/chip/chip.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.chip=function(e,r,
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.chip=function(e,t,r,n,o,i,l){"use strict";function c(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var a=c(t);function u(e){return u="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},u(e)}function s(e,t){if("object"!==u(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e){var t=s(e,"string");return"symbol"===u(t)?t:String(t)}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}function f(e){if(Array.isArray(e))return e}function b(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,l,c=[],a=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{if(!a&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return c}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function h(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g=n.ComponentBase.extend({defaultProps:{__TYPE:"Chip",label:null,icon:null,image:null,removable:!1,removeIcon:null,className:null,style:null,template:null,imageAlt:"chip",onImageError:null,onRemove:null,children:void 0},css:{classes:{root:function(e){return l.classNames("p-chip p-component",{"p-chip-image":null!=e.props.image})},removeIcon:"p-chip-remove-icon",icon:"p-chip-icon",label:"p-chip-text"},styles:"\n@layer primereact {\n .p-chip {\n display: inline-flex;\n align-items: center;\n }\n \n .p-chip-text {\n line-height: 1.5;\n }\n \n .p-chip-icon.pi {\n line-height: 1.5;\n }\n \n .p-chip .p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n }\n \n .p-chip img {\n border-radius: 50%;\n }\n}\n"}});function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){var n,o,i;n=e,i=r[t],(o=p(o=t))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var j=a.memo(a.forwardRef((function(e,t){var c,u,s=o.useMergeProps(),p=a.useContext(r.PrimeReactContext),y=g.getProps(e,p),d=a.useRef(null),j=a.useState(!0),P=(u=2,f(c=j)||b(c,u)||v(c,u)||h()),S=P[0],I=P[1],w=g.setMetaData({props:y}),E=w.ptm,N=w.cx;n.useHandleStyle(g.css.styles,w.isUnstyled,{name:"chip"});var k,x,C=function(e){"Enter"!==e.code&&"Backspace"!==e.code||A(e)},A=function(e){I(!1),y.onRemove&&y.onRemove({originalEvent:e,value:y.label||y.image||y.icon})},D=function(){var e=[],t=s({key:"removeIcon",role:"button",tabIndex:0,className:N("removeIcon"),onClick:A,onKeyDown:C},E("removeIcon")),r=y.removeIcon||a.createElement(i.TimesCircleIcon,t);if(y.image){var n=s({key:"image",src:y.image,onError:y.onImageError},E("image"));e.push(a.createElement("img",m({alt:y.imageAlt},n)))}else if(y.icon){var o=s({key:"icon",className:N("icon")},E("icon"));e.push(l.IconUtils.getJSXIcon(y.icon,O({},o),{props:y}))}if(y.label){var c=s({key:"label",className:N("label")},E("label"));e.push(a.createElement("span",c,y.label))}return y.removable&&e.push(l.IconUtils.getJSXIcon(r,O({},t),{props:y})),e};return a.useImperativeHandle(t,(function(){return{props:y,getElement:function(){return d.current}}})),S&&(k=y.template?l.ObjectUtils.getJSXElement(y.template,y):D(),x=s({ref:d,style:y.style,className:l.classNames(y.className,N("root")),"aria-label":y.label},g.getOtherProps(y),E("root")),a.createElement("div",x,k))})));return j.displayName="Chip",e.Chip=j,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.hooks,primereact.icons.timescircle,primereact.utils);
|
package/chips/chips.cjs.js
CHANGED
|
@@ -224,6 +224,7 @@ var ChipsBase = componentbase.ComponentBase.extend({
|
|
|
224
224
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
225
225
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
226
226
|
var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
227
|
+
var mergeProps = hooks.useMergeProps();
|
|
227
228
|
var context = React__namespace.useContext(api.PrimeReactContext);
|
|
228
229
|
var props = ChipsBase.getProps(inProps, context);
|
|
229
230
|
var _React$useState = React__namespace.useState(false),
|
|
@@ -424,11 +425,12 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
424
425
|
}
|
|
425
426
|
});
|
|
426
427
|
var createRemoveIcon = function createRemoveIcon(value, index) {
|
|
427
|
-
var iconProps =
|
|
428
|
+
var iconProps = mergeProps({
|
|
428
429
|
className: cx('removeTokenIcon'),
|
|
429
430
|
onClick: function onClick(event) {
|
|
430
431
|
return removeItem(event, index);
|
|
431
|
-
}
|
|
432
|
+
},
|
|
433
|
+
'aria-hidden': 'true'
|
|
432
434
|
}, ptm('removeTokenIcon'));
|
|
433
435
|
var icon = props.removeIcon || /*#__PURE__*/React__namespace.createElement(timescircle.TimesCircleIcon, iconProps);
|
|
434
436
|
var removeIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, iconProps), {
|
|
@@ -441,12 +443,12 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
441
443
|
};
|
|
442
444
|
var createItem = function createItem(value, index) {
|
|
443
445
|
var content = props.itemTemplate ? props.itemTemplate(value) : value;
|
|
444
|
-
var labelProps =
|
|
446
|
+
var labelProps = mergeProps({
|
|
445
447
|
className: cx('label')
|
|
446
448
|
}, ptm('label'));
|
|
447
449
|
var label = /*#__PURE__*/React__namespace.createElement("span", labelProps, content);
|
|
448
450
|
var icon = createRemoveIcon(value, index);
|
|
449
|
-
var tokenProps =
|
|
451
|
+
var tokenProps = mergeProps({
|
|
450
452
|
key: index,
|
|
451
453
|
className: cx('token'),
|
|
452
454
|
'data-p-highlight': true
|
|
@@ -454,10 +456,10 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
454
456
|
return /*#__PURE__*/React__namespace.createElement("li", tokenProps, label, icon);
|
|
455
457
|
};
|
|
456
458
|
var createInput = function createInput() {
|
|
457
|
-
var inputTokenProps =
|
|
459
|
+
var inputTokenProps = mergeProps({
|
|
458
460
|
className: cx('inputToken')
|
|
459
461
|
}, ptm('inputToken'));
|
|
460
|
-
var inputProps =
|
|
462
|
+
var inputProps = mergeProps(_objectSpread({
|
|
461
463
|
id: props.inputId,
|
|
462
464
|
ref: inputRef,
|
|
463
465
|
placeholder: props.placeholder,
|
|
@@ -486,7 +488,7 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
486
488
|
var createList = function createList() {
|
|
487
489
|
var items = createItems();
|
|
488
490
|
var input = createInput();
|
|
489
|
-
var containerProps =
|
|
491
|
+
var containerProps = mergeProps({
|
|
490
492
|
ref: listRef,
|
|
491
493
|
className: cx('container', {
|
|
492
494
|
focusedState: focusedState
|
|
@@ -503,7 +505,7 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
503
505
|
var otherProps = ChipsBase.getOtherProps(props);
|
|
504
506
|
var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
|
|
505
507
|
var list = createList();
|
|
506
|
-
var rootProps =
|
|
508
|
+
var rootProps = mergeProps({
|
|
507
509
|
id: props.id,
|
|
508
510
|
ref: elementRef,
|
|
509
511
|
className: utils.classNames(props.className, cx('root', {
|
package/chips/chips.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/hooks"),o=require("primereact/icons/timescircle"),i=require("primereact/keyfilter"),l=require("primereact/tooltip"),a=require("primereact/utils");function u(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 c=u(e);function p(){return p=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},p.apply(this,arguments)}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,n){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function d(e){var n=f(e,"string");return"symbol"===s(n)?n:String(n)}function m(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 y(e){if(Array.isArray(e))return m(e)}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(e,n){if(e){if("string"==typeof e)return m(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)?m(e,n):void 0}}function h(){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 g(e){return y(e)||v(e)||b(e)||h()}function O(e){if(Array.isArray(e))return e}function w(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,l,a=[],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)&&(a.push(r.value),a.length!==n);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw o}}return a}}function P(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var k=t.ComponentBase.extend({defaultProps:{__TYPE:"Chips",addOnBlur:null,allowDuplicate:!0,ariaLabelledBy:null,autoFocus:!1,className:null,disabled:null,id:null,inputId:null,inputRef:null,itemTemplate:null,keyfilter:null,max:null,name:null,onAdd:null,onBlur:null,onChange:null,onFocus:null,onKeyDown:null,onRemove:null,placeholder:null,readOnly:!1,removable:!0,removeIcon:null,separator:null,style:null,tooltip:null,tooltipOptions:null,value:null,children:void 0},css:{classes:{removeTokenIcon:"p-chips-token-icon",label:"p-chips-token-label",token:"p-chips-token p-highlight",inputToken:"p-chips-input-token",container:function(e){return a.classNames("p-inputtext p-chips-multiple-container",{"p-disabled":e.props.disabled,"p-focus":e.focusedState})},root:function(e){return a.classNames("p-chips p-component p-inputwrapper",{"p-inputwrapper-filled":e.isFilled,"p-inputwrapper-focus":e.focusedState})}},styles:"\n@layer primereact {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n \n .p-chips-icon-left,\n .p-chips-icon-right {\n position: relative;\n display: inline-block;\n }\n \n .p-chips-icon-left > i,\n .p-chips-icon-right > i,\n .p-chips-icon-left > svg,\n .p-chips-icon-right > svg,\n .p-chips-icon-left > .p-chips-prefix,\n .p-chips-icon-right > .p-chips-suffix {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n }\n \n .p-fluid .p-chips-icon-left,\n .p-fluid .p-chips-icon-right {\n display: block;\n width: 100%;\n }\n}\n"}});function j(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 x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){var r,o,i;r=e,i=t[n],(o=d(o=n))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var D=c.memo(c.forwardRef((function(e,u){var s,f,d=c.useContext(n.PrimeReactContext),m=k.getProps(e,d),y=c.useState(!1),v=(f=2,O(s=y)||w(s,f)||b(s,f)||P()),h=v[0],j=v[1],D=k.setMetaData({props:m,state:{focused:h}}),E=D.ptm,S=D.cx;t.useHandleStyle(k.css.styles,D.isUnstyled,{name:"chips"});var I=c.useRef(null),N=c.useRef(null),T=c.useRef(m.inputRef),A=function(e,n){if(!m.disabled||!m.readOnly){var t=g(m.value),r=t.splice(n,1);_(r,n)&&(m.onRemove&&m.onRemove({originalEvent:e,value:r}),m.onChange&&m.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:m.name,id:m.id,value:t}}))}},C=function(e,n,t){if(n&&n.trim().length){var r=m.value?g(m.value):[];if(m.allowDuplicate||-1===r.indexOf(n)){var o=!0;m.onAdd&&(o=m.onAdd({originalEvent:e,value:n})),!1!==o&&r.push(n)}F(e,r,t)}},R=function(e){var n=e.target.value,t=m.value||[];if(m.onKeyDown&&m.onKeyDown(e),!e.defaultPrevented)switch(e.key){case"Backspace":0===T.current.value.length&&t.length>0&&A(e,t.length-1);break;case"Enter":n&&n.trim().length&&(!m.max||m.max>t.length)&&C(e,n,!0);break;default:m.keyfilter&&i.KeyFilter.onKeyPress(e,m.keyfilter),q()?e.preventDefault():","===m.separator&&(e.key===m.separator||a.DomHandler.isAndroid()&&229===e.which)&&C(e,n,!0)}},F=function(e,n,t){m.onChange&&m.onChange({originalEvent:e,value:n,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:m.name,id:m.id,value:n}}),T.current.value="",t&&e.preventDefault()},B=function(e){if(m.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(m.keyfilter&&i.KeyFilter.onPaste(e,m.keyfilter),n){var t=m.value||[],r=n.split(m.separator);r=r.filter((function(e){return(m.allowDuplicate||-1===t.indexOf(e))&&e.trim().length})),t=[].concat(g(t),g(r)),F(e,t,!0)}}},U=function(e){if(m.addOnBlur){var n=e.target.value,t=m.value||[];n&&n.trim().length&&(!m.max||m.max>t.length)&&C(e,n,!0)}j(!1),m.onBlur&&m.onBlur(e)},q=function(){return m.max&&m.value&&m.max===m.value.length},K=T.current&&T.current.value,H=c.useMemo((function(){return a.ObjectUtils.isNotEmpty(m.value)||a.ObjectUtils.isNotEmpty(K)}),[m.value,K]),_=function(e,n){return a.ObjectUtils.getPropValue(m.removable,{value:e,index:n,props:m})};c.useImperativeHandle(u,(function(){return{props:m,focus:function(){return a.DomHandler.focus(T.current)},getElement:function(){return I.current},getInput:function(){return T.current}}})),c.useEffect((function(){a.ObjectUtils.combinedRefs(T,m.inputRef)}),[T,m.inputRef]),r.useMountEffect((function(){m.autoFocus&&a.DomHandler.focus(T.current,m.autoFocus)}));var M,z,J,L,V,X=function(e,n){var t=a.mergeProps({className:S("removeTokenIcon"),onClick:function(e){return A(e,n)}},E("removeTokenIcon")),r=a.IconUtils.getJSXIcon(m.removeIcon||c.createElement(o.TimesCircleIcon,t),x({},t),{props:m});return m.disabled||m.readOnly||!_(e,n)?null:r},Y=function(e,n){var t=m.itemTemplate?m.itemTemplate(e):e,r=a.mergeProps({className:S("label")},E("label")),o=c.createElement("span",r,t),i=X(e,n),l=a.mergeProps({key:n,className:S("token"),"data-p-highlight":!0},E("token"));return c.createElement("li",l,o,i)},$=a.ObjectUtils.isNotEmpty(m.tooltip),G=k.getOtherProps(m),Q=a.ObjectUtils.reduceKeys(G,a.DomHandler.ARIA_PROPS),W=(J=m.value?m.value.map(Y):null,M=a.mergeProps({className:S("inputToken")},E("inputToken")),z=a.mergeProps(x({id:m.inputId,ref:T,placeholder:m.placeholder,type:"text",name:m.name,disabled:m.disabled||q(),onKeyDown:function(e){return R(e)},onPaste:function(e){return B(e)},onFocus:function(e){return n=e,j(!0),void(m.onFocus&&m.onFocus(n));var n},onBlur:function(e){return U(e)},readOnly:m.readOnly},Q),E("input")),L=c.createElement("li",M,c.createElement("input",z)),V=a.mergeProps({ref:N,className:S("container",{focusedState:h}),onClick:function(e){a.DomHandler.focus(T.current)},"data-p-disabled":m.disabled,"data-p-focus":h},E("container")),c.createElement("ul",V,J,L)),Z=a.mergeProps({id:m.id,ref:I,className:a.classNames(m.className,S("root",{isFilled:H,focusedState:h})),style:m.style},E("root"));return c.createElement(c.Fragment,null,c.createElement("div",Z,W),$&&c.createElement(l.Tooltip,p({target:T,content:m.tooltip},m.tooltipOptions,{pt:E("tooltip")})))})));D.displayName="Chips",exports.Chips=D;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/hooks"),o=require("primereact/icons/timescircle"),i=require("primereact/keyfilter"),l=require("primereact/tooltip"),a=require("primereact/utils");function u(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 c=u(e);function p(){return p=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},p.apply(this,arguments)}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,n){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function d(e){var n=f(e,"string");return"symbol"===s(n)?n:String(n)}function m(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 y(e){if(Array.isArray(e))return m(e)}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(e,n){if(e){if("string"==typeof e)return m(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)?m(e,n):void 0}}function h(){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 g(e){return y(e)||v(e)||b(e)||h()}function O(e){if(Array.isArray(e))return e}function w(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,l,a=[],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)&&(a.push(r.value),a.length!==n);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw o}}return a}}function k(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var j=t.ComponentBase.extend({defaultProps:{__TYPE:"Chips",addOnBlur:null,allowDuplicate:!0,ariaLabelledBy:null,autoFocus:!1,className:null,disabled:null,id:null,inputId:null,inputRef:null,itemTemplate:null,keyfilter:null,max:null,name:null,onAdd:null,onBlur:null,onChange:null,onFocus:null,onKeyDown:null,onRemove:null,placeholder:null,readOnly:!1,removable:!0,removeIcon:null,separator:null,style:null,tooltip:null,tooltipOptions:null,value:null,children:void 0},css:{classes:{removeTokenIcon:"p-chips-token-icon",label:"p-chips-token-label",token:"p-chips-token p-highlight",inputToken:"p-chips-input-token",container:function(e){return a.classNames("p-inputtext p-chips-multiple-container",{"p-disabled":e.props.disabled,"p-focus":e.focusedState})},root:function(e){return a.classNames("p-chips p-component p-inputwrapper",{"p-inputwrapper-filled":e.isFilled,"p-inputwrapper-focus":e.focusedState})}},styles:"\n@layer primereact {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n \n .p-chips-icon-left,\n .p-chips-icon-right {\n position: relative;\n display: inline-block;\n }\n \n .p-chips-icon-left > i,\n .p-chips-icon-right > i,\n .p-chips-icon-left > svg,\n .p-chips-icon-right > svg,\n .p-chips-icon-left > .p-chips-prefix,\n .p-chips-icon-right > .p-chips-suffix {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n }\n \n .p-fluid .p-chips-icon-left,\n .p-fluid .p-chips-icon-right {\n display: block;\n width: 100%;\n }\n}\n"}});function x(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?x(Object(t),!0).forEach((function(n){var r,o,i;r=e,i=t[n],(o=d(o=n))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var D=c.memo(c.forwardRef((function(e,u){var s,f,d=r.useMergeProps(),m=c.useContext(n.PrimeReactContext),y=j.getProps(e,m),v=c.useState(!1),h=(f=2,O(s=v)||w(s,f)||b(s,f)||k()),x=h[0],D=h[1],E=j.setMetaData({props:y,state:{focused:x}}),S=E.ptm,I=E.cx;t.useHandleStyle(j.css.styles,E.isUnstyled,{name:"chips"});var N=c.useRef(null),T=c.useRef(null),A=c.useRef(y.inputRef),C=function(e,n){if(!y.disabled||!y.readOnly){var t=g(y.value),r=t.splice(n,1);_(r,n)&&(y.onRemove&&y.onRemove({originalEvent:e,value:r}),y.onChange&&y.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:y.name,id:y.id,value:t}}))}},R=function(e,n,t){if(n&&n.trim().length){var r=y.value?g(y.value):[];if(y.allowDuplicate||-1===r.indexOf(n)){var o=!0;y.onAdd&&(o=y.onAdd({originalEvent:e,value:n})),!1!==o&&r.push(n)}B(e,r,t)}},F=function(e){var n=e.target.value,t=y.value||[];if(y.onKeyDown&&y.onKeyDown(e),!e.defaultPrevented)switch(e.key){case"Backspace":0===A.current.value.length&&t.length>0&&C(e,t.length-1);break;case"Enter":n&&n.trim().length&&(!y.max||y.max>t.length)&&R(e,n,!0);break;default:y.keyfilter&&i.KeyFilter.onKeyPress(e,y.keyfilter),K()?e.preventDefault():","===y.separator&&(e.key===y.separator||a.DomHandler.isAndroid()&&229===e.which)&&R(e,n,!0)}},B=function(e,n,t){y.onChange&&y.onChange({originalEvent:e,value:n,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:y.name,id:y.id,value:n}}),A.current.value="",t&&e.preventDefault()},U=function(e){if(y.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(y.keyfilter&&i.KeyFilter.onPaste(e,y.keyfilter),n){var t=y.value||[],r=n.split(y.separator);r=r.filter((function(e){return(y.allowDuplicate||-1===t.indexOf(e))&&e.trim().length})),t=[].concat(g(t),g(r)),B(e,t,!0)}}},q=function(e){if(y.addOnBlur){var n=e.target.value,t=y.value||[];n&&n.trim().length&&(!y.max||y.max>t.length)&&R(e,n,!0)}D(!1),y.onBlur&&y.onBlur(e)},K=function(){return y.max&&y.value&&y.max===y.value.length},H=A.current&&A.current.value,M=c.useMemo((function(){return a.ObjectUtils.isNotEmpty(y.value)||a.ObjectUtils.isNotEmpty(H)}),[y.value,H]),_=function(e,n){return a.ObjectUtils.getPropValue(y.removable,{value:e,index:n,props:y})};c.useImperativeHandle(u,(function(){return{props:y,focus:function(){return a.DomHandler.focus(A.current)},getElement:function(){return N.current},getInput:function(){return A.current}}})),c.useEffect((function(){a.ObjectUtils.combinedRefs(A,y.inputRef)}),[A,y.inputRef]),r.useMountEffect((function(){y.autoFocus&&a.DomHandler.focus(A.current,y.autoFocus)}));var z,J,L,V,X,Y=function(e,n){var t=d({className:I("removeTokenIcon"),onClick:function(e){return C(e,n)},"aria-hidden":"true"},S("removeTokenIcon")),r=a.IconUtils.getJSXIcon(y.removeIcon||c.createElement(o.TimesCircleIcon,t),P({},t),{props:y});return y.disabled||y.readOnly||!_(e,n)?null:r},$=function(e,n){var t=y.itemTemplate?y.itemTemplate(e):e,r=d({className:I("label")},S("label")),o=c.createElement("span",r,t),i=Y(e,n),l=d({key:n,className:I("token"),"data-p-highlight":!0},S("token"));return c.createElement("li",l,o,i)},G=a.ObjectUtils.isNotEmpty(y.tooltip),Q=j.getOtherProps(y),W=a.ObjectUtils.reduceKeys(Q,a.DomHandler.ARIA_PROPS),Z=(L=y.value?y.value.map($):null,z=d({className:I("inputToken")},S("inputToken")),J=d(P({id:y.inputId,ref:A,placeholder:y.placeholder,type:"text",name:y.name,disabled:y.disabled||K(),onKeyDown:function(e){return F(e)},onPaste:function(e){return U(e)},onFocus:function(e){return n=e,D(!0),void(y.onFocus&&y.onFocus(n));var n},onBlur:function(e){return q(e)},readOnly:y.readOnly},W),S("input")),V=c.createElement("li",z,c.createElement("input",J)),X=d({ref:T,className:I("container",{focusedState:x}),onClick:function(e){a.DomHandler.focus(A.current)},"data-p-disabled":y.disabled,"data-p-focus":x},S("container")),c.createElement("ul",X,L,V)),ee=d({id:y.id,ref:N,className:a.classNames(y.className,I("root",{isFilled:M,focusedState:x})),style:y.style},S("root"));return c.createElement(c.Fragment,null,c.createElement("div",ee,Z),G&&c.createElement(l.Tooltip,p({target:A,content:y.tooltip},y.tooltipOptions,{pt:S("tooltip")})))})));D.displayName="Chips",exports.Chips=D;
|
package/chips/chips.esm.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { PrimeReactContext } from 'primereact/api';
|
|
4
4
|
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
5
|
-
import { useMountEffect } from 'primereact/hooks';
|
|
5
|
+
import { useMergeProps, useMountEffect } from 'primereact/hooks';
|
|
6
6
|
import { TimesCircleIcon } from 'primereact/icons/timescircle';
|
|
7
7
|
import { KeyFilter } from 'primereact/keyfilter';
|
|
8
8
|
import { Tooltip } from 'primereact/tooltip';
|
|
9
|
-
import { classNames, ObjectUtils, DomHandler,
|
|
9
|
+
import { classNames, ObjectUtils, DomHandler, IconUtils } from 'primereact/utils';
|
|
10
10
|
|
|
11
11
|
function _extends() {
|
|
12
12
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -200,6 +200,7 @@ var ChipsBase = ComponentBase.extend({
|
|
|
200
200
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
201
201
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
202
202
|
var Chips = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
203
|
+
var mergeProps = useMergeProps();
|
|
203
204
|
var context = React.useContext(PrimeReactContext);
|
|
204
205
|
var props = ChipsBase.getProps(inProps, context);
|
|
205
206
|
var _React$useState = React.useState(false),
|
|
@@ -404,7 +405,8 @@ var Chips = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inP
|
|
|
404
405
|
className: cx('removeTokenIcon'),
|
|
405
406
|
onClick: function onClick(event) {
|
|
406
407
|
return removeItem(event, index);
|
|
407
|
-
}
|
|
408
|
+
},
|
|
409
|
+
'aria-hidden': 'true'
|
|
408
410
|
}, ptm('removeTokenIcon'));
|
|
409
411
|
var icon = props.removeIcon || /*#__PURE__*/React.createElement(TimesCircleIcon, iconProps);
|
|
410
412
|
var removeIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, iconProps), {
|
package/chips/chips.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{PrimeReactContext as n}from"primereact/api";import{ComponentBase as t,useHandleStyle as r}from"primereact/componentbase";import{useMountEffect as
|
|
1
|
+
import*as e from"react";import{PrimeReactContext as n}from"primereact/api";import{ComponentBase as t,useHandleStyle as r}from"primereact/componentbase";import{useMergeProps as o,useMountEffect as i}from"primereact/hooks";import{TimesCircleIcon as l}from"primereact/icons/timescircle";import{KeyFilter as a}from"primereact/keyfilter";import{Tooltip as u}from"primereact/tooltip";import{classNames as c,ObjectUtils as p,DomHandler as s,IconUtils as f}from"primereact/utils";function m(){return m=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},m.apply(this,arguments)}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 y(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 v(e){var n=y(e,"string");return"symbol"===d(n)?n:String(n)}function h(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 b(e){if(Array.isArray(e))return h(e)}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e,n){if(e){if("string"==typeof e)return h(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)?h(e,n):void 0}}function w(){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 k(e){return b(e)||g(e)||O(e)||w()}function x(e){if(Array.isArray(e))return e}function P(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,l,a=[],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)&&(a.push(r.value),a.length!==n);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw o}}return a}}function E(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var S=t.extend({defaultProps:{__TYPE:"Chips",addOnBlur:null,allowDuplicate:!0,ariaLabelledBy:null,autoFocus:!1,className:null,disabled:null,id:null,inputId:null,inputRef:null,itemTemplate:null,keyfilter:null,max:null,name:null,onAdd:null,onBlur:null,onChange:null,onFocus:null,onKeyDown:null,onRemove:null,placeholder:null,readOnly:!1,removable:!0,removeIcon:null,separator:null,style:null,tooltip:null,tooltipOptions:null,value:null,children:void 0},css:{classes:{removeTokenIcon:"p-chips-token-icon",label:"p-chips-token-label",token:"p-chips-token p-highlight",inputToken:"p-chips-input-token",container:function(e){return c("p-inputtext p-chips-multiple-container",{"p-disabled":e.props.disabled,"p-focus":e.focusedState})},root:function(e){return c("p-chips p-component p-inputwrapper",{"p-inputwrapper-filled":e.isFilled,"p-inputwrapper-focus":e.focusedState})}},styles:"\n@layer primereact {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n \n .p-chips-icon-left,\n .p-chips-icon-right {\n position: relative;\n display: inline-block;\n }\n \n .p-chips-icon-left > i,\n .p-chips-icon-right > i,\n .p-chips-icon-left > svg,\n .p-chips-icon-right > svg,\n .p-chips-icon-left > .p-chips-prefix,\n .p-chips-icon-right > .p-chips-suffix {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n }\n \n .p-fluid .p-chips-icon-left,\n .p-fluid .p-chips-icon-right {\n display: block;\n width: 100%;\n }\n}\n"}});function j(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 D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){var r,o,i;r=e,i=t[n],(o=v(o=n))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=e.memo(e.forwardRef((function(t,d){var y,v,h=o(),b=e.useContext(n),g=S.getProps(t,b),w=e.useState(!1),j=(v=2,x(y=w)||P(y,v)||O(y,v)||E()),I=j[0],A=j[1],R=S.setMetaData({props:g,state:{focused:I}}),T=R.ptm,N=R.cx;r(S.css.styles,R.isUnstyled,{name:"chips"});var C=e.useRef(null),F=e.useRef(null),B=e.useRef(g.inputRef),K=function(e,n){if(!g.disabled||!g.readOnly){var t=k(g.value),r=t.splice(n,1);Y(r,n)&&(g.onRemove&&g.onRemove({originalEvent:e,value:r}),g.onChange&&g.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:g.name,id:g.id,value:t}}))}},M=function(e,n,t){if(n&&n.trim().length){var r=g.value?k(g.value):[];if(g.allowDuplicate||-1===r.indexOf(n)){var o=!0;g.onAdd&&(o=g.onAdd({originalEvent:e,value:n})),!1!==o&&r.push(n)}U(e,r,t)}},_=function(e){var n=e.target.value,t=g.value||[];if(g.onKeyDown&&g.onKeyDown(e),!e.defaultPrevented)switch(e.key){case"Backspace":0===B.current.value.length&&t.length>0&&K(e,t.length-1);break;case"Enter":n&&n.trim().length&&(!g.max||g.max>t.length)&&M(e,n,!0);break;default:g.keyfilter&&a.onKeyPress(e,g.keyfilter),L()?e.preventDefault():","===g.separator&&(e.key===g.separator||s.isAndroid()&&229===e.which)&&M(e,n,!0)}},U=function(e,n,t){g.onChange&&g.onChange({originalEvent:e,value:n,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:g.name,id:g.id,value:n}}),B.current.value="",t&&e.preventDefault()},H=function(e){if(g.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(g.keyfilter&&a.onPaste(e,g.keyfilter),n){var t=g.value||[],r=n.split(g.separator);r=r.filter((function(e){return(g.allowDuplicate||-1===t.indexOf(e))&&e.trim().length})),t=[].concat(k(t),k(r)),U(e,t,!0)}}},J=function(e){if(g.addOnBlur){var n=e.target.value,t=g.value||[];n&&n.trim().length&&(!g.max||g.max>t.length)&&M(e,n,!0)}A(!1),g.onBlur&&g.onBlur(e)},L=function(){return g.max&&g.value&&g.max===g.value.length},V=B.current&&B.current.value,X=e.useMemo((function(){return p.isNotEmpty(g.value)||p.isNotEmpty(V)}),[g.value,V]),Y=function(e,n){return p.getPropValue(g.removable,{value:e,index:n,props:g})};e.useImperativeHandle(d,(function(){return{props:g,focus:function(){return s.focus(B.current)},getElement:function(){return C.current},getInput:function(){return B.current}}})),e.useEffect((function(){p.combinedRefs(B,g.inputRef)}),[B,g.inputRef]),i((function(){g.autoFocus&&s.focus(B.current,g.autoFocus)}));var $,q,z,G,Q,W=function(n,t){var r=h({className:N("removeTokenIcon"),onClick:function(e){return K(e,t)},"aria-hidden":"true"},T("removeTokenIcon")),o=f.getJSXIcon(g.removeIcon||e.createElement(l,r),D({},r),{props:g});return g.disabled||g.readOnly||!Y(n,t)?null:o},Z=function(n,t){var r=g.itemTemplate?g.itemTemplate(n):n,o=h({className:N("label")},T("label")),i=e.createElement("span",o,r),l=W(n,t),a=h({key:t,className:N("token"),"data-p-highlight":!0},T("token"));return e.createElement("li",a,i,l)},ee=p.isNotEmpty(g.tooltip),ne=S.getOtherProps(g),te=p.reduceKeys(ne,s.ARIA_PROPS),re=(z=g.value?g.value.map(Z):null,$=h({className:N("inputToken")},T("inputToken")),q=h(D({id:g.inputId,ref:B,placeholder:g.placeholder,type:"text",name:g.name,disabled:g.disabled||L(),onKeyDown:function(e){return _(e)},onPaste:function(e){return H(e)},onFocus:function(e){return n=e,A(!0),void(g.onFocus&&g.onFocus(n));var n},onBlur:function(e){return J(e)},readOnly:g.readOnly},te),T("input")),G=e.createElement("li",$,e.createElement("input",q)),Q=h({ref:F,className:N("container",{focusedState:I}),onClick:function(e){s.focus(B.current)},"data-p-disabled":g.disabled,"data-p-focus":I},T("container")),e.createElement("ul",Q,z,G)),oe=h({id:g.id,ref:C,className:c(g.className,N("root",{isFilled:X,focusedState:I})),style:g.style},T("root"));return e.createElement(e.Fragment,null,e.createElement("div",oe,re),ee&&e.createElement(u,m({target:B,content:g.tooltip},g.tooltipOptions,{pt:T("tooltip")})))})));I.displayName="Chips";export{I as Chips};
|
package/chips/chips.js
CHANGED
|
@@ -214,6 +214,7 @@ this.primereact.chips = (function (exports, React, api, componentbase, hooks, ti
|
|
|
214
214
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
215
215
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
216
216
|
var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
217
|
+
var mergeProps = hooks.useMergeProps();
|
|
217
218
|
var context = React__namespace.useContext(api.PrimeReactContext);
|
|
218
219
|
var props = ChipsBase.getProps(inProps, context);
|
|
219
220
|
var _React$useState = React__namespace.useState(false),
|
|
@@ -414,11 +415,12 @@ this.primereact.chips = (function (exports, React, api, componentbase, hooks, ti
|
|
|
414
415
|
}
|
|
415
416
|
});
|
|
416
417
|
var createRemoveIcon = function createRemoveIcon(value, index) {
|
|
417
|
-
var iconProps =
|
|
418
|
+
var iconProps = mergeProps({
|
|
418
419
|
className: cx('removeTokenIcon'),
|
|
419
420
|
onClick: function onClick(event) {
|
|
420
421
|
return removeItem(event, index);
|
|
421
|
-
}
|
|
422
|
+
},
|
|
423
|
+
'aria-hidden': 'true'
|
|
422
424
|
}, ptm('removeTokenIcon'));
|
|
423
425
|
var icon = props.removeIcon || /*#__PURE__*/React__namespace.createElement(timescircle.TimesCircleIcon, iconProps);
|
|
424
426
|
var removeIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, iconProps), {
|
|
@@ -431,12 +433,12 @@ this.primereact.chips = (function (exports, React, api, componentbase, hooks, ti
|
|
|
431
433
|
};
|
|
432
434
|
var createItem = function createItem(value, index) {
|
|
433
435
|
var content = props.itemTemplate ? props.itemTemplate(value) : value;
|
|
434
|
-
var labelProps =
|
|
436
|
+
var labelProps = mergeProps({
|
|
435
437
|
className: cx('label')
|
|
436
438
|
}, ptm('label'));
|
|
437
439
|
var label = /*#__PURE__*/React__namespace.createElement("span", labelProps, content);
|
|
438
440
|
var icon = createRemoveIcon(value, index);
|
|
439
|
-
var tokenProps =
|
|
441
|
+
var tokenProps = mergeProps({
|
|
440
442
|
key: index,
|
|
441
443
|
className: cx('token'),
|
|
442
444
|
'data-p-highlight': true
|
|
@@ -444,10 +446,10 @@ this.primereact.chips = (function (exports, React, api, componentbase, hooks, ti
|
|
|
444
446
|
return /*#__PURE__*/React__namespace.createElement("li", tokenProps, label, icon);
|
|
445
447
|
};
|
|
446
448
|
var createInput = function createInput() {
|
|
447
|
-
var inputTokenProps =
|
|
449
|
+
var inputTokenProps = mergeProps({
|
|
448
450
|
className: cx('inputToken')
|
|
449
451
|
}, ptm('inputToken'));
|
|
450
|
-
var inputProps =
|
|
452
|
+
var inputProps = mergeProps(_objectSpread({
|
|
451
453
|
id: props.inputId,
|
|
452
454
|
ref: inputRef,
|
|
453
455
|
placeholder: props.placeholder,
|
|
@@ -476,7 +478,7 @@ this.primereact.chips = (function (exports, React, api, componentbase, hooks, ti
|
|
|
476
478
|
var createList = function createList() {
|
|
477
479
|
var items = createItems();
|
|
478
480
|
var input = createInput();
|
|
479
|
-
var containerProps =
|
|
481
|
+
var containerProps = mergeProps({
|
|
480
482
|
ref: listRef,
|
|
481
483
|
className: cx('container', {
|
|
482
484
|
focusedState: focusedState
|
|
@@ -493,7 +495,7 @@ this.primereact.chips = (function (exports, React, api, componentbase, hooks, ti
|
|
|
493
495
|
var otherProps = ChipsBase.getOtherProps(props);
|
|
494
496
|
var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
|
|
495
497
|
var list = createList();
|
|
496
|
-
var rootProps =
|
|
498
|
+
var rootProps = mergeProps({
|
|
497
499
|
id: props.id,
|
|
498
500
|
ref: elementRef,
|
|
499
501
|
className: utils.classNames(props.className, cx('root', {
|
package/chips/chips.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.chips=function(e,n,t,r,o,i,l,a,u){"use strict";function c(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=c(n);function s(){return s=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},s.apply(this,arguments)}function f(e){return f="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},f(e)}function m(e,n){if("object"!==f(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function d(e){var n=m(e,"string");return"symbol"===f(n)?n:String(n)}function y(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 v(e){if(Array.isArray(e))return y(e)}function b(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 y(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)?y(e,n):void 0}}function g(){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 O(e){return v(e)||b(e)||h(e)||g()}function w(e){if(Array.isArray(e))return e}function P(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,l,a=[],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)&&(a.push(r.value),a.length!==n);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw o}}return a}}function k(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var j=r.ComponentBase.extend({defaultProps:{__TYPE:"Chips",addOnBlur:null,allowDuplicate:!0,ariaLabelledBy:null,autoFocus:!1,className:null,disabled:null,id:null,inputId:null,inputRef:null,itemTemplate:null,keyfilter:null,max:null,name:null,onAdd:null,onBlur:null,onChange:null,onFocus:null,onKeyDown:null,onRemove:null,placeholder:null,readOnly:!1,removable:!0,removeIcon:null,separator:null,style:null,tooltip:null,tooltipOptions:null,value:null,children:void 0},css:{classes:{removeTokenIcon:"p-chips-token-icon",label:"p-chips-token-label",token:"p-chips-token p-highlight",inputToken:"p-chips-input-token",container:function(e){return u.classNames("p-inputtext p-chips-multiple-container",{"p-disabled":e.props.disabled,"p-focus":e.focusedState})},root:function(e){return u.classNames("p-chips p-component p-inputwrapper",{"p-inputwrapper-filled":e.isFilled,"p-inputwrapper-focus":e.focusedState})}},styles:"\n@layer primereact {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n \n .p-chips-icon-left,\n .p-chips-icon-right {\n position: relative;\n display: inline-block;\n }\n \n .p-chips-icon-left > i,\n .p-chips-icon-right > i,\n .p-chips-icon-left > svg,\n .p-chips-icon-right > svg,\n .p-chips-icon-left > .p-chips-prefix,\n .p-chips-icon-right > .p-chips-suffix {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n }\n \n .p-fluid .p-chips-icon-left,\n .p-fluid .p-chips-icon-right {\n display: block;\n width: 100%;\n }\n}\n"}});function x(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 D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){var r,o,i;r=e,i=t[n],(o=d(o=n))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var E=p.memo(p.forwardRef((function(e,n){var c,f,m=p.useContext(t.PrimeReactContext),d=j.getProps(e,m),y=p.useState(!1),v=(f=2,w(c=y)||P(c,f)||h(c,f)||k()),b=v[0],g=v[1],x=j.setMetaData({props:d,state:{focused:b}}),E=x.ptm,S=x.cx;r.useHandleStyle(j.css.styles,x.isUnstyled,{name:"chips"});var I=p.useRef(null),N=p.useRef(null),R=p.useRef(d.inputRef),T=function(e,n){if(!d.disabled||!d.readOnly){var t=O(d.value),r=t.splice(n,1);M(r,n)&&(d.onRemove&&d.onRemove({originalEvent:e,value:r}),d.onChange&&d.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:d.name,id:d.id,value:t}}))}},A=function(e,n,t){if(n&&n.trim().length){var r=d.value?O(d.value):[];if(d.allowDuplicate||-1===r.indexOf(n)){var o=!0;d.onAdd&&(o=d.onAdd({originalEvent:e,value:n})),!1!==o&&r.push(n)}F(e,r,t)}},C=function(e){var n=e.target.value,t=d.value||[];if(d.onKeyDown&&d.onKeyDown(e),!e.defaultPrevented)switch(e.key){case"Backspace":0===R.current.value.length&&t.length>0&&T(e,t.length-1);break;case"Enter":n&&n.trim().length&&(!d.max||d.max>t.length)&&A(e,n,!0);break;default:d.keyfilter&&l.KeyFilter.onKeyPress(e,d.keyfilter),K()?e.preventDefault():","===d.separator&&(e.key===d.separator||u.DomHandler.isAndroid()&&229===e.which)&&A(e,n,!0)}},F=function(e,n,t){d.onChange&&d.onChange({originalEvent:e,value:n,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:d.name,id:d.id,value:n}}),R.current.value="",t&&e.preventDefault()},B=function(e){if(d.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(d.keyfilter&&l.KeyFilter.onPaste(e,d.keyfilter),n){var t=d.value||[],r=n.split(d.separator);r=r.filter((function(e){return(d.allowDuplicate||-1===t.indexOf(e))&&e.trim().length})),t=[].concat(O(t),O(r)),F(e,t,!0)}}},U=function(e){if(d.addOnBlur){var n=e.target.value,t=d.value||[];n&&n.trim().length&&(!d.max||d.max>t.length)&&A(e,n,!0)}g(!1),d.onBlur&&d.onBlur(e)},K=function(){return d.max&&d.value&&d.max===d.value.length},H=R.current&&R.current.value,_=p.useMemo((function(){return u.ObjectUtils.isNotEmpty(d.value)||u.ObjectUtils.isNotEmpty(H)}),[d.value,H]),M=function(e,n){return u.ObjectUtils.getPropValue(d.removable,{value:e,index:n,props:d})};p.useImperativeHandle(n,(function(){return{props:d,focus:function(){return u.DomHandler.focus(R.current)},getElement:function(){return I.current},getInput:function(){return R.current}}})),p.useEffect((function(){u.ObjectUtils.combinedRefs(R,d.inputRef)}),[R,d.inputRef]),o.useMountEffect((function(){d.autoFocus&&u.DomHandler.focus(R.current,d.autoFocus)}));var z,J,L,V,X,Y=function(e,n){var t=u.mergeProps({className:S("removeTokenIcon"),onClick:function(e){return T(e,n)}},E("removeTokenIcon")),r=u.IconUtils.getJSXIcon(d.removeIcon||p.createElement(i.TimesCircleIcon,t),D({},t),{props:d});return d.disabled||d.readOnly||!M(e,n)?null:r},$=function(e,n){var t=d.itemTemplate?d.itemTemplate(e):e,r=u.mergeProps({className:S("label")},E("label")),o=p.createElement("span",r,t),i=Y(e,n),l=u.mergeProps({key:n,className:S("token"),"data-p-highlight":!0},E("token"));return p.createElement("li",l,o,i)},q=u.ObjectUtils.isNotEmpty(d.tooltip),G=j.getOtherProps(d),Q=u.ObjectUtils.reduceKeys(G,u.DomHandler.ARIA_PROPS),W=(L=d.value?d.value.map($):null,z=u.mergeProps({className:S("inputToken")},E("inputToken")),J=u.mergeProps(D({id:d.inputId,ref:R,placeholder:d.placeholder,type:"text",name:d.name,disabled:d.disabled||K(),onKeyDown:function(e){return C(e)},onPaste:function(e){return B(e)},onFocus:function(e){return n=e,g(!0),void(d.onFocus&&d.onFocus(n));var n},onBlur:function(e){return U(e)},readOnly:d.readOnly},Q),E("input")),V=p.createElement("li",z,p.createElement("input",J)),X=u.mergeProps({ref:N,className:S("container",{focusedState:b}),onClick:function(e){u.DomHandler.focus(R.current)},"data-p-disabled":d.disabled,"data-p-focus":b},E("container")),p.createElement("ul",X,L,V)),Z=u.mergeProps({id:d.id,ref:I,className:u.classNames(d.className,S("root",{isFilled:_,focusedState:b})),style:d.style},E("root"));return p.createElement(p.Fragment,null,p.createElement("div",Z,W),q&&p.createElement(a.Tooltip,s({target:R,content:d.tooltip},d.tooltipOptions,{pt:E("tooltip")})))})));return E.displayName="Chips",e.Chips=E,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.hooks,primereact.icons.timescircle,primereact.keyfilter,primereact.tooltip,primereact.utils);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.chips=function(e,n,t,r,o,i,l,a,u){"use strict";function c(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=c(n);function s(){return s=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},s.apply(this,arguments)}function f(e){return f="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},f(e)}function d(e,n){if("object"!==f(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function m(e){var n=d(e,"string");return"symbol"===f(n)?n:String(n)}function y(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 v(e){if(Array.isArray(e))return y(e)}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(e,n){if(e){if("string"==typeof e)return y(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)?y(e,n):void 0}}function g(){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 O(e){return v(e)||h(e)||b(e)||g()}function w(e){if(Array.isArray(e))return e}function k(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,l,a=[],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)&&(a.push(r.value),a.length!==n);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw o}}return a}}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.")}var P=r.ComponentBase.extend({defaultProps:{__TYPE:"Chips",addOnBlur:null,allowDuplicate:!0,ariaLabelledBy:null,autoFocus:!1,className:null,disabled:null,id:null,inputId:null,inputRef:null,itemTemplate:null,keyfilter:null,max:null,name:null,onAdd:null,onBlur:null,onChange:null,onFocus:null,onKeyDown:null,onRemove:null,placeholder:null,readOnly:!1,removable:!0,removeIcon:null,separator:null,style:null,tooltip:null,tooltipOptions:null,value:null,children:void 0},css:{classes:{removeTokenIcon:"p-chips-token-icon",label:"p-chips-token-label",token:"p-chips-token p-highlight",inputToken:"p-chips-input-token",container:function(e){return u.classNames("p-inputtext p-chips-multiple-container",{"p-disabled":e.props.disabled,"p-focus":e.focusedState})},root:function(e){return u.classNames("p-chips p-component p-inputwrapper",{"p-inputwrapper-filled":e.isFilled,"p-inputwrapper-focus":e.focusedState})}},styles:"\n@layer primereact {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n \n .p-chips-icon-left,\n .p-chips-icon-right {\n position: relative;\n display: inline-block;\n }\n \n .p-chips-icon-left > i,\n .p-chips-icon-right > i,\n .p-chips-icon-left > svg,\n .p-chips-icon-right > svg,\n .p-chips-icon-left > .p-chips-prefix,\n .p-chips-icon-right > .p-chips-suffix {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n }\n \n .p-fluid .p-chips-icon-left,\n .p-fluid .p-chips-icon-right {\n display: block;\n width: 100%;\n }\n}\n"}});function x(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 D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){var r,o,i;r=e,i=t[n],(o=m(o=n))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var E=p.memo(p.forwardRef((function(e,n){var c,f,d=o.useMergeProps(),m=p.useContext(t.PrimeReactContext),y=P.getProps(e,m),v=p.useState(!1),h=(f=2,w(c=v)||k(c,f)||b(c,f)||j()),g=h[0],x=h[1],E=P.setMetaData({props:y,state:{focused:g}}),S=E.ptm,I=E.cx;r.useHandleStyle(P.css.styles,E.isUnstyled,{name:"chips"});var N=p.useRef(null),R=p.useRef(null),T=p.useRef(y.inputRef),A=function(e,n){if(!y.disabled||!y.readOnly){var t=O(y.value),r=t.splice(n,1);z(r,n)&&(y.onRemove&&y.onRemove({originalEvent:e,value:r}),y.onChange&&y.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:y.name,id:y.id,value:t}}))}},C=function(e,n,t){if(n&&n.trim().length){var r=y.value?O(y.value):[];if(y.allowDuplicate||-1===r.indexOf(n)){var o=!0;y.onAdd&&(o=y.onAdd({originalEvent:e,value:n})),!1!==o&&r.push(n)}B(e,r,t)}},F=function(e){var n=e.target.value,t=y.value||[];if(y.onKeyDown&&y.onKeyDown(e),!e.defaultPrevented)switch(e.key){case"Backspace":0===T.current.value.length&&t.length>0&&A(e,t.length-1);break;case"Enter":n&&n.trim().length&&(!y.max||y.max>t.length)&&C(e,n,!0);break;default:y.keyfilter&&l.KeyFilter.onKeyPress(e,y.keyfilter),H()?e.preventDefault():","===y.separator&&(e.key===y.separator||u.DomHandler.isAndroid()&&229===e.which)&&C(e,n,!0)}},B=function(e,n,t){y.onChange&&y.onChange({originalEvent:e,value:n,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:y.name,id:y.id,value:n}}),T.current.value="",t&&e.preventDefault()},U=function(e){if(y.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(y.keyfilter&&l.KeyFilter.onPaste(e,y.keyfilter),n){var t=y.value||[],r=n.split(y.separator);r=r.filter((function(e){return(y.allowDuplicate||-1===t.indexOf(e))&&e.trim().length})),t=[].concat(O(t),O(r)),B(e,t,!0)}}},K=function(e){if(y.addOnBlur){var n=e.target.value,t=y.value||[];n&&n.trim().length&&(!y.max||y.max>t.length)&&C(e,n,!0)}x(!1),y.onBlur&&y.onBlur(e)},H=function(){return y.max&&y.value&&y.max===y.value.length},M=T.current&&T.current.value,_=p.useMemo((function(){return u.ObjectUtils.isNotEmpty(y.value)||u.ObjectUtils.isNotEmpty(M)}),[y.value,M]),z=function(e,n){return u.ObjectUtils.getPropValue(y.removable,{value:e,index:n,props:y})};p.useImperativeHandle(n,(function(){return{props:y,focus:function(){return u.DomHandler.focus(T.current)},getElement:function(){return N.current},getInput:function(){return T.current}}})),p.useEffect((function(){u.ObjectUtils.combinedRefs(T,y.inputRef)}),[T,y.inputRef]),o.useMountEffect((function(){y.autoFocus&&u.DomHandler.focus(T.current,y.autoFocus)}));var J,L,V,X,Y,$=function(e,n){var t=d({className:I("removeTokenIcon"),onClick:function(e){return A(e,n)},"aria-hidden":"true"},S("removeTokenIcon")),r=u.IconUtils.getJSXIcon(y.removeIcon||p.createElement(i.TimesCircleIcon,t),D({},t),{props:y});return y.disabled||y.readOnly||!z(e,n)?null:r},q=function(e,n){var t=y.itemTemplate?y.itemTemplate(e):e,r=d({className:I("label")},S("label")),o=p.createElement("span",r,t),i=$(e,n),l=d({key:n,className:I("token"),"data-p-highlight":!0},S("token"));return p.createElement("li",l,o,i)},G=u.ObjectUtils.isNotEmpty(y.tooltip),Q=P.getOtherProps(y),W=u.ObjectUtils.reduceKeys(Q,u.DomHandler.ARIA_PROPS),Z=(V=y.value?y.value.map(q):null,J=d({className:I("inputToken")},S("inputToken")),L=d(D({id:y.inputId,ref:T,placeholder:y.placeholder,type:"text",name:y.name,disabled:y.disabled||H(),onKeyDown:function(e){return F(e)},onPaste:function(e){return U(e)},onFocus:function(e){return n=e,x(!0),void(y.onFocus&&y.onFocus(n));var n},onBlur:function(e){return K(e)},readOnly:y.readOnly},W),S("input")),X=p.createElement("li",J,p.createElement("input",L)),Y=d({ref:R,className:I("container",{focusedState:g}),onClick:function(e){u.DomHandler.focus(T.current)},"data-p-disabled":y.disabled,"data-p-focus":g},S("container")),p.createElement("ul",Y,V,X)),ee=d({id:y.id,ref:N,className:u.classNames(y.className,I("root",{isFilled:_,focusedState:g})),style:y.style},S("root"));return p.createElement(p.Fragment,null,p.createElement("div",ee,Z),G&&p.createElement(a.Tooltip,s({target:T,content:y.tooltip},y.tooltipOptions,{pt:S("tooltip")})))})));return E.displayName="Chips",e.Chips=E,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.hooks,primereact.icons.timescircle,primereact.keyfilter,primereact.tooltip,primereact.utils);
|
|
@@ -261,6 +261,7 @@ ColorPickerPanel.displayName = 'ColorPickerPanel';
|
|
|
261
261
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
262
262
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
263
263
|
var ColorPicker = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
264
|
+
var mergeProps = hooks.useMergeProps();
|
|
264
265
|
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
265
266
|
var props = ColorPickerBase.getProps(inProps, context);
|
|
266
267
|
var _React$useState = React__namespace.useState(false),
|
|
@@ -704,7 +705,7 @@ var ColorPicker = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
704
705
|
utils.ZIndexUtils.clear(overlayRef.current);
|
|
705
706
|
});
|
|
706
707
|
var createColorSelector = function createColorSelector() {
|
|
707
|
-
var selectorProps =
|
|
708
|
+
var selectorProps = mergeProps({
|
|
708
709
|
ref: colorSelectorRef,
|
|
709
710
|
className: cx('selector'),
|
|
710
711
|
onMouseDown: function onMouseDown(e) {
|
|
@@ -718,17 +719,17 @@ var ColorPicker = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
718
719
|
},
|
|
719
720
|
onTouchEnd: onDragEnd
|
|
720
721
|
}, ptm('selector'));
|
|
721
|
-
var colorProps =
|
|
722
|
+
var colorProps = mergeProps({
|
|
722
723
|
className: cx('color')
|
|
723
724
|
}, ptm('color'));
|
|
724
|
-
var colorHandlerProps =
|
|
725
|
+
var colorHandlerProps = mergeProps({
|
|
725
726
|
ref: colorHandleRef,
|
|
726
727
|
className: cx('colorHandle')
|
|
727
728
|
}, ptm('colorHandle'));
|
|
728
729
|
return /*#__PURE__*/React__namespace.createElement("div", selectorProps, /*#__PURE__*/React__namespace.createElement("div", colorProps, /*#__PURE__*/React__namespace.createElement("div", colorHandlerProps)));
|
|
729
730
|
};
|
|
730
731
|
var createHue = function createHue() {
|
|
731
|
-
var hueProps =
|
|
732
|
+
var hueProps = mergeProps({
|
|
732
733
|
className: cx('hue'),
|
|
733
734
|
onMouseDown: function onMouseDown(e) {
|
|
734
735
|
return onHueMousedown(e);
|
|
@@ -741,7 +742,7 @@ var ColorPicker = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
741
742
|
},
|
|
742
743
|
onTouchEnd: onDragEnd
|
|
743
744
|
}, ptm('hue'));
|
|
744
|
-
var hueHandlerProps =
|
|
745
|
+
var hueHandlerProps = mergeProps({
|
|
745
746
|
className: cx('hueHandle')
|
|
746
747
|
}, ptm('hueHandle'));
|
|
747
748
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
@@ -753,7 +754,7 @@ var ColorPicker = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
753
754
|
var createContent = function createContent() {
|
|
754
755
|
var colorSelector = createColorSelector();
|
|
755
756
|
var hue = createHue();
|
|
756
|
-
var contentProps =
|
|
757
|
+
var contentProps = mergeProps({
|
|
757
758
|
className: cx('content')
|
|
758
759
|
}, ptm('content'));
|
|
759
760
|
return /*#__PURE__*/React__namespace.createElement("div", contentProps, colorSelector, hue);
|
|
@@ -761,7 +762,7 @@ var ColorPicker = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
761
762
|
var createInput = function createInput() {
|
|
762
763
|
if (!props.inline) {
|
|
763
764
|
var inputProps = ColorPickerBase.getOtherProps(props);
|
|
764
|
-
var _inputProps =
|
|
765
|
+
var _inputProps = mergeProps(_objectSpread({
|
|
765
766
|
ref: inputRef,
|
|
766
767
|
type: 'text',
|
|
767
768
|
readOnly: true,
|
|
@@ -780,7 +781,7 @@ var ColorPicker = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
780
781
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
781
782
|
var content = createContent();
|
|
782
783
|
var input = createInput();
|
|
783
|
-
var rootProps =
|
|
784
|
+
var rootProps = mergeProps({
|
|
784
785
|
id: props.id,
|
|
785
786
|
ref: elementRef,
|
|
786
787
|
style: props.style,
|