primereact 10.2.1 → 10.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.cjs.js +83 -8
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +35 -0
- package/accordion/accordion.esm.js +85 -10
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +83 -8
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +63 -33
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +24 -246
- package/api/api.esm.js +63 -33
- package/api/api.esm.min.js +1 -1
- package/api/api.js +63 -33
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +3 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +6 -1
- package/autocomplete/autocomplete.esm.js +3 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +3 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/blockui/blockui.cjs.js +8 -5
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +8 -5
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +8 -5
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +12 -6
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +12 -6
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +12 -6
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/calendar.cjs.js +71 -37
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -5
- package/calendar/calendar.esm.js +71 -37
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +71 -37
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +103 -9
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +104 -10
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +103 -9
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +64 -23
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +27 -4
- package/cascadeselect/cascadeselect.esm.js +65 -24
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +65 -25
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/checkbox.cjs.js +25 -25
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +25 -25
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +26 -26
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +5 -2
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +17 -2
- package/chip/chip.esm.js +5 -2
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +5 -2
- package/chip/chip.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/componentbase/componentbase.cjs.js +49 -8
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +50 -9
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +49 -8
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +30 -22
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +19 -3
- package/confirmdialog/confirmdialog.esm.js +30 -22
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +30 -22
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +85 -152
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +40 -1
- package/confirmpopup/confirmpopup.esm.js +88 -155
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +85 -152
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +641 -99
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +23 -1
- package/contextmenu/contextmenu.esm.js +641 -99
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +641 -99
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1217 -484
- package/core/core.min.js +40 -40
- package/datatable/datatable.cjs.js +30 -26
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +5 -4
- package/datatable/datatable.esm.js +30 -26
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +30 -26
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.d.ts +1 -1
- package/dialog/dialog.cjs.js +108 -151
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +60 -1
- package/dialog/dialog.esm.js +115 -158
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +109 -152
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +1 -0
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -0
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -0
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +169 -33
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +15 -0
- package/dock/dock.esm.js +170 -34
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +169 -33
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +29 -4
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +1 -1
- package/dropdown/dropdown.esm.js +29 -4
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +30 -6
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +12 -5
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +12 -5
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +12 -5
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +14 -6
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +17 -1
- package/fileupload/fileupload.esm.js +14 -6
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +14 -6
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +223 -43
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +225 -45
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +223 -43
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +219 -78
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +8 -4
- package/hooks/hooks.esm.js +219 -80
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +219 -78
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +13 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +13 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +13 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +13 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +13 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +13 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +13 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +13 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +13 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +13 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +13 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +13 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +13 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +13 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +13 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +13 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +13 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +13 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +13 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +13 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +13 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +13 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +13 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +13 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +13 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +13 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +13 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +13 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +13 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +13 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +13 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +13 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +13 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +13 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +13 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +13 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +13 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +13 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +13 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +13 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +13 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +13 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +13 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +13 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +13 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +13 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +13 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +13 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +13 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +13 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +13 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +13 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +13 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +13 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +13 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +13 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +13 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +13 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +13 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +13 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +13 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +13 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +13 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +13 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +13 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +13 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +13 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +13 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +13 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +13 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +13 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +13 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +13 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +13 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +13 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +13 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +13 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +13 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +13 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +13 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +13 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +13 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +13 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +13 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +85 -119
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +87 -121
- package/image/image.esm.min.js +1 -1
- package/image/image.js +86 -120
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +7 -0
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +7 -0
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +8 -2
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +63 -19
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +7 -0
- package/inputnumber/inputnumber.esm.js +63 -19
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +63 -19
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +3 -3
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +3 -3
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +3 -3
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -6
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +7 -6
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -6
- package/inputtext/inputtext.min.js +1 -1
- package/listbox/listbox.cjs.js +14 -1
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +8 -3
- package/listbox/listbox.esm.js +14 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +14 -1
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +799 -179
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +14 -0
- package/megamenu/megamenu.esm.js +801 -181
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +799 -179
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +7 -9
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +7 -9
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +7 -9
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +217 -166
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +15 -1
- package/menu/menu.esm.js +220 -169
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +217 -166
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +714 -179
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +18 -0
- package/menubar/menubar.esm.js +717 -182
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +714 -179
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +2 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -1
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +5 -3
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +5 -3
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +5 -3
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +58 -35
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -1
- package/multiselect/multiselect.esm.js +58 -35
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +59 -37
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/orderlist.cjs.js +260 -105
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +18 -0
- package/orderlist/orderlist.esm.js +261 -106
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +260 -105
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +10 -0
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +10 -0
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +10 -0
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +9 -102
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +11 -104
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +10 -103
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +2 -2
- package/panel/panel.cjs.js +22 -19
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +22 -19
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +22 -19
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +774 -195
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +15 -0
- package/panelmenu/panelmenu.esm.js +775 -196
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +774 -195
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +163 -159
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +163 -159
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +163 -159
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +7 -2
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +8 -3
- package/password/password.esm.min.js +1 -1
- package/password/password.js +7 -2
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +709 -181
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +10 -0
- package/picklist/picklist.esm.js +708 -180
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +709 -181
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +7 -1
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +7 -1
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +7 -1
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +8352 -3145
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +8351 -3146
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +8352 -3145
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +27 -26
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +27 -26
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +28 -27
- package/radiobutton/radiobutton.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +854 -790
- package/resources/themes/arya-green/theme.css +854 -790
- package/resources/themes/arya-orange/theme.css +854 -790
- package/resources/themes/arya-purple/theme.css +854 -790
- package/resources/themes/bootstrap4-dark-blue/theme.css +678 -615
- package/resources/themes/bootstrap4-dark-purple/theme.css +678 -615
- package/resources/themes/bootstrap4-light-blue/theme.css +679 -616
- package/resources/themes/bootstrap4-light-purple/theme.css +679 -616
- package/resources/themes/fluent-light/theme.css +686 -638
- package/resources/themes/lara-dark-amber/theme.css +679 -630
- package/resources/themes/lara-dark-blue/theme.css +679 -630
- package/resources/themes/lara-dark-cyan/theme.css +679 -630
- package/resources/themes/lara-dark-green/theme.css +679 -630
- package/resources/themes/lara-dark-indigo/theme.css +679 -630
- package/resources/themes/lara-dark-pink/theme.css +679 -630
- package/resources/themes/lara-dark-purple/theme.css +679 -630
- package/resources/themes/lara-dark-teal/theme.css +679 -630
- package/resources/themes/lara-light-amber/theme.css +776 -725
- package/resources/themes/lara-light-blue/theme.css +1011 -960
- package/resources/themes/lara-light-cyan/theme.css +776 -725
- package/resources/themes/lara-light-green/theme.css +820 -769
- package/resources/themes/lara-light-indigo/theme.css +1016 -965
- package/resources/themes/lara-light-pink/theme.css +776 -725
- package/resources/themes/lara-light-purple/theme.css +1016 -965
- package/resources/themes/lara-light-teal/theme.css +776 -725
- package/resources/themes/luna-amber/theme.css +950 -887
- package/resources/themes/luna-blue/theme.css +950 -887
- package/resources/themes/luna-green/theme.css +950 -887
- package/resources/themes/luna-pink/theme.css +950 -887
- package/resources/themes/md-dark-deeppurple/theme.css +918 -950
- package/resources/themes/md-dark-indigo/theme.css +918 -950
- package/resources/themes/md-light-deeppurple/theme.css +878 -910
- package/resources/themes/md-light-indigo/theme.css +878 -910
- package/resources/themes/mdc-dark-deeppurple/theme.css +918 -950
- package/resources/themes/mdc-dark-indigo/theme.css +918 -950
- package/resources/themes/mdc-light-deeppurple/theme.css +878 -910
- package/resources/themes/mdc-light-indigo/theme.css +878 -910
- package/resources/themes/mira/theme.css +1562 -1532
- package/resources/themes/nano/theme.css +707 -641
- package/resources/themes/nova/theme.css +705 -643
- package/resources/themes/nova-accent/theme.css +701 -636
- package/resources/themes/nova-alt/theme.css +705 -643
- package/resources/themes/rhea/theme.css +876 -811
- package/resources/themes/saga-blue/theme.css +896 -832
- package/resources/themes/saga-green/theme.css +896 -832
- package/resources/themes/saga-orange/theme.css +896 -832
- package/resources/themes/saga-purple/theme.css +896 -832
- package/resources/themes/soho-dark/theme.css +701 -643
- package/resources/themes/soho-light/theme.css +690 -634
- package/resources/themes/tailwind-light/theme.css +1370 -1306
- package/resources/themes/vela-blue/theme.css +862 -798
- package/resources/themes/vela-green/theme.css +862 -798
- package/resources/themes/vela-orange/theme.css +862 -798
- package/resources/themes/vela-purple/theme.css +862 -798
- package/resources/themes/viva-dark/theme.css +655 -612
- package/resources/themes/viva-light/theme.css +737 -694
- package/ripple/ripple.cjs.js +71 -5
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +71 -5
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +71 -5
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +183 -3
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +184 -4
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +183 -3
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/sidebar/sidebar.cjs.js +62 -146
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +25 -3
- package/sidebar/sidebar.esm.js +65 -149
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +63 -147
- package/sidebar/sidebar.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +7 -100
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +1 -1
- package/slidemenu/slidemenu.esm.js +10 -103
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +7 -100
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.cjs.js +275 -32
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +277 -34
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +275 -32
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +1098 -309
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +5 -5
- package/splitbutton/splitbutton.esm.js +1100 -311
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +1096 -309
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +103 -15
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +5 -0
- package/splitter/splitter.esm.js +103 -15
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +103 -15
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +99 -13
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +100 -14
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +99 -13
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +113 -17
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +113 -17
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +113 -17
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +128 -20
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +35 -0
- package/tabview/tabview.esm.js +128 -20
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +128 -20
- package/tabview/tabview.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +753 -275
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +11 -1
- package/tieredmenu/tieredmenu.esm.js +755 -277
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +753 -275
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +6 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +36 -2
- package/toast/toast.esm.js +6 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +6 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +74 -4
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +74 -4
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +75 -5
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.d.ts +27 -0
- package/tooltip/tooltipoptions.d.ts +1 -1
- package/tree/tree.cjs.js +198 -88
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +8 -0
- package/tree/tree.esm.js +199 -89
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +198 -88
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +185 -49
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +26 -1
- package/treeselect/treeselect.esm.js +186 -50
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +186 -51
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +59 -53
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +3 -3
- package/treetable/treetable.esm.js +59 -53
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +59 -53
- package/treetable/treetable.min.js +1 -1
- package/utils/utils.cjs.js +19 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +19 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +19 -5
- package/utils/utils.min.js +1 -1
- package/web-types.json +402 -33
package/divider/divider.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.divider=function(e,n,t,i,r){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.divider=function(e,n,t,i,r){"use strict";function o(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var l=o(n),d=i.ComponentBase.extend({defaultProps:{__TYPE:"Divider",align:null,layout:"horizontal",type:"solid",style:null,className:null,children:void 0},css:{classes:{root:function(e){var n=e.props,i=e.horizontal,r=e.vertical;return t.classNames("p-divider p-component p-divider-".concat(n.layout," p-divider-").concat(n.type),{"p-divider-left":i&&(!n.align||"left"===n.align),"p-divider-right":i&&"right"===n.align,"p-divider-center":i&&"center"===n.align||r&&(!n.align||"center"===n.align),"p-divider-top":r&&"top"===n.align,"p-divider-bottom":r&&"bottom"===n.align},n.className)},content:"p-divider-content"},styles:'\n@layer primereact {\n .p-divider-horizontal {\n display: flex;\n width: 100%;\n position: relative;\n align-items: center;\n }\n \n .p-divider-horizontal:before {\n position: absolute;\n display: block;\n top: 50%;\n left: 0;\n width: 100%;\n content: "";\n }\n \n .p-divider-horizontal.p-divider-left {\n justify-content: flex-start;\n }\n \n .p-divider-horizontal.p-divider-right {\n justify-content: flex-end;\n }\n \n .p-divider-horizontal.p-divider-center {\n justify-content: center;\n }\n \n .p-divider-content {\n z-index: 1;\n }\n \n .p-divider-vertical {\n min-height: 100%;\n margin: 0 1rem;\n display: flex;\n position: relative;\n justify-content: center;\n }\n \n .p-divider-vertical:before {\n position: absolute;\n display: block;\n top: 0;\n left: 50%;\n height: 100%;\n content: "";\n }\n \n .p-divider-vertical.p-divider-top {\n align-items: flex-start;\n }\n \n .p-divider-vertical.p-divider-center {\n align-items: center;\n }\n \n .p-divider-vertical.p-divider-bottom {\n align-items: flex-end;\n }\n \n .p-divider-solid.p-divider-horizontal:before {\n border-top-style: solid;\n }\n \n .p-divider-solid.p-divider-vertical:before {\n border-left-style: solid;\n }\n \n .p-divider-dashed.p-divider-horizontal:before {\n border-top-style: dashed;\n }\n \n .p-divider-dashed.p-divider-vertical:before {\n border-left-style: dashed;\n }\n \n .p-divider-dotted.p-divider-horizontal:before {\n border-top-style: dotted;\n }\n \n .p-divider-dotted.p-divider-horizontal:before {\n border-left-style: dotted;\n }\n}\n',inlineStyles:{root:function(e){var n=e.props;return{justifyContent:"horizontal"===n.layout?"center"===n.align||null===n.align?"center":"left"===n.align?"flex-start":"right"===n.align?"flex-end":null:null,alignItems:"vertical"===n.layout?"center"===n.align||null===n.align?"center":"top"===n.align?"flex-start":"bottom"===n.align?"flex-end":null:null}}}}}),a=l.forwardRef((function(e,n){var o=l.useContext(r.PrimeReactContext),a=d.getProps(e,o),s=d.setMetaData({props:a}),p=s.ptm,c=s.cx,v=s.sx;i.useHandleStyle(d.css.styles,s.isUnstyled,{name:"divider"});var u=l.useRef(null),f="horizontal"===a.layout,m="vertical"===a.layout;l.useImperativeHandle(n,(function(){return{props:a,getElement:function(){return u.current}}}));var g=t.mergeProps({ref:u,style:v("root"),className:c("root",{horizontal:f,vertical:m}),"aria-orientation":a.layout,role:"separator"},d.getOtherProps(a),p("root")),y=t.mergeProps({className:c("content")},p("content"));return l.createElement("div",g,l.createElement("div",y,a.children))}));return a.displayName="Divider",e.Divider=a,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.componentbase,primereact.api);
|
package/dock/dock.cjs.js
CHANGED
|
@@ -86,6 +86,37 @@ function _defineProperty(obj, key, value) {
|
|
|
86
86
|
return obj;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
function _arrayLikeToArray(arr, len) {
|
|
90
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
91
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
92
|
+
return arr2;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function _arrayWithoutHoles(arr) {
|
|
96
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function _iterableToArray(iter) {
|
|
100
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
104
|
+
if (!o) return;
|
|
105
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
106
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
107
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
108
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
109
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function _nonIterableSpread() {
|
|
113
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function _toConsumableArray(arr) {
|
|
117
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
118
|
+
}
|
|
119
|
+
|
|
89
120
|
function _arrayWithHoles(arr) {
|
|
90
121
|
if (Array.isArray(arr)) return arr;
|
|
91
122
|
}
|
|
@@ -118,21 +149,6 @@ function _iterableToArrayLimit(r, l) {
|
|
|
118
149
|
}
|
|
119
150
|
}
|
|
120
151
|
|
|
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
152
|
function _nonIterableRest() {
|
|
137
153
|
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
154
|
}
|
|
@@ -151,15 +167,18 @@ var classes = {
|
|
|
151
167
|
},
|
|
152
168
|
menuitem: function menuitem(_ref2) {
|
|
153
169
|
var currentIndexState = _ref2.currentIndexState,
|
|
154
|
-
index = _ref2.index
|
|
170
|
+
index = _ref2.index,
|
|
171
|
+
active = _ref2.active;
|
|
155
172
|
return utils.classNames('p-dock-item', {
|
|
156
173
|
'p-dock-item-second-prev': currentIndexState - 2 === index,
|
|
157
174
|
'p-dock-item-prev': currentIndexState - 1 === index,
|
|
158
175
|
'p-dock-item-current': currentIndexState === index,
|
|
159
176
|
'p-dock-item-next': currentIndexState + 1 === index,
|
|
160
|
-
'p-dock-item-second-next': currentIndexState + 2 === index
|
|
177
|
+
'p-dock-item-second-next': currentIndexState + 2 === index,
|
|
178
|
+
'p-focus': active
|
|
161
179
|
});
|
|
162
180
|
},
|
|
181
|
+
content: 'p-menuitem-content',
|
|
163
182
|
header: 'p-dock-header',
|
|
164
183
|
menu: 'p-dock-list',
|
|
165
184
|
footer: 'p-dock-footer',
|
|
@@ -169,9 +188,9 @@ var classes = {
|
|
|
169
188
|
'p-dock-magnification': props.magnification
|
|
170
189
|
});
|
|
171
190
|
},
|
|
172
|
-
container: 'p-dock-container'
|
|
191
|
+
container: 'p-dock-list-container'
|
|
173
192
|
};
|
|
174
|
-
var styles = "\n@layer primereact {\n .p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n }\n
|
|
193
|
+
var styles = "\n@layer primereact {\n .p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n }\n\n .p-dock-list-container {\n display: flex;\n pointer-events: auto;\n }\n\n .p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n }\n\n .p-dock-magnification .p-dock-item {\n transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n }\n\n .p-dock-action {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n }\n\n .p-dock-magnification .p-dock-item-second-prev,\n .p-dock-magnification .p-dock-item-second-next {\n transform: scale(1.2);\n }\n\n .p-dock-magnification .p-dock-item-prev,\n .p-dock-magnification .p-dock-item-next {\n transform: scale(1.4);\n }\n\n .p-dock-magnification .p-dock-item-current {\n transform: scale(1.6);\n z-index: 1;\n }\n\n /* Position */\n /* top */\n .p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n }\n\n .p-dock-top.p-dock-magnification .p-dock-item {\n transform-origin: center top;\n }\n\n .p-dock-top .p-dock-list-container {\n flex-direction: column-reverse;\n }\n\n /* bottom */\n .p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n }\n\n .p-dock-bottom.p-dock-magnification .p-dock-item {\n transform-origin: center bottom;\n }\n\n .p-dock-bottom .p-dock-list-container {\n flex-direction: column;\n }\n\n /* right */\n .p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n }\n\n .p-dock-right.p-dock-magnification .p-dock-item {\n transform-origin: center right;\n }\n\n .p-dock-right .p-dock-list {\n flex-direction: column;\n }\n\n /* left */\n .p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n }\n\n .p-dock-left.p-dock-magnification .p-dock-item {\n transform-origin: center left;\n }\n\n .p-dock-left .p-dock-list {\n flex-direction: column;\n }\n\n .p-dock-left .p-dock-list-container {\n flex-direction: row-reverse;\n }\n}\n";
|
|
175
194
|
var DockBase = componentbase.ComponentBase.extend({
|
|
176
195
|
defaultProps: {
|
|
177
196
|
__TYPE: 'Dock',
|
|
@@ -179,6 +198,9 @@ var DockBase = componentbase.ComponentBase.extend({
|
|
|
179
198
|
style: null,
|
|
180
199
|
className: null,
|
|
181
200
|
model: null,
|
|
201
|
+
tabIndex: 0,
|
|
202
|
+
onFocus: null,
|
|
203
|
+
onBlur: null,
|
|
182
204
|
position: 'bottom',
|
|
183
205
|
magnification: true,
|
|
184
206
|
header: null,
|
|
@@ -198,12 +220,20 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
198
220
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
199
221
|
currentIndexState = _React$useState2[0],
|
|
200
222
|
setCurrentIndexState = _React$useState2[1];
|
|
223
|
+
var _React$useState3 = React__namespace.useState(false),
|
|
224
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
225
|
+
focused = _React$useState4[0],
|
|
226
|
+
setFocused = _React$useState4[1];
|
|
227
|
+
var _React$useState5 = React__namespace.useState(-1),
|
|
228
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
229
|
+
focusedOptionIndex = _React$useState6[0],
|
|
230
|
+
setFocusedOptionIndex = _React$useState6[1];
|
|
201
231
|
var context = React__namespace.useContext(api.PrimeReactContext);
|
|
202
232
|
var props = DockBase.getProps(inProps, context);
|
|
203
|
-
var _React$
|
|
204
|
-
_React$
|
|
205
|
-
idState = _React$
|
|
206
|
-
setIdState = _React$
|
|
233
|
+
var _React$useState7 = React__namespace.useState(props.id),
|
|
234
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
235
|
+
idState = _React$useState8[0],
|
|
236
|
+
setIdState = _React$useState8[1];
|
|
207
237
|
var _DockBase$setMetaData = DockBase.setMetaData({
|
|
208
238
|
props: props,
|
|
209
239
|
state: {
|
|
@@ -215,6 +245,7 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
215
245
|
cx = _DockBase$setMetaData.cx,
|
|
216
246
|
isUnstyled = _DockBase$setMetaData.isUnstyled;
|
|
217
247
|
var elementRef = React__namespace.useRef(null);
|
|
248
|
+
var listRef = React__namespace.useRef(null);
|
|
218
249
|
componentbase.useHandleStyle(DockBase.css.styles, isUnstyled, {
|
|
219
250
|
name: 'dock'
|
|
220
251
|
});
|
|
@@ -241,6 +272,90 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
241
272
|
}
|
|
242
273
|
e.preventDefault();
|
|
243
274
|
};
|
|
275
|
+
var onListFocus = function onListFocus(event) {
|
|
276
|
+
setFocused(true);
|
|
277
|
+
changeFocusedOptionIndex(0);
|
|
278
|
+
props.onFocus && props.onFocus(event);
|
|
279
|
+
};
|
|
280
|
+
var onListBlur = function onListBlur(event) {
|
|
281
|
+
setFocused(false);
|
|
282
|
+
setFocusedOptionIndex(-1);
|
|
283
|
+
props.onBlur && props.onBlur(event);
|
|
284
|
+
};
|
|
285
|
+
var onListKeyDown = function onListKeyDown(event) {
|
|
286
|
+
switch (event.code) {
|
|
287
|
+
case 'ArrowDown':
|
|
288
|
+
if (props.position === 'left' || props.position === 'right') onArrowDownKey();
|
|
289
|
+
event.preventDefault();
|
|
290
|
+
break;
|
|
291
|
+
case 'ArrowUp':
|
|
292
|
+
if (props.position === 'left' || props.position === 'right') onArrowUpKey();
|
|
293
|
+
event.preventDefault();
|
|
294
|
+
break;
|
|
295
|
+
case 'ArrowRight':
|
|
296
|
+
if (props.position === 'top' || props.position === 'bottom') onArrowDownKey();
|
|
297
|
+
event.preventDefault();
|
|
298
|
+
break;
|
|
299
|
+
case 'ArrowLeft':
|
|
300
|
+
if (props.position === 'top' || props.position === 'bottom') onArrowUpKey();
|
|
301
|
+
event.preventDefault();
|
|
302
|
+
break;
|
|
303
|
+
case 'Home':
|
|
304
|
+
onHomeKey();
|
|
305
|
+
event.preventDefault();
|
|
306
|
+
break;
|
|
307
|
+
case 'End':
|
|
308
|
+
onEndKey();
|
|
309
|
+
event.preventDefault();
|
|
310
|
+
break;
|
|
311
|
+
case 'Enter':
|
|
312
|
+
case 'Space':
|
|
313
|
+
onSpaceKey();
|
|
314
|
+
event.preventDefault();
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
var onArrowDownKey = function onArrowDownKey() {
|
|
319
|
+
var optionIndex = findNextOptionIndex(focusedOptionIndex);
|
|
320
|
+
changeFocusedOptionIndex(optionIndex);
|
|
321
|
+
};
|
|
322
|
+
var onArrowUpKey = function onArrowUpKey() {
|
|
323
|
+
var optionIndex = findPrevOptionIndex(focusedOptionIndex);
|
|
324
|
+
changeFocusedOptionIndex(optionIndex);
|
|
325
|
+
};
|
|
326
|
+
var onHomeKey = function onHomeKey() {
|
|
327
|
+
changeFocusedOptionIndex(0);
|
|
328
|
+
};
|
|
329
|
+
var onEndKey = function onEndKey() {
|
|
330
|
+
changeFocusedOptionIndex(utils.DomHandler.find(listRef.current, 'li[data-pc-section="menuitem"][data-p-disabled="false"]').length - 1);
|
|
331
|
+
};
|
|
332
|
+
var onSpaceKey = function onSpaceKey() {
|
|
333
|
+
var element = utils.DomHandler.findSingle(listRef.current, "li[id=\"".concat("".concat(focusedOptionIndex), "\"]"));
|
|
334
|
+
var anchorElement = element && utils.DomHandler.findSingle(element, '[data-pc-section="action"]');
|
|
335
|
+
anchorElement ? anchorElement.click() : element && element.click();
|
|
336
|
+
};
|
|
337
|
+
var findNextOptionIndex = function findNextOptionIndex(index) {
|
|
338
|
+
var menuitems = utils.DomHandler.find(listRef.current, 'li[data-pc-section="menuitem"][data-p-disabled="false"]');
|
|
339
|
+
var matchedOptionIndex = _toConsumableArray(menuitems).findIndex(function (link) {
|
|
340
|
+
return link.id === index;
|
|
341
|
+
});
|
|
342
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0;
|
|
343
|
+
};
|
|
344
|
+
var findPrevOptionIndex = function findPrevOptionIndex(index) {
|
|
345
|
+
var menuitems = utils.DomHandler.find(listRef.current, 'li[data-pc-section="menuitem"][data-p-disabled="false"]');
|
|
346
|
+
var matchedOptionIndex = _toConsumableArray(menuitems).findIndex(function (link) {
|
|
347
|
+
return link.id === index;
|
|
348
|
+
});
|
|
349
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0;
|
|
350
|
+
};
|
|
351
|
+
var changeFocusedOptionIndex = function changeFocusedOptionIndex(index) {
|
|
352
|
+
var menuitems = utils.DomHandler.find(listRef.current, 'li[data-pc-section="menuitem"][data-p-disabled="false"]');
|
|
353
|
+
var order = index >= menuitems.length ? menuitems.length - 1 : index < 0 ? 0 : index;
|
|
354
|
+
setFocusedOptionIndex(menuitems[order].getAttribute('id'));
|
|
355
|
+
};
|
|
356
|
+
var isItemActive = function isItemActive(id) {
|
|
357
|
+
return id === focusedOptionIndex;
|
|
358
|
+
};
|
|
244
359
|
var createItem = function createItem(item, index) {
|
|
245
360
|
if (item.visible === false) {
|
|
246
361
|
return null;
|
|
@@ -264,10 +379,14 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
264
379
|
});
|
|
265
380
|
var actionProps = utils.mergeProps({
|
|
266
381
|
href: url || '#',
|
|
267
|
-
|
|
382
|
+
onFocus: function onFocus(event) {
|
|
383
|
+
return event.stopPropagation();
|
|
384
|
+
},
|
|
268
385
|
className: cx('action', {
|
|
269
386
|
disabled: disabled
|
|
270
387
|
}),
|
|
388
|
+
'aria-hidden': 'true',
|
|
389
|
+
tabIndex: -1,
|
|
271
390
|
target: target,
|
|
272
391
|
'data-pr-tooltip': label,
|
|
273
392
|
onClick: function onClick(e) {
|
|
@@ -282,25 +401,35 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
282
401
|
},
|
|
283
402
|
className: contentClassName,
|
|
284
403
|
iconClassName: iconClassName,
|
|
404
|
+
'aria-hidden': 'true',
|
|
405
|
+
tabIndex: -1,
|
|
285
406
|
element: content,
|
|
286
407
|
props: props,
|
|
287
408
|
index: index
|
|
288
409
|
};
|
|
289
410
|
content = utils.ObjectUtils.getJSXElement(template, item, defaultContentOptions);
|
|
290
411
|
}
|
|
291
|
-
var
|
|
412
|
+
var contentProps = utils.mergeProps({
|
|
413
|
+
className: cx('content')
|
|
414
|
+
}, getPTOptions('content', item, index));
|
|
415
|
+
var active = isItemActive(key);
|
|
416
|
+
var menuitemProps = utils.mergeProps(_defineProperty(_defineProperty({
|
|
292
417
|
id: key,
|
|
418
|
+
role: 'menuitem',
|
|
293
419
|
key: key,
|
|
420
|
+
'aria-label': label,
|
|
421
|
+
'aria-disabled': disabled,
|
|
422
|
+
'data-p-focused': active,
|
|
423
|
+
'data-p-disabled': disabled || false,
|
|
294
424
|
className: cx('menuitem', {
|
|
295
425
|
currentIndexState: currentIndexState,
|
|
296
|
-
index: index
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
return /*#__PURE__*/React__namespace.createElement("li", menuitemProps, content);
|
|
426
|
+
index: index,
|
|
427
|
+
active: isItemActive(key)
|
|
428
|
+
})
|
|
429
|
+
}, "role", 'none'), "onMouseEnter", function onMouseEnter() {
|
|
430
|
+
return onItemMouseEnter(index);
|
|
431
|
+
}), getPTOptions('menuitem', item, index));
|
|
432
|
+
return /*#__PURE__*/React__namespace.createElement("li", menuitemProps, /*#__PURE__*/React__namespace.createElement("div", contentProps, content));
|
|
304
433
|
};
|
|
305
434
|
var createItems = function createItems() {
|
|
306
435
|
return props.model ? props.model.map(createItem) : null;
|
|
@@ -320,8 +449,15 @@ var Dock = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.for
|
|
|
320
449
|
var createList = function createList() {
|
|
321
450
|
var items = createItems();
|
|
322
451
|
var menuProps = utils.mergeProps({
|
|
452
|
+
ref: listRef,
|
|
323
453
|
className: cx('menu'),
|
|
324
454
|
role: 'menu',
|
|
455
|
+
'aria-orientation': props.position === 'bottom' || props.position === 'top' ? 'horizontal' : 'vertical',
|
|
456
|
+
'aria-activedescendant': focused ? focusedOptionIndex !== -1 ? focusedOptionIndex : null : undefined,
|
|
457
|
+
tabIndex: props.tabIndex || 0,
|
|
458
|
+
onFocus: onListFocus,
|
|
459
|
+
onBlur: onListBlur,
|
|
460
|
+
onKeyDown: onListKeyDown,
|
|
325
461
|
onMouseLeave: onListMouseLeave
|
|
326
462
|
}, ptm('menu'));
|
|
327
463
|
return /*#__PURE__*/React__namespace.createElement("ul", menuProps, items);
|
package/dock/dock.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/hooks"),o=require("primereact/ripple"),i=require("primereact/utils");function c(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var a=c(e);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},l.apply(this,arguments)}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function p(e,n){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function u(e){var n=p(e,"string");return"symbol"===s(n)?n:String(n)}function m(e){if(Array.isArray(e))return e}function d(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,c,a=[],l=!0,s=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(a.push(r.value),a.length!==n);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=t.return&&(c=t.return(),Object(c)!==c))return}finally{if(s)throw o}}return a}}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function b(e,n){if(e){if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,n):void 0}}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e,n){return m(e)||d(e,n)||b(e,n)||g()}var k=t.ComponentBase.extend({defaultProps:{__TYPE:"Dock",id:null,style:null,className:null,model:null,position:"bottom",magnification:!0,header:null,footer:null,children:void 0},css:{classes:{icon:"p-dock-action-icon",action:function(e){return i.classNames("p-dock-action",{"p-disabled":e.disabled})},menuitem:function(e){var n=e.currentIndexState,t=e.index;return i.classNames("p-dock-item",{"p-dock-item-second-prev":n-2===t,"p-dock-item-prev":n-1===t,"p-dock-item-current":n===t,"p-dock-item-next":n+1===t,"p-dock-item-second-next":n+2===t})},header:"p-dock-header",menu:"p-dock-list",footer:"p-dock-footer",root:function(e){var n=e.props;return i.classNames("p-dock p-component p-dock-".concat(n.position),{"p-dock-magnification":n.magnification})},container:"p-dock-container"},styles:"\n@layer primereact {\n .p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n }\n \n .p-dock-container {\n display: flex;\n pointer-events: auto;\n }\n \n .p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n }\n \n .p-dock-magnification .p-dock-item {\n transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n }\n \n .p-dock-action {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n }\n \n .p-dock-magnification .p-dock-item-second-prev,\n .p-dock-magnification .p-dock-item-second-next {\n transform: scale(1.2);\n }\n \n .p-dock-magnification .p-dock-item-prev,\n .p-dock-magnification .p-dock-item-next {\n transform: scale(1.4);\n }\n \n .p-dock-magnification .p-dock-item-current {\n transform: scale(1.6);\n z-index: 1;\n }\n \n /* Position */\n /* top */\n .p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n }\n \n .p-dock-top.p-dock-magnification .p-dock-item {\n transform-origin: center top;\n }\n \n .p-dock-top .p-dock-container {\n flex-direction: column-reverse;\n }\n \n /* bottom */\n .p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n }\n \n .p-dock-bottom.p-dock-magnification .p-dock-item {\n transform-origin: center bottom;\n }\n \n .p-dock-bottom .p-dock-container {\n flex-direction: column;\n }\n \n /* right */\n .p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n }\n \n .p-dock-right.p-dock-magnification .p-dock-item {\n transform-origin: center right;\n }\n \n .p-dock-right .p-dock-list {\n flex-direction: column;\n }\n \n /* left */\n .p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n }\n \n .p-dock-left.p-dock-magnification .p-dock-item {\n transform-origin: center left;\n }\n \n .p-dock-left .p-dock-list {\n flex-direction: column;\n }\n \n .p-dock-left .p-dock-container {\n flex-direction: row-reverse;\n }\n}\n"}});function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){var r,o,i;r=e,i=t[n],(o=u(o=n))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var O=a.memo(a.forwardRef((function(e,c){var s=y(a.useState(-3),2),p=s[0],u=s[1],m=a.useContext(n.PrimeReactContext),d=k.getProps(e,m),f=y(a.useState(d.id),2),b=f[0],g=f[1],v=k.setMetaData({props:d,state:{id:b,currentIndex:p}}),O=v.ptm,j=v.cx,x=v.isUnstyled,P=a.useRef(null);t.useHandleStyle(k.css.styles,x,{name:"dock"});var S=function(e,n,t){return O(e,{context:{index:t,item:n}})},w=function(){u(-3)},E=function(e){u(e)},N=function(e,n){n.command&&n.command({originalEvent:e,item:n}),e.preventDefault()},D=function(e,n){if(!1===e.visible)return null;var t=e.disabled,r=e.icon,c=e.label,l=e.template,s=e.url,u=e.target,m=e.id||b+"_"+n,f=i.classNames("p-dock-action",{"p-disabled":t}),g=i.classNames("p-dock-action-icon",r),y=i.mergeProps({className:j("icon")},S("icon",e,n)),k=i.IconUtils.getJSXIcon(r,h({},y),{props:d}),v=i.mergeProps({href:s||"#",role:"menuitem",className:j("action",{disabled:t}),target:u,"data-pr-tooltip":c,onClick:function(n){return N(n,e)}},S("action",e,n)),O=a.createElement("a",v,k,a.createElement(o.Ripple,null));l&&(O=i.ObjectUtils.getJSXElement(l,e,{onClick:function(n){return N(n,e)},className:f,iconClassName:g,element:O,props:d,index:n}));var x=i.mergeProps({id:m,key:m,className:j("menuitem",{currentIndexState:p,index:n}),role:"none",onMouseEnter:function(){return E(n)}},S("menuitem",e,n));return a.createElement("li",x,O)};r.useMountEffect((function(){b||g(i.UniqueComponentId())})),a.useImperativeHandle(c,(function(){return{props:d,getElement:function(){return P.current}}}));var I,C,q=function(){if(d.header){var e=i.ObjectUtils.getJSXElement(d.header,{props:d}),n=i.mergeProps({className:j("header")},O("header"));return a.createElement("div",n,e)}return null}(),M=(I=d.model?d.model.map(D):null,C=i.mergeProps({className:j("menu"),role:"menu",onMouseLeave:w},O("menu")),a.createElement("ul",C,I)),U=function(){if(d.footer){var e=i.ObjectUtils.getJSXElement(d.footer,{props:d}),n=i.mergeProps({className:j("footer")},O("footer"));return a.createElement("div",n,e)}return null}(),_=i.mergeProps({className:i.classNames(d.className,j("root")),style:d.style},k.getOtherProps(d),O("root")),A=i.mergeProps({className:j("container")},O("container"));return a.createElement("div",l({id:d.id,ref:P},_),a.createElement("div",A,q,M,U))})));O.displayName="Dock",exports.Dock=O;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/hooks"),o=require("primereact/ripple"),i=require("primereact/utils");function a(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var c=a(e);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},l.apply(this,arguments)}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,n){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function p(e){var n=u(e,"string");return"symbol"===s(n)?n:String(n)}function d(e,n,t){return(n=p(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function m(e){if(Array.isArray(e))return f(e)}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e,n){if(e){if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,n):void 0}}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e){return m(e)||b(e)||g(e)||v()}function k(e){if(Array.isArray(e))return e}function h(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,a,c=[],l=!0,s=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(c.push(r.value),c.length!==n);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,n){return k(e)||h(e,n)||g(e,n)||x()}var j=t.ComponentBase.extend({defaultProps:{__TYPE:"Dock",id:null,style:null,className:null,model:null,tabIndex:0,onFocus:null,onBlur:null,position:"bottom",magnification:!0,header:null,footer:null,children:void 0},css:{classes:{icon:"p-dock-action-icon",action:function(e){return i.classNames("p-dock-action",{"p-disabled":e.disabled})},menuitem:function(e){var n=e.currentIndexState,t=e.index;return i.classNames("p-dock-item",{"p-dock-item-second-prev":n-2===t,"p-dock-item-prev":n-1===t,"p-dock-item-current":n===t,"p-dock-item-next":n+1===t,"p-dock-item-second-next":n+2===t,"p-focus":e.active})},content:"p-menuitem-content",header:"p-dock-header",menu:"p-dock-list",footer:"p-dock-footer",root:function(e){var n=e.props;return i.classNames("p-dock p-component p-dock-".concat(n.position),{"p-dock-magnification":n.magnification})},container:"p-dock-list-container"},styles:"\n@layer primereact {\n .p-dock {\n position: absolute;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n }\n\n .p-dock-list-container {\n display: flex;\n pointer-events: auto;\n }\n\n .p-dock-list {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n }\n\n .p-dock-magnification .p-dock-item {\n transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);\n will-change: transform;\n }\n\n .p-dock-action {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: default;\n }\n\n .p-dock-magnification .p-dock-item-second-prev,\n .p-dock-magnification .p-dock-item-second-next {\n transform: scale(1.2);\n }\n\n .p-dock-magnification .p-dock-item-prev,\n .p-dock-magnification .p-dock-item-next {\n transform: scale(1.4);\n }\n\n .p-dock-magnification .p-dock-item-current {\n transform: scale(1.6);\n z-index: 1;\n }\n\n /* Position */\n /* top */\n .p-dock-top {\n left: 0;\n top: 0;\n width: 100%;\n }\n\n .p-dock-top.p-dock-magnification .p-dock-item {\n transform-origin: center top;\n }\n\n .p-dock-top .p-dock-list-container {\n flex-direction: column-reverse;\n }\n\n /* bottom */\n .p-dock-bottom {\n left: 0;\n bottom: 0;\n width: 100%;\n }\n\n .p-dock-bottom.p-dock-magnification .p-dock-item {\n transform-origin: center bottom;\n }\n\n .p-dock-bottom .p-dock-list-container {\n flex-direction: column;\n }\n\n /* right */\n .p-dock-right {\n right: 0;\n top: 0;\n height: 100%;\n }\n\n .p-dock-right.p-dock-magnification .p-dock-item {\n transform-origin: center right;\n }\n\n .p-dock-right .p-dock-list {\n flex-direction: column;\n }\n\n /* left */\n .p-dock-left {\n left: 0;\n top: 0;\n height: 100%;\n }\n\n .p-dock-left.p-dock-magnification .p-dock-item {\n transform-origin: center left;\n }\n\n .p-dock-left .p-dock-list {\n flex-direction: column;\n }\n\n .p-dock-left .p-dock-list-container {\n flex-direction: row-reverse;\n }\n}\n"}});function S(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?S(Object(t),!0).forEach((function(n){d(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):S(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var w=c.memo(c.forwardRef((function(e,a){var s=O(c.useState(-3),2),u=s[0],p=s[1],f=O(c.useState(!1),2),m=f[0],b=f[1],g=O(c.useState(-1),2),v=g[0],k=g[1],h=c.useContext(n.PrimeReactContext),x=j.getProps(e,h),S=O(c.useState(x.id),2),w=S[0],D=S[1],E=j.setMetaData({props:x,state:{id:w,currentIndex:u}}),N=E.ptm,I=E.cx,A=E.isUnstyled,H=c.useRef(null),C=c.useRef(null);t.useHandleStyle(j.css.styles,A,{name:"dock"});var U=function(e,n,t){return N(e,{context:{index:t,item:n}})},q=function(){p(-3)},M=function(e){p(e)},_=function(e,n){n.command&&n.command({originalEvent:e,item:n}),e.preventDefault()},R=function(e){b(!0),$(0),x.onFocus&&x.onFocus(e)},z=function(e){b(!1),k(-1),x.onBlur&&x.onBlur(e)},B=function(e){switch(e.code){case"ArrowDown":"left"!==x.position&&"right"!==x.position||F(),e.preventDefault();break;case"ArrowUp":"left"!==x.position&&"right"!==x.position||J(),e.preventDefault();break;case"ArrowRight":"top"!==x.position&&"bottom"!==x.position||F(),e.preventDefault();break;case"ArrowLeft":"top"!==x.position&&"bottom"!==x.position||J(),e.preventDefault();break;case"Home":T(),e.preventDefault();break;case"End":X(),e.preventDefault();break;case"Enter":case"Space":L(),e.preventDefault()}},F=function(){var e=K(v);$(e)},J=function(){var e=Y(v);$(e)},T=function(){$(0)},X=function(){$(i.DomHandler.find(C.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1)},L=function(){var e=i.DomHandler.findSingle(C.current,'li[id="'.concat("".concat(v),'"]')),n=e&&i.DomHandler.findSingle(e,'[data-pc-section="action"]');n?n.click():e&&e.click()},K=function(e){var n=y(i.DomHandler.find(C.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n+1:0},Y=function(e){var n=y(i.DomHandler.find(C.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]')).findIndex((function(n){return n.id===e}));return n>-1?n-1:0},$=function(e){var n=i.DomHandler.find(C.current,'li[data-pc-section="menuitem"][data-p-disabled="false"]');k(n[e>=n.length?n.length-1:e<0?0:e].getAttribute("id"))},G=function(e){return e===v},Q=function(e,n){if(!1===e.visible)return null;var t=e.disabled,r=e.icon,a=e.label,l=e.template,s=e.url,p=e.target,f=e.id||w+"_"+n,m=i.classNames("p-dock-action",{"p-disabled":t}),b=i.classNames("p-dock-action-icon",r),g=i.mergeProps({className:I("icon")},U("icon",e,n)),v=i.IconUtils.getJSXIcon(r,P({},g),{props:x}),y=i.mergeProps({href:s||"#",onFocus:function(e){return e.stopPropagation()},className:I("action",{disabled:t}),"aria-hidden":"true",tabIndex:-1,target:p,"data-pr-tooltip":a,onClick:function(n){return _(n,e)}},U("action",e,n)),k=c.createElement("a",y,v,c.createElement(o.Ripple,null));l&&(k=i.ObjectUtils.getJSXElement(l,e,{onClick:function(n){return _(n,e)},className:m,iconClassName:b,"aria-hidden":"true",tabIndex:-1,element:k,props:x,index:n}));var h=i.mergeProps({className:I("content")},U("content",e,n)),O=G(f),j=i.mergeProps(d(d({id:f,role:"menuitem",key:f,"aria-label":a,"aria-disabled":t,"data-p-focused":O,"data-p-disabled":t||!1,className:I("menuitem",{currentIndexState:u,index:n,active:G(f)})},"role","none"),"onMouseEnter",(function(){return M(n)})),U("menuitem",e,n));return c.createElement("li",j,c.createElement("div",h,k))};r.useMountEffect((function(){w||D(i.UniqueComponentId())})),c.useImperativeHandle(a,(function(){return{props:x,getElement:function(){return H.current}}}));var V,W,Z=function(){if(x.header){var e=i.ObjectUtils.getJSXElement(x.header,{props:x}),n=i.mergeProps({className:I("header")},N("header"));return c.createElement("div",n,e)}return null}(),ee=(V=x.model?x.model.map(Q):null,W=i.mergeProps({ref:C,className:I("menu"),role:"menu","aria-orientation":"bottom"===x.position||"top"===x.position?"horizontal":"vertical","aria-activedescendant":m?-1!==v?v:null:void 0,tabIndex:x.tabIndex||0,onFocus:R,onBlur:z,onKeyDown:B,onMouseLeave:q},N("menu")),c.createElement("ul",W,V)),ne=function(){if(x.footer){var e=i.ObjectUtils.getJSXElement(x.footer,{props:x}),n=i.mergeProps({className:I("footer")},N("footer"));return c.createElement("div",n,e)}return null}(),te=i.mergeProps({className:i.classNames(x.className,I("root")),style:x.style},j.getOtherProps(x),N("root")),re=i.mergeProps({className:I("container")},N("container"));return c.createElement("div",l({id:x.id,ref:H},te),c.createElement("div",re,Z,ee,ne))})));w.displayName="Dock",exports.Dock=w;
|
package/dock/dock.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export interface DockPassThroughOptions {
|
|
|
37
37
|
* Uses to pass attributes to the container's DOM element.
|
|
38
38
|
*/
|
|
39
39
|
container?: DockPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
40
|
+
|
|
40
41
|
/**
|
|
41
42
|
* Uses to pass attributes to the header's DOM element.
|
|
42
43
|
*/
|
|
@@ -152,6 +153,20 @@ export interface DockProps extends Omit<React.DetailedHTMLProps<React.HTMLAttrib
|
|
|
152
153
|
* @type {PassThroughOptions}
|
|
153
154
|
*/
|
|
154
155
|
ptOptions?: PassThroughOptions;
|
|
156
|
+
/**
|
|
157
|
+
* Index of the element in tabbing order.
|
|
158
|
+
*/
|
|
159
|
+
tabIndex?: number | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* Callback to invoke when dock receives focus.
|
|
162
|
+
* @param {React.SyntheticEvent} event - Browser event.
|
|
163
|
+
*/
|
|
164
|
+
onFocus?(event: React.SyntheticEvent): void;
|
|
165
|
+
/**
|
|
166
|
+
* Callback to invoke when dock loses focus.
|
|
167
|
+
* @param {React.SyntheticEvent} event - Browser event.
|
|
168
|
+
*/
|
|
169
|
+
onBlur?(event: React.SyntheticEvent): void;
|
|
155
170
|
/**
|
|
156
171
|
* When enabled, it removes component related styles in the core.
|
|
157
172
|
* @defaultValue false
|