naive-ui 2.31.0 → 2.32.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/dist/index.js +3197 -1769
- package/dist/index.prod.js +1 -1
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +5 -0
- package/es/_internal/scrollbar/src/Scrollbar.js +49 -26
- package/es/_internal/scrollbar/src/styles/index.cssr.js +1 -1
- package/es/_internal/scrollbar/src/styles/rtl.cssr.d.ts +2 -0
- package/es/_internal/scrollbar/src/styles/rtl.cssr.js +10 -0
- package/es/_internal/scrollbar/styles/index.d.ts +1 -0
- package/es/_internal/scrollbar/styles/index.js +1 -0
- package/es/_internal/scrollbar/styles/rtl.d.ts +3 -0
- package/es/_internal/scrollbar/styles/rtl.js +6 -0
- package/es/_internal/selection/src/Selection.js +4 -2
- package/es/_internal/selection/src/styles/index.cssr.js +4 -1
- package/es/_mixins/index.d.ts +1 -0
- package/es/_mixins/index.js +1 -0
- package/es/_utils/naive/extract-public-props.d.ts +4 -1
- package/es/auto-complete/src/AutoComplete.d.ts +1 -0
- package/es/avatar/src/Avatar.d.ts +0 -1
- package/es/avatar/src/Avatar.js +12 -10
- package/es/button/src/Button.js +3 -0
- package/es/carousel/src/Carousel.d.ts +16 -37
- package/es/carousel/src/Carousel.js +269 -272
- package/es/carousel/src/CarouselArrow.js +3 -5
- package/es/carousel/src/CarouselContext.d.ts +21 -0
- package/es/carousel/src/CarouselContext.js +11 -0
- package/es/carousel/src/CarouselDots.d.ts +1 -1
- package/es/carousel/src/CarouselDots.js +23 -31
- package/es/carousel/src/CarouselItem.d.ts +4 -4
- package/es/carousel/src/CarouselItem.js +17 -36
- package/es/carousel/src/interface.d.ts +12 -31
- package/es/carousel/src/interface.js +1 -3
- package/es/carousel/src/styles/index.cssr.js +8 -3
- package/es/carousel/src/{utils.d.ts → utils/duplicatedLogic.d.ts} +3 -8
- package/es/carousel/src/utils/duplicatedLogic.js +46 -0
- package/es/carousel/src/utils/event.d.ts +1 -0
- package/es/carousel/src/utils/event.js +3 -0
- package/es/carousel/src/utils/index.d.ts +6 -0
- package/es/carousel/src/{utils.js → utils/index.js} +3 -28
- package/es/checkbox/src/CheckboxGroup.d.ts +27 -22
- package/es/checkbox/src/CheckboxGroup.js +58 -28
- package/es/code/src/Code.d.ts +16 -0
- package/es/code/src/Code.js +53 -12
- package/es/code/src/styles/index.cssr.js +14 -2
- package/es/code/styles/dark.js +4 -2
- package/es/code/styles/light.d.ts +1 -0
- package/es/code/styles/light.js +4 -2
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/ConfigProvider.d.ts +24 -3
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/date-picker/src/DatePicker.d.ts +1 -0
- package/es/date-picker/src/panel/daterange.d.ts +0 -1
- package/es/date-picker/src/panel/daterange.js +1 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +0 -1
- package/es/date-picker/src/panel/datetimerange.js +1 -1
- package/es/date-picker/src/panel/monthrange.d.ts +0 -1
- package/es/date-picker/src/panel/monthrange.js +1 -1
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +0 -1
- package/es/date-picker/src/panel/use-dual-calendar.js +0 -11
- package/es/dialog/src/DialogEnvironment.d.ts +4 -0
- package/es/dialog/src/DialogEnvironment.js +11 -4
- package/es/dialog/src/DialogProvider.d.ts +1 -0
- package/es/dynamic-tags/src/DynamicTags.d.ts +1 -0
- package/es/image/src/utils.d.ts +1 -1
- package/es/input/src/Input.d.ts +1 -0
- package/es/input/src/Input.js +19 -8
- package/es/input/src/interface.d.ts +1 -0
- package/es/input/src/styles/input.cssr.js +1 -6
- package/es/input-number/src/InputNumber.d.ts +1 -0
- package/es/input-number/src/InputNumber.js +4 -0
- package/es/legacy-grid/src/Row.d.ts +1 -0
- package/es/legacy-grid/src/Row.js +8 -3
- package/es/legacy-grid/src/styles/rtl.cssr.d.ts +2 -0
- package/es/legacy-grid/src/styles/rtl.cssr.js +21 -0
- package/es/legacy-grid/styles/dark.d.ts +4 -0
- package/es/legacy-grid/styles/dark.js +6 -0
- package/es/legacy-grid/styles/index.d.ts +4 -0
- package/es/legacy-grid/styles/index.js +3 -0
- package/es/legacy-grid/styles/light.d.ts +4 -0
- package/es/legacy-grid/styles/light.js +6 -0
- package/es/legacy-grid/styles/rtl.d.ts +2 -0
- package/es/legacy-grid/styles/rtl.js +5 -0
- package/es/legacy-transfer/index.d.ts +3 -0
- package/es/legacy-transfer/index.js +1 -0
- package/es/legacy-transfer/src/Transfer.d.ts +3631 -0
- package/es/legacy-transfer/src/Transfer.js +214 -0
- package/es/legacy-transfer/src/TransferFilter.d.ts +509 -0
- package/es/legacy-transfer/src/TransferFilter.js +40 -0
- package/es/legacy-transfer/src/TransferHeader.d.ts +25 -0
- package/es/legacy-transfer/src/TransferHeader.js +47 -0
- package/es/legacy-transfer/src/TransferList.d.ts +556 -0
- package/es/legacy-transfer/src/TransferList.js +93 -0
- package/es/legacy-transfer/src/TransferListItem.d.ts +513 -0
- package/es/legacy-transfer/src/TransferListItem.js +65 -0
- package/es/legacy-transfer/src/interface.d.ts +31 -0
- package/es/legacy-transfer/src/interface.js +2 -0
- package/es/legacy-transfer/src/styles/index.cssr.d.ts +2 -0
- package/es/legacy-transfer/src/styles/index.cssr.js +215 -0
- package/es/legacy-transfer/src/use-transfer-data.d.ts +41 -0
- package/es/legacy-transfer/src/use-transfer-data.js +145 -0
- package/es/legacy-transfer/styles/_common.d.ts +5 -0
- package/es/legacy-transfer/styles/_common.js +4 -0
- package/es/legacy-transfer/styles/dark.d.ts +3 -0
- package/es/legacy-transfer/styles/dark.js +27 -0
- package/es/legacy-transfer/styles/index.d.ts +3 -0
- package/es/legacy-transfer/styles/index.js +2 -0
- package/es/legacy-transfer/styles/light.d.ts +363 -0
- package/es/legacy-transfer/styles/light.js +31 -0
- package/es/locales/common/deDE.js +11 -6
- package/es/locales/common/enGB.js +8 -1
- package/es/locales/common/enUS.d.ts +8 -1
- package/es/locales/common/enUS.js +8 -1
- package/es/locales/common/eo.js +10 -2
- package/es/locales/common/esAR.js +9 -1
- package/es/locales/common/frFR.js +9 -1
- package/es/locales/common/idID.js +9 -1
- package/es/locales/common/itIT.js +9 -1
- package/es/locales/common/jaJP.js +9 -1
- package/es/locales/common/koKR.js +9 -1
- package/es/locales/common/nbNO.js +9 -1
- package/es/locales/common/nlNL.js +9 -1
- package/es/locales/common/plPL.js +9 -1
- package/es/locales/common/ptBR.js +9 -1
- package/es/locales/common/ruRU.js +9 -1
- package/es/locales/common/skSK.js +9 -1
- package/es/locales/common/thTH.js +9 -1
- package/es/locales/common/ukUA.js +9 -1
- package/es/locales/common/viVN.js +9 -1
- package/es/locales/common/zhCN.js +8 -1
- package/es/locales/common/zhTW.js +9 -1
- package/es/log/src/Log.d.ts +10 -0
- package/es/log/styles/light.d.ts +1 -0
- package/es/mention/src/Mention.d.ts +1 -0
- package/es/notification/src/Notification.d.ts +11 -1
- package/es/notification/src/Notification.js +6 -4
- package/es/notification/src/NotificationEnvironment.d.ts +12 -0
- package/es/notification/src/NotificationEnvironment.js +27 -2
- package/es/notification/src/NotificationProvider.d.ts +7 -0
- package/es/notification/src/NotificationProvider.js +4 -2
- package/es/pagination/src/Pagination.d.ts +1 -0
- package/es/progress/src/Circle.js +3 -1
- package/es/select/src/Select.js +3 -0
- package/es/statistic/src/Statistic.d.ts +1 -0
- package/es/statistic/src/Statistic.js +9 -3
- package/es/statistic/src/styles/rtl.cssr.d.ts +2 -0
- package/es/statistic/src/styles/rtl.cssr.js +9 -0
- package/es/statistic/styles/index.d.ts +1 -0
- package/es/statistic/styles/index.js +1 -0
- package/es/statistic/styles/rtl.d.ts +2 -0
- package/es/statistic/styles/rtl.js +5 -0
- package/es/styles.d.ts +6 -3
- package/es/styles.js +6 -3
- package/es/themes/dark.js +4 -0
- package/es/themes/light.js +4 -0
- package/es/thing/src/Thing.js +9 -3
- package/es/thing/src/styles/rtl.cssr.d.ts +2 -0
- package/es/thing/src/styles/rtl.cssr.js +8 -0
- package/es/thing/styles/index.d.ts +1 -0
- package/es/thing/styles/index.js +1 -0
- package/es/thing/styles/rtl.d.ts +2 -0
- package/es/thing/styles/rtl.js +8 -0
- package/es/time-picker/src/TimePicker.d.ts +1 -0
- package/es/transfer/index.d.ts +1 -1
- package/es/transfer/src/Transfer.d.ts +210 -90
- package/es/transfer/src/Transfer.js +67 -106
- package/es/transfer/src/TransferFilter.d.ts +18 -21
- package/es/transfer/src/TransferFilter.js +2 -10
- package/es/transfer/src/TransferHeader.d.ts +10 -12
- package/es/transfer/src/TransferHeader.js +24 -29
- package/es/transfer/src/TransferList.d.ts +20 -29
- package/es/transfer/src/TransferList.js +15 -32
- package/es/transfer/src/TransferListItem.d.ts +32 -19
- package/es/transfer/src/TransferListItem.js +33 -29
- package/es/transfer/src/interface.d.ts +21 -15
- package/es/transfer/src/styles/index.cssr.js +75 -139
- package/es/transfer/src/use-transfer-data.d.ts +13 -31
- package/es/transfer/src/use-transfer-data.js +45 -121
- package/es/transfer/styles/_common.d.ts +11 -2
- package/es/transfer/styles/_common.js +11 -2
- package/es/transfer/styles/dark.js +8 -4
- package/es/transfer/styles/light.d.ts +36 -10
- package/es/transfer/styles/light.js +7 -5
- package/es/tree/src/Tree.d.ts +1 -0
- package/es/tree/src/Tree.js +22 -16
- package/es/tree/src/TreeNode.d.ts +1 -0
- package/es/tree/src/TreeNode.js +5 -3
- package/es/tree/src/styles/rtl.cssr.d.ts +2 -0
- package/es/tree/src/styles/rtl.cssr.js +17 -0
- package/es/tree/styles/index.d.ts +1 -0
- package/es/tree/styles/index.js +1 -0
- package/es/tree/styles/rtl.d.ts +2 -0
- package/es/tree/styles/rtl.js +5 -0
- package/es/upload/src/interface.d.ts +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/watermark/src/Watermark.d.ts +13 -0
- package/es/watermark/src/Watermark.js +35 -14
- package/es/watermark/src/styles/index.cssr.js +13 -0
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +5 -0
- package/lib/_internal/scrollbar/src/Scrollbar.js +47 -24
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +1 -1
- package/lib/_internal/scrollbar/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/_internal/scrollbar/src/styles/rtl.cssr.js +17 -0
- package/lib/_internal/scrollbar/styles/index.d.ts +1 -0
- package/lib/_internal/scrollbar/styles/index.js +3 -1
- package/lib/_internal/scrollbar/styles/rtl.d.ts +3 -0
- package/lib/_internal/scrollbar/styles/rtl.js +12 -0
- package/lib/_internal/selection/src/Selection.js +4 -2
- package/lib/_internal/selection/src/styles/index.cssr.js +4 -1
- package/lib/_mixins/index.d.ts +1 -0
- package/lib/_mixins/index.js +3 -1
- package/lib/_utils/naive/extract-public-props.d.ts +4 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -0
- package/lib/avatar/src/Avatar.d.ts +0 -1
- package/lib/avatar/src/Avatar.js +12 -10
- package/lib/button/src/Button.js +3 -0
- package/lib/carousel/src/Carousel.d.ts +16 -37
- package/lib/carousel/src/Carousel.js +290 -270
- package/lib/carousel/src/CarouselArrow.js +2 -4
- package/lib/carousel/src/CarouselContext.d.ts +21 -0
- package/lib/carousel/src/CarouselContext.js +16 -0
- package/lib/carousel/src/CarouselDots.d.ts +1 -1
- package/lib/carousel/src/CarouselDots.js +22 -30
- package/lib/carousel/src/CarouselItem.d.ts +4 -4
- package/lib/carousel/src/CarouselItem.js +18 -35
- package/lib/carousel/src/interface.d.ts +12 -31
- package/lib/carousel/src/interface.js +0 -5
- package/lib/carousel/src/styles/index.cssr.js +8 -3
- package/lib/carousel/src/{utils.d.ts → utils/duplicatedLogic.d.ts} +3 -8
- package/lib/carousel/src/utils/duplicatedLogic.js +55 -0
- package/lib/carousel/src/utils/event.d.ts +1 -0
- package/lib/carousel/src/utils/event.js +7 -0
- package/lib/carousel/src/utils/index.d.ts +6 -0
- package/lib/carousel/src/utils/index.js +53 -0
- package/lib/checkbox/src/CheckboxGroup.d.ts +27 -22
- package/lib/checkbox/src/CheckboxGroup.js +56 -26
- package/lib/code/src/Code.d.ts +16 -0
- package/lib/code/src/Code.js +53 -12
- package/lib/code/src/styles/index.cssr.js +13 -1
- package/lib/code/styles/dark.js +4 -2
- package/lib/code/styles/light.d.ts +1 -0
- package/lib/code/styles/light.js +4 -2
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +24 -3
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/date-picker/src/DatePicker.d.ts +1 -0
- package/lib/date-picker/src/panel/daterange.d.ts +0 -1
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +0 -1
- package/lib/date-picker/src/panel/datetimerange.js +1 -1
- package/lib/date-picker/src/panel/monthrange.d.ts +0 -1
- package/lib/date-picker/src/panel/monthrange.js +1 -1
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +0 -1
- package/lib/date-picker/src/panel/use-dual-calendar.js +0 -11
- package/lib/dialog/src/DialogEnvironment.d.ts +4 -0
- package/lib/dialog/src/DialogEnvironment.js +11 -4
- package/lib/dialog/src/DialogProvider.d.ts +1 -0
- package/lib/dynamic-tags/src/DynamicTags.d.ts +1 -0
- package/lib/image/src/utils.d.ts +1 -1
- package/lib/input/src/Input.d.ts +1 -0
- package/lib/input/src/Input.js +19 -8
- package/lib/input/src/interface.d.ts +1 -0
- package/lib/input/src/styles/input.cssr.js +1 -6
- package/lib/input-number/src/InputNumber.d.ts +1 -0
- package/lib/input-number/src/InputNumber.js +4 -0
- package/lib/legacy-grid/src/Row.d.ts +1 -0
- package/lib/legacy-grid/src/Row.js +7 -2
- package/lib/legacy-grid/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/legacy-grid/src/styles/rtl.cssr.js +28 -0
- package/lib/legacy-grid/styles/dark.d.ts +4 -0
- package/lib/legacy-grid/styles/dark.js +8 -0
- package/lib/legacy-grid/styles/index.d.ts +4 -0
- package/lib/legacy-grid/styles/index.js +12 -0
- package/lib/legacy-grid/styles/light.d.ts +4 -0
- package/lib/legacy-grid/styles/light.js +8 -0
- package/lib/legacy-grid/styles/rtl.d.ts +2 -0
- package/lib/legacy-grid/styles/rtl.js +11 -0
- package/lib/legacy-transfer/index.d.ts +3 -0
- package/lib/legacy-transfer/index.js +9 -0
- package/lib/legacy-transfer/src/Transfer.d.ts +3631 -0
- package/lib/legacy-transfer/src/Transfer.js +220 -0
- package/lib/legacy-transfer/src/TransferFilter.d.ts +509 -0
- package/lib/legacy-transfer/src/TransferFilter.js +42 -0
- package/lib/legacy-transfer/src/TransferHeader.d.ts +25 -0
- package/lib/legacy-transfer/src/TransferHeader.js +49 -0
- package/lib/legacy-transfer/src/TransferList.d.ts +556 -0
- package/lib/legacy-transfer/src/TransferList.js +98 -0
- package/lib/legacy-transfer/src/TransferListItem.d.ts +513 -0
- package/lib/legacy-transfer/src/TransferListItem.js +67 -0
- package/lib/legacy-transfer/src/interface.d.ts +31 -0
- package/lib/legacy-transfer/src/interface.js +5 -0
- package/lib/legacy-transfer/src/styles/index.cssr.d.ts +2 -0
- package/lib/legacy-transfer/src/styles/index.cssr.js +223 -0
- package/lib/legacy-transfer/src/use-transfer-data.d.ts +41 -0
- package/lib/legacy-transfer/src/use-transfer-data.js +149 -0
- package/lib/legacy-transfer/styles/_common.d.ts +5 -0
- package/lib/legacy-transfer/styles/_common.js +6 -0
- package/lib/legacy-transfer/styles/dark.d.ts +3 -0
- package/lib/legacy-transfer/styles/dark.js +32 -0
- package/lib/legacy-transfer/styles/index.d.ts +3 -0
- package/lib/legacy-transfer/styles/index.js +10 -0
- package/lib/legacy-transfer/styles/light.d.ts +363 -0
- package/lib/legacy-transfer/styles/light.js +36 -0
- package/lib/locales/common/deDE.js +11 -6
- package/lib/locales/common/enGB.js +8 -1
- package/lib/locales/common/enUS.d.ts +8 -1
- package/lib/locales/common/enUS.js +8 -1
- package/lib/locales/common/eo.js +10 -2
- package/lib/locales/common/esAR.js +9 -1
- package/lib/locales/common/frFR.js +9 -1
- package/lib/locales/common/idID.js +9 -1
- package/lib/locales/common/itIT.js +9 -1
- package/lib/locales/common/jaJP.js +9 -1
- package/lib/locales/common/koKR.js +9 -1
- package/lib/locales/common/nbNO.js +9 -1
- package/lib/locales/common/nlNL.js +9 -1
- package/lib/locales/common/plPL.js +9 -1
- package/lib/locales/common/ptBR.js +9 -1
- package/lib/locales/common/ruRU.js +9 -1
- package/lib/locales/common/skSK.js +9 -1
- package/lib/locales/common/thTH.js +9 -1
- package/lib/locales/common/ukUA.js +9 -1
- package/lib/locales/common/viVN.js +9 -1
- package/lib/locales/common/zhCN.js +8 -1
- package/lib/locales/common/zhTW.js +9 -1
- package/lib/log/src/Log.d.ts +10 -0
- package/lib/log/styles/light.d.ts +1 -0
- package/lib/mention/src/Mention.d.ts +1 -0
- package/lib/notification/src/Notification.d.ts +11 -1
- package/lib/notification/src/Notification.js +6 -4
- package/lib/notification/src/NotificationEnvironment.d.ts +12 -0
- package/lib/notification/src/NotificationEnvironment.js +27 -2
- package/lib/notification/src/NotificationProvider.d.ts +7 -0
- package/lib/notification/src/NotificationProvider.js +4 -2
- package/lib/pagination/src/Pagination.d.ts +1 -0
- package/lib/progress/src/Circle.js +3 -1
- package/lib/select/src/Select.js +3 -0
- package/lib/statistic/src/Statistic.d.ts +1 -0
- package/lib/statistic/src/Statistic.js +8 -2
- package/lib/statistic/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/statistic/src/styles/rtl.cssr.js +16 -0
- package/lib/statistic/styles/index.d.ts +1 -0
- package/lib/statistic/styles/index.js +3 -1
- package/lib/statistic/styles/rtl.d.ts +2 -0
- package/lib/statistic/styles/rtl.js +11 -0
- package/lib/styles.d.ts +6 -3
- package/lib/styles.js +151 -142
- package/lib/themes/dark.js +82 -78
- package/lib/themes/light.js +82 -78
- package/lib/thing/src/Thing.js +8 -2
- package/lib/thing/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/thing/src/styles/rtl.cssr.js +15 -0
- package/lib/thing/styles/index.d.ts +1 -0
- package/lib/thing/styles/index.js +3 -1
- package/lib/thing/styles/rtl.d.ts +2 -0
- package/lib/thing/styles/rtl.js +14 -0
- package/lib/time-picker/src/TimePicker.d.ts +1 -0
- package/lib/transfer/index.d.ts +1 -1
- package/lib/transfer/src/Transfer.d.ts +210 -90
- package/lib/transfer/src/Transfer.js +63 -102
- package/lib/transfer/src/TransferFilter.d.ts +18 -21
- package/lib/transfer/src/TransferFilter.js +2 -10
- package/lib/transfer/src/TransferHeader.d.ts +10 -12
- package/lib/transfer/src/TransferHeader.js +23 -28
- package/lib/transfer/src/TransferList.d.ts +20 -29
- package/lib/transfer/src/TransferList.js +14 -31
- package/lib/transfer/src/TransferListItem.d.ts +32 -19
- package/lib/transfer/src/TransferListItem.js +33 -29
- package/lib/transfer/src/interface.d.ts +21 -15
- package/lib/transfer/src/styles/index.cssr.js +74 -139
- package/lib/transfer/src/use-transfer-data.d.ts +13 -31
- package/lib/transfer/src/use-transfer-data.js +44 -120
- package/lib/transfer/styles/_common.d.ts +11 -2
- package/lib/transfer/styles/_common.js +11 -2
- package/lib/transfer/styles/dark.js +8 -4
- package/lib/transfer/styles/light.d.ts +36 -10
- package/lib/transfer/styles/light.js +7 -5
- package/lib/tree/src/Tree.d.ts +1 -0
- package/lib/tree/src/Tree.js +21 -15
- package/lib/tree/src/TreeNode.d.ts +1 -0
- package/lib/tree/src/TreeNode.js +5 -3
- package/lib/tree/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/tree/src/styles/rtl.cssr.js +24 -0
- package/lib/tree/styles/index.d.ts +1 -0
- package/lib/tree/styles/index.js +3 -1
- package/lib/tree/styles/rtl.d.ts +2 -0
- package/lib/tree/styles/rtl.js +11 -0
- package/lib/upload/src/interface.d.ts +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/watermark/src/Watermark.d.ts +13 -0
- package/lib/watermark/src/Watermark.js +34 -13
- package/lib/watermark/src/styles/index.cssr.js +13 -0
- package/package.json +4 -3
- package/volar.d.ts +1 -0
- package/web-types.json +183 -1
- package/lib/carousel/src/utils.js +0 -69
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { h, defineComponent, ref,
|
|
1
|
+
import { h, defineComponent, ref, cloneVNode, computed, onBeforeUnmount, watch, withDirectives, vShow, Transition, toRef, nextTick, onMounted, watchEffect, normalizeStyle, onUpdated } from 'vue';
|
|
2
2
|
import { VResizeObserver } from 'vueuc';
|
|
3
|
+
import { useMergedState } from 'vooks';
|
|
3
4
|
import { on, off } from 'evtd';
|
|
4
5
|
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
5
6
|
import { flatten, keep, resolveSlotWithProps } from '../../_utils';
|
|
6
7
|
import { carouselLight } from '../styles';
|
|
7
|
-
import { calculateSize, getNextIndex, getPrevIndex, getDisplayIndex, getRealIndex,
|
|
8
|
+
import { calculateSize, clampValue, resolveSpeed, isTouchEvent, getNextIndex, getPrevIndex, getDisplayIndex, getRealIndex, getDisplayTotalView, addDuplicateSlides } from './utils';
|
|
9
|
+
import { provideCarouselContext } from './CarouselContext';
|
|
8
10
|
import NCarouselDots from './CarouselDots';
|
|
9
11
|
import NCarouselArrow from './CarouselArrow';
|
|
10
|
-
import NCarouselItem from './CarouselItem';
|
|
11
|
-
import { carouselMethodsInjectionKey, tuple } from './interface';
|
|
12
|
+
import NCarouselItem, { isCarouselItem } from './CarouselItem';
|
|
12
13
|
import style from './styles/index.cssr';
|
|
13
|
-
const transitionProperties =
|
|
14
|
+
const transitionProperties = [
|
|
15
|
+
'transitionDuration',
|
|
16
|
+
'transitionTimingFunction'
|
|
17
|
+
];
|
|
14
18
|
export const carouselProps = Object.assign(Object.assign({}, useTheme.props), { defaultIndex: {
|
|
15
19
|
type: Number,
|
|
16
20
|
default: 0
|
|
@@ -62,67 +66,54 @@ export default defineComponent({
|
|
|
62
66
|
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
63
67
|
// Dom
|
|
64
68
|
const selfElRef = ref(null);
|
|
65
|
-
const
|
|
69
|
+
const slidesElRef = ref(null);
|
|
70
|
+
const slideElsRef = ref([]);
|
|
66
71
|
const slideVNodesRef = { value: [] };
|
|
72
|
+
// Computed states
|
|
73
|
+
const verticalRef = computed(() => props.direction === 'vertical');
|
|
74
|
+
const sizeAxisRef = computed(() => (verticalRef.value ? 'height' : 'width'));
|
|
75
|
+
const spaceAxisRef = computed(() => verticalRef.value ? 'bottom' : 'right');
|
|
76
|
+
const sequenceLayoutRef = computed(() => props.effect === 'slide');
|
|
77
|
+
const duplicatedableRef = computed(
|
|
78
|
+
// duplicate the copy operation in `slide` mode,
|
|
79
|
+
// because only its DOM is sequence layout
|
|
80
|
+
() => props.loop && props.slidesPerView === 1 && sequenceLayoutRef.value);
|
|
67
81
|
// user wants to control the transition animation
|
|
68
82
|
const userWantsControlRef = computed(() => props.effect === 'custom');
|
|
69
|
-
const translateableRef = computed(() => !userWantsControlRef.value && props.effect === 'slide');
|
|
70
|
-
// TODO
|
|
71
|
-
const allowLoopRef = computed(() => props.loop && props.slidesPerView === 1);
|
|
72
|
-
// Because of the nature of the loop slide work,
|
|
73
|
-
// we need to add duplicates to the left and right of the carousel
|
|
74
|
-
// slot [ 0 1 2 ]
|
|
75
|
-
// display 2 0 1 2 0
|
|
76
|
-
// index 0 1 2 3 4
|
|
77
|
-
const duplicatedableRef = computed(
|
|
78
|
-
// only duplicate the copy operation in `slide` mode,
|
|
79
|
-
// because other effects have special process
|
|
80
|
-
() => translateableRef.value && allowLoopRef.value);
|
|
81
83
|
// used to calculate total views
|
|
82
|
-
const displaySlidesPerViewRef = computed(() =>
|
|
83
|
-
props.centeredSlides ||
|
|
84
|
-
props.effect !== 'slide'
|
|
85
|
-
? 1
|
|
86
|
-
: props.slidesPerView);
|
|
84
|
+
const displaySlidesPerViewRef = computed(() => !sequenceLayoutRef.value || props.centeredSlides ? 1 : props.slidesPerView);
|
|
87
85
|
// used to calculate the size of each slide
|
|
88
86
|
const realSlidesPerViewRef = computed(() => userWantsControlRef.value ? 1 : props.slidesPerView);
|
|
89
87
|
// we automatically calculate total view for special slides per view
|
|
90
88
|
const autoSlideSizeRef = computed(() => displaySlidesPerViewRef.value === 'auto' ||
|
|
91
89
|
(props.slidesPerView === 'auto' && props.centeredSlides));
|
|
92
|
-
|
|
93
|
-
? keep(props.transitionStyle, transitionProperties)
|
|
94
|
-
: {});
|
|
95
|
-
const speedRef = computed(() => userWantsControlRef.value
|
|
96
|
-
? 0
|
|
97
|
-
: resolveSpeed(transitionStyleRef.value.transitionDuration));
|
|
98
|
-
const verticalRef = computed(() => props.direction === 'vertical');
|
|
99
|
-
const sizeAxisRef = computed(() => (verticalRef.value ? 'height' : 'width'));
|
|
90
|
+
// Carousel size
|
|
100
91
|
const perViewSizeRef = ref({ width: 0, height: 0 });
|
|
101
92
|
const slideSizesRef = computed(() => {
|
|
102
|
-
const { value: slidesEls } =
|
|
103
|
-
|
|
104
|
-
if (!length)
|
|
93
|
+
const { value: slidesEls } = slideElsRef;
|
|
94
|
+
if (!slidesEls.length)
|
|
105
95
|
return [];
|
|
106
|
-
|
|
96
|
+
const { value: autoSlideSize } = autoSlideSizeRef;
|
|
97
|
+
if (autoSlideSize) {
|
|
107
98
|
return slidesEls.map((slide) => calculateSize(slide));
|
|
108
99
|
}
|
|
109
100
|
const { value: slidesPerView } = realSlidesPerViewRef;
|
|
110
101
|
const { value: perViewSize } = perViewSizeRef;
|
|
111
102
|
const { value: axis } = sizeAxisRef;
|
|
112
|
-
let
|
|
103
|
+
let axisSize = perViewSize[axis];
|
|
113
104
|
if (slidesPerView !== 'auto') {
|
|
114
105
|
const { spaceBetween } = props;
|
|
115
|
-
const remaining =
|
|
106
|
+
const remaining = axisSize - (slidesPerView - 1) * spaceBetween;
|
|
116
107
|
const percentage = 1 / Math.max(1, slidesPerView);
|
|
117
|
-
|
|
108
|
+
axisSize = remaining * percentage;
|
|
118
109
|
}
|
|
119
|
-
|
|
110
|
+
const slideSize = Object.assign(Object.assign({}, perViewSize), { [axis]: axisSize });
|
|
111
|
+
return slidesEls.map(() => slideSize);
|
|
120
112
|
});
|
|
121
113
|
// The translate required to reach each slide
|
|
122
114
|
const slideTranlatesRef = computed(() => {
|
|
123
115
|
const { value: slideSizes } = slideSizesRef;
|
|
124
|
-
|
|
125
|
-
if (!length)
|
|
116
|
+
if (!slideSizes.length)
|
|
126
117
|
return [];
|
|
127
118
|
const { centeredSlides, spaceBetween } = props;
|
|
128
119
|
const { value: axis } = sizeAxisRef;
|
|
@@ -137,48 +128,58 @@ export default defineComponent({
|
|
|
137
128
|
return translate;
|
|
138
129
|
});
|
|
139
130
|
});
|
|
140
|
-
|
|
131
|
+
// Styles
|
|
132
|
+
const isMountedRef = ref(false);
|
|
133
|
+
const transitionStyleRef = computed(() => {
|
|
134
|
+
const { transitionStyle } = props;
|
|
135
|
+
return transitionStyle
|
|
136
|
+
? keep(transitionStyle, transitionProperties)
|
|
137
|
+
: {};
|
|
138
|
+
});
|
|
139
|
+
const speedRef = computed(() => userWantsControlRef.value
|
|
140
|
+
? 0
|
|
141
|
+
: resolveSpeed(transitionStyleRef.value.transitionDuration));
|
|
141
142
|
const slideStylesRef = computed(() => {
|
|
142
|
-
const { value:
|
|
143
|
-
|
|
144
|
-
if (!length)
|
|
143
|
+
const { value: slidesEls } = slideElsRef;
|
|
144
|
+
if (!slidesEls.length)
|
|
145
145
|
return [];
|
|
146
|
-
const
|
|
147
|
-
|
|
146
|
+
const useComputedSize = !(autoSlideSizeRef.value || realSlidesPerViewRef.value === 1);
|
|
147
|
+
const getSlideSize = (index) => {
|
|
148
|
+
if (useComputedSize) {
|
|
149
|
+
const { value: axis } = sizeAxisRef;
|
|
150
|
+
return {
|
|
151
|
+
[axis]: `${slideSizesRef.value[index][axis]}px`
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
};
|
|
148
155
|
if (userWantsControlRef.value) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
156
|
+
// We center each slide when user wants to control the transition animation,
|
|
157
|
+
// so there is no need to calculate the offset
|
|
158
|
+
return slidesEls.map((_, i) => getSlideSize(i));
|
|
152
159
|
}
|
|
153
160
|
const { effect, spaceBetween } = props;
|
|
154
|
-
const { value:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const style = {
|
|
160
|
-
[axis]: `${size}px`,
|
|
161
|
-
[`margin-${spaceAxis}`]: `${spaceBetween}px`
|
|
162
|
-
};
|
|
163
|
-
if (isMounted && (effect === 'fade' || effect === 'card')) {
|
|
161
|
+
const { value: spaceAxis } = spaceAxisRef;
|
|
162
|
+
return slidesEls.reduce((styles, _, i) => {
|
|
163
|
+
const style = Object.assign(Object.assign({}, getSlideSize(i)), { [`margin-${spaceAxis}`]: `${spaceBetween}px` });
|
|
164
|
+
styles.push(style);
|
|
165
|
+
if (isMountedRef.value && (effect === 'fade' || effect === 'card')) {
|
|
164
166
|
Object.assign(style, transitionStyleRef.value);
|
|
165
167
|
}
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
return slideStyles;
|
|
168
|
+
return styles;
|
|
169
|
+
}, []);
|
|
169
170
|
});
|
|
170
171
|
// Total
|
|
171
172
|
const totalViewRef = computed(() => {
|
|
172
173
|
const { value: slidesPerView } = displaySlidesPerViewRef;
|
|
173
|
-
const { length:
|
|
174
|
+
const { length: totalSlides } = slideElsRef.value;
|
|
174
175
|
if (slidesPerView !== 'auto') {
|
|
175
|
-
return
|
|
176
|
+
return Math.max(totalSlides - slidesPerView, 0) + 1;
|
|
176
177
|
}
|
|
177
178
|
else {
|
|
178
179
|
const { value: slideSizes } = slideSizesRef;
|
|
179
180
|
const { length } = slideSizes;
|
|
180
181
|
if (!length)
|
|
181
|
-
return
|
|
182
|
+
return totalSlides;
|
|
182
183
|
const { value: translates } = slideTranlatesRef;
|
|
183
184
|
const { value: axis } = sizeAxisRef;
|
|
184
185
|
const perViewSize = perViewSizeRef.value[axis];
|
|
@@ -188,59 +189,25 @@ export default defineComponent({
|
|
|
188
189
|
i--;
|
|
189
190
|
lastViewSize += translates[i] - translates[i - 1];
|
|
190
191
|
}
|
|
191
|
-
|
|
192
|
-
i++;
|
|
193
|
-
if (i < 1)
|
|
194
|
-
i = 1;
|
|
195
|
-
return i;
|
|
192
|
+
return clampValue(i + 1, 1, length);
|
|
196
193
|
}
|
|
197
194
|
});
|
|
198
|
-
const displayTotalViewRef = computed(() =>
|
|
199
|
-
const { value: totalView } = totalViewRef;
|
|
200
|
-
return duplicatedableRef.value && totalView > 3
|
|
201
|
-
? totalView - 2
|
|
202
|
-
: totalView;
|
|
203
|
-
});
|
|
195
|
+
const displayTotalViewRef = computed(() => getDisplayTotalView(totalViewRef.value, duplicatedableRef.value));
|
|
204
196
|
// Index
|
|
205
|
-
const
|
|
206
|
-
const
|
|
207
|
-
const
|
|
208
|
-
const realIndexRef =
|
|
209
|
-
// record the translate of each slide, so that it can be restored at touch
|
|
210
|
-
let previousTranslate = 0;
|
|
197
|
+
const defaultRealIndex = getRealIndex(props.defaultIndex, duplicatedableRef.value);
|
|
198
|
+
const uncontrolledDisplayIndexRef = ref(getDisplayIndex(defaultRealIndex, totalViewRef.value, duplicatedableRef.value));
|
|
199
|
+
const mergedDisplayIndexRef = useMergedState(toRef(props, 'currentIndex'), uncontrolledDisplayIndexRef);
|
|
200
|
+
const realIndexRef = computed(() => getRealIndex(mergedDisplayIndexRef.value, duplicatedableRef.value));
|
|
211
201
|
// Reality methods
|
|
212
|
-
function toRealIndex(index
|
|
202
|
+
function toRealIndex(index) {
|
|
213
203
|
var _a, _b;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
index = 0;
|
|
222
|
-
}
|
|
223
|
-
else if (lastDisplayIndex === displayTotalViewRef.value - 1 &&
|
|
224
|
-
index === 1) {
|
|
225
|
-
index = length - 1;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
const displayIndex = (displayIndexRef.value = getDisplayIndex(index, totalViewRef.value, duplicatedableRef.value));
|
|
229
|
-
virtualIndexRef.value = index;
|
|
230
|
-
realIndexRef.value = getRealIndex(displayIndex, duplicatedableRef.value);
|
|
231
|
-
if (translateableRef.value) {
|
|
232
|
-
translateTo(index, speed);
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
if (!userWantsControlRef.value && speed > 0) {
|
|
236
|
-
inTransition = true;
|
|
237
|
-
}
|
|
238
|
-
fixTranslate();
|
|
239
|
-
}
|
|
240
|
-
if (displayIndex !== lastDisplayIndex) {
|
|
241
|
-
(_a = props['onUpdate:currentIndex']) === null || _a === void 0 ? void 0 : _a.call(props, displayIndex, lastDisplayIndex);
|
|
242
|
-
(_b = props.onUpdateCurrentIndex) === null || _b === void 0 ? void 0 : _b.call(props, displayIndex, lastDisplayIndex);
|
|
243
|
-
}
|
|
204
|
+
index = clampValue(index, 0, totalViewRef.value - 1);
|
|
205
|
+
const displayIndex = getDisplayIndex(index, totalViewRef.value, duplicatedableRef.value);
|
|
206
|
+
const { value: lastDisplayIndex } = mergedDisplayIndexRef;
|
|
207
|
+
if (displayIndex !== mergedDisplayIndexRef.value) {
|
|
208
|
+
uncontrolledDisplayIndexRef.value = displayIndex;
|
|
209
|
+
(_a = props['onUpdate:currentIndex']) === null || _a === void 0 ? void 0 : _a.call(props, displayIndex, lastDisplayIndex);
|
|
210
|
+
(_b = props.onUpdateCurrentIndex) === null || _b === void 0 ? void 0 : _b.call(props, displayIndex, lastDisplayIndex);
|
|
244
211
|
}
|
|
245
212
|
}
|
|
246
213
|
function getRealPrevIndex(index = realIndexRef.value) {
|
|
@@ -263,7 +230,7 @@ export default defineComponent({
|
|
|
263
230
|
// Display methods
|
|
264
231
|
// They are used to deal with the actual values displayed on the UI
|
|
265
232
|
function isDisplayActive(index) {
|
|
266
|
-
return
|
|
233
|
+
return mergedDisplayIndexRef.value === index;
|
|
267
234
|
}
|
|
268
235
|
function isPrevDisabled() {
|
|
269
236
|
return getRealPrevIndex() === null;
|
|
@@ -271,52 +238,63 @@ export default defineComponent({
|
|
|
271
238
|
function isNextDisabled() {
|
|
272
239
|
return getRealNextIndex() === null;
|
|
273
240
|
}
|
|
274
|
-
//
|
|
241
|
+
// To
|
|
275
242
|
function to(index) {
|
|
276
|
-
const realIndex = getRealIndex(index, duplicatedableRef.value);
|
|
277
|
-
if (index !==
|
|
243
|
+
const realIndex = clampValue(getRealIndex(index, duplicatedableRef.value), 0, totalViewRef.value);
|
|
244
|
+
if (index !== mergedDisplayIndexRef.value ||
|
|
245
|
+
realIndex !== realIndexRef.value) {
|
|
278
246
|
toRealIndex(realIndex);
|
|
279
247
|
}
|
|
280
248
|
}
|
|
281
249
|
function prev() {
|
|
282
250
|
const prevIndex = getRealPrevIndex();
|
|
283
|
-
if (prevIndex !== null)
|
|
251
|
+
if (prevIndex !== null)
|
|
284
252
|
toRealIndex(prevIndex);
|
|
285
|
-
}
|
|
286
253
|
}
|
|
287
254
|
function next() {
|
|
288
255
|
const nextIndex = getRealNextIndex();
|
|
289
|
-
if (nextIndex !== null)
|
|
256
|
+
if (nextIndex !== null)
|
|
290
257
|
toRealIndex(nextIndex);
|
|
291
|
-
|
|
258
|
+
}
|
|
259
|
+
function prevIfSlideTransitionEnd() {
|
|
260
|
+
if (!inTransition || !duplicatedableRef.value)
|
|
261
|
+
prev();
|
|
262
|
+
}
|
|
263
|
+
function nextIfSlideTransitionEnd() {
|
|
264
|
+
if (!inTransition || !duplicatedableRef.value)
|
|
265
|
+
next();
|
|
292
266
|
}
|
|
293
267
|
// Translate to
|
|
294
|
-
const translateStyleRef = ref({});
|
|
295
268
|
let inTransition = false;
|
|
269
|
+
// record the translate of each slide, so that it can be restored at touch
|
|
270
|
+
let previousTranslate = 0;
|
|
271
|
+
const translateStyleRef = ref({});
|
|
296
272
|
function updateTranslate(translate, speed = 0) {
|
|
297
|
-
const isVersical = props.direction === 'vertical';
|
|
298
273
|
translateStyleRef.value = Object.assign({}, transitionStyleRef.value, {
|
|
299
|
-
transform:
|
|
274
|
+
transform: verticalRef.value
|
|
300
275
|
? `translateY(${-translate}px)`
|
|
301
276
|
: `translateX(${-translate}px)`,
|
|
302
277
|
transitionDuration: `${speed}ms`
|
|
303
278
|
});
|
|
304
279
|
}
|
|
305
280
|
function fixTranslate(speed = 0) {
|
|
306
|
-
if (
|
|
281
|
+
if (sequenceLayoutRef.value) {
|
|
307
282
|
translateTo(realIndexRef.value, speed);
|
|
308
283
|
}
|
|
309
284
|
else if (previousTranslate !== 0) {
|
|
285
|
+
if (!inTransition && speed > 0) {
|
|
286
|
+
inTransition = true;
|
|
287
|
+
}
|
|
310
288
|
updateTranslate((previousTranslate = 0), speed);
|
|
311
289
|
}
|
|
312
290
|
}
|
|
313
|
-
function translateTo(index, speed
|
|
291
|
+
function translateTo(index, speed) {
|
|
314
292
|
const translate = getTranslate(index);
|
|
315
293
|
if (translate !== previousTranslate && speed > 0) {
|
|
316
294
|
inTransition = true;
|
|
317
295
|
}
|
|
318
|
-
updateTranslate(translate, speed);
|
|
319
296
|
previousTranslate = getTranslate(realIndexRef.value);
|
|
297
|
+
updateTranslate(translate, speed);
|
|
320
298
|
}
|
|
321
299
|
function getTranslate(index) {
|
|
322
300
|
let translate;
|
|
@@ -352,37 +330,63 @@ export default defineComponent({
|
|
|
352
330
|
}
|
|
353
331
|
}
|
|
354
332
|
// Provide
|
|
333
|
+
const carouselContext = {
|
|
334
|
+
currentIndexRef: mergedDisplayIndexRef,
|
|
335
|
+
to,
|
|
336
|
+
prev: prevIfSlideTransitionEnd,
|
|
337
|
+
next: nextIfSlideTransitionEnd,
|
|
338
|
+
isVertical: () => verticalRef.value,
|
|
339
|
+
isHorizontal: () => !verticalRef.value,
|
|
340
|
+
isPrev: isRealPrev,
|
|
341
|
+
isNext: isRealNext,
|
|
342
|
+
isActive: isRealActive,
|
|
343
|
+
isPrevDisabled,
|
|
344
|
+
isNextDisabled,
|
|
345
|
+
getSlideIndex,
|
|
346
|
+
getSlideStyle,
|
|
347
|
+
addSlide,
|
|
348
|
+
removeSlide,
|
|
349
|
+
onCarouselItemClick
|
|
350
|
+
};
|
|
351
|
+
provideCarouselContext(carouselContext);
|
|
355
352
|
function addSlide(slide) {
|
|
356
353
|
if (!slide)
|
|
357
354
|
return;
|
|
358
|
-
|
|
355
|
+
slideElsRef.value.push(slide);
|
|
359
356
|
}
|
|
360
357
|
function removeSlide(slide) {
|
|
361
358
|
if (!slide)
|
|
362
359
|
return;
|
|
363
360
|
const index = getSlideIndex(slide);
|
|
364
361
|
if (index !== -1) {
|
|
365
|
-
|
|
362
|
+
slideElsRef.value.splice(index, 1);
|
|
366
363
|
}
|
|
367
364
|
}
|
|
368
365
|
function getSlideIndex(slideOrIndex) {
|
|
369
366
|
return typeof slideOrIndex === 'number'
|
|
370
367
|
? slideOrIndex
|
|
371
|
-
:
|
|
368
|
+
: slideOrIndex
|
|
369
|
+
? slideElsRef.value.indexOf(slideOrIndex)
|
|
370
|
+
: -1;
|
|
372
371
|
}
|
|
373
372
|
function getSlideStyle(slide) {
|
|
374
373
|
const index = getSlideIndex(slide);
|
|
375
374
|
if (index !== -1) {
|
|
376
|
-
|
|
375
|
+
const styles = [slideStylesRef.value[index]];
|
|
376
|
+
const isPrev = carouselContext.isPrev(index);
|
|
377
|
+
const isNext = carouselContext.isNext(index);
|
|
378
|
+
if (isPrev) {
|
|
379
|
+
styles.push(props.prevSlideStyle || '');
|
|
380
|
+
}
|
|
381
|
+
if (isNext) {
|
|
382
|
+
styles.push(props.nextSlideStyle || '');
|
|
383
|
+
}
|
|
384
|
+
return normalizeStyle(styles);
|
|
377
385
|
}
|
|
378
386
|
}
|
|
379
387
|
function onCarouselItemClick(index, event) {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
if (props.effect === 'card' &&
|
|
383
|
-
!userWantsControlRef.value &&
|
|
384
|
-
!(dragStatus & 8 /* SUCCESS */) &&
|
|
385
|
-
!isRealActive(index)) {
|
|
388
|
+
let allowClick = !inTransition && !dragging && !isEffectiveDrag;
|
|
389
|
+
if (props.effect === 'card' && allowClick && !isRealActive(index)) {
|
|
386
390
|
to(index);
|
|
387
391
|
allowClick = false;
|
|
388
392
|
}
|
|
@@ -391,54 +395,19 @@ export default defineComponent({
|
|
|
391
395
|
event.stopPropagation();
|
|
392
396
|
}
|
|
393
397
|
}
|
|
394
|
-
const carouselMethods = {
|
|
395
|
-
to,
|
|
396
|
-
prev: () => {
|
|
397
|
-
// wait transition end
|
|
398
|
-
if (!inTransition || !duplicatedableRef.value)
|
|
399
|
-
prev();
|
|
400
|
-
},
|
|
401
|
-
next: () => {
|
|
402
|
-
// wait transition end
|
|
403
|
-
if (!inTransition || !duplicatedableRef.value)
|
|
404
|
-
next();
|
|
405
|
-
},
|
|
406
|
-
isVertical: () => verticalRef.value,
|
|
407
|
-
isHorizontal: () => !verticalRef.value,
|
|
408
|
-
isPrev: isRealPrev,
|
|
409
|
-
isNext: isRealNext,
|
|
410
|
-
isActive: isRealActive,
|
|
411
|
-
isPrevDisabled,
|
|
412
|
-
isNextDisabled,
|
|
413
|
-
getCurrentIndex: () => displayIndexRef.value,
|
|
414
|
-
getSlideIndex,
|
|
415
|
-
getSlideStyle,
|
|
416
|
-
addSlide,
|
|
417
|
-
removeSlide,
|
|
418
|
-
onCarouselItemClick,
|
|
419
|
-
prevSlideStyleRef: toRef(props, 'prevSlideStyle'),
|
|
420
|
-
nextSlideStyleRef: toRef(props, 'nextSlideStyle')
|
|
421
|
-
};
|
|
422
|
-
provide(carouselMethodsInjectionKey, carouselMethods);
|
|
423
398
|
// Autoplay
|
|
424
399
|
let autoplayTimer = null;
|
|
425
|
-
function
|
|
400
|
+
function stopAutoplay() {
|
|
426
401
|
if (autoplayTimer) {
|
|
427
402
|
clearInterval(autoplayTimer);
|
|
428
403
|
autoplayTimer = null;
|
|
429
404
|
}
|
|
430
|
-
const { autoplay, interval } = props;
|
|
431
|
-
if (autoplay && interval && !cleanOnly) {
|
|
432
|
-
autoplayTimer = window.setInterval(next, interval);
|
|
433
|
-
}
|
|
434
405
|
}
|
|
435
|
-
function
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
else if (displayTotalViewRef.value < 2) {
|
|
441
|
-
resetAutoplay(true);
|
|
406
|
+
function resetAutoplay() {
|
|
407
|
+
stopAutoplay();
|
|
408
|
+
const disabled = !props.autoplay || displayTotalViewRef.value < 2;
|
|
409
|
+
if (!disabled) {
|
|
410
|
+
autoplayTimer = window.setInterval(next, props.interval);
|
|
442
411
|
}
|
|
443
412
|
}
|
|
444
413
|
// Drag
|
|
@@ -446,14 +415,19 @@ export default defineComponent({
|
|
|
446
415
|
let dragStartY = 0;
|
|
447
416
|
let dragOffset = 0;
|
|
448
417
|
let dragStartTime = 0;
|
|
449
|
-
let
|
|
418
|
+
let dragging = false;
|
|
419
|
+
let isEffectiveDrag = false;
|
|
450
420
|
function handleTouchstart(event) {
|
|
421
|
+
var _a;
|
|
451
422
|
if (globalDragging)
|
|
452
423
|
return;
|
|
453
|
-
|
|
454
|
-
|
|
424
|
+
if (!((_a = slidesElRef.value) === null || _a === void 0 ? void 0 : _a.contains(event.target)))
|
|
425
|
+
return;
|
|
455
426
|
globalDragging = true;
|
|
456
|
-
|
|
427
|
+
dragging = true;
|
|
428
|
+
isEffectiveDrag = false;
|
|
429
|
+
dragStartTime = Date.now();
|
|
430
|
+
stopAutoplay();
|
|
457
431
|
if (event.type !== 'touchstart' &&
|
|
458
432
|
!event.target.isContentEditable) {
|
|
459
433
|
event.preventDefault();
|
|
@@ -466,7 +440,7 @@ export default defineComponent({
|
|
|
466
440
|
dragStartX = touchEvent.clientX;
|
|
467
441
|
}
|
|
468
442
|
if (props.touchable) {
|
|
469
|
-
on('touchmove', document, handleTouchmove);
|
|
443
|
+
on('touchmove', document, handleTouchmove, { passive: true });
|
|
470
444
|
on('touchend', document, handleTouchend);
|
|
471
445
|
on('touchcancel', document, handleTouchend);
|
|
472
446
|
}
|
|
@@ -477,25 +451,24 @@ export default defineComponent({
|
|
|
477
451
|
}
|
|
478
452
|
function handleTouchmove(event) {
|
|
479
453
|
const { value: vertical } = verticalRef;
|
|
480
|
-
const
|
|
481
|
-
const perViewSize = perViewSizeRef.value[axis];
|
|
454
|
+
const { value: axis } = sizeAxisRef;
|
|
482
455
|
const touchEvent = isTouchEvent(event) ? event.touches[0] : event;
|
|
483
456
|
const offset = vertical
|
|
484
457
|
? touchEvent.clientY - dragStartY
|
|
485
458
|
: touchEvent.clientX - dragStartX;
|
|
459
|
+
const perViewSize = perViewSizeRef.value[axis];
|
|
486
460
|
dragOffset = clampValue(offset, -perViewSize, perViewSize);
|
|
487
|
-
|
|
488
|
-
|
|
461
|
+
if (event.cancelable) {
|
|
462
|
+
event.preventDefault();
|
|
463
|
+
}
|
|
464
|
+
if (sequenceLayoutRef.value) {
|
|
489
465
|
updateTranslate(previousTranslate - dragOffset, 0);
|
|
490
466
|
}
|
|
491
467
|
}
|
|
492
468
|
function handleTouchend() {
|
|
493
|
-
const duration = Date.now() - dragStartTime;
|
|
494
|
-
const { value: axis } = sizeAxisRef;
|
|
495
469
|
const { value: realIndex } = realIndexRef;
|
|
496
|
-
const { value: translateable } = translateableRef;
|
|
497
470
|
let currentIndex = realIndex;
|
|
498
|
-
if (!inTransition &&
|
|
471
|
+
if (!inTransition && dragOffset !== 0 && sequenceLayoutRef.value) {
|
|
499
472
|
const currentTranslate = previousTranslate - dragOffset;
|
|
500
473
|
const translates = [
|
|
501
474
|
...slideTranlatesRef.value.slice(0, totalViewRef.value - 1),
|
|
@@ -512,39 +485,39 @@ export default defineComponent({
|
|
|
512
485
|
}
|
|
513
486
|
}
|
|
514
487
|
if (currentIndex === realIndex) {
|
|
488
|
+
const timeElapsed = Date.now() - dragStartTime;
|
|
489
|
+
const { value: axis } = sizeAxisRef;
|
|
515
490
|
const perViewSize = perViewSizeRef.value[axis];
|
|
516
491
|
// more than 50% width or faster than 0.4px per ms
|
|
517
|
-
if (dragOffset > perViewSize / 2 || dragOffset /
|
|
492
|
+
if (dragOffset > perViewSize / 2 || dragOffset / timeElapsed > 0.4) {
|
|
518
493
|
currentIndex = getRealPrevIndex(realIndex);
|
|
519
494
|
}
|
|
520
495
|
else if (dragOffset < -perViewSize / 2 ||
|
|
521
|
-
dragOffset /
|
|
496
|
+
dragOffset / timeElapsed < -0.4) {
|
|
522
497
|
currentIndex = getRealNextIndex(realIndex);
|
|
523
498
|
}
|
|
524
499
|
}
|
|
525
500
|
if (currentIndex !== null && currentIndex !== realIndex) {
|
|
526
|
-
|
|
501
|
+
isEffectiveDrag = true;
|
|
527
502
|
toRealIndex(currentIndex);
|
|
503
|
+
void nextTick(() => {
|
|
504
|
+
if (!duplicatedableRef.value ||
|
|
505
|
+
uncontrolledDisplayIndexRef.value !== mergedDisplayIndexRef.value) {
|
|
506
|
+
fixTranslate(speedRef.value);
|
|
507
|
+
}
|
|
508
|
+
});
|
|
528
509
|
}
|
|
529
510
|
else {
|
|
530
|
-
if (dragStatus & 4 /* PROGRESS */) {
|
|
531
|
-
dragStatus = 16 /* FAIL */;
|
|
532
|
-
}
|
|
533
|
-
else {
|
|
534
|
-
dragStatus = 32 /* END */;
|
|
535
|
-
}
|
|
536
511
|
fixTranslate(speedRef.value);
|
|
537
512
|
}
|
|
538
|
-
mesureAutoplay();
|
|
539
513
|
resetDragStatus();
|
|
514
|
+
resetAutoplay();
|
|
540
515
|
}
|
|
541
516
|
function resetDragStatus() {
|
|
542
|
-
if (
|
|
517
|
+
if (dragging) {
|
|
543
518
|
globalDragging = false;
|
|
544
|
-
if (dragStatus & (2 /* START */ | 4 /* PROGRESS */)) {
|
|
545
|
-
dragStatus = 1 /* NORMAL */;
|
|
546
|
-
}
|
|
547
519
|
}
|
|
520
|
+
dragging = false;
|
|
548
521
|
dragStartX = 0;
|
|
549
522
|
dragStartY = 0;
|
|
550
523
|
dragOffset = 0;
|
|
@@ -556,15 +529,14 @@ export default defineComponent({
|
|
|
556
529
|
off('mouseup', document, handleTouchend);
|
|
557
530
|
}
|
|
558
531
|
function handleTransitionEnd() {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
if (inTransition && virtualIndex !== realIndex) {
|
|
532
|
+
if (sequenceLayoutRef.value && inTransition) {
|
|
533
|
+
const { value: realIndex } = realIndexRef;
|
|
562
534
|
translateTo(realIndex, 0);
|
|
563
535
|
}
|
|
564
536
|
else {
|
|
565
537
|
resetAutoplay();
|
|
566
538
|
}
|
|
567
|
-
if (
|
|
539
|
+
if (sequenceLayoutRef.value) {
|
|
568
540
|
translateStyleRef.value.transitionDuration = '0ms';
|
|
569
541
|
}
|
|
570
542
|
inTransition = false;
|
|
@@ -573,28 +545,27 @@ export default defineComponent({
|
|
|
573
545
|
event.preventDefault();
|
|
574
546
|
if (inTransition)
|
|
575
547
|
return;
|
|
576
|
-
const { value: vertical } = verticalRef;
|
|
577
548
|
let { deltaX, deltaY } = event;
|
|
578
549
|
if (event.shiftKey && !deltaX) {
|
|
579
550
|
deltaX = deltaY;
|
|
580
551
|
}
|
|
581
|
-
const
|
|
582
|
-
const
|
|
583
|
-
const
|
|
552
|
+
const prevMultiplier = -1;
|
|
553
|
+
const nextMultiplier = 1;
|
|
554
|
+
const m = (deltaX || deltaY) > 0 ? nextMultiplier : prevMultiplier;
|
|
584
555
|
let rx = 0;
|
|
585
556
|
let ry = 0;
|
|
586
|
-
if (
|
|
587
|
-
ry =
|
|
557
|
+
if (verticalRef.value) {
|
|
558
|
+
ry = m;
|
|
588
559
|
}
|
|
589
560
|
else {
|
|
590
|
-
rx =
|
|
561
|
+
rx = m;
|
|
591
562
|
}
|
|
592
|
-
const
|
|
593
|
-
if (ry * deltaY >=
|
|
594
|
-
if (
|
|
563
|
+
const responseStep = 10;
|
|
564
|
+
if (ry * deltaY >= responseStep || rx * deltaX >= responseStep) {
|
|
565
|
+
if (m === nextMultiplier && !isNextDisabled()) {
|
|
595
566
|
next();
|
|
596
567
|
}
|
|
597
|
-
else if (
|
|
568
|
+
else if (m === prevMultiplier && !isPrevDisabled()) {
|
|
598
569
|
prev();
|
|
599
570
|
}
|
|
600
571
|
}
|
|
@@ -610,17 +581,27 @@ export default defineComponent({
|
|
|
610
581
|
slideSizesRef.effect.run();
|
|
611
582
|
}
|
|
612
583
|
}
|
|
584
|
+
function handleMouseenter() {
|
|
585
|
+
if (props.autoplay) {
|
|
586
|
+
stopAutoplay();
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
function handleMouseleave() {
|
|
590
|
+
if (props.autoplay) {
|
|
591
|
+
resetAutoplay();
|
|
592
|
+
}
|
|
593
|
+
}
|
|
613
594
|
onMounted(() => {
|
|
614
|
-
watchEffect(
|
|
615
|
-
|
|
595
|
+
watchEffect(resetAutoplay);
|
|
596
|
+
requestAnimationFrame(() => (isMountedRef.value = true));
|
|
616
597
|
});
|
|
617
598
|
onBeforeUnmount(() => {
|
|
618
599
|
resetDragStatus();
|
|
619
|
-
|
|
600
|
+
stopAutoplay();
|
|
620
601
|
});
|
|
621
602
|
// Fix index when remounting
|
|
622
603
|
onUpdated(() => {
|
|
623
|
-
const { value: slidesEls } =
|
|
604
|
+
const { value: slidesEls } = slideElsRef;
|
|
624
605
|
const { value: slideVNodes } = slideVNodesRef;
|
|
625
606
|
const indexMap = new Map();
|
|
626
607
|
const getDisplayIndex = (el) =>
|
|
@@ -638,12 +619,31 @@ export default defineComponent({
|
|
|
638
619
|
slidesEls.sort((a, b) => getDisplayIndex(a) - getDisplayIndex(b));
|
|
639
620
|
}
|
|
640
621
|
});
|
|
641
|
-
watch(
|
|
642
|
-
|
|
643
|
-
|
|
622
|
+
watch(realIndexRef, (realIndex, lastRealIndex) => {
|
|
623
|
+
if (realIndex === lastRealIndex)
|
|
624
|
+
return;
|
|
625
|
+
resetAutoplay();
|
|
626
|
+
if (sequenceLayoutRef.value) {
|
|
627
|
+
if (duplicatedableRef.value) {
|
|
628
|
+
const { value: length } = totalViewRef;
|
|
629
|
+
if (realIndex === length - 2 && lastRealIndex === 1) {
|
|
630
|
+
realIndex = 0;
|
|
631
|
+
}
|
|
632
|
+
else if (realIndex === 1 && lastRealIndex === length - 2) {
|
|
633
|
+
realIndex = length - 1;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
translateTo(realIndex, speedRef.value);
|
|
637
|
+
}
|
|
638
|
+
else {
|
|
639
|
+
fixTranslate();
|
|
640
|
+
}
|
|
641
|
+
}, { immediate: true });
|
|
642
|
+
watch([duplicatedableRef, displaySlidesPerViewRef], () => void nextTick(() => toRealIndex(realIndexRef.value)));
|
|
643
|
+
watch(slideTranlatesRef, () => sequenceLayoutRef.value && fixTranslate(), {
|
|
644
644
|
deep: true
|
|
645
645
|
});
|
|
646
|
-
watch(
|
|
646
|
+
watch(sequenceLayoutRef, (value) => {
|
|
647
647
|
if (!value) {
|
|
648
648
|
inTransition = false;
|
|
649
649
|
// if the current mode does not support translate, reset the position of the wrapper
|
|
@@ -653,22 +653,27 @@ export default defineComponent({
|
|
|
653
653
|
fixTranslate();
|
|
654
654
|
}
|
|
655
655
|
});
|
|
656
|
-
const
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
};
|
|
656
|
+
const slidesControlListenersRef = computed(() => {
|
|
657
|
+
return {
|
|
658
|
+
onTouchstartPassive: props.touchable ? handleTouchstart : undefined,
|
|
659
|
+
onMousedown: props.draggable ? handleTouchstart : undefined,
|
|
660
|
+
onWheel: props.mousewheel ? handleMousewheel : undefined
|
|
661
|
+
};
|
|
662
|
+
});
|
|
663
|
+
const arrowSlotPropsRef = computed(() => (Object.assign(Object.assign({}, keep(carouselContext, [
|
|
664
|
+
'to',
|
|
665
|
+
'prev',
|
|
666
|
+
'next',
|
|
667
|
+
'isPrevDisabled',
|
|
668
|
+
'isNextDisabled'
|
|
669
|
+
])), { total: displayTotalViewRef.value, currentIndex: mergedDisplayIndexRef.value })));
|
|
670
|
+
const dotSlotPropsRef = computed(() => ({
|
|
671
|
+
total: displayTotalViewRef.value,
|
|
672
|
+
currentIndex: mergedDisplayIndexRef.value,
|
|
673
|
+
to: carouselContext.to
|
|
674
|
+
}));
|
|
670
675
|
const caroulseExposedMethod = {
|
|
671
|
-
getCurrentIndex: () =>
|
|
676
|
+
getCurrentIndex: () => mergedDisplayIndexRef.value,
|
|
672
677
|
to: to,
|
|
673
678
|
prev: prev,
|
|
674
679
|
next: next
|
|
@@ -690,15 +695,16 @@ export default defineComponent({
|
|
|
690
695
|
const themeClassHandle = inlineThemeDisabled
|
|
691
696
|
? useThemeClass('carousel', undefined, cssVarsRef, props)
|
|
692
697
|
: undefined;
|
|
693
|
-
return Object.assign(Object.assign(
|
|
694
|
-
handleTransitionEnd,
|
|
695
|
-
handleMousewheel,
|
|
698
|
+
return Object.assign(Object.assign({ mergedClsPrefix: mergedClsPrefixRef, selfElRef,
|
|
699
|
+
slidesElRef, slideVNodes: slideVNodesRef, duplicatedable: duplicatedableRef, userWantsControl: userWantsControlRef, autoSlideSize: autoSlideSizeRef, displayIndex: mergedDisplayIndexRef, realIndex: realIndexRef, slideStyles: slideStylesRef, translateStyle: translateStyleRef, slidesControlListeners: slidesControlListenersRef, handleTransitionEnd,
|
|
696
700
|
handleResize,
|
|
697
|
-
handleSlideResize,
|
|
701
|
+
handleSlideResize,
|
|
702
|
+
handleMouseenter,
|
|
703
|
+
handleMouseleave, isActive: isDisplayActive, arrowSlotProps: arrowSlotPropsRef, dotSlotProps: dotSlotPropsRef }, caroulseExposedMethod), { cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender });
|
|
698
704
|
},
|
|
699
705
|
render() {
|
|
700
706
|
var _a;
|
|
701
|
-
const { mergedClsPrefix, showArrow, userWantsControl,
|
|
707
|
+
const { mergedClsPrefix, showArrow, userWantsControl, slideStyles, dotType, dotPlacement, slidesControlListeners, transitionProps = {}, arrowSlotProps, dotSlotProps, $slots: { default: defaultSlot, dots: dotsSlot, arrow: arrowSlot } } = this;
|
|
702
708
|
const children = (defaultSlot && flatten(defaultSlot())) || [];
|
|
703
709
|
let slides = filterCarouselItem(children);
|
|
704
710
|
if (!slides.length) {
|
|
@@ -706,10 +712,8 @@ export default defineComponent({
|
|
|
706
712
|
default: () => cloneVNode(ch)
|
|
707
713
|
})));
|
|
708
714
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
slides.push(duplicateSlide(slides[0], 0, 'append'));
|
|
712
|
-
slides.unshift(duplicateSlide(slides[realLength - 1], realLength - 1, 'prepend'));
|
|
715
|
+
if (this.duplicatedable) {
|
|
716
|
+
slides = addDuplicateSlides(slides);
|
|
713
717
|
}
|
|
714
718
|
this.slideVNodes.value = slides;
|
|
715
719
|
// When users need to customize the size of the slide,
|
|
@@ -720,7 +724,7 @@ export default defineComponent({
|
|
|
720
724
|
})));
|
|
721
725
|
}
|
|
722
726
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
723
|
-
return (h("div", { ref: "selfElRef", class: [
|
|
727
|
+
return (h("div", Object.assign({ ref: "selfElRef", class: [
|
|
724
728
|
this.themeClass,
|
|
725
729
|
`${mergedClsPrefix}-carousel`,
|
|
726
730
|
this.direction === 'vertical' &&
|
|
@@ -730,17 +734,18 @@ export default defineComponent({
|
|
|
730
734
|
`${mergedClsPrefix}-carousel--${this.direction}`,
|
|
731
735
|
`${mergedClsPrefix}-carousel--${this.effect}`,
|
|
732
736
|
userWantsControl && `${mergedClsPrefix}-carousel--usercontrol`
|
|
733
|
-
], style: this.cssVars },
|
|
737
|
+
], style: this.cssVars }, slidesControlListeners, { onMouseenter: this.handleMouseenter, onMouseleave: this.handleMouseleave }),
|
|
734
738
|
h(VResizeObserver, { onResize: this.handleResize }, {
|
|
735
|
-
default: () => (h("div", { class: `${mergedClsPrefix}-carousel__slides`, role: "listbox", style: this.translateStyle,
|
|
739
|
+
default: () => (h("div", { ref: "slidesElRef", class: `${mergedClsPrefix}-carousel__slides`, role: "listbox", style: this.translateStyle, onTransitionend: this.handleTransitionEnd }, userWantsControl
|
|
736
740
|
? slides.map((slide, i) => (h("div", { style: slideStyles[i], key: i }, withDirectives(h(Transition, Object.assign({}, transitionProps), {
|
|
737
741
|
default: () => slide
|
|
738
742
|
}), [[vShow, this.isActive(i)]]))))
|
|
739
743
|
: slides))
|
|
740
744
|
}),
|
|
741
745
|
this.showDots &&
|
|
746
|
+
dotSlotProps.total > 1 &&
|
|
742
747
|
resolveSlotWithProps(dotsSlot, dotSlotProps, () => [
|
|
743
|
-
|
|
748
|
+
h(NCarouselDots, { key: dotType + dotPlacement, total: dotSlotProps.total, currentIndex: dotSlotProps.currentIndex, dotType: dotType, trigger: this.trigger, keyboard: this.keyboard })
|
|
744
749
|
]),
|
|
745
750
|
showArrow &&
|
|
746
751
|
resolveSlotWithProps(arrowSlot, arrowSlotProps, () => [
|
|
@@ -748,19 +753,11 @@ export default defineComponent({
|
|
|
748
753
|
])));
|
|
749
754
|
}
|
|
750
755
|
});
|
|
751
|
-
function filterCarouselItem(vnodes
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
}
|
|
759
|
-
return carouselItems;
|
|
760
|
-
}
|
|
761
|
-
function duplicateSlide(child, index, position) {
|
|
762
|
-
return cloneVNode(child, {
|
|
763
|
-
// for patch
|
|
764
|
-
key: `carousel-item-duplicate-${index}-${position}`
|
|
765
|
-
});
|
|
756
|
+
function filterCarouselItem(vnodes) {
|
|
757
|
+
return vnodes.reduce((carouselItems, vnode) => {
|
|
758
|
+
if (isCarouselItem(vnode)) {
|
|
759
|
+
carouselItems.push(vnode);
|
|
760
|
+
}
|
|
761
|
+
return carouselItems;
|
|
762
|
+
}, []);
|
|
766
763
|
}
|