@nutui/nutui-react-taro 3.0.18 → 3.0.19-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -10
- package/dist/cjs/hooks/taro/use-custom-event.js +5 -5
- package/dist/cjs/hooks/use-ref-state.js +3 -3
- package/dist/cjs/hooks/use-touch.js +1 -2
- package/dist/cjs/locales/ja-JP.d.ts +3 -0
- package/dist/cjs/locales/ja-JP.js +168 -0
- package/dist/cjs/packages/actionsheet/style/style.harmony.css +0 -3
- package/dist/cjs/packages/address/style/style.harmony.css +0 -3
- package/dist/cjs/packages/address/utils.js +3 -3
- package/dist/cjs/packages/animatingnumbers/countup.js +2 -0
- package/dist/cjs/packages/avatar/avatar.js +3 -1
- package/dist/cjs/packages/avatarcropper/avatarcropper.js +22 -30
- package/dist/cjs/packages/badge/badge.js +4 -7
- package/dist/cjs/packages/badge/style/badge.scss +1 -1
- package/dist/cjs/packages/badge/style/style.css +1 -1
- package/dist/cjs/packages/badge/style/style.harmony.css +1 -1
- package/dist/cjs/packages/badge/style-jmapp/badge.scss +1 -1
- package/dist/cjs/packages/badge/style-jmapp/style.css +1 -1
- package/dist/cjs/packages/badge/style-jrkf/badge.scss +1 -1
- package/dist/cjs/packages/badge/style-jrkf/style.css +1 -1
- package/dist/cjs/packages/barrage/barrage.js +14 -24
- package/dist/cjs/packages/calendar/style/style.harmony.css +0 -3
- package/dist/cjs/packages/calendar/utils.js +8 -8
- package/dist/cjs/packages/calendarcard/icon.js +5 -5
- package/dist/cjs/packages/calendarcard/utils.js +6 -6
- package/dist/cjs/packages/card/style/style.harmony.css +3 -3
- package/dist/cjs/packages/cascader/cascader.js +12 -21
- package/dist/cjs/packages/cascader/style/style.harmony.css +0 -3
- package/dist/cjs/packages/cascader/utils.js +3 -3
- package/dist/cjs/packages/col/col.js +16 -11
- package/dist/cjs/packages/collapseitem/collapseitem.js +4 -7
- package/dist/cjs/packages/configprovider/configprovider.js +7 -7
- package/dist/cjs/packages/configprovider/index.js +6 -6
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/countdown/countdown.js +1 -2
- package/dist/cjs/packages/countdown/style/countdown.scss +1 -1
- package/dist/cjs/packages/countdown/style/style.css +1 -1
- package/dist/cjs/packages/countdown/style/style.harmony.css +1 -1
- package/dist/cjs/packages/countdown/style-jmapp/countdown.scss +1 -1
- package/dist/cjs/packages/countdown/style-jmapp/style.css +1 -1
- package/dist/cjs/packages/countdown/style-jrkf/countdown.scss +1 -1
- package/dist/cjs/packages/countdown/style-jrkf/style.css +1 -1
- package/dist/cjs/packages/datepicker/style/style.harmony.css +0 -3
- package/dist/cjs/packages/datepicker/utils.js +9 -9
- package/dist/cjs/packages/dialog/content.js +3 -3
- package/dist/cjs/packages/dialog/dialog.d.ts +2 -37
- package/dist/cjs/packages/dialog/dialog.js +8 -11
- package/dist/cjs/packages/dialog/style/dialog.scss +9 -1
- package/dist/cjs/packages/dialog/style/style.css +8 -1
- package/dist/cjs/packages/dialog/style/style.harmony.css +8 -1
- package/dist/cjs/packages/dialog/style-jmapp/dialog.scss +9 -1
- package/dist/cjs/packages/dialog/style-jmapp/style.css +8 -1
- package/dist/cjs/packages/dialog/style-jrkf/dialog.scss +9 -1
- package/dist/cjs/packages/dialog/style-jrkf/style.css +8 -1
- package/dist/cjs/packages/drag/drag.js +4 -7
- package/dist/cjs/packages/elevator/elevator.js +7 -10
- package/dist/cjs/packages/ellipsis/ellipsis.js +17 -30
- package/dist/cjs/packages/fixednav/style/style.harmony.css +1 -1
- package/dist/cjs/packages/form/index.js +0 -2
- package/dist/cjs/packages/form/useform.js +50 -57
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +0 -3
- package/dist/cjs/packages/infiniteloading/infiniteloading.js +8 -14
- package/dist/cjs/packages/input/input.js +13 -4
- package/dist/cjs/packages/inputnumber/inputnumber.js +16 -28
- package/dist/cjs/packages/lottie/lottiemp.js +18 -10
- package/dist/cjs/packages/lottie/types.js +0 -2
- package/dist/cjs/packages/menuitem/menuitem.js +24 -22
- package/dist/cjs/packages/noticebar/noticebar.js +71 -67
- package/dist/cjs/packages/notify/notify.js +4 -4
- package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +0 -3
- package/dist/cjs/packages/nutui.react.build.js +105 -105
- package/dist/cjs/packages/nutui.react.js +105 -105
- package/dist/cjs/packages/overlay/overlay.js +3 -3
- package/dist/cjs/packages/picker/style/style.harmony.css +0 -3
- package/dist/cjs/packages/pickerview/pickerroller.js +4 -7
- package/dist/cjs/packages/pickerview/pickerview.js +1 -2
- package/dist/cjs/packages/pickerview/utils.js +3 -3
- package/dist/cjs/packages/popover/popover.js +75 -77
- package/dist/cjs/packages/popover/style/style.harmony.css +0 -3
- package/dist/cjs/packages/popup/popup.d.ts +1 -1
- package/dist/cjs/packages/popup/popup.js +103 -10
- package/dist/cjs/packages/popup/style/popup.scss +0 -5
- package/dist/cjs/packages/popup/style/style.css +0 -3
- package/dist/cjs/packages/popup/style/style.harmony.css +0 -3
- package/dist/cjs/packages/popup/style-jmapp/popup.scss +0 -5
- package/dist/cjs/packages/popup/style-jmapp/style.css +0 -3
- package/dist/cjs/packages/popup/style-jrkf/popup.scss +0 -5
- package/dist/cjs/packages/popup/style-jrkf/style.css +0 -3
- package/dist/cjs/packages/price/style/price.scss +3 -3
- package/dist/cjs/packages/price/style/style.css +3 -3
- package/dist/cjs/packages/price/style/style.harmony.css +3 -3
- package/dist/cjs/packages/price/style-jmapp/price.scss +3 -3
- package/dist/cjs/packages/price/style-jmapp/style.css +3 -3
- package/dist/cjs/packages/price/style-jrkf/price.scss +3 -3
- package/dist/cjs/packages/price/style-jrkf/style.css +3 -3
- package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +52 -56
- package/dist/cjs/packages/radio/index.js +0 -2
- package/dist/cjs/packages/range/range.js +18 -55
- package/dist/cjs/packages/rate/rate.js +8 -5
- package/dist/cjs/packages/rate/style/rate.scss +1 -1
- package/dist/cjs/packages/rate/style/style.css +1 -1
- package/dist/cjs/packages/rate/style/style.harmony.css +1 -1
- package/dist/cjs/packages/rate/style-jmapp/rate.scss +1 -1
- package/dist/cjs/packages/rate/style-jmapp/style.css +1 -1
- package/dist/cjs/packages/rate/style-jrkf/rate.scss +1 -1
- package/dist/cjs/packages/rate/style-jrkf/style.css +1 -1
- package/dist/cjs/packages/searchbar/searchbar.js +4 -4
- package/dist/cjs/packages/shortpassword/shortpassword.js +3 -3
- package/dist/cjs/packages/shortpassword/style/style.harmony.css +0 -3
- package/dist/cjs/packages/signature/signature.js +10 -2
- package/dist/cjs/packages/sticky/sticky.js +4 -7
- package/dist/cjs/packages/swipe/swipe.js +44 -46
- package/dist/cjs/packages/swiper/index.js +0 -1
- package/dist/cjs/packages/swiper/swiper.js +1 -2
- package/dist/cjs/packages/switch/switch.js +4 -7
- package/dist/cjs/packages/tabbar/style/style.harmony.css +1 -1
- package/dist/cjs/packages/tabbaritem/style/style.harmony.css +1 -1
- package/dist/cjs/packages/textarea/textarea.js +2 -1
- package/dist/cjs/packages/timeselect/style/style.harmony.css +0 -3
- package/dist/cjs/packages/toast/toast.js +4 -4
- package/dist/cjs/packages/tour/style/style.harmony.css +0 -3
- package/dist/cjs/packages/uploader/uploader.js +40 -52
- package/dist/cjs/packages/virtuallist/utils.js +6 -6
- package/dist/cjs/packages/watermark/watermark.js +4 -8
- package/dist/cjs/types/spec/address/base.js +0 -2
- package/dist/cjs/types/spec/avatar/taro.d.ts +7 -1
- package/dist/cjs/types/spec/popup/base.d.ts +5 -0
- package/dist/cjs/types/spec/searchbar/h5.d.ts +2 -1
- package/dist/cjs/types/spec/searchbar/taro.d.ts +1 -0
- package/dist/cjs/utils/date.js +5 -5
- package/dist/cjs/utils/event-mocker.js +10 -18
- package/dist/cjs/utils/get-rect.js +4 -4
- package/dist/cjs/utils/get-scroll-parent.js +3 -3
- package/dist/cjs/utils/merge-props.js +3 -3
- package/dist/cjs/utils/merge.js +6 -6
- package/dist/cjs/utils/raf.js +3 -3
- package/dist/cjs/utils/render.js +5 -9
- package/dist/cjs/utils/rubberband.js +3 -3
- package/dist/cjs/utils/taro/get-rect.js +14 -24
- package/dist/cjs/utils/taro/get-system-info.js +4 -4
- package/dist/cjs/utils/taro/platform.js +5 -5
- package/dist/es/hooks/use-touch.js +1 -1
- package/dist/es/locales/ja-JP.d.ts +3 -0
- package/dist/es/locales/ja-JP.js +158 -0
- package/dist/es/packages/actionsheet/style/style.harmony.css +0 -3
- package/dist/es/packages/address/style/style.harmony.css +0 -3
- package/dist/es/packages/animatingnumbers/countup.js +2 -0
- package/dist/es/packages/avatar/avatar.js +3 -1
- package/dist/es/packages/avatarcropper/avatarcropper.js +24 -32
- package/dist/es/packages/badge/badge.js +4 -7
- package/dist/es/packages/badge/style/badge.scss +1 -1
- package/dist/es/packages/badge/style/style.css +1 -1
- package/dist/es/packages/badge/style/style.harmony.css +1 -1
- package/dist/es/packages/badge/style-jmapp/badge.scss +1 -1
- package/dist/es/packages/badge/style-jmapp/style.css +1 -1
- package/dist/es/packages/badge/style-jrkf/badge.scss +1 -1
- package/dist/es/packages/badge/style-jrkf/style.css +1 -1
- package/dist/es/packages/barrage/barrage.js +14 -24
- package/dist/es/packages/calendar/style/style.harmony.css +0 -3
- package/dist/es/packages/card/style/style.harmony.css +3 -3
- package/dist/es/packages/cascader/cascader.js +12 -21
- package/dist/es/packages/cascader/style/style.harmony.css +0 -3
- package/dist/es/packages/col/col.js +17 -12
- package/dist/es/packages/collapseitem/collapseitem.js +4 -7
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/countdown/countdown.js +1 -2
- package/dist/es/packages/countdown/style/countdown.scss +1 -1
- package/dist/es/packages/countdown/style/style.css +1 -1
- package/dist/es/packages/countdown/style/style.harmony.css +1 -1
- package/dist/es/packages/countdown/style-jmapp/countdown.scss +1 -1
- package/dist/es/packages/countdown/style-jmapp/style.css +1 -1
- package/dist/es/packages/countdown/style-jrkf/countdown.scss +1 -1
- package/dist/es/packages/countdown/style-jrkf/style.css +1 -1
- package/dist/es/packages/datepicker/style/style.harmony.css +0 -3
- package/dist/es/packages/dialog/dialog.d.ts +2 -37
- package/dist/es/packages/dialog/dialog.js +4 -7
- package/dist/es/packages/dialog/style/dialog.scss +9 -1
- package/dist/es/packages/dialog/style/style.css +8 -1
- package/dist/es/packages/dialog/style/style.harmony.css +8 -1
- package/dist/es/packages/dialog/style-jmapp/dialog.scss +9 -1
- package/dist/es/packages/dialog/style-jmapp/style.css +8 -1
- package/dist/es/packages/dialog/style-jrkf/dialog.scss +9 -1
- package/dist/es/packages/dialog/style-jrkf/style.css +8 -1
- package/dist/es/packages/drag/drag.js +4 -7
- package/dist/es/packages/elevator/elevator.js +4 -7
- package/dist/es/packages/ellipsis/ellipsis.js +17 -30
- package/dist/es/packages/fixednav/style/style.harmony.css +1 -1
- package/dist/es/packages/form/index.js +0 -1
- package/dist/es/packages/form/useform.js +46 -53
- package/dist/es/packages/imagepreview/style/style.harmony.css +0 -3
- package/dist/es/packages/infiniteloading/infiniteloading.js +8 -14
- package/dist/es/packages/input/input.js +13 -4
- package/dist/es/packages/inputnumber/inputnumber.js +16 -28
- package/dist/es/packages/lottie/lottiemp.js +20 -12
- package/dist/es/packages/lottie/types.js +1 -1
- package/dist/es/packages/menuitem/menuitem.js +24 -22
- package/dist/es/packages/noticebar/noticebar.js +71 -67
- package/dist/es/packages/numberkeyboard/style/style.harmony.css +0 -3
- package/dist/es/packages/picker/style/style.harmony.css +0 -3
- package/dist/es/packages/pickerview/pickerroller.js +4 -7
- package/dist/es/packages/pickerview/pickerview.js +1 -2
- package/dist/es/packages/popover/popover.js +75 -77
- package/dist/es/packages/popover/style/style.harmony.css +0 -3
- package/dist/es/packages/popup/popup.d.ts +1 -1
- package/dist/es/packages/popup/popup.js +104 -11
- package/dist/es/packages/popup/style/popup.scss +0 -5
- package/dist/es/packages/popup/style/style.css +0 -3
- package/dist/es/packages/popup/style/style.harmony.css +0 -3
- package/dist/es/packages/popup/style-jmapp/popup.scss +0 -5
- package/dist/es/packages/popup/style-jmapp/style.css +0 -3
- package/dist/es/packages/popup/style-jrkf/popup.scss +0 -5
- package/dist/es/packages/popup/style-jrkf/style.css +0 -3
- package/dist/es/packages/price/style/price.scss +3 -3
- package/dist/es/packages/price/style/style.css +3 -3
- package/dist/es/packages/price/style/style.harmony.css +3 -3
- package/dist/es/packages/price/style-jmapp/price.scss +3 -3
- package/dist/es/packages/price/style-jmapp/style.css +3 -3
- package/dist/es/packages/price/style-jrkf/price.scss +3 -3
- package/dist/es/packages/price/style-jrkf/style.css +3 -3
- package/dist/es/packages/pulltorefresh/pulltorefresh.js +52 -56
- package/dist/es/packages/radio/index.js +0 -1
- package/dist/es/packages/range/range.js +19 -56
- package/dist/es/packages/rate/rate.js +9 -6
- package/dist/es/packages/rate/style/rate.scss +1 -1
- package/dist/es/packages/rate/style/style.css +1 -1
- package/dist/es/packages/rate/style/style.harmony.css +1 -1
- package/dist/es/packages/rate/style-jmapp/rate.scss +1 -1
- package/dist/es/packages/rate/style-jmapp/style.css +1 -1
- package/dist/es/packages/rate/style-jrkf/rate.scss +1 -1
- package/dist/es/packages/rate/style-jrkf/style.css +1 -1
- package/dist/es/packages/searchbar/searchbar.js +4 -4
- package/dist/es/packages/shortpassword/style/style.harmony.css +0 -3
- package/dist/es/packages/signature/signature.js +10 -2
- package/dist/es/packages/sticky/sticky.js +4 -7
- package/dist/es/packages/swipe/swipe.js +45 -47
- package/dist/es/packages/swiper/index.js +0 -1
- package/dist/es/packages/swiper/swiper.js +1 -2
- package/dist/es/packages/switch/switch.js +4 -7
- package/dist/es/packages/tabbar/style/style.harmony.css +1 -1
- package/dist/es/packages/tabbaritem/style/style.harmony.css +1 -1
- package/dist/es/packages/textarea/textarea.js +2 -1
- package/dist/es/packages/timeselect/style/style.harmony.css +0 -3
- package/dist/es/packages/tour/style/style.harmony.css +0 -3
- package/dist/es/packages/uploader/uploader.js +40 -52
- package/dist/es/packages/watermark/watermark.js +4 -8
- package/dist/es/types/spec/address/base.js +1 -1
- package/dist/es/types/spec/avatar/taro.d.ts +7 -1
- package/dist/es/types/spec/popup/base.d.ts +20 -0
- package/dist/es/types/spec/searchbar/h5.d.ts +2 -1
- package/dist/es/types/spec/searchbar/taro.d.ts +1 -0
- package/dist/es/utils/event-mocker.js +4 -12
- package/dist/es/utils/render.js +2 -6
- package/dist/es/utils/taro/get-rect.js +10 -20
- package/dist/nutui.react.umd.js +850 -927
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +34 -34
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +30 -30
- package/dist/style.css +1 -1
- package/dist/style.scss +44 -44
- package/dist/styles/jd-font.scss +4 -4
- package/dist/styles/theme-dark.scss +90 -56
- package/dist/styles/theme-default.scss +94 -60
- package/dist/styles/themes/dark.css +1 -1
- package/dist/styles/themes/default.css +1 -1
- package/dist/styles/variables-jmapp.scss +4 -0
- package/dist/styles/variables-jrkf.scss +4 -0
- package/dist/styles/variables.scss +4 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export { };
|
|
@@ -48,28 +48,30 @@ export var MenuItem = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
48
48
|
show
|
|
49
49
|
]);
|
|
50
50
|
var getParentOffset = useCallback(function() {
|
|
51
|
-
setTimeout(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
51
|
+
setTimeout(function() {
|
|
52
|
+
return _async_to_generator(function() {
|
|
53
|
+
var p, rect;
|
|
54
|
+
return _ts_generator(this, function(_state) {
|
|
55
|
+
switch(_state.label){
|
|
56
|
+
case 0:
|
|
57
|
+
p = parent.menuRef.current;
|
|
58
|
+
return [
|
|
59
|
+
4,
|
|
60
|
+
getRectInMultiPlatform(p)
|
|
61
|
+
];
|
|
62
|
+
case 1:
|
|
63
|
+
rect = _state.sent();
|
|
64
|
+
setPosition({
|
|
65
|
+
height: rect.height,
|
|
66
|
+
top: rect.top
|
|
67
|
+
});
|
|
68
|
+
return [
|
|
69
|
+
2
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
})();
|
|
74
|
+
}, 100);
|
|
73
75
|
}, [
|
|
74
76
|
parent.menuRef
|
|
75
77
|
]);
|
|
@@ -121,46 +121,48 @@ export var NoticeBar = function(props) {
|
|
|
121
121
|
if (showNoticeBar === false) {
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
|
-
setTimeout(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
setTimeout(function() {
|
|
125
|
+
return _async_to_generator(function() {
|
|
126
|
+
var warpRes, contentRes, wrapW, offsetW, canScroll;
|
|
127
|
+
return _ts_generator(this, function(_state) {
|
|
128
|
+
switch(_state.label){
|
|
129
|
+
case 0:
|
|
130
|
+
if (!wrapRef.current || !contentRef.current) {
|
|
131
|
+
return [
|
|
132
|
+
2
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
return [
|
|
136
|
+
4,
|
|
137
|
+
getRectInMultiPlatform(wrapRef.current)
|
|
138
|
+
];
|
|
139
|
+
case 1:
|
|
140
|
+
warpRes = _state.sent();
|
|
141
|
+
return [
|
|
142
|
+
4,
|
|
143
|
+
getRectInMultiPlatform(contentRef.current)
|
|
144
|
+
];
|
|
145
|
+
case 2:
|
|
146
|
+
contentRes = _state.sent();
|
|
147
|
+
wrapW = warpRes.width;
|
|
148
|
+
offsetW = contentRes.width;
|
|
149
|
+
canScroll = align === 'left' && scrollable == null ? offsetW > wrapW : scrollable;
|
|
150
|
+
SetIsCanScroll(canScroll);
|
|
151
|
+
if (canScroll) {
|
|
152
|
+
SetWrapWidth(wrapW);
|
|
153
|
+
SetOffsetW(offsetW);
|
|
154
|
+
SetAnimationDuration(offsetW / speed);
|
|
155
|
+
SetAnimationClass('play');
|
|
156
|
+
} else {
|
|
157
|
+
SetAnimationClass('');
|
|
158
|
+
}
|
|
130
159
|
return [
|
|
131
160
|
2
|
|
132
161
|
];
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
];
|
|
138
|
-
case 1:
|
|
139
|
-
warpRes = _state.sent();
|
|
140
|
-
return [
|
|
141
|
-
4,
|
|
142
|
-
getRectInMultiPlatform(contentRef.current)
|
|
143
|
-
];
|
|
144
|
-
case 2:
|
|
145
|
-
contentRes = _state.sent();
|
|
146
|
-
wrapW = warpRes.width;
|
|
147
|
-
offsetW = contentRes.width;
|
|
148
|
-
canScroll = align === 'left' && scrollable == null ? offsetW > wrapW : scrollable;
|
|
149
|
-
SetIsCanScroll(canScroll);
|
|
150
|
-
if (canScroll) {
|
|
151
|
-
SetWrapWidth(wrapW);
|
|
152
|
-
SetOffsetW(offsetW);
|
|
153
|
-
SetAnimationDuration(offsetW / speed);
|
|
154
|
-
SetAnimationClass('play');
|
|
155
|
-
} else {
|
|
156
|
-
SetAnimationClass('');
|
|
157
|
-
}
|
|
158
|
-
return [
|
|
159
|
-
2
|
|
160
|
-
];
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}), 0);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
})();
|
|
165
|
+
}, 0);
|
|
164
166
|
};
|
|
165
167
|
var handleClick = function(event) {
|
|
166
168
|
click && click(event);
|
|
@@ -225,36 +227,38 @@ export var NoticeBar = function(props) {
|
|
|
225
227
|
var init = function() {
|
|
226
228
|
var activeIndex = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
227
229
|
if (!(container === null || container === void 0 ? void 0 : container.current)) return;
|
|
228
|
-
setTimeout(
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
230
|
+
setTimeout(function() {
|
|
231
|
+
return _async_to_generator(function() {
|
|
232
|
+
var rects, _active, _height, targetOffset;
|
|
233
|
+
return _ts_generator(this, function(_state) {
|
|
234
|
+
switch(_state.label){
|
|
235
|
+
case 0:
|
|
236
|
+
return [
|
|
237
|
+
4,
|
|
238
|
+
getRectInMultiPlatform(container === null || container === void 0 ? void 0 : container.current)
|
|
239
|
+
];
|
|
240
|
+
case 1:
|
|
241
|
+
rects = _state.sent();
|
|
242
|
+
_active = Math.max(Math.min(childCount - 1, activeIndex), 0);
|
|
243
|
+
_height = rects === null || rects === void 0 ? void 0 : rects.height;
|
|
244
|
+
trackSize = childCount * Number(_height);
|
|
245
|
+
targetOffset = getOffset(_active);
|
|
246
|
+
activeRef.current = _active;
|
|
247
|
+
setRect(rects);
|
|
248
|
+
setOffset(targetOffset);
|
|
249
|
+
setChildOffset(new Array(childCount).fill(0));
|
|
250
|
+
// 关闭动画并立即设置样式
|
|
251
|
+
swiperRef.current.moving = true;
|
|
252
|
+
setStyle(targetOffset, rects);
|
|
253
|
+
swiperRef.current.moving = false;
|
|
254
|
+
setReady(true);
|
|
255
|
+
return [
|
|
256
|
+
2
|
|
257
|
+
];
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
})();
|
|
261
|
+
}, 0);
|
|
258
262
|
};
|
|
259
263
|
useEffect(function() {
|
|
260
264
|
if (ready) {
|
|
@@ -114,8 +114,8 @@ var InternalPickerRoller = function(props, ref) {
|
|
|
114
114
|
setTouchTime(0);
|
|
115
115
|
selectValue(scrollDistance);
|
|
116
116
|
};
|
|
117
|
-
var getReactHeight =
|
|
118
|
-
|
|
117
|
+
var getReactHeight = function() {
|
|
118
|
+
return _async_to_generator(function() {
|
|
119
119
|
var placeholder, placeholderHeight, error;
|
|
120
120
|
return _ts_generator(this, function(_state) {
|
|
121
121
|
switch(_state.label){
|
|
@@ -150,11 +150,8 @@ var InternalPickerRoller = function(props, ref) {
|
|
|
150
150
|
];
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
return _ref.apply(this, arguments);
|
|
156
|
-
};
|
|
157
|
-
}();
|
|
153
|
+
})();
|
|
154
|
+
};
|
|
158
155
|
// lineSpacing.current CSS variable
|
|
159
156
|
useEffect(function() {
|
|
160
157
|
var element = pickerRollerRef.current;
|
|
@@ -54,8 +54,7 @@ var InternalPickerView = function(props, ref) {
|
|
|
54
54
|
var index = currentOptions.findIndex(function(columnItem) {
|
|
55
55
|
return columnItem.value === currentValue;
|
|
56
56
|
});
|
|
57
|
-
columnOptions = currentOptions[index === -1 ? 0 : index] // 如果未找到,默认取第一个
|
|
58
|
-
;
|
|
57
|
+
columnOptions = currentOptions[index === -1 ? 0 : index]; // 如果未找到,默认取第一个
|
|
59
58
|
} else {
|
|
60
59
|
return "break" // 如果 currentValue 不存在,终止循环
|
|
61
60
|
;
|
|
@@ -74,93 +74,91 @@ export var Popover = function(props) {
|
|
|
74
74
|
]);
|
|
75
75
|
var uid = useUuid();
|
|
76
76
|
var popoverId = "popover-".concat(uid);
|
|
77
|
-
var getWrapperPosition =
|
|
78
|
-
|
|
77
|
+
var getWrapperPosition = function() {
|
|
78
|
+
return _async_to_generator(function() {
|
|
79
79
|
return _ts_generator(this, function(_state) {
|
|
80
|
-
nextTick(
|
|
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
|
-
|
|
80
|
+
nextTick(function() {
|
|
81
|
+
return _async_to_generator(function() {
|
|
82
|
+
var rect, _tmp, width, height, right, left, top;
|
|
83
|
+
return _ts_generator(this, function(_state) {
|
|
84
|
+
switch(_state.label){
|
|
85
|
+
case 0:
|
|
86
|
+
if (!targetId) return [
|
|
87
|
+
3,
|
|
88
|
+
2
|
|
89
|
+
];
|
|
90
|
+
return [
|
|
91
|
+
4,
|
|
92
|
+
getRectInMultiPlatform(document.querySelector("#".concat(targetId)), targetId)
|
|
93
|
+
];
|
|
94
|
+
case 1:
|
|
95
|
+
_tmp = _state.sent();
|
|
96
|
+
return [
|
|
97
|
+
3,
|
|
98
|
+
4
|
|
99
|
+
];
|
|
100
|
+
case 2:
|
|
101
|
+
return [
|
|
102
|
+
4,
|
|
103
|
+
getRectInMultiPlatform(popoverRef.current, popoverId)
|
|
104
|
+
];
|
|
105
|
+
case 3:
|
|
106
|
+
_tmp = _state.sent();
|
|
107
|
+
_state.label = 4;
|
|
108
|
+
case 4:
|
|
109
|
+
rect = _tmp;
|
|
110
|
+
width = rect.width, height = rect.height, right = rect.right, left = rect.left, top = rect.top;
|
|
111
|
+
setWrapperPosition({
|
|
112
|
+
width: width,
|
|
113
|
+
height: height,
|
|
114
|
+
left: rtl ? right : left,
|
|
115
|
+
top: top,
|
|
116
|
+
right: rtl ? left : right
|
|
117
|
+
});
|
|
118
|
+
getPopoverContentW();
|
|
119
|
+
return [
|
|
120
|
+
2
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
})();
|
|
125
|
+
});
|
|
124
126
|
return [
|
|
125
127
|
2
|
|
126
128
|
];
|
|
127
129
|
});
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}();
|
|
133
|
-
var getPopoverContentW = /*#__PURE__*/ function() {
|
|
134
|
-
var _ref = _async_to_generator(function() {
|
|
130
|
+
})();
|
|
131
|
+
};
|
|
132
|
+
var getPopoverContentW = function() {
|
|
133
|
+
return _async_to_generator(function() {
|
|
135
134
|
return _ts_generator(this, function(_state) {
|
|
136
|
-
nextTick(
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
135
|
+
nextTick(function() {
|
|
136
|
+
return _async_to_generator(function() {
|
|
137
|
+
var rectContent;
|
|
138
|
+
return _ts_generator(this, function(_state) {
|
|
139
|
+
switch(_state.label){
|
|
140
|
+
case 0:
|
|
141
|
+
return [
|
|
142
|
+
4,
|
|
143
|
+
getRectInMultiPlatform(popoverContentRef.current)
|
|
144
|
+
];
|
|
145
|
+
case 1:
|
|
146
|
+
rectContent = _state.sent();
|
|
147
|
+
setPopWidth(rectContent.width);
|
|
148
|
+
setPopHeight(rectContent.height);
|
|
149
|
+
return [
|
|
150
|
+
2
|
|
151
|
+
];
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
})();
|
|
155
|
+
});
|
|
155
156
|
return [
|
|
156
157
|
2
|
|
157
158
|
];
|
|
158
159
|
});
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
return _ref.apply(this, arguments);
|
|
162
|
-
};
|
|
163
|
-
}();
|
|
160
|
+
})();
|
|
161
|
+
};
|
|
164
162
|
var clickAway = function() {
|
|
165
163
|
if (closeOnOutsideClick) {
|
|
166
164
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { TaroPopupProps } from "../../types";
|
|
3
|
-
export declare const Popup: FunctionComponent<Partial<TaroPopupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'title'>>;
|
|
3
|
+
export declare const Popup: FunctionComponent<Partial<TaroPopupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'title' | 'onTouchStart' | 'onTouchMove' | 'onTouchEnd'>>;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
+
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
1
2
|
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
2
3
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
4
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
4
5
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
5
|
-
import
|
|
6
|
+
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
7
|
+
import React, { useState, useEffect, useRef } from "react";
|
|
6
8
|
import { createPortal } from "react-dom";
|
|
7
9
|
import { CSSTransition } from "react-transition-group";
|
|
8
10
|
import classNames from "classnames";
|
|
9
11
|
import { Close } from "@nutui/icons-react-taro";
|
|
10
12
|
import { View } from "@tarojs/components";
|
|
13
|
+
import { getRectInMultiPlatformWithoutCache } from "../../utils/taro/get-rect";
|
|
11
14
|
import { defaultOverlayProps } from "../overlay/overlay";
|
|
12
15
|
import Overlay from "../overlay/index";
|
|
13
16
|
import { useLockScrollTaro } from "../../hooks/taro/use-lock-scoll";
|
|
14
17
|
import { harmony } from "../../utils/taro/platform";
|
|
18
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
15
19
|
var defaultProps = _object_spread_props(_object_spread({}, defaultOverlayProps), {
|
|
16
20
|
position: 'center',
|
|
17
21
|
transition: '',
|
|
@@ -24,6 +28,8 @@ var defaultProps = _object_spread_props(_object_spread({}, defaultOverlayProps),
|
|
|
24
28
|
portal: null,
|
|
25
29
|
overlay: true,
|
|
26
30
|
round: false,
|
|
31
|
+
resizable: false,
|
|
32
|
+
minHeight: '',
|
|
27
33
|
onOpen: function() {},
|
|
28
34
|
onClose: function() {},
|
|
29
35
|
onOverlayClick: function() {
|
|
@@ -31,29 +37,51 @@ var defaultProps = _object_spread_props(_object_spread({}, defaultOverlayProps),
|
|
|
31
37
|
},
|
|
32
38
|
onCloseIconClick: function() {
|
|
33
39
|
return true;
|
|
34
|
-
}
|
|
40
|
+
},
|
|
41
|
+
onTouchStart: function() {},
|
|
42
|
+
onTouchMove: function() {},
|
|
43
|
+
onTouchEnd: function() {}
|
|
35
44
|
});
|
|
36
45
|
// 默认1000,参看variables
|
|
37
46
|
var _zIndex = 1100;
|
|
38
47
|
export var Popup = function(props) {
|
|
39
|
-
var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, visible = _$_object_spread.visible, overlay = _$_object_spread.overlay, closeOnOverlayClick = _$_object_spread.closeOnOverlayClick, overlayStyle = _$_object_spread.overlayStyle, overlayClassName = _$_object_spread.overlayClassName, zIndex = _$_object_spread.zIndex, lockScroll = _$_object_spread.lockScroll, duration = _$_object_spread.duration, closeable = _$_object_spread.closeable, closeIconPosition = _$_object_spread.closeIconPosition, closeIcon = _$_object_spread.closeIcon, left = _$_object_spread.left, title = _$_object_spread.title, description = _$_object_spread.description, style = _$_object_spread.style, transition = _$_object_spread.transition, round = _$_object_spread.round, position = _$_object_spread.position, className = _$_object_spread.className, destroyOnClose = _$_object_spread.destroyOnClose, portal = _$_object_spread.portal, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onOverlayClick = _$_object_spread.onOverlayClick, onCloseIconClick = _$_object_spread.onCloseIconClick, afterShow = _$_object_spread.afterShow, afterClose = _$_object_spread.afterClose, onClick = _$_object_spread.onClick;
|
|
48
|
+
var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, visible = _$_object_spread.visible, overlay = _$_object_spread.overlay, closeOnOverlayClick = _$_object_spread.closeOnOverlayClick, overlayStyle = _$_object_spread.overlayStyle, overlayClassName = _$_object_spread.overlayClassName, zIndex = _$_object_spread.zIndex, lockScroll = _$_object_spread.lockScroll, duration = _$_object_spread.duration, closeable = _$_object_spread.closeable, closeIconPosition = _$_object_spread.closeIconPosition, closeIcon = _$_object_spread.closeIcon, left = _$_object_spread.left, title = _$_object_spread.title, description = _$_object_spread.description, style = _$_object_spread.style, transition = _$_object_spread.transition, round = _$_object_spread.round, position = _$_object_spread.position, className = _$_object_spread.className, destroyOnClose = _$_object_spread.destroyOnClose, portal = _$_object_spread.portal, resizable = _$_object_spread.resizable, minHeight = _$_object_spread.minHeight, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onOverlayClick = _$_object_spread.onOverlayClick, onCloseIconClick = _$_object_spread.onCloseIconClick, afterShow = _$_object_spread.afterShow, afterClose = _$_object_spread.afterClose, onClick = _$_object_spread.onClick, onTouchStart = _$_object_spread.onTouchStart, onTouchMove = _$_object_spread.onTouchMove, onTouchEnd = _$_object_spread.onTouchEnd;
|
|
40
49
|
var innerIndex = zIndex || _zIndex;
|
|
41
50
|
var _useState = _sliced_to_array(useState(innerIndex), 2), index = _useState[0], setIndex = _useState[1];
|
|
42
51
|
var _useState1 = _sliced_to_array(useState(visible), 2), innerVisible = _useState1[0], setInnerVisible = _useState1[1];
|
|
43
52
|
var _useState2 = _sliced_to_array(useState(true), 2), showChildren = _useState2[0], setShowChildren = _useState2[1];
|
|
44
53
|
var _useState3 = _sliced_to_array(useState(''), 2), transitionName = _useState3[0], setTransitionName = _useState3[1];
|
|
45
|
-
var
|
|
54
|
+
var nodeRef = useLockScrollTaro(innerVisible && lockScroll);
|
|
55
|
+
var rootRect = useRef(null);
|
|
56
|
+
var touchStartRef = useRef(0);
|
|
57
|
+
var touchMoveDistanceRef = useRef(0);
|
|
58
|
+
var heightRef = useRef(0);
|
|
59
|
+
var defaultHeightRef = useRef(0);
|
|
60
|
+
var isTouching = useRef(false);
|
|
46
61
|
var classPrefix = 'nut-popup';
|
|
47
62
|
var overlayStyles = _object_spread({}, overlayStyle);
|
|
48
63
|
var contentZIndex = harmony() ? index + 1 : index // 解决harmony层级问题
|
|
49
64
|
;
|
|
50
65
|
var popStyles = _object_spread({
|
|
51
|
-
zIndex: contentZIndex
|
|
66
|
+
zIndex: contentZIndex,
|
|
67
|
+
minHeight: minHeight
|
|
52
68
|
}, style);
|
|
53
69
|
var _obj;
|
|
54
70
|
var popClassName = classNames(classPrefix, (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-round"), round || position === 'bottom'), _define_property(_obj, "".concat(classPrefix, "-").concat(position), true), _obj), className);
|
|
71
|
+
var _useState4 = _sliced_to_array(useState(''), 2), popupHeight = _useState4[0], setPopupHeight = _useState4[1];
|
|
72
|
+
var resizeStyles = function() {
|
|
73
|
+
if (popupHeight !== '') {
|
|
74
|
+
return {
|
|
75
|
+
height: popupHeight
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
};
|
|
55
79
|
var open = function() {
|
|
56
80
|
if (!innerVisible) {
|
|
81
|
+
// 当高度改变后,再次打开时,将高度置为初始高度
|
|
82
|
+
if (position === 'bottom' && resizable && nodeRef.current && heightRef.current) {
|
|
83
|
+
setPopupHeight(pxTransform(defaultHeightRef.current));
|
|
84
|
+
}
|
|
57
85
|
setInnerVisible(true);
|
|
58
86
|
setIndex(++innerIndex);
|
|
59
87
|
}
|
|
@@ -107,18 +135,83 @@ export var Popup = function(props) {
|
|
|
107
135
|
return renderCloseIcon();
|
|
108
136
|
}
|
|
109
137
|
};
|
|
138
|
+
var handleTouchStart = function(event) {
|
|
139
|
+
return _async_to_generator(function() {
|
|
140
|
+
var _nodeRef_current, _rootRect_current, e, rect;
|
|
141
|
+
return _ts_generator(this, function(_state) {
|
|
142
|
+
switch(_state.label){
|
|
143
|
+
case 0:
|
|
144
|
+
if (position !== 'bottom' || !resizable || !nodeRef.current) return [
|
|
145
|
+
2
|
|
146
|
+
];
|
|
147
|
+
e = event;
|
|
148
|
+
// 开始touch,记录下touch的pageY,用以判断是向上滑动还是向下滑动
|
|
149
|
+
touchStartRef.current = e.touches[0].pageY;
|
|
150
|
+
// 标记开始滑动
|
|
151
|
+
isTouching.current = true;
|
|
152
|
+
return [
|
|
153
|
+
4,
|
|
154
|
+
getRectInMultiPlatformWithoutCache(nodeRef.current)
|
|
155
|
+
];
|
|
156
|
+
case 1:
|
|
157
|
+
rect = _state.sent();
|
|
158
|
+
rootRect.current = rect;
|
|
159
|
+
heightRef.current = ((_nodeRef_current = nodeRef.current) === null || _nodeRef_current === void 0 ? void 0 : _nodeRef_current.offsetHeight) || ((_rootRect_current = rootRect.current) === null || _rootRect_current === void 0 ? void 0 : _rootRect_current.height) || 0;
|
|
160
|
+
if (!defaultHeightRef.current) defaultHeightRef.current = heightRef.current;
|
|
161
|
+
onTouchStart === null || onTouchStart === void 0 ? void 0 : onTouchStart(heightRef.current, e);
|
|
162
|
+
return [
|
|
163
|
+
2
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
})();
|
|
168
|
+
};
|
|
169
|
+
var handleTouchMove = function(event) {
|
|
170
|
+
if (position !== 'bottom' || !resizable || !nodeRef.current || !rootRect.current) return;
|
|
171
|
+
var e = event;
|
|
172
|
+
e.stopPropagation();
|
|
173
|
+
// 计算位移:move过程中,当前的pageY 与 start值比较
|
|
174
|
+
touchMoveDistanceRef.current = e.touches[0].pageY - touchStartRef.current;
|
|
175
|
+
var handleMove = function() {
|
|
176
|
+
var min = typeof minHeight === 'number' ? minHeight : parseInt(String(minHeight || 0), 10) || 0;
|
|
177
|
+
var currentHeight = Math.max(min, heightRef.current - touchMoveDistanceRef.current);
|
|
178
|
+
setPopupHeight(pxTransform(currentHeight));
|
|
179
|
+
if (touchMoveDistanceRef.current > 0 && isTouching.current) {
|
|
180
|
+
// 向下滑动
|
|
181
|
+
onTouchMove === null || onTouchMove === void 0 ? void 0 : onTouchMove(currentHeight, e, 'down');
|
|
182
|
+
} else {
|
|
183
|
+
// 向上滑动
|
|
184
|
+
onTouchMove === null || onTouchMove === void 0 ? void 0 : onTouchMove(currentHeight, e, 'up');
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
requestAnimationFrame(handleMove);
|
|
188
|
+
};
|
|
189
|
+
var handleTouchEnd = function(event) {
|
|
190
|
+
if (position !== 'bottom' || !resizable || !nodeRef.current || !rootRect.current) return;
|
|
191
|
+
var e = event;
|
|
192
|
+
isTouching.current = false;
|
|
193
|
+
var min = typeof minHeight === 'number' ? minHeight : parseInt(String(minHeight || 0), 10) || 0;
|
|
194
|
+
var currentHeight = Math.max(min, heightRef.current - touchMoveDistanceRef.current);
|
|
195
|
+
onTouchEnd === null || onTouchEnd === void 0 ? void 0 : onTouchEnd(currentHeight, e);
|
|
196
|
+
};
|
|
110
197
|
var renderContent = function() {
|
|
111
|
-
return /*#__PURE__*/ React.createElement(
|
|
112
|
-
ref:
|
|
113
|
-
style: popStyles,
|
|
198
|
+
return /*#__PURE__*/ React.createElement(View, {
|
|
199
|
+
ref: nodeRef,
|
|
200
|
+
style: _object_spread(_object_spread_props(_object_spread({}, popStyles), {
|
|
201
|
+
display: innerVisible ? 'block' : 'none'
|
|
202
|
+
}), resizeStyles()),
|
|
114
203
|
className: popClassName,
|
|
115
204
|
onClick: onClick,
|
|
116
|
-
catchMove: lockScroll
|
|
117
|
-
|
|
205
|
+
catchMove: lockScroll,
|
|
206
|
+
onTouchStart: handleTouchStart,
|
|
207
|
+
onTouchMove: handleTouchMove,
|
|
208
|
+
onTouchEnd: handleTouchEnd,
|
|
209
|
+
onTouchCancel: handleTouchEnd
|
|
210
|
+
}, renderTitle(), showChildren ? children : null);
|
|
118
211
|
};
|
|
119
212
|
var renderPop = function() {
|
|
120
213
|
return /*#__PURE__*/ React.createElement(CSSTransition, {
|
|
121
|
-
nodeRef:
|
|
214
|
+
nodeRef: nodeRef,
|
|
122
215
|
classNames: transitionName,
|
|
123
216
|
mountOnEnter: true,
|
|
124
217
|
unmountOnExit: destroyOnClose,
|