@arco-design/mobile-react 2.38.4 → 2.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/hooks.js +59 -141
- package/cjs/_helpers/index.js +2 -18
- package/cjs/_helpers/react-dom.js +0 -14
- package/cjs/_helpers/render.js +5 -21
- package/cjs/action-sheet/index.js +10 -30
- package/cjs/action-sheet/methods.js +0 -2
- package/cjs/action-sheet/style/css/index.js +0 -2
- package/cjs/action-sheet/style/index.js +0 -2
- package/cjs/avatar/group.js +12 -24
- package/cjs/avatar/index.js +53 -79
- package/cjs/avatar/style/css/index.js +0 -2
- package/cjs/avatar/style/index.js +0 -2
- package/cjs/badge/index.js +18 -29
- package/cjs/badge/style/css/index.js +0 -1
- package/cjs/badge/style/index.js +0 -1
- package/cjs/button/hooks.js +15 -20
- package/cjs/button/index.js +46 -67
- package/cjs/button/style/css/index.js +0 -2
- package/cjs/button/style/index.js +0 -2
- package/cjs/carousel/index.js +153 -288
- package/cjs/carousel/style/css/index.js +0 -1
- package/cjs/carousel/style/index.js +0 -1
- package/cjs/cell/arrow.js +0 -3
- package/cjs/cell/cell.js +18 -34
- package/cjs/cell/group.js +9 -21
- package/cjs/cell/index.js +1 -7
- package/cjs/cell/style/css/index.js +0 -1
- package/cjs/cell/style/index.js +0 -1
- package/cjs/checkbox/checkbox.js +31 -57
- package/cjs/checkbox/group.js +24 -38
- package/cjs/checkbox/hooks/index.js +0 -2
- package/cjs/checkbox/hooks/useMergeProps.js +7 -14
- package/cjs/checkbox/index.js +1 -8
- package/cjs/checkbox/style/css/index.js +0 -1
- package/cjs/checkbox/style/index.js +0 -1
- package/cjs/checkbox/type.js +0 -2
- package/cjs/circle-progress/index.js +37 -57
- package/cjs/circle-progress/style/css/index.js +0 -1
- package/cjs/circle-progress/style/index.js +0 -1
- package/cjs/collapse/collapse.js +30 -61
- package/cjs/collapse/group.js +20 -44
- package/cjs/collapse/index.js +0 -9
- package/cjs/collapse/style/css/index.js +0 -1
- package/cjs/collapse/style/index.js +0 -1
- package/cjs/collapse/utils.js +0 -7
- package/cjs/context-provider/index.js +18 -43
- package/cjs/context-provider/style/css/index.js +0 -1
- package/cjs/context-provider/style/index.js +0 -1
- package/cjs/count-down/hooks.js +24 -43
- package/cjs/count-down/index.js +29 -37
- package/cjs/count-down/singleton.js +2 -12
- package/cjs/count-down/style/css/index.js +0 -1
- package/cjs/count-down/style/index.js +0 -1
- package/cjs/count-down/util.js +33 -47
- package/cjs/date-picker/helper.js +7 -14
- package/cjs/date-picker/index.js +66 -167
- package/cjs/date-picker/style/css/index.js +0 -2
- package/cjs/date-picker/style/index.js +0 -2
- package/cjs/dialog/index.js +31 -57
- package/cjs/dialog/methods.js +9 -22
- package/cjs/dialog/style/css/index.js +0 -2
- package/cjs/dialog/style/index.js +0 -2
- package/cjs/divider/index.js +8 -20
- package/cjs/divider/style/css/index.js +0 -1
- package/cjs/divider/style/index.js +0 -1
- package/cjs/dropdown/dropdown.js +74 -113
- package/cjs/dropdown/index.js +1 -8
- package/cjs/dropdown/options.js +12 -28
- package/cjs/dropdown/style/css/index.js +0 -1
- package/cjs/dropdown/style/index.js +0 -1
- package/cjs/dropdown-menu/dropdown-menu.js +49 -84
- package/cjs/dropdown-menu/helper.js +4 -24
- package/cjs/dropdown-menu/index.js +0 -6
- package/cjs/dropdown-menu/style/css/index.js +0 -2
- package/cjs/dropdown-menu/style/index.js +0 -2
- package/cjs/ellipsis/components/js-ellipsis.js +32 -70
- package/cjs/ellipsis/components/native-ellipsis.js +9 -14
- package/cjs/ellipsis/index.js +19 -32
- package/cjs/ellipsis/style/css/index.js +0 -1
- package/cjs/ellipsis/style/index.js +0 -1
- package/cjs/ellipsis/utils/dom.js +0 -8
- package/cjs/ellipsis/utils/is.js +1 -5
- package/cjs/form/form-item-context.js +0 -5
- package/cjs/form/form-item.js +74 -163
- package/cjs/form/index.js +18 -38
- package/cjs/form/linked-container.js +5 -24
- package/cjs/form/style/css/index.js +0 -1
- package/cjs/form/style/index.js +0 -1
- package/cjs/form/type.d.ts +11 -1
- package/cjs/form/type.js +0 -5
- package/cjs/form/useForm.js +10 -79
- package/cjs/form/utils.js +4 -22
- package/cjs/grid/index.js +22 -45
- package/cjs/grid/style/css/index.js +0 -1
- package/cjs/grid/style/index.js +0 -1
- package/cjs/icon/IconAdd/index.js +5 -12
- package/cjs/icon/IconArrowBack/index.js +5 -12
- package/cjs/icon/IconArrowDown/index.js +5 -12
- package/cjs/icon/IconArrowIn/index.js +5 -12
- package/cjs/icon/IconArrowUp/index.js +5 -12
- package/cjs/icon/IconCheck/index.js +5 -12
- package/cjs/icon/IconCheckBold/index.js +5 -12
- package/cjs/icon/IconCircleChecked/index.js +5 -12
- package/cjs/icon/IconCircleDisabled/index.js +5 -12
- package/cjs/icon/IconCircleUnchecked/index.js +5 -12
- package/cjs/icon/IconClear/index.js +5 -12
- package/cjs/icon/IconClose/index.js +5 -12
- package/cjs/icon/IconCloseBold/index.js +5 -12
- package/cjs/icon/IconDelete/index.js +5 -12
- package/cjs/icon/IconDownload/index.js +5 -12
- package/cjs/icon/IconEdit/index.js +5 -12
- package/cjs/icon/IconErrorCircle/index.js +5 -12
- package/cjs/icon/IconEyeInvisible/index.js +5 -12
- package/cjs/icon/IconEyeVisible/index.js +5 -12
- package/cjs/icon/IconEyelashInvisible/index.js +5 -12
- package/cjs/icon/IconFile/index.js +5 -12
- package/cjs/icon/IconGift/index.js +5 -12
- package/cjs/icon/IconHeart/index.js +5 -12
- package/cjs/icon/IconHome/index.js +5 -12
- package/cjs/icon/IconKeyboard/index.js +5 -12
- package/cjs/icon/IconKeyboardDelete/index.js +5 -12
- package/cjs/icon/IconLikeCircle/index.js +5 -12
- package/cjs/icon/IconMinus/index.js +5 -12
- package/cjs/icon/IconMore/index.js +5 -12
- package/cjs/icon/IconNotice/index.js +5 -12
- package/cjs/icon/IconNoticeOff/index.js +5 -12
- package/cjs/icon/IconPicture/index.js +5 -12
- package/cjs/icon/IconPlay/index.js +5 -12
- package/cjs/icon/IconQuestionCircle/index.js +5 -12
- package/cjs/icon/IconRefresh/index.js +5 -12
- package/cjs/icon/IconSad/index.js +5 -12
- package/cjs/icon/IconScan/index.js +5 -12
- package/cjs/icon/IconSearch/index.js +5 -12
- package/cjs/icon/IconSetting/index.js +5 -12
- package/cjs/icon/IconShop/index.js +5 -12
- package/cjs/icon/IconShopping/index.js +5 -12
- package/cjs/icon/IconSmileFill/index.js +5 -12
- package/cjs/icon/IconSound/index.js +5 -12
- package/cjs/icon/IconSquareChecked/index.js +5 -12
- package/cjs/icon/IconSquareDisabled/index.js +5 -12
- package/cjs/icon/IconSquareUnchecked/index.js +5 -12
- package/cjs/icon/IconStar/index.js +5 -12
- package/cjs/icon/IconStarFill/index.js +5 -12
- package/cjs/icon/IconStarHalf/index.js +5 -12
- package/cjs/icon/IconSubway/index.js +5 -12
- package/cjs/icon/IconSuccessCircle/index.js +5 -12
- package/cjs/icon/IconTriDown/index.js +5 -12
- package/cjs/icon/IconTriUp/index.js +5 -12
- package/cjs/icon/IconUpload/index.js +5 -12
- package/cjs/icon/IconUser/index.js +5 -12
- package/cjs/icon/IconUserFill/index.js +5 -12
- package/cjs/icon/IconWarnCircle/index.js +5 -12
- package/cjs/icon/IconWarnCircleFill/index.js +5 -12
- package/cjs/icon/index.js +0 -119
- package/cjs/image/index.js +53 -94
- package/cjs/image/style/css/index.js +0 -2
- package/cjs/image/style/index.js +0 -2
- package/cjs/image-picker/add-icon.js +0 -3
- package/cjs/image-picker/index.js +32 -59
- package/cjs/image-picker/style/css/index.js +0 -3
- package/cjs/image-picker/style/index.js +0 -3
- package/cjs/image-preview/index.js +129 -254
- package/cjs/image-preview/methods.js +5 -18
- package/cjs/image-preview/style/css/index.js +0 -4
- package/cjs/image-preview/style/index.js +0 -4
- package/cjs/index-bar/context.js +0 -2
- package/cjs/index-bar/group.js +16 -35
- package/cjs/index-bar/index.js +55 -87
- package/cjs/index-bar/side-bar.js +15 -34
- package/cjs/index-bar/style/css/index.js +0 -2
- package/cjs/index-bar/style/index.js +0 -2
- package/cjs/index-bar/utils.js +3 -17
- package/cjs/index.js +0 -119
- package/cjs/input/hooks.js +45 -84
- package/cjs/input/index.js +26 -40
- package/cjs/input/style/css/index.js +0 -1
- package/cjs/input/style/index.js +0 -1
- package/cjs/keyboard/index.js +37 -73
- package/cjs/keyboard/style/css/index.js +0 -2
- package/cjs/keyboard/style/index.js +0 -2
- package/cjs/load-more/index.js +33 -65
- package/cjs/load-more/style/css/index.js +0 -1
- package/cjs/load-more/style/index.js +0 -1
- package/cjs/loading/index.js +19 -48
- package/cjs/loading/style/css/index.js +0 -1
- package/cjs/loading/style/index.js +0 -1
- package/cjs/masking/index.js +47 -80
- package/cjs/masking/methods.js +5 -21
- package/cjs/masking/style/css/index.js +0 -2
- package/cjs/masking/style/index.js +0 -2
- package/cjs/nav-bar/back-icon.js +2 -8
- package/cjs/nav-bar/index.js +37 -61
- package/cjs/nav-bar/style/css/index.js +0 -1
- package/cjs/nav-bar/style/index.js +0 -1
- package/cjs/notice-bar/index.js +34 -60
- package/cjs/notice-bar/style/css/index.js +0 -1
- package/cjs/notice-bar/style/index.js +0 -1
- package/cjs/notify/index.js +20 -49
- package/cjs/notify/methods.js +2 -17
- package/cjs/notify/style/css/index.js +0 -1
- package/cjs/notify/style/index.js +0 -1
- package/cjs/pagination/arrow.js +0 -3
- package/cjs/pagination/index.js +27 -58
- package/cjs/pagination/style/css/index.js +0 -1
- package/cjs/pagination/style/index.js +0 -1
- package/cjs/picker/index.js +48 -84
- package/cjs/picker/style/css/index.js +0 -3
- package/cjs/picker/style/index.js +0 -3
- package/cjs/picker-view/components/cascader.js +13 -32
- package/cjs/picker-view/components/multi-picker.js +8 -17
- package/cjs/picker-view/components/picker-cell.js +45 -101
- package/cjs/picker-view/index.js +30 -76
- package/cjs/picker-view/style/css/index.js +0 -1
- package/cjs/picker-view/style/index.js +0 -1
- package/cjs/popover/hooks/index.js +0 -4
- package/cjs/popover/hooks/useEvent.js +25 -49
- package/cjs/popover/hooks/usePosition.js +100 -159
- package/cjs/popover/index.js +1 -8
- package/cjs/popover/menu.js +32 -52
- package/cjs/popover/popover-inner.js +30 -48
- package/cjs/popover/popover.js +69 -101
- package/cjs/popover/style/css/index.js +0 -2
- package/cjs/popover/style/index.js +0 -2
- package/cjs/popup/index.js +22 -39
- package/cjs/popup/methods.js +0 -2
- package/cjs/popup/style/css/index.js +0 -2
- package/cjs/popup/style/index.js +0 -2
- package/cjs/popup-swiper/index.js +50 -92
- package/cjs/popup-swiper/methods.js +0 -2
- package/cjs/popup-swiper/style/css/index.js +0 -2
- package/cjs/popup-swiper/style/index.js +0 -2
- package/cjs/portal/index.js +3 -8
- package/cjs/portal/style/css/index.js +0 -1
- package/cjs/portal/style/index.js +0 -1
- package/cjs/progress/index.js +27 -44
- package/cjs/progress/style/css/index.js +0 -1
- package/cjs/progress/style/index.js +0 -1
- package/cjs/pull-refresh/android-pull-refresh.js +56 -95
- package/cjs/pull-refresh/hooks.js +11 -32
- package/cjs/pull-refresh/index.js +3 -14
- package/cjs/pull-refresh/ios-pull-refresh.js +53 -81
- package/cjs/pull-refresh/model.js +0 -1
- package/cjs/pull-refresh/style/css/index.js +0 -2
- package/cjs/pull-refresh/style/index.js +0 -2
- package/cjs/radio/group.js +20 -34
- package/cjs/radio/index.js +1 -8
- package/cjs/radio/radio.js +0 -10
- package/cjs/radio/style/css/index.js +0 -1
- package/cjs/radio/style/index.js +0 -1
- package/cjs/rate/index.js +28 -54
- package/cjs/rate/style/css/index.js +0 -1
- package/cjs/rate/style/index.js +0 -1
- package/cjs/search-bar/association.js +14 -32
- package/cjs/search-bar/cancel-button.js +8 -16
- package/cjs/search-bar/highlight.js +14 -25
- package/cjs/search-bar/index.js +77 -97
- package/cjs/search-bar/style/css/index.js +0 -1
- package/cjs/search-bar/style/index.js +0 -1
- package/cjs/show-monitor/index.js +40 -108
- package/cjs/show-monitor/style/css/index.js +0 -1
- package/cjs/show-monitor/style/index.js +0 -1
- package/cjs/skeleton/elements.js +47 -84
- package/cjs/skeleton/index.js +18 -36
- package/cjs/skeleton/skeleton-context.js +0 -4
- package/cjs/skeleton/style/css/index.js +0 -2
- package/cjs/skeleton/style/index.js +0 -2
- package/cjs/slider/hooks/index.js +0 -13
- package/cjs/slider/hooks/useSliderEvents.js +27 -59
- package/cjs/slider/hooks/useSliderIcon.js +6 -20
- package/cjs/slider/hooks/useSliderInit.js +32 -52
- package/cjs/slider/hooks/useSliderStyle.js +13 -27
- package/cjs/slider/index.js +47 -73
- package/cjs/slider/marks.js +13 -27
- package/cjs/slider/popover.js +4 -13
- package/cjs/slider/style/css/index.js +0 -2
- package/cjs/slider/style/index.js +0 -2
- package/cjs/slider/thumb.js +11 -22
- package/cjs/stepper/hooks/useButtonClick.js +15 -25
- package/cjs/stepper/hooks/useInputEvent.js +10 -19
- package/cjs/stepper/hooks/useValue.js +9 -15
- package/cjs/stepper/index.js +84 -98
- package/cjs/stepper/style/css/index.js +0 -1
- package/cjs/stepper/style/index.js +0 -1
- package/cjs/steps/index.js +25 -43
- package/cjs/steps/step.js +10 -27
- package/cjs/steps/style/css/index.js +0 -1
- package/cjs/steps/style/index.js +0 -1
- package/cjs/sticky/index.js +40 -74
- package/cjs/sticky/style/css/index.js +0 -1
- package/cjs/sticky/style/index.js +0 -1
- package/cjs/style.js +0 -59
- package/cjs/swipe-action/index.js +40 -92
- package/cjs/swipe-action/item.js +9 -17
- package/cjs/swipe-action/style/css/index.js +0 -1
- package/cjs/swipe-action/style/index.js +0 -1
- package/cjs/swipe-load/index.js +78 -113
- package/cjs/swipe-load/style/css/index.js +0 -1
- package/cjs/swipe-load/style/index.js +0 -1
- package/cjs/switch/index.js +28 -49
- package/cjs/switch/style/css/index.js +0 -1
- package/cjs/switch/style/index.js +0 -1
- package/cjs/tab-bar/index.js +0 -7
- package/cjs/tab-bar/item.js +6 -24
- package/cjs/tab-bar/style/css/index.js +0 -1
- package/cjs/tab-bar/style/index.js +0 -1
- package/cjs/tab-bar/tab-bar.js +16 -32
- package/cjs/tabs/index.js +136 -206
- package/cjs/tabs/style/css/index.js +0 -1
- package/cjs/tabs/style/index.js +0 -1
- package/cjs/tabs/tab-cell-underline.js +28 -76
- package/cjs/tabs/tab-cell.js +73 -128
- package/cjs/tabs/tab-pane.js +53 -103
- package/cjs/tag/index.js +1 -8
- package/cjs/tag/list.js +11 -26
- package/cjs/tag/style/css/index.js +0 -1
- package/cjs/tag/style/index.js +0 -1
- package/cjs/tag/tag.js +20 -32
- package/cjs/textarea/index.js +35 -56
- package/cjs/textarea/style/css/index.js +0 -2
- package/cjs/textarea/style/index.js +0 -2
- package/cjs/toast/index.js +26 -61
- package/cjs/toast/methods.js +2 -16
- package/cjs/toast/style/css/index.js +0 -3
- package/cjs/toast/style/index.js +0 -3
- package/cjs/transition/index.js +17 -29
- package/cjs/transition/style/css/index.js +0 -1
- package/cjs/transition/style/index.js +0 -1
- package/cjs/uploader/index.d.ts +1 -1
- package/cjs/uploader/index.js +28 -49
- package/cjs/uploader/style/css/index.js +0 -3
- package/cjs/uploader/style/index.js +0 -3
- package/cjs/uploader/upload/index.js +0 -4
- package/cjs/uploader/upload/upload.js +9 -45
- package/dist/index.js +3838 -6455
- package/dist/index.min.js +2 -2
- package/esm/_helpers/hooks.js +59 -123
- package/esm/_helpers/index.js +4 -6
- package/esm/_helpers/react-dom.js +0 -11
- package/esm/_helpers/render.js +5 -15
- package/esm/action-sheet/index.js +10 -16
- package/esm/avatar/group.js +12 -16
- package/esm/avatar/index.js +53 -64
- package/esm/badge/index.js +18 -22
- package/esm/button/hooks.js +15 -18
- package/esm/button/index.js +46 -57
- package/esm/carousel/index.js +153 -280
- package/esm/cell/cell.js +18 -25
- package/esm/cell/group.js +9 -11
- package/esm/cell/index.js +1 -1
- package/esm/checkbox/checkbox.js +31 -42
- package/esm/checkbox/group.js +24 -28
- package/esm/checkbox/hooks/useMergeProps.js +7 -9
- package/esm/checkbox/index.js +2 -2
- package/esm/checkbox/type.js +0 -1
- package/esm/circle-progress/index.js +37 -49
- package/esm/collapse/collapse.js +30 -51
- package/esm/collapse/group.js +20 -34
- package/esm/collapse/index.js +1 -1
- package/esm/collapse/utils.js +0 -1
- package/esm/context-provider/index.js +18 -33
- package/esm/count-down/hooks.js +24 -37
- package/esm/count-down/index.js +30 -29
- package/esm/count-down/singleton.js +2 -5
- package/esm/count-down/util.js +33 -42
- package/esm/date-picker/helper.js +7 -9
- package/esm/date-picker/index.js +66 -155
- package/esm/dialog/index.js +31 -42
- package/esm/dialog/methods.js +9 -11
- package/esm/divider/index.js +8 -12
- package/esm/dropdown/dropdown.js +74 -102
- package/esm/dropdown/index.js +1 -1
- package/esm/dropdown/options.js +12 -20
- package/esm/dropdown-menu/dropdown-menu.js +49 -74
- package/esm/dropdown-menu/helper.js +4 -14
- package/esm/dropdown-menu/index.js +1 -1
- package/esm/ellipsis/components/js-ellipsis.js +32 -60
- package/esm/ellipsis/components/native-ellipsis.js +9 -11
- package/esm/ellipsis/index.js +20 -21
- package/esm/ellipsis/utils/dom.js +0 -7
- package/esm/ellipsis/utils/is.js +1 -1
- package/esm/form/form-item.js +74 -147
- package/esm/form/index.js +18 -23
- package/esm/form/linked-container.js +5 -14
- package/esm/form/type.d.ts +11 -1
- package/esm/form/type.js +0 -5
- package/esm/form/useForm.js +10 -74
- package/esm/form/utils.js +4 -11
- package/esm/grid/index.js +22 -38
- package/esm/icon/IconAdd/index.js +5 -6
- package/esm/icon/IconArrowBack/index.js +5 -6
- package/esm/icon/IconArrowDown/index.js +5 -6
- package/esm/icon/IconArrowIn/index.js +5 -6
- package/esm/icon/IconArrowUp/index.js +5 -6
- package/esm/icon/IconCheck/index.js +5 -6
- package/esm/icon/IconCheckBold/index.js +5 -6
- package/esm/icon/IconCircleChecked/index.js +5 -6
- package/esm/icon/IconCircleDisabled/index.js +5 -6
- package/esm/icon/IconCircleUnchecked/index.js +5 -6
- package/esm/icon/IconClear/index.js +5 -6
- package/esm/icon/IconClose/index.js +5 -6
- package/esm/icon/IconCloseBold/index.js +5 -6
- package/esm/icon/IconDelete/index.js +5 -6
- package/esm/icon/IconDownload/index.js +5 -6
- package/esm/icon/IconEdit/index.js +5 -6
- package/esm/icon/IconErrorCircle/index.js +5 -6
- package/esm/icon/IconEyeInvisible/index.js +5 -6
- package/esm/icon/IconEyeVisible/index.js +5 -6
- package/esm/icon/IconEyelashInvisible/index.js +5 -6
- package/esm/icon/IconFile/index.js +5 -6
- package/esm/icon/IconGift/index.js +5 -6
- package/esm/icon/IconHeart/index.js +5 -6
- package/esm/icon/IconHome/index.js +5 -6
- package/esm/icon/IconKeyboard/index.js +5 -6
- package/esm/icon/IconKeyboardDelete/index.js +5 -6
- package/esm/icon/IconLikeCircle/index.js +5 -6
- package/esm/icon/IconMinus/index.js +5 -6
- package/esm/icon/IconMore/index.js +5 -6
- package/esm/icon/IconNotice/index.js +5 -6
- package/esm/icon/IconNoticeOff/index.js +5 -6
- package/esm/icon/IconPicture/index.js +5 -6
- package/esm/icon/IconPlay/index.js +5 -6
- package/esm/icon/IconQuestionCircle/index.js +5 -6
- package/esm/icon/IconRefresh/index.js +5 -6
- package/esm/icon/IconSad/index.js +5 -6
- package/esm/icon/IconScan/index.js +5 -6
- package/esm/icon/IconSearch/index.js +5 -6
- package/esm/icon/IconSetting/index.js +5 -6
- package/esm/icon/IconShop/index.js +5 -6
- package/esm/icon/IconShopping/index.js +5 -6
- package/esm/icon/IconSmileFill/index.js +5 -6
- package/esm/icon/IconSound/index.js +5 -6
- package/esm/icon/IconSquareChecked/index.js +5 -6
- package/esm/icon/IconSquareDisabled/index.js +5 -6
- package/esm/icon/IconSquareUnchecked/index.js +5 -6
- package/esm/icon/IconStar/index.js +5 -6
- package/esm/icon/IconStarFill/index.js +5 -6
- package/esm/icon/IconStarHalf/index.js +5 -6
- package/esm/icon/IconSubway/index.js +5 -6
- package/esm/icon/IconSuccessCircle/index.js +5 -6
- package/esm/icon/IconTriDown/index.js +5 -6
- package/esm/icon/IconTriUp/index.js +5 -6
- package/esm/icon/IconUpload/index.js +5 -6
- package/esm/icon/IconUser/index.js +5 -6
- package/esm/icon/IconUserFill/index.js +5 -6
- package/esm/icon/IconWarnCircle/index.js +5 -6
- package/esm/icon/IconWarnCircleFill/index.js +5 -6
- package/esm/image/index.js +53 -85
- package/esm/image-picker/index.js +32 -42
- package/esm/image-preview/index.js +129 -232
- package/esm/image-preview/methods.js +5 -14
- package/esm/index-bar/group.js +16 -25
- package/esm/index-bar/index.js +55 -74
- package/esm/index-bar/side-bar.js +15 -28
- package/esm/index-bar/utils.js +3 -10
- package/esm/input/hooks.js +45 -75
- package/esm/input/index.js +26 -30
- package/esm/keyboard/index.js +40 -63
- package/esm/load-more/index.js +33 -57
- package/esm/loading/index.js +19 -40
- package/esm/masking/index.js +47 -65
- package/esm/masking/methods.js +5 -16
- package/esm/nav-bar/back-icon.js +2 -4
- package/esm/nav-bar/index.js +37 -52
- package/esm/notice-bar/index.js +34 -53
- package/esm/notify/index.js +20 -33
- package/esm/notify/methods.js +2 -13
- package/esm/pagination/index.js +27 -50
- package/esm/picker/index.js +48 -69
- package/esm/picker-view/components/cascader.js +13 -24
- package/esm/picker-view/components/multi-picker.js +8 -14
- package/esm/picker-view/components/picker-cell.js +45 -93
- package/esm/picker-view/index.js +30 -60
- package/esm/popover/hooks/useEvent.js +26 -41
- package/esm/popover/hooks/usePosition.js +100 -152
- package/esm/popover/index.js +2 -2
- package/esm/popover/menu.js +32 -41
- package/esm/popover/popover-inner.js +30 -39
- package/esm/popover/popover.js +69 -90
- package/esm/popup/index.js +22 -25
- package/esm/popup-swiper/index.js +50 -76
- package/esm/portal/index.js +3 -5
- package/esm/progress/index.js +27 -36
- package/esm/pull-refresh/android-pull-refresh.js +56 -83
- package/esm/pull-refresh/hooks.js +11 -23
- package/esm/pull-refresh/index.js +3 -5
- package/esm/pull-refresh/ios-pull-refresh.js +53 -68
- package/esm/pull-refresh/model.js +0 -1
- package/esm/radio/group.js +20 -24
- package/esm/radio/index.js +2 -2
- package/esm/rate/index.js +28 -43
- package/esm/search-bar/association.js +14 -27
- package/esm/search-bar/cancel-button.js +8 -11
- package/esm/search-bar/highlight.js +14 -20
- package/esm/search-bar/index.js +77 -86
- package/esm/show-monitor/index.js +40 -100
- package/esm/skeleton/elements.js +47 -75
- package/esm/skeleton/index.js +18 -24
- package/esm/slider/hooks/useSliderEvents.js +27 -54
- package/esm/slider/hooks/useSliderIcon.js +6 -13
- package/esm/slider/hooks/useSliderInit.js +32 -46
- package/esm/slider/hooks/useSliderStyle.js +13 -22
- package/esm/slider/index.js +47 -63
- package/esm/slider/marks.js +13 -19
- package/esm/slider/popover.js +4 -6
- package/esm/slider/thumb.js +11 -16
- package/esm/stepper/hooks/useButtonClick.js +15 -24
- package/esm/stepper/hooks/useInputEvent.js +10 -17
- package/esm/stepper/hooks/useValue.js +9 -12
- package/esm/stepper/index.js +84 -84
- package/esm/steps/index.js +25 -30
- package/esm/steps/step.js +10 -19
- package/esm/sticky/index.js +40 -65
- package/esm/swipe-action/index.js +40 -80
- package/esm/swipe-action/item.js +9 -12
- package/esm/swipe-load/index.js +79 -104
- package/esm/switch/index.js +28 -41
- package/esm/tab-bar/index.js +0 -1
- package/esm/tab-bar/item.js +6 -13
- package/esm/tab-bar/tab-bar.js +16 -22
- package/esm/tabs/index.js +137 -194
- package/esm/tabs/tab-cell-underline.js +28 -67
- package/esm/tabs/tab-cell.js +73 -118
- package/esm/tabs/tab-pane.js +53 -95
- package/esm/tag/index.js +2 -2
- package/esm/tag/list.js +11 -16
- package/esm/tag/tag.js +20 -22
- package/esm/textarea/index.js +35 -46
- package/esm/toast/index.js +26 -42
- package/esm/toast/methods.js +2 -12
- package/esm/transition/index.js +17 -20
- package/esm/uploader/index.d.ts +1 -1
- package/esm/uploader/index.js +28 -34
- package/esm/uploader/upload/upload.js +9 -38
- package/esnext/form/form-item.js +12 -7
- package/esnext/form/type.d.ts +11 -1
- package/esnext/uploader/index.d.ts +1 -1
- package/esnext/uploader/index.js +1 -1
- package/esnext/uploader/upload/upload.js +1 -1
- package/package.json +5 -3
- package/tokens/app/arcodesign/default/index.js +0 -2
- package/umd/_helpers/hooks.js +59 -138
- package/umd/_helpers/index.js +2 -9
- package/umd/_helpers/react-dom.js +0 -13
- package/umd/_helpers/render.js +5 -17
- package/umd/action-sheet/index.js +10 -22
- package/umd/action-sheet/methods.js +0 -1
- package/umd/avatar/group.js +12 -20
- package/umd/avatar/index.js +53 -70
- package/umd/badge/index.js +18 -25
- package/umd/button/hooks.js +15 -19
- package/umd/button/index.js +46 -60
- package/umd/carousel/index.js +153 -283
- package/umd/cell/arrow.js +0 -2
- package/umd/cell/cell.js +18 -29
- package/umd/cell/group.js +9 -17
- package/umd/cell/index.js +1 -2
- package/umd/checkbox/checkbox.js +31 -45
- package/umd/checkbox/group.js +24 -34
- package/umd/checkbox/hooks/useMergeProps.js +7 -12
- package/umd/checkbox/index.js +1 -3
- package/umd/checkbox/type.js +0 -2
- package/umd/circle-progress/index.js +37 -52
- package/umd/collapse/collapse.js +30 -55
- package/umd/collapse/group.js +20 -38
- package/umd/collapse/index.js +0 -3
- package/umd/collapse/utils.js +0 -5
- package/umd/context-provider/index.js +18 -38
- package/umd/count-down/hooks.js +24 -39
- package/umd/count-down/index.js +29 -31
- package/umd/count-down/singleton.js +2 -10
- package/umd/count-down/util.js +33 -47
- package/umd/date-picker/helper.js +7 -13
- package/umd/date-picker/index.js +66 -158
- package/umd/dialog/index.js +31 -47
- package/umd/dialog/methods.js +9 -18
- package/umd/divider/index.js +8 -15
- package/umd/dropdown/dropdown.js +74 -106
- package/umd/dropdown/index.js +1 -3
- package/umd/dropdown/options.js +12 -24
- package/umd/dropdown-menu/dropdown-menu.js +49 -78
- package/umd/dropdown-menu/helper.js +4 -22
- package/umd/dropdown-menu/index.js +0 -2
- package/umd/ellipsis/components/js-ellipsis.js +32 -66
- package/umd/ellipsis/components/native-ellipsis.js +9 -12
- package/umd/ellipsis/index.js +19 -24
- package/umd/ellipsis/utils/dom.js +0 -8
- package/umd/ellipsis/utils/is.js +1 -5
- package/umd/form/form-item-context.js +0 -3
- package/umd/form/form-item.js +74 -151
- package/umd/form/index.js +18 -28
- package/umd/form/linked-container.js +5 -19
- package/umd/form/type.d.ts +11 -1
- package/umd/form/type.js +0 -5
- package/umd/form/useForm.js +10 -74
- package/umd/form/utils.js +4 -19
- package/umd/grid/index.js +22 -41
- package/umd/icon/IconAdd/index.js +5 -7
- package/umd/icon/IconArrowBack/index.js +5 -7
- package/umd/icon/IconArrowDown/index.js +5 -7
- package/umd/icon/IconArrowIn/index.js +5 -7
- package/umd/icon/IconArrowUp/index.js +5 -7
- package/umd/icon/IconCheck/index.js +5 -7
- package/umd/icon/IconCheckBold/index.js +5 -7
- package/umd/icon/IconCircleChecked/index.js +5 -7
- package/umd/icon/IconCircleDisabled/index.js +5 -7
- package/umd/icon/IconCircleUnchecked/index.js +5 -7
- package/umd/icon/IconClear/index.js +5 -7
- package/umd/icon/IconClose/index.js +5 -7
- package/umd/icon/IconCloseBold/index.js +5 -7
- package/umd/icon/IconDelete/index.js +5 -7
- package/umd/icon/IconDownload/index.js +5 -7
- package/umd/icon/IconEdit/index.js +5 -7
- package/umd/icon/IconErrorCircle/index.js +5 -7
- package/umd/icon/IconEyeInvisible/index.js +5 -7
- package/umd/icon/IconEyeVisible/index.js +5 -7
- package/umd/icon/IconEyelashInvisible/index.js +5 -7
- package/umd/icon/IconFile/index.js +5 -7
- package/umd/icon/IconGift/index.js +5 -7
- package/umd/icon/IconHeart/index.js +5 -7
- package/umd/icon/IconHome/index.js +5 -7
- package/umd/icon/IconKeyboard/index.js +5 -7
- package/umd/icon/IconKeyboardDelete/index.js +5 -7
- package/umd/icon/IconLikeCircle/index.js +5 -7
- package/umd/icon/IconMinus/index.js +5 -7
- package/umd/icon/IconMore/index.js +5 -7
- package/umd/icon/IconNotice/index.js +5 -7
- package/umd/icon/IconNoticeOff/index.js +5 -7
- package/umd/icon/IconPicture/index.js +5 -7
- package/umd/icon/IconPlay/index.js +5 -7
- package/umd/icon/IconQuestionCircle/index.js +5 -7
- package/umd/icon/IconRefresh/index.js +5 -7
- package/umd/icon/IconSad/index.js +5 -7
- package/umd/icon/IconScan/index.js +5 -7
- package/umd/icon/IconSearch/index.js +5 -7
- package/umd/icon/IconSetting/index.js +5 -7
- package/umd/icon/IconShop/index.js +5 -7
- package/umd/icon/IconShopping/index.js +5 -7
- package/umd/icon/IconSmileFill/index.js +5 -7
- package/umd/icon/IconSound/index.js +5 -7
- package/umd/icon/IconSquareChecked/index.js +5 -7
- package/umd/icon/IconSquareDisabled/index.js +5 -7
- package/umd/icon/IconSquareUnchecked/index.js +5 -7
- package/umd/icon/IconStar/index.js +5 -7
- package/umd/icon/IconStarFill/index.js +5 -7
- package/umd/icon/IconStarHalf/index.js +5 -7
- package/umd/icon/IconSubway/index.js +5 -7
- package/umd/icon/IconSuccessCircle/index.js +5 -7
- package/umd/icon/IconTriDown/index.js +5 -7
- package/umd/icon/IconTriUp/index.js +5 -7
- package/umd/icon/IconUpload/index.js +5 -7
- package/umd/icon/IconUser/index.js +5 -7
- package/umd/icon/IconUserFill/index.js +5 -7
- package/umd/icon/IconWarnCircle/index.js +5 -7
- package/umd/icon/IconWarnCircleFill/index.js +5 -7
- package/umd/icon/index.js +0 -1
- package/umd/image/index.js +53 -88
- package/umd/image-picker/add-icon.js +0 -2
- package/umd/image-picker/index.js +32 -47
- package/umd/image-preview/index.js +129 -239
- package/umd/image-preview/methods.js +5 -15
- package/umd/index-bar/group.js +16 -30
- package/umd/index-bar/index.js +55 -79
- package/umd/index-bar/side-bar.js +15 -32
- package/umd/index-bar/utils.js +3 -16
- package/umd/index.js +0 -1
- package/umd/input/hooks.js +45 -79
- package/umd/input/index.js +26 -35
- package/umd/keyboard/index.js +37 -64
- package/umd/load-more/index.js +33 -60
- package/umd/loading/index.js +19 -43
- package/umd/masking/index.js +47 -72
- package/umd/masking/methods.js +5 -18
- package/umd/nav-bar/back-icon.js +2 -5
- package/umd/nav-bar/index.js +37 -55
- package/umd/notice-bar/index.js +34 -56
- package/umd/notify/index.js +20 -40
- package/umd/notify/methods.js +2 -14
- package/umd/pagination/arrow.js +0 -2
- package/umd/pagination/index.js +27 -53
- package/umd/picker/index.js +48 -73
- package/umd/picker-view/components/cascader.js +13 -28
- package/umd/picker-view/components/multi-picker.js +8 -16
- package/umd/picker-view/components/picker-cell.js +45 -97
- package/umd/picker-view/index.js +30 -63
- package/umd/popover/hooks/useEvent.js +25 -44
- package/umd/popover/hooks/usePosition.js +100 -153
- package/umd/popover/index.js +1 -3
- package/umd/popover/menu.js +32 -45
- package/umd/popover/popover-inner.js +30 -43
- package/umd/popover/popover.js +69 -94
- package/umd/popup/index.js +22 -31
- package/umd/popup/methods.js +0 -1
- package/umd/popup-swiper/index.js +50 -83
- package/umd/popup-swiper/methods.js +0 -1
- package/umd/portal/index.js +3 -6
- package/umd/progress/index.js +27 -39
- package/umd/pull-refresh/android-pull-refresh.js +56 -86
- package/umd/pull-refresh/hooks.js +11 -29
- package/umd/pull-refresh/index.js +3 -7
- package/umd/pull-refresh/ios-pull-refresh.js +53 -72
- package/umd/pull-refresh/model.js +0 -1
- package/umd/radio/group.js +20 -30
- package/umd/radio/index.js +1 -3
- package/umd/radio/radio.js +0 -5
- package/umd/rate/index.js +28 -48
- package/umd/search-bar/association.js +14 -29
- package/umd/search-bar/cancel-button.js +8 -14
- package/umd/search-bar/highlight.js +14 -21
- package/umd/search-bar/index.js +77 -87
- package/umd/show-monitor/index.js +40 -104
- package/umd/skeleton/elements.js +47 -78
- package/umd/skeleton/index.js +18 -28
- package/umd/skeleton/skeleton-context.js +0 -3
- package/umd/slider/hooks/index.js +0 -4
- package/umd/slider/hooks/useSliderEvents.js +27 -55
- package/umd/slider/hooks/useSliderIcon.js +6 -17
- package/umd/slider/hooks/useSliderInit.js +32 -50
- package/umd/slider/hooks/useSliderStyle.js +13 -24
- package/umd/slider/index.js +47 -66
- package/umd/slider/marks.js +13 -22
- package/umd/slider/popover.js +4 -10
- package/umd/slider/thumb.js +11 -18
- package/umd/stepper/hooks/useButtonClick.js +15 -24
- package/umd/stepper/hooks/useInputEvent.js +10 -18
- package/umd/stepper/hooks/useValue.js +9 -13
- package/umd/stepper/index.js +84 -89
- package/umd/steps/index.js +25 -35
- package/umd/steps/step.js +10 -22
- package/umd/sticky/index.js +40 -68
- package/umd/style.js +1 -1
- package/umd/swipe-action/index.js +40 -84
- package/umd/swipe-action/item.js +9 -14
- package/umd/swipe-load/index.js +78 -106
- package/umd/switch/index.js +28 -45
- package/umd/tab-bar/index.js +0 -2
- package/umd/tab-bar/item.js +6 -19
- package/umd/tab-bar/tab-bar.js +16 -27
- package/umd/tabs/index.js +136 -197
- package/umd/tabs/tab-cell-underline.js +28 -71
- package/umd/tabs/tab-cell.js +73 -122
- package/umd/tabs/tab-pane.js +53 -98
- package/umd/tag/index.js +1 -3
- package/umd/tag/list.js +11 -20
- package/umd/tag/tag.js +20 -26
- package/umd/textarea/index.js +35 -51
- package/umd/toast/index.js +26 -49
- package/umd/toast/methods.js +2 -13
- package/umd/transition/index.js +16 -22
- package/umd/uploader/index.d.ts +1 -1
- package/umd/uploader/index.js +28 -39
- package/umd/uploader/upload/upload.js +9 -43
package/umd/carousel/index.js
CHANGED
|
@@ -14,16 +14,12 @@
|
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
16
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
17
|
-
|
|
18
17
|
_exports.__esModule = true;
|
|
19
18
|
_exports.default = void 0;
|
|
20
19
|
_extends3 = _interopRequireDefault(_extends3);
|
|
21
20
|
_react = _interopRequireWildcard(_react);
|
|
22
|
-
|
|
23
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
|
-
|
|
25
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
26
|
-
|
|
27
23
|
/**
|
|
28
24
|
* 轮播组件,支持自定义轮播索引样式及滑块宽度。**需要注意的是,如果正使用`fastclick`,需要为 touchstart 的 target 添加`needsclick`类**(<a href="https://github.com/ftlabs/fastclick#ignore-certain-elements-with-needsclick" target="_blank">详情戳这里</a>),以规避`fastclick`逻辑与组件内部的手势冲突。(如果使用了`list`属性则无需额外添加)
|
|
29
25
|
* @en Carousel component, supports custom carousel index style and slider width. **Note that if you are using `fastclick`, you need to add a `needsclick` class to the touchstart target ** (<a href="https://github.com/ftlabs/fastclick#ignore-certain-elements- with-needsclick" target="_blank">click here for details</a>) to avoid `fastclick` logic conflicts with gestures inside the component. (no need to add if `list` is set)
|
|
@@ -34,97 +30,95 @@
|
|
|
34
30
|
*/
|
|
35
31
|
var Carousel = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
36
32
|
var className = props.className,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
33
|
+
wrapStyle = props.wrapStyle,
|
|
34
|
+
style = props.style,
|
|
35
|
+
children = props.children,
|
|
36
|
+
_props$list = props.list,
|
|
37
|
+
list = _props$list === void 0 ? [] : _props$list,
|
|
38
|
+
_props$animateDuratio = props.animateDuration,
|
|
39
|
+
animateDuration = _props$animateDuratio === void 0 ? 500 : _props$animateDuratio,
|
|
40
|
+
_props$animateDuratio2 = props.animateDurationSlide,
|
|
41
|
+
animateDurationSlide = _props$animateDuratio2 === void 0 ? 300 : _props$animateDuratio2,
|
|
42
|
+
_props$loop = props.loop,
|
|
43
|
+
loop = _props$loop === void 0 ? true : _props$loop,
|
|
44
|
+
_props$autoPlay = props.autoPlay,
|
|
45
|
+
autoPlay = _props$autoPlay === void 0 ? true : _props$autoPlay,
|
|
46
|
+
_props$autoPlayDirect = props.autoPlayDirection,
|
|
47
|
+
autoPlayDirection = _props$autoPlayDirect === void 0 ? 'normal' : _props$autoPlayDirect,
|
|
48
|
+
_props$swipeable = props.swipeable,
|
|
49
|
+
swipeable = _props$swipeable === void 0 ? true : _props$swipeable,
|
|
50
|
+
_props$stayDuration = props.stayDuration,
|
|
51
|
+
stayDuration = _props$stayDuration === void 0 ? 4000 : _props$stayDuration,
|
|
52
|
+
boxWidth = props.boxWidth,
|
|
53
|
+
boxHeight = props.boxHeight,
|
|
54
|
+
baseBoxWidth = props.baseBoxWidth,
|
|
55
|
+
baseBoxHeight = props.baseBoxHeight,
|
|
56
|
+
_props$width = props.width,
|
|
57
|
+
width = _props$width === void 0 ? 0 : _props$width,
|
|
58
|
+
height = props.height,
|
|
59
|
+
_props$initialIndex = props.initialIndex,
|
|
60
|
+
initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,
|
|
61
|
+
renderIndicator = props.renderIndicator,
|
|
62
|
+
_props$indicatorPos = props.indicatorPos,
|
|
63
|
+
indicatorPos = _props$indicatorPos === void 0 ? 'center' : _props$indicatorPos,
|
|
64
|
+
_props$indicatorVerti = props.indicatorVerticalPos,
|
|
65
|
+
indicatorVerticalPos = _props$indicatorVerti === void 0 ? 'left' : _props$indicatorVerti,
|
|
66
|
+
indicatorOutside = props.indicatorOutside,
|
|
67
|
+
_props$showIndicator = props.showIndicator,
|
|
68
|
+
showIndicator = _props$showIndicator === void 0 ? true : _props$showIndicator,
|
|
69
|
+
_props$hideSingleIndi = props.hideSingleIndicator,
|
|
70
|
+
hideSingleIndicator = _props$hideSingleIndi === void 0 ? true : _props$hideSingleIndi,
|
|
71
|
+
_props$indicatorType = props.indicatorType,
|
|
72
|
+
indicatorType = _props$indicatorType === void 0 ? 'square' : _props$indicatorType,
|
|
73
|
+
_props$indicatorClass = props.indicatorClass,
|
|
74
|
+
indicatorClass = _props$indicatorClass === void 0 ? '' : _props$indicatorClass,
|
|
75
|
+
indicatorInverse = props.indicatorInverse,
|
|
76
|
+
_props$spaceBetween = props.spaceBetween,
|
|
77
|
+
spaceBetween = _props$spaceBetween === void 0 ? 0 : _props$spaceBetween,
|
|
78
|
+
_props$offsetBetween = props.offsetBetween,
|
|
79
|
+
offsetBetween = _props$offsetBetween === void 0 ? 0 : _props$offsetBetween,
|
|
80
|
+
currentIndex = props.currentIndex,
|
|
81
|
+
_props$autoHeight = props.autoHeight,
|
|
82
|
+
autoHeight = _props$autoHeight === void 0 ? false : _props$autoHeight,
|
|
83
|
+
_props$percentToChang = props.percentToChange,
|
|
84
|
+
percentToChange = _props$percentToChang === void 0 ? 0.3 : _props$percentToChang,
|
|
85
|
+
_props$distanceToChan = props.distanceToChange,
|
|
86
|
+
distanceToChange = _props$distanceToChan === void 0 ? 10 : _props$distanceToChan,
|
|
87
|
+
_props$speedToChange = props.speedToChange,
|
|
88
|
+
speedToChange = _props$speedToChange === void 0 ? 100 : _props$speedToChange,
|
|
89
|
+
vertical = props.vertical,
|
|
90
|
+
lazyloadCount = props.lazyloadCount,
|
|
91
|
+
_props$inactiveScale = props.inactiveScale,
|
|
92
|
+
inactiveScale = _props$inactiveScale === void 0 ? 1 : _props$inactiveScale,
|
|
93
|
+
_props$stopPropagatio = props.stopPropagation,
|
|
94
|
+
stopPropagation = _props$stopPropagatio === void 0 ? true : _props$stopPropagatio,
|
|
95
|
+
_props$fakeItem = props.fakeItem,
|
|
96
|
+
fakeItem = _props$fakeItem === void 0 ? false : _props$fakeItem,
|
|
97
|
+
_props$allowEndBlank = props.allowEndBlank,
|
|
98
|
+
allowEndBlank = _props$allowEndBlank === void 0 ? false : _props$allowEndBlank,
|
|
99
|
+
_props$bounceWhenNoLo = props.bounceWhenNoLoop,
|
|
100
|
+
bounceWhenNoLoop = _props$bounceWhenNoLo === void 0 ? false : _props$bounceWhenNoLo,
|
|
101
|
+
_props$bounceDampRate = props.bounceDampRate,
|
|
102
|
+
bounceDampRate = _props$bounceDampRate === void 0 ? 3 : _props$bounceDampRate,
|
|
103
|
+
_props$iOSVisibleOpti = props.iOSVisibleOptimize,
|
|
104
|
+
iOSVisibleOptimize = _props$iOSVisibleOpti === void 0 ? true : _props$iOSVisibleOpti,
|
|
105
|
+
renderExtra = props.renderExtra,
|
|
106
|
+
distanceProcessor = props.distanceProcessor,
|
|
107
|
+
getInnerScrollContainer = props.getInnerScrollContainer,
|
|
108
|
+
onChange = props.onChange,
|
|
109
|
+
onAfterChange = props.onAfterChange,
|
|
110
|
+
onTouchStart = props.onTouchStart,
|
|
111
|
+
onTouchMove = props.onTouchMove,
|
|
112
|
+
onTouchEnd = props.onTouchEnd,
|
|
113
|
+
onTransitionStart = props.onTransitionStart,
|
|
114
|
+
onTransitionEnd = props.onTransitionEnd,
|
|
115
|
+
onDistanceChange = props.onDistanceChange,
|
|
116
|
+
_props$stopTouchThres = props.stopTouchThreshold,
|
|
117
|
+
stopTouchThreshold = _props$stopTouchThres === void 0 ? 0 : _props$stopTouchThres,
|
|
118
|
+
onTouchStopped = props.onTouchStopped,
|
|
119
|
+
onPageVisibleChange = props.onPageVisibleChange;
|
|
125
120
|
var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
useRtl = _useContext.useRtl;
|
|
128
122
|
var horizontalUseRtl = !vertical && useRtl;
|
|
129
123
|
var domRef = (0, _react.useRef)(null);
|
|
130
124
|
var wrapRef = (0, _react.useRef)(null);
|
|
@@ -136,70 +130,55 @@
|
|
|
136
130
|
var touchStartTimeRef = (0, _react.useRef)(0);
|
|
137
131
|
var touchStartedRef = (0, _react.useRef)(false);
|
|
138
132
|
var touchMovedRef = (0, _react.useRef)(false);
|
|
139
|
-
|
|
140
133
|
var _useState = (0, _react.useState)(baseBoxWidth || 0),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
134
|
+
wrapWidth = _useState[0],
|
|
135
|
+
setWrapWidth = _useState[1];
|
|
144
136
|
var _useState2 = (0, _react.useState)(baseBoxHeight || 0),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
137
|
+
wrapHeight = _useState2[0],
|
|
138
|
+
setWrapHeight = _useState2[1];
|
|
148
139
|
var touchStartXRef = (0, _react.useRef)(0);
|
|
149
140
|
var touchStartYRef = (0, _react.useRef)(0);
|
|
150
141
|
var scrollingRef = (0, _react.useRef)(null);
|
|
151
142
|
var touchStoppedRef = (0, _react.useRef)(false);
|
|
152
143
|
var bouncingRef = (0, _react.useRef)(false);
|
|
153
|
-
|
|
154
144
|
var _useState3 = (0, _react.useState)('auto'),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
145
|
+
currentItemHeight = _useState3[0],
|
|
146
|
+
setCurrentItemHeight = _useState3[1];
|
|
158
147
|
var _useRefState = (0, _helpers.useRefState)(false),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
148
|
+
posAdjusting = _useRefState[0],
|
|
149
|
+
posAdjustingRef = _useRefState[1],
|
|
150
|
+
setPosAdjusting = _useRefState[2];
|
|
163
151
|
var _useRefState2 = (0, _helpers.useRefState)(0),
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
152
|
+
distance = _useRefState2[0],
|
|
153
|
+
distanceRef = _useRefState2[1],
|
|
154
|
+
setDistance = _useRefState2[2];
|
|
168
155
|
var _useState4 = (0, _react.useState)(true),
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
156
|
+
isAutoJump = _useState4[0],
|
|
157
|
+
setIsAutoJump = _useState4[1];
|
|
172
158
|
var _useRefState3 = (0, _helpers.useRefState)(currentIndex !== void 0 ? currentIndex : initialIndex),
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
159
|
+
index = _useRefState3[0],
|
|
160
|
+
indexRef = _useRefState3[1],
|
|
161
|
+
setIndex = _useRefState3[2];
|
|
177
162
|
var _useRefState4 = (0, _helpers.useRefState)([]),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
163
|
+
transforms = _useRefState4[0],
|
|
164
|
+
transformsRef = _useRefState4[1],
|
|
165
|
+
setTransforms = _useRefState4[2];
|
|
182
166
|
var _useRefState5 = (0, _helpers.useRefState)((autoPlayDirection === 'reverse' || horizontalUseRtl) && autoPlay ? 'right' : 'left'),
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
167
|
+
direction = _useRefState5[0],
|
|
168
|
+
directionRef = _useRefState5[1],
|
|
169
|
+
setStateDirection = _useRefState5[2];
|
|
187
170
|
var lastDirectionRef = (0, _react.useRef)('');
|
|
188
171
|
var lastShownIndexRef = (0, _react.useRef)(-1);
|
|
189
|
-
|
|
190
172
|
var _getAllChildren = getAllChildren(),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
173
|
+
allChildren = _getAllChildren.allChildren,
|
|
174
|
+
fakeTwoChildren = _getAllChildren.fakeTwoChildren;
|
|
194
175
|
var total = allChildren.length;
|
|
195
176
|
var shownTotal = fakeTwoChildren ? 2 : total;
|
|
196
177
|
var indicatorArr = (0, _react.useMemo)(function () {
|
|
197
178
|
var arr = [];
|
|
198
|
-
|
|
199
179
|
for (var i = 0; i < shownTotal; i += 1) {
|
|
200
180
|
arr.push(i);
|
|
201
181
|
}
|
|
202
|
-
|
|
203
182
|
return arr;
|
|
204
183
|
}, [shownTotal]);
|
|
205
184
|
var rtlRatio = horizontalUseRtl ? -1 : 1;
|
|
@@ -223,14 +202,12 @@
|
|
|
223
202
|
var inactiveValidScale = (0, _react.useMemo)(function () {
|
|
224
203
|
return Math.max(0, Math.min(inactiveScale, 1));
|
|
225
204
|
}, [inactiveScale]);
|
|
226
|
-
|
|
227
205
|
var _useState5 = (0, _react.useState)([]),
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
206
|
+
fakeIndexes = _useState5[0],
|
|
207
|
+
setFakeIndexes = _useState5[1];
|
|
208
|
+
var system = (0, _helpers.useSystem)();
|
|
209
|
+
// 开启自动循环时iOS会有渲染问题需要强刷dom,但不需要autoPlay的不用强刷,这里判断下
|
|
232
210
|
// @en When the automatic loop is turned on, there will be rendering problems in iOS. Need to brush the dom, but if you don't need autoPlay, don't need to brush.
|
|
233
|
-
|
|
234
211
|
var needRefreshDom = !noInterval && system === 'ios' && iOSVisibleOptimize;
|
|
235
212
|
var setDirection = (0, _react.useCallback)(function (newDirec) {
|
|
236
213
|
setStateDirection(function (direc) {
|
|
@@ -245,17 +222,14 @@
|
|
|
245
222
|
if (onTouchStart && onTouchStart(e, shownTotal, getShownIndex(indexRef.current))) {
|
|
246
223
|
return;
|
|
247
224
|
}
|
|
248
|
-
|
|
249
225
|
if (posAdjustingRef.current) {
|
|
250
226
|
return;
|
|
251
|
-
}
|
|
227
|
+
}
|
|
228
|
+
// touchMove触发时,阻止handleTouchStart多次执行(如点击事件)
|
|
252
229
|
// @en When touchMove is triggered, prevent handleTouchStart from executing multiple times (such as click events)
|
|
253
|
-
|
|
254
|
-
|
|
255
230
|
if (touchStartedRef.current && touchMovedRef.current) {
|
|
256
231
|
return;
|
|
257
232
|
}
|
|
258
|
-
|
|
259
233
|
touchStartedRef.current = true;
|
|
260
234
|
touchMovedRef.current = false;
|
|
261
235
|
clear();
|
|
@@ -269,25 +243,20 @@
|
|
|
269
243
|
}, [shownTotal, onTouchStart]);
|
|
270
244
|
var triggerTouchStopped = (0, _react.useCallback)(function (posDis) {
|
|
271
245
|
var needStop = Math.abs(posDis) > stopTouchThreshold;
|
|
272
|
-
|
|
273
246
|
if (!touchStoppedRef.current && needStop) {
|
|
274
247
|
onTouchStopped && onTouchStopped(posDis >= 0 ? -1 : 1);
|
|
275
248
|
}
|
|
276
|
-
|
|
277
249
|
touchStoppedRef.current = needStop;
|
|
278
250
|
}, [stopTouchThreshold, onTouchStopped]);
|
|
279
251
|
var handleTouchMove = (0, _react.useCallback)(function (e) {
|
|
280
252
|
if (onTouchMove && onTouchMove(e, shownTotal, getShownIndex(indexRef.current))) {
|
|
281
253
|
return;
|
|
282
254
|
}
|
|
283
|
-
|
|
284
255
|
stopPropagation && e.stopPropagation();
|
|
285
|
-
|
|
286
256
|
if (!touchStartedRef.current || posAdjustingRef.current) {
|
|
287
257
|
e.cancelable && e.preventDefault();
|
|
288
258
|
return;
|
|
289
259
|
}
|
|
290
|
-
|
|
291
260
|
touchMovedRef.current = true;
|
|
292
261
|
var evt = e.changedTouches[0];
|
|
293
262
|
var touchMoveX = Math.max(0, evt.clientX || 0);
|
|
@@ -297,41 +266,33 @@
|
|
|
297
266
|
var absDisX = Math.abs(posDisX);
|
|
298
267
|
var absDisY = Math.abs(posDisY);
|
|
299
268
|
var originDis = vertical ? posDisY : posDisX;
|
|
300
|
-
|
|
301
269
|
var processor = distanceProcessor || function (dis, size, child) {
|
|
302
270
|
return child * (dis / size);
|
|
303
271
|
};
|
|
304
|
-
|
|
305
272
|
var posDis = processor(originDis, wrapSizeRef.current, childSize);
|
|
306
|
-
|
|
307
273
|
if (total < 2) {
|
|
308
274
|
triggerTouchStopped(posDis);
|
|
309
275
|
return;
|
|
310
276
|
}
|
|
311
|
-
|
|
312
277
|
if (scrollingRef.current === null) {
|
|
313
278
|
scrollingRef.current = vertical ? absDisY < absDisX : absDisX < absDisY;
|
|
314
|
-
}
|
|
279
|
+
}
|
|
280
|
+
// 如果是在滚动页面则禁用轮播图手势
|
|
315
281
|
// @en Disable carousel gestures if scrolling
|
|
316
|
-
|
|
317
|
-
|
|
318
282
|
if (scrollingRef.current) {
|
|
319
|
-
setDistance(0);
|
|
283
|
+
setDistance(0);
|
|
284
|
+
// bugfix: 未触发横滑就不触发touchend逻辑,且这个场景不需要触发onTouchStopped,因此直接设置touchStoppedRef
|
|
320
285
|
// @en bugfix: The touchend event will not be triggered if the horizontal swipe is not triggered, and this scene does not need to trigger onTouchStopped.
|
|
321
|
-
|
|
322
|
-
|
|
286
|
+
touchStoppedRef.current = true;
|
|
287
|
+
// 不会触发jumpTo,但touchstart时clear了,所以要手动设置一次interval
|
|
323
288
|
// @en JumpTo will not be triggered, but it is cleared in touchstart event, so need to manually set interval once
|
|
324
|
-
|
|
325
289
|
setPlayIntervalRef.current();
|
|
326
290
|
return;
|
|
327
291
|
}
|
|
328
|
-
|
|
329
292
|
setDirection(posDis >= 0 ? 'right' : 'left');
|
|
330
293
|
var comparedPos = posDis * rtlRatio;
|
|
331
|
-
|
|
332
294
|
if (noLoop && (indexRef.current === 0 && comparedPos > 0 || indexRef.current === total - 1 && comparedPos < 0)) {
|
|
333
295
|
triggerTouchStopped(posDis);
|
|
334
|
-
|
|
335
296
|
if (bounceWhenNoLoop && bounceDampRate) {
|
|
336
297
|
e.cancelable && e.preventDefault();
|
|
337
298
|
bouncingRef.current = true;
|
|
@@ -339,10 +300,8 @@
|
|
|
339
300
|
} else {
|
|
340
301
|
setDistance(0);
|
|
341
302
|
}
|
|
342
|
-
|
|
343
303
|
return;
|
|
344
304
|
}
|
|
345
|
-
|
|
346
305
|
e.cancelable && e.preventDefault();
|
|
347
306
|
touchStoppedRef.current = false;
|
|
348
307
|
var maxDis = childSize;
|
|
@@ -362,14 +321,13 @@
|
|
|
362
321
|
(0, _helpers.useSwiperInnerScroll)(getInnerScrollContainer);
|
|
363
322
|
var updateWhenVisible = (0, _react.useCallback)(function () {
|
|
364
323
|
fakeWrapRef.current && (fakeWrapRef.current.style.display = 'none');
|
|
365
|
-
wrapRef.current && (wrapRef.current.style.display = '');
|
|
324
|
+
wrapRef.current && (wrapRef.current.style.display = '');
|
|
325
|
+
// 部分情况下页面隐藏后容器宽度变成0,因此页面返回后需重新取一次容器尺寸
|
|
366
326
|
// @en In some cases, the width of the container becomes 0 after the page is invisible, so the container size needs to be resized after the page is visible.
|
|
367
|
-
|
|
368
327
|
updateDataRef.current();
|
|
369
328
|
}, []);
|
|
370
329
|
var updateWhenInvisible = (0, _react.useCallback)(function () {
|
|
371
330
|
clear();
|
|
372
|
-
|
|
373
331
|
if (wrapRef.current && fakeWrapRef.current) {
|
|
374
332
|
fakeWrapRef.current.style.height = (wrapRef.current.offsetHeight || 0) + "px";
|
|
375
333
|
fakeWrapRef.current.style.display = 'block';
|
|
@@ -379,10 +337,9 @@
|
|
|
379
337
|
(0, _react.useEffect)(function () {
|
|
380
338
|
if (onPageVisibleChange) {
|
|
381
339
|
return onPageVisibleChange(updateWhenVisible, updateWhenInvisible);
|
|
382
|
-
}
|
|
340
|
+
}
|
|
341
|
+
// ios 在页面隐藏后返回时会有dom结构正确但渲染错乱的情况,因此在页面隐藏时先用占位符,返回后重新渲染一次dom
|
|
383
342
|
// @en In iOS, When the page is invisible, the DOM will be correct but the rendering is disordered. So use a placeholder when the page is invisible, and re-render the DOM after it is visible.
|
|
384
|
-
|
|
385
|
-
|
|
386
343
|
var update = function update() {
|
|
387
344
|
if (document.visibilityState === 'visible') {
|
|
388
345
|
updateWhenVisible();
|
|
@@ -390,7 +347,6 @@
|
|
|
390
347
|
updateWhenInvisible();
|
|
391
348
|
}
|
|
392
349
|
};
|
|
393
|
-
|
|
394
350
|
document.addEventListener('visibilitychange', update);
|
|
395
351
|
return function () {
|
|
396
352
|
document.removeEventListener('visibilitychange', update);
|
|
@@ -411,7 +367,6 @@
|
|
|
411
367
|
wrapRef.current.addEventListener('touchstart', handleTouchStart);
|
|
412
368
|
wrapRef.current.addEventListener('touchmove', handleTouchMove);
|
|
413
369
|
}
|
|
414
|
-
|
|
415
370
|
return function () {
|
|
416
371
|
if (wrapRef.current && needTouchEvent) {
|
|
417
372
|
wrapRef.current.removeEventListener('touchstart', handleTouchStart);
|
|
@@ -474,43 +429,34 @@
|
|
|
474
429
|
if (!fakeItem || posAdjusting) {
|
|
475
430
|
return;
|
|
476
431
|
}
|
|
477
|
-
|
|
478
432
|
setCurrentFakeIndex();
|
|
479
433
|
}, [posAdjusting, index, direction, total, childSize, horizontalUseRtl]);
|
|
480
|
-
|
|
481
434
|
function getShownIndex(nowIndex) {
|
|
482
435
|
var validIndex = nowIndex === total ? 0 : nowIndex;
|
|
483
436
|
var shownInd = nowIndex === -1 ? total - 1 : validIndex;
|
|
484
437
|
return fakeTwoChildren ? shownInd % 2 : shownInd;
|
|
485
438
|
}
|
|
486
|
-
|
|
487
439
|
function getDynamicDuration(autoJump) {
|
|
488
440
|
return autoJump ? animateDuration : animateDurationSlide;
|
|
489
441
|
}
|
|
490
|
-
|
|
491
442
|
function setCurrentHeight() {
|
|
492
443
|
if (!innerRef.current || !autoHeight || vertical) {
|
|
493
444
|
return;
|
|
494
445
|
}
|
|
495
|
-
|
|
496
446
|
var allItemDom = itemsRef.current;
|
|
497
447
|
var nowIndex = getShownIndex(indexRef.current);
|
|
498
448
|
var currentHeight = (allItemDom[nowIndex] || {}).offsetHeight || 'auto';
|
|
499
449
|
setCurrentItemHeight(currentHeight);
|
|
500
450
|
}
|
|
501
|
-
|
|
502
451
|
function getAllChildren() {
|
|
503
452
|
var allChild = [];
|
|
504
453
|
var fakeTwo = false;
|
|
505
|
-
|
|
506
454
|
if (list && list.length) {
|
|
507
455
|
var actualList = list;
|
|
508
|
-
|
|
509
456
|
if (list.length === 2 && fakeItem) {
|
|
510
457
|
fakeTwo = true;
|
|
511
458
|
actualList = list.concat(list);
|
|
512
459
|
}
|
|
513
|
-
|
|
514
460
|
allChild = actualList.map(function (item, i) {
|
|
515
461
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
516
462
|
key: i,
|
|
@@ -524,7 +470,6 @@
|
|
|
524
470
|
});
|
|
525
471
|
} else if (children && Object.prototype.toString.call(children) === '[object Array]') {
|
|
526
472
|
allChild = children;
|
|
527
|
-
|
|
528
473
|
if (allChild.length === 2 && fakeItem) {
|
|
529
474
|
fakeTwo = true;
|
|
530
475
|
allChild = [].concat(allChild, allChild);
|
|
@@ -532,32 +477,25 @@
|
|
|
532
477
|
} else {
|
|
533
478
|
allChild = children ? [children] : [];
|
|
534
479
|
}
|
|
535
|
-
|
|
536
480
|
return {
|
|
537
481
|
allChildren: allChild,
|
|
538
482
|
fakeTwoChildren: fakeTwo
|
|
539
483
|
};
|
|
540
484
|
}
|
|
541
|
-
|
|
542
485
|
function getDefaultDirection() {
|
|
543
486
|
var nowIndex = indexRef.current;
|
|
544
|
-
|
|
545
487
|
if (nowIndex === total - 1) {
|
|
546
488
|
return horizontalUseRtl ? 'right' : 'left';
|
|
547
489
|
}
|
|
548
|
-
|
|
549
490
|
if (nowIndex === 0) {
|
|
550
491
|
return horizontalUseRtl ? 'left' : 'right';
|
|
551
492
|
}
|
|
552
|
-
|
|
553
493
|
return '';
|
|
554
494
|
}
|
|
555
|
-
|
|
556
495
|
function changeIndex(newIndex, rightNow, userSetDirec) {
|
|
557
496
|
if (posAdjustingRef.current) {
|
|
558
497
|
return;
|
|
559
498
|
}
|
|
560
|
-
|
|
561
499
|
if (userSetDirec) {
|
|
562
500
|
// rtl 模式取反
|
|
563
501
|
var direcMap = {
|
|
@@ -573,15 +511,12 @@
|
|
|
573
511
|
jumpTo(newIndex, true, rightNow);
|
|
574
512
|
}
|
|
575
513
|
}
|
|
576
|
-
|
|
577
514
|
function jumpTo(newIndex, autoJump, rightNow, direc) {
|
|
578
515
|
if (autoJump === void 0) {
|
|
579
516
|
autoJump = true;
|
|
580
517
|
}
|
|
581
|
-
|
|
582
518
|
var oldIndex = getShownIndex(indexRef.current);
|
|
583
519
|
var changedIndex = newIndex !== oldIndex ? getShownIndex(newIndex) : -1;
|
|
584
|
-
|
|
585
520
|
if (direc) {
|
|
586
521
|
setDirection(direc);
|
|
587
522
|
} else if (autoJump) {
|
|
@@ -591,7 +526,6 @@
|
|
|
591
526
|
} else {
|
|
592
527
|
setDirection('');
|
|
593
528
|
}
|
|
594
|
-
|
|
595
529
|
setPosAdjusting(true);
|
|
596
530
|
setIsAutoJump(autoJump);
|
|
597
531
|
setDistance(0);
|
|
@@ -604,7 +538,6 @@
|
|
|
604
538
|
setDirection(getDefaultDirection());
|
|
605
539
|
var newTransform = transformsRef.current.slice();
|
|
606
540
|
var transChanged = false;
|
|
607
|
-
|
|
608
541
|
if (newIndex === -1 && movedChildRef.current >= 0) {
|
|
609
542
|
newTransform[movedChildRef.current] = 0;
|
|
610
543
|
transChanged = true;
|
|
@@ -614,15 +547,12 @@
|
|
|
614
547
|
transChanged = true;
|
|
615
548
|
setIndex(0);
|
|
616
549
|
}
|
|
617
|
-
|
|
618
550
|
transChanged && setTransforms(newTransform);
|
|
619
551
|
setIsAutoJump(true);
|
|
620
552
|
onTransitionEnd && onTransitionEnd();
|
|
621
|
-
|
|
622
553
|
if (changedIndex >= 0) {
|
|
623
554
|
onAfterChange && onAfterChange(changedIndex, oldIndex);
|
|
624
555
|
}
|
|
625
|
-
|
|
626
556
|
(0, _mobileUtils.nextTick)(function () {
|
|
627
557
|
setPlayIntervalRef.current();
|
|
628
558
|
});
|
|
@@ -630,40 +560,32 @@
|
|
|
630
560
|
}, rightNow ? 0 : getDynamicDuration(autoJump));
|
|
631
561
|
autoJump && setDirection('');
|
|
632
562
|
}
|
|
633
|
-
|
|
634
563
|
function setPlayInterval() {
|
|
635
564
|
clear();
|
|
636
|
-
|
|
637
565
|
if (noInterval) {
|
|
638
566
|
return;
|
|
639
567
|
}
|
|
640
|
-
|
|
641
568
|
timerRef.current = delayTimeout(function () {
|
|
642
569
|
jumpTo(autoPlayDirection === 'reverse' ? indexRef.current - 1 : indexRef.current + 1);
|
|
643
570
|
}, stayDuration);
|
|
644
571
|
}
|
|
645
|
-
|
|
646
572
|
function updateLayoutData() {
|
|
647
573
|
if (wrapRef.current) {
|
|
648
574
|
setWrapWidth(wrapRef.current.offsetWidth);
|
|
649
575
|
setWrapHeight(wrapRef.current.offsetHeight);
|
|
650
576
|
}
|
|
651
|
-
|
|
652
577
|
setCurrentHeight();
|
|
653
578
|
}
|
|
654
|
-
|
|
655
579
|
function updateData() {
|
|
656
580
|
updateLayoutData();
|
|
657
581
|
setPlayIntervalRef.current();
|
|
658
582
|
}
|
|
659
|
-
|
|
660
583
|
function clear() {
|
|
661
584
|
if (timerRef.current) {
|
|
662
585
|
clearTimeout(timerRef.current);
|
|
663
586
|
timerRef.current = null;
|
|
664
587
|
}
|
|
665
588
|
}
|
|
666
|
-
|
|
667
589
|
function getFakeChild() {
|
|
668
590
|
if (noLoop) {
|
|
669
591
|
// 循环状态从有到无时,重置 transforms
|
|
@@ -671,7 +593,6 @@
|
|
|
671
593
|
setTransforms([]);
|
|
672
594
|
return;
|
|
673
595
|
}
|
|
674
|
-
|
|
675
596
|
var nowIndex = indexRef.current;
|
|
676
597
|
var newTransform = transformsRef.current.slice();
|
|
677
598
|
var dis = Math.max(0, childSize);
|
|
@@ -688,53 +609,42 @@
|
|
|
688
609
|
});
|
|
689
610
|
setTransforms(newTransform);
|
|
690
611
|
}
|
|
691
|
-
|
|
692
612
|
function delayTimeout(callback, timeout) {
|
|
693
613
|
return setTimeout(callback, timeout);
|
|
694
614
|
}
|
|
695
|
-
|
|
696
615
|
function handleTouchEnd(e) {
|
|
697
616
|
if (!needTouchEvent) {
|
|
698
617
|
return;
|
|
699
618
|
}
|
|
700
|
-
|
|
701
619
|
if (onTouchEnd && onTouchEnd(e.nativeEvent, shownTotal, getShownIndex(indexRef.current))) {
|
|
702
620
|
return;
|
|
703
621
|
}
|
|
704
|
-
|
|
705
622
|
stopPropagation && e.stopPropagation();
|
|
706
|
-
|
|
707
623
|
if (!touchStartedRef.current) {
|
|
708
624
|
return;
|
|
709
625
|
}
|
|
710
|
-
|
|
711
626
|
touchStartedRef.current = false;
|
|
712
|
-
|
|
713
627
|
if (!touchMovedRef.current) {
|
|
714
628
|
setPlayIntervalRef.current();
|
|
715
629
|
return;
|
|
716
630
|
}
|
|
717
|
-
|
|
718
|
-
|
|
631
|
+
touchMovedRef.current = false;
|
|
632
|
+
// bugfix: 回弹判断逻辑需在touchMovedRef标识重置逻辑之后,否则会在触发回弹后导致标识无法重置引起滑动判断问题
|
|
719
633
|
// @en bugfix: The logic for the bounce judgment needs to be after the touchMovedRef reset logic, otherwise it will cause the problem of slide judgment after the bounce is triggered.
|
|
720
|
-
|
|
721
634
|
if (bouncingRef.current) {
|
|
722
635
|
bouncingRef.current = false;
|
|
723
636
|
jumpTo(index, false);
|
|
724
637
|
return;
|
|
725
638
|
}
|
|
726
|
-
|
|
727
639
|
if (posAdjustingRef.current || touchStoppedRef.current) {
|
|
728
640
|
return;
|
|
729
641
|
}
|
|
730
|
-
|
|
731
642
|
var touchEndTime = new Date().getTime();
|
|
732
643
|
var dis = Math.abs(distance);
|
|
733
644
|
var speed = dis / (touchEndTime - touchStartTimeRef.current) * 1000;
|
|
734
645
|
var maxSlice = childSize * percentToChange;
|
|
735
646
|
var needJump = dis > maxSlice && dis > distanceToChange || speed > speedToChange;
|
|
736
647
|
var comparedDis = distance * rtlRatio;
|
|
737
|
-
|
|
738
648
|
if (comparedDis > 0 && needJump) {
|
|
739
649
|
jumpTo(index - 1, false);
|
|
740
650
|
} else if (comparedDis < 0 && needJump) {
|
|
@@ -743,14 +653,12 @@
|
|
|
743
653
|
jumpTo(index, false);
|
|
744
654
|
}
|
|
745
655
|
}
|
|
746
|
-
|
|
747
656
|
function getSlideTransitionStyle() {
|
|
748
657
|
return {
|
|
749
658
|
transitionProperty: posAdjusting ? 'transform' : 'none',
|
|
750
659
|
transitionDuration: posAdjusting ? dynamicAnimateDuration + "ms" : '0ms'
|
|
751
660
|
};
|
|
752
661
|
}
|
|
753
|
-
|
|
754
662
|
function getInnerStyle() {
|
|
755
663
|
var transitionStyle = (0, _helpers.getStyleWithVendor)(getSlideTransitionStyle());
|
|
756
664
|
var innerSize = childSize * total;
|
|
@@ -760,24 +668,21 @@
|
|
|
760
668
|
var minTransform = horizontalUseRtl ? -1 * max : min;
|
|
761
669
|
var maxTransform = horizontalUseRtl ? -1 * min : max;
|
|
762
670
|
var comparedDis = rtlRatio * distance;
|
|
763
|
-
var noLoopDis = bounceWhenNoLoop && (index === 0 && comparedDis > 0 || index === total - 1 && comparedDis < 0) ? Math.min(minTransform + distance, Math.max(maxTransform + distance, dis)) : Math.min(minTransform, Math.max(maxTransform, dis));
|
|
671
|
+
var noLoopDis = bounceWhenNoLoop && (index === 0 && comparedDis > 0 || index === total - 1 && comparedDis < 0) ? Math.min(minTransform + distance, Math.max(maxTransform + distance, dis)) : Math.min(minTransform, Math.max(maxTransform, dis));
|
|
672
|
+
// noLoop时需要在最后也露出spaceBetween的空白,所以当滑到最后一个时transform向左移动相应宽度
|
|
764
673
|
// @en When noLoop is used, the blank space of spaceBetween needs to be exposed at the end, so when sliding to the last one, the transform value moves to the left by the corresponding width
|
|
765
|
-
|
|
766
674
|
var translateDis = noLoop ? noLoopDis - (total > 1 && index === total - 1 ? spaceBetween : 0) * rtlRatio : dis;
|
|
767
|
-
var initTranslateDis = -1 * index * 100;
|
|
768
|
-
|
|
675
|
+
var initTranslateDis = -1 * index * 100;
|
|
676
|
+
// bugfix: prop `style` did not match in ssr
|
|
769
677
|
var transStr = childSize > 0 ? "" + translateDis + (translateDis ? 'px' : '') : "" + initTranslateDis + (initTranslateDis ? '%' : '');
|
|
770
|
-
|
|
771
678
|
if (vertical) {
|
|
772
679
|
var _translateStyle = (0, _helpers.getStyleWithVendor)({
|
|
773
680
|
transform: "translateY(" + transStr + ") translateZ(0)"
|
|
774
681
|
});
|
|
775
|
-
|
|
776
682
|
return (0, _extends3.default)({}, transitionStyle, _translateStyle, {
|
|
777
683
|
width: '100%'
|
|
778
684
|
});
|
|
779
685
|
}
|
|
780
|
-
|
|
781
686
|
var translateStyle = (0, _helpers.getStyleWithVendor)({
|
|
782
687
|
transform: "translateX(" + transStr + ") translateZ(0)"
|
|
783
688
|
});
|
|
@@ -786,41 +691,36 @@
|
|
|
786
691
|
height: height
|
|
787
692
|
}, transitionStyle, translateStyle);
|
|
788
693
|
}
|
|
789
|
-
|
|
790
694
|
function getCarouselStyle() {
|
|
791
695
|
if (vertical) {
|
|
792
696
|
return (0, _extends3.default)({
|
|
793
697
|
height: userSetBoxHeight
|
|
794
698
|
}, style || {});
|
|
795
699
|
}
|
|
796
|
-
|
|
797
700
|
var heightStyle = currentItemHeight && currentItemHeight !== 'auto' ? {
|
|
798
701
|
height: currentItemHeight
|
|
799
702
|
} : {};
|
|
800
703
|
return (0, _extends3.default)({
|
|
801
704
|
width: userSetBoxWidth
|
|
802
705
|
}, heightStyle, style || {});
|
|
803
|
-
}
|
|
804
|
-
// @en When the front or last slider is manually placed to the rear or the front through transform, it can be considered as the total or -1 module in the display layer
|
|
805
|
-
|
|
706
|
+
}
|
|
806
707
|
|
|
708
|
+
// 当最前或最后的滑块通过transform手动被放置到最后或最前时,在展示层可以认为是第total个或第-1个模块
|
|
709
|
+
// @en When the front or last slider is manually placed to the rear or the front through transform, it can be considered as the total or -1 module in the display layer
|
|
807
710
|
function getShownChildIndex(curIndex) {
|
|
808
711
|
var childIndex = curIndex;
|
|
809
|
-
|
|
810
712
|
if (transforms[childIndex] * rtlRatio > 0) {
|
|
811
713
|
childIndex = total;
|
|
812
714
|
} else if (transforms[childIndex] * rtlRatio < 0) {
|
|
813
715
|
childIndex = -1;
|
|
814
716
|
}
|
|
815
|
-
|
|
816
717
|
return childIndex;
|
|
817
|
-
}
|
|
818
|
-
// @en When there is exposed content on both sides, it is necessary to fake the front and rear dom to make visual filling in order to connect circularly.
|
|
819
|
-
|
|
718
|
+
}
|
|
820
719
|
|
|
720
|
+
// 当两侧有露出内容时,为了循环衔接上需要fake前后的dom来做视觉填充
|
|
721
|
+
// @en When there is exposed content on both sides, it is necessary to fake the front and rear dom to make visual filling in order to connect circularly.
|
|
821
722
|
function setCurrentFakeIndex() {
|
|
822
723
|
var newIndexes = fakeIndexes.slice();
|
|
823
|
-
|
|
824
724
|
if (childSize <= 0) {
|
|
825
725
|
if (index === 0) {
|
|
826
726
|
newIndexes[0] = {
|
|
@@ -828,88 +728,73 @@
|
|
|
828
728
|
side: 'left'
|
|
829
729
|
};
|
|
830
730
|
}
|
|
831
|
-
|
|
832
731
|
if (index === total - 1) {
|
|
833
732
|
newIndexes[2] = {
|
|
834
733
|
index: 0,
|
|
835
734
|
side: 'right'
|
|
836
735
|
};
|
|
837
736
|
}
|
|
838
|
-
|
|
839
737
|
setFakeIndexes(newIndexes);
|
|
840
738
|
return;
|
|
841
739
|
}
|
|
842
|
-
|
|
843
740
|
if (index === 1 && direction === rightDirec || index === 0 && direction !== rightDirec) {
|
|
844
741
|
newIndexes[0] = {
|
|
845
742
|
index: total - 1,
|
|
846
743
|
side: 'left'
|
|
847
744
|
};
|
|
848
745
|
}
|
|
849
|
-
|
|
850
746
|
if (index === 0 && direction === rightDirec || index === -1) {
|
|
851
747
|
newIndexes[1] = {
|
|
852
748
|
index: total - 2,
|
|
853
749
|
side: 'left'
|
|
854
750
|
};
|
|
855
751
|
}
|
|
856
|
-
|
|
857
752
|
if (index === total - 2 && direction === leftDirec || index === total - 1 && direction !== leftDirec) {
|
|
858
753
|
newIndexes[2] = {
|
|
859
754
|
index: 0,
|
|
860
755
|
side: 'right'
|
|
861
756
|
};
|
|
862
757
|
}
|
|
863
|
-
|
|
864
758
|
if (index === total - 1 && direction === leftDirec || index === total) {
|
|
865
759
|
newIndexes[3] = {
|
|
866
760
|
index: 1,
|
|
867
761
|
side: 'right'
|
|
868
762
|
};
|
|
869
763
|
}
|
|
870
|
-
|
|
871
764
|
setFakeIndexes(newIndexes);
|
|
872
765
|
}
|
|
873
|
-
|
|
874
766
|
function getItemTranslateStyle(childIndex, ratio) {
|
|
875
767
|
var dis = index - childIndex;
|
|
876
768
|
var prefix = dis > 0 ? 1 : -1;
|
|
877
769
|
var transPercent = 1 - inactiveValidScale;
|
|
878
770
|
var ratioWithRtl = ratio * rtlRatio;
|
|
879
771
|
var trans = 0;
|
|
880
|
-
|
|
881
772
|
if (Math.abs(dis) > 1) {
|
|
882
773
|
trans = (prefix * (Math.abs(dis) - 1) - ratioWithRtl) * transPercent * rtlRatio;
|
|
883
774
|
} else if (dis === -1 && ratioWithRtl > 0 || dis === 1 && ratioWithRtl < 0) {
|
|
884
775
|
trans = -1 * ratio * transPercent;
|
|
885
776
|
}
|
|
886
|
-
|
|
887
777
|
return "translate" + (vertical ? 'Y' : 'X') + "(" + trans * 100 + "%)";
|
|
888
778
|
}
|
|
889
|
-
|
|
890
779
|
function getItemScaleStyle(childIndex, ratio) {
|
|
891
|
-
var originScale = inactiveValidScale;
|
|
780
|
+
var originScale = inactiveValidScale;
|
|
781
|
+
// active滑块前后两侧的滑块,根据滑动距离等比放大
|
|
892
782
|
// @en The front and rear sides of the active slider, and zoom in proportionally according to the sliding distance
|
|
893
|
-
|
|
894
783
|
if (childIndex === index - 1 && direction === rightDirec || childIndex === index + 1 && direction === leftDirec) {
|
|
895
784
|
return originScale + (1 - originScale) * Math.abs(ratio);
|
|
896
|
-
}
|
|
785
|
+
}
|
|
786
|
+
// active的滑块,根据滑动距离等比缩小
|
|
897
787
|
// @en The active slider, zoom out proportionally according to the sliding distance
|
|
898
|
-
|
|
899
|
-
|
|
900
788
|
if (childIndex === index) {
|
|
901
789
|
return 1 - (1 - originScale) * Math.abs(ratio);
|
|
902
|
-
}
|
|
790
|
+
}
|
|
791
|
+
// 其他保持inactiveScale即可
|
|
903
792
|
// @en Others remain inactiveScale
|
|
904
|
-
|
|
905
|
-
|
|
906
793
|
return originScale;
|
|
907
794
|
}
|
|
908
|
-
|
|
909
795
|
function getItemOriginStyle(childIndex) {
|
|
910
796
|
var origin = 0.5;
|
|
911
797
|
var dis = childIndex - index;
|
|
912
|
-
|
|
913
798
|
if (dis === 0) {
|
|
914
799
|
// 当前active的卡片,随滑动方向切换origin
|
|
915
800
|
// @en The currently active card, switch origin with the sliding direction
|
|
@@ -923,21 +808,19 @@
|
|
|
923
808
|
// @en The cards after the currently active card, the origin is on the far left
|
|
924
809
|
origin = horizontalUseRtl ? 1 : 0;
|
|
925
810
|
}
|
|
926
|
-
|
|
927
811
|
var originStr = origin * 100 + "%";
|
|
928
812
|
return vertical ? "center " + originStr : originStr + " center";
|
|
929
813
|
}
|
|
930
|
-
|
|
931
814
|
function getItemInnerStyle(curIndex) {
|
|
932
815
|
var transitionStyle = getSlideTransitionStyle();
|
|
933
816
|
var childIndex = getShownChildIndex(curIndex);
|
|
934
|
-
var ratio = distance / childSize || 0;
|
|
817
|
+
var ratio = distance / childSize || 0;
|
|
818
|
+
// 有放大效果的item,随着distance变化而变化scale和transform-origin
|
|
935
819
|
// @en Item with magnification effect, scale and transform-origin change with distance
|
|
936
820
|
// transform效果与fake dom时item的transform需隔离,且scale后会影响item的padding展示
|
|
937
821
|
// @en The transform effect of the item needs to be isolated from the fake dom, and the padding display of the item will be affected after scale.
|
|
938
822
|
// 因此需要缩放时多包裹一层item-inner,单独处理缩放逻辑
|
|
939
823
|
// @en Therefore, need to wrap an additional layer of item-inner when scaling, and handle the scaling logic separately
|
|
940
|
-
|
|
941
824
|
var scale = getItemScaleStyle(childIndex, ratio);
|
|
942
825
|
var transformStyle = {
|
|
943
826
|
transform: getItemTranslateStyle(childIndex, ratio) + " scale(" + scale + ")",
|
|
@@ -945,10 +828,8 @@
|
|
|
945
828
|
};
|
|
946
829
|
return (0, _helpers.getStyleWithVendor)((0, _extends3.default)({}, transitionStyle, transformStyle));
|
|
947
830
|
}
|
|
948
|
-
|
|
949
831
|
function getItemFakeStyle(childIndex) {
|
|
950
832
|
var _extends2, _ref, _ref2;
|
|
951
|
-
|
|
952
833
|
var styleMap = {
|
|
953
834
|
leftDirec: vertical ? 'top' : leftDirec,
|
|
954
835
|
rightDirec: vertical ? 'bottom' : rightDirec,
|
|
@@ -959,10 +840,8 @@
|
|
|
959
840
|
position: 'absolute'
|
|
960
841
|
}, _extends2[styleMap.otherDirec] = 0, _extends2), childIndex >= 0 ? (_ref = {}, _ref[styleMap.leftDirec] = childSize > 0 ? '100%' : total * 100 + "%", _ref.transform = "translate" + styleMap.trans + "(" + (childIndex - total) * rtlRatio * 100 + "%)", _ref) : (_ref2 = {}, _ref2[styleMap.rightDirec] = '100%', _ref2.transform = "translate" + styleMap.trans + "(" + (childIndex + 1) * rtlRatio * 100 + "%)", _ref2));
|
|
961
842
|
}
|
|
962
|
-
|
|
963
843
|
function getItemStyle(childIndex, isFake) {
|
|
964
844
|
var _ref3, _ref4;
|
|
965
|
-
|
|
966
845
|
var initialStartSpace = spaceBetween + leftOffset;
|
|
967
846
|
var initialEndSpace = spaceBetween + rightOffset;
|
|
968
847
|
var initalSize = vertical ? userSetBoxHeight : '100%';
|
|
@@ -973,26 +852,23 @@
|
|
|
973
852
|
paddingStart: vertical ? 'paddingTop' : horizontalPaddingStart,
|
|
974
853
|
paddingEnd: vertical ? 'paddingBottom' : horizontalPaddingEnd,
|
|
975
854
|
translate: vertical ? 'translateY' : 'translateX'
|
|
976
|
-
};
|
|
855
|
+
};
|
|
856
|
+
// bugfix: item 为半透明状态下 fakeItem 和普通 item 重叠露馅问题
|
|
977
857
|
// @en bugfix: Solve the problem of overlapping fakeItem and the normal item when item is translucent
|
|
978
|
-
|
|
979
858
|
var transformStyle = isFake ? {
|
|
980
859
|
visibility: childIndex === total && transforms[0] > 0 || childIndex === -1 && transforms[total - 1] < 0 ? 'hidden' : 'initial'
|
|
981
860
|
} : {
|
|
982
861
|
transform: styleMap.translate + "(" + (transforms[childIndex] || 0) + "px)"
|
|
983
|
-
};
|
|
862
|
+
};
|
|
863
|
+
// childSize <= 0 说明是未全部加载完成的首屏情况 做一下特殊处理
|
|
984
864
|
// @en childSize <= 0 indicates that the first screen is not fully loaded, so do some special treatment
|
|
985
|
-
|
|
986
865
|
var layoutStyle = childSize > 0 ? (_ref3 = {}, _ref3[styleMap.size] = childSize - spaceBetween, _ref3[styleMap.paddingStart] = spaceBetween, _ref3.boxSizing = 'content-box', _ref3) : (_ref4 = {}, _ref4[styleMap.size] = initalSize, _ref4[styleMap.paddingStart] = initialStartSpace, _ref4[styleMap.paddingEnd] = initialEndSpace, _ref4.boxSizing = 'border-box', _ref4.transform = styleMap.translate + "(" + (childIndex === index ? 0 : (index - childIndex) * (spaceBetween + leftOffset + rightOffset)) + "px)", _ref4);
|
|
987
866
|
var fakeStyle = isFake ? getItemFakeStyle(childIndex) : {};
|
|
988
|
-
|
|
989
867
|
if (isFake && childSize < 0) {
|
|
990
868
|
delete fakeStyle.transform;
|
|
991
869
|
}
|
|
992
|
-
|
|
993
870
|
return (0, _helpers.getStyleWithVendor)((0, _extends3.default)({}, transformStyle, layoutStyle, fakeStyle));
|
|
994
871
|
}
|
|
995
|
-
|
|
996
872
|
function renderChild(child, childIndex, prefix) {
|
|
997
873
|
// 兼容线上逻辑,不需要切换放大效果的,不包裹item-inner
|
|
998
874
|
// @en No need to switch the magnification effect, do not wrap item-inner
|
|
@@ -1001,12 +877,10 @@
|
|
|
1001
877
|
style: getItemInnerStyle(childIndex)
|
|
1002
878
|
}, child);
|
|
1003
879
|
}
|
|
1004
|
-
|
|
1005
880
|
function renderFakeItem(prefix, fakeIndex, side) {
|
|
1006
881
|
if (!fakeItem || fakeIndex === void 0) {
|
|
1007
882
|
return null;
|
|
1008
883
|
}
|
|
1009
|
-
|
|
1010
884
|
var posIndex = side === 'left' ? fakeIndex - total : fakeIndex + total;
|
|
1011
885
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1012
886
|
key: "" + fakeIndex + posIndex,
|
|
@@ -1018,16 +892,13 @@
|
|
|
1018
892
|
style: getItemStyle(posIndex, true)
|
|
1019
893
|
}, renderChild(allChildren[fakeIndex], posIndex, prefix));
|
|
1020
894
|
}
|
|
1021
|
-
|
|
1022
895
|
function renderAllFakeItem(prefix) {
|
|
1023
896
|
return fakeIndexes.map(function (fakeIndex) {
|
|
1024
897
|
return renderFakeItem(prefix, fakeIndex.index, fakeIndex.side);
|
|
1025
898
|
});
|
|
1026
899
|
}
|
|
1027
|
-
|
|
1028
900
|
function renderCarousel(_ref5) {
|
|
1029
901
|
var _cls;
|
|
1030
|
-
|
|
1031
902
|
var prefixCls = _ref5.prefixCls;
|
|
1032
903
|
var prefix = prefixCls + "-carousel";
|
|
1033
904
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1081,7 +952,6 @@
|
|
|
1081
952
|
});
|
|
1082
953
|
})) : null);
|
|
1083
954
|
}
|
|
1084
|
-
|
|
1085
955
|
return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, renderCarousel);
|
|
1086
956
|
});
|
|
1087
957
|
var _default = Carousel;
|