primereact 10.0.0 → 10.0.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/README.md +1 -1
- package/accordion/accordion.esm.js +0 -1
- package/api/api.esm.js +0 -1
- package/autocomplete/autocomplete.esm.js +8 -7
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/avatar/avatar.esm.js +0 -1
- package/avatargroup/avatargroup.esm.js +0 -1
- package/badge/badge.esm.js +0 -1
- package/blockui/blockui.esm.js +3 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +0 -1
- package/button/button.esm.js +0 -1
- package/calendar/calendar.esm.js +2 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/card/card.esm.js +0 -1
- package/carousel/carousel.esm.js +7 -8
- package/carousel/carousel.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +0 -1
- package/chart/chart.esm.js +0 -1
- package/checkbox/checkbox.esm.js +0 -1
- package/chip/chip.esm.js +0 -1
- package/chips/chips.esm.js +0 -1
- package/colorpicker/colorpicker.esm.js +0 -1
- package/column/column.esm.js +0 -1
- package/columngroup/columngroup.esm.js +0 -1
- package/componentbase/componentbase.cjs.js +12 -7
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +23 -13
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +12 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +0 -1
- package/confirmpopup/confirmpopup.esm.js +0 -1
- package/contextmenu/contextmenu.esm.js +0 -1
- package/core/core.js +12 -7
- package/core/core.min.js +1 -1
- package/csstransition/csstransition.esm.js +0 -1
- package/datascroller/datascroller.esm.js +0 -1
- package/datatable/datatable.esm.js +0 -1
- package/dataview/dataview.esm.js +0 -1
- package/deferredcontent/deferredcontent.esm.js +0 -1
- package/dialog/dialog.esm.js +2 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/divider/divider.esm.js +0 -1
- package/dock/dock.esm.js +0 -1
- package/dropdown/dropdown.esm.js +0 -1
- package/editor/editor.esm.js +0 -1
- package/fieldset/fieldset.esm.js +0 -1
- package/fileupload/fileupload.esm.js +0 -1
- package/galleria/galleria.esm.js +11 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/hooks/hooks.esm.js +0 -6
- package/iconbase/iconbase.esm.js +0 -1
- package/icons/angledoubledown/index.esm.js +0 -1
- package/icons/angledoubleleft/index.esm.js +0 -1
- package/icons/angledoubleright/index.esm.js +0 -1
- package/icons/angledoubleup/index.esm.js +0 -1
- package/icons/angledown/index.esm.js +0 -1
- package/icons/angleleft/index.esm.js +0 -1
- package/icons/angleright/index.esm.js +0 -1
- package/icons/angleup/index.esm.js +0 -1
- package/icons/arrowdown/index.esm.js +0 -1
- package/icons/arrowup/index.esm.js +0 -1
- package/icons/ban/index.esm.js +0 -1
- package/icons/bars/index.esm.js +0 -1
- package/icons/calendar/index.esm.js +0 -1
- package/icons/check/index.esm.js +0 -1
- package/icons/chevrondown/index.esm.js +0 -1
- package/icons/chevronleft/index.esm.js +0 -1
- package/icons/chevronright/index.esm.js +0 -1
- package/icons/chevronup/index.esm.js +0 -1
- package/icons/download/index.esm.js +0 -1
- package/icons/exclamationtriangle/index.esm.js +0 -1
- package/icons/eye/index.esm.js +0 -1
- package/icons/eyeslash/index.esm.js +0 -1
- package/icons/filter/index.esm.js +0 -1
- package/icons/filterslash/index.esm.js +0 -1
- package/icons/infocircle/index.esm.js +0 -1
- package/icons/minus/index.esm.js +0 -1
- package/icons/pencil/index.esm.js +0 -1
- package/icons/plus/index.esm.js +0 -1
- package/icons/refresh/index.esm.js +0 -1
- package/icons/search/index.esm.js +0 -1
- package/icons/searchminus/index.esm.js +0 -1
- package/icons/searchplus/index.esm.js +0 -1
- package/icons/sortalt/index.esm.js +0 -1
- package/icons/sortamountdown/index.esm.js +0 -1
- package/icons/sortamountupalt/index.esm.js +0 -1
- package/icons/spinner/index.esm.js +0 -1
- package/icons/star/index.esm.js +0 -1
- package/icons/starfill/index.esm.js +0 -1
- package/icons/thlarge/index.esm.js +0 -1
- package/icons/times/index.esm.js +0 -1
- package/icons/timescircle/index.esm.js +0 -1
- package/icons/trash/index.esm.js +0 -1
- package/icons/undo/index.esm.js +0 -1
- package/icons/upload/index.esm.js +0 -1
- package/icons/windowmaximize/index.esm.js +0 -1
- package/icons/windowminimize/index.esm.js +0 -1
- package/image/image.esm.js +2 -1
- package/image/image.esm.min.js +1 -1
- package/inplace/inplace.esm.js +0 -1
- package/inputmask/inputmask.esm.js +0 -1
- package/inputnumber/inputnumber.esm.js +0 -1
- package/inputswitch/inputswitch.esm.js +0 -1
- package/inputtext/inputtext.esm.js +0 -1
- package/inputtextarea/inputtextarea.esm.js +0 -1
- package/keyfilter/keyfilter.esm.js +0 -1
- package/knob/knob.esm.js +0 -1
- package/listbox/listbox.esm.js +0 -1
- package/megamenu/megamenu.esm.js +0 -1
- package/mention/mention.esm.js +0 -1
- package/menu/menu.esm.js +0 -1
- package/menubar/menubar.esm.js +0 -1
- package/message/message.esm.js +0 -1
- package/messages/messages.esm.js +1 -2
- package/messages/messages.esm.min.js +1 -1
- package/multiselect/multiselect.esm.js +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +0 -1
- package/orderlist/orderlist.esm.js +9 -5
- package/orderlist/orderlist.esm.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +0 -1
- package/overlaypanel/overlaypanel.esm.js +0 -1
- package/overlayservice/overlayservice.esm.js +0 -1
- package/package.json +2 -2
- package/paginator/paginator.esm.js +0 -1
- package/panel/panel.esm.js +0 -1
- package/panelmenu/panelmenu.esm.js +0 -1
- package/passthrough/index.esm.js +0 -1
- package/passthrough/tailwind/index.cjs.js +2 -4
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +149 -148
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +2 -4
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.esm.js +0 -1
- package/picklist/picklist.esm.js +0 -1
- package/portal/portal.esm.js +0 -1
- package/primereact.all.cjs.js +12 -7
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +70 -42
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +12 -7
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.esm.js +0 -1
- package/progressspinner/progressspinner.esm.js +0 -1
- package/radiobutton/radiobutton.esm.js +0 -1
- package/rating/rating.esm.js +0 -1
- package/ripple/ripple.esm.js +0 -1
- package/row/row.esm.js +0 -1
- package/scrollpanel/scrollpanel.esm.js +0 -1
- package/scrolltop/scrolltop.esm.js +0 -1
- package/selectbutton/selectbutton.esm.js +0 -1
- package/sidebar/sidebar.esm.js +2 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/skeleton/skeleton.esm.js +0 -1
- package/slidemenu/slidemenu.esm.js +0 -1
- package/slider/slider.esm.js +0 -1
- package/speeddial/speeddial.esm.js +0 -1
- package/splitbutton/splitbutton.esm.js +0 -1
- package/splitter/splitter.esm.js +0 -1
- package/steps/steps.esm.js +0 -1
- package/styleclass/styleclass.esm.js +0 -1
- package/tabmenu/tabmenu.esm.js +0 -1
- package/tabview/tabview.esm.js +0 -1
- package/tag/tag.esm.js +0 -1
- package/terminal/terminal.esm.js +0 -1
- package/terminalservice/terminalservice.esm.js +0 -1
- package/tieredmenu/tieredmenu.esm.js +0 -1
- package/timeline/timeline.esm.js +0 -1
- package/toast/toast.esm.js +0 -1
- package/togglebutton/togglebutton.esm.js +0 -1
- package/toolbar/toolbar.esm.js +0 -1
- package/tooltip/tooltip.esm.js +0 -1
- package/tree/tree.esm.js +0 -1
- package/treeselect/treeselect.esm.js +0 -1
- package/treetable/treetable.esm.js +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +0 -1
- package/utils/utils.esm.js +0 -1
- package/virtualscroller/virtualscroller.esm.js +0 -1
- package/web-types.json +1 -1
- package/accordion/accordion.esm.min.mjs +0 -1
- package/accordion/accordion.esm.mjs +0 -420
- package/api/api.esm.min.mjs +0 -1
- package/api/api.esm.mjs +0 -943
- package/autocomplete/autocomplete.esm.min.mjs +0 -1
- package/autocomplete/autocomplete.esm.mjs +0 -1128
- package/avatar/avatar.esm.min.mjs +0 -1
- package/avatar/avatar.esm.mjs +0 -244
- package/avatargroup/avatargroup.esm.min.mjs +0 -1
- package/avatargroup/avatargroup.esm.mjs +0 -54
- package/badge/badge.esm.min.mjs +0 -1
- package/badge/badge.esm.mjs +0 -109
- package/blockui/blockui.esm.min.mjs +0 -1
- package/blockui/blockui.esm.mjs +0 -267
- package/breadcrumb/breadcrumb.esm.min.mjs +0 -1
- package/breadcrumb/breadcrumb.esm.mjs +0 -350
- package/button/button.esm.min.mjs +0 -1
- package/button/button.esm.mjs +0 -294
- package/calendar/calendar.esm.min.mjs +0 -1
- package/calendar/calendar.esm.mjs +0 -3474
- package/card/card.esm.min.mjs +0 -1
- package/card/card.esm.mjs +0 -97
- package/carousel/carousel.esm.min.mjs +0 -1
- package/carousel/carousel.esm.mjs +0 -800
- package/cascadeselect/cascadeselect.esm.min.mjs +0 -1
- package/cascadeselect/cascadeselect.esm.mjs +0 -818
- package/chart/chart.esm.min.mjs +0 -1
- package/chart/chart.esm.mjs +0 -154
- package/checkbox/checkbox.esm.min.mjs +0 -1
- package/checkbox/checkbox.esm.mjs +0 -356
- package/chip/chip.esm.min.mjs +0 -1
- package/chip/chip.esm.mjs +0 -247
- package/chips/chips.esm.min.mjs +0 -1
- package/chips/chips.esm.mjs +0 -500
- package/colorpicker/colorpicker.esm.min.mjs +0 -1
- package/colorpicker/colorpicker.esm.mjs +0 -787
- package/column/column.esm.min.mjs +0 -1
- package/column/column.esm.mjs +0 -7
- package/columngroup/columngroup.esm.min.mjs +0 -1
- package/columngroup/columngroup.esm.mjs +0 -5
- package/componentbase/componentbase.esm.min.mjs +0 -1
- package/componentbase/componentbase.esm.mjs +0 -328
- package/confirmdialog/confirmdialog.esm.min.mjs +0 -1
- package/confirmdialog/confirmdialog.esm.mjs +0 -375
- package/confirmpopup/confirmpopup.esm.min.mjs +0 -1
- package/confirmpopup/confirmpopup.esm.mjs +0 -609
- package/contextmenu/contextmenu.esm.min.mjs +0 -1
- package/contextmenu/contextmenu.esm.mjs +0 -663
- package/csstransition/csstransition.esm.min.mjs +0 -1
- package/csstransition/csstransition.esm.mjs +0 -137
- package/datascroller/datascroller.esm.min.mjs +0 -1
- package/datascroller/datascroller.esm.mjs +0 -319
- package/datatable/datatable.esm.min.mjs +0 -1
- package/datatable/datatable.esm.mjs +0 -6635
- package/dataview/dataview.esm.min.mjs +0 -1
- package/dataview/dataview.esm.mjs +0 -505
- package/deferredcontent/deferredcontent.esm.min.mjs +0 -1
- package/deferredcontent/deferredcontent.esm.mjs +0 -132
- package/dialog/dialog.esm.min.mjs +0 -1
- package/dialog/dialog.esm.mjs +0 -984
- package/divider/divider.esm.min.mjs +0 -1
- package/divider/divider.esm.mjs +0 -78
- package/dock/dock.esm.min.mjs +0 -1
- package/dock/dock.esm.mjs +0 -347
- package/dropdown/dropdown.esm.min.mjs +0 -1
- package/dropdown/dropdown.esm.mjs +0 -1379
- package/editor/editor.esm.min.mjs +0 -1
- package/editor/editor.esm.mjs +0 -337
- package/fieldset/fieldset.esm.min.mjs +0 -1
- package/fieldset/fieldset.esm.mjs +0 -269
- package/fileupload/fileupload.esm.min.mjs +0 -1
- package/fileupload/fileupload.esm.mjs +0 -1004
- package/galleria/galleria.esm.min.mjs +0 -1
- package/galleria/galleria.esm.mjs +0 -1094
- package/hooks/hooks.esm.min.mjs +0 -1
- package/hooks/hooks.esm.mjs +0 -1036
- package/iconbase/iconbase.esm.min.mjs +0 -1
- package/iconbase/iconbase.esm.mjs +0 -32
- package/icons/angledoubledown/index.esm.min.mjs +0 -1
- package/icons/angledoubledown/index.esm.mjs +0 -38
- package/icons/angledoubleleft/index.esm.min.mjs +0 -1
- package/icons/angledoubleleft/index.esm.mjs +0 -38
- package/icons/angledoubleright/index.esm.min.mjs +0 -1
- package/icons/angledoubleright/index.esm.mjs +0 -38
- package/icons/angledoubleup/index.esm.min.mjs +0 -1
- package/icons/angledoubleup/index.esm.mjs +0 -38
- package/icons/angledown/index.esm.min.mjs +0 -1
- package/icons/angledown/index.esm.mjs +0 -36
- package/icons/angleleft/index.esm.min.mjs +0 -1
- package/icons/angleleft/index.esm.mjs +0 -36
- package/icons/angleright/index.esm.min.mjs +0 -1
- package/icons/angleright/index.esm.mjs +0 -36
- package/icons/angleup/index.esm.min.mjs +0 -1
- package/icons/angleup/index.esm.mjs +0 -36
- package/icons/arrowdown/index.esm.min.mjs +0 -1
- package/icons/arrowdown/index.esm.mjs +0 -660
- package/icons/arrowup/index.esm.min.mjs +0 -1
- package/icons/arrowup/index.esm.mjs +0 -660
- package/icons/ban/index.esm.min.mjs +0 -1
- package/icons/ban/index.esm.mjs +0 -658
- package/icons/bars/index.esm.min.mjs +0 -1
- package/icons/bars/index.esm.mjs +0 -38
- package/icons/calendar/index.esm.min.mjs +0 -1
- package/icons/calendar/index.esm.mjs +0 -36
- package/icons/check/index.esm.min.mjs +0 -1
- package/icons/check/index.esm.mjs +0 -36
- package/icons/chevrondown/index.esm.min.mjs +0 -1
- package/icons/chevrondown/index.esm.mjs +0 -36
- package/icons/chevronleft/index.esm.min.mjs +0 -1
- package/icons/chevronleft/index.esm.mjs +0 -36
- package/icons/chevronright/index.esm.min.mjs +0 -1
- package/icons/chevronright/index.esm.mjs +0 -36
- package/icons/chevronup/index.esm.min.mjs +0 -1
- package/icons/chevronup/index.esm.mjs +0 -36
- package/icons/download/index.esm.min.mjs +0 -1
- package/icons/download/index.esm.mjs +0 -660
- package/icons/exclamationtriangle/index.esm.min.mjs +0 -1
- package/icons/exclamationtriangle/index.esm.mjs +0 -664
- package/icons/eye/index.esm.min.mjs +0 -1
- package/icons/eye/index.esm.mjs +0 -38
- package/icons/eyeslash/index.esm.min.mjs +0 -1
- package/icons/eyeslash/index.esm.mjs +0 -660
- package/icons/filter/index.esm.min.mjs +0 -1
- package/icons/filter/index.esm.mjs +0 -658
- package/icons/filterslash/index.esm.min.mjs +0 -1
- package/icons/filterslash/index.esm.mjs +0 -660
- package/icons/infocircle/index.esm.min.mjs +0 -1
- package/icons/infocircle/index.esm.mjs +0 -660
- package/icons/minus/index.esm.min.mjs +0 -1
- package/icons/minus/index.esm.mjs +0 -36
- package/icons/pencil/index.esm.min.mjs +0 -1
- package/icons/pencil/index.esm.mjs +0 -658
- package/icons/plus/index.esm.min.mjs +0 -1
- package/icons/plus/index.esm.mjs +0 -658
- package/icons/refresh/index.esm.min.mjs +0 -1
- package/icons/refresh/index.esm.mjs +0 -660
- package/icons/search/index.esm.min.mjs +0 -1
- package/icons/search/index.esm.mjs +0 -660
- package/icons/searchminus/index.esm.min.mjs +0 -1
- package/icons/searchminus/index.esm.mjs +0 -660
- package/icons/searchplus/index.esm.min.mjs +0 -1
- package/icons/searchplus/index.esm.mjs +0 -660
- package/icons/sortalt/index.esm.min.mjs +0 -1
- package/icons/sortalt/index.esm.mjs +0 -667
- package/icons/sortamountdown/index.esm.min.mjs +0 -1
- package/icons/sortamountdown/index.esm.mjs +0 -673
- package/icons/sortamountupalt/index.esm.min.mjs +0 -1
- package/icons/sortamountupalt/index.esm.mjs +0 -673
- package/icons/spinner/index.esm.min.mjs +0 -1
- package/icons/spinner/index.esm.mjs +0 -658
- package/icons/star/index.esm.min.mjs +0 -1
- package/icons/star/index.esm.mjs +0 -658
- package/icons/starfill/index.esm.min.mjs +0 -1
- package/icons/starfill/index.esm.mjs +0 -658
- package/icons/thlarge/index.esm.min.mjs +0 -1
- package/icons/thlarge/index.esm.mjs +0 -660
- package/icons/times/index.esm.min.mjs +0 -1
- package/icons/times/index.esm.mjs +0 -36
- package/icons/timescircle/index.esm.min.mjs +0 -1
- package/icons/timescircle/index.esm.mjs +0 -660
- package/icons/trash/index.esm.min.mjs +0 -1
- package/icons/trash/index.esm.mjs +0 -660
- package/icons/undo/index.esm.min.mjs +0 -1
- package/icons/undo/index.esm.mjs +0 -660
- package/icons/upload/index.esm.min.mjs +0 -1
- package/icons/upload/index.esm.mjs +0 -660
- package/icons/windowmaximize/index.esm.min.mjs +0 -1
- package/icons/windowmaximize/index.esm.mjs +0 -660
- package/icons/windowminimize/index.esm.min.mjs +0 -1
- package/icons/windowminimize/index.esm.mjs +0 -660
- package/image/image.esm.min.mjs +0 -1
- package/image/image.esm.mjs +0 -1163
- package/inplace/inplace.esm.min.mjs +0 -1
- package/inplace/inplace.esm.mjs +0 -242
- package/inputmask/inputmask.esm.min.mjs +0 -1
- package/inputmask/inputmask.esm.mjs +0 -559
- package/inputnumber/inputnumber.esm.min.mjs +0 -1
- package/inputnumber/inputnumber.esm.mjs +0 -1208
- package/inputswitch/inputswitch.esm.min.mjs +0 -1
- package/inputswitch/inputswitch.esm.mjs +0 -290
- package/inputtext/inputtext.esm.min.mjs +0 -1
- package/inputtext/inputtext.esm.mjs +0 -170
- package/inputtextarea/inputtextarea.esm.min.mjs +0 -1
- package/inputtextarea/inputtextarea.esm.mjs +0 -219
- package/keyfilter/keyfilter.esm.min.mjs +0 -1
- package/keyfilter/keyfilter.esm.mjs +0 -107
- package/knob/knob.esm.min.mjs +0 -1
- package/knob/knob.esm.mjs +0 -317
- package/listbox/listbox.esm.min.mjs +0 -1
- package/listbox/listbox.esm.mjs +0 -809
- package/megamenu/megamenu.esm.min.mjs +0 -1
- package/megamenu/megamenu.esm.mjs +0 -715
- package/mention/mention.esm.min.mjs +0 -1
- package/mention/mention.esm.mjs +0 -770
- package/menu/menu.esm.min.mjs +0 -1
- package/menu/menu.esm.mjs +0 -484
- package/menubar/menubar.esm.min.mjs +0 -1
- package/menubar/menubar.esm.mjs +0 -583
- package/message/message.esm.min.mjs +0 -1
- package/message/message.esm.mjs +0 -168
- package/messages/messages.esm.min.mjs +0 -1
- package/messages/messages.esm.mjs +0 -438
- package/multiselect/multiselect.esm.min.mjs +0 -1
- package/multiselect/multiselect.esm.mjs +0 -1723
- package/multistatecheckbox/multistatecheckbox.esm.min.mjs +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.mjs +0 -351
- package/orderlist/orderlist.esm.min.mjs +0 -1
- package/orderlist/orderlist.esm.mjs +0 -820
- package/organizationchart/organizationchart.esm.min.mjs +0 -1
- package/organizationchart/organizationchart.esm.mjs +0 -479
- package/overlaypanel/overlaypanel.esm.min.mjs +0 -1
- package/overlaypanel/overlaypanel.esm.mjs +0 -515
- package/overlayservice/overlayservice.esm.min.mjs +0 -1
- package/overlayservice/overlayservice.esm.mjs +0 -6
- package/paginator/paginator.esm.min.mjs +0 -1
- package/paginator/paginator.esm.mjs +0 -932
- package/panel/panel.esm.min.mjs +0 -1
- package/panel/panel.esm.mjs +0 -315
- package/panelmenu/panelmenu.esm.min.mjs +0 -1
- package/panelmenu/panelmenu.esm.mjs +0 -644
- package/passthrough/index.esm.min.mjs +0 -1
- package/passthrough/index.esm.mjs +0 -70
- package/passthrough/tailwind/index.esm.min.mjs +0 -1
- package/passthrough/tailwind/index.esm.mjs +0 -3513
- package/password/password.esm.min.mjs +0 -1
- package/password/password.esm.mjs +0 -566
- package/picklist/picklist.esm.min.mjs +0 -1
- package/picklist/picklist.esm.mjs +0 -1118
- package/portal/portal.esm.min.mjs +0 -1
- package/portal/portal.esm.mjs +0 -109
- package/primereact.all.esm.min.mjs +0 -1
- package/primereact.all.esm.mjs +0 -51669
- package/progressbar/progressbar.esm.min.mjs +0 -1
- package/progressbar/progressbar.esm.mjs +0 -189
- package/progressspinner/progressspinner.esm.min.mjs +0 -1
- package/progressspinner/progressspinner.esm.mjs +0 -87
- package/radiobutton/radiobutton.esm.min.mjs +0 -1
- package/radiobutton/radiobutton.esm.mjs +0 -328
- package/rating/rating.esm.min.mjs +0 -1
- package/rating/rating.esm.mjs +0 -272
- package/ripple/ripple.esm.min.mjs +0 -1
- package/ripple/ripple.esm.mjs +0 -99
- package/row/row.esm.min.mjs +0 -1
- package/row/row.esm.mjs +0 -35
- package/scrollpanel/scrollpanel.esm.min.mjs +0 -1
- package/scrollpanel/scrollpanel.esm.mjs +0 -209
- package/scrolltop/scrolltop.esm.min.mjs +0 -1
- package/scrolltop/scrolltop.esm.mjs +0 -268
- package/selectbutton/selectbutton.esm.min.mjs +0 -1
- package/selectbutton/selectbutton.esm.mjs +0 -326
- package/sidebar/sidebar.esm.min.mjs +0 -1
- package/sidebar/sidebar.esm.mjs +0 -544
- package/skeleton/skeleton.esm.min.mjs +0 -1
- package/skeleton/skeleton.esm.mjs +0 -124
- package/slidemenu/slidemenu.esm.min.mjs +0 -1
- package/slidemenu/slidemenu.esm.mjs +0 -688
- package/slider/slider.esm.min.mjs +0 -1
- package/slider/slider.esm.mjs +0 -477
- package/speeddial/speeddial.esm.min.mjs +0 -1
- package/speeddial/speeddial.esm.mjs +0 -520
- package/splitbutton/splitbutton.esm.min.mjs +0 -1
- package/splitbutton/splitbutton.esm.mjs +0 -544
- package/splitter/splitter.esm.min.mjs +0 -1
- package/splitter/splitter.esm.mjs +0 -465
- package/steps/steps.esm.min.mjs +0 -1
- package/steps/steps.esm.mjs +0 -293
- package/styleclass/styleclass.esm.min.mjs +0 -1
- package/styleclass/styleclass.esm.mjs +0 -268
- package/tabmenu/tabmenu.esm.min.mjs +0 -1
- package/tabmenu/tabmenu.esm.mjs +0 -331
- package/tabview/tabview.esm.min.mjs +0 -1
- package/tabview/tabview.esm.mjs +0 -677
- package/tag/tag.esm.min.mjs +0 -1
- package/tag/tag.esm.mjs +0 -116
- package/terminal/terminal.esm.min.mjs +0 -1
- package/terminal/terminal.esm.mjs +0 -279
- package/terminalservice/terminalservice.esm.min.mjs +0 -1
- package/terminalservice/terminalservice.esm.mjs +0 -6
- package/tieredmenu/tieredmenu.esm.min.mjs +0 -1
- package/tieredmenu/tieredmenu.esm.mjs +0 -698
- package/timeline/timeline.esm.min.mjs +0 -1
- package/timeline/timeline.esm.mjs +0 -163
- package/toast/toast.esm.min.mjs +0 -1
- package/toast/toast.esm.mjs +0 -738
- package/togglebutton/togglebutton.esm.min.mjs +0 -1
- package/togglebutton/togglebutton.esm.mjs +0 -216
- package/toolbar/toolbar.esm.min.mjs +0 -1
- package/toolbar/toolbar.esm.mjs +0 -78
- package/tooltip/tooltip.esm.min.mjs +0 -1
- package/tooltip/tooltip.esm.mjs +0 -695
- package/tree/tree.esm.min.mjs +0 -1
- package/tree/tree.esm.mjs +0 -1402
- package/treeselect/treeselect.esm.min.mjs +0 -1
- package/treeselect/treeselect.esm.mjs +0 -929
- package/treetable/treetable.esm.min.mjs +0 -1
- package/treetable/treetable.esm.mjs +0 -3093
- package/tristatecheckbox/tristatecheckbox.esm.min.mjs +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.mjs +0 -291
- package/utils/utils.esm.min.mjs +0 -1
- package/utils/utils.esm.mjs +0 -2382
- package/virtualscroller/virtualscroller.esm.min.mjs +0 -1
- package/virtualscroller/virtualscroller.esm.mjs +0 -971
|
@@ -1,787 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import PrimeReact, { PrimeReactContext } from 'primereact/api';
|
|
4
|
-
import { useOverlayListener, useEventListener, useMountEffect, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
5
|
-
import { OverlayService } from 'primereact/overlayservice';
|
|
6
|
-
import { Tooltip } from 'primereact/tooltip';
|
|
7
|
-
import { classNames, mergeProps, DomHandler, ObjectUtils, ZIndexUtils } from 'primereact/utils';
|
|
8
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
9
|
-
import { CSSTransition } from 'primereact/csstransition';
|
|
10
|
-
import { Portal } from 'primereact/portal';
|
|
11
|
-
|
|
12
|
-
function _typeof(o) {
|
|
13
|
-
"@babel/helpers - typeof";
|
|
14
|
-
|
|
15
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
16
|
-
return typeof o;
|
|
17
|
-
} : function (o) {
|
|
18
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
19
|
-
}, _typeof(o);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function _toPrimitive(input, hint) {
|
|
23
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
24
|
-
var prim = input[Symbol.toPrimitive];
|
|
25
|
-
if (prim !== undefined) {
|
|
26
|
-
var res = prim.call(input, hint || "default");
|
|
27
|
-
if (_typeof(res) !== "object") return res;
|
|
28
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
29
|
-
}
|
|
30
|
-
return (hint === "string" ? String : Number)(input);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function _toPropertyKey(arg) {
|
|
34
|
-
var key = _toPrimitive(arg, "string");
|
|
35
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function _defineProperty(obj, key, value) {
|
|
39
|
-
key = _toPropertyKey(key);
|
|
40
|
-
if (key in obj) {
|
|
41
|
-
Object.defineProperty(obj, key, {
|
|
42
|
-
value: value,
|
|
43
|
-
enumerable: true,
|
|
44
|
-
configurable: true,
|
|
45
|
-
writable: true
|
|
46
|
-
});
|
|
47
|
-
} else {
|
|
48
|
-
obj[key] = value;
|
|
49
|
-
}
|
|
50
|
-
return obj;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function _extends() {
|
|
54
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
55
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
56
|
-
var source = arguments[i];
|
|
57
|
-
for (var key in source) {
|
|
58
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
59
|
-
target[key] = source[key];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return target;
|
|
64
|
-
};
|
|
65
|
-
return _extends.apply(this, arguments);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _arrayWithHoles(arr) {
|
|
69
|
-
if (Array.isArray(arr)) return arr;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _iterableToArrayLimit(r, l) {
|
|
73
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
74
|
-
if (null != t) {
|
|
75
|
-
var e,
|
|
76
|
-
n,
|
|
77
|
-
i,
|
|
78
|
-
u,
|
|
79
|
-
a = [],
|
|
80
|
-
f = !0,
|
|
81
|
-
o = !1;
|
|
82
|
-
try {
|
|
83
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
84
|
-
if (Object(t) !== t) return;
|
|
85
|
-
f = !1;
|
|
86
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
87
|
-
} catch (r) {
|
|
88
|
-
o = !0, n = r;
|
|
89
|
-
} finally {
|
|
90
|
-
try {
|
|
91
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
92
|
-
} finally {
|
|
93
|
-
if (o) throw n;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return a;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function _arrayLikeToArray(arr, len) {
|
|
101
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
102
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
103
|
-
return arr2;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
107
|
-
if (!o) return;
|
|
108
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
109
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
110
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
111
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
112
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function _nonIterableRest() {
|
|
116
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function _slicedToArray(arr, i) {
|
|
120
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
var classes = {
|
|
124
|
-
root: function root(_ref) {
|
|
125
|
-
var props = _ref.props;
|
|
126
|
-
return classNames('p-colorpicker p-component', {
|
|
127
|
-
'p-colorpicker-overlay': !props.inline
|
|
128
|
-
}, props.className);
|
|
129
|
-
},
|
|
130
|
-
input: function input(_ref2) {
|
|
131
|
-
var props = _ref2.props;
|
|
132
|
-
return classNames('p-colorpicker-preview p-inputtext', props.inputClassName, {
|
|
133
|
-
'p-disabled': props.disabled
|
|
134
|
-
});
|
|
135
|
-
},
|
|
136
|
-
panel: function panel(_ref3) {
|
|
137
|
-
var panelProps = _ref3.panelProps,
|
|
138
|
-
context = _ref3.context;
|
|
139
|
-
return classNames('p-colorpicker-panel', panelProps.panelClassName, {
|
|
140
|
-
'p-colorpicker-overlay-panel': !panelProps.inline,
|
|
141
|
-
'p-disabled': panelProps.disabled,
|
|
142
|
-
'p-input-filled': context && context.inputStyle === 'filled' || PrimeReact.inputStyle === 'filled',
|
|
143
|
-
'p-ripple-disabled': context && context.ripple === false || PrimeReact.ripple === false
|
|
144
|
-
});
|
|
145
|
-
},
|
|
146
|
-
content: 'p-colorpicker-content',
|
|
147
|
-
hueHandle: 'p-colorpicker-hue-handle',
|
|
148
|
-
hue: 'p-colorpicker-hue',
|
|
149
|
-
colorHandle: 'p-colorpicker-color-handle',
|
|
150
|
-
color: 'p-colorpicker-color',
|
|
151
|
-
selector: 'p-colorpicker-color-selector',
|
|
152
|
-
transition: 'p-connected-overlay'
|
|
153
|
-
};
|
|
154
|
-
var styles = "\n@layer primereact {\n .p-colorpicker {\n display: inline-block;\n }\n \n .p-colorpicker-dragging {\n cursor: pointer;\n }\n \n .p-colorpicker-overlay {\n position: relative;\n }\n \n .p-colorpicker-panel {\n position: relative;\n width: 193px;\n height: 166px;\n }\n \n .p-colorpicker-overlay-panel {\n position: absolute;\n top: 0;\n left: 0;\n }\n \n .p-colorpicker-preview {\n cursor: pointer;\n }\n \n .p-colorpicker-panel .p-colorpicker-content {\n position: relative;\n }\n \n .p-colorpicker-panel .p-colorpicker-color-selector {\n width: 150px;\n height: 150px;\n top: 8px;\n left: 8px;\n position: absolute;\n }\n \n .p-colorpicker-panel .p-colorpicker-color {\n width: 150px;\n height: 150px;\n }\n \n .p-colorpicker-panel .p-colorpicker-color-handle {\n position: absolute;\n top: 0px;\n left: 150px;\n border-radius: 100%;\n width: 10px;\n height: 10px;\n border-width: 1px;\n border-style: solid;\n margin: -5px 0 0 -5px;\n cursor: pointer;\n opacity: 0.85;\n }\n \n .p-colorpicker-panel .p-colorpicker-hue {\n width: 17px;\n height: 150px;\n top: 8px;\n left: 167px;\n position: absolute;\n opacity: 0.85;\n }\n \n .p-colorpicker-panel .p-colorpicker-hue-handle {\n position: absolute;\n top: 150px;\n left: 0px;\n width: 21px;\n margin-left: -2px;\n margin-top: -5px;\n height: 10px;\n border-width: 2px;\n border-style: solid;\n opacity: 0.85;\n cursor: pointer;\n }\n \n .p-colorpicker-panel .p-colorpicker-color {\n background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0) 100%), linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0) 100%)\n }\n .p-colorpicker-panel .p-colorpicker-hue {\n background: linear-gradient(0deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red)\n }\n}\n";
|
|
155
|
-
var ColorPickerBase = ComponentBase.extend({
|
|
156
|
-
defaultProps: {
|
|
157
|
-
__TYPE: 'ColorPicker',
|
|
158
|
-
appendTo: null,
|
|
159
|
-
autoFocus: false,
|
|
160
|
-
children: undefined,
|
|
161
|
-
className: null,
|
|
162
|
-
defaultColor: 'ff0000',
|
|
163
|
-
disabled: false,
|
|
164
|
-
format: 'hex',
|
|
165
|
-
id: null,
|
|
166
|
-
inline: false,
|
|
167
|
-
inputClassName: null,
|
|
168
|
-
inputId: null,
|
|
169
|
-
inputRef: null,
|
|
170
|
-
inputStyle: null,
|
|
171
|
-
onChange: null,
|
|
172
|
-
onHide: null,
|
|
173
|
-
onShow: null,
|
|
174
|
-
panelClassName: null,
|
|
175
|
-
panelStyle: null,
|
|
176
|
-
style: null,
|
|
177
|
-
tabIndex: null,
|
|
178
|
-
tooltip: null,
|
|
179
|
-
tooltipOptions: null,
|
|
180
|
-
transitionOptions: null,
|
|
181
|
-
value: null
|
|
182
|
-
},
|
|
183
|
-
css: {
|
|
184
|
-
classes: classes,
|
|
185
|
-
styles: styles
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
var ColorPickerPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
190
|
-
var context = React.useContext(PrimeReactContext);
|
|
191
|
-
var ptm = props.ptm,
|
|
192
|
-
cx = props.cx;
|
|
193
|
-
var createElement = function createElement() {
|
|
194
|
-
var panelProps = mergeProps({
|
|
195
|
-
className: cx('panel', {
|
|
196
|
-
panelProps: props,
|
|
197
|
-
context: context
|
|
198
|
-
}),
|
|
199
|
-
style: props.panelStyle,
|
|
200
|
-
onClick: props.onClick
|
|
201
|
-
}, ptm('panel', {
|
|
202
|
-
hostName: props.hostName
|
|
203
|
-
}));
|
|
204
|
-
var transitionProps = mergeProps({
|
|
205
|
-
classNames: cx('transition'),
|
|
206
|
-
"in": props["in"],
|
|
207
|
-
timeout: {
|
|
208
|
-
enter: 120,
|
|
209
|
-
exit: 100
|
|
210
|
-
},
|
|
211
|
-
options: props.transitionOptions,
|
|
212
|
-
unmountOnExit: true,
|
|
213
|
-
onEnter: props.onEnter,
|
|
214
|
-
onEntered: props.onEntered,
|
|
215
|
-
onExit: props.onExit,
|
|
216
|
-
onExited: props.onExited
|
|
217
|
-
}, ptm('transition', {
|
|
218
|
-
hostName: props.hostName
|
|
219
|
-
}));
|
|
220
|
-
return /*#__PURE__*/React.createElement(CSSTransition, _extends({
|
|
221
|
-
nodeRef: ref
|
|
222
|
-
}, transitionProps), /*#__PURE__*/React.createElement("div", _extends({
|
|
223
|
-
ref: ref
|
|
224
|
-
}, panelProps), props.children));
|
|
225
|
-
};
|
|
226
|
-
var element = createElement();
|
|
227
|
-
return props.inline ? element : /*#__PURE__*/React.createElement(Portal, {
|
|
228
|
-
element: element,
|
|
229
|
-
appendTo: props.appendTo
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
|
-
ColorPickerPanel.displayName = 'ColorPickerPanel';
|
|
233
|
-
|
|
234
|
-
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; }
|
|
235
|
-
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; }
|
|
236
|
-
var ColorPicker = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
237
|
-
var context = React.useContext(PrimeReactContext);
|
|
238
|
-
var props = ColorPickerBase.getProps(inProps, context);
|
|
239
|
-
var _React$useState = React.useState(false),
|
|
240
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
241
|
-
overlayVisibleState = _React$useState2[0],
|
|
242
|
-
setOverlayVisibleState = _React$useState2[1];
|
|
243
|
-
var _ColorPickerBase$setM = ColorPickerBase.setMetaData({
|
|
244
|
-
props: props,
|
|
245
|
-
state: {
|
|
246
|
-
overlayVisible: overlayVisibleState
|
|
247
|
-
}
|
|
248
|
-
}),
|
|
249
|
-
ptm = _ColorPickerBase$setM.ptm,
|
|
250
|
-
cx = _ColorPickerBase$setM.cx,
|
|
251
|
-
isUnstyled = _ColorPickerBase$setM.isUnstyled;
|
|
252
|
-
useHandleStyle(ColorPickerBase.css.styles, isUnstyled, {
|
|
253
|
-
name: 'colorpicker'
|
|
254
|
-
});
|
|
255
|
-
var elementRef = React.useRef(null);
|
|
256
|
-
var overlayRef = React.useRef(null);
|
|
257
|
-
var inputRef = React.useRef(props.inputRef);
|
|
258
|
-
var colorSelectorRef = React.useRef(null);
|
|
259
|
-
var colorHandleRef = React.useRef(null);
|
|
260
|
-
var hueHandleRef = React.useRef(null);
|
|
261
|
-
var hueViewRef = React.useRef(null);
|
|
262
|
-
var hueDragging = React.useRef(false);
|
|
263
|
-
var hsbValue = React.useRef(null);
|
|
264
|
-
var colorDragging = React.useRef(false);
|
|
265
|
-
var _useOverlayListener = useOverlayListener({
|
|
266
|
-
target: elementRef,
|
|
267
|
-
overlay: overlayRef,
|
|
268
|
-
listener: function listener(event, _ref) {
|
|
269
|
-
var valid = _ref.valid;
|
|
270
|
-
valid && hide();
|
|
271
|
-
},
|
|
272
|
-
when: overlayVisibleState
|
|
273
|
-
}),
|
|
274
|
-
_useOverlayListener2 = _slicedToArray(_useOverlayListener, 2),
|
|
275
|
-
bindOverlayListener = _useOverlayListener2[0],
|
|
276
|
-
unbindOverlayListener = _useOverlayListener2[1];
|
|
277
|
-
var _useEventListener = useEventListener({
|
|
278
|
-
type: 'mousemove',
|
|
279
|
-
listener: function listener(event) {
|
|
280
|
-
colorDragging.current && pickColor(event);
|
|
281
|
-
hueDragging.current && pickHue(event);
|
|
282
|
-
}
|
|
283
|
-
}),
|
|
284
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
285
|
-
bindDocumentMouseMoveListener = _useEventListener2[0],
|
|
286
|
-
unbindDocumentMouseMoveListener = _useEventListener2[1];
|
|
287
|
-
var _useEventListener3 = useEventListener({
|
|
288
|
-
type: 'mouseup',
|
|
289
|
-
listener: function listener() {
|
|
290
|
-
colorDragging.current = hueDragging.current = false;
|
|
291
|
-
DomHandler.removeClass(elementRef.current, 'p-colorpicker-dragging');
|
|
292
|
-
unbindDocumentMouseMoveListener();
|
|
293
|
-
unbindDocumentMouseUpListener();
|
|
294
|
-
}
|
|
295
|
-
}),
|
|
296
|
-
_useEventListener4 = _slicedToArray(_useEventListener3, 2),
|
|
297
|
-
bindDocumentMouseUpListener = _useEventListener4[0],
|
|
298
|
-
unbindDocumentMouseUpListener = _useEventListener4[1];
|
|
299
|
-
var onPanelClick = function onPanelClick(event) {
|
|
300
|
-
if (!props.inline) {
|
|
301
|
-
OverlayService.emit('overlay-click', {
|
|
302
|
-
originalEvent: event,
|
|
303
|
-
target: elementRef.current
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
var onHueMousedown = function onHueMousedown(event) {
|
|
308
|
-
if (props.disabled) {
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
bindDragListeners();
|
|
312
|
-
onHueDragStart(event);
|
|
313
|
-
};
|
|
314
|
-
var onHueDragStart = function onHueDragStart(event) {
|
|
315
|
-
if (props.disabled) {
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
hueDragging.current = true;
|
|
319
|
-
pickHue(event);
|
|
320
|
-
!isUnstyled && DomHandler.addClass(elementRef.current, 'p-colorpicker-dragging');
|
|
321
|
-
};
|
|
322
|
-
var pickHue = function pickHue(event) {
|
|
323
|
-
var top = hueViewRef.current.getBoundingClientRect().top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);
|
|
324
|
-
hsbValue.current = validateHSB({
|
|
325
|
-
h: Math.floor(360 * (150 - Math.max(0, Math.min(150, (event.pageY || event.changedTouches[0].pageY) - top))) / 150),
|
|
326
|
-
s: 100,
|
|
327
|
-
b: 100
|
|
328
|
-
});
|
|
329
|
-
updateColorSelector();
|
|
330
|
-
updateHue();
|
|
331
|
-
updateModel();
|
|
332
|
-
};
|
|
333
|
-
var onColorMousedown = function onColorMousedown(event) {
|
|
334
|
-
if (props.disabled) {
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
bindDragListeners();
|
|
338
|
-
onColorDragStart(event);
|
|
339
|
-
};
|
|
340
|
-
var onColorDragStart = function onColorDragStart(event) {
|
|
341
|
-
if (props.disabled) {
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
colorDragging.current = true;
|
|
345
|
-
pickColor(event);
|
|
346
|
-
!isUnstyled && DomHandler.addClass(elementRef.current, 'p-colorpicker-dragging');
|
|
347
|
-
event.preventDefault();
|
|
348
|
-
};
|
|
349
|
-
var onDrag = function onDrag(event) {
|
|
350
|
-
if (colorDragging.current) {
|
|
351
|
-
pickColor(event);
|
|
352
|
-
event.preventDefault();
|
|
353
|
-
}
|
|
354
|
-
if (hueDragging.current) {
|
|
355
|
-
pickHue(event);
|
|
356
|
-
event.preventDefault();
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
var onDragEnd = function onDragEnd() {
|
|
360
|
-
colorDragging.current = false;
|
|
361
|
-
hueDragging.current = false;
|
|
362
|
-
!isUnstyled && DomHandler.removeClass(elementRef.current, 'p-colorpicker-dragging');
|
|
363
|
-
unbindDragListeners();
|
|
364
|
-
};
|
|
365
|
-
var bindDragListeners = function bindDragListeners() {
|
|
366
|
-
bindDocumentMouseMoveListener();
|
|
367
|
-
bindDocumentMouseUpListener();
|
|
368
|
-
};
|
|
369
|
-
var unbindDragListeners = function unbindDragListeners() {
|
|
370
|
-
unbindDocumentMouseMoveListener();
|
|
371
|
-
unbindDocumentMouseUpListener();
|
|
372
|
-
};
|
|
373
|
-
var pickColor = function pickColor(event) {
|
|
374
|
-
var rect = colorSelectorRef.current.getBoundingClientRect();
|
|
375
|
-
var top = rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);
|
|
376
|
-
var left = rect.left + document.body.scrollLeft;
|
|
377
|
-
var saturation = Math.floor(100 * Math.max(0, Math.min(150, (event.pageX || event.changedTouches[0].pageX) - left)) / 150);
|
|
378
|
-
var brightness = Math.floor(100 * (150 - Math.max(0, Math.min(150, (event.pageY || event.changedTouches[0].pageY) - top))) / 150);
|
|
379
|
-
hsbValue.current = validateHSB({
|
|
380
|
-
h: hsbValue.current.h,
|
|
381
|
-
s: saturation,
|
|
382
|
-
b: brightness
|
|
383
|
-
});
|
|
384
|
-
updateColorHandle();
|
|
385
|
-
updateInput();
|
|
386
|
-
updateModel();
|
|
387
|
-
};
|
|
388
|
-
var updateModel = function updateModel() {
|
|
389
|
-
switch (props.format) {
|
|
390
|
-
case 'hex':
|
|
391
|
-
onChange(HSBtoHEX(hsbValue.current));
|
|
392
|
-
break;
|
|
393
|
-
case 'rgb':
|
|
394
|
-
onChange(HSBtoRGB(hsbValue.current));
|
|
395
|
-
break;
|
|
396
|
-
case 'hsb':
|
|
397
|
-
onChange(hsbValue.current);
|
|
398
|
-
break;
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
var toHSB = function toHSB(value) {
|
|
402
|
-
var hsb;
|
|
403
|
-
if (value) {
|
|
404
|
-
switch (props.format) {
|
|
405
|
-
case 'hex':
|
|
406
|
-
hsb = HEXtoHSB(value);
|
|
407
|
-
break;
|
|
408
|
-
case 'rgb':
|
|
409
|
-
hsb = RGBtoHSB(value);
|
|
410
|
-
break;
|
|
411
|
-
case 'hsb':
|
|
412
|
-
hsb = value;
|
|
413
|
-
break;
|
|
414
|
-
}
|
|
415
|
-
} else {
|
|
416
|
-
hsb = HEXtoHSB(props.defaultColor);
|
|
417
|
-
}
|
|
418
|
-
return hsb;
|
|
419
|
-
};
|
|
420
|
-
var updateHSBValue = function updateHSBValue(value) {
|
|
421
|
-
hsbValue.current = toHSB(value);
|
|
422
|
-
};
|
|
423
|
-
var onChange = function onChange(value) {
|
|
424
|
-
if (props.onChange) {
|
|
425
|
-
props.onChange({
|
|
426
|
-
value: value,
|
|
427
|
-
stopPropagation: function stopPropagation() {},
|
|
428
|
-
preventDefault: function preventDefault() {},
|
|
429
|
-
target: {
|
|
430
|
-
name: props.name,
|
|
431
|
-
id: props.id,
|
|
432
|
-
value: value
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
var updateColorSelector = function updateColorSelector() {
|
|
438
|
-
if (colorSelectorRef.current) {
|
|
439
|
-
var newHsbValue = validateHSB({
|
|
440
|
-
h: hsbValue.current.h,
|
|
441
|
-
s: 100,
|
|
442
|
-
b: 100
|
|
443
|
-
});
|
|
444
|
-
colorSelectorRef.current.style.backgroundColor = '#' + HSBtoHEX(newHsbValue);
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
var updateColorHandle = function updateColorHandle() {
|
|
448
|
-
if (colorHandleRef.current) {
|
|
449
|
-
colorHandleRef.current.style.left = Math.floor(150 * hsbValue.current.s / 100) + 'px';
|
|
450
|
-
colorHandleRef.current.style.top = Math.floor(150 * (100 - hsbValue.current.b) / 100) + 'px';
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
var updateHue = function updateHue() {
|
|
454
|
-
if (hueHandleRef.current) {
|
|
455
|
-
hueHandleRef.current.style.top = Math.floor(150 - 150 * hsbValue.current.h / 360) + 'px';
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
var updateInput = function updateInput() {
|
|
459
|
-
if (inputRef.current) {
|
|
460
|
-
inputRef.current.style.backgroundColor = '#' + HSBtoHEX(hsbValue.current);
|
|
461
|
-
}
|
|
462
|
-
};
|
|
463
|
-
var show = function show() {
|
|
464
|
-
setOverlayVisibleState(true);
|
|
465
|
-
};
|
|
466
|
-
var hide = function hide() {
|
|
467
|
-
setOverlayVisibleState(false);
|
|
468
|
-
};
|
|
469
|
-
var onOverlayEnter = function onOverlayEnter() {
|
|
470
|
-
var styles = !props.inline ? {
|
|
471
|
-
position: 'absolute',
|
|
472
|
-
top: '0',
|
|
473
|
-
left: '0'
|
|
474
|
-
} : undefined;
|
|
475
|
-
ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['overlay'] || PrimeReact.zIndex['overlay']);
|
|
476
|
-
DomHandler.addStyles(overlayRef.current, styles);
|
|
477
|
-
alignOverlay();
|
|
478
|
-
};
|
|
479
|
-
var onOverlayEntered = function onOverlayEntered() {
|
|
480
|
-
bindOverlayListener();
|
|
481
|
-
props.onShow && props.onShow();
|
|
482
|
-
};
|
|
483
|
-
var onOverlayExit = function onOverlayExit() {
|
|
484
|
-
unbindOverlayListener();
|
|
485
|
-
};
|
|
486
|
-
var onOverlayExited = function onOverlayExited() {
|
|
487
|
-
ZIndexUtils.clear(overlayRef.current);
|
|
488
|
-
props.onHide && props.onHide();
|
|
489
|
-
};
|
|
490
|
-
var onInputClick = function onInputClick() {
|
|
491
|
-
togglePanel();
|
|
492
|
-
};
|
|
493
|
-
var togglePanel = function togglePanel() {
|
|
494
|
-
overlayVisibleState ? hide() : show();
|
|
495
|
-
};
|
|
496
|
-
var onInputKeydown = function onInputKeydown(event) {
|
|
497
|
-
switch (event.which) {
|
|
498
|
-
//space
|
|
499
|
-
case 32:
|
|
500
|
-
togglePanel();
|
|
501
|
-
event.preventDefault();
|
|
502
|
-
break;
|
|
503
|
-
|
|
504
|
-
//escape and tab
|
|
505
|
-
case 27:
|
|
506
|
-
case 9:
|
|
507
|
-
hide();
|
|
508
|
-
break;
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
var validateHSB = function validateHSB(hsb) {
|
|
512
|
-
return {
|
|
513
|
-
h: Math.min(360, Math.max(0, hsb.h)),
|
|
514
|
-
s: Math.min(100, Math.max(0, hsb.s)),
|
|
515
|
-
b: Math.min(100, Math.max(0, hsb.b))
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
var HEXtoRGB = function HEXtoRGB(hex) {
|
|
519
|
-
var hexValue = parseInt(hex.indexOf('#') > -1 ? hex.substring(1) : hex, 16);
|
|
520
|
-
return {
|
|
521
|
-
r: hexValue >> 16,
|
|
522
|
-
g: (hexValue & 0x00ff00) >> 8,
|
|
523
|
-
b: hexValue & 0x0000ff
|
|
524
|
-
};
|
|
525
|
-
};
|
|
526
|
-
var HEXtoHSB = function HEXtoHSB(hex) {
|
|
527
|
-
return RGBtoHSB(HEXtoRGB(hex));
|
|
528
|
-
};
|
|
529
|
-
var RGBtoHSB = function RGBtoHSB(rgb) {
|
|
530
|
-
var hsb = {
|
|
531
|
-
h: 0,
|
|
532
|
-
s: 0,
|
|
533
|
-
b: 0
|
|
534
|
-
};
|
|
535
|
-
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
|
536
|
-
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
|
537
|
-
var delta = max - min;
|
|
538
|
-
hsb.b = max;
|
|
539
|
-
hsb.s = max !== 0 ? 255 * delta / max : 0;
|
|
540
|
-
if (hsb.s !== 0) {
|
|
541
|
-
if (rgb.r === max) {
|
|
542
|
-
hsb.h = (rgb.g - rgb.b) / delta;
|
|
543
|
-
} else if (rgb.g === max) {
|
|
544
|
-
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
|
545
|
-
} else {
|
|
546
|
-
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
|
547
|
-
}
|
|
548
|
-
} else {
|
|
549
|
-
hsb.h = -1;
|
|
550
|
-
}
|
|
551
|
-
hsb.h *= 60;
|
|
552
|
-
if (hsb.h < 0) {
|
|
553
|
-
hsb.h += 360;
|
|
554
|
-
}
|
|
555
|
-
hsb.s *= 100 / 255;
|
|
556
|
-
hsb.b *= 100 / 255;
|
|
557
|
-
return hsb;
|
|
558
|
-
};
|
|
559
|
-
var HSBtoRGB = function HSBtoRGB(hsb) {
|
|
560
|
-
var rgb = {
|
|
561
|
-
r: null,
|
|
562
|
-
g: null,
|
|
563
|
-
b: null
|
|
564
|
-
};
|
|
565
|
-
var h = Math.round(hsb.h);
|
|
566
|
-
var s = Math.round(hsb.s * 255 / 100);
|
|
567
|
-
var v = Math.round(hsb.b * 255 / 100);
|
|
568
|
-
if (s === 0) {
|
|
569
|
-
rgb = {
|
|
570
|
-
r: v,
|
|
571
|
-
g: v,
|
|
572
|
-
b: v
|
|
573
|
-
};
|
|
574
|
-
} else {
|
|
575
|
-
var t1 = v;
|
|
576
|
-
var t2 = (255 - s) * v / 255;
|
|
577
|
-
var t3 = (t1 - t2) * (h % 60) / 60;
|
|
578
|
-
if (h === 360) h = 0;
|
|
579
|
-
if (h < 60) {
|
|
580
|
-
rgb.r = t1;
|
|
581
|
-
rgb.b = t2;
|
|
582
|
-
rgb.g = t2 + t3;
|
|
583
|
-
} else if (h < 120) {
|
|
584
|
-
rgb.g = t1;
|
|
585
|
-
rgb.b = t2;
|
|
586
|
-
rgb.r = t1 - t3;
|
|
587
|
-
} else if (h < 180) {
|
|
588
|
-
rgb.g = t1;
|
|
589
|
-
rgb.r = t2;
|
|
590
|
-
rgb.b = t2 + t3;
|
|
591
|
-
} else if (h < 240) {
|
|
592
|
-
rgb.b = t1;
|
|
593
|
-
rgb.r = t2;
|
|
594
|
-
rgb.g = t1 - t3;
|
|
595
|
-
} else if (h < 300) {
|
|
596
|
-
rgb.b = t1;
|
|
597
|
-
rgb.g = t2;
|
|
598
|
-
rgb.r = t2 + t3;
|
|
599
|
-
} else if (h < 360) {
|
|
600
|
-
rgb.r = t1;
|
|
601
|
-
rgb.g = t2;
|
|
602
|
-
rgb.b = t1 - t3;
|
|
603
|
-
} else {
|
|
604
|
-
rgb.r = 0;
|
|
605
|
-
rgb.g = 0;
|
|
606
|
-
rgb.b = 0;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
return {
|
|
610
|
-
r: Math.round(rgb.r),
|
|
611
|
-
g: Math.round(rgb.g),
|
|
612
|
-
b: Math.round(rgb.b)
|
|
613
|
-
};
|
|
614
|
-
};
|
|
615
|
-
var RGBtoHEX = function RGBtoHEX(rgb) {
|
|
616
|
-
var hex = [rgb.r.toString(16), rgb.g.toString(16), rgb.b.toString(16)];
|
|
617
|
-
for (var key in hex) {
|
|
618
|
-
if (hex[key].length === 1) {
|
|
619
|
-
hex[key] = '0' + hex[key];
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
return hex.join('');
|
|
623
|
-
};
|
|
624
|
-
var HSBtoHEX = function HSBtoHEX(hsb) {
|
|
625
|
-
return RGBtoHEX(HSBtoRGB(hsb));
|
|
626
|
-
};
|
|
627
|
-
var updateUI = function updateUI() {
|
|
628
|
-
updateHue();
|
|
629
|
-
updateColorHandle();
|
|
630
|
-
updateInput();
|
|
631
|
-
updateColorSelector();
|
|
632
|
-
};
|
|
633
|
-
var alignOverlay = function alignOverlay() {
|
|
634
|
-
if (inputRef.current) {
|
|
635
|
-
DomHandler.alignOverlay(overlayRef.current, inputRef.current.parentElement, props.appendTo || context && context.appendTo || PrimeReact.appendTo);
|
|
636
|
-
}
|
|
637
|
-
};
|
|
638
|
-
React.useImperativeHandle(ref, function () {
|
|
639
|
-
return {
|
|
640
|
-
props: props,
|
|
641
|
-
show: show,
|
|
642
|
-
hide: hide,
|
|
643
|
-
focus: function focus() {
|
|
644
|
-
return DomHandler.focus(inputRef.current);
|
|
645
|
-
},
|
|
646
|
-
getElement: function getElement() {
|
|
647
|
-
return elementRef.current;
|
|
648
|
-
},
|
|
649
|
-
getOverlay: function getOverlay() {
|
|
650
|
-
return overlayRef.current;
|
|
651
|
-
},
|
|
652
|
-
getInput: function getInput() {
|
|
653
|
-
return inputRef.current;
|
|
654
|
-
}
|
|
655
|
-
};
|
|
656
|
-
});
|
|
657
|
-
React.useEffect(function () {
|
|
658
|
-
ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
659
|
-
}, [inputRef, props.inputRef]);
|
|
660
|
-
useMountEffect(function () {
|
|
661
|
-
updateHSBValue(props.value);
|
|
662
|
-
updateUI();
|
|
663
|
-
if (props.autoFocus) {
|
|
664
|
-
DomHandler.focus(inputRef.current, props.autoFocus);
|
|
665
|
-
}
|
|
666
|
-
});
|
|
667
|
-
useUpdateEffect(function () {
|
|
668
|
-
if (!colorDragging.current && !hueDragging.current) {
|
|
669
|
-
updateHSBValue(props.value);
|
|
670
|
-
}
|
|
671
|
-
}, [props.value]);
|
|
672
|
-
useUpdateEffect(function () {
|
|
673
|
-
updateUI();
|
|
674
|
-
});
|
|
675
|
-
useUnmountEffect(function () {
|
|
676
|
-
ZIndexUtils.clear(overlayRef.current);
|
|
677
|
-
});
|
|
678
|
-
var createColorSelector = function createColorSelector() {
|
|
679
|
-
var selectorProps = mergeProps({
|
|
680
|
-
ref: colorSelectorRef,
|
|
681
|
-
className: cx('selector'),
|
|
682
|
-
onMouseDown: function onMouseDown(e) {
|
|
683
|
-
return onColorMousedown(e);
|
|
684
|
-
},
|
|
685
|
-
onTouchStart: function onTouchStart(e) {
|
|
686
|
-
return onColorDragStart(e);
|
|
687
|
-
},
|
|
688
|
-
onTouchMove: function onTouchMove(e) {
|
|
689
|
-
return onDrag(e);
|
|
690
|
-
},
|
|
691
|
-
onTouchEnd: onDragEnd
|
|
692
|
-
}, ptm('selector'));
|
|
693
|
-
var colorProps = mergeProps({
|
|
694
|
-
className: cx('color')
|
|
695
|
-
}, ptm('color'));
|
|
696
|
-
var colorHandlerProps = mergeProps({
|
|
697
|
-
ref: colorHandleRef,
|
|
698
|
-
className: cx('colorHandle')
|
|
699
|
-
}, ptm('colorHandle'));
|
|
700
|
-
return /*#__PURE__*/React.createElement("div", selectorProps, /*#__PURE__*/React.createElement("div", colorProps, /*#__PURE__*/React.createElement("div", colorHandlerProps)));
|
|
701
|
-
};
|
|
702
|
-
var createHue = function createHue() {
|
|
703
|
-
var hueProps = mergeProps({
|
|
704
|
-
className: cx('hue'),
|
|
705
|
-
onMouseDown: function onMouseDown(e) {
|
|
706
|
-
return onHueMousedown(e);
|
|
707
|
-
},
|
|
708
|
-
onTouchStart: function onTouchStart(e) {
|
|
709
|
-
return onHueDragStart(e);
|
|
710
|
-
},
|
|
711
|
-
onTouchMove: function onTouchMove(e) {
|
|
712
|
-
return onDrag(e);
|
|
713
|
-
},
|
|
714
|
-
onTouchEnd: onDragEnd
|
|
715
|
-
}, ptm('hue'));
|
|
716
|
-
var hueHandlerProps = mergeProps({
|
|
717
|
-
className: cx('hueHandle')
|
|
718
|
-
}, ptm('hueHandle'));
|
|
719
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
720
|
-
ref: hueViewRef
|
|
721
|
-
}, hueProps), /*#__PURE__*/React.createElement("div", _extends({
|
|
722
|
-
ref: hueHandleRef
|
|
723
|
-
}, hueHandlerProps)));
|
|
724
|
-
};
|
|
725
|
-
var createContent = function createContent() {
|
|
726
|
-
var colorSelector = createColorSelector();
|
|
727
|
-
var hue = createHue();
|
|
728
|
-
var contentProps = mergeProps({
|
|
729
|
-
className: cx('content')
|
|
730
|
-
}, ptm('content'));
|
|
731
|
-
return /*#__PURE__*/React.createElement("div", contentProps, colorSelector, hue);
|
|
732
|
-
};
|
|
733
|
-
var createInput = function createInput() {
|
|
734
|
-
if (!props.inline) {
|
|
735
|
-
var inputProps = ColorPickerBase.getOtherProps(props);
|
|
736
|
-
var _inputProps = mergeProps(_objectSpread({
|
|
737
|
-
ref: inputRef,
|
|
738
|
-
type: 'text',
|
|
739
|
-
readOnly: true,
|
|
740
|
-
className: cx('input'),
|
|
741
|
-
style: props.inputStyle,
|
|
742
|
-
id: props.inputId,
|
|
743
|
-
tabIndex: props.tabIndex,
|
|
744
|
-
disabled: props.disabled,
|
|
745
|
-
onClick: onInputClick,
|
|
746
|
-
onKeyDown: onInputKeydown
|
|
747
|
-
}, inputProps), ptm('input'));
|
|
748
|
-
return /*#__PURE__*/React.createElement("input", _inputProps);
|
|
749
|
-
}
|
|
750
|
-
return null;
|
|
751
|
-
};
|
|
752
|
-
var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
|
|
753
|
-
var content = createContent();
|
|
754
|
-
var input = createInput();
|
|
755
|
-
var rootProps = mergeProps({
|
|
756
|
-
id: props.id,
|
|
757
|
-
ref: elementRef,
|
|
758
|
-
style: props.style,
|
|
759
|
-
className: cx('root')
|
|
760
|
-
}, ColorPickerBase.getOtherProps(props), ptm('root'));
|
|
761
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", rootProps, input, /*#__PURE__*/React.createElement(ColorPickerPanel, {
|
|
762
|
-
hostName: "ColorPicker",
|
|
763
|
-
ref: overlayRef,
|
|
764
|
-
appendTo: props.appendTo,
|
|
765
|
-
inline: props.inline,
|
|
766
|
-
disabled: props.disabled,
|
|
767
|
-
panelStyle: props.panelStyle,
|
|
768
|
-
panelClassName: props.panelClassName,
|
|
769
|
-
onClick: onPanelClick,
|
|
770
|
-
"in": props.inline || overlayVisibleState,
|
|
771
|
-
onEnter: onOverlayEnter,
|
|
772
|
-
onEntered: onOverlayEntered,
|
|
773
|
-
onExit: onOverlayExit,
|
|
774
|
-
onExited: onOverlayExited,
|
|
775
|
-
transitionOptions: props.transitionOptions,
|
|
776
|
-
ptm: ptm,
|
|
777
|
-
cx: cx
|
|
778
|
-
}, content)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
779
|
-
target: elementRef,
|
|
780
|
-
content: props.tooltip
|
|
781
|
-
}, props.tooltipOptions, {
|
|
782
|
-
pt: ptm('tooltip')
|
|
783
|
-
})));
|
|
784
|
-
}));
|
|
785
|
-
ColorPicker.displayName = 'ColorPicker';
|
|
786
|
-
|
|
787
|
-
export { ColorPicker };
|