primereact 10.5.0 → 10.5.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/api/api.cjs.js +94 -92
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +231 -13
- package/api/api.esm.js +94 -92
- package/api/api.esm.min.js +1 -1
- package/api/api.js +94 -92
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +91 -48
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -1
- package/autocomplete/autocomplete.esm.js +91 -48
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +91 -48
- package/autocomplete/autocomplete.min.js +1 -1
- package/blockui/blockui.cjs.js +13 -13
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +13 -13
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +13 -13
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +4 -3
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +4 -3
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +4 -3
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +2 -3
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +2 -3
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -3
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +30 -11
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +9 -0
- package/calendar/calendar.esm.js +30 -11
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +30 -11
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +17 -15
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -2
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +17 -15
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +28 -14
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +5 -0
- package/cascadeselect/cascadeselect.esm.js +28 -14
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +28 -14
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/checkbox.cjs.js +72 -156
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +10 -34
- package/checkbox/checkbox.esm.js +72 -156
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +72 -156
- package/checkbox/checkbox.min.js +1 -1
- package/chips/chips.cjs.js +25 -12
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +6 -1
- package/chips/chips.esm.js +25 -12
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +25 -12
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +5 -5
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +4 -4
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +5 -5
- package/colorpicker/colorpicker.min.js +1 -1
- package/componentbase/componentbase.cjs.js +4 -6
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +5 -7
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +4 -6
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +7 -2
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +7 -2
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +8 -3
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +5 -5
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +5 -5
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +5 -5
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +4 -3
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +4 -3
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +4 -3
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +2773 -20019
- package/core/core.min.js +41 -41
- package/datatable/datatable.cjs.js +134 -115
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +11 -3
- package/datatable/datatable.esm.js +134 -115
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +134 -115
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +16 -13
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +4 -1
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +17 -15
- package/dataview/dataview.min.js +1 -1
- package/dialog/dialog.cjs.js +6 -6
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +6 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -6
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +123 -53
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +41 -0
- package/dropdown/dropdown.esm.js +123 -53
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +123 -55
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +125 -54
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +125 -54
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +125 -54
- package/editor/editor.min.js +1 -1
- package/galleria/galleria.cjs.js +22 -19
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +4 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +23 -20
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +115 -72
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +116 -73
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +115 -72
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +2 -642
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +2 -642
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +2 -642
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +2 -642
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +2 -642
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +2 -642
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +2 -642
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +2 -642
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +2 -642
- package/icons/ban/index.min.js +1 -1
- package/icons/blank/index.cjs.js +62 -0
- package/icons/blank/index.cjs.min.js +1 -0
- package/icons/blank/index.d.ts +19 -0
- package/icons/blank/index.esm.js +38 -0
- package/icons/blank/index.esm.min.js +1 -0
- package/icons/blank/index.js +65 -0
- package/icons/blank/index.min.js +1 -0
- package/icons/blank/package.json +7 -0
- package/icons/download/index.cjs.js +2 -642
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +2 -642
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +2 -642
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +2 -642
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +2 -642
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +2 -642
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +2 -642
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +2 -642
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +2 -642
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +2 -642
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +2 -642
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +2 -642
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +2 -642
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +2 -642
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +2 -642
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +2 -642
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +2 -642
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +2 -642
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +2 -642
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +2 -642
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +2 -642
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +2 -642
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +2 -642
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +2 -642
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +2 -642
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +2 -642
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +2 -642
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +2 -642
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +2 -642
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +2 -642
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +2 -642
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +2 -642
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +2 -642
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +2 -642
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +2 -642
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +2 -642
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +2 -642
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +2 -642
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +2 -642
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +2 -642
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +2 -642
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +2 -642
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +2 -642
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +2 -642
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +2 -642
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +2 -642
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +2 -642
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +2 -642
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +2 -642
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +2 -642
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +2 -642
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +2 -642
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +2 -642
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +2 -642
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +2 -642
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +2 -642
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +2 -642
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +2 -642
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +2 -642
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +2 -642
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +2 -642
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +2 -642
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +2 -642
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +2 -642
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +2 -642
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +2 -642
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +2 -642
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +2 -642
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +2 -642
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +2 -642
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +2 -642
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +2 -642
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +2 -642
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +2 -642
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +2 -642
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +18 -575
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +20 -577
- package/image/image.esm.min.js +1 -1
- package/image/image.js +18 -575
- package/image/image.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +22 -39
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +5 -5
- package/inputnumber/inputnumber.esm.js +22 -39
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +22 -39
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +20 -96
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +9 -20
- package/inputswitch/inputswitch.esm.js +20 -96
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +20 -96
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -6
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +5 -0
- package/inputtext/inputtext.esm.js +7 -6
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -6
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +5 -4
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +5 -0
- package/inputtextarea/inputtextarea.esm.js +5 -4
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +5 -4
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/listbox/listbox.cjs.js +17 -14
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +15 -0
- package/listbox/listbox.esm.js +18 -15
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +17 -14
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +3 -3
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +3 -3
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +3 -3
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +5 -4
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +5 -4
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +5 -4
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +3 -2
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +3 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +3 -2
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +18 -14
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +18 -14
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +18 -14
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +2 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +1 -1
- package/message/message.esm.js +2 -8
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -8
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +1 -1
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +1 -1
- package/messages/messages.esm.js +1 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +1 -1
- package/messages/messages.min.js +1 -1
- package/metergroup/metergroup.cjs.js +237 -0
- package/metergroup/metergroup.cjs.min.js +1 -0
- package/metergroup/metergroup.d.ts +183 -0
- package/metergroup/metergroup.esm.js +233 -0
- package/metergroup/metergroup.esm.min.js +1 -0
- package/metergroup/metergroup.js +236 -0
- package/metergroup/metergroup.min.js +1 -0
- package/multiselect/multiselect.cjs.js +157 -160
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +25 -1
- package/multiselect/multiselect.esm.js +157 -160
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +157 -160
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +3 -4
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +3 -4
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +3 -4
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +35 -11
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +5 -0
- package/orderlist/orderlist.esm.js +35 -11
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +35 -11
- package/orderlist/orderlist.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +3 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +3 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +3 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +125 -108
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +88 -0
- package/paginator/paginator.esm.js +125 -108
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +125 -108
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +19 -14
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +18 -0
- package/panelmenu/panelmenu.esm.js +19 -14
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +19 -14
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.d.ts +12 -0
- package/passthrough/tailwind/index.cjs.js +279 -173
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +279 -173
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +279 -173
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +98 -57
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +5 -0
- package/password/password.esm.js +100 -59
- package/password/password.esm.min.js +1 -1
- package/password/password.js +98 -57
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +127 -102
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +5 -0
- package/picklist/picklist.esm.js +127 -102
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +127 -102
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +2075 -2180
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2076 -2180
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2075 -2180
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +69 -146
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +17 -35
- package/radiobutton/radiobutton.esm.js +70 -147
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +69 -146
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +2 -3
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +2 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +2 -3
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +344 -67
- package/resources/themes/arya-green/theme.css +344 -67
- package/resources/themes/arya-orange/theme.css +344 -67
- package/resources/themes/bootstrap4-dark-blue/theme.css +389 -64
- package/resources/themes/bootstrap4-light-blue/theme.css +389 -64
- package/resources/themes/fluent-light/theme.css +341 -64
- package/resources/themes/lara-dark-amber/theme.css +470 -67
- package/resources/themes/lara-dark-blue/theme.css +470 -67
- package/resources/themes/lara-dark-cyan/theme.css +470 -67
- package/resources/themes/lara-dark-green/theme.css +470 -67
- package/resources/themes/lara-dark-indigo/theme.css +470 -67
- package/resources/themes/lara-dark-pink/theme.css +470 -67
- package/resources/themes/lara-dark-teal/theme.css +470 -67
- package/resources/themes/lara-light-amber/theme.css +470 -67
- package/resources/themes/lara-light-blue/theme.css +470 -67
- package/resources/themes/lara-light-cyan/theme.css +470 -67
- package/resources/themes/lara-light-green/theme.css +470 -67
- package/resources/themes/lara-light-indigo/theme.css +470 -67
- package/resources/themes/lara-light-pink/theme.css +470 -67
- package/resources/themes/lara-light-teal/theme.css +470 -67
- package/resources/themes/luna-amber/theme.css +344 -67
- package/resources/themes/luna-blue/theme.css +344 -67
- package/resources/themes/luna-green/theme.css +344 -67
- package/resources/themes/luna-pink/theme.css +344 -67
- package/resources/themes/md-dark-deeppurple/theme.css +995 -289
- package/resources/themes/md-dark-indigo/theme.css +684 -232
- package/resources/themes/md-light-deeppurple/theme.css +868 -162
- package/resources/themes/md-light-indigo/theme.css +566 -101
- package/resources/themes/mdc-dark-deeppurple/theme.css +995 -289
- package/resources/themes/mdc-dark-indigo/theme.css +697 -232
- package/resources/themes/mdc-light-deeppurple/theme.css +868 -162
- package/resources/themes/mdc-light-indigo/theme.css +566 -101
- package/resources/themes/mira/theme.css +344 -67
- package/resources/themes/nano/theme.css +344 -67
- package/resources/themes/nova/theme.css +344 -67
- package/resources/themes/nova-accent/theme.css +344 -67
- package/resources/themes/nova-alt/theme.css +344 -67
- package/resources/themes/rhea/theme.css +343 -66
- package/resources/themes/saga-blue/theme.css +344 -67
- package/resources/themes/saga-green/theme.css +344 -67
- package/resources/themes/saga-orange/theme.css +344 -67
- package/resources/themes/soho-dark/theme.css +413 -88
- package/resources/themes/soho-light/theme.css +392 -67
- package/resources/themes/tailwind-light/theme.css +344 -67
- package/resources/themes/vela-blue/theme.css +344 -67
- package/resources/themes/vela-green/theme.css +344 -67
- package/resources/themes/vela-orange/theme.css +344 -67
- package/resources/themes/viva-dark/theme.css +392 -67
- package/resources/themes/viva-light/theme.css +392 -67
- package/selectbutton/selectbutton.cjs.js +15 -8
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +5 -0
- package/selectbutton/selectbutton.esm.js +15 -8
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +16 -9
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +4 -3
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +4 -4
- package/sidebar/sidebar.esm.js +4 -3
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +4 -3
- package/sidebar/sidebar.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +7 -5
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +7 -5
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +7 -5
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +18 -2
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +18 -2
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +18 -2
- package/slider/slider.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +9 -12
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +2 -2
- package/splitbutton/splitbutton.esm.js +9 -12
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +9 -12
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +16 -21
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +5 -5
- package/splitter/splitter.esm.js +16 -21
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +16 -21
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +4 -3
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +4 -3
- 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 +21 -1
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.d.ts +10 -0
- package/styleclass/styleclass.esm.js +21 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +22 -2
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +5 -4
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +5 -4
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +5 -4
- package/tabmenu/tabmenu.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +6 -8
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +6 -8
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +6 -8
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +93 -92
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +1 -1
- package/toast/toast.esm.js +93 -92
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +93 -92
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +56 -95
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +24 -0
- package/togglebutton/togglebutton.esm.js +55 -94
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +56 -95
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.d.ts +3 -3
- package/tooltip/tooltipoptions.d.ts +5 -0
- package/tree/tree.cjs.js +52 -39
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +5 -0
- package/tree/tree.esm.js +52 -39
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +52 -39
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +5 -4
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +5 -0
- package/treeselect/treeselect.esm.js +5 -4
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +5 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +18 -15
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +18 -15
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +18 -15
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +36 -94
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +12 -13
- package/tristatecheckbox/tristatecheckbox.esm.js +37 -95
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +36 -94
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +64 -72
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +11 -2
- package/utils/utils.esm.js +65 -72
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +64 -72
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +17 -15
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +14 -12
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +17 -15
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +519 -39
|
@@ -62,75 +62,19 @@ function _defineProperty(obj, key, value) {
|
|
|
62
62
|
return obj;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
function _arrayWithHoles(arr) {
|
|
66
|
-
if (Array.isArray(arr)) return arr;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function _iterableToArrayLimit(r, l) {
|
|
70
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
71
|
-
if (null != t) {
|
|
72
|
-
var e,
|
|
73
|
-
n,
|
|
74
|
-
i,
|
|
75
|
-
u,
|
|
76
|
-
a = [],
|
|
77
|
-
f = !0,
|
|
78
|
-
o = !1;
|
|
79
|
-
try {
|
|
80
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
81
|
-
if (Object(t) !== t) return;
|
|
82
|
-
f = !1;
|
|
83
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
84
|
-
} catch (r) {
|
|
85
|
-
o = !0, n = r;
|
|
86
|
-
} finally {
|
|
87
|
-
try {
|
|
88
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
89
|
-
} finally {
|
|
90
|
-
if (o) throw n;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return a;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function _arrayLikeToArray(arr, len) {
|
|
98
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
99
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
100
|
-
return arr2;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
104
|
-
if (!o) return;
|
|
105
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
106
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
107
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
108
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
109
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function _nonIterableRest() {
|
|
113
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function _slicedToArray(arr, i) {
|
|
117
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
118
|
-
}
|
|
119
|
-
|
|
120
65
|
var classes = {
|
|
121
66
|
root: function root(_ref) {
|
|
122
67
|
var props = _ref.props,
|
|
123
|
-
focusedState = _ref.focusedState,
|
|
124
68
|
checked = _ref.checked;
|
|
125
69
|
return classNames('p-inputswitch p-component', {
|
|
126
|
-
'p-
|
|
70
|
+
'p-highlight': checked,
|
|
127
71
|
'p-disabled': props.disabled,
|
|
128
|
-
'p-
|
|
72
|
+
'p-invalid': props.invalid
|
|
129
73
|
});
|
|
130
74
|
},
|
|
75
|
+
input: 'p-inputswitch-input',
|
|
131
76
|
slider: 'p-inputswitch-slider'
|
|
132
77
|
};
|
|
133
|
-
var styles = "\n@layer primereact {\n .p-inputswitch {\n position: relative;\n display: inline-block;\n }\n \n .p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid transparent;\n }\n \n .p-inputswitch-slider:before {\n position: absolute;\n content: \"\";\n top: 50%;\n }\n}\n";
|
|
134
78
|
var InputSwitchBase = ComponentBase.extend({
|
|
135
79
|
defaultProps: {
|
|
136
80
|
__TYPE: 'InputSwitch',
|
|
@@ -142,6 +86,7 @@ var InputSwitchBase = ComponentBase.extend({
|
|
|
142
86
|
id: null,
|
|
143
87
|
inputId: null,
|
|
144
88
|
inputRef: null,
|
|
89
|
+
invalid: false,
|
|
145
90
|
name: null,
|
|
146
91
|
onBlur: null,
|
|
147
92
|
onChange: null,
|
|
@@ -154,8 +99,7 @@ var InputSwitchBase = ComponentBase.extend({
|
|
|
154
99
|
children: undefined
|
|
155
100
|
},
|
|
156
101
|
css: {
|
|
157
|
-
classes: classes
|
|
158
|
-
styles: styles
|
|
102
|
+
classes: classes
|
|
159
103
|
}
|
|
160
104
|
});
|
|
161
105
|
|
|
@@ -165,15 +109,8 @@ var InputSwitch = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
165
109
|
var mergeProps = useMergeProps();
|
|
166
110
|
var context = React.useContext(PrimeReactContext);
|
|
167
111
|
var props = InputSwitchBase.getProps(inProps, context);
|
|
168
|
-
var _React$useState = React.useState(false),
|
|
169
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
170
|
-
focusedState = _React$useState2[0],
|
|
171
|
-
setFocusedState = _React$useState2[1];
|
|
172
112
|
var _InputSwitchBase$setM = InputSwitchBase.setMetaData({
|
|
173
|
-
props: props
|
|
174
|
-
state: {
|
|
175
|
-
focused: focusedState
|
|
176
|
-
}
|
|
113
|
+
props: props
|
|
177
114
|
}),
|
|
178
115
|
ptm = _InputSwitchBase$setM.ptm,
|
|
179
116
|
cx = _InputSwitchBase$setM.cx,
|
|
@@ -184,15 +121,7 @@ var InputSwitch = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
184
121
|
var elementRef = React.useRef(null);
|
|
185
122
|
var inputRef = React.useRef(props.inputRef);
|
|
186
123
|
var checked = props.checked === props.trueValue;
|
|
187
|
-
var
|
|
188
|
-
if (props.disabled) {
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
toggle(event);
|
|
192
|
-
DomHandler.focus(inputRef.current);
|
|
193
|
-
event.preventDefault();
|
|
194
|
-
};
|
|
195
|
-
var toggle = function toggle(event) {
|
|
124
|
+
var onChange = function onChange(event) {
|
|
196
125
|
if (props.onChange) {
|
|
197
126
|
var value = checked ? props.falseValue : props.trueValue;
|
|
198
127
|
props.onChange({
|
|
@@ -213,12 +142,12 @@ var InputSwitch = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
213
142
|
}
|
|
214
143
|
};
|
|
215
144
|
var onFocus = function onFocus(event) {
|
|
216
|
-
|
|
217
|
-
props
|
|
145
|
+
var _props$onFocus;
|
|
146
|
+
props === null || props === void 0 || (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, event);
|
|
218
147
|
};
|
|
219
148
|
var onBlur = function onBlur(event) {
|
|
220
|
-
|
|
221
|
-
props
|
|
149
|
+
var _props$onBlur;
|
|
150
|
+
props === null || props === void 0 || (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, event);
|
|
222
151
|
};
|
|
223
152
|
React.useImperativeHandle(ref, function () {
|
|
224
153
|
return {
|
|
@@ -247,46 +176,41 @@ var InputSwitch = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
|
|
|
247
176
|
var ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
|
|
248
177
|
var rootProps = mergeProps({
|
|
249
178
|
className: classNames(props.className, cx('root', {
|
|
250
|
-
focusedState: focusedState,
|
|
251
179
|
checked: checked
|
|
252
180
|
})),
|
|
253
181
|
style: props.style,
|
|
254
|
-
onClick: onClick,
|
|
255
182
|
role: 'checkbox',
|
|
256
183
|
'aria-checked': checked,
|
|
257
184
|
'data-p-highlight': checked,
|
|
258
185
|
'data-p-disabled': props.disabled
|
|
259
186
|
}, otherProps, ptm('root'));
|
|
260
|
-
var
|
|
261
|
-
className: 'p-hidden-accessible'
|
|
262
|
-
}, ptm('hiddenInputWrapper'));
|
|
263
|
-
var hiddenInputProps = mergeProps(_objectSpread({
|
|
187
|
+
var inputProps = mergeProps(_objectSpread({
|
|
264
188
|
type: 'checkbox',
|
|
265
189
|
id: props.inputId,
|
|
266
190
|
name: props.name,
|
|
267
191
|
checked: checked,
|
|
268
|
-
onChange:
|
|
192
|
+
onChange: onChange,
|
|
269
193
|
onFocus: onFocus,
|
|
270
194
|
onBlur: onBlur,
|
|
271
195
|
disabled: props.disabled,
|
|
272
196
|
role: 'switch',
|
|
273
197
|
tabIndex: props.tabIndex,
|
|
274
|
-
'aria-checked': checked
|
|
275
|
-
|
|
198
|
+
'aria-checked': checked,
|
|
199
|
+
className: cx('input')
|
|
200
|
+
}, ariaProps), ptm('input'));
|
|
276
201
|
var sliderProps = mergeProps({
|
|
277
202
|
className: cx('slider')
|
|
278
203
|
}, ptm('slider'));
|
|
279
204
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", _extends({
|
|
280
205
|
id: props.id,
|
|
281
206
|
ref: elementRef
|
|
282
|
-
}, rootProps), /*#__PURE__*/React.createElement("
|
|
207
|
+
}, rootProps), /*#__PURE__*/React.createElement("input", _extends({
|
|
283
208
|
ref: inputRef
|
|
284
|
-
},
|
|
209
|
+
}, inputProps)), /*#__PURE__*/React.createElement("span", sliderProps)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
285
210
|
target: elementRef,
|
|
286
|
-
content: props.tooltip
|
|
287
|
-
}, props.tooltipOptions, {
|
|
211
|
+
content: props.tooltip,
|
|
288
212
|
pt: ptm('tooltip')
|
|
289
|
-
})));
|
|
213
|
+
}, props.tooltipOptions)));
|
|
290
214
|
}));
|
|
291
215
|
InputSwitch.displayName = 'InputSwitch';
|
|
292
216
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{PrimeReactContext as t}from"primereact/api";import{ComponentBase as n,useHandleStyle as r}from"primereact/componentbase";import{useMergeProps as o,useMountEffect as i}from"primereact/hooks";import{Tooltip as
|
|
1
|
+
import*as e from"react";import{PrimeReactContext as t}from"primereact/api";import{ComponentBase as n,useHandleStyle as r}from"primereact/componentbase";import{useMergeProps as o,useMountEffect as i}from"primereact/hooks";import{Tooltip as l}from"primereact/tooltip";import{classNames as u,DomHandler as a,ObjectUtils as c}from"primereact/utils";function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e){var t=f(e,"string");return"symbol"===s(t)?t:String(t)}var d=n.extend({defaultProps:{__TYPE:"InputSwitch",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,invalid:!1,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0},css:{classes:{root:function(e){var t=e.props;return u("p-inputswitch p-component",{"p-highlight":e.checked,"p-disabled":t.disabled,"p-invalid":t.invalid})},input:"p-inputswitch-input",slider:"p-inputswitch-slider"}}});function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){var r,o,i;r=e,i=n[t],(o=m(o=t))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=e.memo(e.forwardRef((function(n,s){var f=o(),m=e.useContext(t),b=d.getProps(n,m),v=d.setMetaData({props:b}),h=v.ptm,g=v.cx;r(d.css.styles,v.isUnstyled,{name:"inputswitch"});var O=e.useRef(null),P=e.useRef(b.inputRef),w=b.checked===b.trueValue;e.useImperativeHandle(s,(function(){return{props:b,focus:function(){return a.focus(P.current)},getElement:function(){return O.current},getInput:function(){return P.current}}})),e.useEffect((function(){c.combinedRefs(P,b.inputRef)}),[P,b.inputRef]),i((function(){b.autoFocus&&a.focus(P.current,b.autoFocus)}));var j=c.isNotEmpty(b.tooltip),E=d.getOtherProps(b),S=c.reduceKeys(E,a.ARIA_PROPS),k=f({className:u(b.className,g("root",{checked:w})),style:b.style,role:"checkbox","aria-checked":w,"data-p-highlight":w,"data-p-disabled":b.disabled},E,h("root")),I=f(y({type:"checkbox",id:b.inputId,name:b.name,checked:w,onChange:function(e){if(b.onChange){var t=w?b.falseValue:b.trueValue;b.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:b.name,id:b.id,value:t}})}},onFocus:function(e){var t;null==b||null===(t=b.onFocus)||void 0===t||t.call(b,e)},onBlur:function(e){var t;null==b||null===(t=b.onBlur)||void 0===t||t.call(b,e)},disabled:b.disabled,role:"switch",tabIndex:b.tabIndex,"aria-checked":w,className:g("input")},S),h("input")),R=f({className:g("slider")},h("slider"));return e.createElement(e.Fragment,null,e.createElement("div",p({id:b.id,ref:O},k),e.createElement("input",p({ref:P},I)),e.createElement("span",R)),j&&e.createElement(l,p({target:O,content:b.tooltip,pt:h("tooltip")},b.tooltipOptions)))})));v.displayName="InputSwitch";export{v as InputSwitch};
|
|
@@ -78,75 +78,19 @@ this.primereact.inputswitch = (function (exports, React, api, componentbase, hoo
|
|
|
78
78
|
return obj;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
function _arrayWithHoles(arr) {
|
|
82
|
-
if (Array.isArray(arr)) return arr;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function _iterableToArrayLimit(r, l) {
|
|
86
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
87
|
-
if (null != t) {
|
|
88
|
-
var e,
|
|
89
|
-
n,
|
|
90
|
-
i,
|
|
91
|
-
u,
|
|
92
|
-
a = [],
|
|
93
|
-
f = !0,
|
|
94
|
-
o = !1;
|
|
95
|
-
try {
|
|
96
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
97
|
-
if (Object(t) !== t) return;
|
|
98
|
-
f = !1;
|
|
99
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
100
|
-
} catch (r) {
|
|
101
|
-
o = !0, n = r;
|
|
102
|
-
} finally {
|
|
103
|
-
try {
|
|
104
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
105
|
-
} finally {
|
|
106
|
-
if (o) throw n;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return a;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function _arrayLikeToArray(arr, len) {
|
|
114
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
115
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
116
|
-
return arr2;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
120
|
-
if (!o) return;
|
|
121
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
122
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
123
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
124
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
125
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function _nonIterableRest() {
|
|
129
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function _slicedToArray(arr, i) {
|
|
133
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
134
|
-
}
|
|
135
|
-
|
|
136
81
|
var classes = {
|
|
137
82
|
root: function root(_ref) {
|
|
138
83
|
var props = _ref.props,
|
|
139
|
-
focusedState = _ref.focusedState,
|
|
140
84
|
checked = _ref.checked;
|
|
141
85
|
return utils.classNames('p-inputswitch p-component', {
|
|
142
|
-
'p-
|
|
86
|
+
'p-highlight': checked,
|
|
143
87
|
'p-disabled': props.disabled,
|
|
144
|
-
'p-
|
|
88
|
+
'p-invalid': props.invalid
|
|
145
89
|
});
|
|
146
90
|
},
|
|
91
|
+
input: 'p-inputswitch-input',
|
|
147
92
|
slider: 'p-inputswitch-slider'
|
|
148
93
|
};
|
|
149
|
-
var styles = "\n@layer primereact {\n .p-inputswitch {\n position: relative;\n display: inline-block;\n }\n \n .p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid transparent;\n }\n \n .p-inputswitch-slider:before {\n position: absolute;\n content: \"\";\n top: 50%;\n }\n}\n";
|
|
150
94
|
var InputSwitchBase = componentbase.ComponentBase.extend({
|
|
151
95
|
defaultProps: {
|
|
152
96
|
__TYPE: 'InputSwitch',
|
|
@@ -158,6 +102,7 @@ this.primereact.inputswitch = (function (exports, React, api, componentbase, hoo
|
|
|
158
102
|
id: null,
|
|
159
103
|
inputId: null,
|
|
160
104
|
inputRef: null,
|
|
105
|
+
invalid: false,
|
|
161
106
|
name: null,
|
|
162
107
|
onBlur: null,
|
|
163
108
|
onChange: null,
|
|
@@ -170,8 +115,7 @@ this.primereact.inputswitch = (function (exports, React, api, componentbase, hoo
|
|
|
170
115
|
children: undefined
|
|
171
116
|
},
|
|
172
117
|
css: {
|
|
173
|
-
classes: classes
|
|
174
|
-
styles: styles
|
|
118
|
+
classes: classes
|
|
175
119
|
}
|
|
176
120
|
});
|
|
177
121
|
|
|
@@ -181,15 +125,8 @@ this.primereact.inputswitch = (function (exports, React, api, componentbase, hoo
|
|
|
181
125
|
var mergeProps = hooks.useMergeProps();
|
|
182
126
|
var context = React__namespace.useContext(api.PrimeReactContext);
|
|
183
127
|
var props = InputSwitchBase.getProps(inProps, context);
|
|
184
|
-
var _React$useState = React__namespace.useState(false),
|
|
185
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
186
|
-
focusedState = _React$useState2[0],
|
|
187
|
-
setFocusedState = _React$useState2[1];
|
|
188
128
|
var _InputSwitchBase$setM = InputSwitchBase.setMetaData({
|
|
189
|
-
props: props
|
|
190
|
-
state: {
|
|
191
|
-
focused: focusedState
|
|
192
|
-
}
|
|
129
|
+
props: props
|
|
193
130
|
}),
|
|
194
131
|
ptm = _InputSwitchBase$setM.ptm,
|
|
195
132
|
cx = _InputSwitchBase$setM.cx,
|
|
@@ -200,15 +137,7 @@ this.primereact.inputswitch = (function (exports, React, api, componentbase, hoo
|
|
|
200
137
|
var elementRef = React__namespace.useRef(null);
|
|
201
138
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
202
139
|
var checked = props.checked === props.trueValue;
|
|
203
|
-
var
|
|
204
|
-
if (props.disabled) {
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
toggle(event);
|
|
208
|
-
utils.DomHandler.focus(inputRef.current);
|
|
209
|
-
event.preventDefault();
|
|
210
|
-
};
|
|
211
|
-
var toggle = function toggle(event) {
|
|
140
|
+
var onChange = function onChange(event) {
|
|
212
141
|
if (props.onChange) {
|
|
213
142
|
var value = checked ? props.falseValue : props.trueValue;
|
|
214
143
|
props.onChange({
|
|
@@ -229,12 +158,12 @@ this.primereact.inputswitch = (function (exports, React, api, componentbase, hoo
|
|
|
229
158
|
}
|
|
230
159
|
};
|
|
231
160
|
var onFocus = function onFocus(event) {
|
|
232
|
-
|
|
233
|
-
props
|
|
161
|
+
var _props$onFocus;
|
|
162
|
+
props === null || props === void 0 || (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, event);
|
|
234
163
|
};
|
|
235
164
|
var onBlur = function onBlur(event) {
|
|
236
|
-
|
|
237
|
-
props
|
|
165
|
+
var _props$onBlur;
|
|
166
|
+
props === null || props === void 0 || (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, event);
|
|
238
167
|
};
|
|
239
168
|
React__namespace.useImperativeHandle(ref, function () {
|
|
240
169
|
return {
|
|
@@ -263,46 +192,41 @@ this.primereact.inputswitch = (function (exports, React, api, componentbase, hoo
|
|
|
263
192
|
var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
|
|
264
193
|
var rootProps = mergeProps({
|
|
265
194
|
className: utils.classNames(props.className, cx('root', {
|
|
266
|
-
focusedState: focusedState,
|
|
267
195
|
checked: checked
|
|
268
196
|
})),
|
|
269
197
|
style: props.style,
|
|
270
|
-
onClick: onClick,
|
|
271
198
|
role: 'checkbox',
|
|
272
199
|
'aria-checked': checked,
|
|
273
200
|
'data-p-highlight': checked,
|
|
274
201
|
'data-p-disabled': props.disabled
|
|
275
202
|
}, otherProps, ptm('root'));
|
|
276
|
-
var
|
|
277
|
-
className: 'p-hidden-accessible'
|
|
278
|
-
}, ptm('hiddenInputWrapper'));
|
|
279
|
-
var hiddenInputProps = mergeProps(_objectSpread({
|
|
203
|
+
var inputProps = mergeProps(_objectSpread({
|
|
280
204
|
type: 'checkbox',
|
|
281
205
|
id: props.inputId,
|
|
282
206
|
name: props.name,
|
|
283
207
|
checked: checked,
|
|
284
|
-
onChange:
|
|
208
|
+
onChange: onChange,
|
|
285
209
|
onFocus: onFocus,
|
|
286
210
|
onBlur: onBlur,
|
|
287
211
|
disabled: props.disabled,
|
|
288
212
|
role: 'switch',
|
|
289
213
|
tabIndex: props.tabIndex,
|
|
290
|
-
'aria-checked': checked
|
|
291
|
-
|
|
214
|
+
'aria-checked': checked,
|
|
215
|
+
className: cx('input')
|
|
216
|
+
}, ariaProps), ptm('input'));
|
|
292
217
|
var sliderProps = mergeProps({
|
|
293
218
|
className: cx('slider')
|
|
294
219
|
}, ptm('slider'));
|
|
295
220
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
296
221
|
id: props.id,
|
|
297
222
|
ref: elementRef
|
|
298
|
-
}, rootProps), /*#__PURE__*/React__namespace.createElement("
|
|
223
|
+
}, rootProps), /*#__PURE__*/React__namespace.createElement("input", _extends({
|
|
299
224
|
ref: inputRef
|
|
300
|
-
},
|
|
225
|
+
}, inputProps)), /*#__PURE__*/React__namespace.createElement("span", sliderProps)), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
301
226
|
target: elementRef,
|
|
302
|
-
content: props.tooltip
|
|
303
|
-
}, props.tooltipOptions, {
|
|
227
|
+
content: props.tooltip,
|
|
304
228
|
pt: ptm('tooltip')
|
|
305
|
-
})));
|
|
229
|
+
}, props.tooltipOptions)));
|
|
306
230
|
}));
|
|
307
231
|
InputSwitch.displayName = 'InputSwitch';
|
|
308
232
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.inputswitch=function(e,t,n,r,o,i,u){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.inputswitch=function(e,t,n,r,o,i,u){"use strict";function l(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=l(t);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function p(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=p(e,"string");return"symbol"===s(t)?t:String(t)}var d=r.ComponentBase.extend({defaultProps:{__TYPE:"InputSwitch",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,invalid:!1,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0},css:{classes:{root:function(e){var t=e.props;return u.classNames("p-inputswitch p-component",{"p-highlight":e.checked,"p-disabled":t.disabled,"p-invalid":t.invalid})},input:"p-inputswitch-input",slider:"p-inputswitch-slider"}}});function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){var r,o,i;r=e,i=n[t],(o=f(o=t))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=a.memo(a.forwardRef((function(e,t){var l=o.useMergeProps(),s=a.useContext(n.PrimeReactContext),p=d.getProps(e,s),f=d.setMetaData({props:p}),m=f.ptm,y=f.cx;r.useHandleStyle(d.css.styles,f.isUnstyled,{name:"inputswitch"});var h=a.useRef(null),v=a.useRef(p.inputRef),g=p.checked===p.trueValue;a.useImperativeHandle(t,(function(){return{props:p,focus:function(){return u.DomHandler.focus(v.current)},getElement:function(){return h.current},getInput:function(){return v.current}}})),a.useEffect((function(){u.ObjectUtils.combinedRefs(v,p.inputRef)}),[v,p.inputRef]),o.useMountEffect((function(){p.autoFocus&&u.DomHandler.focus(v.current,p.autoFocus)}));var O=u.ObjectUtils.isNotEmpty(p.tooltip),j=d.getOtherProps(p),P=u.ObjectUtils.reduceKeys(j,u.DomHandler.ARIA_PROPS),w=l({className:u.classNames(p.className,y("root",{checked:g})),style:p.style,role:"checkbox","aria-checked":g,"data-p-highlight":g,"data-p-disabled":p.disabled},j,m("root")),E=l(b({type:"checkbox",id:p.inputId,name:p.name,checked:g,onChange:function(e){if(p.onChange){var t=g?p.falseValue:p.trueValue;p.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:p.name,id:p.id,value:t}})}},onFocus:function(e){var t;null==p||null===(t=p.onFocus)||void 0===t||t.call(p,e)},onBlur:function(e){var t;null==p||null===(t=p.onBlur)||void 0===t||t.call(p,e)},disabled:p.disabled,role:"switch",tabIndex:p.tabIndex,"aria-checked":g,className:y("input")},P),m("input")),S=l({className:y("slider")},m("slider"));return a.createElement(a.Fragment,null,a.createElement("div",c({id:p.id,ref:h},w),a.createElement("input",c({ref:v},E)),a.createElement("span",S)),O&&a.createElement(i.Tooltip,c({target:h,content:p.tooltip,pt:m("tooltip")},p.tooltipOptions)))})));return y.displayName="InputSwitch",e.InputSwitch=y,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.hooks,primereact.tooltip,primereact.utils);
|
|
@@ -93,7 +93,8 @@ var classes = {
|
|
|
93
93
|
isFilled = _ref.isFilled;
|
|
94
94
|
return utils.classNames('p-inputtext p-component', {
|
|
95
95
|
'p-disabled': props.disabled,
|
|
96
|
-
'p-filled': isFilled
|
|
96
|
+
'p-filled': isFilled,
|
|
97
|
+
'p-invalid': props.invalid
|
|
97
98
|
}, props.className);
|
|
98
99
|
}
|
|
99
100
|
};
|
|
@@ -103,6 +104,7 @@ var InputTextBase = componentbase.ComponentBase.extend({
|
|
|
103
104
|
__parentMetadata: null,
|
|
104
105
|
children: undefined,
|
|
105
106
|
className: null,
|
|
107
|
+
invalid: false,
|
|
106
108
|
keyfilter: null,
|
|
107
109
|
onBeforeInput: null,
|
|
108
110
|
onInput: null,
|
|
@@ -175,9 +177,9 @@ var InputText = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
|
|
|
175
177
|
}, [props.value, props.defaultValue]);
|
|
176
178
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
177
179
|
var rootProps = mergeProps({
|
|
178
|
-
className:
|
|
180
|
+
className: cx('root', {
|
|
179
181
|
isFilled: isFilled
|
|
180
|
-
})
|
|
182
|
+
}),
|
|
181
183
|
onBeforeInput: onBeforeInput,
|
|
182
184
|
onInput: onInput,
|
|
183
185
|
onKeyDown: onKeyDown,
|
|
@@ -187,10 +189,9 @@ var InputText = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
|
|
|
187
189
|
ref: elementRef
|
|
188
190
|
}, rootProps)), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
189
191
|
target: elementRef,
|
|
190
|
-
content: props.tooltip
|
|
191
|
-
}, props.tooltipOptions, {
|
|
192
|
+
content: props.tooltip,
|
|
192
193
|
pt: ptm('tooltip')
|
|
193
|
-
})));
|
|
194
|
+
}, props.tooltipOptions)));
|
|
194
195
|
}));
|
|
195
196
|
InputText.displayName = 'InputText';
|
|
196
197
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/componentbase"),n=require("primereact/hooks"),o=require("primereact/keyfilter"),i=require("primereact/tooltip"),l=require("primereact/utils");function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var u=a(e);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/componentbase"),n=require("primereact/hooks"),o=require("primereact/keyfilter"),i=require("primereact/tooltip"),l=require("primereact/utils");function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var u=a(e);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function c(e,t){if("object"!==p(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=c(e,"string");return"symbol"===p(t)?t:String(t)}var y=r.ComponentBase.extend({defaultProps:{__TYPE:"InputText",__parentMetadata:null,children:void 0,className:null,invalid:!1,keyfilter:null,onBeforeInput:null,onInput:null,onKeyDown:null,onPaste:null,tooltip:null,tooltipOptions:null,validateOnly:!1},css:{classes:{root:function(e){var t=e.props;return l.classNames("p-inputtext p-component",{"p-disabled":t.disabled,"p-filled":e.isFilled,"p-invalid":t.invalid},t.className)}}}});function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){var n,o,i;n=e,i=r[t],(o=f(o=t))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var m=u.memo(u.forwardRef((function(e,a){var p=n.useMergeProps(),c=u.useContext(t.PrimeReactContext),f=y.getProps(e,c),b=y.setMetaData(d(d({props:f},f.__parentMetadata),{},{context:{disabled:f.disabled}})),m=b.ptm,v=b.cx;r.useHandleStyle(y.css.styles,b.isUnstyled,{name:"inputtext",styled:!0});var O=u.useRef(a);u.useEffect((function(){l.ObjectUtils.combinedRefs(O,a)}),[O,a]);var j=u.useMemo((function(){return l.ObjectUtils.isNotEmpty(f.value)||l.ObjectUtils.isNotEmpty(f.defaultValue)}),[f.value,f.defaultValue]),P=l.ObjectUtils.isNotEmpty(f.tooltip),g=p({className:v("root",{isFilled:j}),onBeforeInput:function(e){f.onBeforeInput&&f.onBeforeInput(e),f.keyfilter&&o.KeyFilter.onBeforeInput(e,f.keyfilter,f.validateOnly)},onInput:function(e){var t=e.target,r=!0;f.keyfilter&&f.validateOnly&&(r=o.KeyFilter.validate(e,f.keyfilter)),f.onInput&&f.onInput(e,r),l.ObjectUtils.isNotEmpty(t.value)?l.DomHandler.addClass(t,"p-filled"):l.DomHandler.removeClass(t,"p-filled")},onKeyDown:function(e){f.onKeyDown&&f.onKeyDown(e),f.keyfilter&&o.KeyFilter.onKeyPress(e,f.keyfilter,f.validateOnly)},onPaste:function(e){f.onPaste&&f.onPaste(e),f.keyfilter&&o.KeyFilter.onPaste(e,f.keyfilter,f.validateOnly)}},y.getOtherProps(f),m("root"));return u.createElement(u.Fragment,null,u.createElement("input",s({ref:O},g)),P&&u.createElement(i.Tooltip,s({target:O,content:f.tooltip,pt:m("tooltip")},f.tooltipOptions)))})));m.displayName="InputText",exports.InputText=m;
|
package/inputtext/inputtext.d.ts
CHANGED
|
@@ -75,6 +75,11 @@ export interface InputTextProps extends Omit<React.DetailedHTMLProps<React.Input
|
|
|
75
75
|
* Size of the input.
|
|
76
76
|
*/
|
|
77
77
|
size?: number | string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* When present, it specifies that the component should have invalid state style.
|
|
80
|
+
* @defaultValue false
|
|
81
|
+
*/
|
|
82
|
+
invalid?: boolean | undefined;
|
|
78
83
|
/**
|
|
79
84
|
* Content of the tooltip.
|
|
80
85
|
*/
|
|
@@ -69,7 +69,8 @@ var classes = {
|
|
|
69
69
|
isFilled = _ref.isFilled;
|
|
70
70
|
return classNames('p-inputtext p-component', {
|
|
71
71
|
'p-disabled': props.disabled,
|
|
72
|
-
'p-filled': isFilled
|
|
72
|
+
'p-filled': isFilled,
|
|
73
|
+
'p-invalid': props.invalid
|
|
73
74
|
}, props.className);
|
|
74
75
|
}
|
|
75
76
|
};
|
|
@@ -79,6 +80,7 @@ var InputTextBase = ComponentBase.extend({
|
|
|
79
80
|
__parentMetadata: null,
|
|
80
81
|
children: undefined,
|
|
81
82
|
className: null,
|
|
83
|
+
invalid: false,
|
|
82
84
|
keyfilter: null,
|
|
83
85
|
onBeforeInput: null,
|
|
84
86
|
onInput: null,
|
|
@@ -151,9 +153,9 @@ var InputText = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
151
153
|
}, [props.value, props.defaultValue]);
|
|
152
154
|
var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
|
|
153
155
|
var rootProps = mergeProps({
|
|
154
|
-
className:
|
|
156
|
+
className: cx('root', {
|
|
155
157
|
isFilled: isFilled
|
|
156
|
-
})
|
|
158
|
+
}),
|
|
157
159
|
onBeforeInput: onBeforeInput,
|
|
158
160
|
onInput: onInput,
|
|
159
161
|
onKeyDown: onKeyDown,
|
|
@@ -163,10 +165,9 @@ var InputText = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
163
165
|
ref: elementRef
|
|
164
166
|
}, rootProps)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
165
167
|
target: elementRef,
|
|
166
|
-
content: props.tooltip
|
|
167
|
-
}, props.tooltipOptions, {
|
|
168
|
+
content: props.tooltip,
|
|
168
169
|
pt: ptm('tooltip')
|
|
169
|
-
})));
|
|
170
|
+
}, props.tooltipOptions)));
|
|
170
171
|
}));
|
|
171
172
|
InputText.displayName = 'InputText';
|
|
172
173
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{PrimeReactContext as e}from"primereact/api";import{ComponentBase as r,useHandleStyle as n}from"primereact/componentbase";import{useMergeProps as o}from"primereact/hooks";import{KeyFilter as i}from"primereact/keyfilter";import{Tooltip as l}from"primereact/tooltip";import{classNames as a,ObjectUtils as p,DomHandler as u}from"primereact/utils";function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s.apply(this,arguments)}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function c(t,e){if("object"!==f(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function m(t){var e=c(t,"string");return"symbol"===f(e)?e:String(e)}var y=r.extend({defaultProps:{__TYPE:"InputText",__parentMetadata:null,children:void 0,className:null,keyfilter:null,onBeforeInput:null,onInput:null,onKeyDown:null,onPaste:null,tooltip:null,tooltipOptions:null,validateOnly:!1},css:{classes:{root:function(t){var e=t.props;return a("p-inputtext p-component",{"p-disabled":e.disabled,"p-filled":t.isFilled},e.className)}}}});function
|
|
1
|
+
import*as t from"react";import{PrimeReactContext as e}from"primereact/api";import{ComponentBase as r,useHandleStyle as n}from"primereact/componentbase";import{useMergeProps as o}from"primereact/hooks";import{KeyFilter as i}from"primereact/keyfilter";import{Tooltip as l}from"primereact/tooltip";import{classNames as a,ObjectUtils as p,DomHandler as u}from"primereact/utils";function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s.apply(this,arguments)}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function c(t,e){if("object"!==f(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function m(t){var e=c(t,"string");return"symbol"===f(e)?e:String(e)}var y=r.extend({defaultProps:{__TYPE:"InputText",__parentMetadata:null,children:void 0,className:null,invalid:!1,keyfilter:null,onBeforeInput:null,onInput:null,onKeyDown:null,onPaste:null,tooltip:null,tooltipOptions:null,validateOnly:!1},css:{classes:{root:function(t){var e=t.props;return a("p-inputtext p-component",{"p-disabled":e.disabled,"p-filled":t.isFilled,"p-invalid":e.invalid},e.className)}}}});function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){var n,o,i;n=t,i=r[e],(o=m(o=e))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var v=t.memo(t.forwardRef((function(r,a){var f=o(),c=t.useContext(e),m=y.getProps(r,c),d=y.setMetaData(b(b({props:m},m.__parentMetadata),{},{context:{disabled:m.disabled}})),v=d.ptm,O=d.cx;n(y.css.styles,d.isUnstyled,{name:"inputtext",styled:!0});var P=t.useRef(a);t.useEffect((function(){p.combinedRefs(P,a)}),[P,a]);var g=t.useMemo((function(){return p.isNotEmpty(m.value)||p.isNotEmpty(m.defaultValue)}),[m.value,m.defaultValue]),j=p.isNotEmpty(m.tooltip),w=f({className:O("root",{isFilled:g}),onBeforeInput:function(t){m.onBeforeInput&&m.onBeforeInput(t),m.keyfilter&&i.onBeforeInput(t,m.keyfilter,m.validateOnly)},onInput:function(t){var e=t.target,r=!0;m.keyfilter&&m.validateOnly&&(r=i.validate(t,m.keyfilter)),m.onInput&&m.onInput(t,r),p.isNotEmpty(e.value)?u.addClass(e,"p-filled"):u.removeClass(e,"p-filled")},onKeyDown:function(t){m.onKeyDown&&m.onKeyDown(t),m.keyfilter&&i.onKeyPress(t,m.keyfilter,m.validateOnly)},onPaste:function(t){m.onPaste&&m.onPaste(t),m.keyfilter&&i.onPaste(t,m.keyfilter,m.validateOnly)}},y.getOtherProps(m),v("root"));return t.createElement(t.Fragment,null,t.createElement("input",s({ref:P},w)),j&&t.createElement(l,s({target:P,content:m.tooltip,pt:v("tooltip")},m.tooltipOptions)))})));v.displayName="InputText";export{v as InputText};
|