primereact 9.3.1 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -31
- package/accordion/accordion.cjs.js +88 -90
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +90 -1
- package/accordion/accordion.esm.js +89 -91
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +89 -92
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +1 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +7 -6
- package/api/api.esm.js +1 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +1 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +33 -11
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +4 -0
- package/autocomplete/autocomplete.esm.js +33 -11
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +32 -10
- package/autocomplete/autocomplete.min.css +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +71 -22
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +37 -1
- package/avatar/avatar.esm.js +72 -23
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +72 -24
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +26 -42
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.d.ts +24 -0
- package/avatargroup/avatargroup.esm.js +13 -29
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +52 -69
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +12 -28
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +26 -0
- package/badge/badge.esm.js +13 -29
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +13 -30
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +12 -28
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +38 -0
- package/blockui/blockui.esm.js +13 -29
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +13 -30
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +87 -49
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.d.ts +53 -1
- package/breadcrumb/breadcrumb.esm.js +88 -50
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +88 -51
- package/breadcrumb/breadcrumb.min.css +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +49 -42
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +42 -1
- package/button/button.esm.js +50 -43
- package/button/button.esm.min.js +1 -1
- package/button/button.js +49 -43
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +37 -23
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -2
- package/calendar/calendar.esm.js +37 -23
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +34 -20
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +52 -63
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +56 -0
- package/card/card.esm.js +39 -50
- package/card/card.esm.min.js +1 -1
- package/card/card.js +86 -98
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +151 -110
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +113 -1
- package/carousel/carousel.esm.js +151 -110
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +148 -108
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +27 -23
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +5 -0
- package/cascadeselect/cascadeselect.esm.js +27 -23
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +28 -24
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +31 -42
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +35 -0
- package/chart/chart.esm.js +18 -29
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +140 -152
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +40 -19
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +19 -1
- package/checkbox/checkbox.esm.js +41 -20
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +41 -20
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +45 -42
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +53 -1
- package/chip/chip.esm.js +46 -43
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +46 -44
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +37 -22
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +5 -0
- package/chips/chips.esm.js +37 -22
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +37 -23
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +11 -4
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +13 -0
- package/colorpicker/colorpicker.esm.js +11 -4
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +11 -4
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +6 -2
- package/componentbase/componentbase.cjs.js +105 -0
- package/componentbase/componentbase.cjs.min.js +1 -0
- package/componentbase/componentbase.esm.js +101 -0
- package/componentbase/componentbase.esm.min.js +1 -0
- package/componentbase/componentbase.js +109 -0
- package/componentbase/componentbase.min.js +1 -0
- package/componentbase/package.json +6 -0
- package/confirmdialog/confirmdialog.cjs.js +44 -27
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +90 -2
- package/confirmdialog/confirmdialog.esm.js +45 -28
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +45 -29
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +53 -50
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +70 -1
- package/confirmpopup/confirmpopup.esm.js +54 -51
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +54 -52
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +111 -61
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +92 -1
- package/contextmenu/contextmenu.esm.js +112 -62
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +112 -63
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +16510 -5273
- package/core/core.min.js +41 -39
- package/datatable/datatable.cjs.js +253 -210
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +20 -7
- package/datatable/datatable.esm.js +253 -210
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +246 -203
- package/datatable/datatable.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +13 -26
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +38 -0
- package/deferredcontent/deferredcontent.esm.js +14 -27
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +14 -28
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +83 -83
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +85 -3
- package/dialog/dialog.esm.js +83 -83
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +81 -82
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +35 -51
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.d.ts +30 -0
- package/divider/divider.esm.js +22 -38
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +66 -83
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +82 -45
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +66 -0
- package/dock/dock.esm.js +83 -46
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +83 -47
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +46 -20
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +6 -1
- package/dropdown/dropdown.esm.js +46 -20
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +45 -19
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +55 -54
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +77 -1
- package/fieldset/fieldset.esm.js +56 -55
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +56 -56
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +181 -151
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +150 -1
- package/fileupload/fileupload.esm.js +182 -152
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +182 -153
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +136 -118
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +156 -2
- package/galleria/galleria.esm.js +137 -119
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +135 -118
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +20 -3
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +17 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +21 -5
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +410 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +410 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +410 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowup/index.cjs.js +410 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +410 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +410 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/ban/index.cjs.js +410 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +410 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +410 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/download/index.cjs.js +410 -2
- package/icons/download/index.cjs.min.js +1 -1
- package/icons/download/index.esm.js +410 -2
- package/icons/download/index.esm.min.js +1 -1
- package/icons/download/index.js +410 -2
- package/icons/download/index.min.js +1 -1
- package/icons/exclamationtriangle/index.cjs.js +410 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +410 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +410 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/eyeslash/index.cjs.js +410 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +410 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +410 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/filter/index.cjs.js +410 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +410 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +410 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filterslash/index.cjs.js +410 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +410 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +410 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/infocircle/index.cjs.js +410 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +410 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +410 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/pencil/index.cjs.js +410 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +410 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +410 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/plus/index.cjs.js +410 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +410 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +410 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/refresh/index.cjs.js +410 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +410 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +410 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/search/index.cjs.js +410 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +410 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +410 -2
- package/icons/search/index.min.js +1 -1
- package/icons/searchminus/index.cjs.js +410 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +410 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +410 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchplus/index.cjs.js +410 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +410 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +410 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/sortalt/index.cjs.js +410 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +410 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +410 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortamountdown/index.cjs.js +410 -2
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +410 -2
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +410 -2
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountupalt/index.cjs.js +410 -2
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +410 -2
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +410 -2
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/spinner/index.cjs.js +410 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +410 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +410 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/star/index.cjs.js +410 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +410 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +410 -2
- package/icons/star/index.min.js +1 -1
- package/icons/starfill/index.cjs.js +410 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +410 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +410 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/thlarge/index.cjs.js +410 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +410 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +410 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/timescircle/index.cjs.js +410 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +410 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +410 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/trash/index.cjs.js +410 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +410 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +410 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/undo/index.cjs.js +410 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +410 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +410 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/upload/index.cjs.js +410 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +410 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +410 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/windowmaximize/index.cjs.js +410 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +410 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +410 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowminimize/index.cjs.js +410 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +410 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +410 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/image/image.cjs.js +506 -103
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +130 -3
- package/image/image.esm.js +507 -104
- package/image/image.esm.min.js +1 -1
- package/image/image.js +503 -101
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +33 -51
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +51 -1
- package/inplace/inplace.esm.js +33 -51
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +33 -52
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +24 -18
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +24 -18
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +24 -18
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +8 -6
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +8 -6
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +8 -6
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +13 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +5 -0
- package/inputswitch/inputswitch.esm.js +13 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +14 -4
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -8
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +7 -8
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -8
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +3 -4
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +3 -4
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +3 -4
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/listbox/listbox.cjs.js +12 -4
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +12 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +12 -4
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +147 -96
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +142 -2
- package/megamenu/megamenu.esm.js +147 -96
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +145 -95
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +3 -4
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +3 -4
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +3 -4
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +94 -55
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +71 -0
- package/menu/menu.esm.js +95 -56
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +95 -57
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +118 -110
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +94 -1
- package/menubar/menubar.esm.js +119 -111
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +119 -112
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +0 -2
- package/message/message.cjs.js +66 -46
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +35 -2
- package/message/message.esm.js +67 -47
- package/message/message.esm.min.js +1 -1
- package/message/message.js +67 -48
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +78 -74
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +51 -2
- package/messages/messages.esm.js +78 -74
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +78 -75
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +74 -47
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +9 -0
- package/multiselect/multiselect.esm.js +75 -48
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +73 -46
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +21 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +5 -0
- package/multistatecheckbox/multistatecheckbox.esm.js +21 -13
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +21 -13
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +18 -2
- package/overlaypanel/overlaypanel.cjs.js +40 -46
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +45 -1
- package/overlaypanel/overlaypanel.esm.js +41 -47
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -48
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.d.ts +3 -3
- package/panel/panel.cjs.js +78 -63
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +100 -1
- package/panel/panel.esm.js +79 -64
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +79 -65
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +145 -83
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +124 -2
- package/panelmenu/panelmenu.esm.js +145 -83
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +144 -83
- package/panelmenu/panelmenu.min.js +1 -1
- package/primereact.all.cjs.js +4240 -3058
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +4240 -3059
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +4240 -3058
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +45 -57
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.d.ts +38 -0
- package/progressbar/progressbar.esm.js +32 -44
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +105 -118
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +37 -51
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.d.ts +34 -0
- package/progressspinner/progressspinner.esm.js +24 -38
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +75 -90
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +42 -20
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +19 -1
- package/radiobutton/radiobutton.esm.js +42 -20
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +43 -22
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +15 -7
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +15 -7
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +14 -6
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +195 -187
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +16 -7
- package/resources/themes/arya-green/theme.css +16 -7
- package/resources/themes/arya-orange/theme.css +16 -7
- package/resources/themes/arya-purple/theme.css +16 -7
- package/resources/themes/bootstrap4-dark-blue/theme.css +16 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +16 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +16 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +16 -7
- package/resources/themes/fluent-light/theme.css +16 -7
- package/resources/themes/lara-dark-blue/theme.css +16 -7
- package/resources/themes/lara-dark-indigo/theme.css +16 -7
- package/resources/themes/lara-dark-purple/theme.css +16 -7
- package/resources/themes/lara-dark-teal/theme.css +16 -7
- package/resources/themes/lara-light-blue/theme.css +16 -7
- package/resources/themes/lara-light-indigo/theme.css +16 -7
- package/resources/themes/lara-light-purple/theme.css +16 -7
- package/resources/themes/lara-light-teal/theme.css +16 -7
- package/resources/themes/luna-amber/theme.css +16 -7
- package/resources/themes/luna-blue/theme.css +16 -7
- package/resources/themes/luna-green/theme.css +16 -7
- package/resources/themes/luna-pink/theme.css +16 -7
- package/resources/themes/md-dark-deeppurple/theme.css +16 -7
- package/resources/themes/md-dark-indigo/theme.css +16 -7
- package/resources/themes/md-light-deeppurple/theme.css +16 -7
- package/resources/themes/md-light-indigo/theme.css +16 -7
- package/resources/themes/mdc-dark-deeppurple/theme.css +16 -7
- package/resources/themes/mdc-dark-indigo/theme.css +16 -7
- package/resources/themes/mdc-light-deeppurple/theme.css +16 -7
- package/resources/themes/mdc-light-indigo/theme.css +16 -7
- package/resources/themes/mira/theme.css +16 -7
- package/resources/themes/nano/theme.css +16 -7
- package/resources/themes/nova/theme.css +16 -7
- package/resources/themes/nova-accent/theme.css +16 -7
- package/resources/themes/nova-alt/theme.css +16 -7
- package/resources/themes/rhea/theme.css +16 -7
- package/resources/themes/saga-blue/theme.css +16 -7
- package/resources/themes/saga-green/theme.css +16 -7
- package/resources/themes/saga-orange/theme.css +16 -7
- package/resources/themes/saga-purple/theme.css +16 -7
- package/resources/themes/soho-dark/theme.css +16 -7
- package/resources/themes/soho-light/theme.css +16 -7
- package/resources/themes/tailwind-light/theme.css +16 -7
- package/resources/themes/vela-blue/theme.css +16 -7
- package/resources/themes/vela-green/theme.css +16 -7
- package/resources/themes/vela-orange/theme.css +16 -7
- package/resources/themes/vela-purple/theme.css +16 -7
- package/resources/themes/viva-dark/theme.css +16 -7
- package/resources/themes/viva-light/theme.css +16 -7
- package/scrollpanel/scrollpanel.cjs.js +39 -52
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.d.ts +42 -0
- package/scrollpanel/scrollpanel.esm.js +26 -39
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +193 -207
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +64 -36
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +42 -1
- package/scrolltop/scrolltop.esm.js +65 -37
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +65 -38
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +6 -2
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +6 -2
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +6 -2
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +88 -52
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +58 -1
- package/sidebar/sidebar.esm.js +89 -53
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +89 -54
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +26 -42
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.d.ts +26 -0
- package/skeleton/skeleton.esm.js +13 -29
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +70 -87
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +121 -111
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +98 -1
- package/slidemenu/slidemenu.esm.js +122 -112
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +122 -113
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.cjs.js +63 -56
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +64 -1
- package/speeddial/speeddial.esm.js +64 -57
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +62 -56
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +50 -40
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +59 -1
- package/splitbutton/splitbutton.esm.js +51 -41
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +50 -41
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +68 -70
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +60 -0
- package/splitter/splitter.esm.js +69 -71
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +69 -72
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +78 -45
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.d.ts +50 -0
- package/steps/steps.esm.js +79 -46
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +79 -47
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +9 -7
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +9 -7
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +9 -7
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +83 -47
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -0
- package/tabmenu/tabmenu.esm.js +84 -48
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +84 -49
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +142 -122
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +132 -1
- package/tabview/tabview.esm.js +143 -123
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +143 -124
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +18 -30
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +34 -1
- package/tag/tag.esm.js +19 -31
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +19 -32
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +49 -52
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +73 -0
- package/terminal/terminal.esm.js +50 -53
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +50 -54
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +1 -1
- package/tieredmenu/tieredmenu.cjs.js +104 -59
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +83 -2
- package/tieredmenu/tieredmenu.esm.js +105 -60
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +105 -61
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.d.ts +1 -1
- package/toast/toast.cjs.js +85 -81
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +124 -2
- package/toast/toast.esm.js +86 -82
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +83 -80
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +12 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +12 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +13 -4
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +35 -49
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +44 -0
- package/toolbar/toolbar.esm.js +22 -36
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +72 -87
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +31 -37
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +55 -0
- package/tooltip/tooltip.esm.js +32 -38
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +32 -39
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +5 -0
- package/tree/tree.d.ts +1 -1
- package/treenode/treenode.d.ts +5 -1
- package/treeselect/treeselect.cjs.js +12 -5
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +6 -1
- package/treeselect/treeselect.esm.js +12 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +11 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +10 -3
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +1 -1
- package/treetable/treetable.esm.js +10 -3
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +10 -3
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +22 -11
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +5 -0
- package/tristatecheckbox/tristatecheckbox.esm.js +22 -11
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +21 -11
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +735 -676
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +5 -1
- package/utils/utils.esm.js +732 -677
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +736 -678
- package/utils/utils.min.js +1 -1
- package/web-types.json +13 -1
package/carousel/carousel.cjs.js
CHANGED
|
@@ -5,12 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var PrimeReact = require('primereact/api');
|
|
7
7
|
var hooks = require('primereact/hooks');
|
|
8
|
-
var ripple = require('primereact/ripple');
|
|
9
|
-
var utils = require('primereact/utils');
|
|
10
|
-
var chevronup = require('primereact/icons/chevronup');
|
|
11
|
-
var chevronright = require('primereact/icons/chevronright');
|
|
12
8
|
var chevrondown = require('primereact/icons/chevrondown');
|
|
13
9
|
var chevronleft = require('primereact/icons/chevronleft');
|
|
10
|
+
var chevronright = require('primereact/icons/chevronright');
|
|
11
|
+
var chevronup = require('primereact/icons/chevronup');
|
|
12
|
+
var ripple = require('primereact/ripple');
|
|
13
|
+
var utils = require('primereact/utils');
|
|
14
|
+
var componentbase = require('primereact/componentbase');
|
|
14
15
|
|
|
15
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
17
|
|
|
@@ -35,19 +36,45 @@ function _interopNamespace(e) {
|
|
|
35
36
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
36
37
|
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
37
38
|
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
function _typeof(obj) {
|
|
40
|
+
"@babel/helpers - typeof";
|
|
41
|
+
|
|
42
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
43
|
+
return typeof obj;
|
|
44
|
+
} : function (obj) {
|
|
45
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
46
|
+
}, _typeof(obj);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function _toPrimitive(input, hint) {
|
|
50
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
51
|
+
var prim = input[Symbol.toPrimitive];
|
|
52
|
+
if (prim !== undefined) {
|
|
53
|
+
var res = prim.call(input, hint || "default");
|
|
54
|
+
if (_typeof(res) !== "object") return res;
|
|
55
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
56
|
+
}
|
|
57
|
+
return (hint === "string" ? String : Number)(input);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function _toPropertyKey(arg) {
|
|
61
|
+
var key = _toPrimitive(arg, "string");
|
|
62
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function _defineProperty(obj, key, value) {
|
|
66
|
+
key = _toPropertyKey(key);
|
|
67
|
+
if (key in obj) {
|
|
68
|
+
Object.defineProperty(obj, key, {
|
|
69
|
+
value: value,
|
|
70
|
+
enumerable: true,
|
|
71
|
+
configurable: true,
|
|
72
|
+
writable: true
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
obj[key] = value;
|
|
76
|
+
}
|
|
77
|
+
return obj;
|
|
51
78
|
}
|
|
52
79
|
|
|
53
80
|
function _arrayLikeToArray(arr, len) {
|
|
@@ -121,7 +148,7 @@ function _slicedToArray(arr, i) {
|
|
|
121
148
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
122
149
|
}
|
|
123
150
|
|
|
124
|
-
var CarouselBase = {
|
|
151
|
+
var CarouselBase = componentbase.ComponentBase.extend({
|
|
125
152
|
defaultProps: {
|
|
126
153
|
__TYPE: 'Carousel',
|
|
127
154
|
id: null,
|
|
@@ -148,15 +175,11 @@ var CarouselBase = {
|
|
|
148
175
|
indicatorsContentClassName: null,
|
|
149
176
|
onPageChange: null,
|
|
150
177
|
children: undefined
|
|
151
|
-
},
|
|
152
|
-
getProps: function getProps(props) {
|
|
153
|
-
return utils.ObjectUtils.getMergedProps(props, CarouselBase.defaultProps);
|
|
154
|
-
},
|
|
155
|
-
getOtherProps: function getOtherProps(props) {
|
|
156
|
-
return utils.ObjectUtils.getDiffProps(props, CarouselBase.defaultProps);
|
|
157
178
|
}
|
|
158
|
-
};
|
|
179
|
+
});
|
|
159
180
|
|
|
181
|
+
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; }
|
|
182
|
+
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; }
|
|
160
183
|
var CarouselItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
161
184
|
var content = props.template(props.item);
|
|
162
185
|
var className = utils.classNames(props.className, 'p-carousel-item', {
|
|
@@ -164,9 +187,11 @@ var CarouselItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
164
187
|
'p-carousel-item-start': props.start,
|
|
165
188
|
'p-carousel-item-end': props.end
|
|
166
189
|
});
|
|
167
|
-
|
|
190
|
+
var ptParams = props.className && props.className === 'p-carousel-item-cloned' ? props.ptm('itemCloned') : props.ptm('item');
|
|
191
|
+
var itemClonedProps = utils.mergeProps({
|
|
168
192
|
className: className
|
|
169
|
-
},
|
|
193
|
+
}, ptParams);
|
|
194
|
+
return /*#__PURE__*/React__namespace.createElement("div", itemClonedProps, content);
|
|
170
195
|
});
|
|
171
196
|
var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
172
197
|
var props = CarouselBase.getProps(inProps);
|
|
@@ -186,6 +211,16 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
186
211
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
187
212
|
pageState = _React$useState8[0],
|
|
188
213
|
setPageState = _React$useState8[1];
|
|
214
|
+
var _CarouselBase$setMeta = CarouselBase.setMetaData({
|
|
215
|
+
props: props,
|
|
216
|
+
state: {
|
|
217
|
+
numVisible: numVisibleState,
|
|
218
|
+
numScroll: numScrollState,
|
|
219
|
+
totalShiftedItems: totalShiftedItemsState,
|
|
220
|
+
page: pageState
|
|
221
|
+
}
|
|
222
|
+
}),
|
|
223
|
+
ptm = _CarouselBase$setMeta.ptm;
|
|
189
224
|
var elementRef = React__namespace.useRef(null);
|
|
190
225
|
var itemsContainerRef = React__namespace.useRef(null);
|
|
191
226
|
var remainingItems = React__namespace.useRef(0);
|
|
@@ -204,9 +239,10 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
204
239
|
var isVertical = props.orientation === 'vertical';
|
|
205
240
|
var circular = props.circular || !!props.autoplayInterval;
|
|
206
241
|
var isCircular = circular && props.value && props.value.length >= numVisibleState;
|
|
207
|
-
var currentPage = props.onPageChange ? props.page : pageState;
|
|
208
242
|
var totalIndicators = props.value ? Math.max(Math.ceil((props.value.length - numVisibleState) / numScrollState) + 1, 0) : 0;
|
|
209
243
|
var isAutoplay = totalIndicators && props.autoplayInterval && allowAutoplay.current;
|
|
244
|
+
var isControlled = props.onPageChange && !isAutoplay;
|
|
245
|
+
var currentPage = isControlled ? props.page : pageState;
|
|
210
246
|
var _useResizeListener = hooks.useResizeListener({
|
|
211
247
|
listener: function listener() {
|
|
212
248
|
calculatePosition();
|
|
@@ -247,15 +283,8 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
247
283
|
changePosition(totalShiftedItems);
|
|
248
284
|
itemsContainerRef.current.style.transition = 'transform 500ms ease 0s';
|
|
249
285
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
props.onPageChange({
|
|
253
|
-
page: page
|
|
254
|
-
});
|
|
255
|
-
} else {
|
|
256
|
-
setPageState(page);
|
|
257
|
-
setTotalShiftedItemsState(totalShiftedItems);
|
|
258
|
-
}
|
|
286
|
+
changePage(page);
|
|
287
|
+
setTotalShiftedItemsState(totalShiftedItems);
|
|
259
288
|
};
|
|
260
289
|
var calculatePosition = function calculatePosition() {
|
|
261
290
|
if (itemsContainerRef.current && responsiveOptions.current) {
|
|
@@ -278,13 +307,7 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
278
307
|
}
|
|
279
308
|
setTotalShiftedItemsState(totalShiftedItems);
|
|
280
309
|
setNumScrollState(matchedResponsiveData.numScroll);
|
|
281
|
-
|
|
282
|
-
props.onPageChange({
|
|
283
|
-
page: page
|
|
284
|
-
});
|
|
285
|
-
} else {
|
|
286
|
-
setPageState(page);
|
|
287
|
-
}
|
|
310
|
+
changePage(page);
|
|
288
311
|
}
|
|
289
312
|
if (numVisibleState !== matchedResponsiveData.numVisible) {
|
|
290
313
|
setNumVisibleState(matchedResponsiveData.numVisible);
|
|
@@ -325,19 +348,19 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
325
348
|
}
|
|
326
349
|
}
|
|
327
350
|
};
|
|
328
|
-
var
|
|
351
|
+
var _onTouchStart = function onTouchStart(e) {
|
|
329
352
|
var touchobj = e.changedTouches[0];
|
|
330
353
|
startPos.current = {
|
|
331
354
|
x: touchobj.pageX,
|
|
332
355
|
y: touchobj.pageY
|
|
333
356
|
};
|
|
334
357
|
};
|
|
335
|
-
var
|
|
358
|
+
var _onTouchMove = function onTouchMove(e) {
|
|
336
359
|
if (e.cancelable) {
|
|
337
360
|
e.preventDefault();
|
|
338
361
|
}
|
|
339
362
|
};
|
|
340
|
-
var
|
|
363
|
+
var _onTouchEnd = function onTouchEnd(e) {
|
|
341
364
|
var touchobj = e.changedTouches[0];
|
|
342
365
|
if (isVertical) {
|
|
343
366
|
changePageOnTouch(e, touchobj.pageY - startPos.current.y);
|
|
@@ -394,6 +417,12 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
394
417
|
itemsContainerRef.current.style.transform = isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / numVisibleState), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / numVisibleState), "%, 0, 0)");
|
|
395
418
|
}
|
|
396
419
|
};
|
|
420
|
+
var changePage = function changePage(page) {
|
|
421
|
+
!isControlled && setPageState(page);
|
|
422
|
+
props.onPageChange && props.onPageChange({
|
|
423
|
+
page: page
|
|
424
|
+
});
|
|
425
|
+
};
|
|
397
426
|
React__namespace.useImperativeHandle(ref, function () {
|
|
398
427
|
return {
|
|
399
428
|
props: props,
|
|
@@ -423,13 +452,7 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
423
452
|
var page = currentPage;
|
|
424
453
|
if (totalIndicators !== 0 && page >= totalIndicators) {
|
|
425
454
|
page = totalIndicators - 1;
|
|
426
|
-
|
|
427
|
-
props.onPageChange({
|
|
428
|
-
page: page
|
|
429
|
-
});
|
|
430
|
-
} else {
|
|
431
|
-
setPageState(page);
|
|
432
|
-
}
|
|
455
|
+
changePage(page);
|
|
433
456
|
stateChanged = true;
|
|
434
457
|
}
|
|
435
458
|
totalShiftedItems = page * numScrollState * -1;
|
|
@@ -497,7 +520,8 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
497
520
|
item: item,
|
|
498
521
|
active: isActive,
|
|
499
522
|
start: start,
|
|
500
|
-
end: end
|
|
523
|
+
end: end,
|
|
524
|
+
ptm: ptm
|
|
501
525
|
});
|
|
502
526
|
});
|
|
503
527
|
clonedElements = props.value.slice(0, numVisibleState);
|
|
@@ -513,7 +537,8 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
513
537
|
item: item,
|
|
514
538
|
active: isActive,
|
|
515
539
|
start: start,
|
|
516
|
-
end: end
|
|
540
|
+
end: end,
|
|
541
|
+
ptm: ptm
|
|
517
542
|
});
|
|
518
543
|
});
|
|
519
544
|
}
|
|
@@ -529,7 +554,8 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
529
554
|
item: item,
|
|
530
555
|
active: isActive,
|
|
531
556
|
start: start,
|
|
532
|
-
end: end
|
|
557
|
+
end: end,
|
|
558
|
+
ptm: ptm
|
|
533
559
|
});
|
|
534
560
|
});
|
|
535
561
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, clonedItemsForStarting, items, clonedItemsForFinishing);
|
|
@@ -537,17 +563,19 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
537
563
|
};
|
|
538
564
|
var createHeader = function createHeader() {
|
|
539
565
|
if (props.header) {
|
|
540
|
-
|
|
541
|
-
className:
|
|
542
|
-
},
|
|
566
|
+
var headerProps = utils.mergeProps({
|
|
567
|
+
className: 'p-carousel-header'
|
|
568
|
+
}, ptm('header'));
|
|
569
|
+
return /*#__PURE__*/React__namespace.createElement("div", headerProps, props.header);
|
|
543
570
|
}
|
|
544
571
|
return null;
|
|
545
572
|
};
|
|
546
573
|
var createFooter = function createFooter() {
|
|
547
574
|
if (props.footer) {
|
|
548
|
-
|
|
549
|
-
className:
|
|
550
|
-
},
|
|
575
|
+
var footerProps = utils.mergeProps({
|
|
576
|
+
className: 'p-carousel-footer'
|
|
577
|
+
}, ptm('footer'));
|
|
578
|
+
return /*#__PURE__*/React__namespace.createElement("div", footerProps, props.footer);
|
|
551
579
|
}
|
|
552
580
|
return null;
|
|
553
581
|
};
|
|
@@ -557,21 +585,30 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
557
585
|
var backwardNavigator = createBackwardNavigator();
|
|
558
586
|
var forwardNavigator = createForwardNavigator();
|
|
559
587
|
var className = utils.classNames('p-carousel-container', props.containerClassName);
|
|
560
|
-
|
|
561
|
-
className:
|
|
562
|
-
}, backwardNavigator, /*#__PURE__*/React__namespace.createElement("div", {
|
|
563
|
-
className: "p-carousel-items-content",
|
|
588
|
+
var itemsContentProps = utils.mergeProps({
|
|
589
|
+
className: 'p-carousel-items-content',
|
|
564
590
|
style: {
|
|
565
591
|
height: height
|
|
566
592
|
},
|
|
567
|
-
onTouchStart: onTouchStart
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
593
|
+
onTouchStart: function onTouchStart(e) {
|
|
594
|
+
return _onTouchStart(e);
|
|
595
|
+
},
|
|
596
|
+
onTouchMove: function onTouchMove(e) {
|
|
597
|
+
return _onTouchMove(e);
|
|
598
|
+
},
|
|
599
|
+
onTouchEnd: function onTouchEnd(e) {
|
|
600
|
+
return _onTouchEnd(e);
|
|
601
|
+
}
|
|
602
|
+
}, ptm('itemsContent'));
|
|
603
|
+
var containerProps = utils.mergeProps({
|
|
604
|
+
className: className
|
|
605
|
+
}, ptm('container'));
|
|
606
|
+
var itemsContainerProps = utils.mergeProps({
|
|
571
607
|
ref: itemsContainerRef,
|
|
572
|
-
className:
|
|
608
|
+
className: 'p-carousel-items-container',
|
|
573
609
|
onTransitionEnd: onTransitionEnd
|
|
574
|
-
},
|
|
610
|
+
}, ptm('itemsContainer'));
|
|
611
|
+
return /*#__PURE__*/React__namespace.createElement("div", containerProps, backwardNavigator, /*#__PURE__*/React__namespace.createElement("div", itemsContentProps, /*#__PURE__*/React__namespace.createElement("div", itemsContainerProps, items)), forwardNavigator);
|
|
575
612
|
};
|
|
576
613
|
var createBackwardNavigator = function createBackwardNavigator() {
|
|
577
614
|
if (props.showNavigators) {
|
|
@@ -580,23 +617,23 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
580
617
|
'p-disabled': isDisabled
|
|
581
618
|
});
|
|
582
619
|
var iconClassName = 'p-carousel-prev-icon';
|
|
583
|
-
var
|
|
584
|
-
className: iconClassName
|
|
585
|
-
}) : props.prevIcon || /*#__PURE__*/React__namespace.createElement(chevronleft.ChevronLeftIcon, {
|
|
620
|
+
var previousButtonIconProps = utils.mergeProps({
|
|
586
621
|
className: iconClassName
|
|
587
|
-
});
|
|
588
|
-
var
|
|
589
|
-
|
|
590
|
-
}, {
|
|
622
|
+
}, ptm('previousButtonIcon'));
|
|
623
|
+
var icon = isVertical ? props.prevIcon || /*#__PURE__*/React__namespace.createElement(chevronup.ChevronUpIcon, previousButtonIconProps) : props.prevIcon || /*#__PURE__*/React__namespace.createElement(chevronleft.ChevronLeftIcon, previousButtonIconProps);
|
|
624
|
+
var backwardNavigatorIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, previousButtonIconProps), {
|
|
591
625
|
props: props
|
|
592
626
|
});
|
|
593
|
-
|
|
594
|
-
type:
|
|
627
|
+
var previousButtonProps = utils.mergeProps({
|
|
628
|
+
type: 'button',
|
|
595
629
|
className: _className,
|
|
596
|
-
onClick:
|
|
630
|
+
onClick: function onClick(e) {
|
|
631
|
+
return navBackward(e);
|
|
632
|
+
},
|
|
597
633
|
disabled: isDisabled,
|
|
598
|
-
|
|
599
|
-
},
|
|
634
|
+
'aria-label': PrimeReact.ariaLabel('previousPageLabel')
|
|
635
|
+
}, ptm('previousButton'));
|
|
636
|
+
return /*#__PURE__*/React__namespace.createElement("button", previousButtonProps, backwardNavigatorIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
600
637
|
}
|
|
601
638
|
return null;
|
|
602
639
|
};
|
|
@@ -607,23 +644,23 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
607
644
|
'p-disabled': isDisabled
|
|
608
645
|
});
|
|
609
646
|
var iconClassName = 'p-carousel-next-icon';
|
|
610
|
-
var
|
|
611
|
-
className: iconClassName
|
|
612
|
-
}) : props.nextIcon || /*#__PURE__*/React__namespace.createElement(chevronright.ChevronRightIcon, {
|
|
647
|
+
var nextButtonIconProps = utils.mergeProps({
|
|
613
648
|
className: iconClassName
|
|
614
|
-
});
|
|
615
|
-
var
|
|
616
|
-
|
|
617
|
-
}, {
|
|
649
|
+
}, ptm('nextButtonIcon'));
|
|
650
|
+
var icon = isVertical ? props.nextIcon || /*#__PURE__*/React__namespace.createElement(chevrondown.ChevronDownIcon, nextButtonIconProps) : props.nextIcon || /*#__PURE__*/React__namespace.createElement(chevronright.ChevronRightIcon, nextButtonIconProps);
|
|
651
|
+
var forwardNavigatorIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread({}, nextButtonIconProps), {
|
|
618
652
|
props: props
|
|
619
653
|
});
|
|
620
|
-
|
|
621
|
-
type:
|
|
654
|
+
var nextButtonProps = utils.mergeProps({
|
|
655
|
+
type: 'button',
|
|
622
656
|
className: _className2,
|
|
623
|
-
onClick:
|
|
657
|
+
onClick: function onClick(e) {
|
|
658
|
+
return navForward(e);
|
|
659
|
+
},
|
|
624
660
|
disabled: isDisabled,
|
|
625
|
-
|
|
626
|
-
},
|
|
661
|
+
'aria-label': PrimeReact.ariaLabel('nextPageLabel')
|
|
662
|
+
}, ptm('nextButton'));
|
|
663
|
+
return /*#__PURE__*/React__namespace.createElement("button", nextButtonProps, forwardNavigatorIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
627
664
|
}
|
|
628
665
|
return null;
|
|
629
666
|
};
|
|
@@ -633,17 +670,19 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
633
670
|
var className = utils.classNames('p-carousel-indicator', {
|
|
634
671
|
'p-highlight': isActive
|
|
635
672
|
});
|
|
636
|
-
|
|
673
|
+
var indicatorProps = utils.mergeProps({
|
|
637
674
|
key: key,
|
|
638
675
|
className: className
|
|
639
|
-
},
|
|
640
|
-
|
|
641
|
-
|
|
676
|
+
}, ptm('indicator'));
|
|
677
|
+
var indicatorButtonProps = utils.mergeProps({
|
|
678
|
+
type: 'button',
|
|
679
|
+
className: 'p-link',
|
|
642
680
|
onClick: function onClick(e) {
|
|
643
681
|
return onDotClick(e, index);
|
|
644
682
|
},
|
|
645
|
-
|
|
646
|
-
},
|
|
683
|
+
'aria-label': "".concat(PrimeReact.ariaLabel('pageLabel'), " ").concat(index + 1)
|
|
684
|
+
}, ptm('indicatorButton'));
|
|
685
|
+
return /*#__PURE__*/React__namespace.createElement("li", indicatorProps, /*#__PURE__*/React__namespace.createElement("button", indicatorButtonProps, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null)));
|
|
647
686
|
};
|
|
648
687
|
var createIndicators = function createIndicators() {
|
|
649
688
|
if (props.showIndicators) {
|
|
@@ -652,13 +691,13 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
652
691
|
for (var i = 0; i < totalIndicators; i++) {
|
|
653
692
|
_indicators.push(createIndicator(i));
|
|
654
693
|
}
|
|
655
|
-
|
|
694
|
+
var indicatorsProps = utils.mergeProps({
|
|
656
695
|
className: _className3
|
|
657
|
-
},
|
|
696
|
+
}, ptm('indicators'));
|
|
697
|
+
return /*#__PURE__*/React__namespace.createElement("ul", indicatorsProps, _indicators);
|
|
658
698
|
}
|
|
659
699
|
return null;
|
|
660
700
|
};
|
|
661
|
-
var otherProps = CarouselBase.getOtherProps(props);
|
|
662
701
|
var className = utils.classNames('p-carousel p-component', {
|
|
663
702
|
'p-carousel-vertical': isVertical,
|
|
664
703
|
'p-carousel-horizontal': !isVertical
|
|
@@ -668,14 +707,16 @@ var Carousel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
668
707
|
var indicators = createIndicators();
|
|
669
708
|
var header = createHeader();
|
|
670
709
|
var footer = createFooter();
|
|
671
|
-
|
|
672
|
-
ref: elementRef,
|
|
710
|
+
var rootProps = utils.mergeProps({
|
|
673
711
|
id: props.id,
|
|
712
|
+
ref: elementRef,
|
|
674
713
|
className: className,
|
|
675
714
|
style: props.style
|
|
676
|
-
},
|
|
715
|
+
}, CarouselBase.getOtherProps(props), ptm('root'));
|
|
716
|
+
var contentProps = utils.mergeProps({
|
|
677
717
|
className: contentClassName
|
|
678
|
-
}, content
|
|
718
|
+
}, ptm('content'));
|
|
719
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, header, /*#__PURE__*/React__namespace.createElement("div", contentProps, content, indicators), footer);
|
|
679
720
|
}));
|
|
680
721
|
CarouselItem.displayName = 'CarouselItem';
|
|
681
722
|
Carousel.displayName = 'Carousel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/hooks"),n=require("primereact/ripple"),a=require("primereact/utils"),l=require("primereact/icons/chevronup"),u=require("primereact/icons/chevronright"),c=require("primereact/icons/chevrondown"),o=require("primereact/icons/chevronleft");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var p=s(e),m=i(t);function f(){return f=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},f.apply(this,arguments)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e){if(Array.isArray(e))return v(e)}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e,t){if(e){if("string"==typeof e)return v(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)?v(e,t):void 0}}function b(){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){if(Array.isArray(e))return e}function N(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,u,c=[],o=!0,i=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;o=!1}else for(;!(o=(n=l.call(r)).done)&&(c.push(n.value),c.length!==t);o=!0);}catch(e){i=!0,a=e}finally{try{if(!o&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(i)throw a}}return c}}function I(){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 E(e,t){return y(e)||N(e,t)||g(e,t)||I()}var C={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 a.ObjectUtils.getMergedProps(e,C.defaultProps)},getOtherProps:function(e){return a.ObjectUtils.getDiffProps(e,C.defaultProps)}},P=p.memo((function(e){var t=e.template(e.item),r=a.classNames(e.className,"p-carousel-item",{"p-carousel-item-active":e.active,"p-carousel-item-start":e.start,"p-carousel-item-end":e.end});return p.createElement("div",{className:r},t)})),S=p.memo(p.forwardRef((function(e,i){var s=C.getProps(e),v=E(p.useState(s.numVisible),2),y=v[0],N=v[1],I=E(p.useState(s.numScroll),2),S=I[0],O=I[1],w=E(p.useState(s.page*s.numScroll*-1),2),j=w[0],R=w[1],k=E(p.useState(s.page),2),x=k[0],T=k[1],M=p.useRef(null),q=p.useRef(null),A=p.useRef(0),U=p.useRef(!!s.autoplayInterval),V=p.useRef(""),D=p.useRef(20),L=p.useRef(null),_=p.useRef(null),H=p.useRef(null),z=p.useRef(!1),X=p.useRef(null),Y=r.usePrevious(S),J=r.usePrevious(y),F=r.usePrevious(s.value),W=r.usePrevious(s.page),$="vertical"===s.orientation,B=s.circular||!!s.autoplayInterval,G=B&&s.value&&s.value.length>=y,K=s.onPageChange?s.page:x,Q=s.value?Math.max(Math.ceil((s.value.length-y)/S)+1,0):0,Z=Q&&s.autoplayInterval&&U.current,ee=E(r.useResizeListener({listener:function(){re()},when:s.responsiveOptions}),1)[0],te=function(e,t){var r=j;null!=t?(r=S*t*-1,G&&(r-=y),z.current=!1):(r+=S*e,z.current&&(r+=A.current-S*e,z.current=!1),t=Math.abs(Math.floor((G?r+y:r)/S)));G&&x===Q-1&&-1===e?(r=-1*(s.value.length+y),t=0):G&&0===x&&1===e?(r=0,t=Q-1):t===Q-1&&A.current>0&&(r+=-1*A.current-S*e,z.current=!0),q.current&&(a.DomHandler.removeClass(q.current,"p-items-hidden"),fe(r),q.current.style.transition="transform 500ms ease 0s"),s.onPageChange?(R(r),s.onPageChange({page:t})):(T(t),R(r))},re=function(){if(q.current&&X.current){for(var e=window.innerWidth,t={numVisible:s.numVisible,numScroll:s.numScroll},r=0;r<X.current.length;r++){var n=X.current[r];parseInt(n.breakpoint,10)>=e&&(t=n)}if(S!==t.numScroll){var a=Math.floor(K*S/t.numScroll),l=t.numScroll*a*-1;G&&(l-=t.numVisible),R(l),O(t.numScroll),s.onPageChange?s.onPageChange({page:a}):T(a)}y!==t.numVisible&&N(t.numVisible)}},ne=function(e,t){(B||0!==K)&&te(1,t),U.current=!1,e.cancelable&&e.preventDefault()},ae=function(e,t){(B||K<Q-1)&&te(-1,t),U.current=!1,e.cancelable&&e.preventDefault()},le=function(e,t){t>K?ae(e,t):t<K&&ne(e,t)},ue=function(e){q.current&&"transform"===e.propertyName&&(a.DomHandler.addClass(q.current,"p-items-hidden"),q.current.style.transition="",0!==x&&x!==Q-1||!G||fe(j))},ce=function(e){var t=e.changedTouches[0];L.current={x:t.pageX,y:t.pageY}},oe=function(e){e.cancelable&&e.preventDefault()},ie=function(e){var t=e.changedTouches[0];se(e,$?t.pageY-L.current.y:t.pageX-L.current.x)},se=function(e,t){Math.abs(t)>D&&(t<0?ae(e):ne(e))},pe=function(){_.current&&clearInterval(_.current)},me=function(){H.current||(H.current=a.DomHandler.createInlineStyle(m.default.nonce));var e,t="\n .p-carousel[".concat(V.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/y,"%\n }\n ");if(s.responsiveOptions){X.current=d(e=s.responsiveOptions)||h(e)||g(e)||b(),X.current.sort((function(e,t){return a.ObjectUtils.sort(e.breakpoint,t.breakpoint,-1,m.default.locale,m.default.nullSortOrder)}));for(var r=0;r<X.current.length;r++){var n=X.current[r];t+="\n @media screen and (max-width: ".concat(n.breakpoint,") {\n .p-carousel[").concat(V.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/n.numVisible,"%\n }\n }\n ")}}H.current.innerHTML=t},fe=function(e){q.current&&(q.current.style.transform=$?"translate3d(0, ".concat(e*(100/y),"%, 0)"):"translate3d(".concat(e*(100/y),"%, 0, 0)"))};p.useImperativeHandle(i,(function(){return{props:s,getElement:function(){return M.current}}})),r.useMountEffect((function(){M.current&&(V.current=a.UniqueComponentId(),M.current.setAttribute(V.current,"")),me(),re(),fe(j),ee()})),r.useUpdateEffect((function(){var e=!1,t=j;if(s.autoplayInterval&&pe(),Y!==S||J!==y||s.value&&F&&F.length!==s.value.length){A.current=(s.value.length-y)%S;var r=K;0!==Q&&r>=Q&&(r=Q-1,s.onPageChange?s.onPageChange({page:r}):T(r),e=!0),t=r*S*-1,G&&(t-=y),r===Q-1&&A.current>0?(t+=-1*A.current+S,z.current=!0):z.current=!1,t!==j&&(R(t),e=!0),fe(t)}G&&(0===x?t=-1*y:0===t&&(t=-1*s.value.length,A.current>0&&(z.current=!0)),t!==j&&(R(t),e=!0)),W!==s.page&&(s.page>W&&s.page<=Q-1?te(-1,s.page):s.page<W&&te(1,s.page)),!e&&Z&&(_.current=setInterval((function(){te(-1,x===Q-1?0:x+1)}),s.autoplayInterval))})),r.useUnmountEffect((function(){s.autoplayInterval&&pe()}));var ve=function(){if(s.value&&s.value.length){var e=null,t=null;if(G){var r=null;e=(r=s.value.slice(-1*y)).map((function(e,t){return p.createElement(P,{key:t+"_scloned",className:"p-carousel-item-cloned",template:s.itemTemplate,item:e,active:-1*j===s.value.length+y,start:0===t,end:t===r.length-1})})),t=(r=s.value.slice(0,y)).map((function(e,t){return p.createElement(P,{key:t+"_fcloned",className:"p-carousel-item-cloned",template:s.itemTemplate,item:e,active:0===j,start:0===t,end:t===r.length-1})}))}var n=s.value.map((function(e,t){var r=G?-1*(j+y):-1*j,n=r+y-1;return p.createElement(P,{key:t,template:s.itemTemplate,item:e,active:r<=t&&n>=t,start:r===t,end:n===t})}));return p.createElement(p.Fragment,null,e,n,t)}},de=function(){if(s.showNavigators){var e=(!B||s.value&&s.value.length<y)&&0===K,r=a.classNames("p-carousel-prev p-link",{"p-disabled":e}),u="p-carousel-prev-icon",c=a.IconUtils.getJSXIcon($?s.prevIcon||p.createElement(l.ChevronUpIcon,{className:u}):s.prevIcon||p.createElement(o.ChevronLeftIcon,{className:u}),{className:r},{props:s});return p.createElement("button",{type:"button",className:r,onClick:ne,disabled:e,"aria-label":t.ariaLabel("previousPageLabel")},c,p.createElement(n.Ripple,null))}return null},he=function(){if(s.showNavigators){var e=(!B||s.value&&s.value.length<y)&&(K===Q-1||0===Q),r=a.classNames("p-carousel-next p-link",{"p-disabled":e}),l="p-carousel-next-icon",o=a.IconUtils.getJSXIcon($?s.nextIcon||p.createElement(c.ChevronDownIcon,{className:l}):s.nextIcon||p.createElement(u.ChevronRightIcon,{className:l}),{className:r},{props:s});return p.createElement("button",{type:"button",className:r,onClick:ae,disabled:e,"aria-label":t.ariaLabel("nextPageLabel")},o,p.createElement(n.Ripple,null))}return null},ge=function(e){var r="carousel-indicator-"+e,l=a.classNames("p-carousel-indicator",{"p-highlight":K===e});return p.createElement("li",{key:r,className:l},p.createElement("button",{type:"button",className:"p-link",onClick:function(t){return le(t,e)},"aria-label":"".concat(t.ariaLabel("pageLabel")," ").concat(e+1)},p.createElement(n.Ripple,null)))},be=C.getOtherProps(s),ye=a.classNames("p-carousel p-component",{"p-carousel-vertical":$,"p-carousel-horizontal":!$},s.className),Ne=a.classNames("p-carousel-content",s.contentClassName),Ie=function(){var e=ve(),t=$?s.verticalViewPortHeight:"auto",r=de(),n=he(),l=a.classNames("p-carousel-container",s.containerClassName);return p.createElement("div",{className:l},r,p.createElement("div",{className:"p-carousel-items-content",style:{height:t},onTouchStart:ce,onTouchMove:oe,onTouchEnd:ie},p.createElement("div",{ref:q,className:"p-carousel-items-container",onTransitionEnd:ue},e)),n)}(),Ee=function(){if(s.showIndicators){for(var e=a.classNames("p-carousel-indicators p-reset",s.indicatorsContentClassName),t=[],r=0;r<Q;r++)t.push(ge(r));return p.createElement("ul",{className:e},t)}return null}(),Ce=s.header?p.createElement("div",{className:"p-carousel-header"},s.header):null,Pe=s.footer?p.createElement("div",{className:"p-carousel-footer"},s.footer):null;return p.createElement("div",f({ref:M,id:s.id,className:ye,style:s.style},be),Ce,p.createElement("div",{className:Ne},Ie,Ee),Pe)})));P.displayName="CarouselItem",S.displayName="Carousel",exports.Carousel=S;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),r=require("primereact/hooks"),n=require("primereact/icons/chevrondown"),a=require("primereact/icons/chevronleft"),o=require("primereact/icons/chevronright"),l=require("primereact/icons/chevronup"),u=require("primereact/ripple"),c=require("primereact/utils"),i=require("primereact/componentbase");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function m(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var p=m(e),f=s(t);function v(e){return v="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},v(e)}function d(e,t){if("object"!==v(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e){var t=d(e,"string");return"symbol"===v(t)?t:String(t)}function b(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(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 y(e){if(Array.isArray(e))return h(e)}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function N(e,t){if(e){if("string"==typeof e)return h(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)?h(e,t):void 0}}function I(){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 S(e){if(Array.isArray(e))return e}function E(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 O(){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 C(e,t){return S(e)||E(e,t)||N(e,t)||O()}var w=i.ComponentBase.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 j(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 x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k=p.memo((function(e){var t=e.template(e.item),r=c.classNames(e.className,"p-carousel-item",{"p-carousel-item-active":e.active,"p-carousel-item-start":e.start,"p-carousel-item-end":e.end}),n=e.ptm(e.className&&"p-carousel-item-cloned"===e.className?"itemCloned":"item"),a=c.mergeProps({className:r},n);return p.createElement("div",a,t)})),R=p.memo(p.forwardRef((function(e,i){var s=w.getProps(e),m=C(p.useState(s.numVisible),2),v=m[0],d=m[1],g=C(p.useState(s.numScroll),2),b=g[0],h=g[1],S=C(p.useState(s.page*s.numScroll*-1),2),E=S[0],O=S[1],j=C(p.useState(s.page),2),R=j[0],T=j[1],D=w.setMetaData({props:s,state:{numVisible:v,numScroll:b,totalShiftedItems:E,page:R}}).ptm,M=p.useRef(null),q=p.useRef(null),V=p.useRef(0),A=p.useRef(!!s.autoplayInterval),L=p.useRef(""),U=p.useRef(20),_=p.useRef(null),H=p.useRef(null),B=p.useRef(null),z=p.useRef(!1),X=p.useRef(null),Y=r.usePrevious(b),J=r.usePrevious(v),F=r.usePrevious(s.value),W=r.usePrevious(s.page),$="vertical"===s.orientation,G=s.circular||!!s.autoplayInterval,K=G&&s.value&&s.value.length>=v,Q=s.value?Math.max(Math.ceil((s.value.length-v)/b)+1,0):0,Z=Q&&s.autoplayInterval&&A.current,ee=s.onPageChange&&!Z,te=ee?s.page:R,re=C(r.useResizeListener({listener:function(){ae()},when:s.responsiveOptions}),1)[0],ne=function(e,t){var r=E;null!=t?(r=b*t*-1,K&&(r-=v),z.current=!1):(r+=b*e,z.current&&(r+=V.current-b*e,z.current=!1),t=Math.abs(Math.floor((K?r+v:r)/b)));K&&R===Q-1&&-1===e?(r=-1*(s.value.length+v),t=0):K&&0===R&&1===e?(r=0,t=Q-1):t===Q-1&&V.current>0&&(r+=-1*V.current-b*e,z.current=!0),q.current&&(c.DomHandler.removeClass(q.current,"p-items-hidden"),de(r),q.current.style.transition="transform 500ms ease 0s"),ge(t),O(r)},ae=function(){if(q.current&&X.current){for(var e=window.innerWidth,t={numVisible:s.numVisible,numScroll:s.numScroll},r=0;r<X.current.length;r++){var n=X.current[r];parseInt(n.breakpoint,10)>=e&&(t=n)}if(b!==t.numScroll){var a=Math.floor(te*b/t.numScroll),o=t.numScroll*a*-1;K&&(o-=t.numVisible),O(o),h(t.numScroll),ge(a)}v!==t.numVisible&&d(t.numVisible)}},oe=function(e,t){(G||0!==te)&&ne(1,t),A.current=!1,e.cancelable&&e.preventDefault()},le=function(e,t){(G||te<Q-1)&&ne(-1,t),A.current=!1,e.cancelable&&e.preventDefault()},ue=function(e,t){t>te?le(e,t):t<te&&oe(e,t)},ce=function(e){q.current&&"transform"===e.propertyName&&(c.DomHandler.addClass(q.current,"p-items-hidden"),q.current.style.transition="",0!==R&&R!==Q-1||!K||de(E))},ie=function(e){var t=e.changedTouches[0];_.current={x:t.pageX,y:t.pageY}},se=function(e){e.cancelable&&e.preventDefault()},me=function(e){var t=e.changedTouches[0];pe(e,$?t.pageY-_.current.y:t.pageX-_.current.x)},pe=function(e,t){Math.abs(t)>U&&(t<0?le(e):oe(e))},fe=function(){H.current&&clearInterval(H.current)},ve=function(){B.current||(B.current=c.DomHandler.createInlineStyle(f.default.nonce));var e,t="\n .p-carousel[".concat(L.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/v,"%\n }\n ");if(s.responsiveOptions){X.current=y(e=s.responsiveOptions)||P(e)||N(e)||I(),X.current.sort((function(e,t){return c.ObjectUtils.sort(e.breakpoint,t.breakpoint,-1,f.default.locale,f.default.nullSortOrder)}));for(var r=0;r<X.current.length;r++){var n=X.current[r];t+="\n @media screen and (max-width: ".concat(n.breakpoint,") {\n .p-carousel[").concat(L.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/n.numVisible,"%\n }\n }\n ")}}B.current.innerHTML=t},de=function(e){q.current&&(q.current.style.transform=$?"translate3d(0, ".concat(e*(100/v),"%, 0)"):"translate3d(".concat(e*(100/v),"%, 0, 0)"))},ge=function(e){!ee&&T(e),s.onPageChange&&s.onPageChange({page:e})};p.useImperativeHandle(i,(function(){return{props:s,getElement:function(){return M.current}}})),r.useMountEffect((function(){M.current&&(L.current=c.UniqueComponentId(),M.current.setAttribute(L.current,"")),ve(),ae(),de(E),re()})),r.useUpdateEffect((function(){var e=!1,t=E;if(s.autoplayInterval&&fe(),Y!==b||J!==v||s.value&&F&&F.length!==s.value.length){V.current=(s.value.length-v)%b;var r=te;0!==Q&&r>=Q&&(ge(r=Q-1),e=!0),t=r*b*-1,K&&(t-=v),r===Q-1&&V.current>0?(t+=-1*V.current+b,z.current=!0):z.current=!1,t!==E&&(O(t),e=!0),de(t)}K&&(0===R?t=-1*v:0===t&&(t=-1*s.value.length,V.current>0&&(z.current=!0)),t!==E&&(O(t),e=!0)),W!==s.page&&(s.page>W&&s.page<=Q-1?ne(-1,s.page):s.page<W&&ne(1,s.page)),!e&&Z&&(H.current=setInterval((function(){ne(-1,R===Q-1?0:R+1)}),s.autoplayInterval))})),r.useUnmountEffect((function(){s.autoplayInterval&&fe()}));var be=function(){if(s.value&&s.value.length){var e=null,t=null;if(K){var r=null;e=(r=s.value.slice(-1*v)).map((function(e,t){return p.createElement(k,{key:t+"_scloned",className:"p-carousel-item-cloned",template:s.itemTemplate,item:e,active:-1*E===s.value.length+v,start:0===t,end:t===r.length-1,ptm:D})})),t=(r=s.value.slice(0,v)).map((function(e,t){return p.createElement(k,{key:t+"_fcloned",className:"p-carousel-item-cloned",template:s.itemTemplate,item:e,active:0===E,start:0===t,end:t===r.length-1,ptm:D})}))}var n=s.value.map((function(e,t){var r=K?-1*(E+v):-1*E,n=r+v-1;return p.createElement(k,{key:t,template:s.itemTemplate,item:e,active:r<=t&&n>=t,start:r===t,end:n===t,ptm:D})}));return p.createElement(p.Fragment,null,e,n,t)}},he=function(){if(s.showNavigators){var e=(!G||s.value&&s.value.length<v)&&0===te,r=c.classNames("p-carousel-prev p-link",{"p-disabled":e}),n=c.mergeProps({className:"p-carousel-prev-icon"},D("previousButtonIcon")),o=c.IconUtils.getJSXIcon($?s.prevIcon||p.createElement(l.ChevronUpIcon,n):s.prevIcon||p.createElement(a.ChevronLeftIcon,n),x({},n),{props:s}),i=c.mergeProps({type:"button",className:r,onClick:function(e){return oe(e)},disabled:e,"aria-label":t.ariaLabel("previousPageLabel")},D("previousButton"));return p.createElement("button",i,o,p.createElement(u.Ripple,null))}return null},ye=function(){if(s.showNavigators){var e=(!G||s.value&&s.value.length<v)&&(te===Q-1||0===Q),r=c.classNames("p-carousel-next p-link",{"p-disabled":e}),a=c.mergeProps({className:"p-carousel-next-icon"},D("nextButtonIcon")),l=c.IconUtils.getJSXIcon($?s.nextIcon||p.createElement(n.ChevronDownIcon,a):s.nextIcon||p.createElement(o.ChevronRightIcon,a),x({},a),{props:s}),i=c.mergeProps({type:"button",className:r,onClick:function(e){return le(e)},disabled:e,"aria-label":t.ariaLabel("nextPageLabel")},D("nextButton"));return p.createElement("button",i,l,p.createElement(u.Ripple,null))}return null},Pe=function(e){var r="carousel-indicator-"+e,n=c.classNames("p-carousel-indicator",{"p-highlight":te===e}),a=c.mergeProps({key:r,className:n},D("indicator")),o=c.mergeProps({type:"button",className:"p-link",onClick:function(t){return ue(t,e)},"aria-label":"".concat(t.ariaLabel("pageLabel")," ").concat(e+1)},D("indicatorButton"));return p.createElement("li",a,p.createElement("button",o,p.createElement(u.Ripple,null)))},Ne=c.classNames("p-carousel p-component",{"p-carousel-vertical":$,"p-carousel-horizontal":!$},s.className),Ie=c.classNames("p-carousel-content",s.contentClassName),Se=function(){var e=be(),t=$?s.verticalViewPortHeight:"auto",r=he(),n=ye(),a=c.classNames("p-carousel-container",s.containerClassName),o=c.mergeProps({className:"p-carousel-items-content",style:{height:t},onTouchStart:function(e){return ie(e)},onTouchMove:function(e){return se(e)},onTouchEnd:function(e){return me(e)}},D("itemsContent")),l=c.mergeProps({className:a},D("container")),u=c.mergeProps({ref:q,className:"p-carousel-items-container",onTransitionEnd:ce},D("itemsContainer"));return p.createElement("div",l,r,p.createElement("div",o,p.createElement("div",u,e)),n)}(),Ee=function(){if(s.showIndicators){for(var e=c.classNames("p-carousel-indicators p-reset",s.indicatorsContentClassName),t=[],r=0;r<Q;r++)t.push(Pe(r));var n=c.mergeProps({className:e},D("indicators"));return p.createElement("ul",n,t)}return null}(),Oe=function(){if(s.header){var e=c.mergeProps({className:"p-carousel-header"},D("header"));return p.createElement("div",e,s.header)}return null}(),Ce=function(){if(s.footer){var e=c.mergeProps({className:"p-carousel-footer"},D("footer"));return p.createElement("div",e,s.footer)}return null}(),we=c.mergeProps({id:s.id,ref:M,className:Ne,style:s.style},w.getOtherProps(s),D("root")),je=c.mergeProps({className:Ie},D("content"));return p.createElement("div",we,Oe,p.createElement("div",je,Se,Ee),Ce)})));k.displayName="CarouselItem",R.displayName="Carousel",exports.Carousel=R;
|
package/carousel/carousel.d.ts
CHANGED
|
@@ -8,7 +8,114 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
|
-
import { IconType } from '../utils/utils';
|
|
11
|
+
import { IconType, PassThroughType } from '../utils/utils';
|
|
12
|
+
|
|
13
|
+
export declare type CarouselPassThroughType<T> = PassThroughType<T, CarouselPassThroughMethodOptions>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface CarouselPassThroughMethodOptions {
|
|
19
|
+
props: CarouselProps;
|
|
20
|
+
state: CarouselState;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Custom passthrough(pt) options.
|
|
25
|
+
* @see {@link CarouselProps.pt}
|
|
26
|
+
*/
|
|
27
|
+
export interface CarouselPassThroughOptions {
|
|
28
|
+
/**
|
|
29
|
+
* Uses to pass attributes to the root's DOM element.
|
|
30
|
+
*/
|
|
31
|
+
root?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
32
|
+
/**
|
|
33
|
+
* Uses to pass attributes to the header's DOM element.
|
|
34
|
+
*/
|
|
35
|
+
header?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
36
|
+
/**
|
|
37
|
+
* Uses to pass attributes to the content's DOM element.
|
|
38
|
+
*/
|
|
39
|
+
content?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
40
|
+
/**
|
|
41
|
+
* Uses to pass attributes to the container's DOM element.
|
|
42
|
+
*/
|
|
43
|
+
container?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
44
|
+
/**
|
|
45
|
+
* Uses to pass attributes to the previous button's DOM element.
|
|
46
|
+
*/
|
|
47
|
+
previousButton?: CarouselPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
|
|
48
|
+
/**
|
|
49
|
+
* Uses to pass attributes to the previous button icon's DOM element.
|
|
50
|
+
*/
|
|
51
|
+
previousButtonIcon?: CarouselPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
52
|
+
/**
|
|
53
|
+
* Uses to pass attributes to the items content's DOM element.
|
|
54
|
+
*/
|
|
55
|
+
itemsContent?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
56
|
+
/**
|
|
57
|
+
* Uses to pass attributes to the items container's DOM element.
|
|
58
|
+
*/
|
|
59
|
+
itemsContainer?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
60
|
+
/**
|
|
61
|
+
* Uses to pass attributes to the item cloned's DOM element.
|
|
62
|
+
*/
|
|
63
|
+
itemCloned?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
64
|
+
/**
|
|
65
|
+
* Uses to pass attributes to the item's DOM element.
|
|
66
|
+
*/
|
|
67
|
+
item?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
68
|
+
/**
|
|
69
|
+
* Uses to pass attributes to the next button's DOM element.
|
|
70
|
+
*/
|
|
71
|
+
nextButton?: CarouselPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
|
|
72
|
+
/**
|
|
73
|
+
* Uses to pass attributes to the next button icon's DOM element.
|
|
74
|
+
*/
|
|
75
|
+
nextButtonIcon?: CarouselPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
|
|
76
|
+
/**
|
|
77
|
+
* Uses to pass attributes to the indicators's DOM element.
|
|
78
|
+
*/
|
|
79
|
+
indicators?: CarouselPassThroughType<React.HTMLAttributes<HTMLUListElement>>;
|
|
80
|
+
/**
|
|
81
|
+
* Uses to pass attributes to the indicator's DOM element.
|
|
82
|
+
*/
|
|
83
|
+
indicator?: CarouselPassThroughType<React.HTMLAttributes<HTMLLIElement>>;
|
|
84
|
+
/**
|
|
85
|
+
* Uses to pass attributes to the indicator button's DOM element.
|
|
86
|
+
*/
|
|
87
|
+
indicatorButton?: CarouselPassThroughType<React.HTMLAttributes<HTMLButtonElement>>;
|
|
88
|
+
/**
|
|
89
|
+
* Uses to pass attributes to the footer's DOM element.
|
|
90
|
+
*/
|
|
91
|
+
footer?: CarouselPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Defines current inline state in Carousel component.
|
|
96
|
+
*/
|
|
97
|
+
export interface CarouselState {
|
|
98
|
+
/**
|
|
99
|
+
* Number of items per page as a number.
|
|
100
|
+
* @defaultValue 1
|
|
101
|
+
*/
|
|
102
|
+
numVisible: number;
|
|
103
|
+
/**
|
|
104
|
+
* Number of items to scroll as a number.
|
|
105
|
+
* @defaultValue 1
|
|
106
|
+
*/
|
|
107
|
+
numScroll: number;
|
|
108
|
+
/**
|
|
109
|
+
* Index of the first item.
|
|
110
|
+
* @defaultValue 0
|
|
111
|
+
*/
|
|
112
|
+
page: number;
|
|
113
|
+
/**
|
|
114
|
+
* Total shifted items' count as a number.
|
|
115
|
+
* @defaultValue 0
|
|
116
|
+
*/
|
|
117
|
+
totalShiftedItems: number;
|
|
118
|
+
}
|
|
12
119
|
|
|
13
120
|
/**
|
|
14
121
|
* Custom responsive option
|
|
@@ -141,6 +248,11 @@ export interface CarouselProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
|
|
|
141
248
|
* @readonly
|
|
142
249
|
*/
|
|
143
250
|
children?: React.ReactNode | undefined;
|
|
251
|
+
/**
|
|
252
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
253
|
+
* @type {CarouselPassThroughOptions}
|
|
254
|
+
*/
|
|
255
|
+
pt?: CarouselPassThroughOptions;
|
|
144
256
|
}
|
|
145
257
|
|
|
146
258
|
/**
|