primereact 10.5.1 → 10.5.3
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 +229 -11
- 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 +89 -45
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -1
- package/autocomplete/autocomplete.esm.js +89 -45
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +89 -45
- 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/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 +70 -153
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +10 -34
- package/checkbox/checkbox.esm.js +70 -153
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +70 -153
- package/checkbox/checkbox.min.js +1 -1
- package/chips/chips.cjs.js +23 -9
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +6 -1
- package/chips/chips.esm.js +23 -9
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +23 -9
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +3 -2
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +2 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +3 -2
- 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 +1 -0
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +1 -0
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +1 -0
- 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/core/core.js +647 -610
- package/core/core.min.js +13 -13
- package/datatable/datatable.cjs.js +128 -110
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +1 -1
- package/datatable/datatable.esm.js +128 -110
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +128 -110
- 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 +98 -29
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +41 -0
- package/dropdown/dropdown.esm.js +98 -29
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +98 -31
- 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/image/image.cjs.js +11 -9
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +11 -9
- package/image/image.esm.min.js +1 -1
- package/image/image.js +11 -9
- package/image/image.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +20 -36
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +5 -5
- package/inputnumber/inputnumber.esm.js +20 -36
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +20 -36
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +18 -93
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +9 -20
- package/inputswitch/inputswitch.esm.js +18 -93
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +18 -93
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +5 -3
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +5 -0
- package/inputtext/inputtext.esm.js +5 -3
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +5 -3
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +3 -1
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +5 -0
- package/inputtextarea/inputtextarea.esm.js +3 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +3 -1
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/listbox/listbox.cjs.js +14 -10
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +15 -0
- package/listbox/listbox.esm.js +15 -11
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +14 -10
- package/listbox/listbox.min.js +1 -1
- package/mention/mention.cjs.js +3 -1
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +3 -1
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +3 -1
- 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 +1 -1
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +1 -1
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +1 -1
- 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 +9 -8
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +1 -1
- package/messages/messages.esm.js +4 -3
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +9 -8
- 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 +94 -123
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +25 -1
- package/multiselect/multiselect.esm.js +94 -123
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +94 -123
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +1 -1
- 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 +13 -5
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +13 -5
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +13 -5
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.d.ts +12 -0
- package/passthrough/tailwind/index.cjs.js +268 -172
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +268 -172
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +268 -172
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +70 -39
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +5 -0
- package/password/password.esm.js +72 -41
- package/password/password.esm.min.js +1 -1
- package/password/password.js +70 -39
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +126 -101
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +5 -0
- package/picklist/picklist.esm.js +126 -101
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +126 -101
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +1775 -1431
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1776 -1431
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1775 -1431
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +67 -142
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +17 -35
- package/radiobutton/radiobutton.esm.js +68 -143
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +67 -142
- package/radiobutton/radiobutton.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 +12 -4
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +5 -0
- package/selectbutton/selectbutton.esm.js +12 -4
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +13 -5
- 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 +3 -2
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +3 -2
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +3 -2
- 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.d.ts +2 -2
- package/splitter/splitter.cjs.js +7 -7
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +5 -5
- package/splitter/splitter.esm.js +7 -7
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +7 -7
- package/splitter/splitter.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 +1 -1
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +1 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +1 -1
- package/tabmenu/tabmenu.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 +54 -92
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +24 -0
- package/togglebutton/togglebutton.esm.js +53 -91
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +54 -92
- 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 +20 -8
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +20 -8
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +20 -8
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +2 -0
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +5 -0
- package/treeselect/treeselect.esm.js +2 -0
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +2 -0
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +17 -14
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +17 -14
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +17 -14
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +33 -90
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +12 -13
- package/tristatecheckbox/tristatecheckbox.esm.js +34 -91
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +33 -90
- 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 +455 -39
|
@@ -86,83 +86,19 @@ function _defineProperty(obj, key, value) {
|
|
|
86
86
|
return obj;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
function _arrayWithHoles(arr) {
|
|
90
|
-
if (Array.isArray(arr)) return arr;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function _iterableToArrayLimit(r, l) {
|
|
94
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
95
|
-
if (null != t) {
|
|
96
|
-
var e,
|
|
97
|
-
n,
|
|
98
|
-
i,
|
|
99
|
-
u,
|
|
100
|
-
a = [],
|
|
101
|
-
f = !0,
|
|
102
|
-
o = !1;
|
|
103
|
-
try {
|
|
104
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
105
|
-
if (Object(t) !== t) return;
|
|
106
|
-
f = !1;
|
|
107
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
108
|
-
} catch (r) {
|
|
109
|
-
o = !0, n = r;
|
|
110
|
-
} finally {
|
|
111
|
-
try {
|
|
112
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
113
|
-
} finally {
|
|
114
|
-
if (o) throw n;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return a;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function _arrayLikeToArray(arr, len) {
|
|
122
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
123
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
124
|
-
return arr2;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
128
|
-
if (!o) return;
|
|
129
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
130
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
131
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
132
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
133
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function _nonIterableRest() {
|
|
137
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function _slicedToArray(arr, i) {
|
|
141
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
142
|
-
}
|
|
143
|
-
|
|
144
89
|
var classes = {
|
|
145
90
|
root: function root(_ref) {
|
|
146
|
-
var props = _ref.props
|
|
147
|
-
focusedState = _ref.focusedState;
|
|
91
|
+
var props = _ref.props;
|
|
148
92
|
return utils.classNames('p-radiobutton p-component', {
|
|
149
|
-
'p-radiobutton-checked': props.checked,
|
|
150
|
-
'p-radiobutton-disabled': props.disabled,
|
|
151
|
-
'p-radiobutton-focused': focusedState
|
|
152
|
-
});
|
|
153
|
-
},
|
|
154
|
-
input: function input(_ref2) {
|
|
155
|
-
var props = _ref2.props,
|
|
156
|
-
focusedState = _ref2.focusedState;
|
|
157
|
-
return utils.classNames('p-radiobutton-box', {
|
|
158
93
|
'p-highlight': props.checked,
|
|
159
94
|
'p-disabled': props.disabled,
|
|
160
|
-
'p-
|
|
95
|
+
'p-invalid': props.invalid
|
|
161
96
|
});
|
|
162
97
|
},
|
|
98
|
+
box: 'p-radiobutton-box',
|
|
99
|
+
input: 'p-radiobutton-input',
|
|
163
100
|
icon: 'p-radiobutton-icon'
|
|
164
101
|
};
|
|
165
|
-
var styles = "\n@layer primereact {\n .p-radiobutton {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n vertical-align: bottom;\n }\n \n .p-radiobutton-box {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n \n .p-radiobutton-icon {\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n transform: translateZ(0) scale(.1);\n border-radius: 50%;\n visibility: hidden;\n }\n \n .p-radiobutton-box.p-highlight .p-radiobutton-icon {\n transform: translateZ(0) scale(1.0, 1.0);\n visibility: visible;\n }\n}\n";
|
|
166
102
|
var RadioButtonBase = componentbase.ComponentBase.extend({
|
|
167
103
|
defaultProps: {
|
|
168
104
|
__TYPE: 'RadioButton',
|
|
@@ -173,6 +109,7 @@ var RadioButtonBase = componentbase.ComponentBase.extend({
|
|
|
173
109
|
id: null,
|
|
174
110
|
inputId: null,
|
|
175
111
|
inputRef: null,
|
|
112
|
+
invalid: false,
|
|
176
113
|
name: null,
|
|
177
114
|
onChange: null,
|
|
178
115
|
onClick: null,
|
|
@@ -185,8 +122,7 @@ var RadioButtonBase = componentbase.ComponentBase.extend({
|
|
|
185
122
|
children: undefined
|
|
186
123
|
},
|
|
187
124
|
css: {
|
|
188
|
-
classes: classes
|
|
189
|
-
styles: styles
|
|
125
|
+
classes: classes
|
|
190
126
|
}
|
|
191
127
|
});
|
|
192
128
|
|
|
@@ -196,33 +132,26 @@ var RadioButton = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
196
132
|
var mergeProps = hooks.useMergeProps();
|
|
197
133
|
var context = React__namespace.useContext(api.PrimeReactContext);
|
|
198
134
|
var props = RadioButtonBase.getProps(inProps, context);
|
|
199
|
-
var _React$useState = React__namespace.useState(false),
|
|
200
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
201
|
-
focusedState = _React$useState2[0],
|
|
202
|
-
setFocusedState = _React$useState2[1];
|
|
203
135
|
var elementRef = React__namespace.useRef(null);
|
|
204
136
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
205
137
|
var _RadioButtonBase$setM = RadioButtonBase.setMetaData({
|
|
206
|
-
props: props
|
|
207
|
-
state: {
|
|
208
|
-
focused: focusedState
|
|
209
|
-
}
|
|
138
|
+
props: props
|
|
210
139
|
}),
|
|
211
140
|
ptm = _RadioButtonBase$setM.ptm,
|
|
212
141
|
cx = _RadioButtonBase$setM.cx,
|
|
213
142
|
isUnstyled = _RadioButtonBase$setM.isUnstyled;
|
|
214
143
|
componentbase.useHandleStyle(RadioButtonBase.css.styles, isUnstyled, {
|
|
215
|
-
name: 'radiobutton'
|
|
216
|
-
styled: true
|
|
144
|
+
name: 'radiobutton'
|
|
217
145
|
});
|
|
218
146
|
var select = function select(event) {
|
|
219
|
-
|
|
147
|
+
onChange(event);
|
|
220
148
|
};
|
|
221
|
-
var
|
|
222
|
-
if (props.disabled) {
|
|
149
|
+
var onChange = function onChange(event) {
|
|
150
|
+
if (props.disabled || props.readonly) {
|
|
223
151
|
return;
|
|
224
152
|
}
|
|
225
|
-
if (props.onChange
|
|
153
|
+
if (props.onChange) {
|
|
154
|
+
var _props$onChange;
|
|
226
155
|
var checked = props.checked;
|
|
227
156
|
var radioClicked = event.target instanceof HTMLDivElement;
|
|
228
157
|
var inputClicked = event.target === inputRef.current;
|
|
@@ -247,47 +176,30 @@ var RadioButton = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
247
176
|
checked: value
|
|
248
177
|
}
|
|
249
178
|
};
|
|
250
|
-
props
|
|
179
|
+
props === null || props === void 0 || (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, eventData);
|
|
251
180
|
|
|
252
181
|
// do not continue if the user defined click wants to prevent
|
|
253
182
|
if (event.defaultPrevented) {
|
|
254
183
|
return;
|
|
255
184
|
}
|
|
256
185
|
if (isInputToggled || isRadioToggled) {
|
|
257
|
-
|
|
186
|
+
var _props$onChange2;
|
|
187
|
+
props === null || props === void 0 || (_props$onChange2 = props.onChange) === null || _props$onChange2 === void 0 || _props$onChange2.call(props, eventData);
|
|
258
188
|
if (isRadioToggled) {
|
|
259
189
|
inputRef.current.checked = value;
|
|
260
190
|
}
|
|
261
191
|
}
|
|
262
192
|
utils.DomHandler.focus(inputRef.current);
|
|
263
|
-
event.preventDefault();
|
|
264
193
|
}
|
|
265
194
|
};
|
|
266
|
-
var onFocus = function onFocus() {
|
|
267
|
-
|
|
195
|
+
var onFocus = function onFocus(event) {
|
|
196
|
+
var _props$onFocus;
|
|
197
|
+
props === null || props === void 0 || (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, event);
|
|
268
198
|
};
|
|
269
|
-
var onBlur = function onBlur() {
|
|
270
|
-
|
|
199
|
+
var onBlur = function onBlur(event) {
|
|
200
|
+
var _props$onBlur;
|
|
201
|
+
props === null || props === void 0 || (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, event);
|
|
271
202
|
};
|
|
272
|
-
var onKeyDown = function onKeyDown(event) {
|
|
273
|
-
if (event.code === 'Space' || event.key === ' ') {
|
|
274
|
-
// event.key is for Android support
|
|
275
|
-
onClick(event);
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
React__namespace.useEffect(function () {
|
|
279
|
-
if (inputRef.current) {
|
|
280
|
-
inputRef.current.checked = props.checked;
|
|
281
|
-
}
|
|
282
|
-
}, [props.checked]);
|
|
283
|
-
React__namespace.useEffect(function () {
|
|
284
|
-
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
285
|
-
}, [inputRef, props.inputRef]);
|
|
286
|
-
hooks.useMountEffect(function () {
|
|
287
|
-
if (props.autoFocus) {
|
|
288
|
-
utils.DomHandler.focus(inputRef.current, props.autoFocus);
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
203
|
React__namespace.useImperativeHandle(ref, function () {
|
|
292
204
|
return {
|
|
293
205
|
props: props,
|
|
@@ -303,46 +215,59 @@ var RadioButton = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namesp
|
|
|
303
215
|
}
|
|
304
216
|
};
|
|
305
217
|
});
|
|
218
|
+
React__namespace.useEffect(function () {
|
|
219
|
+
if (inputRef.current) {
|
|
220
|
+
inputRef.current.checked = props.checked;
|
|
221
|
+
}
|
|
222
|
+
}, [props.checked]);
|
|
223
|
+
React__namespace.useEffect(function () {
|
|
224
|
+
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
225
|
+
}, [inputRef, props.inputRef]);
|
|
226
|
+
hooks.useMountEffect(function () {
|
|
227
|
+
if (props.autoFocus) {
|
|
228
|
+
utils.DomHandler.focus(inputRef.current, props.autoFocus);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
306
231
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
307
232
|
var otherProps = RadioButtonBase.getOtherProps(props);
|
|
308
|
-
var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
|
|
309
233
|
var rootProps = mergeProps({
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
})),
|
|
234
|
+
id: props.id,
|
|
235
|
+
className: utils.classNames(props.className, cx('root')),
|
|
313
236
|
style: props.style,
|
|
314
|
-
onClick: onClick,
|
|
315
237
|
'data-p-checked': props.checked
|
|
316
238
|
}, RadioButtonBase.getOtherProps(props), ptm('root'));
|
|
317
|
-
var
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
239
|
+
var createInputElement = function createInputElement() {
|
|
240
|
+
var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
|
|
241
|
+
var inputProps = mergeProps(_objectSpread({
|
|
242
|
+
id: props.inputId,
|
|
243
|
+
type: 'radio',
|
|
244
|
+
name: props.name,
|
|
245
|
+
defaultChecked: props.checked,
|
|
246
|
+
onFocus: onFocus,
|
|
247
|
+
onBlur: onBlur,
|
|
248
|
+
onChange: onChange,
|
|
249
|
+
disabled: props.disabled,
|
|
250
|
+
readonly: props.readonly,
|
|
251
|
+
required: props.required,
|
|
252
|
+
tabIndex: props.tabIndex,
|
|
253
|
+
className: cx('input')
|
|
254
|
+
}, ariaProps), ptm('input'));
|
|
255
|
+
return /*#__PURE__*/React__namespace.createElement("input", _extends({
|
|
256
|
+
ref: inputRef
|
|
257
|
+
}, inputProps));
|
|
258
|
+
};
|
|
259
|
+
var createBoxElement = function createBoxElement() {
|
|
260
|
+
var boxProps = mergeProps({
|
|
261
|
+
className: cx('box')
|
|
262
|
+
}, ptm('box'));
|
|
263
|
+
var iconProps = mergeProps({
|
|
264
|
+
className: cx('icon')
|
|
265
|
+
}, ptm('icon'));
|
|
266
|
+
return /*#__PURE__*/React__namespace.createElement("div", boxProps, /*#__PURE__*/React__namespace.createElement("div", iconProps));
|
|
267
|
+
};
|
|
339
268
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
340
|
-
id: props.id,
|
|
341
269
|
ref: elementRef
|
|
342
|
-
}, rootProps),
|
|
343
|
-
id: props.inputId,
|
|
344
|
-
ref: inputRef
|
|
345
|
-
}, hiddenInputProps))), /*#__PURE__*/React__namespace.createElement("div", inputProps, /*#__PURE__*/React__namespace.createElement("div", iconProps))), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
270
|
+
}, rootProps), createInputElement(), createBoxElement()), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
346
271
|
target: elementRef,
|
|
347
272
|
content: props.tooltip,
|
|
348
273
|
pt: ptm('tooltip')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/componentbase"),r=require("primereact/hooks"),o=require("primereact/tooltip"),i=require("primereact/utils");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/componentbase"),r=require("primereact/hooks"),o=require("primereact/tooltip"),i=require("primereact/utils");function u(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 c=u(e);function a(){return a=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},a.apply(this,arguments)}function l(e){return l="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},l(e)}function s(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function p(e){var t=s(e,"string");return"symbol"===l(t)?t:String(t)}var d=n.ComponentBase.extend({defaultProps:{__TYPE:"RadioButton",autoFocus:!1,checked:!1,className:null,disabled:!1,id:null,inputId:null,inputRef:null,invalid:!1,name:null,onChange:null,onClick:null,required:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,value:null,children:void 0},css:{classes:{root:function(e){var t=e.props;return i.classNames("p-radiobutton p-component",{"p-highlight":t.checked,"p-disabled":t.disabled,"p-invalid":t.invalid})},box:"p-radiobutton-box",input:"p-radiobutton-input",icon:"p-radiobutton-icon"}}});function f(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?f(Object(n),!0).forEach((function(t){var r,o,i;r=e,i=n[t],(o=p(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)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=c.memo(c.forwardRef((function(e,u){var l=r.useMergeProps(),s=c.useContext(t.PrimeReactContext),p=d.getProps(e,s),f=c.useRef(null),m=c.useRef(p.inputRef),v=d.setMetaData({props:p}),y=v.ptm,g=v.cx;n.useHandleStyle(d.css.styles,v.isUnstyled,{name:"radiobutton"});var h=function(e){O(e)},O=function(e){if(!p.disabled&&!p.readonly&&p.onChange){var t,n,r=p.checked,o=e.target instanceof HTMLDivElement,u=e.target===m.current&&e.target.checked!==r,c=o&&i.DomHandler.hasClass(f.current,"p-radiobutton-checked")===r&&!r,a=!r,l={originalEvent:e,value:p.value,checked:a,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{type:"radio",name:p.name,id:p.id,value:p.value,checked:a}};if(null==p||null===(t=p.onChange)||void 0===t||t.call(p,l),e.defaultPrevented)return;if(u||c)null==p||null===(n=p.onChange)||void 0===n||n.call(p,l),c&&(m.current.checked=a);i.DomHandler.focus(m.current)}},P=function(e){var t;null==p||null===(t=p.onFocus)||void 0===t||t.call(p,e)},j=function(e){var t;null==p||null===(t=p.onBlur)||void 0===t||t.call(p,e)};c.useImperativeHandle(u,(function(){return{props:p,select:h,focus:function(){return i.DomHandler.focus(m.current)},getElement:function(){return f.current},getInput:function(){return m.current}}})),c.useEffect((function(){m.current&&(m.current.checked=p.checked)}),[p.checked]),c.useEffect((function(){i.ObjectUtils.combinedRefs(m,p.inputRef)}),[m,p.inputRef]),r.useMountEffect((function(){p.autoFocus&&i.DomHandler.focus(m.current,p.autoFocus)}));var k,E,D,R,x=i.ObjectUtils.isNotEmpty(p.tooltip),w=d.getOtherProps(p),S=l({id:p.id,className:i.classNames(p.className,g("root")),style:p.style,"data-p-checked":p.checked},d.getOtherProps(p),y("root"));return c.createElement(c.Fragment,null,c.createElement("div",a({ref:f},S),(D=i.ObjectUtils.reduceKeys(w,i.DomHandler.ARIA_PROPS),R=l(b({id:p.inputId,type:"radio",name:p.name,defaultChecked:p.checked,onFocus:P,onBlur:j,onChange:O,disabled:p.disabled,readonly:p.readonly,required:p.required,tabIndex:p.tabIndex,className:g("input")},D),y("input")),c.createElement("input",a({ref:m},R))),(k=l({className:g("box")},y("box")),E=l({className:g("icon")},y("icon")),c.createElement("div",k,c.createElement("div",E)))),x&&c.createElement(o.Tooltip,a({target:f,content:p.tooltip,pt:y("tooltip")},p.tooltipOptions)))})));m.displayName="RadioButton",exports.RadioButton=m;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
|
+
import { CheckboxPassThroughType } from '../checkbox/checkbox';
|
|
11
12
|
import { ComponentHooks } from '../componentbase/componentbase';
|
|
12
13
|
import { PassThroughOptions } from '../passthrough';
|
|
13
14
|
import { TooltipPassThroughOptions } from '../tooltip/tooltip';
|
|
@@ -22,7 +23,6 @@ export declare type RadioButtonPassThroughType<T> = PassThroughType<T, RadioButt
|
|
|
22
23
|
*/
|
|
23
24
|
export interface RadioButtonPassThroughMethodOptions {
|
|
24
25
|
props: RadioButtonProps;
|
|
25
|
-
state: RadioButtonState;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -34,22 +34,18 @@ export interface RadioButtonPassThroughOptions {
|
|
|
34
34
|
* Uses to pass attributes to the root's DOM element.
|
|
35
35
|
*/
|
|
36
36
|
root?: RadioButtonPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
37
|
-
/**
|
|
38
|
-
* Uses to pass attributes to the input's DOM element.
|
|
39
|
-
*/
|
|
40
|
-
input?: RadioButtonPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
41
37
|
/**
|
|
42
38
|
* Uses to pass attributes to the icon's DOM element.
|
|
43
39
|
*/
|
|
44
40
|
icon?: RadioButtonPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
45
41
|
/**
|
|
46
|
-
* Uses to pass attributes to the
|
|
42
|
+
* Uses to pass attributes to the input's DOM element.
|
|
47
43
|
*/
|
|
48
|
-
|
|
44
|
+
input?: RadioButtonPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
49
45
|
/**
|
|
50
|
-
*
|
|
46
|
+
* Used to pass attributes to the box's DOM element.
|
|
51
47
|
*/
|
|
52
|
-
|
|
48
|
+
box?: CheckboxPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
53
49
|
/**
|
|
54
50
|
* Uses to pass attributes tooltip's DOM element.
|
|
55
51
|
* @type {TooltipPassThroughOptions}
|
|
@@ -62,17 +58,6 @@ export interface RadioButtonPassThroughOptions {
|
|
|
62
58
|
hooks?: ComponentHooks;
|
|
63
59
|
}
|
|
64
60
|
|
|
65
|
-
/**
|
|
66
|
-
* Defines current inline state in RadioButton component.
|
|
67
|
-
*/
|
|
68
|
-
export interface RadioButtonState {
|
|
69
|
-
/**
|
|
70
|
-
* Current focused state as a boolean.
|
|
71
|
-
* @defaultValue false
|
|
72
|
-
*/
|
|
73
|
-
focused: boolean;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
61
|
/**
|
|
77
62
|
* Custom change event.
|
|
78
63
|
* @see {@link RadioButtonProps.onChange}
|
|
@@ -81,19 +66,11 @@ export interface RadioButtonState {
|
|
|
81
66
|
*/
|
|
82
67
|
interface RadioButtonChangeEvent extends FormEvent {}
|
|
83
68
|
|
|
84
|
-
/**
|
|
85
|
-
* Custom click event.
|
|
86
|
-
* @see {@link RadioButtonProps.onClick}
|
|
87
|
-
* @extends {FormEvent}
|
|
88
|
-
* @event
|
|
89
|
-
*/
|
|
90
|
-
interface RadioButtonClickEvent extends FormEvent {}
|
|
91
|
-
|
|
92
69
|
/**
|
|
93
70
|
* Defines valid properties in RadioButton component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
94
71
|
* @group Properties
|
|
95
72
|
*/
|
|
96
|
-
export interface RadioButtonProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange' | '
|
|
73
|
+
export interface RadioButtonProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange' | 'ref' | 'pt'> {
|
|
97
74
|
/**
|
|
98
75
|
* When present, it specifies that the component should automatically get focus on load.
|
|
99
76
|
* @defaultValue false
|
|
@@ -121,10 +98,20 @@ export interface RadioButtonProps extends Omit<React.DetailedHTMLProps<React.Inp
|
|
|
121
98
|
*/
|
|
122
99
|
checked?: boolean | undefined;
|
|
123
100
|
/**
|
|
124
|
-
* When present, it specifies that the
|
|
101
|
+
* When present, it specifies that the component should have invalid state style.
|
|
102
|
+
* @defaultValue false
|
|
103
|
+
*/
|
|
104
|
+
invalid?: boolean | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* When present, it specifies that the component should be disabled.
|
|
125
107
|
* @defaultValue false
|
|
126
108
|
*/
|
|
127
109
|
disabled?: boolean | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* When present, it specifies that an input field is read-only.
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
readonly?: boolean | undefined;
|
|
128
115
|
/**
|
|
129
116
|
* When present, it specifies that an input field must be filled out before submitting the form.
|
|
130
117
|
* @defaultValue false
|
|
@@ -143,11 +130,6 @@ export interface RadioButtonProps extends Omit<React.DetailedHTMLProps<React.Inp
|
|
|
143
130
|
* @param {RadioButtonChangeEvent} event - Custom change event.
|
|
144
131
|
*/
|
|
145
132
|
onChange?(event: RadioButtonChangeEvent): void;
|
|
146
|
-
/**
|
|
147
|
-
* Callback to invoke on click. Mark the event with preventDefault to prevent the option from changing.
|
|
148
|
-
* @param {RadioButtonClickEvent} event - Custom click event.
|
|
149
|
-
*/
|
|
150
|
-
onClick?(event: RadioButtonClickEvent): void;
|
|
151
133
|
/**
|
|
152
134
|
* Used to get the child elements of the component.
|
|
153
135
|
* @readonly
|