primereact 9.5.0 → 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.cjs.js +2 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -2
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -1
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +214 -3
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +876 -3
- package/api/api.esm.js +209 -4
- package/api/api.esm.min.js +1 -1
- package/api/api.js +215 -5
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +132 -91
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +134 -2
- package/autocomplete/autocomplete.esm.js +134 -93
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +133 -93
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +3 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +1 -1
- package/avatar/avatar.esm.js +3 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +4 -3
- 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 +4 -3
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +4 -3
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +5 -4
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +11 -4
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +11 -4
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +11 -5
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +6 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +6 -0
- package/button/button.esm.js +6 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +7 -4
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +320 -228
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +267 -1
- package/calendar/calendar.esm.js +322 -230
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +321 -230
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +3 -1
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +5 -11
- package/card/card.esm.js +3 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +4 -3
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +19 -10
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +8 -0
- package/carousel/carousel.esm.js +20 -11
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +19 -10
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +154 -85
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +95 -1
- package/cascadeselect/cascadeselect.esm.js +156 -87
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +154 -86
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +3 -1
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +3 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +4 -3
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +93 -34
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +60 -1
- package/checkbox/checkbox.esm.js +94 -35
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +93 -36
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +3 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +1 -1
- package/chip/chip.esm.js +3 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +4 -3
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +60 -38
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +73 -6
- package/chips/chips.esm.js +61 -39
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +60 -40
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +119 -49
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +76 -0
- package/colorpicker/colorpicker.esm.js +121 -51
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +120 -51
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +2 -0
- package/column/column.d.ts +298 -1
- package/column/column.esm.js +2 -0
- package/column/column.js +2 -0
- package/columngroup/columngroup.d.ts +28 -0
- package/componentbase/componentbase.cjs.js +29 -5
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +25 -5
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +30 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +2 -1
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +3 -2
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +2 -1
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +5 -4
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +6 -5
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +5 -4
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +10 -8
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +11 -9
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +10 -8
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1165 -585
- package/core/core.min.js +47 -47
- package/csstransition/csstransition.cjs.js +3 -2
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +3 -2
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +4 -3
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +34 -43
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +51 -1
- package/datascroller/datascroller.esm.js +36 -45
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +35 -45
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +911 -477
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +191 -3
- package/datatable/datatable.esm.js +913 -479
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +912 -479
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +125 -109
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +105 -2
- package/dataview/dataview.esm.js +127 -111
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +123 -108
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +3 -1
- 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 +6 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +7 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -5
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +3 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +4 -3
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +3 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +3 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +4 -3
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +169 -119
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +154 -2
- package/dropdown/dropdown.esm.js +171 -121
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +170 -121
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +95 -116
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +50 -0
- package/editor/editor.esm.js +96 -117
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +95 -118
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +3 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +4 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +67 -55
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +13 -3
- package/fileupload/fileupload.esm.js +68 -56
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +64 -52
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +8 -6
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +9 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +8 -6
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +6 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +7 -4
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +6 -3
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +6 -1
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +6 -1
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +6 -1
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +6 -1
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +6 -1
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +6 -1
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +6 -1
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +6 -1
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +6 -1
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +6 -1
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +6 -1
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +6 -1
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +6 -1
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +6 -1
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +6 -1
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +6 -1
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +6 -1
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +6 -1
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +6 -1
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +6 -1
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +6 -1
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +6 -1
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +6 -1
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +6 -1
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +6 -1
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +6 -1
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +6 -1
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +6 -1
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +6 -1
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +6 -1
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +6 -1
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +6 -1
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +6 -1
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +6 -1
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +6 -1
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +6 -1
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +6 -1
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +6 -1
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +6 -1
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +6 -1
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +6 -1
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +6 -1
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +6 -1
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +6 -1
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +6 -1
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +6 -1
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +6 -1
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +6 -1
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +6 -1
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +6 -1
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +6 -1
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +6 -1
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +6 -1
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +6 -1
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +6 -1
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +6 -1
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +6 -1
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +6 -1
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +6 -1
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +6 -1
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +6 -1
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +6 -1
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +6 -1
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +6 -1
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +6 -1
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +6 -1
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +6 -1
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +6 -1
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +6 -1
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +6 -1
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +6 -1
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +6 -1
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +6 -1
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +6 -1
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +6 -1
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +6 -1
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +6 -1
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +6 -1
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +6 -1
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +6 -1
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +6 -1
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +6 -1
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +6 -1
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +6 -1
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +9 -3
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +2 -2
- package/image/image.esm.js +10 -4
- package/image/image.esm.min.js +1 -1
- package/image/image.js +9 -3
- package/image/image.min.css +1 -1
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +2 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +3 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -1
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +8 -10
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +7 -2
- package/inputmask/inputmask.esm.js +9 -11
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +8 -12
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +68 -46
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +62 -1
- package/inputnumber/inputnumber.esm.js +66 -47
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +68 -48
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +77 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +56 -0
- package/inputswitch/inputswitch.esm.js +78 -26
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +77 -27
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -15
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +32 -0
- package/inputtext/inputtext.esm.js +26 -16
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +25 -17
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +25 -15
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +33 -1
- package/inputtextarea/inputtextarea.esm.js +26 -16
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +25 -17
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +25 -9
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +25 -9
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +25 -11
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +44 -43
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +42 -0
- package/knob/knob.esm.js +45 -44
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +44 -45
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +86 -56
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +103 -3
- package/listbox/listbox.esm.js +88 -58
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +86 -57
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +4 -3
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +5 -4
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +4 -3
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +87 -61
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +80 -1
- package/mention/mention.esm.js +89 -63
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +88 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +5 -4
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +6 -5
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +5 -4
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +4 -4
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +5 -5
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +5 -5
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +3 -1
- 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 +4 -3
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +2 -1
- 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 +2 -1
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +220 -167
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +180 -3
- package/multiselect/multiselect.esm.js +222 -169
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +220 -168
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +32 -22
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +56 -2
- package/multistatecheckbox/multistatecheckbox.esm.js +34 -24
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +33 -24
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +188 -110
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +118 -2
- package/orderlist/orderlist.esm.js +190 -112
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +186 -109
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +139 -73
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +89 -2
- package/organizationchart/organizationchart.esm.js +140 -74
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +139 -75
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +7 -6
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +5 -0
- package/overlaypanel/overlaypanel.esm.js +8 -7
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +8 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +172 -166
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +108 -2
- package/paginator/paginator.esm.js +174 -168
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +172 -167
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +3 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +4 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +3 -1
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +3 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +4 -3
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +89 -46
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +98 -2
- package/password/password.esm.js +91 -48
- package/password/password.esm.min.js +1 -1
- package/password/password.js +88 -46
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +146 -82
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +133 -1
- package/picklist/picklist.esm.js +148 -84
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +143 -80
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +3 -2
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +3 -2
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +4 -3
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +4725 -3130
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +4724 -3131
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +4725 -3130
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +3 -1
- 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 +4 -3
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +3 -1
- 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 +4 -3
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +74 -21
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +61 -1
- package/radiobutton/radiobutton.esm.js +75 -22
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +74 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +47 -36
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +64 -1
- package/rating/rating.esm.js +48 -37
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +47 -38
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +568 -566
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +20 -1
- package/resources/themes/arya-green/theme.css +20 -1
- package/resources/themes/arya-orange/theme.css +20 -1
- package/resources/themes/arya-purple/theme.css +20 -1
- package/resources/themes/bootstrap4-dark-blue/theme.css +20 -1
- package/resources/themes/bootstrap4-dark-purple/theme.css +20 -1
- package/resources/themes/bootstrap4-light-blue/theme.css +20 -1
- package/resources/themes/bootstrap4-light-purple/theme.css +20 -1
- package/resources/themes/fluent-light/theme.css +20 -1
- package/resources/themes/lara-dark-blue/theme.css +20 -1
- package/resources/themes/lara-dark-indigo/theme.css +20 -1
- package/resources/themes/lara-dark-purple/theme.css +20 -1
- package/resources/themes/lara-dark-teal/theme.css +20 -1
- package/resources/themes/lara-light-blue/theme.css +20 -1
- package/resources/themes/lara-light-indigo/theme.css +20 -1
- package/resources/themes/lara-light-purple/theme.css +20 -1
- package/resources/themes/lara-light-teal/theme.css +20 -1
- package/resources/themes/luna-amber/theme.css +20 -1
- package/resources/themes/luna-blue/theme.css +20 -1
- package/resources/themes/luna-green/theme.css +20 -1
- package/resources/themes/luna-pink/theme.css +20 -1
- package/resources/themes/md-dark-deeppurple/theme.css +20 -1
- package/resources/themes/md-dark-indigo/theme.css +20 -1
- package/resources/themes/md-light-deeppurple/theme.css +20 -1
- package/resources/themes/md-light-indigo/theme.css +20 -1
- package/resources/themes/mdc-dark-deeppurple/theme.css +20 -1
- package/resources/themes/mdc-dark-indigo/theme.css +20 -1
- package/resources/themes/mdc-light-deeppurple/theme.css +20 -1
- package/resources/themes/mdc-light-indigo/theme.css +20 -1
- package/resources/themes/mira/theme.css +20 -1
- package/resources/themes/nano/theme.css +20 -1
- package/resources/themes/nova/theme.css +20 -1
- package/resources/themes/nova-accent/theme.css +20 -1
- package/resources/themes/nova-alt/theme.css +20 -1
- package/resources/themes/rhea/theme.css +20 -1
- package/resources/themes/saga-blue/theme.css +20 -1
- package/resources/themes/saga-green/theme.css +20 -1
- package/resources/themes/saga-orange/theme.css +20 -1
- package/resources/themes/saga-purple/theme.css +20 -1
- package/resources/themes/soho-dark/theme.css +20 -1
- package/resources/themes/soho-light/theme.css +20 -1
- package/resources/themes/tailwind-light/theme.css +32 -13
- package/resources/themes/vela-blue/theme.css +20 -1
- package/resources/themes/vela-green/theme.css +20 -1
- package/resources/themes/vela-orange/theme.css +20 -1
- package/resources/themes/vela-purple/theme.css +20 -1
- package/resources/themes/viva-dark/theme.css +20 -1
- package/resources/themes/viva-light/theme.css +20 -1
- package/ripple/ripple.cjs.js +3 -2
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +3 -2
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +4 -3
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +28 -41
- package/row/row.cjs.min.js +1 -1
- package/row/row.d.ts +28 -0
- package/row/row.esm.js +15 -28
- package/row/row.esm.min.js +1 -1
- package/row/row.js +49 -64
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +3 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +4 -3
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +9 -7
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +11 -9
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +10 -8
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +37 -25
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +52 -1
- package/selectbutton/selectbutton.esm.js +38 -26
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +37 -27
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +7 -6
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +8 -7
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +8 -7
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +4 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +4 -3
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +5 -5
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +5 -4
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +5 -0
- package/slidemenu/slidemenu.esm.js +6 -5
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +6 -5
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +71 -39
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +34 -1
- package/slider/slider.esm.js +72 -40
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +71 -41
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +3 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +3 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +4 -3
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +74 -63
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +39 -11
- package/splitbutton/splitbutton.esm.js +76 -65
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +74 -63
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +3 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +10 -0
- package/splitter/splitter.esm.js +3 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +4 -3
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +3 -1
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +4 -3
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +3 -1
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +3 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +4 -3
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +3 -1
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +3 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +4 -3
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +8 -5
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +9 -6
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +7 -4
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +3 -1
- 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 +4 -3
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +3 -1
- 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 +4 -3
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +6 -5
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +7 -6
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +6 -5
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +51 -43
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +51 -1
- package/timeline/timeline.esm.js +52 -44
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +51 -45
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +46 -4
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +2 -2
- package/toast/toast.esm.js +47 -5
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +46 -4
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +68 -21
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +40 -2
- package/togglebutton/togglebutton.esm.js +69 -22
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +68 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +3 -1
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +5 -11
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +4 -3
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +3 -2
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +7 -7
- package/tooltip/tooltip.esm.js +4 -3
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +3 -2
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +118 -88
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +139 -1
- package/tree/tree.esm.js +120 -90
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +116 -87
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +132 -102
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +138 -2
- package/treeselect/treeselect.esm.js +134 -104
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +133 -104
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +385 -198
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +305 -2
- package/treetable/treetable.esm.js +387 -200
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +383 -197
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +83 -33
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +59 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +85 -35
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +84 -35
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +6 -1
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +6 -1
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +6 -1
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +43 -29
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +78 -1
- package/virtualscroller/virtualscroller.esm.js +44 -30
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +43 -31
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import PrimeReact from 'primereact/api';
|
|
2
|
+
import PrimeReact, { PrimeReactContext } from 'primereact/api';
|
|
3
3
|
import { useOverlayListener, useEventListener, useMountEffect, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
4
4
|
import { OverlayService } from 'primereact/overlayservice';
|
|
5
5
|
import { Tooltip } from 'primereact/tooltip';
|
|
6
|
-
import {
|
|
6
|
+
import { classNames, mergeProps, DomHandler, ObjectUtils, ZIndexUtils } from 'primereact/utils';
|
|
7
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
7
8
|
import { CSSTransition } from 'primereact/csstransition';
|
|
8
9
|
import { Portal } from 'primereact/portal';
|
|
9
10
|
|
|
@@ -22,6 +23,47 @@ function _extends() {
|
|
|
22
23
|
return _extends.apply(this, arguments);
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
function _typeof(obj) {
|
|
27
|
+
"@babel/helpers - typeof";
|
|
28
|
+
|
|
29
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
30
|
+
return typeof obj;
|
|
31
|
+
} : function (obj) {
|
|
32
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
33
|
+
}, _typeof(obj);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function _toPrimitive(input, hint) {
|
|
37
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
38
|
+
var prim = input[Symbol.toPrimitive];
|
|
39
|
+
if (prim !== undefined) {
|
|
40
|
+
var res = prim.call(input, hint || "default");
|
|
41
|
+
if (_typeof(res) !== "object") return res;
|
|
42
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
43
|
+
}
|
|
44
|
+
return (hint === "string" ? String : Number)(input);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function _toPropertyKey(arg) {
|
|
48
|
+
var key = _toPrimitive(arg, "string");
|
|
49
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function _defineProperty(obj, key, value) {
|
|
53
|
+
key = _toPropertyKey(key);
|
|
54
|
+
if (key in obj) {
|
|
55
|
+
Object.defineProperty(obj, key, {
|
|
56
|
+
value: value,
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
obj[key] = value;
|
|
63
|
+
}
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
66
|
+
|
|
25
67
|
function _arrayWithHoles(arr) {
|
|
26
68
|
if (Array.isArray(arr)) return arr;
|
|
27
69
|
}
|
|
@@ -77,7 +119,7 @@ function _slicedToArray(arr, i) {
|
|
|
77
119
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
78
120
|
}
|
|
79
121
|
|
|
80
|
-
var ColorPickerBase = {
|
|
122
|
+
var ColorPickerBase = ComponentBase.extend({
|
|
81
123
|
defaultProps: {
|
|
82
124
|
__TYPE: 'ColorPicker',
|
|
83
125
|
appendTo: null,
|
|
@@ -104,23 +146,24 @@ var ColorPickerBase = {
|
|
|
104
146
|
tooltipOptions: null,
|
|
105
147
|
transitionOptions: null,
|
|
106
148
|
value: null
|
|
107
|
-
},
|
|
108
|
-
getProps: function getProps(props) {
|
|
109
|
-
return ObjectUtils.getMergedProps(props, ColorPickerBase.defaultProps);
|
|
110
|
-
},
|
|
111
|
-
getOtherProps: function getOtherProps(props) {
|
|
112
|
-
return ObjectUtils.getDiffProps(props, ColorPickerBase.defaultProps);
|
|
113
149
|
}
|
|
114
|
-
};
|
|
150
|
+
});
|
|
115
151
|
|
|
116
152
|
var ColorPickerPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
153
|
+
var context = React.useContext(PrimeReactContext);
|
|
117
154
|
var createElement = function createElement() {
|
|
118
155
|
var className = classNames('p-colorpicker-panel', props.panelClassName, {
|
|
119
156
|
'p-colorpicker-overlay-panel': !props.inline,
|
|
120
157
|
'p-disabled': props.disabled,
|
|
121
|
-
'p-input-filled': PrimeReact.inputStyle === 'filled',
|
|
122
|
-
'p-ripple-disabled': PrimeReact.ripple === false
|
|
158
|
+
'p-input-filled': context && context.inputStyle === 'filled' || PrimeReact.inputStyle === 'filled',
|
|
159
|
+
'p-ripple-disabled': context && context.ripple === false || PrimeReact.ripple === false
|
|
123
160
|
});
|
|
161
|
+
var panelProps = mergeProps({
|
|
162
|
+
ref: ref,
|
|
163
|
+
className: className,
|
|
164
|
+
style: props.panelStyle,
|
|
165
|
+
onClick: props.onClick
|
|
166
|
+
}, props.ptm('panel'));
|
|
124
167
|
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
125
168
|
nodeRef: ref,
|
|
126
169
|
classNames: "p-connected-overlay",
|
|
@@ -135,12 +178,7 @@ var ColorPickerPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
135
178
|
onEntered: props.onEntered,
|
|
136
179
|
onExit: props.onExit,
|
|
137
180
|
onExited: props.onExited
|
|
138
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
139
|
-
ref: ref,
|
|
140
|
-
className: className,
|
|
141
|
-
style: props.panelStyle,
|
|
142
|
-
onClick: props.onClick
|
|
143
|
-
}, props.children));
|
|
181
|
+
}, /*#__PURE__*/React.createElement("div", panelProps, props.children));
|
|
144
182
|
};
|
|
145
183
|
var element = createElement();
|
|
146
184
|
return props.inline ? element : /*#__PURE__*/React.createElement(Portal, {
|
|
@@ -150,12 +188,22 @@ var ColorPickerPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
150
188
|
});
|
|
151
189
|
ColorPickerPanel.displayName = 'ColorPickerPanel';
|
|
152
190
|
|
|
191
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
192
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
153
193
|
var ColorPicker = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
154
|
-
var
|
|
194
|
+
var context = React.useContext(PrimeReactContext);
|
|
195
|
+
var props = ColorPickerBase.getProps(inProps, context);
|
|
155
196
|
var _React$useState = React.useState(false),
|
|
156
197
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
157
198
|
overlayVisibleState = _React$useState2[0],
|
|
158
199
|
setOverlayVisibleState = _React$useState2[1];
|
|
200
|
+
var _ColorPickerBase$setM = ColorPickerBase.setMetaData({
|
|
201
|
+
props: props,
|
|
202
|
+
state: {
|
|
203
|
+
overlayVisible: overlayVisibleState
|
|
204
|
+
}
|
|
205
|
+
}),
|
|
206
|
+
ptm = _ColorPickerBase$setM.ptm;
|
|
159
207
|
var elementRef = React.useRef(null);
|
|
160
208
|
var overlayRef = React.useRef(null);
|
|
161
209
|
var inputRef = React.useRef(props.inputRef);
|
|
@@ -371,7 +419,7 @@ var ColorPicker = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
371
419
|
setOverlayVisibleState(false);
|
|
372
420
|
};
|
|
373
421
|
var onOverlayEnter = function onOverlayEnter() {
|
|
374
|
-
ZIndexUtils.set('overlay', overlayRef.current, PrimeReact.autoZIndex, PrimeReact.zIndex['overlay']);
|
|
422
|
+
ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['overlay'] || PrimeReact.zIndex['overlay']);
|
|
375
423
|
alignOverlay();
|
|
376
424
|
};
|
|
377
425
|
var onOverlayEntered = function onOverlayEntered() {
|
|
@@ -530,7 +578,7 @@ var ColorPicker = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
530
578
|
};
|
|
531
579
|
var alignOverlay = function alignOverlay() {
|
|
532
580
|
if (inputRef.current) {
|
|
533
|
-
DomHandler.alignOverlay(overlayRef.current, inputRef.current.parentElement, props.appendTo || PrimeReact.appendTo);
|
|
581
|
+
DomHandler.alignOverlay(overlayRef.current, inputRef.current.parentElement, props.appendTo || context && context.appendTo || PrimeReact.appendTo);
|
|
534
582
|
}
|
|
535
583
|
};
|
|
536
584
|
React.useImperativeHandle(ref, function () {
|
|
@@ -574,39 +622,57 @@ var ColorPicker = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
574
622
|
ZIndexUtils.clear(overlayRef.current);
|
|
575
623
|
});
|
|
576
624
|
var createColorSelector = function createColorSelector() {
|
|
577
|
-
|
|
625
|
+
var selectorProps = mergeProps({
|
|
578
626
|
ref: colorSelectorRef,
|
|
579
|
-
className:
|
|
580
|
-
onMouseDown:
|
|
581
|
-
|
|
582
|
-
|
|
627
|
+
className: 'p-colorpicker-color-selector',
|
|
628
|
+
onMouseDown: function onMouseDown(e) {
|
|
629
|
+
return onColorMousedown(e);
|
|
630
|
+
},
|
|
631
|
+
onTouchStart: function onTouchStart(e) {
|
|
632
|
+
return onColorDragStart(e);
|
|
633
|
+
},
|
|
634
|
+
onTouchMove: function onTouchMove(e) {
|
|
635
|
+
return onDrag(e);
|
|
636
|
+
},
|
|
583
637
|
onTouchEnd: onDragEnd
|
|
584
|
-
},
|
|
585
|
-
|
|
586
|
-
|
|
638
|
+
}, ptm('selector'));
|
|
639
|
+
var colorProps = mergeProps({
|
|
640
|
+
className: 'p-colorpicker-color'
|
|
641
|
+
}, ptm('color'));
|
|
642
|
+
var colorHandlerProps = mergeProps({
|
|
587
643
|
ref: colorHandleRef,
|
|
588
|
-
className:
|
|
589
|
-
}))
|
|
644
|
+
className: 'p-colorpicker-color-handle'
|
|
645
|
+
}, ptm('colorHandler'));
|
|
646
|
+
return /*#__PURE__*/React.createElement("div", selectorProps, /*#__PURE__*/React.createElement("div", colorProps, /*#__PURE__*/React.createElement("div", colorHandlerProps)));
|
|
590
647
|
};
|
|
591
648
|
var createHue = function createHue() {
|
|
592
|
-
|
|
649
|
+
var hueProps = mergeProps({
|
|
593
650
|
ref: hueViewRef,
|
|
594
|
-
className:
|
|
595
|
-
onMouseDown:
|
|
596
|
-
|
|
597
|
-
|
|
651
|
+
className: 'p-colorpicker-hue',
|
|
652
|
+
onMouseDown: function onMouseDown(e) {
|
|
653
|
+
return onHueMousedown(e);
|
|
654
|
+
},
|
|
655
|
+
onTouchStart: function onTouchStart(e) {
|
|
656
|
+
return onHueDragStart(e);
|
|
657
|
+
},
|
|
658
|
+
onTouchMove: function onTouchMove(e) {
|
|
659
|
+
return onDrag(e);
|
|
660
|
+
},
|
|
598
661
|
onTouchEnd: onDragEnd
|
|
599
|
-
},
|
|
662
|
+
}, ptm('hue'));
|
|
663
|
+
var hueHandlerProps = mergeProps({
|
|
600
664
|
ref: hueHandleRef,
|
|
601
|
-
className:
|
|
602
|
-
}));
|
|
665
|
+
className: 'p-colorpicker-hue-handle'
|
|
666
|
+
}, ptm('hueHandler'));
|
|
667
|
+
return /*#__PURE__*/React.createElement("div", hueProps, /*#__PURE__*/React.createElement("div", hueHandlerProps));
|
|
603
668
|
};
|
|
604
669
|
var createContent = function createContent() {
|
|
605
670
|
var colorSelector = createColorSelector();
|
|
606
671
|
var hue = createHue();
|
|
607
|
-
|
|
608
|
-
className:
|
|
609
|
-
},
|
|
672
|
+
var contentProps = mergeProps({
|
|
673
|
+
className: 'p-colorpicker-content'
|
|
674
|
+
}, ptm('content'));
|
|
675
|
+
return /*#__PURE__*/React.createElement("div", contentProps, colorSelector, hue);
|
|
610
676
|
};
|
|
611
677
|
var createInput = function createInput() {
|
|
612
678
|
if (!props.inline) {
|
|
@@ -614,9 +680,9 @@ var ColorPicker = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
614
680
|
'p-disabled': props.disabled
|
|
615
681
|
});
|
|
616
682
|
var inputProps = ColorPickerBase.getOtherProps(props);
|
|
617
|
-
|
|
683
|
+
var _inputProps = mergeProps(_objectSpread({
|
|
618
684
|
ref: inputRef,
|
|
619
|
-
type:
|
|
685
|
+
type: 'text',
|
|
620
686
|
readOnly: true,
|
|
621
687
|
className: inputClassName,
|
|
622
688
|
style: props.inputStyle,
|
|
@@ -625,23 +691,24 @@ var ColorPicker = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
625
691
|
disabled: props.disabled,
|
|
626
692
|
onClick: onInputClick,
|
|
627
693
|
onKeyDown: onInputKeydown
|
|
628
|
-
}, inputProps));
|
|
694
|
+
}, inputProps), ptm('input'));
|
|
695
|
+
return /*#__PURE__*/React.createElement("input", _inputProps);
|
|
629
696
|
}
|
|
630
697
|
return null;
|
|
631
698
|
};
|
|
632
699
|
var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
|
|
633
|
-
var otherProps = ColorPickerBase.getOtherProps(props);
|
|
634
700
|
var className = classNames('p-colorpicker p-component', {
|
|
635
701
|
'p-colorpicker-overlay': !props.inline
|
|
636
702
|
}, props.className);
|
|
637
703
|
var content = createContent();
|
|
638
704
|
var input = createInput();
|
|
639
|
-
|
|
640
|
-
ref: elementRef,
|
|
705
|
+
var rootProps = mergeProps({
|
|
641
706
|
id: props.id,
|
|
707
|
+
ref: elementRef,
|
|
642
708
|
style: props.style,
|
|
643
709
|
className: className
|
|
644
|
-
},
|
|
710
|
+
}, ColorPickerBase.getOtherProps(props), ptm('root'));
|
|
711
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", rootProps, input, /*#__PURE__*/React.createElement(ColorPickerPanel, {
|
|
645
712
|
ref: overlayRef,
|
|
646
713
|
appendTo: props.appendTo,
|
|
647
714
|
inline: props.inline,
|
|
@@ -654,11 +721,14 @@ var ColorPicker = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
654
721
|
onEntered: onOverlayEntered,
|
|
655
722
|
onExit: onOverlayExit,
|
|
656
723
|
onExited: onOverlayExited,
|
|
657
|
-
transitionOptions: props.transitionOptions
|
|
724
|
+
transitionOptions: props.transitionOptions,
|
|
725
|
+
ptm: ptm
|
|
658
726
|
}, content)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
659
727
|
target: elementRef,
|
|
660
728
|
content: props.tooltip
|
|
661
|
-
}, props.tooltipOptions
|
|
729
|
+
}, props.tooltipOptions, {
|
|
730
|
+
pt: ptm('tooltip')
|
|
731
|
+
})));
|
|
662
732
|
}));
|
|
663
733
|
ColorPicker.displayName = 'ColorPicker';
|
|
664
734
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import n from"primereact/api";import{useOverlayListener as t,useEventListener as r,useMountEffect as o,useUpdateEffect as l,useUnmountEffect as a}from"primereact/hooks";import{OverlayService as i}from"primereact/overlayservice";import{Tooltip as u}from"primereact/tooltip";import{ObjectUtils as c,classNames as s,DomHandler as p,ZIndexUtils as f}from"primereact/utils";import{CSSTransition as d}from"primereact/csstransition";import{Portal as m}from"primereact/portal";function h(){return h=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},h.apply(this,arguments)}function g(e){if(Array.isArray(e))return e}function b(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,l,a,i=[],u=!0,c=!1;try{if(l=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=l.call(t)).done)&&(i.push(r.value),i.length!==n);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function y(e,n){if(e){if("string"==typeof e)return v(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,n):void 0}}function E(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(e,n){return g(e)||b(e,n)||y(e,n)||E()}var k={defaultProps:{__TYPE:"ColorPicker",appendTo:null,autoFocus:!1,children:void 0,className:null,defaultColor:"ff0000",disabled:!1,format:"hex",id:null,inline:!1,inputClassName:null,inputId:null,inputRef:null,inputStyle:null,onChange:null,onHide:null,onShow:null,panelClassName:null,panelStyle:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,transitionOptions:null,value:null},getProps:function(e){return c.getMergedProps(e,k.defaultProps)},getOtherProps:function(e){return c.getDiffProps(e,k.defaultProps)}},x=e.forwardRef((function(t,r){var o,l=(o=s("p-colorpicker-panel",t.panelClassName,{"p-colorpicker-overlay-panel":!t.inline,"p-disabled":t.disabled,"p-input-filled":"filled"===n.inputStyle,"p-ripple-disabled":!1===n.ripple}),e.createElement(d,{nodeRef:r,classNames:"p-connected-overlay",in:t.in,timeout:{enter:120,exit:100},options:t.transitionOptions,unmountOnExit:!0,onEnter:t.onEnter,onEntered:t.onEntered,onExit:t.onExit,onExited:t.onExited},e.createElement("div",{ref:r,className:o,style:t.panelStyle,onClick:t.onClick},t.children)));return t.inline?l:e.createElement(m,{element:l,appendTo:t.appendTo})}));x.displayName="ColorPickerPanel";var C=e.memo(e.forwardRef((function(d,m){var g=k.getProps(d),b=M(e.useState(!1),2),v=b[0],y=b[1],E=e.useRef(null),C=e.useRef(null),w=e.useRef(g.inputRef),O=e.useRef(null),T=e.useRef(null),N=e.useRef(null),S=e.useRef(null),R=e.useRef(!1),P=e.useRef(null),I=e.useRef(!1),j=M(t({target:E,overlay:C,listener:function(e,n){n.valid&&ie()},when:v}),2),D=j[0],Y=j[1],A=M(r({type:"mousemove",listener:function(e){I.current&&Q(e),R.current&&L(e)}}),2),F=A[0],H=A[1],B=M(r({type:"mouseup",listener:function(){I.current=R.current=!1,p.removeClass(E.current,"p-colorpicker-dragging"),H(),_()}}),2),X=B[0],_=B[1],z=function(e){g.disabled||(G(),K(e))},K=function(e){g.disabled||(R.current=!0,L(e),p.addClass(E.current,"p-colorpicker-dragging"))},L=function(e){var n=S.current.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);P.current=pe({h:Math.floor(360*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-n)))/150),s:100,b:100}),te(),oe(),V()},U=function(e){g.disabled||(G(),Z(e))},Z=function(e){g.disabled||(I.current=!0,Q(e),p.addClass(E.current,"p-colorpicker-dragging"),e.preventDefault())},$=function(e){I.current&&(Q(e),e.preventDefault()),R.current&&(L(e),e.preventDefault())},q=function(){I.current=!1,R.current=!1,p.removeClass(E.current,"p-colorpicker-dragging"),J()},G=function(){F(),X()},J=function(){H(),_()},Q=function(e){var n=O.current.getBoundingClientRect(),t=n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),r=n.left+document.body.scrollLeft,o=Math.floor(100*Math.max(0,Math.min(150,(e.pageX||e.changedTouches[0].pageX)-r))/150),l=Math.floor(100*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-t)))/150);P.current=pe({h:P.current.h,s:o,b:l}),re(),le(),V()},V=function(){switch(g.format){case"hex":ne(be(P.current));break;case"rgb":ne(he(P.current));break;case"hsb":ne(P.current)}},W=function(e){var n;if(e)switch(g.format){case"hex":n=de(e);break;case"rgb":n=me(e);break;case"hsb":n=e}else n=de(g.defaultColor);return n},ee=function(e){P.current=W(e)},ne=function(e){g.onChange&&g.onChange({value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:g.name,id:g.id,value:e}})},te=function(){if(O.current){var e=pe({h:P.current.h,s:100,b:100});O.current.style.backgroundColor="#"+be(e)}},re=function(){T.current&&(T.current.style.left=Math.floor(150*P.current.s/100)+"px",T.current.style.top=Math.floor(150*(100-P.current.b)/100)+"px")},oe=function(){N.current&&(N.current.style.top=Math.floor(150-150*P.current.h/360)+"px")},le=function(){w.current&&(w.current.style.backgroundColor="#"+be(P.current))},ae=function(){y(!0)},ie=function(){y(!1)},ue=function(){ce()},ce=function(){v?ie():ae()},se=function(e){switch(e.which){case 32:ce(),e.preventDefault();break;case 27:case 9:ie()}},pe=function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}},fe=function(e){var n=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:n>>16,g:(65280&n)>>8,b:255&n}},de=function(e){return me(fe(e))},me=function(e){var n={h:0,s:0,b:0},t=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),o=r-t;return n.b=r,n.s=0!==r?255*o/r:0,n.h=0!==n.s?e.r===r?(e.g-e.b)/o:e.g===r?2+(e.b-e.r)/o:4+(e.r-e.g)/o:-1,n.h*=60,n.h<0&&(n.h+=360),n.s*=100/255,n.b*=100/255,n},he=function(e){var n={r:null,g:null,b:null},t=Math.round(e.h),r=Math.round(255*e.s/100),o=Math.round(255*e.b/100);if(0===r)n={r:o,g:o,b:o};else{var l=o,a=(255-r)*o/255,i=t%60*(l-a)/60;360===t&&(t=0),t<60?(n.r=l,n.b=a,n.g=a+i):t<120?(n.g=l,n.b=a,n.r=l-i):t<180?(n.g=l,n.r=a,n.b=a+i):t<240?(n.b=l,n.r=a,n.g=l-i):t<300?(n.b=l,n.g=a,n.r=a+i):t<360?(n.r=l,n.g=a,n.b=l-i):(n.r=0,n.g=0,n.b=0)}return{r:Math.round(n.r),g:Math.round(n.g),b:Math.round(n.b)}},ge=function(e){var n=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];for(var t in n)1===n[t].length&&(n[t]="0"+n[t]);return n.join("")},be=function(e){return ge(he(e))},ve=function(){oe(),re(),le(),te()},ye=function(){w.current&&p.alignOverlay(C.current,w.current.parentElement,g.appendTo||n.appendTo)};e.useImperativeHandle(m,(function(){return{props:g,show:ae,hide:ie,focus:function(){return p.focus(w.current)},getElement:function(){return E.current},getOverlay:function(){return C.current},getInput:function(){return w.current}}})),e.useEffect((function(){c.combinedRefs(w,g.inputRef)}),[w,g.inputRef]),o((function(){ee(g.value),ve(),g.autoFocus&&p.focus(w.current,g.autoFocus)})),l((function(){I.current||R.current||ee(g.value)}),[g.value]),l((function(){ve()})),a((function(){f.clear(C.current)}));var Ee=c.isNotEmpty(g.tooltip),Me=k.getOtherProps(g),ke=s("p-colorpicker p-component",{"p-colorpicker-overlay":!g.inline},g.className),xe=e.createElement("div",{className:"p-colorpicker-content"},e.createElement("div",{ref:O,className:"p-colorpicker-color-selector",onMouseDown:U,onTouchStart:Z,onTouchMove:$,onTouchEnd:q},e.createElement("div",{className:"p-colorpicker-color"},e.createElement("div",{ref:T,className:"p-colorpicker-color-handle"}))),e.createElement("div",{ref:S,className:"p-colorpicker-hue",onMouseDown:z,onTouchStart:K,onTouchMove:$,onTouchEnd:q},e.createElement("div",{ref:N,className:"p-colorpicker-hue-handle"}))),Ce=function(){if(!g.inline){var n=s("p-colorpicker-preview p-inputtext",g.inputClassName,{"p-disabled":g.disabled}),t=k.getOtherProps(g);return e.createElement("input",h({ref:w,type:"text",readOnly:!0,className:n,style:g.inputStyle,id:g.inputId,tabIndex:g.tabIndex,disabled:g.disabled,onClick:ue,onKeyDown:se},t))}return null}();return e.createElement(e.Fragment,null,e.createElement("div",h({ref:E,id:g.id,style:g.style,className:ke},Me),Ce,e.createElement(x,{ref:C,appendTo:g.appendTo,inline:g.inline,disabled:g.disabled,panelStyle:g.panelStyle,panelClassName:g.panelClassName,onClick:function(e){g.inline||i.emit("overlay-click",{originalEvent:e,target:E.current})},in:g.inline||v,onEnter:function(){f.set("overlay",C.current,n.autoZIndex,n.zIndex.overlay),ye()},onEntered:function(){D(),g.onShow&&g.onShow()},onExit:function(){Y()},onExited:function(){f.clear(C.current),g.onHide&&g.onHide()},transitionOptions:g.transitionOptions},xe)),Ee&&e.createElement(u,h({target:E,content:g.tooltip},g.tooltipOptions)))})));C.displayName="ColorPicker";export{C as ColorPicker};
|
|
1
|
+
import*as e from"react";import n,{PrimeReactContext as t}from"primereact/api";import{useOverlayListener as r,useEventListener as o,useMountEffect as i,useUpdateEffect as l,useUnmountEffect as u}from"primereact/hooks";import{OverlayService as a}from"primereact/overlayservice";import{Tooltip as c}from"primereact/tooltip";import{classNames as p,mergeProps as s,DomHandler as f,ObjectUtils as d,ZIndexUtils as m}from"primereact/utils";import{ComponentBase as b}from"primereact/componentbase";import{CSSTransition as h}from"primereact/csstransition";import{Portal as g}from"primereact/portal";function y(){return y=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y.apply(this,arguments)}function v(e){return v="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},v(e)}function E(e,n){if("object"!==v(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function O(e){var n=E(e,"string");return"symbol"===v(n)?n:String(n)}function x(e,n,t){return(n=O(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function w(e){if(Array.isArray(e))return e}function k(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,l,u=[],a=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;a=!1}else for(;!(a=(r=i.call(t)).done)&&(u.push(r.value),u.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw o}}return u}}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 S(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 C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,n){return w(e)||k(e,n)||S(e,n)||C()}var j=b.extend({defaultProps:{__TYPE:"ColorPicker",appendTo:null,autoFocus:!1,children:void 0,className:null,defaultColor:"ff0000",disabled:!1,format:"hex",id:null,inline:!1,inputClassName:null,inputId:null,inputRef:null,inputStyle:null,onChange:null,onHide:null,onShow:null,panelClassName:null,panelStyle:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,transitionOptions:null,value:null}}),N=e.forwardRef((function(r,o){var i,l,u=e.useContext(t),a=(i=p("p-colorpicker-panel",r.panelClassName,{"p-colorpicker-overlay-panel":!r.inline,"p-disabled":r.disabled,"p-input-filled":u&&"filled"===u.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":u&&!1===u.ripple||!1===n.ripple}),l=s({ref:o,className:i,style:r.panelStyle,onClick:r.onClick},r.ptm("panel")),e.createElement(h,{nodeRef:o,classNames:"p-connected-overlay",in:r.in,timeout:{enter:120,exit:100},options:r.transitionOptions,unmountOnExit:!0,onEnter:r.onEnter,onEntered:r.onEntered,onExit:r.onExit,onExited:r.onExited},e.createElement("div",l,r.children)));return r.inline?a:e.createElement(g,{element:a,appendTo:r.appendTo})}));function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function R(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){x(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}N.displayName="ColorPickerPanel";var I=e.memo(e.forwardRef((function(b,h){var g=e.useContext(t),v=j.getProps(b,g),E=T(e.useState(!1),2),O=E[0],x=E[1],w=j.setMetaData({props:v,state:{overlayVisible:O}}).ptm,k=e.useRef(null),M=e.useRef(null),S=e.useRef(v.inputRef),C=e.useRef(null),P=e.useRef(null),I=e.useRef(null),D=e.useRef(null),Y=e.useRef(!1),A=e.useRef(null),H=e.useRef(!1),F=T(r({target:k,overlay:M,listener:function(e,n){n.valid&&pe()},when:O}),2),z=F[0],B=F[1],X=T(o({type:"mousemove",listener:function(e){H.current&&ee(e),Y.current&&$(e)}}),2),Z=X[0],_=X[1],K=T(o({type:"mouseup",listener:function(){H.current=Y.current=!1,f.removeClass(k.current,"p-colorpicker-dragging"),_(),U()}}),2),L=K[0],U=K[1],V=function(e){v.disabled||(Y.current=!0,$(e),f.addClass(k.current,"p-colorpicker-dragging"))},$=function(e){var n=D.current.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);A.current=me({h:Math.floor(360*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-n)))/150),s:100,b:100}),ie(),ue(),ne()},q=function(e){v.disabled||(H.current=!0,ee(e),f.addClass(k.current,"p-colorpicker-dragging"),e.preventDefault())},G=function(e){H.current&&(ee(e),e.preventDefault()),Y.current&&($(e),e.preventDefault())},J=function(){H.current=!1,Y.current=!1,f.removeClass(k.current,"p-colorpicker-dragging"),W()},Q=function(){Z(),L()},W=function(){_(),U()},ee=function(e){var n=C.current.getBoundingClientRect(),t=n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),r=n.left+document.body.scrollLeft,o=Math.floor(100*Math.max(0,Math.min(150,(e.pageX||e.changedTouches[0].pageX)-r))/150),i=Math.floor(100*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-t)))/150);A.current=me({h:A.current.h,s:o,b:i}),le(),ae(),ne()},ne=function(){switch(v.format){case"hex":oe(Ee(A.current));break;case"rgb":oe(ye(A.current));break;case"hsb":oe(A.current)}},te=function(e){var n;if(e)switch(v.format){case"hex":n=he(e);break;case"rgb":n=ge(e);break;case"hsb":n=e}else n=he(v.defaultColor);return n},re=function(e){A.current=te(e)},oe=function(e){v.onChange&&v.onChange({value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:v.name,id:v.id,value:e}})},ie=function(){if(C.current){var e=me({h:A.current.h,s:100,b:100});C.current.style.backgroundColor="#"+Ee(e)}},le=function(){P.current&&(P.current.style.left=Math.floor(150*A.current.s/100)+"px",P.current.style.top=Math.floor(150*(100-A.current.b)/100)+"px")},ue=function(){I.current&&(I.current.style.top=Math.floor(150-150*A.current.h/360)+"px")},ae=function(){S.current&&(S.current.style.backgroundColor="#"+Ee(A.current))},ce=function(){x(!0)},pe=function(){x(!1)},se=function(){fe()},fe=function(){O?pe():ce()},de=function(e){switch(e.which){case 32:fe(),e.preventDefault();break;case 27:case 9:pe()}},me=function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}},be=function(e){var n=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:n>>16,g:(65280&n)>>8,b:255&n}},he=function(e){return ge(be(e))},ge=function(e){var n={h:0,s:0,b:0},t=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),o=r-t;return n.b=r,n.s=0!==r?255*o/r:0,n.h=0!==n.s?e.r===r?(e.g-e.b)/o:e.g===r?2+(e.b-e.r)/o:4+(e.r-e.g)/o:-1,n.h*=60,n.h<0&&(n.h+=360),n.s*=100/255,n.b*=100/255,n},ye=function(e){var n={r:null,g:null,b:null},t=Math.round(e.h),r=Math.round(255*e.s/100),o=Math.round(255*e.b/100);if(0===r)n={r:o,g:o,b:o};else{var i=o,l=(255-r)*o/255,u=t%60*(i-l)/60;360===t&&(t=0),t<60?(n.r=i,n.b=l,n.g=l+u):t<120?(n.g=i,n.b=l,n.r=i-u):t<180?(n.g=i,n.r=l,n.b=l+u):t<240?(n.b=i,n.r=l,n.g=i-u):t<300?(n.b=i,n.g=l,n.r=l+u):t<360?(n.r=i,n.g=l,n.b=i-u):(n.r=0,n.g=0,n.b=0)}return{r:Math.round(n.r),g:Math.round(n.g),b:Math.round(n.b)}},ve=function(e){var n=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];for(var t in n)1===n[t].length&&(n[t]="0"+n[t]);return n.join("")},Ee=function(e){return ve(ye(e))},Oe=function(){ue(),le(),ae(),ie()},xe=function(){S.current&&f.alignOverlay(M.current,S.current.parentElement,v.appendTo||g&&g.appendTo||n.appendTo)};e.useImperativeHandle(h,(function(){return{props:v,show:ce,hide:pe,focus:function(){return f.focus(S.current)},getElement:function(){return k.current},getOverlay:function(){return M.current},getInput:function(){return S.current}}})),e.useEffect((function(){d.combinedRefs(S,v.inputRef)}),[S,v.inputRef]),i((function(){re(v.value),Oe(),v.autoFocus&&f.focus(S.current,v.autoFocus)})),l((function(){H.current||Y.current||re(v.value)}),[v.value]),l((function(){Oe()})),u((function(){m.clear(M.current)}));var we,ke,Me,Se,Ce,Te,je,Ne,Pe=d.isNotEmpty(v.tooltip),Re=p("p-colorpicker p-component",{"p-colorpicker-overlay":!v.inline},v.className),Ie=(we=s({ref:C,className:"p-colorpicker-color-selector",onMouseDown:function(e){return n=e,void(v.disabled||(Q(),q(n)));var n},onTouchStart:function(e){return q(e)},onTouchMove:function(e){return G(e)},onTouchEnd:J},w("selector")),ke=s({className:"p-colorpicker-color"},w("color")),Me=s({ref:P,className:"p-colorpicker-color-handle"},w("colorHandler")),Te=e.createElement("div",we,e.createElement("div",ke,e.createElement("div",Me))),Se=s({ref:D,className:"p-colorpicker-hue",onMouseDown:function(e){return n=e,void(v.disabled||(Q(),V(n)));var n},onTouchStart:function(e){return V(e)},onTouchMove:function(e){return G(e)},onTouchEnd:J},w("hue")),Ce=s({ref:I,className:"p-colorpicker-hue-handle"},w("hueHandler")),je=e.createElement("div",Se,e.createElement("div",Ce)),Ne=s({className:"p-colorpicker-content"},w("content")),e.createElement("div",Ne,Te,je)),De=function(){if(!v.inline){var n=p("p-colorpicker-preview p-inputtext",v.inputClassName,{"p-disabled":v.disabled}),t=j.getOtherProps(v),r=s(R({ref:S,type:"text",readOnly:!0,className:n,style:v.inputStyle,id:v.inputId,tabIndex:v.tabIndex,disabled:v.disabled,onClick:se,onKeyDown:de},t),w("input"));return e.createElement("input",r)}return null}(),Ye=s({id:v.id,ref:k,style:v.style,className:Re},j.getOtherProps(v),w("root"));return e.createElement(e.Fragment,null,e.createElement("div",Ye,De,e.createElement(N,{ref:M,appendTo:v.appendTo,inline:v.inline,disabled:v.disabled,panelStyle:v.panelStyle,panelClassName:v.panelClassName,onClick:function(e){v.inline||a.emit("overlay-click",{originalEvent:e,target:k.current})},in:v.inline||O,onEnter:function(){m.set("overlay",M.current,g&&g.autoZIndex||n.autoZIndex,g&&g.zIndex.overlay||n.zIndex.overlay),xe()},onEntered:function(){z(),v.onShow&&v.onShow()},onExit:function(){B()},onExited:function(){m.clear(M.current),v.onHide&&v.onHide()},transitionOptions:v.transitionOptions,ptm:w},Ie)),Pe&&e.createElement(c,y({target:k,content:v.tooltip},v.tooltipOptions,{pt:w("tooltip")})))})));I.displayName="ColorPicker";export{I as ColorPicker};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, overlayservice, tooltip, utils, csstransition, portal) {
|
|
2
|
+
this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, overlayservice, tooltip, utils, componentbase, csstransition, portal) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -40,6 +40,47 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
40
40
|
return _extends.apply(this, arguments);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
function _typeof(obj) {
|
|
44
|
+
"@babel/helpers - typeof";
|
|
45
|
+
|
|
46
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
47
|
+
return typeof obj;
|
|
48
|
+
} : function (obj) {
|
|
49
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
50
|
+
}, _typeof(obj);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function _toPrimitive(input, hint) {
|
|
54
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
55
|
+
var prim = input[Symbol.toPrimitive];
|
|
56
|
+
if (prim !== undefined) {
|
|
57
|
+
var res = prim.call(input, hint || "default");
|
|
58
|
+
if (_typeof(res) !== "object") return res;
|
|
59
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
60
|
+
}
|
|
61
|
+
return (hint === "string" ? String : Number)(input);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _toPropertyKey(arg) {
|
|
65
|
+
var key = _toPrimitive(arg, "string");
|
|
66
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function _defineProperty(obj, key, value) {
|
|
70
|
+
key = _toPropertyKey(key);
|
|
71
|
+
if (key in obj) {
|
|
72
|
+
Object.defineProperty(obj, key, {
|
|
73
|
+
value: value,
|
|
74
|
+
enumerable: true,
|
|
75
|
+
configurable: true,
|
|
76
|
+
writable: true
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
obj[key] = value;
|
|
80
|
+
}
|
|
81
|
+
return obj;
|
|
82
|
+
}
|
|
83
|
+
|
|
43
84
|
function _arrayWithHoles(arr) {
|
|
44
85
|
if (Array.isArray(arr)) return arr;
|
|
45
86
|
}
|
|
@@ -95,7 +136,7 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
95
136
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
96
137
|
}
|
|
97
138
|
|
|
98
|
-
var ColorPickerBase = {
|
|
139
|
+
var ColorPickerBase = componentbase.ComponentBase.extend({
|
|
99
140
|
defaultProps: {
|
|
100
141
|
__TYPE: 'ColorPicker',
|
|
101
142
|
appendTo: null,
|
|
@@ -122,23 +163,24 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
122
163
|
tooltipOptions: null,
|
|
123
164
|
transitionOptions: null,
|
|
124
165
|
value: null
|
|
125
|
-
},
|
|
126
|
-
getProps: function getProps(props) {
|
|
127
|
-
return utils.ObjectUtils.getMergedProps(props, ColorPickerBase.defaultProps);
|
|
128
|
-
},
|
|
129
|
-
getOtherProps: function getOtherProps(props) {
|
|
130
|
-
return utils.ObjectUtils.getDiffProps(props, ColorPickerBase.defaultProps);
|
|
131
166
|
}
|
|
132
|
-
};
|
|
167
|
+
});
|
|
133
168
|
|
|
134
169
|
var ColorPickerPanel = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
170
|
+
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
135
171
|
var createElement = function createElement() {
|
|
136
172
|
var className = utils.classNames('p-colorpicker-panel', props.panelClassName, {
|
|
137
173
|
'p-colorpicker-overlay-panel': !props.inline,
|
|
138
174
|
'p-disabled': props.disabled,
|
|
139
|
-
'p-input-filled': PrimeReact__default["default"].inputStyle === 'filled',
|
|
140
|
-
'p-ripple-disabled': PrimeReact__default["default"].ripple === false
|
|
175
|
+
'p-input-filled': context && context.inputStyle === 'filled' || PrimeReact__default["default"].inputStyle === 'filled',
|
|
176
|
+
'p-ripple-disabled': context && context.ripple === false || PrimeReact__default["default"].ripple === false
|
|
141
177
|
});
|
|
178
|
+
var panelProps = utils.mergeProps({
|
|
179
|
+
ref: ref,
|
|
180
|
+
className: className,
|
|
181
|
+
style: props.panelStyle,
|
|
182
|
+
onClick: props.onClick
|
|
183
|
+
}, props.ptm('panel'));
|
|
142
184
|
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
143
185
|
nodeRef: ref,
|
|
144
186
|
classNames: "p-connected-overlay",
|
|
@@ -153,12 +195,7 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
153
195
|
onEntered: props.onEntered,
|
|
154
196
|
onExit: props.onExit,
|
|
155
197
|
onExited: props.onExited
|
|
156
|
-
}, /*#__PURE__*/React__namespace.createElement("div",
|
|
157
|
-
ref: ref,
|
|
158
|
-
className: className,
|
|
159
|
-
style: props.panelStyle,
|
|
160
|
-
onClick: props.onClick
|
|
161
|
-
}, props.children));
|
|
198
|
+
}, /*#__PURE__*/React__namespace.createElement("div", panelProps, props.children));
|
|
162
199
|
};
|
|
163
200
|
var element = createElement();
|
|
164
201
|
return props.inline ? element : /*#__PURE__*/React__namespace.createElement(portal.Portal, {
|
|
@@ -168,12 +205,22 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
168
205
|
});
|
|
169
206
|
ColorPickerPanel.displayName = 'ColorPickerPanel';
|
|
170
207
|
|
|
208
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
209
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
171
210
|
var ColorPicker = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
172
|
-
var
|
|
211
|
+
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
212
|
+
var props = ColorPickerBase.getProps(inProps, context);
|
|
173
213
|
var _React$useState = React__namespace.useState(false),
|
|
174
214
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
175
215
|
overlayVisibleState = _React$useState2[0],
|
|
176
216
|
setOverlayVisibleState = _React$useState2[1];
|
|
217
|
+
var _ColorPickerBase$setM = ColorPickerBase.setMetaData({
|
|
218
|
+
props: props,
|
|
219
|
+
state: {
|
|
220
|
+
overlayVisible: overlayVisibleState
|
|
221
|
+
}
|
|
222
|
+
}),
|
|
223
|
+
ptm = _ColorPickerBase$setM.ptm;
|
|
177
224
|
var elementRef = React__namespace.useRef(null);
|
|
178
225
|
var overlayRef = React__namespace.useRef(null);
|
|
179
226
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
@@ -389,7 +436,7 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
389
436
|
setOverlayVisibleState(false);
|
|
390
437
|
};
|
|
391
438
|
var onOverlayEnter = function onOverlayEnter() {
|
|
392
|
-
utils.ZIndexUtils.set('overlay', overlayRef.current, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['overlay']);
|
|
439
|
+
utils.ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact__default["default"].autoZIndex, context && context.zIndex['overlay'] || PrimeReact__default["default"].zIndex['overlay']);
|
|
393
440
|
alignOverlay();
|
|
394
441
|
};
|
|
395
442
|
var onOverlayEntered = function onOverlayEntered() {
|
|
@@ -548,7 +595,7 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
548
595
|
};
|
|
549
596
|
var alignOverlay = function alignOverlay() {
|
|
550
597
|
if (inputRef.current) {
|
|
551
|
-
utils.DomHandler.alignOverlay(overlayRef.current, inputRef.current.parentElement, props.appendTo || PrimeReact__default["default"].appendTo);
|
|
598
|
+
utils.DomHandler.alignOverlay(overlayRef.current, inputRef.current.parentElement, props.appendTo || context && context.appendTo || PrimeReact__default["default"].appendTo);
|
|
552
599
|
}
|
|
553
600
|
};
|
|
554
601
|
React__namespace.useImperativeHandle(ref, function () {
|
|
@@ -592,39 +639,57 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
592
639
|
utils.ZIndexUtils.clear(overlayRef.current);
|
|
593
640
|
});
|
|
594
641
|
var createColorSelector = function createColorSelector() {
|
|
595
|
-
|
|
642
|
+
var selectorProps = utils.mergeProps({
|
|
596
643
|
ref: colorSelectorRef,
|
|
597
|
-
className:
|
|
598
|
-
onMouseDown:
|
|
599
|
-
|
|
600
|
-
|
|
644
|
+
className: 'p-colorpicker-color-selector',
|
|
645
|
+
onMouseDown: function onMouseDown(e) {
|
|
646
|
+
return onColorMousedown(e);
|
|
647
|
+
},
|
|
648
|
+
onTouchStart: function onTouchStart(e) {
|
|
649
|
+
return onColorDragStart(e);
|
|
650
|
+
},
|
|
651
|
+
onTouchMove: function onTouchMove(e) {
|
|
652
|
+
return onDrag(e);
|
|
653
|
+
},
|
|
601
654
|
onTouchEnd: onDragEnd
|
|
602
|
-
},
|
|
603
|
-
|
|
604
|
-
|
|
655
|
+
}, ptm('selector'));
|
|
656
|
+
var colorProps = utils.mergeProps({
|
|
657
|
+
className: 'p-colorpicker-color'
|
|
658
|
+
}, ptm('color'));
|
|
659
|
+
var colorHandlerProps = utils.mergeProps({
|
|
605
660
|
ref: colorHandleRef,
|
|
606
|
-
className:
|
|
607
|
-
}))
|
|
661
|
+
className: 'p-colorpicker-color-handle'
|
|
662
|
+
}, ptm('colorHandler'));
|
|
663
|
+
return /*#__PURE__*/React__namespace.createElement("div", selectorProps, /*#__PURE__*/React__namespace.createElement("div", colorProps, /*#__PURE__*/React__namespace.createElement("div", colorHandlerProps)));
|
|
608
664
|
};
|
|
609
665
|
var createHue = function createHue() {
|
|
610
|
-
|
|
666
|
+
var hueProps = utils.mergeProps({
|
|
611
667
|
ref: hueViewRef,
|
|
612
|
-
className:
|
|
613
|
-
onMouseDown:
|
|
614
|
-
|
|
615
|
-
|
|
668
|
+
className: 'p-colorpicker-hue',
|
|
669
|
+
onMouseDown: function onMouseDown(e) {
|
|
670
|
+
return onHueMousedown(e);
|
|
671
|
+
},
|
|
672
|
+
onTouchStart: function onTouchStart(e) {
|
|
673
|
+
return onHueDragStart(e);
|
|
674
|
+
},
|
|
675
|
+
onTouchMove: function onTouchMove(e) {
|
|
676
|
+
return onDrag(e);
|
|
677
|
+
},
|
|
616
678
|
onTouchEnd: onDragEnd
|
|
617
|
-
},
|
|
679
|
+
}, ptm('hue'));
|
|
680
|
+
var hueHandlerProps = utils.mergeProps({
|
|
618
681
|
ref: hueHandleRef,
|
|
619
|
-
className:
|
|
620
|
-
}));
|
|
682
|
+
className: 'p-colorpicker-hue-handle'
|
|
683
|
+
}, ptm('hueHandler'));
|
|
684
|
+
return /*#__PURE__*/React__namespace.createElement("div", hueProps, /*#__PURE__*/React__namespace.createElement("div", hueHandlerProps));
|
|
621
685
|
};
|
|
622
686
|
var createContent = function createContent() {
|
|
623
687
|
var colorSelector = createColorSelector();
|
|
624
688
|
var hue = createHue();
|
|
625
|
-
|
|
626
|
-
className:
|
|
627
|
-
},
|
|
689
|
+
var contentProps = utils.mergeProps({
|
|
690
|
+
className: 'p-colorpicker-content'
|
|
691
|
+
}, ptm('content'));
|
|
692
|
+
return /*#__PURE__*/React__namespace.createElement("div", contentProps, colorSelector, hue);
|
|
628
693
|
};
|
|
629
694
|
var createInput = function createInput() {
|
|
630
695
|
if (!props.inline) {
|
|
@@ -632,9 +697,9 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
632
697
|
'p-disabled': props.disabled
|
|
633
698
|
});
|
|
634
699
|
var inputProps = ColorPickerBase.getOtherProps(props);
|
|
635
|
-
|
|
700
|
+
var _inputProps = utils.mergeProps(_objectSpread({
|
|
636
701
|
ref: inputRef,
|
|
637
|
-
type:
|
|
702
|
+
type: 'text',
|
|
638
703
|
readOnly: true,
|
|
639
704
|
className: inputClassName,
|
|
640
705
|
style: props.inputStyle,
|
|
@@ -643,23 +708,24 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
643
708
|
disabled: props.disabled,
|
|
644
709
|
onClick: onInputClick,
|
|
645
710
|
onKeyDown: onInputKeydown
|
|
646
|
-
}, inputProps));
|
|
711
|
+
}, inputProps), ptm('input'));
|
|
712
|
+
return /*#__PURE__*/React__namespace.createElement("input", _inputProps);
|
|
647
713
|
}
|
|
648
714
|
return null;
|
|
649
715
|
};
|
|
650
716
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
651
|
-
var otherProps = ColorPickerBase.getOtherProps(props);
|
|
652
717
|
var className = utils.classNames('p-colorpicker p-component', {
|
|
653
718
|
'p-colorpicker-overlay': !props.inline
|
|
654
719
|
}, props.className);
|
|
655
720
|
var content = createContent();
|
|
656
721
|
var input = createInput();
|
|
657
|
-
|
|
658
|
-
ref: elementRef,
|
|
722
|
+
var rootProps = utils.mergeProps({
|
|
659
723
|
id: props.id,
|
|
724
|
+
ref: elementRef,
|
|
660
725
|
style: props.style,
|
|
661
726
|
className: className
|
|
662
|
-
},
|
|
727
|
+
}, ColorPickerBase.getOtherProps(props), ptm('root'));
|
|
728
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", rootProps, input, /*#__PURE__*/React__namespace.createElement(ColorPickerPanel, {
|
|
663
729
|
ref: overlayRef,
|
|
664
730
|
appendTo: props.appendTo,
|
|
665
731
|
inline: props.inline,
|
|
@@ -672,11 +738,14 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
672
738
|
onEntered: onOverlayEntered,
|
|
673
739
|
onExit: onOverlayExit,
|
|
674
740
|
onExited: onOverlayExited,
|
|
675
|
-
transitionOptions: props.transitionOptions
|
|
741
|
+
transitionOptions: props.transitionOptions,
|
|
742
|
+
ptm: ptm
|
|
676
743
|
}, content)), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
677
744
|
target: elementRef,
|
|
678
745
|
content: props.tooltip
|
|
679
|
-
}, props.tooltipOptions
|
|
746
|
+
}, props.tooltipOptions, {
|
|
747
|
+
pt: ptm('tooltip')
|
|
748
|
+
})));
|
|
680
749
|
}));
|
|
681
750
|
ColorPicker.displayName = 'ColorPicker';
|
|
682
751
|
|
|
@@ -686,4 +755,4 @@ this.primereact.colorpicker = (function (exports, React, PrimeReact, hooks, over
|
|
|
686
755
|
|
|
687
756
|
return exports;
|
|
688
757
|
|
|
689
|
-
})({}, React, primereact.api, primereact.hooks, primereact.overlayservice, primereact.tooltip, primereact.utils, primereact.csstransition, primereact.portal);
|
|
758
|
+
})({}, React, primereact.api, primereact.hooks, primereact.overlayservice, primereact.tooltip, primereact.utils, primereact.componentbase, primereact.csstransition, primereact.portal);
|