primereact 9.4.0 → 9.6.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/accordion/accordion.cjs.js +2 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -2
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -1
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +215 -3
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +882 -8
- package/api/api.esm.js +210 -4
- package/api/api.esm.min.js +1 -1
- package/api/api.js +216 -5
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +148 -89
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +138 -2
- package/autocomplete/autocomplete.esm.js +150 -91
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +149 -91
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +3 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +1 -1
- package/avatar/avatar.esm.js +3 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +4 -3
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +3 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +4 -3
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +3 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +4 -3
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +4 -3
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +4 -3
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +5 -4
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +97 -52
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +97 -52
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +96 -53
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +6 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +6 -0
- package/button/button.esm.js +6 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +7 -4
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +322 -223
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +272 -3
- package/calendar/calendar.esm.js +324 -225
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +323 -225
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +3 -1
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +5 -11
- package/card/card.esm.js +3 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +4 -3
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +154 -92
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +121 -1
- package/carousel/carousel.esm.js +156 -94
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +155 -94
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +181 -108
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +100 -1
- package/cascadeselect/cascadeselect.esm.js +183 -110
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +180 -108
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +31 -44
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +30 -0
- package/chart/chart.esm.js +18 -31
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +141 -156
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +113 -48
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +65 -1
- package/checkbox/checkbox.esm.js +115 -50
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +113 -50
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +3 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +1 -1
- package/chip/chip.esm.js +3 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +4 -3
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +84 -55
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +78 -6
- package/chips/chips.esm.js +85 -56
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +83 -57
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +123 -49
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +81 -0
- package/colorpicker/colorpicker.esm.js +125 -51
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +124 -51
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +2 -0
- package/column/column.d.ts +298 -1
- package/column/column.esm.js +2 -0
- package/column/column.js +2 -0
- package/columngroup/columngroup.d.ts +28 -0
- package/componentbase/componentbase.cjs.js +29 -5
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +25 -5
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +30 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +4 -3
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +5 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +4 -3
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +5 -4
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +6 -5
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +5 -4
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +121 -69
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +123 -71
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +122 -71
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +14005 -2381
- package/core/core.min.js +47 -47
- package/csstransition/csstransition.cjs.js +3 -2
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +3 -2
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +4 -3
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +34 -43
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +51 -1
- package/datascroller/datascroller.esm.js +36 -45
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +35 -45
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +1089 -649
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +191 -3
- package/datatable/datatable.esm.js +1091 -651
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +1090 -651
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +125 -109
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +105 -2
- package/dataview/dataview.esm.js +127 -111
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +123 -108
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +3 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -3
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +6 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +7 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +6 -5
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +3 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +4 -3
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +85 -46
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +86 -47
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +85 -48
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +170 -120
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +154 -2
- package/dropdown/dropdown.esm.js +172 -122
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +170 -121
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +95 -116
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +50 -0
- package/editor/editor.esm.js +96 -117
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +95 -118
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +3 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +4 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +234 -191
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +160 -1
- package/fileupload/fileupload.esm.js +235 -192
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +231 -188
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +139 -124
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +141 -126
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +138 -124
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +10 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +7 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +11 -5
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +415 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +415 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +415 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +415 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +415 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +415 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +415 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +415 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +415 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +415 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +415 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +415 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +415 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +415 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +415 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +415 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +415 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +415 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +415 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +415 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +415 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +415 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +415 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +415 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +415 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +415 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +415 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +415 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +415 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +415 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +415 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +415 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +415 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +415 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +415 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +415 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +415 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +415 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +415 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +415 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +415 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +415 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +415 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +415 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +415 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +415 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +415 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +415 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +415 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +415 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +415 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +415 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +415 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +415 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +415 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +415 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +415 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +415 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +415 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +415 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +415 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +415 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +415 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +415 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +415 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +415 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +415 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +415 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +415 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +415 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +415 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +415 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +415 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +415 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +415 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +415 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +415 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +415 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +415 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +415 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +415 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +415 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +415 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +415 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +480 -80
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +483 -83
- package/image/image.esm.min.js +1 -1
- package/image/image.js +481 -82
- package/image/image.min.css +1 -1
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +2 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +3 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -1
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +26 -26
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +7 -2
- package/inputmask/inputmask.esm.js +27 -27
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +26 -28
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +68 -48
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +62 -1
- package/inputnumber/inputnumber.esm.js +66 -49
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +68 -50
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +84 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +61 -0
- package/inputswitch/inputswitch.esm.js +85 -26
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +83 -27
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -15
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +32 -0
- package/inputtext/inputtext.esm.js +26 -16
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +25 -17
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +25 -15
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +33 -1
- package/inputtextarea/inputtextarea.esm.js +26 -16
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +25 -17
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +25 -9
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +25 -9
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +25 -11
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +44 -43
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +42 -0
- package/knob/knob.esm.js +45 -44
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +44 -45
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +86 -56
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +103 -3
- package/listbox/listbox.esm.js +88 -58
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +86 -57
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +151 -99
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +152 -100
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +149 -98
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +87 -61
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +80 -1
- package/mention/mention.esm.js +89 -63
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +88 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +99 -59
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +101 -61
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +100 -61
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +122 -114
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +124 -116
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +122 -115
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +69 -47
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +70 -48
- package/message/message.esm.min.js +1 -1
- package/message/message.js +69 -49
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +65 -63
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +66 -64
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +65 -64
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +249 -193
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +185 -3
- package/multiselect/multiselect.esm.js +252 -196
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +249 -194
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +47 -33
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +61 -2
- package/multistatecheckbox/multistatecheckbox.esm.js +49 -35
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +48 -35
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +188 -110
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +118 -2
- package/orderlist/orderlist.esm.js +190 -112
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +186 -109
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +139 -73
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +89 -2
- package/organizationchart/organizationchart.esm.js +140 -74
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +139 -75
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +7 -6
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +5 -0
- package/overlaypanel/overlaypanel.esm.js +8 -7
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +8 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +172 -166
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +111 -5
- package/paginator/paginator.esm.js +174 -168
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +172 -167
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +3 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +4 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +148 -84
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +148 -84
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +146 -84
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +89 -46
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +98 -2
- package/password/password.esm.js +91 -48
- package/password/password.esm.min.js +1 -1
- package/password/password.js +88 -46
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +146 -82
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +133 -1
- package/picklist/picklist.esm.js +148 -84
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +143 -80
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +3 -2
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +3 -2
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +4 -3
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +6656 -4389
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +6655 -4390
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +6656 -4389
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +3 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +4 -3
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +3 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +4 -3
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +90 -30
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +66 -1
- package/radiobutton/radiobutton.esm.js +91 -31
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +89 -32
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +47 -36
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +64 -1
- package/rating/rating.esm.js +48 -37
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +47 -38
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +475 -465
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +33 -8
- package/resources/themes/arya-green/theme.css +33 -8
- package/resources/themes/arya-orange/theme.css +33 -8
- package/resources/themes/arya-purple/theme.css +33 -8
- package/resources/themes/bootstrap4-dark-blue/theme.css +33 -8
- package/resources/themes/bootstrap4-dark-purple/theme.css +33 -8
- package/resources/themes/bootstrap4-light-blue/theme.css +33 -8
- package/resources/themes/bootstrap4-light-purple/theme.css +33 -8
- package/resources/themes/fluent-light/theme.css +33 -8
- package/resources/themes/lara-dark-blue/theme.css +33 -8
- package/resources/themes/lara-dark-indigo/theme.css +33 -8
- package/resources/themes/lara-dark-purple/theme.css +33 -8
- package/resources/themes/lara-dark-teal/theme.css +33 -8
- package/resources/themes/lara-light-blue/theme.css +33 -8
- package/resources/themes/lara-light-indigo/theme.css +33 -8
- package/resources/themes/lara-light-purple/theme.css +33 -8
- package/resources/themes/lara-light-teal/theme.css +33 -8
- package/resources/themes/luna-amber/theme.css +33 -8
- package/resources/themes/luna-blue/theme.css +33 -8
- package/resources/themes/luna-green/theme.css +33 -8
- package/resources/themes/luna-pink/theme.css +33 -8
- package/resources/themes/md-dark-deeppurple/theme.css +33 -8
- package/resources/themes/md-dark-indigo/theme.css +33 -8
- package/resources/themes/md-light-deeppurple/theme.css +33 -8
- package/resources/themes/md-light-indigo/theme.css +33 -8
- package/resources/themes/mdc-dark-deeppurple/theme.css +33 -8
- package/resources/themes/mdc-dark-indigo/theme.css +33 -8
- package/resources/themes/mdc-light-deeppurple/theme.css +33 -8
- package/resources/themes/mdc-light-indigo/theme.css +33 -8
- package/resources/themes/mira/theme.css +33 -8
- package/resources/themes/nano/theme.css +33 -8
- package/resources/themes/nova/theme.css +33 -8
- package/resources/themes/nova-accent/theme.css +33 -8
- package/resources/themes/nova-alt/theme.css +33 -8
- package/resources/themes/rhea/theme.css +33 -8
- package/resources/themes/saga-blue/theme.css +33 -8
- package/resources/themes/saga-green/theme.css +33 -8
- package/resources/themes/saga-orange/theme.css +33 -8
- package/resources/themes/saga-purple/theme.css +33 -8
- package/resources/themes/soho-dark/theme.css +33 -8
- package/resources/themes/soho-light/theme.css +33 -8
- package/resources/themes/tailwind-light/theme.css +45 -20
- package/resources/themes/vela-blue/theme.css +33 -8
- package/resources/themes/vela-green/theme.css +33 -8
- package/resources/themes/vela-orange/theme.css +33 -8
- package/resources/themes/vela-purple/theme.css +33 -8
- package/resources/themes/viva-dark/theme.css +33 -8
- package/resources/themes/viva-light/theme.css +33 -8
- package/ripple/ripple.cjs.js +3 -2
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +3 -2
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +4 -3
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +28 -41
- package/row/row.cjs.min.js +1 -1
- package/row/row.d.ts +28 -0
- package/row/row.esm.js +15 -28
- package/row/row.esm.min.js +1 -1
- package/row/row.js +49 -64
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +3 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +4 -3
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +9 -7
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +11 -9
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +10 -8
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +37 -25
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +52 -1
- package/selectbutton/selectbutton.esm.js +38 -26
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +37 -27
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +7 -6
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +8 -7
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +8 -7
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +4 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +4 -3
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +5 -5
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +125 -114
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +103 -1
- package/slidemenu/slidemenu.esm.js +127 -116
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +125 -115
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +71 -39
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +34 -1
- package/slider/slider.esm.js +72 -40
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +71 -41
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +3 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +3 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +4 -3
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +74 -63
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +39 -11
- package/splitbutton/splitbutton.esm.js +76 -65
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +74 -63
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +3 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +10 -0
- package/splitter/splitter.esm.js +3 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +4 -3
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +81 -46
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +82 -47
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +81 -48
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +3 -1
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +3 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +4 -3
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +86 -48
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +87 -49
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +86 -50
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +8 -5
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +9 -6
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +7 -4
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +3 -1
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +3 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +4 -3
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +3 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +4 -3
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +110 -64
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +112 -66
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +111 -66
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +51 -43
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +51 -1
- package/timeline/timeline.esm.js +52 -44
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +51 -45
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +118 -75
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +122 -4
- package/toast/toast.esm.js +120 -77
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +116 -74
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +74 -21
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +40 -2
- package/togglebutton/togglebutton.esm.js +75 -22
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +73 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +3 -1
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +5 -11
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +4 -3
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +3 -2
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +7 -7
- package/tooltip/tooltip.esm.js +4 -3
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +3 -2
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +118 -88
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +139 -1
- package/tree/tree.esm.js +120 -90
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +116 -87
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +135 -102
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +143 -2
- package/treeselect/treeselect.esm.js +137 -104
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +136 -104
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +385 -198
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +305 -2
- package/treetable/treetable.esm.js +387 -200
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +383 -197
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +97 -40
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +64 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +99 -42
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +97 -42
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +31 -5
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.esm.js +28 -5
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +32 -7
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +43 -29
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +78 -1
- package/virtualscroller/virtualscroller.esm.js +44 -30
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +43 -31
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
package/carousel/carousel.esm.js
CHANGED
|
@@ -1,26 +1,53 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import PrimeReact, { ariaLabel } from 'primereact/api';
|
|
2
|
+
import PrimeReact, { PrimeReactContext, ariaLabel } from 'primereact/api';
|
|
3
3
|
import { usePrevious, useResizeListener, useMountEffect, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
4
4
|
import { ChevronDownIcon } from 'primereact/icons/chevrondown';
|
|
5
5
|
import { ChevronLeftIcon } from 'primereact/icons/chevronleft';
|
|
6
6
|
import { ChevronRightIcon } from 'primereact/icons/chevronright';
|
|
7
7
|
import { ChevronUpIcon } from 'primereact/icons/chevronup';
|
|
8
8
|
import { Ripple } from 'primereact/ripple';
|
|
9
|
-
import {
|
|
9
|
+
import { classNames, mergeProps, UniqueComponentId, DomHandler, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
10
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
10
11
|
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
function _typeof(obj) {
|
|
13
|
+
"@babel/helpers - typeof";
|
|
14
|
+
|
|
15
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
16
|
+
return typeof obj;
|
|
17
|
+
} : function (obj) {
|
|
18
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
19
|
+
}, _typeof(obj);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function _toPrimitive(input, hint) {
|
|
23
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
24
|
+
var prim = input[Symbol.toPrimitive];
|
|
25
|
+
if (prim !== undefined) {
|
|
26
|
+
var res = prim.call(input, hint || "default");
|
|
27
|
+
if (_typeof(res) !== "object") return res;
|
|
28
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
29
|
+
}
|
|
30
|
+
return (hint === "string" ? String : Number)(input);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function _toPropertyKey(arg) {
|
|
34
|
+
var key = _toPrimitive(arg, "string");
|
|
35
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function _defineProperty(obj, key, value) {
|
|
39
|
+
key = _toPropertyKey(key);
|
|
40
|
+
if (key in obj) {
|
|
41
|
+
Object.defineProperty(obj, key, {
|
|
42
|
+
value: value,
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
obj[key] = value;
|
|
49
|
+
}
|
|
50
|
+
return obj;
|
|
24
51
|
}
|
|
25
52
|
|
|
26
53
|
function _arrayLikeToArray(arr, len) {
|
|
@@ -94,7 +121,7 @@ function _slicedToArray(arr, i) {
|
|
|
94
121
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
95
122
|
}
|
|
96
123
|
|
|
97
|
-
var CarouselBase = {
|
|
124
|
+
var CarouselBase = ComponentBase.extend({
|
|
98
125
|
defaultProps: {
|
|
99
126
|
__TYPE: 'Carousel',
|
|
100
127
|
id: null,
|
|
@@ -121,15 +148,11 @@ var CarouselBase = {
|
|
|
121
148
|
indicatorsContentClassName: null,
|
|
122
149
|
onPageChange: null,
|
|
123
150
|
children: undefined
|
|
124
|
-
},
|
|
125
|
-
getProps: function getProps(props) {
|
|
126
|
-
return ObjectUtils.getMergedProps(props, CarouselBase.defaultProps);
|
|
127
|
-
},
|
|
128
|
-
getOtherProps: function getOtherProps(props) {
|
|
129
|
-
return ObjectUtils.getDiffProps(props, CarouselBase.defaultProps);
|
|
130
151
|
}
|
|
131
|
-
};
|
|
152
|
+
});
|
|
132
153
|
|
|
154
|
+
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; }
|
|
155
|
+
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; }
|
|
133
156
|
var CarouselItem = /*#__PURE__*/React.memo(function (props) {
|
|
134
157
|
var content = props.template(props.item);
|
|
135
158
|
var className = classNames(props.className, 'p-carousel-item', {
|
|
@@ -137,12 +160,15 @@ var CarouselItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
137
160
|
'p-carousel-item-start': props.start,
|
|
138
161
|
'p-carousel-item-end': props.end
|
|
139
162
|
});
|
|
140
|
-
|
|
163
|
+
var ptParams = props.className && props.className === 'p-carousel-item-cloned' ? props.ptm('itemCloned') : props.ptm('item');
|
|
164
|
+
var itemClonedProps = mergeProps({
|
|
141
165
|
className: className
|
|
142
|
-
},
|
|
166
|
+
}, ptParams);
|
|
167
|
+
return /*#__PURE__*/React.createElement("div", itemClonedProps, content);
|
|
143
168
|
});
|
|
144
169
|
var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
145
|
-
var
|
|
170
|
+
var context = React.useContext(PrimeReactContext);
|
|
171
|
+
var props = CarouselBase.getProps(inProps, context);
|
|
146
172
|
var _React$useState = React.useState(props.numVisible),
|
|
147
173
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
148
174
|
numVisibleState = _React$useState2[0],
|
|
@@ -159,6 +185,16 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
159
185
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
160
186
|
pageState = _React$useState8[0],
|
|
161
187
|
setPageState = _React$useState8[1];
|
|
188
|
+
var _CarouselBase$setMeta = CarouselBase.setMetaData({
|
|
189
|
+
props: props,
|
|
190
|
+
state: {
|
|
191
|
+
numVisible: numVisibleState,
|
|
192
|
+
numScroll: numScrollState,
|
|
193
|
+
totalShiftedItems: totalShiftedItemsState,
|
|
194
|
+
page: pageState
|
|
195
|
+
}
|
|
196
|
+
}),
|
|
197
|
+
ptm = _CarouselBase$setMeta.ptm;
|
|
162
198
|
var elementRef = React.useRef(null);
|
|
163
199
|
var itemsContainerRef = React.useRef(null);
|
|
164
200
|
var remainingItems = React.useRef(0);
|
|
@@ -286,19 +322,19 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
286
322
|
}
|
|
287
323
|
}
|
|
288
324
|
};
|
|
289
|
-
var
|
|
325
|
+
var _onTouchStart = function onTouchStart(e) {
|
|
290
326
|
var touchobj = e.changedTouches[0];
|
|
291
327
|
startPos.current = {
|
|
292
328
|
x: touchobj.pageX,
|
|
293
329
|
y: touchobj.pageY
|
|
294
330
|
};
|
|
295
331
|
};
|
|
296
|
-
var
|
|
332
|
+
var _onTouchMove = function onTouchMove(e) {
|
|
297
333
|
if (e.cancelable) {
|
|
298
334
|
e.preventDefault();
|
|
299
335
|
}
|
|
300
336
|
};
|
|
301
|
-
var
|
|
337
|
+
var _onTouchEnd = function onTouchEnd(e) {
|
|
302
338
|
var touchobj = e.changedTouches[0];
|
|
303
339
|
if (isVertical) {
|
|
304
340
|
changePageOnTouch(e, touchobj.pageY - startPos.current.y);
|
|
@@ -318,13 +354,15 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
318
354
|
}
|
|
319
355
|
};
|
|
320
356
|
var startAutoplay = function startAutoplay() {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
357
|
+
if (props.autoplayInterval > 0) {
|
|
358
|
+
interval.current = setInterval(function () {
|
|
359
|
+
if (pageState === totalIndicators - 1) {
|
|
360
|
+
step(-1, 0);
|
|
361
|
+
} else {
|
|
362
|
+
step(-1, pageState + 1);
|
|
363
|
+
}
|
|
364
|
+
}, props.autoplayInterval);
|
|
365
|
+
}
|
|
328
366
|
};
|
|
329
367
|
var stopAutoplay = function stopAutoplay() {
|
|
330
368
|
if (interval.current) {
|
|
@@ -333,7 +371,7 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
333
371
|
};
|
|
334
372
|
var createStyle = function createStyle() {
|
|
335
373
|
if (!carouselStyle.current) {
|
|
336
|
-
carouselStyle.current = DomHandler.createInlineStyle(PrimeReact.nonce);
|
|
374
|
+
carouselStyle.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce);
|
|
337
375
|
}
|
|
338
376
|
var innerHTML = "\n .p-carousel[".concat(attributeSelector.current, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / numVisibleState, "%\n }\n ");
|
|
339
377
|
if (props.responsiveOptions) {
|
|
@@ -341,7 +379,7 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
341
379
|
responsiveOptions.current.sort(function (data1, data2) {
|
|
342
380
|
var value1 = data1.breakpoint;
|
|
343
381
|
var value2 = data2.breakpoint;
|
|
344
|
-
return ObjectUtils.sort(value1, value2, -1, PrimeReact.locale, PrimeReact.nullSortOrder);
|
|
382
|
+
return ObjectUtils.sort(value1, value2, -1, context && context.locale || PrimeReact.locale, context && context.nullSortOrder || PrimeReact.nullSortOrder);
|
|
345
383
|
});
|
|
346
384
|
for (var i = 0; i < responsiveOptions.current.length; i++) {
|
|
347
385
|
var res = responsiveOptions.current[i];
|
|
@@ -350,6 +388,9 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
350
388
|
}
|
|
351
389
|
carouselStyle.current.innerHTML = innerHTML;
|
|
352
390
|
};
|
|
391
|
+
var destroyStyle = function destroyStyle() {
|
|
392
|
+
carouselStyle.current = DomHandler.removeInlineStyle(carouselStyle.current);
|
|
393
|
+
};
|
|
353
394
|
var changePosition = function changePosition(totalShiftedItems) {
|
|
354
395
|
if (itemsContainerRef.current) {
|
|
355
396
|
itemsContainerRef.current.style.transform = isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / numVisibleState), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / numVisibleState), "%, 0, 0)");
|
|
@@ -364,6 +405,8 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
364
405
|
React.useImperativeHandle(ref, function () {
|
|
365
406
|
return {
|
|
366
407
|
props: props,
|
|
408
|
+
startAutoplay: startAutoplay,
|
|
409
|
+
stopAutoplay: stopAutoplay,
|
|
367
410
|
getElement: function getElement() {
|
|
368
411
|
return elementRef.current;
|
|
369
412
|
}
|
|
@@ -438,6 +481,7 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
438
481
|
if (props.autoplayInterval) {
|
|
439
482
|
stopAutoplay();
|
|
440
483
|
}
|
|
484
|
+
destroyStyle();
|
|
441
485
|
});
|
|
442
486
|
var createItems = function createItems() {
|
|
443
487
|
if (props.value && props.value.length) {
|
|
@@ -458,7 +502,8 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
458
502
|
item: item,
|
|
459
503
|
active: isActive,
|
|
460
504
|
start: start,
|
|
461
|
-
end: end
|
|
505
|
+
end: end,
|
|
506
|
+
ptm: ptm
|
|
462
507
|
});
|
|
463
508
|
});
|
|
464
509
|
clonedElements = props.value.slice(0, numVisibleState);
|
|
@@ -474,7 +519,8 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
474
519
|
item: item,
|
|
475
520
|
active: isActive,
|
|
476
521
|
start: start,
|
|
477
|
-
end: end
|
|
522
|
+
end: end,
|
|
523
|
+
ptm: ptm
|
|
478
524
|
});
|
|
479
525
|
});
|
|
480
526
|
}
|
|
@@ -490,7 +536,8 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
490
536
|
item: item,
|
|
491
537
|
active: isActive,
|
|
492
538
|
start: start,
|
|
493
|
-
end: end
|
|
539
|
+
end: end,
|
|
540
|
+
ptm: ptm
|
|
494
541
|
});
|
|
495
542
|
});
|
|
496
543
|
return /*#__PURE__*/React.createElement(React.Fragment, null, clonedItemsForStarting, items, clonedItemsForFinishing);
|
|
@@ -498,17 +545,19 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
498
545
|
};
|
|
499
546
|
var createHeader = function createHeader() {
|
|
500
547
|
if (props.header) {
|
|
501
|
-
|
|
502
|
-
className:
|
|
503
|
-
},
|
|
548
|
+
var headerProps = mergeProps({
|
|
549
|
+
className: 'p-carousel-header'
|
|
550
|
+
}, ptm('header'));
|
|
551
|
+
return /*#__PURE__*/React.createElement("div", headerProps, props.header);
|
|
504
552
|
}
|
|
505
553
|
return null;
|
|
506
554
|
};
|
|
507
555
|
var createFooter = function createFooter() {
|
|
508
556
|
if (props.footer) {
|
|
509
|
-
|
|
510
|
-
className:
|
|
511
|
-
},
|
|
557
|
+
var footerProps = mergeProps({
|
|
558
|
+
className: 'p-carousel-footer'
|
|
559
|
+
}, ptm('footer'));
|
|
560
|
+
return /*#__PURE__*/React.createElement("div", footerProps, props.footer);
|
|
512
561
|
}
|
|
513
562
|
return null;
|
|
514
563
|
};
|
|
@@ -518,21 +567,30 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
518
567
|
var backwardNavigator = createBackwardNavigator();
|
|
519
568
|
var forwardNavigator = createForwardNavigator();
|
|
520
569
|
var className = classNames('p-carousel-container', props.containerClassName);
|
|
521
|
-
|
|
522
|
-
className:
|
|
523
|
-
}, backwardNavigator, /*#__PURE__*/React.createElement("div", {
|
|
524
|
-
className: "p-carousel-items-content",
|
|
570
|
+
var itemsContentProps = mergeProps({
|
|
571
|
+
className: 'p-carousel-items-content',
|
|
525
572
|
style: {
|
|
526
573
|
height: height
|
|
527
574
|
},
|
|
528
|
-
onTouchStart: onTouchStart
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
575
|
+
onTouchStart: function onTouchStart(e) {
|
|
576
|
+
return _onTouchStart(e);
|
|
577
|
+
},
|
|
578
|
+
onTouchMove: function onTouchMove(e) {
|
|
579
|
+
return _onTouchMove(e);
|
|
580
|
+
},
|
|
581
|
+
onTouchEnd: function onTouchEnd(e) {
|
|
582
|
+
return _onTouchEnd(e);
|
|
583
|
+
}
|
|
584
|
+
}, ptm('itemsContent'));
|
|
585
|
+
var containerProps = mergeProps({
|
|
586
|
+
className: className
|
|
587
|
+
}, ptm('container'));
|
|
588
|
+
var itemsContainerProps = mergeProps({
|
|
532
589
|
ref: itemsContainerRef,
|
|
533
|
-
className:
|
|
590
|
+
className: 'p-carousel-items-container',
|
|
534
591
|
onTransitionEnd: onTransitionEnd
|
|
535
|
-
},
|
|
592
|
+
}, ptm('itemsContainer'));
|
|
593
|
+
return /*#__PURE__*/React.createElement("div", containerProps, backwardNavigator, /*#__PURE__*/React.createElement("div", itemsContentProps, /*#__PURE__*/React.createElement("div", itemsContainerProps, items)), forwardNavigator);
|
|
536
594
|
};
|
|
537
595
|
var createBackwardNavigator = function createBackwardNavigator() {
|
|
538
596
|
if (props.showNavigators) {
|
|
@@ -541,23 +599,23 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
541
599
|
'p-disabled': isDisabled
|
|
542
600
|
});
|
|
543
601
|
var iconClassName = 'p-carousel-prev-icon';
|
|
544
|
-
var
|
|
602
|
+
var previousButtonIconProps = mergeProps({
|
|
545
603
|
className: iconClassName
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
})
|
|
549
|
-
var backwardNavigatorIcon = IconUtils.getJSXIcon(icon, {
|
|
550
|
-
className: _className
|
|
551
|
-
}, {
|
|
604
|
+
}, ptm('previousButtonIcon'));
|
|
605
|
+
var icon = isVertical ? props.prevIcon || /*#__PURE__*/React.createElement(ChevronUpIcon, previousButtonIconProps) : props.prevIcon || /*#__PURE__*/React.createElement(ChevronLeftIcon, previousButtonIconProps);
|
|
606
|
+
var backwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, previousButtonIconProps), {
|
|
552
607
|
props: props
|
|
553
608
|
});
|
|
554
|
-
|
|
555
|
-
type:
|
|
609
|
+
var previousButtonProps = mergeProps({
|
|
610
|
+
type: 'button',
|
|
556
611
|
className: _className,
|
|
557
|
-
onClick:
|
|
612
|
+
onClick: function onClick(e) {
|
|
613
|
+
return navBackward(e);
|
|
614
|
+
},
|
|
558
615
|
disabled: isDisabled,
|
|
559
|
-
|
|
560
|
-
},
|
|
616
|
+
'aria-label': ariaLabel('previousPageLabel')
|
|
617
|
+
}, ptm('previousButton'));
|
|
618
|
+
return /*#__PURE__*/React.createElement("button", previousButtonProps, backwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
561
619
|
}
|
|
562
620
|
return null;
|
|
563
621
|
};
|
|
@@ -568,23 +626,23 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
568
626
|
'p-disabled': isDisabled
|
|
569
627
|
});
|
|
570
628
|
var iconClassName = 'p-carousel-next-icon';
|
|
571
|
-
var
|
|
629
|
+
var nextButtonIconProps = mergeProps({
|
|
572
630
|
className: iconClassName
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
})
|
|
576
|
-
var forwardNavigatorIcon = IconUtils.getJSXIcon(icon, {
|
|
577
|
-
className: _className2
|
|
578
|
-
}, {
|
|
631
|
+
}, ptm('nextButtonIcon'));
|
|
632
|
+
var icon = isVertical ? props.nextIcon || /*#__PURE__*/React.createElement(ChevronDownIcon, nextButtonIconProps) : props.nextIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, nextButtonIconProps);
|
|
633
|
+
var forwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, nextButtonIconProps), {
|
|
579
634
|
props: props
|
|
580
635
|
});
|
|
581
|
-
|
|
582
|
-
type:
|
|
636
|
+
var nextButtonProps = mergeProps({
|
|
637
|
+
type: 'button',
|
|
583
638
|
className: _className2,
|
|
584
|
-
onClick:
|
|
639
|
+
onClick: function onClick(e) {
|
|
640
|
+
return navForward(e);
|
|
641
|
+
},
|
|
585
642
|
disabled: isDisabled,
|
|
586
|
-
|
|
587
|
-
},
|
|
643
|
+
'aria-label': ariaLabel('nextPageLabel')
|
|
644
|
+
}, ptm('nextButton'));
|
|
645
|
+
return /*#__PURE__*/React.createElement("button", nextButtonProps, forwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
588
646
|
}
|
|
589
647
|
return null;
|
|
590
648
|
};
|
|
@@ -594,17 +652,19 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
594
652
|
var className = classNames('p-carousel-indicator', {
|
|
595
653
|
'p-highlight': isActive
|
|
596
654
|
});
|
|
597
|
-
|
|
655
|
+
var indicatorProps = mergeProps({
|
|
598
656
|
key: key,
|
|
599
657
|
className: className
|
|
600
|
-
},
|
|
601
|
-
|
|
602
|
-
|
|
658
|
+
}, ptm('indicator'));
|
|
659
|
+
var indicatorButtonProps = mergeProps({
|
|
660
|
+
type: 'button',
|
|
661
|
+
className: 'p-link',
|
|
603
662
|
onClick: function onClick(e) {
|
|
604
663
|
return onDotClick(e, index);
|
|
605
664
|
},
|
|
606
|
-
|
|
607
|
-
},
|
|
665
|
+
'aria-label': "".concat(ariaLabel('pageLabel'), " ").concat(index + 1)
|
|
666
|
+
}, ptm('indicatorButton'));
|
|
667
|
+
return /*#__PURE__*/React.createElement("li", indicatorProps, /*#__PURE__*/React.createElement("button", indicatorButtonProps, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
608
668
|
};
|
|
609
669
|
var createIndicators = function createIndicators() {
|
|
610
670
|
if (props.showIndicators) {
|
|
@@ -613,13 +673,13 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
613
673
|
for (var i = 0; i < totalIndicators; i++) {
|
|
614
674
|
_indicators.push(createIndicator(i));
|
|
615
675
|
}
|
|
616
|
-
|
|
676
|
+
var indicatorsProps = mergeProps({
|
|
617
677
|
className: _className3
|
|
618
|
-
},
|
|
678
|
+
}, ptm('indicators'));
|
|
679
|
+
return /*#__PURE__*/React.createElement("ul", indicatorsProps, _indicators);
|
|
619
680
|
}
|
|
620
681
|
return null;
|
|
621
682
|
};
|
|
622
|
-
var otherProps = CarouselBase.getOtherProps(props);
|
|
623
683
|
var className = classNames('p-carousel p-component', {
|
|
624
684
|
'p-carousel-vertical': isVertical,
|
|
625
685
|
'p-carousel-horizontal': !isVertical
|
|
@@ -629,14 +689,16 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
629
689
|
var indicators = createIndicators();
|
|
630
690
|
var header = createHeader();
|
|
631
691
|
var footer = createFooter();
|
|
632
|
-
|
|
633
|
-
ref: elementRef,
|
|
692
|
+
var rootProps = mergeProps({
|
|
634
693
|
id: props.id,
|
|
694
|
+
ref: elementRef,
|
|
635
695
|
className: className,
|
|
636
696
|
style: props.style
|
|
637
|
-
},
|
|
697
|
+
}, CarouselBase.getOtherProps(props), ptm('root'));
|
|
698
|
+
var contentProps = mergeProps({
|
|
638
699
|
className: contentClassName
|
|
639
|
-
}, content
|
|
700
|
+
}, ptm('content'));
|
|
701
|
+
return /*#__PURE__*/React.createElement("div", rootProps, header, /*#__PURE__*/React.createElement("div", contentProps, content, indicators), footer);
|
|
640
702
|
}));
|
|
641
703
|
CarouselItem.displayName = 'CarouselItem';
|
|
642
704
|
Carousel.displayName = 'Carousel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t,{ariaLabel as r}from"primereact/api";import{usePrevious as n,useResizeListener as a,useMountEffect as l,useUpdateEffect as o,useUnmountEffect as c}from"primereact/hooks";import{ChevronDownIcon as u}from"primereact/icons/chevrondown";import{ChevronLeftIcon as i}from"primereact/icons/chevronleft";import{ChevronRightIcon as s}from"primereact/icons/chevronright";import{ChevronUpIcon as m}from"primereact/icons/chevronup";import{Ripple as p}from"primereact/ripple";import{ObjectUtils as f,classNames as v,UniqueComponentId as d,DomHandler as h,IconUtils as g}from"primereact/utils";function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},b.apply(this,arguments)}function y(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 N(e){if(Array.isArray(e))return y(e)}function E(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}function S(){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 C(e){if(Array.isArray(e))return e}function w(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,o,c=[],u=!0,i=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=l.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){i=!0,a=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(i)throw a}}return c}}function P(){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 k(e,t){return C(e)||w(e,t)||I(e,t)||P()}var x={defaultProps:{__TYPE:"Carousel",id:null,value:null,page:0,header:null,footer:null,style:null,className:null,itemTemplate:null,circular:!1,showIndicators:!0,showNavigators:!0,autoplayInterval:0,numVisible:1,numScroll:1,prevIcon:null,nextIcon:null,responsiveOptions:null,orientation:"horizontal",verticalViewPortHeight:"300px",contentClassName:null,containerClassName:null,indicatorsContentClassName:null,onPageChange:null,children:void 0},getProps:function(e){return f.getMergedProps(e,x.defaultProps)},getOtherProps:function(e){return f.getDiffProps(e,x.defaultProps)}},O=e.memo((function(t){var r=t.template(t.item),n=v(t.className,"p-carousel-item",{"p-carousel-item-active":t.active,"p-carousel-item-start":t.start,"p-carousel-item-end":t.end});return e.createElement("div",{className:n},r)})),T=e.memo(e.forwardRef((function(y,C){var w=x.getProps(y),P=k(e.useState(w.numVisible),2),T=P[0],R=P[1],A=k(e.useState(w.numScroll),2),M=A[0],V=A[1],j=k(e.useState(w.page*w.numScroll*-1),2),D=j[0],H=j[1],L=k(e.useState(w.page),2),X=L[0],_=L[1],Y=e.useRef(null),z=e.useRef(null),J=e.useRef(0),F=e.useRef(!!w.autoplayInterval),U=e.useRef(""),W=e.useRef(20),$=e.useRef(null),q=e.useRef(null),B=e.useRef(null),G=e.useRef(!1),K=e.useRef(null),Q=n(M),Z=n(T),ee=n(w.value),te=n(w.page),re="vertical"===w.orientation,ne=w.circular||!!w.autoplayInterval,ae=ne&&w.value&&w.value.length>=T,le=w.value?Math.max(Math.ceil((w.value.length-T)/M)+1,0):0,oe=le&&w.autoplayInterval&&F.current,ce=w.onPageChange&&!oe,ue=ce?w.page:X,ie=k(a({listener:function(){me()},when:w.responsiveOptions}),1)[0],se=function(e,t){var r=D;null!=t?(r=M*t*-1,ae&&(r-=T),G.current=!1):(r+=M*e,G.current&&(r+=J.current-M*e,G.current=!1),t=Math.abs(Math.floor((ae?r+T:r)/M)));ae&&X===le-1&&-1===e?(r=-1*(w.value.length+T),t=0):ae&&0===X&&1===e?(r=0,t=le-1):t===le-1&&J.current>0&&(r+=-1*J.current-M*e,G.current=!0),z.current&&(h.removeClass(z.current,"p-items-hidden"),Ie(r),z.current.style.transition="transform 500ms ease 0s"),Se(t),H(r)},me=function(){if(z.current&&K.current){for(var e=window.innerWidth,t={numVisible:w.numVisible,numScroll:w.numScroll},r=0;r<K.current.length;r++){var n=K.current[r];parseInt(n.breakpoint,10)>=e&&(t=n)}if(M!==t.numScroll){var a=Math.floor(ue*M/t.numScroll),l=t.numScroll*a*-1;ae&&(l-=t.numVisible),H(l),V(t.numScroll),Se(a)}T!==t.numVisible&&R(t.numVisible)}},pe=function(e,t){(ne||0!==ue)&&se(1,t),F.current=!1,e.cancelable&&e.preventDefault()},fe=function(e,t){(ne||ue<le-1)&&se(-1,t),F.current=!1,e.cancelable&&e.preventDefault()},ve=function(e,t){t>ue?fe(e,t):t<ue&&pe(e,t)},de=function(e){z.current&&"transform"===e.propertyName&&(h.addClass(z.current,"p-items-hidden"),z.current.style.transition="",0!==X&&X!==le-1||!ae||Ie(D))},he=function(e){var t=e.changedTouches[0];$.current={x:t.pageX,y:t.pageY}},ge=function(e){e.cancelable&&e.preventDefault()},be=function(e){var t=e.changedTouches[0];ye(e,re?t.pageY-$.current.y:t.pageX-$.current.x)},ye=function(e,t){Math.abs(t)>W&&(t<0?fe(e):pe(e))},Ne=function(){q.current&&clearInterval(q.current)},Ee=function(){B.current||(B.current=h.createInlineStyle(t.nonce));var e,r="\n .p-carousel[".concat(U.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/T,"%\n }\n ");if(w.responsiveOptions){K.current=N(e=w.responsiveOptions)||E(e)||I(e)||S(),K.current.sort((function(e,r){return f.sort(e.breakpoint,r.breakpoint,-1,t.locale,t.nullSortOrder)}));for(var n=0;n<K.current.length;n++){var a=K.current[n];r+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(U.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}B.current.innerHTML=r},Ie=function(e){z.current&&(z.current.style.transform=re?"translate3d(0, ".concat(e*(100/T),"%, 0)"):"translate3d(".concat(e*(100/T),"%, 0, 0)"))},Se=function(e){!ce&&_(e),w.onPageChange&&w.onPageChange({page:e})};e.useImperativeHandle(C,(function(){return{props:w,getElement:function(){return Y.current}}})),l((function(){Y.current&&(U.current=d(),Y.current.setAttribute(U.current,"")),Ee(),me(),Ie(D),ie()})),o((function(){var e=!1,t=D;if(w.autoplayInterval&&Ne(),Q!==M||Z!==T||w.value&&ee&&ee.length!==w.value.length){J.current=(w.value.length-T)%M;var r=ue;0!==le&&r>=le&&(Se(r=le-1),e=!0),t=r*M*-1,ae&&(t-=T),r===le-1&&J.current>0?(t+=-1*J.current+M,G.current=!0):G.current=!1,t!==D&&(H(t),e=!0),Ie(t)}ae&&(0===X?t=-1*T:0===t&&(t=-1*w.value.length,J.current>0&&(G.current=!0)),t!==D&&(H(t),e=!0)),te!==w.page&&(w.page>te&&w.page<=le-1?se(-1,w.page):w.page<te&&se(1,w.page)),!e&&oe&&(q.current=setInterval((function(){se(-1,X===le-1?0:X+1)}),w.autoplayInterval))})),c((function(){w.autoplayInterval&&Ne()}));var Ce=function(){if(w.value&&w.value.length){var t=null,r=null;if(ae){var n=null;t=(n=w.value.slice(-1*T)).map((function(t,r){return e.createElement(O,{key:r+"_scloned",className:"p-carousel-item-cloned",template:w.itemTemplate,item:t,active:-1*D===w.value.length+T,start:0===r,end:r===n.length-1})})),r=(n=w.value.slice(0,T)).map((function(t,r){return e.createElement(O,{key:r+"_fcloned",className:"p-carousel-item-cloned",template:w.itemTemplate,item:t,active:0===D,start:0===r,end:r===n.length-1})}))}var a=w.value.map((function(t,r){var n=ae?-1*(D+T):-1*D,a=n+T-1;return e.createElement(O,{key:r,template:w.itemTemplate,item:t,active:n<=r&&a>=r,start:n===r,end:a===r})}));return e.createElement(e.Fragment,null,t,a,r)}},we=function(){if(w.showNavigators){var t=(!ne||w.value&&w.value.length<T)&&0===ue,n=v("p-carousel-prev p-link",{"p-disabled":t}),a="p-carousel-prev-icon",l=g.getJSXIcon(re?w.prevIcon||e.createElement(m,{className:a}):w.prevIcon||e.createElement(i,{className:a}),{className:n},{props:w});return e.createElement("button",{type:"button",className:n,onClick:pe,disabled:t,"aria-label":r("previousPageLabel")},l,e.createElement(p,null))}return null},Pe=function(){if(w.showNavigators){var t=(!ne||w.value&&w.value.length<T)&&(ue===le-1||0===le),n=v("p-carousel-next p-link",{"p-disabled":t}),a="p-carousel-next-icon",l=g.getJSXIcon(re?w.nextIcon||e.createElement(u,{className:a}):w.nextIcon||e.createElement(s,{className:a}),{className:n},{props:w});return e.createElement("button",{type:"button",className:n,onClick:fe,disabled:t,"aria-label":r("nextPageLabel")},l,e.createElement(p,null))}return null},ke=function(t){var n="carousel-indicator-"+t,a=v("p-carousel-indicator",{"p-highlight":ue===t});return e.createElement("li",{key:n,className:a},e.createElement("button",{type:"button",className:"p-link",onClick:function(e){return ve(e,t)},"aria-label":"".concat(r("pageLabel")," ").concat(t+1)},e.createElement(p,null)))},xe=x.getOtherProps(w),Oe=v("p-carousel p-component",{"p-carousel-vertical":re,"p-carousel-horizontal":!re},w.className),Te=v("p-carousel-content",w.contentClassName),Re=function(){var t=Ce(),r=re?w.verticalViewPortHeight:"auto",n=we(),a=Pe(),l=v("p-carousel-container",w.containerClassName);return e.createElement("div",{className:l},n,e.createElement("div",{className:"p-carousel-items-content",style:{height:r},onTouchStart:he,onTouchMove:ge,onTouchEnd:be},e.createElement("div",{ref:z,className:"p-carousel-items-container",onTransitionEnd:de},t)),a)}(),Ae=function(){if(w.showIndicators){for(var t=v("p-carousel-indicators p-reset",w.indicatorsContentClassName),r=[],n=0;n<le;n++)r.push(ke(n));return e.createElement("ul",{className:t},r)}return null}(),Me=w.header?e.createElement("div",{className:"p-carousel-header"},w.header):null,Ve=w.footer?e.createElement("div",{className:"p-carousel-footer"},w.footer):null;return e.createElement("div",b({ref:Y,id:w.id,className:Oe,style:w.style},xe),Me,e.createElement("div",{className:Te},Re,Ae),Ve)})));O.displayName="CarouselItem",T.displayName="Carousel";export{T as Carousel};
|
|
1
|
+
import*as e from"react";import t,{PrimeReactContext as r,ariaLabel as n}from"primereact/api";import{usePrevious as a,useResizeListener as o,useMountEffect as l,useUpdateEffect as u,useUnmountEffect as c}from"primereact/hooks";import{ChevronDownIcon as i}from"primereact/icons/chevrondown";import{ChevronLeftIcon as s}from"primereact/icons/chevronleft";import{ChevronRightIcon as m}from"primereact/icons/chevronright";import{ChevronUpIcon as p}from"primereact/icons/chevronup";import{Ripple as f}from"primereact/ripple";import{classNames as v,mergeProps as d,UniqueComponentId as y,DomHandler as b,ObjectUtils as h,IconUtils as g}from"primereact/utils";import{ComponentBase as S}from"primereact/componentbase";function N(e){return N="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},N(e)}function E(e,t){if("object"!==N(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function I(e){var t=E(e,"string");return"symbol"===N(t)?t:String(t)}function O(e,t,r){return(t=I(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(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 C(e){if(Array.isArray(e))return w(e)}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function j(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function x(){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 k(e){if(Array.isArray(e))return e}function T(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,l,u=[],c=!0,i=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){i=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(i)throw a}}return u}}function A(){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 R(e,t){return k(e)||T(e,t)||j(e,t)||A()}var V=S.extend({defaultProps:{__TYPE:"Carousel",id:null,value:null,page:0,header:null,footer:null,style:null,className:null,itemTemplate:null,circular:!1,showIndicators:!0,showNavigators:!0,autoplayInterval:0,numVisible:1,numScroll:1,prevIcon:null,nextIcon:null,responsiveOptions:null,orientation:"horizontal",verticalViewPortHeight:"300px",contentClassName:null,containerClassName:null,indicatorsContentClassName:null,onPageChange:null,children:void 0}});function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var B=e.memo((function(t){var r=t.template(t.item),n=v(t.className,"p-carousel-item",{"p-carousel-item-active":t.active,"p-carousel-item-start":t.start,"p-carousel-item-end":t.end}),a=t.ptm(t.className&&"p-carousel-item-cloned"===t.className?"itemCloned":"item"),o=d({className:n},a);return e.createElement("div",o,r)})),H=e.memo(e.forwardRef((function(S,N){var E=e.useContext(r),I=V.getProps(S,E),O=R(e.useState(I.numVisible),2),w=O[0],k=O[1],T=R(e.useState(I.numScroll),2),A=T[0],M=T[1],H=R(e.useState(I.page*I.numScroll*-1),2),L=H[0],X=H[1],_=R(e.useState(I.page),2),Y=_[0],z=_[1],J=V.setMetaData({props:I,state:{numVisible:w,numScroll:A,totalShiftedItems:L,page:Y}}).ptm,F=e.useRef(null),U=e.useRef(null),W=e.useRef(0),$=e.useRef(!!I.autoplayInterval),q=e.useRef(""),G=e.useRef(20),K=e.useRef(null),Q=e.useRef(null),Z=e.useRef(null),ee=e.useRef(!1),te=e.useRef(null),re=a(A),ne=a(w),ae=a(I.value),oe=a(I.page),le="vertical"===I.orientation,ue=I.circular||!!I.autoplayInterval,ce=ue&&I.value&&I.value.length>=w,ie=I.value?Math.max(Math.ceil((I.value.length-w)/A)+1,0):0,se=ie&&I.autoplayInterval&&$.current,me=I.onPageChange&&!se,pe=me?I.page:Y,fe=R(o({listener:function(){de()},when:I.responsiveOptions}),1)[0],ve=function(e,t){var r=L;null!=t?(r=A*t*-1,ce&&(r-=w),ee.current=!1):(r+=A*e,ee.current&&(r+=W.current-A*e,ee.current=!1),t=Math.abs(Math.floor((ce?r+w:r)/A)));ce&&Y===ie-1&&-1===e?(r=-1*(I.value.length+w),t=0):ce&&0===Y&&1===e?(r=0,t=ie-1):t===ie-1&&W.current>0&&(r+=-1*W.current-A*e,ee.current=!0),U.current&&(b.removeClass(U.current,"p-items-hidden"),Pe(r),U.current.style.transition="transform 500ms ease 0s"),je(t),X(r)},de=function(){if(U.current&&te.current){for(var e=window.innerWidth,t={numVisible:I.numVisible,numScroll:I.numScroll},r=0;r<te.current.length;r++){var n=te.current[r];parseInt(n.breakpoint,10)>=e&&(t=n)}if(A!==t.numScroll){var a=Math.floor(pe*A/t.numScroll),o=t.numScroll*a*-1;ce&&(o-=t.numVisible),X(o),M(t.numScroll),je(a)}w!==t.numVisible&&k(t.numVisible)}},ye=function(e,t){(ue||0!==pe)&&ve(1,t),$.current=!1,e.cancelable&&e.preventDefault()},be=function(e,t){(ue||pe<ie-1)&&ve(-1,t),$.current=!1,e.cancelable&&e.preventDefault()},he=function(e,t){t>pe?be(e,t):t<pe&&ye(e,t)},ge=function(e){U.current&&"transform"===e.propertyName&&(b.addClass(U.current,"p-items-hidden"),U.current.style.transition="",0!==Y&&Y!==ie-1||!ce||Pe(L))},Se=function(e){var t=e.changedTouches[0];K.current={x:t.pageX,y:t.pageY}},Ne=function(e){e.cancelable&&e.preventDefault()},Ee=function(e){var t=e.changedTouches[0];Ie(e,le?t.pageY-K.current.y:t.pageX-K.current.x)},Ie=function(e,t){Math.abs(t)>G&&(t<0?be(e):ye(e))},Oe=function(){I.autoplayInterval>0&&(Q.current=setInterval((function(){ve(-1,Y===ie-1?0:Y+1)}),I.autoplayInterval))},we=function(){Q.current&&clearInterval(Q.current)},Ce=function(){Z.current||(Z.current=b.createInlineStyle(E&&E.nonce||t.nonce));var e,r="\n .p-carousel[".concat(q.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/w,"%\n }\n ");if(I.responsiveOptions){te.current=C(e=I.responsiveOptions)||P(e)||j(e)||x(),te.current.sort((function(e,r){return h.sort(e.breakpoint,r.breakpoint,-1,E&&E.locale||t.locale,E&&E.nullSortOrder||t.nullSortOrder)}));for(var n=0;n<te.current.length;n++){var a=te.current[n];r+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(q.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}Z.current.innerHTML=r},Pe=function(e){U.current&&(U.current.style.transform=le?"translate3d(0, ".concat(e*(100/w),"%, 0)"):"translate3d(".concat(e*(100/w),"%, 0, 0)"))},je=function(e){!me&&z(e),I.onPageChange&&I.onPageChange({page:e})};e.useImperativeHandle(N,(function(){return{props:I,startAutoplay:Oe,stopAutoplay:we,getElement:function(){return F.current}}})),l((function(){F.current&&(q.current=y(),F.current.setAttribute(q.current,"")),Ce(),de(),Pe(L),fe()})),u((function(){var e=!1,t=L;if(I.autoplayInterval&&we(),re!==A||ne!==w||I.value&&ae&&ae.length!==I.value.length){W.current=(I.value.length-w)%A;var r=pe;0!==ie&&r>=ie&&(je(r=ie-1),e=!0),t=r*A*-1,ce&&(t-=w),r===ie-1&&W.current>0?(t+=-1*W.current+A,ee.current=!0):ee.current=!1,t!==L&&(X(t),e=!0),Pe(t)}ce&&(0===Y?t=-1*w:0===t&&(t=-1*I.value.length,W.current>0&&(ee.current=!0)),t!==L&&(X(t),e=!0)),oe!==I.page&&(I.page>oe&&I.page<=ie-1?ve(-1,I.page):I.page<oe&&ve(1,I.page)),!e&&se&&Oe()})),c((function(){I.autoplayInterval&&we(),Z.current=b.removeInlineStyle(Z.current)}));var xe=function(){if(I.value&&I.value.length){var t=null,r=null;if(ce){var n=null;t=(n=I.value.slice(-1*w)).map((function(t,r){return e.createElement(B,{key:r+"_scloned",className:"p-carousel-item-cloned",template:I.itemTemplate,item:t,active:-1*L===I.value.length+w,start:0===r,end:r===n.length-1,ptm:J})})),r=(n=I.value.slice(0,w)).map((function(t,r){return e.createElement(B,{key:r+"_fcloned",className:"p-carousel-item-cloned",template:I.itemTemplate,item:t,active:0===L,start:0===r,end:r===n.length-1,ptm:J})}))}var a=I.value.map((function(t,r){var n=ce?-1*(L+w):-1*L,a=n+w-1;return e.createElement(B,{key:r,template:I.itemTemplate,item:t,active:n<=r&&a>=r,start:n===r,end:a===r,ptm:J})}));return e.createElement(e.Fragment,null,t,a,r)}},ke=function(){if(I.showNavigators){var t=(!ue||I.value&&I.value.length<w)&&0===pe,r=v("p-carousel-prev p-link",{"p-disabled":t}),a=d({className:"p-carousel-prev-icon"},J("previousButtonIcon")),o=g.getJSXIcon(le?I.prevIcon||e.createElement(p,a):I.prevIcon||e.createElement(s,a),D({},a),{props:I}),l=d({type:"button",className:r,onClick:function(e){return ye(e)},disabled:t,"aria-label":n("previousPageLabel")},J("previousButton"));return e.createElement("button",l,o,e.createElement(f,null))}return null},Te=function(){if(I.showNavigators){var t=(!ue||I.value&&I.value.length<w)&&(pe===ie-1||0===ie),r=v("p-carousel-next p-link",{"p-disabled":t}),a=d({className:"p-carousel-next-icon"},J("nextButtonIcon")),o=g.getJSXIcon(le?I.nextIcon||e.createElement(i,a):I.nextIcon||e.createElement(m,a),D({},a),{props:I}),l=d({type:"button",className:r,onClick:function(e){return be(e)},disabled:t,"aria-label":n("nextPageLabel")},J("nextButton"));return e.createElement("button",l,o,e.createElement(f,null))}return null},Ae=function(t){var r="carousel-indicator-"+t,a=v("p-carousel-indicator",{"p-highlight":pe===t}),o=d({key:r,className:a},J("indicator")),l=d({type:"button",className:"p-link",onClick:function(e){return he(e,t)},"aria-label":"".concat(n("pageLabel")," ").concat(t+1)},J("indicatorButton"));return e.createElement("li",o,e.createElement("button",l,e.createElement(f,null)))},Re=v("p-carousel p-component",{"p-carousel-vertical":le,"p-carousel-horizontal":!le},I.className),Ve=v("p-carousel-content",I.contentClassName),Me=function(){var t=xe(),r=le?I.verticalViewPortHeight:"auto",n=ke(),a=Te(),o=v("p-carousel-container",I.containerClassName),l=d({className:"p-carousel-items-content",style:{height:r},onTouchStart:function(e){return Se(e)},onTouchMove:function(e){return Ne(e)},onTouchEnd:function(e){return Ee(e)}},J("itemsContent")),u=d({className:o},J("container")),c=d({ref:U,className:"p-carousel-items-container",onTransitionEnd:ge},J("itemsContainer"));return e.createElement("div",u,n,e.createElement("div",l,e.createElement("div",c,t)),a)}(),De=function(){if(I.showIndicators){for(var t=v("p-carousel-indicators p-reset",I.indicatorsContentClassName),r=[],n=0;n<ie;n++)r.push(Ae(n));var a=d({className:t},J("indicators"));return e.createElement("ul",a,r)}return null}(),Be=function(){if(I.header){var t=d({className:"p-carousel-header"},J("header"));return e.createElement("div",t,I.header)}return null}(),He=function(){if(I.footer){var t=d({className:"p-carousel-footer"},J("footer"));return e.createElement("div",t,I.footer)}return null}(),Le=d({id:I.id,ref:F,className:Re,style:I.style},V.getOtherProps(I),J("root")),Xe=d({className:Ve},J("content"));return e.createElement("div",Le,Be,e.createElement("div",Xe,Me,De),He)})));B.displayName="CarouselItem",H.displayName="Carousel";export{H as Carousel};
|