primereact 10.0.0 → 10.0.2
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 +1 -1
- package/accordion/accordion.esm.js +0 -1
- package/api/api.esm.js +0 -1
- package/autocomplete/autocomplete.esm.js +8 -7
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/avatar/avatar.esm.js +0 -1
- package/avatargroup/avatargroup.esm.js +0 -1
- package/badge/badge.esm.js +0 -1
- package/blockui/blockui.esm.js +3 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +0 -1
- package/button/button.esm.js +0 -1
- package/calendar/calendar.esm.js +2 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/card/card.esm.js +0 -1
- package/carousel/carousel.esm.js +7 -8
- package/carousel/carousel.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +0 -1
- package/chart/chart.esm.js +0 -1
- package/checkbox/checkbox.esm.js +0 -1
- package/chip/chip.esm.js +0 -1
- package/chips/chips.esm.js +0 -1
- package/colorpicker/colorpicker.esm.js +0 -1
- package/column/column.esm.js +0 -1
- package/columngroup/columngroup.esm.js +0 -1
- package/componentbase/componentbase.cjs.js +12 -7
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +23 -13
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +12 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +0 -1
- package/confirmpopup/confirmpopup.esm.js +0 -1
- package/contextmenu/contextmenu.esm.js +0 -1
- package/core/core.js +12 -7
- package/core/core.min.js +1 -1
- package/csstransition/csstransition.esm.js +0 -1
- package/datascroller/datascroller.esm.js +0 -1
- package/datatable/datatable.esm.js +0 -1
- package/dataview/dataview.esm.js +0 -1
- package/deferredcontent/deferredcontent.esm.js +0 -1
- package/dialog/dialog.esm.js +2 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/divider/divider.esm.js +0 -1
- package/dock/dock.esm.js +0 -1
- package/dropdown/dropdown.esm.js +0 -1
- package/editor/editor.esm.js +0 -1
- package/fieldset/fieldset.esm.js +0 -1
- package/fileupload/fileupload.esm.js +0 -1
- package/galleria/galleria.esm.js +11 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/hooks/hooks.esm.js +0 -6
- package/iconbase/iconbase.esm.js +0 -1
- package/icons/angledoubledown/index.esm.js +0 -1
- package/icons/angledoubleleft/index.esm.js +0 -1
- package/icons/angledoubleright/index.esm.js +0 -1
- package/icons/angledoubleup/index.esm.js +0 -1
- package/icons/angledown/index.esm.js +0 -1
- package/icons/angleleft/index.esm.js +0 -1
- package/icons/angleright/index.esm.js +0 -1
- package/icons/angleup/index.esm.js +0 -1
- package/icons/arrowdown/index.esm.js +0 -1
- package/icons/arrowup/index.esm.js +0 -1
- package/icons/ban/index.esm.js +0 -1
- package/icons/bars/index.esm.js +0 -1
- package/icons/calendar/index.esm.js +0 -1
- package/icons/check/index.esm.js +0 -1
- package/icons/chevrondown/index.esm.js +0 -1
- package/icons/chevronleft/index.esm.js +0 -1
- package/icons/chevronright/index.esm.js +0 -1
- package/icons/chevronup/index.esm.js +0 -1
- package/icons/download/index.esm.js +0 -1
- package/icons/exclamationtriangle/index.esm.js +0 -1
- package/icons/eye/index.esm.js +0 -1
- package/icons/eyeslash/index.esm.js +0 -1
- package/icons/filter/index.esm.js +0 -1
- package/icons/filterslash/index.esm.js +0 -1
- package/icons/infocircle/index.esm.js +0 -1
- package/icons/minus/index.esm.js +0 -1
- package/icons/pencil/index.esm.js +0 -1
- package/icons/plus/index.esm.js +0 -1
- package/icons/refresh/index.esm.js +0 -1
- package/icons/search/index.esm.js +0 -1
- package/icons/searchminus/index.esm.js +0 -1
- package/icons/searchplus/index.esm.js +0 -1
- package/icons/sortalt/index.esm.js +0 -1
- package/icons/sortamountdown/index.esm.js +0 -1
- package/icons/sortamountupalt/index.esm.js +0 -1
- package/icons/spinner/index.esm.js +0 -1
- package/icons/star/index.esm.js +0 -1
- package/icons/starfill/index.esm.js +0 -1
- package/icons/thlarge/index.esm.js +0 -1
- package/icons/times/index.esm.js +0 -1
- package/icons/timescircle/index.esm.js +0 -1
- package/icons/trash/index.esm.js +0 -1
- package/icons/undo/index.esm.js +0 -1
- package/icons/upload/index.esm.js +0 -1
- package/icons/windowmaximize/index.esm.js +0 -1
- package/icons/windowminimize/index.esm.js +0 -1
- package/image/image.esm.js +2 -1
- package/image/image.esm.min.js +1 -1
- package/inplace/inplace.esm.js +0 -1
- package/inputmask/inputmask.esm.js +0 -1
- package/inputnumber/inputnumber.esm.js +0 -1
- package/inputswitch/inputswitch.esm.js +0 -1
- package/inputtext/inputtext.esm.js +0 -1
- package/inputtextarea/inputtextarea.esm.js +0 -1
- package/keyfilter/keyfilter.esm.js +0 -1
- package/knob/knob.esm.js +0 -1
- package/listbox/listbox.esm.js +0 -1
- package/megamenu/megamenu.esm.js +0 -1
- package/mention/mention.esm.js +0 -1
- package/menu/menu.esm.js +0 -1
- package/menubar/menubar.esm.js +0 -1
- package/message/message.esm.js +0 -1
- package/messages/messages.esm.js +1 -2
- package/messages/messages.esm.min.js +1 -1
- package/multiselect/multiselect.esm.js +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +0 -1
- package/orderlist/orderlist.esm.js +9 -5
- package/orderlist/orderlist.esm.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +0 -1
- package/overlaypanel/overlaypanel.esm.js +0 -1
- package/overlayservice/overlayservice.esm.js +0 -1
- package/package.json +2 -2
- package/paginator/paginator.esm.js +0 -1
- package/panel/panel.esm.js +0 -1
- package/panelmenu/panelmenu.esm.js +0 -1
- package/passthrough/index.esm.js +0 -1
- package/passthrough/tailwind/index.cjs.js +2 -4
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +149 -148
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +2 -4
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.esm.js +0 -1
- package/picklist/picklist.esm.js +0 -1
- package/portal/portal.esm.js +0 -1
- package/primereact.all.cjs.js +12 -7
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +70 -42
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +12 -7
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.esm.js +0 -1
- package/progressspinner/progressspinner.esm.js +0 -1
- package/radiobutton/radiobutton.esm.js +0 -1
- package/rating/rating.esm.js +0 -1
- package/ripple/ripple.esm.js +0 -1
- package/row/row.esm.js +0 -1
- package/scrollpanel/scrollpanel.esm.js +0 -1
- package/scrolltop/scrolltop.esm.js +0 -1
- package/selectbutton/selectbutton.esm.js +0 -1
- package/sidebar/sidebar.esm.js +2 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/skeleton/skeleton.esm.js +0 -1
- package/slidemenu/slidemenu.esm.js +0 -1
- package/slider/slider.esm.js +0 -1
- package/speeddial/speeddial.esm.js +0 -1
- package/splitbutton/splitbutton.esm.js +0 -1
- package/splitter/splitter.esm.js +0 -1
- package/steps/steps.esm.js +0 -1
- package/styleclass/styleclass.esm.js +0 -1
- package/tabmenu/tabmenu.esm.js +0 -1
- package/tabview/tabview.esm.js +0 -1
- package/tag/tag.esm.js +0 -1
- package/terminal/terminal.esm.js +0 -1
- package/terminalservice/terminalservice.esm.js +0 -1
- package/tieredmenu/tieredmenu.esm.js +0 -1
- package/timeline/timeline.esm.js +0 -1
- package/toast/toast.esm.js +0 -1
- package/togglebutton/togglebutton.esm.js +0 -1
- package/toolbar/toolbar.esm.js +0 -1
- package/tooltip/tooltip.esm.js +0 -1
- package/tree/tree.esm.js +0 -1
- package/treeselect/treeselect.esm.js +0 -1
- package/treetable/treetable.esm.js +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +0 -1
- package/utils/utils.esm.js +0 -1
- package/virtualscroller/virtualscroller.esm.js +0 -1
- package/web-types.json +1 -1
- package/accordion/accordion.esm.min.mjs +0 -1
- package/accordion/accordion.esm.mjs +0 -420
- package/api/api.esm.min.mjs +0 -1
- package/api/api.esm.mjs +0 -943
- package/autocomplete/autocomplete.esm.min.mjs +0 -1
- package/autocomplete/autocomplete.esm.mjs +0 -1128
- package/avatar/avatar.esm.min.mjs +0 -1
- package/avatar/avatar.esm.mjs +0 -244
- package/avatargroup/avatargroup.esm.min.mjs +0 -1
- package/avatargroup/avatargroup.esm.mjs +0 -54
- package/badge/badge.esm.min.mjs +0 -1
- package/badge/badge.esm.mjs +0 -109
- package/blockui/blockui.esm.min.mjs +0 -1
- package/blockui/blockui.esm.mjs +0 -267
- package/breadcrumb/breadcrumb.esm.min.mjs +0 -1
- package/breadcrumb/breadcrumb.esm.mjs +0 -350
- package/button/button.esm.min.mjs +0 -1
- package/button/button.esm.mjs +0 -294
- package/calendar/calendar.esm.min.mjs +0 -1
- package/calendar/calendar.esm.mjs +0 -3474
- package/card/card.esm.min.mjs +0 -1
- package/card/card.esm.mjs +0 -97
- package/carousel/carousel.esm.min.mjs +0 -1
- package/carousel/carousel.esm.mjs +0 -800
- package/cascadeselect/cascadeselect.esm.min.mjs +0 -1
- package/cascadeselect/cascadeselect.esm.mjs +0 -818
- package/chart/chart.esm.min.mjs +0 -1
- package/chart/chart.esm.mjs +0 -154
- package/checkbox/checkbox.esm.min.mjs +0 -1
- package/checkbox/checkbox.esm.mjs +0 -356
- package/chip/chip.esm.min.mjs +0 -1
- package/chip/chip.esm.mjs +0 -247
- package/chips/chips.esm.min.mjs +0 -1
- package/chips/chips.esm.mjs +0 -500
- package/colorpicker/colorpicker.esm.min.mjs +0 -1
- package/colorpicker/colorpicker.esm.mjs +0 -787
- package/column/column.esm.min.mjs +0 -1
- package/column/column.esm.mjs +0 -7
- package/columngroup/columngroup.esm.min.mjs +0 -1
- package/columngroup/columngroup.esm.mjs +0 -5
- package/componentbase/componentbase.esm.min.mjs +0 -1
- package/componentbase/componentbase.esm.mjs +0 -328
- package/confirmdialog/confirmdialog.esm.min.mjs +0 -1
- package/confirmdialog/confirmdialog.esm.mjs +0 -375
- package/confirmpopup/confirmpopup.esm.min.mjs +0 -1
- package/confirmpopup/confirmpopup.esm.mjs +0 -609
- package/contextmenu/contextmenu.esm.min.mjs +0 -1
- package/contextmenu/contextmenu.esm.mjs +0 -663
- package/csstransition/csstransition.esm.min.mjs +0 -1
- package/csstransition/csstransition.esm.mjs +0 -137
- package/datascroller/datascroller.esm.min.mjs +0 -1
- package/datascroller/datascroller.esm.mjs +0 -319
- package/datatable/datatable.esm.min.mjs +0 -1
- package/datatable/datatable.esm.mjs +0 -6635
- package/dataview/dataview.esm.min.mjs +0 -1
- package/dataview/dataview.esm.mjs +0 -505
- package/deferredcontent/deferredcontent.esm.min.mjs +0 -1
- package/deferredcontent/deferredcontent.esm.mjs +0 -132
- package/dialog/dialog.esm.min.mjs +0 -1
- package/dialog/dialog.esm.mjs +0 -984
- package/divider/divider.esm.min.mjs +0 -1
- package/divider/divider.esm.mjs +0 -78
- package/dock/dock.esm.min.mjs +0 -1
- package/dock/dock.esm.mjs +0 -347
- package/dropdown/dropdown.esm.min.mjs +0 -1
- package/dropdown/dropdown.esm.mjs +0 -1379
- package/editor/editor.esm.min.mjs +0 -1
- package/editor/editor.esm.mjs +0 -337
- package/fieldset/fieldset.esm.min.mjs +0 -1
- package/fieldset/fieldset.esm.mjs +0 -269
- package/fileupload/fileupload.esm.min.mjs +0 -1
- package/fileupload/fileupload.esm.mjs +0 -1004
- package/galleria/galleria.esm.min.mjs +0 -1
- package/galleria/galleria.esm.mjs +0 -1094
- package/hooks/hooks.esm.min.mjs +0 -1
- package/hooks/hooks.esm.mjs +0 -1036
- package/iconbase/iconbase.esm.min.mjs +0 -1
- package/iconbase/iconbase.esm.mjs +0 -32
- package/icons/angledoubledown/index.esm.min.mjs +0 -1
- package/icons/angledoubledown/index.esm.mjs +0 -38
- package/icons/angledoubleleft/index.esm.min.mjs +0 -1
- package/icons/angledoubleleft/index.esm.mjs +0 -38
- package/icons/angledoubleright/index.esm.min.mjs +0 -1
- package/icons/angledoubleright/index.esm.mjs +0 -38
- package/icons/angledoubleup/index.esm.min.mjs +0 -1
- package/icons/angledoubleup/index.esm.mjs +0 -38
- package/icons/angledown/index.esm.min.mjs +0 -1
- package/icons/angledown/index.esm.mjs +0 -36
- package/icons/angleleft/index.esm.min.mjs +0 -1
- package/icons/angleleft/index.esm.mjs +0 -36
- package/icons/angleright/index.esm.min.mjs +0 -1
- package/icons/angleright/index.esm.mjs +0 -36
- package/icons/angleup/index.esm.min.mjs +0 -1
- package/icons/angleup/index.esm.mjs +0 -36
- package/icons/arrowdown/index.esm.min.mjs +0 -1
- package/icons/arrowdown/index.esm.mjs +0 -660
- package/icons/arrowup/index.esm.min.mjs +0 -1
- package/icons/arrowup/index.esm.mjs +0 -660
- package/icons/ban/index.esm.min.mjs +0 -1
- package/icons/ban/index.esm.mjs +0 -658
- package/icons/bars/index.esm.min.mjs +0 -1
- package/icons/bars/index.esm.mjs +0 -38
- package/icons/calendar/index.esm.min.mjs +0 -1
- package/icons/calendar/index.esm.mjs +0 -36
- package/icons/check/index.esm.min.mjs +0 -1
- package/icons/check/index.esm.mjs +0 -36
- package/icons/chevrondown/index.esm.min.mjs +0 -1
- package/icons/chevrondown/index.esm.mjs +0 -36
- package/icons/chevronleft/index.esm.min.mjs +0 -1
- package/icons/chevronleft/index.esm.mjs +0 -36
- package/icons/chevronright/index.esm.min.mjs +0 -1
- package/icons/chevronright/index.esm.mjs +0 -36
- package/icons/chevronup/index.esm.min.mjs +0 -1
- package/icons/chevronup/index.esm.mjs +0 -36
- package/icons/download/index.esm.min.mjs +0 -1
- package/icons/download/index.esm.mjs +0 -660
- package/icons/exclamationtriangle/index.esm.min.mjs +0 -1
- package/icons/exclamationtriangle/index.esm.mjs +0 -664
- package/icons/eye/index.esm.min.mjs +0 -1
- package/icons/eye/index.esm.mjs +0 -38
- package/icons/eyeslash/index.esm.min.mjs +0 -1
- package/icons/eyeslash/index.esm.mjs +0 -660
- package/icons/filter/index.esm.min.mjs +0 -1
- package/icons/filter/index.esm.mjs +0 -658
- package/icons/filterslash/index.esm.min.mjs +0 -1
- package/icons/filterslash/index.esm.mjs +0 -660
- package/icons/infocircle/index.esm.min.mjs +0 -1
- package/icons/infocircle/index.esm.mjs +0 -660
- package/icons/minus/index.esm.min.mjs +0 -1
- package/icons/minus/index.esm.mjs +0 -36
- package/icons/pencil/index.esm.min.mjs +0 -1
- package/icons/pencil/index.esm.mjs +0 -658
- package/icons/plus/index.esm.min.mjs +0 -1
- package/icons/plus/index.esm.mjs +0 -658
- package/icons/refresh/index.esm.min.mjs +0 -1
- package/icons/refresh/index.esm.mjs +0 -660
- package/icons/search/index.esm.min.mjs +0 -1
- package/icons/search/index.esm.mjs +0 -660
- package/icons/searchminus/index.esm.min.mjs +0 -1
- package/icons/searchminus/index.esm.mjs +0 -660
- package/icons/searchplus/index.esm.min.mjs +0 -1
- package/icons/searchplus/index.esm.mjs +0 -660
- package/icons/sortalt/index.esm.min.mjs +0 -1
- package/icons/sortalt/index.esm.mjs +0 -667
- package/icons/sortamountdown/index.esm.min.mjs +0 -1
- package/icons/sortamountdown/index.esm.mjs +0 -673
- package/icons/sortamountupalt/index.esm.min.mjs +0 -1
- package/icons/sortamountupalt/index.esm.mjs +0 -673
- package/icons/spinner/index.esm.min.mjs +0 -1
- package/icons/spinner/index.esm.mjs +0 -658
- package/icons/star/index.esm.min.mjs +0 -1
- package/icons/star/index.esm.mjs +0 -658
- package/icons/starfill/index.esm.min.mjs +0 -1
- package/icons/starfill/index.esm.mjs +0 -658
- package/icons/thlarge/index.esm.min.mjs +0 -1
- package/icons/thlarge/index.esm.mjs +0 -660
- package/icons/times/index.esm.min.mjs +0 -1
- package/icons/times/index.esm.mjs +0 -36
- package/icons/timescircle/index.esm.min.mjs +0 -1
- package/icons/timescircle/index.esm.mjs +0 -660
- package/icons/trash/index.esm.min.mjs +0 -1
- package/icons/trash/index.esm.mjs +0 -660
- package/icons/undo/index.esm.min.mjs +0 -1
- package/icons/undo/index.esm.mjs +0 -660
- package/icons/upload/index.esm.min.mjs +0 -1
- package/icons/upload/index.esm.mjs +0 -660
- package/icons/windowmaximize/index.esm.min.mjs +0 -1
- package/icons/windowmaximize/index.esm.mjs +0 -660
- package/icons/windowminimize/index.esm.min.mjs +0 -1
- package/icons/windowminimize/index.esm.mjs +0 -660
- package/image/image.esm.min.mjs +0 -1
- package/image/image.esm.mjs +0 -1163
- package/inplace/inplace.esm.min.mjs +0 -1
- package/inplace/inplace.esm.mjs +0 -242
- package/inputmask/inputmask.esm.min.mjs +0 -1
- package/inputmask/inputmask.esm.mjs +0 -559
- package/inputnumber/inputnumber.esm.min.mjs +0 -1
- package/inputnumber/inputnumber.esm.mjs +0 -1208
- package/inputswitch/inputswitch.esm.min.mjs +0 -1
- package/inputswitch/inputswitch.esm.mjs +0 -290
- package/inputtext/inputtext.esm.min.mjs +0 -1
- package/inputtext/inputtext.esm.mjs +0 -170
- package/inputtextarea/inputtextarea.esm.min.mjs +0 -1
- package/inputtextarea/inputtextarea.esm.mjs +0 -219
- package/keyfilter/keyfilter.esm.min.mjs +0 -1
- package/keyfilter/keyfilter.esm.mjs +0 -107
- package/knob/knob.esm.min.mjs +0 -1
- package/knob/knob.esm.mjs +0 -317
- package/listbox/listbox.esm.min.mjs +0 -1
- package/listbox/listbox.esm.mjs +0 -809
- package/megamenu/megamenu.esm.min.mjs +0 -1
- package/megamenu/megamenu.esm.mjs +0 -715
- package/mention/mention.esm.min.mjs +0 -1
- package/mention/mention.esm.mjs +0 -770
- package/menu/menu.esm.min.mjs +0 -1
- package/menu/menu.esm.mjs +0 -484
- package/menubar/menubar.esm.min.mjs +0 -1
- package/menubar/menubar.esm.mjs +0 -583
- package/message/message.esm.min.mjs +0 -1
- package/message/message.esm.mjs +0 -168
- package/messages/messages.esm.min.mjs +0 -1
- package/messages/messages.esm.mjs +0 -438
- package/multiselect/multiselect.esm.min.mjs +0 -1
- package/multiselect/multiselect.esm.mjs +0 -1723
- package/multistatecheckbox/multistatecheckbox.esm.min.mjs +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.mjs +0 -351
- package/orderlist/orderlist.esm.min.mjs +0 -1
- package/orderlist/orderlist.esm.mjs +0 -820
- package/organizationchart/organizationchart.esm.min.mjs +0 -1
- package/organizationchart/organizationchart.esm.mjs +0 -479
- package/overlaypanel/overlaypanel.esm.min.mjs +0 -1
- package/overlaypanel/overlaypanel.esm.mjs +0 -515
- package/overlayservice/overlayservice.esm.min.mjs +0 -1
- package/overlayservice/overlayservice.esm.mjs +0 -6
- package/paginator/paginator.esm.min.mjs +0 -1
- package/paginator/paginator.esm.mjs +0 -932
- package/panel/panel.esm.min.mjs +0 -1
- package/panel/panel.esm.mjs +0 -315
- package/panelmenu/panelmenu.esm.min.mjs +0 -1
- package/panelmenu/panelmenu.esm.mjs +0 -644
- package/passthrough/index.esm.min.mjs +0 -1
- package/passthrough/index.esm.mjs +0 -70
- package/passthrough/tailwind/index.esm.min.mjs +0 -1
- package/passthrough/tailwind/index.esm.mjs +0 -3513
- package/password/password.esm.min.mjs +0 -1
- package/password/password.esm.mjs +0 -566
- package/picklist/picklist.esm.min.mjs +0 -1
- package/picklist/picklist.esm.mjs +0 -1118
- package/portal/portal.esm.min.mjs +0 -1
- package/portal/portal.esm.mjs +0 -109
- package/primereact.all.esm.min.mjs +0 -1
- package/primereact.all.esm.mjs +0 -51669
- package/progressbar/progressbar.esm.min.mjs +0 -1
- package/progressbar/progressbar.esm.mjs +0 -189
- package/progressspinner/progressspinner.esm.min.mjs +0 -1
- package/progressspinner/progressspinner.esm.mjs +0 -87
- package/radiobutton/radiobutton.esm.min.mjs +0 -1
- package/radiobutton/radiobutton.esm.mjs +0 -328
- package/rating/rating.esm.min.mjs +0 -1
- package/rating/rating.esm.mjs +0 -272
- package/ripple/ripple.esm.min.mjs +0 -1
- package/ripple/ripple.esm.mjs +0 -99
- package/row/row.esm.min.mjs +0 -1
- package/row/row.esm.mjs +0 -35
- package/scrollpanel/scrollpanel.esm.min.mjs +0 -1
- package/scrollpanel/scrollpanel.esm.mjs +0 -209
- package/scrolltop/scrolltop.esm.min.mjs +0 -1
- package/scrolltop/scrolltop.esm.mjs +0 -268
- package/selectbutton/selectbutton.esm.min.mjs +0 -1
- package/selectbutton/selectbutton.esm.mjs +0 -326
- package/sidebar/sidebar.esm.min.mjs +0 -1
- package/sidebar/sidebar.esm.mjs +0 -544
- package/skeleton/skeleton.esm.min.mjs +0 -1
- package/skeleton/skeleton.esm.mjs +0 -124
- package/slidemenu/slidemenu.esm.min.mjs +0 -1
- package/slidemenu/slidemenu.esm.mjs +0 -688
- package/slider/slider.esm.min.mjs +0 -1
- package/slider/slider.esm.mjs +0 -477
- package/speeddial/speeddial.esm.min.mjs +0 -1
- package/speeddial/speeddial.esm.mjs +0 -520
- package/splitbutton/splitbutton.esm.min.mjs +0 -1
- package/splitbutton/splitbutton.esm.mjs +0 -544
- package/splitter/splitter.esm.min.mjs +0 -1
- package/splitter/splitter.esm.mjs +0 -465
- package/steps/steps.esm.min.mjs +0 -1
- package/steps/steps.esm.mjs +0 -293
- package/styleclass/styleclass.esm.min.mjs +0 -1
- package/styleclass/styleclass.esm.mjs +0 -268
- package/tabmenu/tabmenu.esm.min.mjs +0 -1
- package/tabmenu/tabmenu.esm.mjs +0 -331
- package/tabview/tabview.esm.min.mjs +0 -1
- package/tabview/tabview.esm.mjs +0 -677
- package/tag/tag.esm.min.mjs +0 -1
- package/tag/tag.esm.mjs +0 -116
- package/terminal/terminal.esm.min.mjs +0 -1
- package/terminal/terminal.esm.mjs +0 -279
- package/terminalservice/terminalservice.esm.min.mjs +0 -1
- package/terminalservice/terminalservice.esm.mjs +0 -6
- package/tieredmenu/tieredmenu.esm.min.mjs +0 -1
- package/tieredmenu/tieredmenu.esm.mjs +0 -698
- package/timeline/timeline.esm.min.mjs +0 -1
- package/timeline/timeline.esm.mjs +0 -163
- package/toast/toast.esm.min.mjs +0 -1
- package/toast/toast.esm.mjs +0 -738
- package/togglebutton/togglebutton.esm.min.mjs +0 -1
- package/togglebutton/togglebutton.esm.mjs +0 -216
- package/toolbar/toolbar.esm.min.mjs +0 -1
- package/toolbar/toolbar.esm.mjs +0 -78
- package/tooltip/tooltip.esm.min.mjs +0 -1
- package/tooltip/tooltip.esm.mjs +0 -695
- package/tree/tree.esm.min.mjs +0 -1
- package/tree/tree.esm.mjs +0 -1402
- package/treeselect/treeselect.esm.min.mjs +0 -1
- package/treeselect/treeselect.esm.mjs +0 -929
- package/treetable/treetable.esm.min.mjs +0 -1
- package/treetable/treetable.esm.mjs +0 -3093
- package/tristatecheckbox/tristatecheckbox.esm.min.mjs +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.mjs +0 -291
- package/utils/utils.esm.min.mjs +0 -1
- package/utils/utils.esm.mjs +0 -2382
- package/virtualscroller/virtualscroller.esm.min.mjs +0 -1
- package/virtualscroller/virtualscroller.esm.mjs +0 -971
|
@@ -1,800 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import PrimeReact, { PrimeReactContext, ariaLabel } from 'primereact/api';
|
|
4
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
5
|
-
import { usePrevious, useResizeListener, useMountEffect, useUpdateEffect } from 'primereact/hooks';
|
|
6
|
-
import { ChevronDownIcon } from 'primereact/icons/chevrondown';
|
|
7
|
-
import { ChevronLeftIcon } from 'primereact/icons/chevronleft';
|
|
8
|
-
import { ChevronRightIcon } from 'primereact/icons/chevronright';
|
|
9
|
-
import { ChevronUpIcon } from 'primereact/icons/chevronup';
|
|
10
|
-
import { Ripple } from 'primereact/ripple';
|
|
11
|
-
import { classNames, mergeProps, UniqueComponentId, DomHandler, ObjectUtils, IconUtils } from 'primereact/utils';
|
|
12
|
-
|
|
13
|
-
function _typeof(o) {
|
|
14
|
-
"@babel/helpers - typeof";
|
|
15
|
-
|
|
16
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
17
|
-
return typeof o;
|
|
18
|
-
} : function (o) {
|
|
19
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
20
|
-
}, _typeof(o);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function _toPrimitive(input, hint) {
|
|
24
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
25
|
-
var prim = input[Symbol.toPrimitive];
|
|
26
|
-
if (prim !== undefined) {
|
|
27
|
-
var res = prim.call(input, hint || "default");
|
|
28
|
-
if (_typeof(res) !== "object") return res;
|
|
29
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
30
|
-
}
|
|
31
|
-
return (hint === "string" ? String : Number)(input);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _toPropertyKey(arg) {
|
|
35
|
-
var key = _toPrimitive(arg, "string");
|
|
36
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function _defineProperty(obj, key, value) {
|
|
40
|
-
key = _toPropertyKey(key);
|
|
41
|
-
if (key in obj) {
|
|
42
|
-
Object.defineProperty(obj, key, {
|
|
43
|
-
value: value,
|
|
44
|
-
enumerable: true,
|
|
45
|
-
configurable: true,
|
|
46
|
-
writable: true
|
|
47
|
-
});
|
|
48
|
-
} else {
|
|
49
|
-
obj[key] = value;
|
|
50
|
-
}
|
|
51
|
-
return obj;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _extends() {
|
|
55
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
56
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
57
|
-
var source = arguments[i];
|
|
58
|
-
for (var key in source) {
|
|
59
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
60
|
-
target[key] = source[key];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return target;
|
|
65
|
-
};
|
|
66
|
-
return _extends.apply(this, arguments);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function _arrayLikeToArray(arr, len) {
|
|
70
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
71
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
72
|
-
return arr2;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function _arrayWithoutHoles(arr) {
|
|
76
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function _iterableToArray(iter) {
|
|
80
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
84
|
-
if (!o) return;
|
|
85
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
86
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
87
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
88
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
89
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function _nonIterableSpread() {
|
|
93
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function _toConsumableArray(arr) {
|
|
97
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function _arrayWithHoles(arr) {
|
|
101
|
-
if (Array.isArray(arr)) return arr;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _iterableToArrayLimit(r, l) {
|
|
105
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
106
|
-
if (null != t) {
|
|
107
|
-
var e,
|
|
108
|
-
n,
|
|
109
|
-
i,
|
|
110
|
-
u,
|
|
111
|
-
a = [],
|
|
112
|
-
f = !0,
|
|
113
|
-
o = !1;
|
|
114
|
-
try {
|
|
115
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
116
|
-
if (Object(t) !== t) return;
|
|
117
|
-
f = !1;
|
|
118
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
119
|
-
} catch (r) {
|
|
120
|
-
o = !0, n = r;
|
|
121
|
-
} finally {
|
|
122
|
-
try {
|
|
123
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
124
|
-
} finally {
|
|
125
|
-
if (o) throw n;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return a;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function _nonIterableRest() {
|
|
133
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function _slicedToArray(arr, i) {
|
|
137
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
var styles = "\n@layer primereact {\n .p-carousel {\n display: flex;\n flex-direction: column;\n }\n \n .p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n }\n \n .p-carousel-prev,\n .p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-carousel-container {\n display: flex;\n flex-direction: row;\n }\n \n .p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n }\n \n .p-carousel-items-container {\n display: flex;\n flex-direction: row;\n }\n \n .p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n }\n \n .p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n /* Vertical */\n .p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n }\n \n .p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n }\n \n /* Keyboard Support */\n .p-items-hidden .p-carousel-item {\n visibility: hidden;\n }\n \n .p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n }\n}\n";
|
|
141
|
-
var classes = {
|
|
142
|
-
root: function root(_ref) {
|
|
143
|
-
var isVertical = _ref.isVertical;
|
|
144
|
-
return classNames('p-carousel p-component', {
|
|
145
|
-
'p-carousel-vertical': isVertical,
|
|
146
|
-
'p-carousel-horizontal': !isVertical
|
|
147
|
-
});
|
|
148
|
-
},
|
|
149
|
-
container: 'p-carousel-container',
|
|
150
|
-
content: 'p-carousel-content',
|
|
151
|
-
indicators: 'p-carousel-indicators p-reset',
|
|
152
|
-
header: 'p-carousel-header',
|
|
153
|
-
footer: 'p-carousel-footer',
|
|
154
|
-
itemsContainer: 'p-carousel-items-container',
|
|
155
|
-
itemsContent: 'p-carousel-items-content',
|
|
156
|
-
previousButton: function previousButton(_ref2) {
|
|
157
|
-
var isDisabled = _ref2.isDisabled;
|
|
158
|
-
return classNames('p-carousel-prev p-link', {
|
|
159
|
-
'p-disabled': isDisabled
|
|
160
|
-
});
|
|
161
|
-
},
|
|
162
|
-
previousButtonIcon: 'p-carousel-prev-icon',
|
|
163
|
-
nextButton: function nextButton(_ref3) {
|
|
164
|
-
var isDisabled = _ref3.isDisabled;
|
|
165
|
-
return classNames('p-carousel-next p-link', {
|
|
166
|
-
'p-disabled': isDisabled
|
|
167
|
-
});
|
|
168
|
-
},
|
|
169
|
-
nextButtonIcon: 'p-carousel-next-icon',
|
|
170
|
-
indicator: function indicator(_ref4) {
|
|
171
|
-
var isActive = _ref4.isActive;
|
|
172
|
-
return classNames('p-carousel-indicator', {
|
|
173
|
-
'p-highlight': isActive
|
|
174
|
-
});
|
|
175
|
-
},
|
|
176
|
-
indicatorButton: 'p-link',
|
|
177
|
-
itemCloned: function itemCloned(_ref5) {
|
|
178
|
-
var props = _ref5.itemProps;
|
|
179
|
-
return classNames(props.className, 'p-carousel-item', {
|
|
180
|
-
'p-carousel-item-active': props.active,
|
|
181
|
-
'p-carousel-item-start': props.start,
|
|
182
|
-
'p-carousel-item-end': props.end
|
|
183
|
-
});
|
|
184
|
-
},
|
|
185
|
-
item: function item(_ref6) {
|
|
186
|
-
var props = _ref6.itemProps;
|
|
187
|
-
return classNames(props.className, 'p-carousel-item', {
|
|
188
|
-
'p-carousel-item-active': props.active,
|
|
189
|
-
'p-carousel-item-start': props.start,
|
|
190
|
-
'p-carousel-item-end': props.end
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
var inlineStyles = {
|
|
195
|
-
itemsContent: function itemsContent(_ref7) {
|
|
196
|
-
var height = _ref7.height;
|
|
197
|
-
return {
|
|
198
|
-
height: height
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
var CarouselBase = ComponentBase.extend({
|
|
203
|
-
defaultProps: {
|
|
204
|
-
__TYPE: 'Carousel',
|
|
205
|
-
id: null,
|
|
206
|
-
value: null,
|
|
207
|
-
page: 0,
|
|
208
|
-
header: null,
|
|
209
|
-
footer: null,
|
|
210
|
-
style: null,
|
|
211
|
-
className: null,
|
|
212
|
-
itemTemplate: null,
|
|
213
|
-
circular: false,
|
|
214
|
-
showIndicators: true,
|
|
215
|
-
showNavigators: true,
|
|
216
|
-
autoplayInterval: 0,
|
|
217
|
-
numVisible: 1,
|
|
218
|
-
numScroll: 1,
|
|
219
|
-
prevIcon: null,
|
|
220
|
-
nextIcon: null,
|
|
221
|
-
responsiveOptions: null,
|
|
222
|
-
orientation: 'horizontal',
|
|
223
|
-
verticalViewPortHeight: '300px',
|
|
224
|
-
contentClassName: null,
|
|
225
|
-
containerClassName: null,
|
|
226
|
-
indicatorsContentClassName: null,
|
|
227
|
-
onPageChange: null,
|
|
228
|
-
children: undefined
|
|
229
|
-
},
|
|
230
|
-
css: {
|
|
231
|
-
classes: classes,
|
|
232
|
-
styles: styles,
|
|
233
|
-
inlineStyles: inlineStyles
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
238
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
239
|
-
var CarouselItem = /*#__PURE__*/React.memo(function (props) {
|
|
240
|
-
var ptm = props.ptm,
|
|
241
|
-
cx = props.cx;
|
|
242
|
-
var key = props.className && props.className === 'p-carousel-item-cloned' ? 'itemCloned' : 'item';
|
|
243
|
-
var content = props.template(props.item);
|
|
244
|
-
var itemClonedProps = mergeProps({
|
|
245
|
-
className: cx(key, {
|
|
246
|
-
itemProps: props
|
|
247
|
-
}),
|
|
248
|
-
'data-p-carousel-item-active': props.active,
|
|
249
|
-
'data-p-carousel-item-start': props.start,
|
|
250
|
-
'data-p-carousel-item-end': props.end
|
|
251
|
-
}, ptm(key));
|
|
252
|
-
return /*#__PURE__*/React.createElement("div", itemClonedProps, content);
|
|
253
|
-
});
|
|
254
|
-
var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
255
|
-
var context = React.useContext(PrimeReactContext);
|
|
256
|
-
var props = CarouselBase.getProps(inProps, context);
|
|
257
|
-
var _React$useState = React.useState(props.numVisible),
|
|
258
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
259
|
-
numVisibleState = _React$useState2[0],
|
|
260
|
-
setNumVisibleState = _React$useState2[1];
|
|
261
|
-
var _React$useState3 = React.useState(props.numScroll),
|
|
262
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
263
|
-
numScrollState = _React$useState4[0],
|
|
264
|
-
setNumScrollState = _React$useState4[1];
|
|
265
|
-
var _React$useState5 = React.useState(props.page * props.numScroll * -1),
|
|
266
|
-
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
267
|
-
totalShiftedItemsState = _React$useState6[0],
|
|
268
|
-
setTotalShiftedItemsState = _React$useState6[1];
|
|
269
|
-
var _React$useState7 = React.useState(props.page),
|
|
270
|
-
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
271
|
-
pageState = _React$useState8[0],
|
|
272
|
-
setPageState = _React$useState8[1];
|
|
273
|
-
var _CarouselBase$setMeta = CarouselBase.setMetaData({
|
|
274
|
-
props: props,
|
|
275
|
-
state: {
|
|
276
|
-
numVisible: numVisibleState,
|
|
277
|
-
numScroll: numScrollState,
|
|
278
|
-
totalShiftedItems: totalShiftedItemsState,
|
|
279
|
-
page: pageState
|
|
280
|
-
}
|
|
281
|
-
}),
|
|
282
|
-
ptm = _CarouselBase$setMeta.ptm,
|
|
283
|
-
cx = _CarouselBase$setMeta.cx,
|
|
284
|
-
sx = _CarouselBase$setMeta.sx,
|
|
285
|
-
isUnstyled = _CarouselBase$setMeta.isUnstyled;
|
|
286
|
-
useHandleStyle(CarouselBase.css.styles, isUnstyled, {
|
|
287
|
-
name: 'carousel'
|
|
288
|
-
});
|
|
289
|
-
var elementRef = React.useRef(null);
|
|
290
|
-
var itemsContainerRef = React.useRef(null);
|
|
291
|
-
var remainingItems = React.useRef(0);
|
|
292
|
-
var allowAutoplay = React.useRef(!!props.autoplayInterval);
|
|
293
|
-
var attributeSelector = React.useRef('');
|
|
294
|
-
var swipeThreshold = React.useRef(20);
|
|
295
|
-
var startPos = React.useRef(null);
|
|
296
|
-
var interval = React.useRef(null);
|
|
297
|
-
var carouselStyle = React.useRef(null);
|
|
298
|
-
var isRemainingItemsAdded = React.useRef(false);
|
|
299
|
-
var responsiveOptions = React.useRef(null);
|
|
300
|
-
var prevNumScroll = usePrevious(numScrollState);
|
|
301
|
-
var prevNumVisible = usePrevious(numVisibleState);
|
|
302
|
-
var prevValue = usePrevious(props.value);
|
|
303
|
-
var prevPage = usePrevious(props.page);
|
|
304
|
-
var isVertical = props.orientation === 'vertical';
|
|
305
|
-
var circular = props.circular || !!props.autoplayInterval;
|
|
306
|
-
var isCircular = circular && props.value && props.value.length >= numVisibleState;
|
|
307
|
-
var totalIndicators = props.value ? Math.max(Math.ceil((props.value.length - numVisibleState) / numScrollState) + 1, 0) : 0;
|
|
308
|
-
var isAutoplay = totalIndicators && props.autoplayInterval && allowAutoplay.current;
|
|
309
|
-
var isControlled = props.onPageChange && !isAutoplay;
|
|
310
|
-
var currentPage = isControlled ? props.page : pageState;
|
|
311
|
-
var _useResizeListener = useResizeListener({
|
|
312
|
-
listener: function listener() {
|
|
313
|
-
calculatePosition();
|
|
314
|
-
},
|
|
315
|
-
when: props.responsiveOptions
|
|
316
|
-
}),
|
|
317
|
-
_useResizeListener2 = _slicedToArray(_useResizeListener, 1),
|
|
318
|
-
bindWindowResizeListener = _useResizeListener2[0];
|
|
319
|
-
var step = function step(dir, page) {
|
|
320
|
-
var totalShiftedItems = totalShiftedItemsState;
|
|
321
|
-
if (page != null) {
|
|
322
|
-
totalShiftedItems = numScrollState * page * -1;
|
|
323
|
-
if (isCircular) {
|
|
324
|
-
totalShiftedItems -= numVisibleState;
|
|
325
|
-
}
|
|
326
|
-
isRemainingItemsAdded.current = false;
|
|
327
|
-
} else {
|
|
328
|
-
totalShiftedItems += numScrollState * dir;
|
|
329
|
-
if (isRemainingItemsAdded.current) {
|
|
330
|
-
totalShiftedItems += remainingItems.current - numScrollState * dir;
|
|
331
|
-
isRemainingItemsAdded.current = false;
|
|
332
|
-
}
|
|
333
|
-
var originalShiftedItems = isCircular ? totalShiftedItems + numVisibleState : totalShiftedItems;
|
|
334
|
-
page = Math.abs(Math.floor(originalShiftedItems / numScrollState));
|
|
335
|
-
}
|
|
336
|
-
if (isCircular && pageState === totalIndicators - 1 && dir === -1) {
|
|
337
|
-
totalShiftedItems = -1 * (props.value.length + numVisibleState);
|
|
338
|
-
page = 0;
|
|
339
|
-
} else if (isCircular && pageState === 0 && dir === 1) {
|
|
340
|
-
totalShiftedItems = 0;
|
|
341
|
-
page = totalIndicators - 1;
|
|
342
|
-
} else if (page === totalIndicators - 1 && remainingItems.current > 0) {
|
|
343
|
-
totalShiftedItems += remainingItems.current * -1 - numScrollState * dir;
|
|
344
|
-
isRemainingItemsAdded.current = true;
|
|
345
|
-
}
|
|
346
|
-
if (itemsContainerRef.current) {
|
|
347
|
-
!isUnstyled() && DomHandler.removeClass(itemsContainerRef.current, 'p-items-hidden');
|
|
348
|
-
changePosition(totalShiftedItems);
|
|
349
|
-
itemsContainerRef.current.style.transition = 'transform 500ms ease 0s';
|
|
350
|
-
}
|
|
351
|
-
changePage(page);
|
|
352
|
-
setTotalShiftedItemsState(totalShiftedItems);
|
|
353
|
-
};
|
|
354
|
-
var calculatePosition = function calculatePosition() {
|
|
355
|
-
if (itemsContainerRef.current && responsiveOptions.current) {
|
|
356
|
-
var windowWidth = window.innerWidth;
|
|
357
|
-
var matchedResponsiveData = {
|
|
358
|
-
numVisible: props.numVisible,
|
|
359
|
-
numScroll: props.numScroll
|
|
360
|
-
};
|
|
361
|
-
for (var i = 0; i < responsiveOptions.current.length; i++) {
|
|
362
|
-
var res = responsiveOptions.current[i];
|
|
363
|
-
if (parseInt(res.breakpoint, 10) >= windowWidth) {
|
|
364
|
-
matchedResponsiveData = res;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
if (numScrollState !== matchedResponsiveData.numScroll) {
|
|
368
|
-
var page = Math.floor(currentPage * numScrollState / matchedResponsiveData.numScroll);
|
|
369
|
-
var totalShiftedItems = matchedResponsiveData.numScroll * page * -1;
|
|
370
|
-
if (isCircular) {
|
|
371
|
-
totalShiftedItems -= matchedResponsiveData.numVisible;
|
|
372
|
-
}
|
|
373
|
-
setTotalShiftedItemsState(totalShiftedItems);
|
|
374
|
-
setNumScrollState(matchedResponsiveData.numScroll);
|
|
375
|
-
changePage(page);
|
|
376
|
-
}
|
|
377
|
-
if (numVisibleState !== matchedResponsiveData.numVisible) {
|
|
378
|
-
setNumVisibleState(matchedResponsiveData.numVisible);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
var navBackward = function navBackward(e, page) {
|
|
383
|
-
if (circular || currentPage !== 0) {
|
|
384
|
-
step(1, page);
|
|
385
|
-
}
|
|
386
|
-
allowAutoplay.current = false;
|
|
387
|
-
if (e.cancelable) {
|
|
388
|
-
e.preventDefault();
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
var navForward = function navForward(e, page) {
|
|
392
|
-
if (circular || currentPage < totalIndicators - 1) {
|
|
393
|
-
step(-1, page);
|
|
394
|
-
}
|
|
395
|
-
allowAutoplay.current = false;
|
|
396
|
-
if (e.cancelable) {
|
|
397
|
-
e.preventDefault();
|
|
398
|
-
}
|
|
399
|
-
};
|
|
400
|
-
var onDotClick = function onDotClick(e, page) {
|
|
401
|
-
if (page > currentPage) {
|
|
402
|
-
navForward(e, page);
|
|
403
|
-
} else if (page < currentPage) {
|
|
404
|
-
navBackward(e, page);
|
|
405
|
-
}
|
|
406
|
-
};
|
|
407
|
-
var onTransitionEnd = function onTransitionEnd(e) {
|
|
408
|
-
if (itemsContainerRef.current && e.propertyName === 'transform') {
|
|
409
|
-
DomHandler.addClass(itemsContainerRef.current, 'p-items-hidden');
|
|
410
|
-
itemsContainerRef.current.style.transition = '';
|
|
411
|
-
if ((pageState === 0 || pageState === totalIndicators - 1) && isCircular) {
|
|
412
|
-
changePosition(totalShiftedItemsState);
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
var _onTouchStart = function onTouchStart(e) {
|
|
417
|
-
var touchobj = e.changedTouches[0];
|
|
418
|
-
startPos.current = {
|
|
419
|
-
x: touchobj.pageX,
|
|
420
|
-
y: touchobj.pageY
|
|
421
|
-
};
|
|
422
|
-
};
|
|
423
|
-
var _onTouchMove = function onTouchMove(e) {
|
|
424
|
-
if (e.cancelable) {
|
|
425
|
-
e.preventDefault();
|
|
426
|
-
}
|
|
427
|
-
};
|
|
428
|
-
var _onTouchEnd = function onTouchEnd(e) {
|
|
429
|
-
var touchobj = e.changedTouches[0];
|
|
430
|
-
if (isVertical) {
|
|
431
|
-
changePageOnTouch(e, touchobj.pageY - startPos.current.y);
|
|
432
|
-
} else {
|
|
433
|
-
changePageOnTouch(e, touchobj.pageX - startPos.current.x);
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
var changePageOnTouch = function changePageOnTouch(e, diff) {
|
|
437
|
-
if (Math.abs(diff) > swipeThreshold.current) {
|
|
438
|
-
if (diff < 0) {
|
|
439
|
-
// left
|
|
440
|
-
navForward(e);
|
|
441
|
-
} else {
|
|
442
|
-
// right
|
|
443
|
-
navBackward(e);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
var startAutoplay = function startAutoplay() {
|
|
448
|
-
if (props.autoplayInterval > 0) {
|
|
449
|
-
interval.current = setInterval(function () {
|
|
450
|
-
if (pageState === totalIndicators - 1) {
|
|
451
|
-
step(-1, 0);
|
|
452
|
-
} else {
|
|
453
|
-
step(-1, pageState + 1);
|
|
454
|
-
}
|
|
455
|
-
}, props.autoplayInterval);
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
var stopAutoplay = function stopAutoplay() {
|
|
459
|
-
if (interval.current) {
|
|
460
|
-
clearInterval(interval.current);
|
|
461
|
-
}
|
|
462
|
-
};
|
|
463
|
-
var createStyle = function createStyle() {
|
|
464
|
-
if (!carouselStyle.current) {
|
|
465
|
-
carouselStyle.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce);
|
|
466
|
-
}
|
|
467
|
-
var innerHTML = "\n .p-carousel[".concat(attributeSelector.current, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / numVisibleState, "%\n }\n ");
|
|
468
|
-
if (props.responsiveOptions) {
|
|
469
|
-
var comparator = ObjectUtils.localeComparator(context && context.locale || PrimeReact.locale);
|
|
470
|
-
responsiveOptions.current = _toConsumableArray(props.responsiveOptions);
|
|
471
|
-
responsiveOptions.current.sort(function (data1, data2) {
|
|
472
|
-
var value1 = data1.breakpoint;
|
|
473
|
-
var value2 = data2.breakpoint;
|
|
474
|
-
return ObjectUtils.sort(value1, value2, -1, comparator, context && context.nullSortOrder || PrimeReact.nullSortOrder);
|
|
475
|
-
});
|
|
476
|
-
for (var i = 0; i < responsiveOptions.current.length; i++) {
|
|
477
|
-
var res = responsiveOptions.current[i];
|
|
478
|
-
innerHTML += "\n @media screen and (max-width: ".concat(res.breakpoint, ") {\n .p-carousel[").concat(attributeSelector.current, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / res.numVisible, "%\n }\n }\n ");
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
carouselStyle.current.innerHTML = innerHTML;
|
|
482
|
-
};
|
|
483
|
-
var destroyStyle = function destroyStyle() {
|
|
484
|
-
carouselStyle.current = DomHandler.removeInlineStyle(carouselStyle.current);
|
|
485
|
-
};
|
|
486
|
-
var changePosition = function changePosition(totalShiftedItems) {
|
|
487
|
-
if (itemsContainerRef.current) {
|
|
488
|
-
itemsContainerRef.current.style.transform = isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / numVisibleState), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / numVisibleState), "%, 0, 0)");
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
var changePage = function changePage(page) {
|
|
492
|
-
!isControlled && setPageState(page);
|
|
493
|
-
props.onPageChange && props.onPageChange({
|
|
494
|
-
page: page
|
|
495
|
-
});
|
|
496
|
-
};
|
|
497
|
-
React.useImperativeHandle(ref, function () {
|
|
498
|
-
return {
|
|
499
|
-
props: props,
|
|
500
|
-
startAutoplay: startAutoplay,
|
|
501
|
-
stopAutoplay: stopAutoplay,
|
|
502
|
-
getElement: function getElement() {
|
|
503
|
-
return elementRef.current;
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
});
|
|
507
|
-
useMountEffect(function () {
|
|
508
|
-
if (elementRef.current) {
|
|
509
|
-
attributeSelector.current = UniqueComponentId();
|
|
510
|
-
elementRef.current.setAttribute(attributeSelector.current, '');
|
|
511
|
-
}
|
|
512
|
-
if (!carouselStyle.current) {
|
|
513
|
-
calculatePosition();
|
|
514
|
-
changePosition(totalShiftedItemsState);
|
|
515
|
-
bindWindowResizeListener();
|
|
516
|
-
}
|
|
517
|
-
});
|
|
518
|
-
useUpdateEffect(function () {
|
|
519
|
-
var stateChanged = false;
|
|
520
|
-
var totalShiftedItems = totalShiftedItemsState;
|
|
521
|
-
createStyle();
|
|
522
|
-
if (props.autoplayInterval) {
|
|
523
|
-
stopAutoplay();
|
|
524
|
-
}
|
|
525
|
-
if (prevNumScroll !== numScrollState || prevNumVisible !== numVisibleState || props.value && prevValue && prevValue.length !== props.value.length) {
|
|
526
|
-
remainingItems.current = (props.value.length - numVisibleState) % numScrollState;
|
|
527
|
-
var page = currentPage;
|
|
528
|
-
if (totalIndicators !== 0 && page >= totalIndicators) {
|
|
529
|
-
page = totalIndicators - 1;
|
|
530
|
-
changePage(page);
|
|
531
|
-
stateChanged = true;
|
|
532
|
-
}
|
|
533
|
-
totalShiftedItems = page * numScrollState * -1;
|
|
534
|
-
if (isCircular) {
|
|
535
|
-
totalShiftedItems -= numVisibleState;
|
|
536
|
-
}
|
|
537
|
-
if (page === totalIndicators - 1 && remainingItems.current > 0) {
|
|
538
|
-
totalShiftedItems += -1 * remainingItems.current + numScrollState;
|
|
539
|
-
isRemainingItemsAdded.current = true;
|
|
540
|
-
} else {
|
|
541
|
-
isRemainingItemsAdded.current = false;
|
|
542
|
-
}
|
|
543
|
-
if (totalShiftedItems !== totalShiftedItemsState) {
|
|
544
|
-
setTotalShiftedItemsState(totalShiftedItems);
|
|
545
|
-
stateChanged = true;
|
|
546
|
-
}
|
|
547
|
-
changePosition(totalShiftedItems);
|
|
548
|
-
}
|
|
549
|
-
if (isCircular) {
|
|
550
|
-
if (pageState === 0) {
|
|
551
|
-
totalShiftedItems = -1 * numVisibleState;
|
|
552
|
-
} else if (totalShiftedItems === 0) {
|
|
553
|
-
totalShiftedItems = -1 * props.value.length;
|
|
554
|
-
if (remainingItems.current > 0) {
|
|
555
|
-
isRemainingItemsAdded.current = true;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
if (totalShiftedItems !== totalShiftedItemsState) {
|
|
559
|
-
setTotalShiftedItemsState(totalShiftedItems);
|
|
560
|
-
stateChanged = true;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
if (prevPage !== props.page) {
|
|
564
|
-
if (props.page > prevPage && props.page <= totalIndicators - 1) {
|
|
565
|
-
step(-1, props.page);
|
|
566
|
-
} else if (props.page < prevPage) {
|
|
567
|
-
step(1, props.page);
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
if (!stateChanged && isAutoplay) {
|
|
571
|
-
startAutoplay();
|
|
572
|
-
}
|
|
573
|
-
return function () {
|
|
574
|
-
if (props.autoplayInterval) {
|
|
575
|
-
stopAutoplay();
|
|
576
|
-
}
|
|
577
|
-
destroyStyle();
|
|
578
|
-
};
|
|
579
|
-
});
|
|
580
|
-
var createItems = function createItems() {
|
|
581
|
-
if (props.value && props.value.length) {
|
|
582
|
-
var clonedItemsForStarting = null;
|
|
583
|
-
var clonedItemsForFinishing = null;
|
|
584
|
-
if (isCircular) {
|
|
585
|
-
var clonedElements = null;
|
|
586
|
-
clonedElements = props.value.slice(-1 * numVisibleState);
|
|
587
|
-
clonedItemsForStarting = clonedElements.map(function (item, index) {
|
|
588
|
-
var isActive = totalShiftedItemsState * -1 === props.value.length + numVisibleState;
|
|
589
|
-
var start = index === 0;
|
|
590
|
-
var end = index === clonedElements.length - 1;
|
|
591
|
-
var key = index + '_scloned';
|
|
592
|
-
return /*#__PURE__*/React.createElement(CarouselItem, {
|
|
593
|
-
key: key,
|
|
594
|
-
className: "p-carousel-item-cloned",
|
|
595
|
-
template: props.itemTemplate,
|
|
596
|
-
item: item,
|
|
597
|
-
active: isActive,
|
|
598
|
-
start: start,
|
|
599
|
-
end: end,
|
|
600
|
-
ptm: ptm,
|
|
601
|
-
cx: cx
|
|
602
|
-
});
|
|
603
|
-
});
|
|
604
|
-
clonedElements = props.value.slice(0, numVisibleState);
|
|
605
|
-
clonedItemsForFinishing = clonedElements.map(function (item, index) {
|
|
606
|
-
var isActive = totalShiftedItemsState === 0;
|
|
607
|
-
var start = index === 0;
|
|
608
|
-
var end = index === clonedElements.length - 1;
|
|
609
|
-
var key = index + '_fcloned';
|
|
610
|
-
return /*#__PURE__*/React.createElement(CarouselItem, {
|
|
611
|
-
key: key,
|
|
612
|
-
className: "p-carousel-item-cloned",
|
|
613
|
-
template: props.itemTemplate,
|
|
614
|
-
item: item,
|
|
615
|
-
active: isActive,
|
|
616
|
-
start: start,
|
|
617
|
-
end: end,
|
|
618
|
-
ptm: ptm,
|
|
619
|
-
cx: cx
|
|
620
|
-
});
|
|
621
|
-
});
|
|
622
|
-
}
|
|
623
|
-
var items = props.value.map(function (item, index) {
|
|
624
|
-
var firstIndex = isCircular ? -1 * (totalShiftedItemsState + numVisibleState) : totalShiftedItemsState * -1;
|
|
625
|
-
var lastIndex = firstIndex + numVisibleState - 1;
|
|
626
|
-
var isActive = firstIndex <= index && lastIndex >= index;
|
|
627
|
-
var start = firstIndex === index;
|
|
628
|
-
var end = lastIndex === index;
|
|
629
|
-
return /*#__PURE__*/React.createElement(CarouselItem, {
|
|
630
|
-
key: index,
|
|
631
|
-
template: props.itemTemplate,
|
|
632
|
-
item: item,
|
|
633
|
-
active: isActive,
|
|
634
|
-
start: start,
|
|
635
|
-
end: end,
|
|
636
|
-
ptm: ptm,
|
|
637
|
-
cx: cx
|
|
638
|
-
});
|
|
639
|
-
});
|
|
640
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, clonedItemsForStarting, items, clonedItemsForFinishing);
|
|
641
|
-
}
|
|
642
|
-
};
|
|
643
|
-
var createHeader = function createHeader() {
|
|
644
|
-
if (props.header) {
|
|
645
|
-
var headerProps = mergeProps({
|
|
646
|
-
className: cx('header')
|
|
647
|
-
}, ptm('header'));
|
|
648
|
-
return /*#__PURE__*/React.createElement("div", headerProps, props.header);
|
|
649
|
-
}
|
|
650
|
-
return null;
|
|
651
|
-
};
|
|
652
|
-
var createFooter = function createFooter() {
|
|
653
|
-
if (props.footer) {
|
|
654
|
-
var footerProps = mergeProps({
|
|
655
|
-
className: cx('footer')
|
|
656
|
-
}, ptm('footer'));
|
|
657
|
-
return /*#__PURE__*/React.createElement("div", footerProps, props.footer);
|
|
658
|
-
}
|
|
659
|
-
return null;
|
|
660
|
-
};
|
|
661
|
-
var createContent = function createContent() {
|
|
662
|
-
var items = createItems();
|
|
663
|
-
var height = isVertical ? props.verticalViewPortHeight : 'auto';
|
|
664
|
-
var backwardNavigator = createBackwardNavigator();
|
|
665
|
-
var forwardNavigator = createForwardNavigator();
|
|
666
|
-
var itemsContentProps = mergeProps({
|
|
667
|
-
className: cx('itemsContent'),
|
|
668
|
-
style: sx('itemsContent', {
|
|
669
|
-
height: height
|
|
670
|
-
}),
|
|
671
|
-
onTouchStart: function onTouchStart(e) {
|
|
672
|
-
return _onTouchStart(e);
|
|
673
|
-
},
|
|
674
|
-
onTouchMove: function onTouchMove(e) {
|
|
675
|
-
return _onTouchMove(e);
|
|
676
|
-
},
|
|
677
|
-
onTouchEnd: function onTouchEnd(e) {
|
|
678
|
-
return _onTouchEnd(e);
|
|
679
|
-
}
|
|
680
|
-
}, ptm('itemsContent'));
|
|
681
|
-
var containerProps = mergeProps({
|
|
682
|
-
className: classNames(props.containerClassName, cx('container'))
|
|
683
|
-
}, ptm('container'));
|
|
684
|
-
var itemsContainerProps = mergeProps({
|
|
685
|
-
className: cx('itemsContainer'),
|
|
686
|
-
onTransitionEnd: onTransitionEnd
|
|
687
|
-
}, ptm('itemsContainer'));
|
|
688
|
-
return /*#__PURE__*/React.createElement("div", containerProps, backwardNavigator, /*#__PURE__*/React.createElement("div", itemsContentProps, /*#__PURE__*/React.createElement("div", _extends({
|
|
689
|
-
ref: itemsContainerRef
|
|
690
|
-
}, itemsContainerProps), items)), forwardNavigator);
|
|
691
|
-
};
|
|
692
|
-
var createBackwardNavigator = function createBackwardNavigator() {
|
|
693
|
-
if (props.showNavigators) {
|
|
694
|
-
var isDisabled = (!circular || props.value && props.value.length < numVisibleState) && currentPage === 0;
|
|
695
|
-
var previousButtonIconProps = mergeProps({
|
|
696
|
-
className: cx('previousButtonIcon')
|
|
697
|
-
}, ptm('previousButtonIcon'));
|
|
698
|
-
var icon = isVertical ? props.prevIcon || /*#__PURE__*/React.createElement(ChevronUpIcon, previousButtonIconProps) : props.prevIcon || /*#__PURE__*/React.createElement(ChevronLeftIcon, previousButtonIconProps);
|
|
699
|
-
var backwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, previousButtonIconProps), {
|
|
700
|
-
props: props
|
|
701
|
-
});
|
|
702
|
-
var previousButtonProps = mergeProps({
|
|
703
|
-
type: 'button',
|
|
704
|
-
className: cx('previousButton', {
|
|
705
|
-
isDisabled: isDisabled
|
|
706
|
-
}),
|
|
707
|
-
onClick: function onClick(e) {
|
|
708
|
-
return navBackward(e);
|
|
709
|
-
},
|
|
710
|
-
disabled: isDisabled,
|
|
711
|
-
'aria-label': ariaLabel('previousPageLabel')
|
|
712
|
-
}, ptm('previousButton'));
|
|
713
|
-
return /*#__PURE__*/React.createElement("button", previousButtonProps, backwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
714
|
-
}
|
|
715
|
-
return null;
|
|
716
|
-
};
|
|
717
|
-
var createForwardNavigator = function createForwardNavigator() {
|
|
718
|
-
if (props.showNavigators) {
|
|
719
|
-
var isDisabled = (!circular || props.value && props.value.length < numVisibleState) && (currentPage === totalIndicators - 1 || totalIndicators === 0);
|
|
720
|
-
var nextButtonIconProps = mergeProps({
|
|
721
|
-
className: cx('nextButtonIcon')
|
|
722
|
-
}, ptm('nextButtonIcon'));
|
|
723
|
-
var icon = isVertical ? props.nextIcon || /*#__PURE__*/React.createElement(ChevronDownIcon, nextButtonIconProps) : props.nextIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, nextButtonIconProps);
|
|
724
|
-
var forwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, nextButtonIconProps), {
|
|
725
|
-
props: props
|
|
726
|
-
});
|
|
727
|
-
var nextButtonProps = mergeProps({
|
|
728
|
-
type: 'button',
|
|
729
|
-
className: cx('nextButton', {
|
|
730
|
-
isDisabled: isDisabled
|
|
731
|
-
}),
|
|
732
|
-
onClick: function onClick(e) {
|
|
733
|
-
return navForward(e);
|
|
734
|
-
},
|
|
735
|
-
disabled: isDisabled,
|
|
736
|
-
'aria-label': ariaLabel('nextPageLabel')
|
|
737
|
-
}, ptm('nextButton'));
|
|
738
|
-
return /*#__PURE__*/React.createElement("button", nextButtonProps, forwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
739
|
-
}
|
|
740
|
-
return null;
|
|
741
|
-
};
|
|
742
|
-
var createIndicator = function createIndicator(index) {
|
|
743
|
-
var isActive = currentPage === index;
|
|
744
|
-
var getPTOptions = function getPTOptions(key) {
|
|
745
|
-
return ptm(key, {
|
|
746
|
-
context: {
|
|
747
|
-
active: isActive
|
|
748
|
-
}
|
|
749
|
-
});
|
|
750
|
-
};
|
|
751
|
-
var key = 'carousel-indicator-' + index;
|
|
752
|
-
var indicatorProps = mergeProps({
|
|
753
|
-
key: key,
|
|
754
|
-
className: cx('indicator', {
|
|
755
|
-
isActive: isActive
|
|
756
|
-
}),
|
|
757
|
-
'data-p-highlight': isActive
|
|
758
|
-
}, getPTOptions('indicator'));
|
|
759
|
-
var indicatorButtonProps = mergeProps({
|
|
760
|
-
type: 'button',
|
|
761
|
-
className: cx('indicatorButton'),
|
|
762
|
-
onClick: function onClick(e) {
|
|
763
|
-
return onDotClick(e, index);
|
|
764
|
-
},
|
|
765
|
-
'aria-label': "".concat(ariaLabel('pageLabel'), " ").concat(index + 1)
|
|
766
|
-
}, getPTOptions('indicatorButton'));
|
|
767
|
-
return /*#__PURE__*/React.createElement("li", indicatorProps, /*#__PURE__*/React.createElement("button", indicatorButtonProps, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
768
|
-
};
|
|
769
|
-
var createIndicators = function createIndicators() {
|
|
770
|
-
if (props.showIndicators) {
|
|
771
|
-
var _indicators = [];
|
|
772
|
-
for (var i = 0; i < totalIndicators; i++) {
|
|
773
|
-
_indicators.push(createIndicator(i));
|
|
774
|
-
}
|
|
775
|
-
var indicatorsProps = mergeProps({
|
|
776
|
-
className: classNames(props.indicatorsContentClassName, cx('indicators'))
|
|
777
|
-
}, ptm('indicators'));
|
|
778
|
-
return /*#__PURE__*/React.createElement("ul", indicatorsProps, _indicators);
|
|
779
|
-
}
|
|
780
|
-
return null;
|
|
781
|
-
};
|
|
782
|
-
var content = createContent();
|
|
783
|
-
var indicators = createIndicators();
|
|
784
|
-
var header = createHeader();
|
|
785
|
-
var footer = createFooter();
|
|
786
|
-
var rootProps = mergeProps({
|
|
787
|
-
id: props.id,
|
|
788
|
-
ref: elementRef,
|
|
789
|
-
className: classNames(props.className, cx('root')),
|
|
790
|
-
style: props.style
|
|
791
|
-
}, CarouselBase.getOtherProps(props), ptm('root'));
|
|
792
|
-
var contentProps = mergeProps({
|
|
793
|
-
className: classNames(props.contentClassName, cx('content'))
|
|
794
|
-
}, ptm('content'));
|
|
795
|
-
return /*#__PURE__*/React.createElement("div", rootProps, header, /*#__PURE__*/React.createElement("div", contentProps, content, indicators), footer);
|
|
796
|
-
}));
|
|
797
|
-
CarouselItem.displayName = 'CarouselItem';
|
|
798
|
-
Carousel.displayName = 'Carousel';
|
|
799
|
-
|
|
800
|
-
export { Carousel };
|