primereact 9.4.0 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/api.cjs.js +1 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +7 -6
- package/api/api.esm.js +1 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +1 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +24 -6
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +4 -0
- package/autocomplete/autocomplete.esm.js +24 -6
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +24 -6
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +87 -49
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +88 -50
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +88 -51
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/calendar.cjs.js +8 -1
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -2
- package/calendar/calendar.esm.js +8 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +8 -1
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +135 -82
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +113 -1
- package/carousel/carousel.esm.js +136 -83
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +136 -84
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +27 -23
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +5 -0
- package/cascadeselect/cascadeselect.esm.js +27 -23
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +28 -24
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +28 -43
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +30 -0
- package/chart/chart.esm.js +15 -30
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +140 -156
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +21 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +5 -0
- package/checkbox/checkbox.esm.js +22 -16
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +21 -15
- package/checkbox/checkbox.min.js +1 -1
- package/chips/chips.cjs.js +24 -17
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +5 -0
- package/chips/chips.esm.js +24 -17
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +25 -19
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +4 -0
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +5 -0
- package/colorpicker/colorpicker.esm.js +4 -0
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +4 -0
- package/colorpicker/colorpicker.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +2 -2
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +2 -2
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +2 -2
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +111 -61
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +112 -62
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +112 -63
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +12873 -1829
- package/core/core.min.js +34 -34
- package/datatable/datatable.cjs.js +181 -175
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +181 -175
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +181 -175
- package/datatable/datatable.min.js +1 -1
- package/dock/dock.cjs.js +82 -45
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +83 -46
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +83 -47
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +2 -2
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +2 -2
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +3 -3
- package/dropdown/dropdown.min.js +1 -1
- package/fileupload/fileupload.cjs.js +168 -137
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +150 -1
- package/fileupload/fileupload.esm.js +169 -138
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +168 -137
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +131 -118
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +132 -119
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +130 -118
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +5 -1
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +2 -1
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +6 -3
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +410 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +410 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +410 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +410 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +410 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +410 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +410 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +410 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +410 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +410 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +410 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +410 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +410 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +410 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +410 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +410 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +410 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +410 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +410 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +410 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +410 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +410 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +410 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +410 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +410 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +410 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +410 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +410 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +410 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +410 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +410 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +410 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +410 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +410 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +410 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +410 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +410 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +410 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +410 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +410 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +410 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +410 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +410 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +410 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +410 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +410 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +410 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +410 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +410 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +410 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +410 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +410 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +410 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +410 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +410 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +410 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +410 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +410 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +410 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +410 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +410 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +410 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +410 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +410 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +410 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +410 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +410 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +410 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +410 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +410 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +410 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +410 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +410 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +410 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +410 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +410 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +410 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +410 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +410 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +410 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +410 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +410 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +410 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +410 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +472 -78
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +474 -80
- package/image/image.esm.min.js +1 -1
- package/image/image.js +473 -80
- package/image/image.min.js +1 -1
- package/inputmask/inputmask.cjs.js +18 -16
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +18 -16
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +18 -16
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +0 -2
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +0 -2
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +0 -2
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +7 -0
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +5 -0
- package/inputswitch/inputswitch.esm.js +7 -0
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +8 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/megamenu/megamenu.cjs.js +147 -96
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +147 -96
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +145 -95
- package/megamenu/megamenu.min.js +1 -1
- package/menu/menu.cjs.js +94 -55
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +95 -56
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +95 -57
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +118 -110
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +119 -111
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +119 -112
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +66 -46
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +67 -47
- package/message/message.esm.min.js +1 -1
- package/message/message.js +67 -48
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +63 -62
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +63 -62
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +63 -63
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +32 -29
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -0
- package/multiselect/multiselect.esm.js +33 -30
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +32 -29
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +15 -11
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +5 -0
- package/multistatecheckbox/multistatecheckbox.esm.js +15 -11
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +15 -11
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +3 -3
- package/panelmenu/panelmenu.cjs.js +145 -83
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +145 -83
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +144 -83
- package/panelmenu/panelmenu.min.js +1 -1
- package/primereact.all.cjs.js +2250 -1578
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2250 -1578
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2250 -1578
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +16 -9
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +5 -0
- package/radiobutton/radiobutton.esm.js +16 -9
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +17 -11
- package/radiobutton/radiobutton.min.js +1 -1
- package/resources/primereact.css +275 -267
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +13 -7
- package/resources/themes/arya-green/theme.css +13 -7
- package/resources/themes/arya-orange/theme.css +13 -7
- package/resources/themes/arya-purple/theme.css +13 -7
- package/resources/themes/bootstrap4-dark-blue/theme.css +13 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +13 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +13 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +13 -7
- package/resources/themes/fluent-light/theme.css +13 -7
- package/resources/themes/lara-dark-blue/theme.css +13 -7
- package/resources/themes/lara-dark-indigo/theme.css +13 -7
- package/resources/themes/lara-dark-purple/theme.css +13 -7
- package/resources/themes/lara-dark-teal/theme.css +13 -7
- package/resources/themes/lara-light-blue/theme.css +13 -7
- package/resources/themes/lara-light-indigo/theme.css +13 -7
- package/resources/themes/lara-light-purple/theme.css +13 -7
- package/resources/themes/lara-light-teal/theme.css +13 -7
- package/resources/themes/luna-amber/theme.css +13 -7
- package/resources/themes/luna-blue/theme.css +13 -7
- package/resources/themes/luna-green/theme.css +13 -7
- package/resources/themes/luna-pink/theme.css +13 -7
- package/resources/themes/md-dark-deeppurple/theme.css +13 -7
- package/resources/themes/md-dark-indigo/theme.css +13 -7
- package/resources/themes/md-light-deeppurple/theme.css +13 -7
- package/resources/themes/md-light-indigo/theme.css +13 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +13 -7
- package/resources/themes/mdc-dark-indigo/theme.css +13 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +13 -7
- package/resources/themes/mdc-light-indigo/theme.css +13 -7
- package/resources/themes/mira/theme.css +13 -7
- package/resources/themes/nano/theme.css +13 -7
- package/resources/themes/nova/theme.css +13 -7
- package/resources/themes/nova-accent/theme.css +13 -7
- package/resources/themes/nova-alt/theme.css +13 -7
- package/resources/themes/rhea/theme.css +13 -7
- package/resources/themes/saga-blue/theme.css +13 -7
- package/resources/themes/saga-green/theme.css +13 -7
- package/resources/themes/saga-orange/theme.css +13 -7
- package/resources/themes/saga-purple/theme.css +13 -7
- package/resources/themes/soho-dark/theme.css +13 -7
- package/resources/themes/soho-light/theme.css +13 -7
- package/resources/themes/tailwind-light/theme.css +13 -7
- package/resources/themes/vela-blue/theme.css +13 -7
- package/resources/themes/vela-green/theme.css +13 -7
- package/resources/themes/vela-orange/theme.css +13 -7
- package/resources/themes/vela-purple/theme.css +13 -7
- package/resources/themes/viva-dark/theme.css +13 -7
- package/resources/themes/viva-light/theme.css +13 -7
- package/slidemenu/slidemenu.cjs.js +121 -111
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +98 -1
- package/slidemenu/slidemenu.esm.js +122 -112
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +122 -113
- package/slidemenu/slidemenu.min.js +1 -1
- package/steps/steps.cjs.js +78 -45
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +79 -46
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +79 -47
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +83 -47
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +84 -48
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +84 -49
- package/tabmenu/tabmenu.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +104 -59
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +105 -60
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +105 -61
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +72 -71
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +120 -2
- package/toast/toast.esm.js +73 -72
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +70 -70
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +6 -0
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +6 -0
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +7 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/treeselect/treeselect.cjs.js +3 -0
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +5 -0
- package/treeselect/treeselect.esm.js +3 -0
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +3 -0
- package/treeselect/treeselect.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +14 -7
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +5 -0
- package/tristatecheckbox/tristatecheckbox.esm.js +14 -7
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +15 -9
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +25 -4
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +22 -4
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +26 -6
- package/utils/utils.min.js +1 -1
- package/web-types.json +1 -1
package/dock/dock.cjs.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var ripple = require('primereact/ripple');
|
|
7
7
|
var utils = require('primereact/utils');
|
|
8
|
+
var componentbase = require('primereact/componentbase');
|
|
8
9
|
|
|
9
10
|
function _interopNamespace(e) {
|
|
10
11
|
if (e && e.__esModule) return e;
|
|
@@ -26,19 +27,45 @@ function _interopNamespace(e) {
|
|
|
26
27
|
|
|
27
28
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
29
|
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
function _typeof(obj) {
|
|
31
|
+
"@babel/helpers - typeof";
|
|
32
|
+
|
|
33
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
34
|
+
return typeof obj;
|
|
35
|
+
} : function (obj) {
|
|
36
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
37
|
+
}, _typeof(obj);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function _toPrimitive(input, hint) {
|
|
41
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
42
|
+
var prim = input[Symbol.toPrimitive];
|
|
43
|
+
if (prim !== undefined) {
|
|
44
|
+
var res = prim.call(input, hint || "default");
|
|
45
|
+
if (_typeof(res) !== "object") return res;
|
|
46
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
47
|
+
}
|
|
48
|
+
return (hint === "string" ? String : Number)(input);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function _toPropertyKey(arg) {
|
|
52
|
+
var key = _toPrimitive(arg, "string");
|
|
53
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function _defineProperty(obj, key, value) {
|
|
57
|
+
key = _toPropertyKey(key);
|
|
58
|
+
if (key in obj) {
|
|
59
|
+
Object.defineProperty(obj, key, {
|
|
60
|
+
value: value,
|
|
61
|
+
enumerable: true,
|
|
62
|
+
configurable: true,
|
|
63
|
+
writable: true
|
|
64
|
+
});
|
|
65
|
+
} else {
|
|
66
|
+
obj[key] = value;
|
|
67
|
+
}
|
|
68
|
+
return obj;
|
|
42
69
|
}
|
|
43
70
|
|
|
44
71
|
function _arrayWithHoles(arr) {
|
|
@@ -96,7 +123,7 @@ function _slicedToArray(arr, i) {
|
|
|
96
123
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
97
124
|
}
|
|
98
125
|
|
|
99
|
-
var DockBase = {
|
|
126
|
+
var DockBase = componentbase.ComponentBase.extend({
|
|
100
127
|
defaultProps: {
|
|
101
128
|
__TYPE: 'Dock',
|
|
102
129
|
id: null,
|
|
@@ -108,21 +135,24 @@ var DockBase = {
|
|
|
108
135
|
header: null,
|
|
109
136
|
footer: null,
|
|
110
137
|
children: undefined
|
|
111
|
-
},
|
|
112
|
-
getProps: function getProps(props) {
|
|
113
|
-
return utils.ObjectUtils.getMergedProps(props, DockBase.defaultProps);
|
|
114
|
-
},
|
|
115
|
-
getOtherProps: function getOtherProps(props) {
|
|
116
|
-
return utils.ObjectUtils.getDiffProps(props, DockBase.defaultProps);
|
|
117
138
|
}
|
|
118
|
-
};
|
|
139
|
+
});
|
|
119
140
|
|
|
141
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
142
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
120
143
|
var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
121
144
|
var props = DockBase.getProps(inProps);
|
|
122
145
|
var _React$useState = React__namespace.useState(-3),
|
|
123
146
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
124
147
|
currentIndexState = _React$useState2[0],
|
|
125
148
|
setCurrentIndexState = _React$useState2[1];
|
|
149
|
+
var _DockBase$setMetaData = DockBase.setMetaData({
|
|
150
|
+
props: props,
|
|
151
|
+
state: {
|
|
152
|
+
currentIndex: currentIndexState
|
|
153
|
+
}
|
|
154
|
+
}),
|
|
155
|
+
ptm = _DockBase$setMetaData.ptm;
|
|
126
156
|
var elementRef = React__namespace.useRef(null);
|
|
127
157
|
var onListMouseLeave = function onListMouseLeave() {
|
|
128
158
|
setCurrentIndexState(-3);
|
|
@@ -160,21 +190,23 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
160
190
|
'p-disabled': disabled
|
|
161
191
|
});
|
|
162
192
|
var iconClassName = utils.classNames('p-dock-action-icon', _icon);
|
|
163
|
-
var
|
|
193
|
+
var iconProps = utils.mergeProps({
|
|
164
194
|
className: 'p-dock-action-icon'
|
|
165
|
-
},
|
|
195
|
+
}, ptm('icon'));
|
|
196
|
+
var icon = utils.IconUtils.getJSXIcon(_icon, _objectSpread({}, iconProps), {
|
|
166
197
|
props: props
|
|
167
198
|
});
|
|
168
|
-
var
|
|
199
|
+
var actionProps = utils.mergeProps({
|
|
169
200
|
href: url || '#',
|
|
170
|
-
role:
|
|
201
|
+
role: 'menuitem',
|
|
171
202
|
className: contentClassName,
|
|
172
203
|
target: target,
|
|
173
|
-
|
|
204
|
+
'data-pr-tooltip': label,
|
|
174
205
|
onClick: function onClick(e) {
|
|
175
206
|
return onItemClick(e, item);
|
|
176
207
|
}
|
|
177
|
-
},
|
|
208
|
+
}, ptm('action'));
|
|
209
|
+
var content = /*#__PURE__*/React__namespace.createElement("a", actionProps, icon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
178
210
|
if (template) {
|
|
179
211
|
var defaultContentOptions = {
|
|
180
212
|
onClick: function onClick(e) {
|
|
@@ -188,14 +220,15 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
188
220
|
};
|
|
189
221
|
content = utils.ObjectUtils.getJSXElement(template, item, defaultContentOptions);
|
|
190
222
|
}
|
|
191
|
-
|
|
223
|
+
var menuitemProps = utils.mergeProps({
|
|
192
224
|
key: index,
|
|
193
225
|
className: className,
|
|
194
|
-
role:
|
|
226
|
+
role: 'none',
|
|
195
227
|
onMouseEnter: function onMouseEnter() {
|
|
196
228
|
return onItemMouseEnter(index);
|
|
197
229
|
}
|
|
198
|
-
},
|
|
230
|
+
}, ptm('menuitem'));
|
|
231
|
+
return /*#__PURE__*/React__namespace.createElement("li", menuitemProps, content);
|
|
199
232
|
};
|
|
200
233
|
var createItems = function createItems() {
|
|
201
234
|
return props.model ? props.model.map(createItem) : null;
|
|
@@ -205,28 +238,31 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
205
238
|
var _header = utils.ObjectUtils.getJSXElement(props.header, {
|
|
206
239
|
props: props
|
|
207
240
|
});
|
|
208
|
-
|
|
209
|
-
className:
|
|
210
|
-
},
|
|
241
|
+
var headerProps = utils.mergeProps({
|
|
242
|
+
className: 'p-dock-header'
|
|
243
|
+
}, ptm('header'));
|
|
244
|
+
return /*#__PURE__*/React__namespace.createElement("div", headerProps, _header);
|
|
211
245
|
}
|
|
212
246
|
return null;
|
|
213
247
|
};
|
|
214
248
|
var createList = function createList() {
|
|
215
249
|
var items = createItems();
|
|
216
|
-
|
|
217
|
-
className:
|
|
218
|
-
role:
|
|
250
|
+
var menuProps = utils.mergeProps({
|
|
251
|
+
className: 'p-dock-list',
|
|
252
|
+
role: 'menu',
|
|
219
253
|
onMouseLeave: onListMouseLeave
|
|
220
|
-
},
|
|
254
|
+
}, ptm('menu'));
|
|
255
|
+
return /*#__PURE__*/React__namespace.createElement("ul", menuProps, items);
|
|
221
256
|
};
|
|
222
257
|
var createFooter = function createFooter() {
|
|
223
258
|
if (props.footer) {
|
|
224
259
|
var _footer = utils.ObjectUtils.getJSXElement(props.footer, {
|
|
225
260
|
props: props
|
|
226
261
|
});
|
|
227
|
-
|
|
228
|
-
className:
|
|
229
|
-
},
|
|
262
|
+
var footerProps = utils.mergeProps({
|
|
263
|
+
className: 'p-dock-footer'
|
|
264
|
+
}, ptm('footer'));
|
|
265
|
+
return /*#__PURE__*/React__namespace.createElement("div", footerProps, _footer);
|
|
230
266
|
}
|
|
231
267
|
return null;
|
|
232
268
|
};
|
|
@@ -238,21 +274,22 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
238
274
|
}
|
|
239
275
|
};
|
|
240
276
|
});
|
|
241
|
-
var otherProps = DockBase.getOtherProps(props);
|
|
242
277
|
var className = utils.classNames("p-dock p-component p-dock-".concat(props.position), {
|
|
243
278
|
'p-dock-magnification': props.magnification
|
|
244
279
|
}, props.className);
|
|
245
280
|
var header = createHeader();
|
|
246
281
|
var list = createList();
|
|
247
282
|
var footer = createFooter();
|
|
248
|
-
|
|
283
|
+
var rootProps = utils.mergeProps({
|
|
249
284
|
id: props.id,
|
|
250
285
|
ref: elementRef,
|
|
251
286
|
className: className,
|
|
252
287
|
style: props.style
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
|
|
288
|
+
}, DockBase.getOtherProps(props), ptm('root'));
|
|
289
|
+
var containerProps = utils.mergeProps({
|
|
290
|
+
className: 'p-dock-container'
|
|
291
|
+
}, ptm('container'));
|
|
292
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, /*#__PURE__*/React__namespace.createElement("div", containerProps, header, list, footer));
|
|
256
293
|
}));
|
|
257
294
|
Dock.displayName = 'Dock';
|
|
258
295
|
|
package/dock/dock.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/ripple"),r=require("primereact/utils");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/ripple"),r=require("primereact/utils"),n=require("primereact/componentbase");function o(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 i=o(e);function c(e){return c="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},c(e)}function a(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function l(e){var t=a(e,"string");return"symbol"===c(t)?t:String(t)}function u(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){if(Array.isArray(e))return e}function m(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,c,a=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(u)throw o}}return a}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b=n.ComponentBase.extend({defaultProps:{__TYPE:"Dock",id:null,style:null,className:null,model:null,position:"bottom",magnification:!0,header:null,footer:null,children:void 0}});function y(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 v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var g=i.memo(i.forwardRef((function(e,n){var o,c,a=b.getProps(e),l=i.useState(-3),u=(c=2,s(o=l)||m(o,c)||f(o,c)||d()),p=u[0],y=u[1],g=b.setMetaData({props:a,state:{currentIndex:p}}).ptm,O=i.useRef(null),j=function(){y(-3)},P=function(e){y(e)},k=function(e,t){t.command&&t.command({originalEvent:e,item:t}),e.preventDefault()},h=function(e,n){if(!1===e.visible)return null;var o=e.disabled,c=e.icon,l=e.label,u=e.template,s=e.url,m=e.target,f=r.classNames("p-dock-item",{"p-dock-item-second-prev":p-2===n,"p-dock-item-prev":p-1===n,"p-dock-item-current":p===n,"p-dock-item-next":p+1===n,"p-dock-item-second-next":p+2===n}),d=r.classNames("p-dock-action",{"p-disabled":o}),b=r.classNames("p-dock-action-icon",c),y=r.mergeProps({className:"p-dock-action-icon"},g("icon")),O=r.IconUtils.getJSXIcon(c,v({},y),{props:a}),j=r.mergeProps({href:s||"#",role:"menuitem",className:d,target:m,"data-pr-tooltip":l,onClick:function(t){return k(t,e)}},g("action")),h=i.createElement("a",j,O,i.createElement(t.Ripple,null));u&&(h=r.ObjectUtils.getJSXElement(u,e,{onClick:function(t){return k(t,e)},className:d,iconClassName:b,element:h,props:a,index:n}));var E=r.mergeProps({key:n,className:f,role:"none",onMouseEnter:function(){return P(n)}},g("menuitem"));return i.createElement("li",E,h)};i.useImperativeHandle(n,(function(){return{props:a,getElement:function(){return O.current}}}));var E,S,N=r.classNames("p-dock p-component p-dock-".concat(a.position),{"p-dock-magnification":a.magnification},a.className),w=function(){if(a.header){var e=r.ObjectUtils.getJSXElement(a.header,{props:a}),t=r.mergeProps({className:"p-dock-header"},g("header"));return i.createElement("div",t,e)}return null}(),D=(E=a.model?a.model.map(h):null,S=r.mergeProps({className:"p-dock-list",role:"menu",onMouseLeave:j},g("menu")),i.createElement("ul",S,E)),x=function(){if(a.footer){var e=r.ObjectUtils.getJSXElement(a.footer,{props:a}),t=r.mergeProps({className:"p-dock-footer"},g("footer"));return i.createElement("div",t,e)}return null}(),I=r.mergeProps({id:a.id,ref:O,className:N,style:a.style},b.getOtherProps(a),g("root")),A=r.mergeProps({className:"p-dock-container"},g("container"));return i.createElement("div",I,i.createElement("div",A,w,D,x))})));g.displayName="Dock",exports.Dock=g;
|
package/dock/dock.d.ts
CHANGED
|
@@ -9,6 +9,67 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { MenuItem } from '../menuitem';
|
|
12
|
+
import { PassThroughType } from '../utils/utils';
|
|
13
|
+
|
|
14
|
+
export declare type DockPassThroughType<T> = PassThroughType<T, DockPassThroughMethodOptions>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Custom passthrough(pt) option method.
|
|
18
|
+
*/
|
|
19
|
+
export interface DockPassThroughMethodOptions {
|
|
20
|
+
props: DockProps;
|
|
21
|
+
state: DockState;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Custom passthrough(pt) options.
|
|
26
|
+
* @see {@link DockProps.pt}
|
|
27
|
+
*/
|
|
28
|
+
export interface DockPassThroughOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Uses to pass attributes to the root's DOM element.
|
|
31
|
+
*/
|
|
32
|
+
root?: DockPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
33
|
+
/**
|
|
34
|
+
* Uses to pass attributes to the container's DOM element.
|
|
35
|
+
*/
|
|
36
|
+
container?: DockPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
37
|
+
/**
|
|
38
|
+
* Uses to pass attributes to the header's DOM element.
|
|
39
|
+
*/
|
|
40
|
+
header?: DockPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
41
|
+
/**
|
|
42
|
+
* Uses to pass attributes to the footer's DOM element.
|
|
43
|
+
*/
|
|
44
|
+
footer?: DockPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
45
|
+
/**
|
|
46
|
+
* Uses to pass attributes to the list's DOM element.
|
|
47
|
+
*/
|
|
48
|
+
menu?: DockPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
|
|
49
|
+
/**
|
|
50
|
+
* Uses to pass attributes to the list item's DOM element.
|
|
51
|
+
*/
|
|
52
|
+
menuitem?: DockPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
53
|
+
/**
|
|
54
|
+
* Uses to pass attributes to the action's DOM element.
|
|
55
|
+
*/
|
|
56
|
+
action?: DockPassThroughType<React.HTMLAttributes<HTMLAnchorElement>>;
|
|
57
|
+
/**
|
|
58
|
+
* Uses to pass attributes to the icon's DOM element.
|
|
59
|
+
*/
|
|
60
|
+
icon?: DockPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Defines current inline state in Dock component.
|
|
65
|
+
*/
|
|
66
|
+
export interface DockState {
|
|
67
|
+
/**
|
|
68
|
+
* Current index as a number.
|
|
69
|
+
* @defaultvalue -3
|
|
70
|
+
*/
|
|
71
|
+
currentIndex: number;
|
|
72
|
+
}
|
|
12
73
|
|
|
13
74
|
/**
|
|
14
75
|
* Custom header template
|
|
@@ -59,6 +120,11 @@ export interface DockProps extends Omit<React.DetailedHTMLProps<React.HTMLAttrib
|
|
|
59
120
|
* @readonly
|
|
60
121
|
*/
|
|
61
122
|
children?: React.ReactNode | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
125
|
+
* @type {DockPassThroughOptions}
|
|
126
|
+
*/
|
|
127
|
+
pt?: DockPassThroughOptions;
|
|
62
128
|
}
|
|
63
129
|
|
|
64
130
|
/**
|
package/dock/dock.esm.js
CHANGED
|
@@ -1,20 +1,47 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Ripple } from 'primereact/ripple';
|
|
3
|
-
import {
|
|
3
|
+
import { classNames, mergeProps, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
4
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
4
5
|
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
function _typeof(obj) {
|
|
7
|
+
"@babel/helpers - typeof";
|
|
8
|
+
|
|
9
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
10
|
+
return typeof obj;
|
|
11
|
+
} : function (obj) {
|
|
12
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
13
|
+
}, _typeof(obj);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function _toPrimitive(input, hint) {
|
|
17
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
18
|
+
var prim = input[Symbol.toPrimitive];
|
|
19
|
+
if (prim !== undefined) {
|
|
20
|
+
var res = prim.call(input, hint || "default");
|
|
21
|
+
if (_typeof(res) !== "object") return res;
|
|
22
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
23
|
+
}
|
|
24
|
+
return (hint === "string" ? String : Number)(input);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function _toPropertyKey(arg) {
|
|
28
|
+
var key = _toPrimitive(arg, "string");
|
|
29
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) {
|
|
33
|
+
key = _toPropertyKey(key);
|
|
34
|
+
if (key in obj) {
|
|
35
|
+
Object.defineProperty(obj, key, {
|
|
36
|
+
value: value,
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true
|
|
40
|
+
});
|
|
41
|
+
} else {
|
|
42
|
+
obj[key] = value;
|
|
43
|
+
}
|
|
44
|
+
return obj;
|
|
18
45
|
}
|
|
19
46
|
|
|
20
47
|
function _arrayWithHoles(arr) {
|
|
@@ -72,7 +99,7 @@ function _slicedToArray(arr, i) {
|
|
|
72
99
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
73
100
|
}
|
|
74
101
|
|
|
75
|
-
var DockBase = {
|
|
102
|
+
var DockBase = ComponentBase.extend({
|
|
76
103
|
defaultProps: {
|
|
77
104
|
__TYPE: 'Dock',
|
|
78
105
|
id: null,
|
|
@@ -84,21 +111,24 @@ var DockBase = {
|
|
|
84
111
|
header: null,
|
|
85
112
|
footer: null,
|
|
86
113
|
children: undefined
|
|
87
|
-
},
|
|
88
|
-
getProps: function getProps(props) {
|
|
89
|
-
return ObjectUtils.getMergedProps(props, DockBase.defaultProps);
|
|
90
|
-
},
|
|
91
|
-
getOtherProps: function getOtherProps(props) {
|
|
92
|
-
return ObjectUtils.getDiffProps(props, DockBase.defaultProps);
|
|
93
114
|
}
|
|
94
|
-
};
|
|
115
|
+
});
|
|
95
116
|
|
|
117
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
118
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
96
119
|
var Dock = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
97
120
|
var props = DockBase.getProps(inProps);
|
|
98
121
|
var _React$useState = React.useState(-3),
|
|
99
122
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
100
123
|
currentIndexState = _React$useState2[0],
|
|
101
124
|
setCurrentIndexState = _React$useState2[1];
|
|
125
|
+
var _DockBase$setMetaData = DockBase.setMetaData({
|
|
126
|
+
props: props,
|
|
127
|
+
state: {
|
|
128
|
+
currentIndex: currentIndexState
|
|
129
|
+
}
|
|
130
|
+
}),
|
|
131
|
+
ptm = _DockBase$setMetaData.ptm;
|
|
102
132
|
var elementRef = React.useRef(null);
|
|
103
133
|
var onListMouseLeave = function onListMouseLeave() {
|
|
104
134
|
setCurrentIndexState(-3);
|
|
@@ -136,21 +166,23 @@ var Dock = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inPr
|
|
|
136
166
|
'p-disabled': disabled
|
|
137
167
|
});
|
|
138
168
|
var iconClassName = classNames('p-dock-action-icon', _icon);
|
|
139
|
-
var
|
|
169
|
+
var iconProps = mergeProps({
|
|
140
170
|
className: 'p-dock-action-icon'
|
|
141
|
-
},
|
|
171
|
+
}, ptm('icon'));
|
|
172
|
+
var icon = IconUtils.getJSXIcon(_icon, _objectSpread({}, iconProps), {
|
|
142
173
|
props: props
|
|
143
174
|
});
|
|
144
|
-
var
|
|
175
|
+
var actionProps = mergeProps({
|
|
145
176
|
href: url || '#',
|
|
146
|
-
role:
|
|
177
|
+
role: 'menuitem',
|
|
147
178
|
className: contentClassName,
|
|
148
179
|
target: target,
|
|
149
|
-
|
|
180
|
+
'data-pr-tooltip': label,
|
|
150
181
|
onClick: function onClick(e) {
|
|
151
182
|
return onItemClick(e, item);
|
|
152
183
|
}
|
|
153
|
-
},
|
|
184
|
+
}, ptm('action'));
|
|
185
|
+
var content = /*#__PURE__*/React.createElement("a", actionProps, icon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
154
186
|
if (template) {
|
|
155
187
|
var defaultContentOptions = {
|
|
156
188
|
onClick: function onClick(e) {
|
|
@@ -164,14 +196,15 @@ var Dock = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inPr
|
|
|
164
196
|
};
|
|
165
197
|
content = ObjectUtils.getJSXElement(template, item, defaultContentOptions);
|
|
166
198
|
}
|
|
167
|
-
|
|
199
|
+
var menuitemProps = mergeProps({
|
|
168
200
|
key: index,
|
|
169
201
|
className: className,
|
|
170
|
-
role:
|
|
202
|
+
role: 'none',
|
|
171
203
|
onMouseEnter: function onMouseEnter() {
|
|
172
204
|
return onItemMouseEnter(index);
|
|
173
205
|
}
|
|
174
|
-
},
|
|
206
|
+
}, ptm('menuitem'));
|
|
207
|
+
return /*#__PURE__*/React.createElement("li", menuitemProps, content);
|
|
175
208
|
};
|
|
176
209
|
var createItems = function createItems() {
|
|
177
210
|
return props.model ? props.model.map(createItem) : null;
|
|
@@ -181,28 +214,31 @@ var Dock = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inPr
|
|
|
181
214
|
var _header = ObjectUtils.getJSXElement(props.header, {
|
|
182
215
|
props: props
|
|
183
216
|
});
|
|
184
|
-
|
|
185
|
-
className:
|
|
186
|
-
},
|
|
217
|
+
var headerProps = mergeProps({
|
|
218
|
+
className: 'p-dock-header'
|
|
219
|
+
}, ptm('header'));
|
|
220
|
+
return /*#__PURE__*/React.createElement("div", headerProps, _header);
|
|
187
221
|
}
|
|
188
222
|
return null;
|
|
189
223
|
};
|
|
190
224
|
var createList = function createList() {
|
|
191
225
|
var items = createItems();
|
|
192
|
-
|
|
193
|
-
className:
|
|
194
|
-
role:
|
|
226
|
+
var menuProps = mergeProps({
|
|
227
|
+
className: 'p-dock-list',
|
|
228
|
+
role: 'menu',
|
|
195
229
|
onMouseLeave: onListMouseLeave
|
|
196
|
-
},
|
|
230
|
+
}, ptm('menu'));
|
|
231
|
+
return /*#__PURE__*/React.createElement("ul", menuProps, items);
|
|
197
232
|
};
|
|
198
233
|
var createFooter = function createFooter() {
|
|
199
234
|
if (props.footer) {
|
|
200
235
|
var _footer = ObjectUtils.getJSXElement(props.footer, {
|
|
201
236
|
props: props
|
|
202
237
|
});
|
|
203
|
-
|
|
204
|
-
className:
|
|
205
|
-
},
|
|
238
|
+
var footerProps = mergeProps({
|
|
239
|
+
className: 'p-dock-footer'
|
|
240
|
+
}, ptm('footer'));
|
|
241
|
+
return /*#__PURE__*/React.createElement("div", footerProps, _footer);
|
|
206
242
|
}
|
|
207
243
|
return null;
|
|
208
244
|
};
|
|
@@ -214,21 +250,22 @@ var Dock = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inPr
|
|
|
214
250
|
}
|
|
215
251
|
};
|
|
216
252
|
});
|
|
217
|
-
var otherProps = DockBase.getOtherProps(props);
|
|
218
253
|
var className = classNames("p-dock p-component p-dock-".concat(props.position), {
|
|
219
254
|
'p-dock-magnification': props.magnification
|
|
220
255
|
}, props.className);
|
|
221
256
|
var header = createHeader();
|
|
222
257
|
var list = createList();
|
|
223
258
|
var footer = createFooter();
|
|
224
|
-
|
|
259
|
+
var rootProps = mergeProps({
|
|
225
260
|
id: props.id,
|
|
226
261
|
ref: elementRef,
|
|
227
262
|
className: className,
|
|
228
263
|
style: props.style
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
|
|
264
|
+
}, DockBase.getOtherProps(props), ptm('root'));
|
|
265
|
+
var containerProps = mergeProps({
|
|
266
|
+
className: 'p-dock-container'
|
|
267
|
+
}, ptm('container'));
|
|
268
|
+
return /*#__PURE__*/React.createElement("div", rootProps, /*#__PURE__*/React.createElement("div", containerProps, header, list, footer));
|
|
232
269
|
}));
|
|
233
270
|
Dock.displayName = 'Dock';
|
|
234
271
|
|
package/dock/dock.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Ripple as t}from"primereact/ripple";import{
|
|
1
|
+
import*as e from"react";import{Ripple as t}from"primereact/ripple";import{classNames as r,mergeProps as n,ObjectUtils as o,IconUtils as i}from"primereact/utils";import{ComponentBase as a}from"primereact/componentbase";function c(e){return c="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},c(e)}function l(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(e){var t=l(e,"string");return"symbol"===c(t)?t:String(t)}function m(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){if(Array.isArray(e))return e}function f(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b=a.extend({defaultProps:{__TYPE:"Dock",id:null,style:null,className:null,model:null,position:"bottom",magnification:!0,header:null,footer:null,children:void 0}});function v(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=e.memo(e.forwardRef((function(a,c){var l,u,m=b.getProps(a),s=e.useState(-3),v=(u=2,p(l=s)||f(l,u)||d(l,u)||y()),O=v[0],h=v[1],k=b.setMetaData({props:m,state:{currentIndex:O}}).ptm,S=e.useRef(null),j=function(){h(-3)},E=function(e){h(e)},P=function(e,t){t.command&&t.command({originalEvent:e,item:t}),e.preventDefault()},w=function(a,c){if(!1===a.visible)return null;var l=a.disabled,u=a.icon,p=a.label,f=a.template,s=a.url,d=a.target,y=r("p-dock-item",{"p-dock-item-second-prev":O-2===c,"p-dock-item-prev":O-1===c,"p-dock-item-current":O===c,"p-dock-item-next":O+1===c,"p-dock-item-second-next":O+2===c}),b=r("p-dock-action",{"p-disabled":l}),v=r("p-dock-action-icon",u),h=n({className:"p-dock-action-icon"},k("icon")),S=i.getJSXIcon(u,g({},h),{props:m}),j=n({href:s||"#",role:"menuitem",className:b,target:d,"data-pr-tooltip":p,onClick:function(e){return P(e,a)}},k("action")),w=e.createElement("a",j,S,e.createElement(t,null));f&&(w=o.getJSXElement(f,a,{onClick:function(e){return P(e,a)},className:b,iconClassName:v,element:w,props:m,index:c}));var N=n({key:c,className:y,role:"none",onMouseEnter:function(){return E(c)}},k("menuitem"));return e.createElement("li",N,w)};e.useImperativeHandle(c,(function(){return{props:m,getElement:function(){return S.current}}}));var N,D,x=r("p-dock p-component p-dock-".concat(m.position),{"p-dock-magnification":m.magnification},m.className),A=function(){if(m.header){var t=o.getJSXElement(m.header,{props:m}),r=n({className:"p-dock-header"},k("header"));return e.createElement("div",r,t)}return null}(),I=(N=m.model?m.model.map(w):null,D=n({className:"p-dock-list",role:"menu",onMouseLeave:j},k("menu")),e.createElement("ul",D,N)),C=function(){if(m.footer){var t=o.getJSXElement(m.footer,{props:m}),r=n({className:"p-dock-footer"},k("footer"));return e.createElement("div",r,t)}return null}(),J=n({id:m.id,ref:S,className:x,style:m.style},b.getOtherProps(m),k("root")),M=n({className:"p-dock-container"},k("container"));return e.createElement("div",J,e.createElement("div",M,A,I,C))})));O.displayName="Dock";export{O as Dock};
|