@arco-design/mobile-react 2.29.4 → 2.29.6
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 +28 -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/index.d.ts +7 -7
- package/cjs/image/index.js +81 -61
- package/cjs/image-picker/index.js +14 -6
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/image-preview/index.js +11 -5
- package/cjs/image-preview/methods.d.ts +1 -0
- package/cjs/image-preview/methods.js +7 -2
- package/cjs/index.d.ts +5 -5
- package/cjs/index.js +16 -16
- package/cjs/load-more/index.d.ts +7 -2
- package/cjs/load-more/index.js +9 -1
- package/cjs/masking/index.d.ts +2 -2
- package/cjs/masking/methods.js +7 -2
- package/cjs/popup/index.d.ts +2 -2
- package/cjs/popup-swiper/index.d.ts +4 -10
- 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/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 +2505 -2458
- package/dist/index.min.js +4 -4
- package/dist/style.css +503 -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/index.d.ts +7 -7
- package/esm/image/index.js +81 -61
- package/esm/image-picker/index.js +13 -6
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/image-preview/index.js +11 -5
- package/esm/image-preview/methods.d.ts +1 -0
- package/esm/image-preview/methods.js +7 -3
- package/esm/index.d.ts +5 -5
- package/esm/index.js +5 -5
- package/esm/load-more/index.d.ts +7 -2
- package/esm/load-more/index.js +9 -1
- package/esm/masking/index.d.ts +2 -2
- package/esm/masking/methods.js +7 -3
- package/esm/popup/index.d.ts +2 -2
- package/esm/popup-swiper/index.d.ts +4 -10
- 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/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/umd/action-sheet/index.d.ts +2 -2
- package/umd/dialog/index.d.ts +2 -2
- package/umd/image/index.d.ts +7 -7
- package/umd/image/index.js +81 -61
- package/umd/image-picker/index.js +16 -10
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/image-preview/index.js +11 -5
- package/umd/image-preview/methods.d.ts +1 -0
- package/umd/image-preview/methods.js +7 -2
- package/umd/index.d.ts +5 -5
- package/umd/index.js +14 -14
- package/umd/load-more/index.d.ts +7 -2
- package/umd/load-more/index.js +9 -1
- package/umd/masking/index.d.ts +2 -2
- package/umd/masking/methods.js +7 -2
- package/umd/popup/index.d.ts +2 -2
- package/umd/popup-swiper/index.d.ts +4 -10
- 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/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
package/cjs/load-more/index.js
CHANGED
@@ -147,10 +147,18 @@ var LoadMore = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
147
147
|
}
|
148
148
|
};
|
149
149
|
}, [trigger, disabled, getScrollContainer, handleContainerScroll, throttle]);
|
150
|
+
|
151
|
+
var getDataWithEndReachCheck = function getDataWithEndReachCheck() {
|
152
|
+
if (checkNeedTrigger(0, threshold)) {
|
153
|
+
triggerGetData('pageEnd');
|
154
|
+
}
|
155
|
+
};
|
156
|
+
|
150
157
|
(0, _react.useImperativeHandle)(ref, function () {
|
151
158
|
return {
|
152
159
|
dom: domRef.current,
|
153
|
-
changeStatus: changeStatus
|
160
|
+
changeStatus: changeStatus,
|
161
|
+
getDataWithEndReachCheck: getDataWithEndReachCheck
|
154
162
|
};
|
155
163
|
}, [changeStatus]);
|
156
164
|
|
package/cjs/masking/index.d.ts
CHANGED
@@ -205,11 +205,11 @@ declare const _default: React.ForwardRefExoticComponent<MaskingProps & React.Ref
|
|
205
205
|
* @param {MaskingProps} config Configuration
|
206
206
|
* @returns {{ close: () => void; update: (newConfig: MaskingProps) => void; }}
|
207
207
|
*/
|
208
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
208
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
|
209
209
|
key?: string | undefined;
|
210
210
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
211
211
|
close: () => void;
|
212
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
212
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
|
213
213
|
key?: string | undefined;
|
214
214
|
}) => void;
|
215
215
|
};
|
package/cjs/masking/methods.js
CHANGED
@@ -25,8 +25,7 @@ function getOpenMethod(Component, containerId, normalize) {
|
|
25
25
|
}, normalize(config), {
|
26
26
|
visible: false,
|
27
27
|
close: function close() {}
|
28
|
-
});
|
29
|
-
var dynamicProps = (0, _extends2.default)({}, baseProps); // 不同的key用不同的容器挂载
|
28
|
+
}); // 不同的key用不同的容器挂载
|
30
29
|
|
31
30
|
var id = "_" + (containerId || 'ARCO_MASKING') + "_DIV_" + (config.key || '') + "_";
|
32
31
|
|
@@ -38,6 +37,12 @@ function getOpenMethod(Component, containerId, normalize) {
|
|
38
37
|
var _ReactDOMRender = new _render.ReactDOMRender(Component, div, context),
|
39
38
|
render = _ReactDOMRender.render;
|
40
39
|
|
40
|
+
var dynamicProps = (0, _extends2.default)({}, baseProps, {
|
41
|
+
getContainer: function getContainer() {
|
42
|
+
return div;
|
43
|
+
}
|
44
|
+
});
|
45
|
+
|
41
46
|
function update(newConfig) {
|
42
47
|
dynamicProps = (0, _extends2.default)({}, dynamicProps, normalize(newConfig));
|
43
48
|
render(dynamicProps);
|
package/cjs/popup/index.d.ts
CHANGED
@@ -66,11 +66,11 @@ declare const _default: React.ForwardRefExoticComponent<PopupProps & React.RefAt
|
|
66
66
|
* @param {PopupProps} config Configuration
|
67
67
|
* @returns {{ close: () => void; update: (newConfig: PopupProps) => void; }}
|
68
68
|
*/
|
69
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
69
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
|
70
70
|
key?: string | undefined;
|
71
71
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
72
72
|
close: () => void;
|
73
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
73
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
|
74
74
|
key?: string | undefined;
|
75
75
|
}) => void;
|
76
76
|
};
|
@@ -63,10 +63,7 @@ export declare function methodsGenerator<P extends OpenBaseProps>(Comp: React.Fu
|
|
63
63
|
close: () => void;
|
64
64
|
update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">> & {
|
65
65
|
key?: string | undefined;
|
66
|
-
}) => void;
|
67
|
-
* 内容面板 touchstart 事件,返回true时表示阻止本组件内部处理事件
|
68
|
-
* @en The touchstart callback of content panel. When it returns true, it means that the event is prevented from being processed inside the component
|
69
|
-
*/
|
66
|
+
}) => void;
|
70
67
|
};
|
71
68
|
};
|
72
69
|
declare const _default: React.ForwardRefExoticComponent<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>> & {
|
@@ -76,16 +73,13 @@ declare const _default: React.ForwardRefExoticComponent<PopupSwiperProps & React
|
|
76
73
|
* @param {string | PopupSwiperProps} config Configuration
|
77
74
|
* @returns {{ close: () => void; update: (newConfig: PopupSwiperProps) => void; }}
|
78
75
|
*/
|
79
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
76
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
|
80
77
|
key?: string | undefined;
|
81
78
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
82
79
|
close: () => void;
|
83
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
80
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
|
84
81
|
key?: string | undefined;
|
85
|
-
}) => void;
|
86
|
-
* 内容面板 touchstart 事件,返回true时表示阻止本组件内部处理事件
|
87
|
-
* @en The touchstart callback of content panel. When it returns true, it means that the event is prevented from being processed inside the component
|
88
|
-
*/
|
82
|
+
}) => void;
|
89
83
|
};
|
90
84
|
};
|
91
85
|
/**
|
@@ -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 {
|
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
@@ -255,7 +255,10 @@ var Tabs = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
255
255
|
// 利用受控手动更改index时,给cell line加上动画
|
256
256
|
// @en Animate the cell line when changeing the index
|
257
257
|
setCellTrans(true);
|
258
|
-
|
258
|
+
|
259
|
+
if (!changeFromRef.current) {
|
260
|
+
changeFromRef.current = 'manual';
|
261
|
+
}
|
259
262
|
}, [activeTab]);
|
260
263
|
(0, _helpers.useUpdateEffect)(function () {
|
261
264
|
onDistanceChange && onDistanceChange(distance, wrapWidth, activeIndex);
|
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
|
};
|