@arco-design/mobile-react 2.29.3 → 2.29.5
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 +29 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/action-sheet/index.d.ts +2 -2
- package/cjs/dialog/index.d.ts +2 -2
- package/cjs/image-picker/index.js +14 -6
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/image-preview/index.js +5 -3
- package/cjs/index.d.ts +5 -5
- package/cjs/index.js +16 -16
- package/cjs/load-more/index.d.ts +11 -0
- package/cjs/load-more/index.js +18 -4
- package/cjs/masking/index.d.ts +2 -2
- package/cjs/picker/index.js +2 -9
- package/cjs/picker-view/components/cascader.d.ts +1 -0
- package/cjs/picker-view/components/cascader.js +8 -1
- package/cjs/picker-view/components/picker-cell.d.ts +1 -0
- package/cjs/picker-view/components/picker-cell.js +8 -1
- package/cjs/picker-view/index.js +15 -9
- package/cjs/popup/index.d.ts +2 -2
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/pull-refresh/android-pull-refresh.js +12 -20
- package/cjs/pull-refresh/hooks.js +2 -2
- package/cjs/pull-refresh/style/css/index.css +0 -1
- package/cjs/pull-refresh/style/index.less +0 -1
- package/cjs/search-bar/style/css/index.css +2 -0
- package/cjs/search-bar/style/index.less +93 -91
- package/cjs/style.d.ts +5 -5
- package/cjs/style.js +8 -8
- package/cjs/tabs/index.js +4 -1
- package/cjs/tabs/tab-pane.js +5 -2
- package/cjs/toast/index.d.ts +12 -12
- package/dist/index.js +2454 -2419
- package/dist/index.min.js +5 -5
- package/dist/style.css +505 -504
- package/dist/style.min.css +1 -1
- package/esm/action-sheet/index.d.ts +2 -2
- package/esm/dialog/index.d.ts +2 -2
- package/esm/image-picker/index.js +13 -6
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/image-preview/index.js +5 -3
- package/esm/index.d.ts +5 -5
- package/esm/index.js +5 -5
- package/esm/load-more/index.d.ts +11 -0
- package/esm/load-more/index.js +18 -4
- package/esm/masking/index.d.ts +2 -2
- package/esm/picker/index.js +4 -10
- package/esm/picker-view/components/cascader.d.ts +1 -0
- package/esm/picker-view/components/cascader.js +8 -1
- package/esm/picker-view/components/picker-cell.d.ts +1 -0
- package/esm/picker-view/components/picker-cell.js +8 -1
- package/esm/picker-view/index.js +16 -10
- package/esm/popup/index.d.ts +2 -2
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/pull-refresh/android-pull-refresh.js +13 -22
- package/esm/pull-refresh/hooks.js +2 -2
- package/esm/pull-refresh/style/css/index.css +0 -1
- package/esm/pull-refresh/style/index.less +0 -1
- package/esm/search-bar/style/css/index.css +2 -0
- package/esm/search-bar/style/index.less +93 -91
- package/esm/style.d.ts +5 -5
- package/esm/style.js +5 -5
- package/esm/tabs/index.js +4 -1
- package/esm/tabs/tab-pane.js +6 -3
- package/esm/toast/index.d.ts +12 -12
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +2 -0
- package/tokens/app/arcodesign/default/index.d.ts +2 -0
- package/tokens/app/arcodesign/default/index.js +2 -0
- package/tokens/app/arcodesign/default/index.json +24 -0
- package/tokens/app/arcodesign/default/index.less +2 -0
- package/umd/action-sheet/index.d.ts +2 -2
- package/umd/dialog/index.d.ts +2 -2
- package/umd/image-picker/index.js +16 -10
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/image-preview/index.js +5 -3
- package/umd/index.d.ts +5 -5
- package/umd/index.js +14 -14
- package/umd/load-more/index.d.ts +11 -0
- package/umd/load-more/index.js +18 -4
- package/umd/masking/index.d.ts +2 -2
- package/umd/picker/index.js +2 -9
- package/umd/picker-view/components/cascader.d.ts +1 -0
- package/umd/picker-view/components/cascader.js +8 -1
- package/umd/picker-view/components/picker-cell.d.ts +1 -0
- package/umd/picker-view/components/picker-cell.js +8 -1
- package/umd/picker-view/index.js +15 -9
- package/umd/popup/index.d.ts +2 -2
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/pull-refresh/android-pull-refresh.js +15 -24
- package/umd/pull-refresh/hooks.js +2 -2
- package/umd/pull-refresh/style/css/index.css +0 -1
- package/umd/pull-refresh/style/index.less +0 -1
- package/umd/search-bar/style/css/index.css +2 -0
- package/umd/search-bar/style/index.less +93 -91
- package/umd/style.d.ts +5 -5
- package/umd/style.js +2 -2
- package/umd/tabs/index.js +4 -1
- package/umd/tabs/tab-pane.js +5 -2
- package/umd/toast/index.d.ts +12 -12
@@ -5,6 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
exports.__esModule = true;
|
6
6
|
exports.PullRefresh = void 0;
|
7
7
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
+
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
9
11
|
|
10
12
|
var _mobileUtils = require("@arco-design/mobile-utils");
|
@@ -70,11 +72,7 @@ var PullRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
70
72
|
onRefresh = props.onRefresh,
|
71
73
|
_props$allowPullWhenN = props.allowPullWhenNotTop,
|
72
74
|
allowPullWhenNotTop = _props$allowPullWhenN === void 0 ? false : _props$allowPullWhenN;
|
73
|
-
|
74
|
-
var _useState = (0, _react.useState)({}),
|
75
|
-
transition = _useState[0],
|
76
|
-
setTransition = _useState[1];
|
77
|
-
|
75
|
+
var placeRef = (0, _react.useRef)(null);
|
78
76
|
var touchRef = (0, _react.useRef)(null);
|
79
77
|
var currentTranslateYRef = (0, _react.useRef)(0);
|
80
78
|
var onTouching = (0, _react.useRef)(false);
|
@@ -111,17 +109,7 @@ var PullRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
111
109
|
|
112
110
|
var scroll = function scroll(y, ms, callback) {
|
113
111
|
if (y < 5) {
|
114
|
-
if (y < 0) {
|
115
|
-
currentTranslateYRef.current = 0;
|
116
|
-
return;
|
117
|
-
}
|
118
|
-
|
119
|
-
if (ms === 0) {
|
120
|
-
setTimeout(function () {
|
121
|
-
setTransition({
|
122
|
-
transition: 'all 0s'
|
123
|
-
});
|
124
|
-
});
|
112
|
+
if (y < 0 || ms === 0) {
|
125
113
|
currentTranslateYRef.current = 0;
|
126
114
|
return;
|
127
115
|
}
|
@@ -129,10 +117,11 @@ var PullRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
129
117
|
|
130
118
|
var translateY = dampRateCalculate(y, loosingHeight, dampRate);
|
131
119
|
currentTranslateYRef.current = translateY;
|
132
|
-
|
133
|
-
transform: translateY ? "translateY(" + translateY + "px)" : ''
|
120
|
+
placeRef.current && (0, _helpers.setStyleWithVendor)(placeRef.current, (0, _extends2.default)({
|
121
|
+
transform: translateY ? "translateY(" + translateY + "px) translateZ(0)" : ''
|
122
|
+
}, ms ? {
|
134
123
|
transition: "all " + ms / 1000 + "s"
|
135
|
-
});
|
124
|
+
} : {}));
|
136
125
|
setTimeout(function () {
|
137
126
|
callback == null ? void 0 : callback();
|
138
127
|
}, ms);
|
@@ -150,6 +139,9 @@ var PullRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
150
139
|
|
151
140
|
loadingRef.current = false;
|
152
141
|
setStatus(_model.PullRefreshStatus.Static);
|
142
|
+
placeRef.current && (0, _helpers.setStyleWithVendor)(placeRef.current, {
|
143
|
+
transition: ''
|
144
|
+
});
|
153
145
|
callback();
|
154
146
|
});
|
155
147
|
};
|
@@ -277,7 +269,7 @@ var PullRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
277
269
|
ref: domRef
|
278
270
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
279
271
|
className: (0, _mobileUtils.cls)(prefixCls + "-pull-refresh-place"),
|
280
|
-
|
272
|
+
ref: placeRef
|
281
273
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
282
274
|
className: (0, _mobileUtils.cls)(prefixCls + "-pull-refresh-label"),
|
283
275
|
ref: labelRef,
|
@@ -110,9 +110,9 @@ var useCheckAsStart = function useCheckAsStart(_ref3) {
|
|
110
110
|
var allowPullWhenNotTop = _ref3.allowPullWhenNotTop,
|
111
111
|
domRef = _ref3.domRef;
|
112
112
|
var ifShouldHandle = (0, _react.useCallback)(function () {
|
113
|
-
var _domRef$current$
|
113
|
+
var _domRef$current$offse, _domRef$current9;
|
114
114
|
|
115
|
-
var domRefHeight = (_domRef$current$
|
115
|
+
var domRefHeight = (_domRef$current$offse = (_domRef$current9 = domRef.current) == null ? void 0 : _domRef$current9.offsetHeight) != null ? _domRef$current$offse : 0;
|
116
116
|
return domRef.current && !(!allowPullWhenNotTop && (domRef.current.scrollTop < 0 || domRef.current.scrollTop > domRef.current.scrollHeight - domRefHeight));
|
117
117
|
}, [allowPullWhenNotTop]);
|
118
118
|
return {
|
@@ -1,112 +1,114 @@
|
|
1
1
|
@import '../../../style/mixin.less';
|
2
2
|
|
3
3
|
.@{prefix}-search-bar {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
&-square {
|
12
|
-
.@{prefix}-search-bar-wrap {
|
13
|
-
.use-var(border-radius, search-bar-square-shape-border-radius);
|
4
|
+
&-container {
|
5
|
+
display: flex;
|
6
|
+
align-items: center;
|
7
|
+
position: relative;
|
8
|
+
.use-var(padding, search-bar-padding);
|
9
|
+
.use-var(background-color, search-bar-background-color);
|
14
10
|
}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
11
|
+
&-square {
|
12
|
+
.@{prefix}-search-bar-wrap {
|
13
|
+
.use-var(border-radius, search-bar-square-shape-border-radius);
|
14
|
+
}
|
19
15
|
}
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
flex: 1;
|
25
|
-
.use-var(height, search-bar-input-wrapper-height);
|
26
|
-
.use-var(font-size, search-bar-input-wrapper-font-size);
|
27
|
-
.use-var(padding, search-bar-input-wrapper-padding);
|
28
|
-
.use-var(background-color, search-bar-input-wrapper-background-color);
|
29
|
-
}
|
30
|
-
&-input {
|
31
|
-
flex: 1;
|
32
|
-
background-color: transparent;
|
33
|
-
.use-var(height, search-bar-input-height);
|
34
|
-
.use-var(caret-color, search-bar-input-caret-color);
|
35
|
-
&-left {
|
36
|
-
text-align: left;
|
16
|
+
&-round {
|
17
|
+
.@{prefix}-search-bar-wrap {
|
18
|
+
.use-var(border-radius, search-bar-round-shape-border-radius);
|
19
|
+
}
|
37
20
|
}
|
38
|
-
&-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
21
|
+
&-wrap {
|
22
|
+
display: flex;
|
23
|
+
align-items: center;
|
24
|
+
flex: 1;
|
25
|
+
.use-var(height, search-bar-input-wrapper-height);
|
26
|
+
.use-var(font-size, search-bar-input-wrapper-font-size);
|
27
|
+
.use-var(padding, search-bar-input-wrapper-padding);
|
28
|
+
.use-var(background-color, search-bar-input-wrapper-background-color);
|
43
29
|
}
|
30
|
+
&-input {
|
31
|
+
flex: 1;
|
32
|
+
background-color: transparent;
|
33
|
+
.use-var(height, search-bar-input-height);
|
34
|
+
.use-var(caret-color, search-bar-input-caret-color);
|
35
|
+
&-left {
|
36
|
+
text-align: left;
|
37
|
+
}
|
38
|
+
&-right {
|
39
|
+
text-align: right;
|
40
|
+
}
|
41
|
+
&-center {
|
42
|
+
text-align: center;
|
43
|
+
}
|
44
|
+
|
45
|
+
&::placeholder {
|
46
|
+
.use-var(color, search-bar-input-placeholder-color);
|
47
|
+
}
|
44
48
|
|
45
|
-
|
46
|
-
|
49
|
+
&::-webkit-search-decoration,
|
50
|
+
&::-webkit-search-cancel-button {
|
51
|
+
display: none;
|
52
|
+
}
|
47
53
|
}
|
48
54
|
|
49
|
-
|
50
|
-
|
51
|
-
|
55
|
+
&-prefix,
|
56
|
+
&-suffix,
|
57
|
+
&-clear {
|
58
|
+
align-items: center;
|
59
|
+
justify-content: center;
|
60
|
+
display: flex;
|
52
61
|
}
|
53
|
-
}
|
54
62
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
align-items: center;
|
59
|
-
justify-content: center;
|
60
|
-
display: flex;
|
61
|
-
}
|
63
|
+
&-prefix {
|
64
|
+
.use-var(margin-right, search-bar-prefix-margin-right);
|
65
|
+
}
|
62
66
|
|
63
|
-
|
64
|
-
|
65
|
-
|
67
|
+
&-clear {
|
68
|
+
.use-var(color, search-bar-clear-icon-color);
|
69
|
+
.use-var(font-size, search-bar-clear-icon-font-size);
|
70
|
+
.use-var(padding-left, search-bar-clear-icon-padding-left);
|
71
|
+
}
|
66
72
|
|
67
|
-
|
68
|
-
|
69
|
-
|
73
|
+
&-search-icon {
|
74
|
+
.use-var(color, search-bar-search-icon-color);
|
75
|
+
.use-var(font-size, search-bar-search-icon-font-size);
|
76
|
+
}
|
70
77
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
78
|
+
&-cancel-btn {
|
79
|
+
.use-var(margin-left, search-bar-cancel-btn-margin-left);
|
80
|
+
.use-var(color, search-bar-cancel-btn-color);
|
81
|
+
.use-var(font-size, search-bar-cancel-btn-font-size);
|
82
|
+
}
|
75
83
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
84
|
+
&-association {
|
85
|
+
position: absolute;
|
86
|
+
left: 0;
|
87
|
+
right: 0;
|
88
|
+
.use-var(background-color, search-bar-association-background-color);
|
89
|
+
top: 100%;
|
90
|
+
display: none;
|
81
91
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
right: 0;
|
86
|
-
.use-var(background-color, search-bar-association-background-color);
|
87
|
-
top: 100%;
|
88
|
-
display: none;
|
92
|
+
&-visible {
|
93
|
+
display: block;
|
94
|
+
}
|
89
95
|
|
90
|
-
|
91
|
-
|
92
|
-
|
96
|
+
&-item {
|
97
|
+
.use-var(height, search-bar-association-item-height);
|
98
|
+
display: flex;
|
99
|
+
align-items: center;
|
100
|
+
position: relative;
|
101
|
+
.use-var(color, search-bar-association-item-color);
|
102
|
+
.use-var(padding, search-bar-association-item-padding);
|
103
|
+
.use-var(font-size, search-bar-association-item-font-size);
|
93
104
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
align-items: center;
|
98
|
-
position: relative;
|
99
|
-
.use-var(color, search-bar-association-item-color);
|
100
|
-
.use-var(padding, search-bar-association-item-padding);
|
101
|
-
.use-var(font-size, search-bar-association-item-font-size);
|
102
|
-
|
103
|
-
&:not(:last-child) {
|
104
|
-
.onepx-border-var(bottom, line-color);
|
105
|
-
}
|
105
|
+
&:not(:last-child) {
|
106
|
+
.onepx-border-var(bottom, line-color);
|
107
|
+
}
|
106
108
|
|
107
|
-
|
108
|
-
|
109
|
-
|
109
|
+
&-highlight {
|
110
|
+
.use-var(color, search-bar-association-item-highlight-color)
|
111
|
+
}
|
112
|
+
}
|
110
113
|
}
|
111
|
-
|
112
|
-
}
|
114
|
+
}
|
package/cjs/style.d.ts
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import '../style/public.less';
|
2
2
|
import './tabs/style';
|
3
3
|
import './sticky/style';
|
4
|
-
import './
|
5
|
-
import './
|
4
|
+
import './portal/style';
|
5
|
+
import './toast/style';
|
6
6
|
import './action-sheet/style';
|
7
7
|
import './avatar/style';
|
8
8
|
import './badge/style';
|
9
9
|
import './button/style';
|
10
10
|
import './carousel/style';
|
11
|
+
import './cell/style';
|
11
12
|
import './checkbox/style';
|
12
13
|
import './circle-progress/style';
|
13
14
|
import './collapse/style';
|
@@ -27,6 +28,7 @@ import './image-preview/style';
|
|
27
28
|
import './index-bar/style';
|
28
29
|
import './input/style';
|
29
30
|
import './keyboard/style';
|
31
|
+
import './load-more/style';
|
30
32
|
import './loading/style';
|
31
33
|
import './masking/style';
|
32
34
|
import './nav-bar/style';
|
@@ -38,14 +40,13 @@ import './picker-view/style';
|
|
38
40
|
import './popover/style';
|
39
41
|
import './popup/style';
|
40
42
|
import './popup-swiper/style';
|
41
|
-
import './portal/style';
|
42
43
|
import './progress/style';
|
43
44
|
import './pull-refresh/style';
|
44
45
|
import './radio/style';
|
45
46
|
import './rate/style';
|
46
47
|
import './search-bar/style';
|
47
|
-
import './skeleton/style';
|
48
48
|
import './show-monitor/style';
|
49
|
+
import './skeleton/style';
|
49
50
|
import './slider/style';
|
50
51
|
import './stepper/style';
|
51
52
|
import './steps/style';
|
@@ -55,5 +56,4 @@ import './switch/style';
|
|
55
56
|
import './tab-bar/style';
|
56
57
|
import './tag/style';
|
57
58
|
import './textarea/style';
|
58
|
-
import './toast/style';
|
59
59
|
import './transition/style';
|
package/cjs/style.js
CHANGED
@@ -6,9 +6,9 @@ require("./tabs/style");
|
|
6
6
|
|
7
7
|
require("./sticky/style");
|
8
8
|
|
9
|
-
require("./
|
9
|
+
require("./portal/style");
|
10
10
|
|
11
|
-
require("./
|
11
|
+
require("./toast/style");
|
12
12
|
|
13
13
|
require("./action-sheet/style");
|
14
14
|
|
@@ -20,6 +20,8 @@ require("./button/style");
|
|
20
20
|
|
21
21
|
require("./carousel/style");
|
22
22
|
|
23
|
+
require("./cell/style");
|
24
|
+
|
23
25
|
require("./checkbox/style");
|
24
26
|
|
25
27
|
require("./circle-progress/style");
|
@@ -58,6 +60,8 @@ require("./input/style");
|
|
58
60
|
|
59
61
|
require("./keyboard/style");
|
60
62
|
|
63
|
+
require("./load-more/style");
|
64
|
+
|
61
65
|
require("./loading/style");
|
62
66
|
|
63
67
|
require("./masking/style");
|
@@ -80,8 +84,6 @@ require("./popup/style");
|
|
80
84
|
|
81
85
|
require("./popup-swiper/style");
|
82
86
|
|
83
|
-
require("./portal/style");
|
84
|
-
|
85
87
|
require("./progress/style");
|
86
88
|
|
87
89
|
require("./pull-refresh/style");
|
@@ -92,10 +94,10 @@ require("./rate/style");
|
|
92
94
|
|
93
95
|
require("./search-bar/style");
|
94
96
|
|
95
|
-
require("./skeleton/style");
|
96
|
-
|
97
97
|
require("./show-monitor/style");
|
98
98
|
|
99
|
+
require("./skeleton/style");
|
100
|
+
|
99
101
|
require("./slider/style");
|
100
102
|
|
101
103
|
require("./stepper/style");
|
@@ -114,6 +116,4 @@ require("./tag/style");
|
|
114
116
|
|
115
117
|
require("./textarea/style");
|
116
118
|
|
117
|
-
require("./toast/style");
|
118
|
-
|
119
119
|
require("./transition/style");
|
package/cjs/tabs/index.js
CHANGED
@@ -197,6 +197,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
197
197
|
var touchStartXRef = (0, _react.useRef)(0);
|
198
198
|
var touchStartYRef = (0, _react.useRef)(0);
|
199
199
|
var touchStartTimeRef = (0, _react.useRef)(0);
|
200
|
+
var touchMovedRef = (0, _react.useRef)(false);
|
200
201
|
var scrollingRef = (0, _react.useRef)(null);
|
201
202
|
var touchStoppedRef = (0, _react.useRef)(false);
|
202
203
|
var changeFromRef = (0, _react.useRef)('');
|
@@ -290,6 +291,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
290
291
|
}
|
291
292
|
|
292
293
|
touchStartedRef.current = true;
|
294
|
+
touchMovedRef.current = false;
|
293
295
|
setCellTrans(false);
|
294
296
|
setPaneTrans(false);
|
295
297
|
var evt = e.touches[0];
|
@@ -317,6 +319,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
317
319
|
return;
|
318
320
|
}
|
319
321
|
|
322
|
+
touchMovedRef.current = true;
|
320
323
|
var evt = e.changedTouches[0];
|
321
324
|
var touchMoveX = evt.clientX || 0;
|
322
325
|
var touchMoveY = evt.clientY || 0; // bugfix: 兼容safari在右滑返回上一页时clientX为负值的情况,安卓有折叠屏,触点会有超出屏幕(clientX < 0)的情况,因此这里限定ios系统
|
@@ -383,7 +386,7 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
383
386
|
cellRef.current && cellRef.current.scrollToCenter();
|
384
387
|
}
|
385
388
|
|
386
|
-
if (!touchStartedRef.current || posAdjustingRef.current || scrollingRef.current) {
|
389
|
+
if (!touchStartedRef.current || posAdjustingRef.current || scrollingRef.current || !touchMovedRef.current) {
|
387
390
|
return;
|
388
391
|
}
|
389
392
|
|
package/cjs/tabs/tab-pane.js
CHANGED
@@ -250,12 +250,15 @@ var TabPane = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
250
250
|
}
|
251
251
|
|
252
252
|
var translateStr = translateZ ? ' translateZ(0)' : '';
|
253
|
+
var translatePercentInSSR = (panes.length ? 100 / panes.length : 0) * activeIndex * rtlRatio * -1 + "%";
|
254
|
+
var verticalTranslate = distance - wrapWidth * activeIndex * rtlRatio + "px";
|
255
|
+
var horizontalTranslate = distance - wrapHeight * activeIndex + "px";
|
253
256
|
var sizeStyle = tabDirection === 'vertical' ? {
|
254
257
|
width: 100 * panes.length + "%",
|
255
|
-
transform: "translateX(" + (
|
258
|
+
transform: "translateX(" + ((0, _mobileUtils.isSSR)() ? translatePercentInSSR : verticalTranslate) + ")" + translateStr
|
256
259
|
} : {
|
257
260
|
height: 100 * panes.length + "%",
|
258
|
-
transform: "translateY(" + (
|
261
|
+
transform: "translateY(" + ((0, _mobileUtils.isSSR)() ? translatePercentInSSR : horizontalTranslate) + ")" + translateStr
|
259
262
|
};
|
260
263
|
var heightStyle = currentPaneHeight && currentPaneHeight !== 'auto' ? {
|
261
264
|
height: currentPaneHeight
|
package/cjs/toast/index.d.ts
CHANGED
@@ -185,8 +185,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
185
185
|
* @param {string | ToastProps} config Configuration
|
186
186
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
187
187
|
*/
|
188
|
-
toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
189
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
188
|
+
toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
189
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
190
190
|
close: () => void;
|
191
191
|
hide: () => void;
|
192
192
|
};
|
@@ -196,8 +196,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
196
196
|
* @param {string | ToastProps} config Configuration
|
197
197
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
198
198
|
*/
|
199
|
-
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
200
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
199
|
+
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
200
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
201
201
|
close: () => void;
|
202
202
|
hide: () => void;
|
203
203
|
};
|
@@ -207,8 +207,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
207
207
|
* @param {string | ToastProps} config Configuration
|
208
208
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
209
209
|
*/
|
210
|
-
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
211
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
210
|
+
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
211
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
212
212
|
close: () => void;
|
213
213
|
hide: () => void;
|
214
214
|
};
|
@@ -218,8 +218,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
218
218
|
* @param {string | ToastProps} config Configuration
|
219
219
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
220
220
|
*/
|
221
|
-
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
222
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
221
|
+
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
222
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
223
223
|
close: () => void;
|
224
224
|
hide: () => void;
|
225
225
|
};
|
@@ -229,8 +229,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
229
229
|
* @param {string | ToastProps} config Configuration
|
230
230
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
231
231
|
*/
|
232
|
-
loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
233
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
232
|
+
loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
233
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
234
234
|
close: () => void;
|
235
235
|
hide: () => void;
|
236
236
|
};
|
@@ -240,8 +240,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
240
240
|
* @param {string | ToastProps} config Configuration
|
241
241
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
242
242
|
*/
|
243
|
-
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
244
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
243
|
+
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
244
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
245
245
|
close: () => void;
|
246
246
|
hide: () => void;
|
247
247
|
};
|