@arco-design/mobile-react 2.27.4 → 2.27.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 +15 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/hooks.js +1 -1
- package/cjs/action-sheet/index.d.ts +2 -2
- package/cjs/badge/index.js +2 -1
- package/cjs/dialog/index.d.ts +2 -2
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/image-preview/index.js +2 -1
- package/cjs/image-preview/style/css/index.css +3 -0
- package/cjs/image-preview/style/index.less +4 -0
- package/cjs/index.d.ts +12 -12
- package/cjs/index.js +46 -46
- package/cjs/load-more/index.d.ts +5 -0
- package/cjs/load-more/index.js +2 -1
- package/cjs/masking/index.d.ts +2 -2
- package/cjs/masking/index.js +4 -2
- package/cjs/notify/index.d.ts +8 -8
- package/cjs/popover/popover.js +10 -2
- package/cjs/popup/index.d.ts +2 -2
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/slider/hooks/index.d.ts +1 -1
- package/cjs/slider/popover.js +6 -2
- package/cjs/stepper/hooks/useButtonClick.js +8 -9
- package/cjs/style.d.ts +13 -13
- package/cjs/style.js +24 -24
- package/cjs/toast/index.d.ts +12 -12
- package/cjs/toast/index.js +5 -2
- package/dist/index.js +13828 -13802
- package/dist/index.min.js +3 -3
- package/dist/style.css +3273 -3270
- package/dist/style.min.css +1 -1
- package/esm/_helpers/hooks.js +2 -2
- package/esm/action-sheet/index.d.ts +2 -2
- package/esm/badge/index.js +2 -1
- package/esm/dialog/index.d.ts +2 -2
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/image-preview/index.js +2 -1
- package/esm/image-preview/style/css/index.css +3 -0
- package/esm/image-preview/style/index.less +4 -0
- package/esm/index.d.ts +12 -12
- package/esm/index.js +12 -12
- package/esm/load-more/index.d.ts +5 -0
- package/esm/load-more/index.js +2 -1
- package/esm/masking/index.d.ts +2 -2
- package/esm/masking/index.js +4 -2
- package/esm/notify/index.d.ts +8 -8
- package/esm/popover/popover.js +10 -2
- package/esm/popup/index.d.ts +2 -2
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/slider/hooks/index.d.ts +1 -1
- package/esm/slider/popover.js +7 -3
- package/esm/stepper/hooks/useButtonClick.js +8 -9
- package/esm/style.d.ts +13 -13
- package/esm/style.js +13 -13
- package/esm/toast/index.d.ts +12 -12
- package/esm/toast/index.js +5 -2
- package/package.json +3 -3
- package/umd/_helpers/hooks.js +1 -1
- package/umd/action-sheet/index.d.ts +2 -2
- package/umd/badge/index.js +2 -1
- package/umd/dialog/index.d.ts +2 -2
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/image-preview/index.js +2 -1
- package/umd/image-preview/style/css/index.css +3 -0
- package/umd/image-preview/style/index.less +4 -0
- package/umd/index.d.ts +12 -12
- package/umd/index.js +28 -28
- package/umd/load-more/index.d.ts +5 -0
- package/umd/load-more/index.js +2 -1
- package/umd/masking/index.d.ts +2 -2
- package/umd/masking/index.js +4 -2
- package/umd/notify/index.d.ts +8 -8
- package/umd/popover/popover.js +10 -2
- package/umd/popup/index.d.ts +2 -2
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/slider/hooks/index.d.ts +1 -1
- package/umd/slider/popover.js +6 -2
- package/umd/stepper/hooks/useButtonClick.js +8 -9
- package/umd/style.d.ts +13 -13
- package/umd/style.js +2 -2
- package/umd/toast/index.d.ts +12 -12
- package/umd/toast/index.js +5 -2
package/esm/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" | "
|
189
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, 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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => 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" | "
|
200
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, 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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => 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" | "
|
211
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, 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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => 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" | "
|
222
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, 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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => 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" | "
|
233
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, 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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => 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" | "
|
244
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, 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" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
245
245
|
close: () => void;
|
246
246
|
hide: () => void;
|
247
247
|
};
|
package/esm/toast/index.js
CHANGED
@@ -39,6 +39,7 @@ var Toast = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
39
39
|
initialBodyOverflow = props.initialBodyOverflow;
|
40
40
|
var closeTimerRef = useRef();
|
41
41
|
var domRef = useRef(null);
|
42
|
+
var wrapDomRef = useRef(null);
|
42
43
|
var isInitialMount = useRef(false);
|
43
44
|
var hasType = type && type !== 'info';
|
44
45
|
useImperativeHandle(ref, function () {
|
@@ -107,7 +108,8 @@ var Toast = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
107
108
|
className: cls(prefixClass + "-wrapper", "from-" + direction, {
|
108
109
|
'no-event': !disableBodyTouch
|
109
110
|
}),
|
110
|
-
onClick: handleClickMask
|
111
|
+
onClick: handleClickMask,
|
112
|
+
ref: wrapDomRef
|
111
113
|
}, /*#__PURE__*/React.createElement("div", {
|
112
114
|
className: cls(prefixClass + "-inner", layout, (_cls = {}, _cls[prefixClass + "-inner-mixin"] = (loading || hasType || icon) && layout === 'vertical', _cls))
|
113
115
|
}, loading && /*#__PURE__*/React.createElement("div", {
|
@@ -134,7 +136,8 @@ var Toast = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
134
136
|
}, /*#__PURE__*/React.createElement(Transition, {
|
135
137
|
in: visible,
|
136
138
|
timeout: transitionDuration,
|
137
|
-
type: "fade"
|
139
|
+
type: "fade",
|
140
|
+
nodeRef: wrapDomRef
|
138
141
|
}, renderComponent(prefixCls + "-toast"))));
|
139
142
|
});
|
140
143
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arco-design/mobile-react",
|
3
|
-
"version": "2.27.
|
3
|
+
"version": "2.27.5",
|
4
4
|
"description": "",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "esm/index.js",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"author": "taoyiyue@bytedance.com",
|
16
16
|
"license": "ISC",
|
17
17
|
"dependencies": {
|
18
|
-
"@arco-design/mobile-utils": "2.15.
|
18
|
+
"@arco-design/mobile-utils": "2.15.5",
|
19
19
|
"@arco-design/transformable": "^1.0.0",
|
20
20
|
"lodash.throttle": "^4.1.1",
|
21
21
|
"resize-observer-polyfill": "^1.5.1"
|
@@ -35,5 +35,5 @@
|
|
35
35
|
"publishConfig": {
|
36
36
|
"access": "public"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "0f41863cde2457384778f80ec7a7f78bf2e8fe47"
|
39
39
|
}
|
package/umd/_helpers/hooks.js
CHANGED
@@ -216,7 +216,7 @@
|
|
216
216
|
if (ele) {
|
217
217
|
var actualEle = Array.isArray(ele) ? ele : [ele];
|
218
218
|
scrollRef.current = actualEle.reduce(function (acc, nowEle) {
|
219
|
-
return [].concat(acc, nowEle &&
|
219
|
+
return [].concat(acc, nowEle && (0, _mobileUtils.safeGetComputedStyle)(nowEle).overflow !== 'hidden' ? [{
|
220
220
|
ele: nowEle,
|
221
221
|
maxScrollX: orientationDirection === 'left' || orientationDirection === 'right' ? nowEle.scrollHeight - nowEle.clientHeight : nowEle.scrollWidth - nowEle.clientWidth,
|
222
222
|
maxScrollY: orientationDirection === 'left' || orientationDirection === 'right' ? nowEle.scrollWidth - nowEle.clientWidth : nowEle.scrollHeight - nowEle.clientHeight
|
@@ -86,11 +86,11 @@ declare const _default: React.ForwardRefExoticComponent<ActionSheetProps & React
|
|
86
86
|
* @param {ActionSheetProps} config setting
|
87
87
|
* @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
|
88
88
|
*/
|
89
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
89
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
|
90
90
|
key?: string | undefined;
|
91
91
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
92
92
|
close: () => void;
|
93
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
93
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
|
94
94
|
key?: string | undefined;
|
95
95
|
}) => void;
|
96
96
|
};
|
package/umd/badge/index.js
CHANGED
@@ -72,7 +72,8 @@
|
|
72
72
|
return /*#__PURE__*/_react.default.createElement(_transition.default, {
|
73
73
|
in: visible,
|
74
74
|
timeout: timeout,
|
75
|
-
type: "scale"
|
75
|
+
type: "scale",
|
76
|
+
nodeRef: domRef
|
76
77
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
77
78
|
className: (0, _mobileUtils.cls)(prefixCls + "-badge", className, (_cls = {}, _cls[prefixCls + "-badge-dot dot"] = dot, _cls[prefixCls + "-badge-bordered bordered"] = bordered, _cls[prefixCls + "-badge-absolute absolute"] = absolute, _cls)),
|
78
79
|
style: style,
|
package/umd/dialog/index.d.ts
CHANGED
@@ -193,11 +193,11 @@ declare const _default: React.ForwardRefExoticComponent<DialogProps & React.RefA
|
|
193
193
|
* @param {DialogProps} config Configuration
|
194
194
|
* @returns {{ close: () => void; update: (newConfig: DialogProps) => void; }}
|
195
195
|
*/
|
196
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
196
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
|
197
197
|
key?: string | undefined;
|
198
198
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
199
199
|
close: () => void;
|
200
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
200
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
|
201
201
|
key?: string | undefined;
|
202
202
|
}) => void;
|
203
203
|
};
|
@@ -269,9 +269,9 @@ declare const _default: React.ForwardRefExoticComponent<ImagePreviewProps & Reac
|
|
269
269
|
* @param {ImagePreviewProps} config configuration
|
270
270
|
* @returns {{ close: () => void; update: (newConfig: ImagePreviewProps) => void; }}
|
271
271
|
*/
|
272
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "
|
272
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "loadingArea" | "onClose" | "fit" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
273
273
|
close: () => void;
|
274
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "
|
274
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "loadingArea" | "onClose" | "fit" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">) => void;
|
275
275
|
};
|
276
276
|
};
|
277
277
|
/**
|
@@ -904,7 +904,8 @@
|
|
904
904
|
timeout: displayDuration,
|
905
905
|
type: "fade",
|
906
906
|
mountOnEnter: true,
|
907
|
-
unmountOnExit: true
|
907
|
+
unmountOnExit: true,
|
908
|
+
nodeRef: domRef
|
908
909
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
909
910
|
className: (0, _mobileUtils.cls)(prefixCls + "-image-preview", 'all-border-box', {
|
910
911
|
noselect: noselect
|
package/umd/index.d.ts
CHANGED
@@ -1,34 +1,31 @@
|
|
1
|
-
export { default as
|
1
|
+
export { default as Tabs } from './tabs';
|
2
|
+
export { default as Sticky } from './sticky';
|
3
|
+
export { default as LoadMore } from './load-more';
|
4
|
+
export { default as Cell } from './cell';
|
2
5
|
export { default as ActionSheet } from './action-sheet';
|
3
6
|
export { default as Avatar } from './avatar';
|
4
7
|
export { default as Badge } from './badge';
|
8
|
+
export { default as Button } from './button';
|
5
9
|
export { default as Carousel } from './carousel';
|
6
|
-
export { default as Cell } from './cell';
|
7
10
|
export { default as Checkbox } from './checkbox';
|
8
11
|
export { default as CircleProgress } from './circle-progress';
|
9
12
|
export { default as Collapse } from './collapse';
|
10
13
|
export { default as ContextProvider } from './context-provider';
|
11
14
|
export { default as CountDown } from './count-down';
|
12
15
|
export { default as DatePicker } from './date-picker';
|
13
|
-
export { default as Divider } from './divider';
|
14
16
|
export { default as Dialog } from './dialog';
|
17
|
+
export { default as Divider } from './divider';
|
15
18
|
export { default as Dropdown } from './dropdown';
|
16
19
|
export { default as DropdownMenu } from './dropdown-menu';
|
17
20
|
export { default as Ellipsis } from './ellipsis';
|
18
21
|
export { default as Form } from './form';
|
19
|
-
export { default as Input } from './input';
|
20
|
-
export { default as Textarea } from './textarea';
|
21
|
-
export { default as Radio } from './radio';
|
22
|
-
export { default as Rate } from './rate';
|
23
|
-
export { default as Slider } from './slider';
|
24
22
|
export { default as Grid } from './grid';
|
25
23
|
export { default as Image } from './image';
|
26
|
-
export { default as ShowMonitor } from './show-monitor';
|
27
24
|
export { default as ImagePicker } from './image-picker';
|
28
25
|
export { default as ImagePreview } from './image-preview';
|
29
26
|
export { default as IndexBar } from './index-bar';
|
27
|
+
export { default as Input } from './input';
|
30
28
|
export { default as Keyboard } from './keyboard';
|
31
|
-
export { default as LoadMore } from './load-more';
|
32
29
|
export { default as Loading } from './loading';
|
33
30
|
export { default as Masking } from './masking';
|
34
31
|
export { default as NavBar } from './nav-bar';
|
@@ -43,15 +40,18 @@ export { default as PopupSwiper } from './popup-swiper';
|
|
43
40
|
export { default as Portal } from './portal';
|
44
41
|
export { default as Progress } from './progress';
|
45
42
|
export { default as PullRefresh } from './pull-refresh';
|
43
|
+
export { default as Radio } from './radio';
|
44
|
+
export { default as Rate } from './rate';
|
46
45
|
export { default as SearchBar } from './search-bar';
|
46
|
+
export { default as ShowMonitor } from './show-monitor';
|
47
|
+
export { default as Slider } from './slider';
|
47
48
|
export { default as Stepper } from './stepper';
|
48
49
|
export { default as Steps } from './steps';
|
49
|
-
export { default as Sticky } from './sticky';
|
50
50
|
export { default as SwipeAction } from './swipe-action';
|
51
51
|
export { default as SwipeLoad } from './swipe-load';
|
52
52
|
export { default as Switch } from './switch';
|
53
53
|
export { default as TabBar } from './tab-bar';
|
54
|
-
export { default as Tabs } from './tabs';
|
55
54
|
export { default as Tag } from './tag';
|
55
|
+
export { default as Textarea } from './textarea';
|
56
56
|
export { default as Toast } from './toast';
|
57
57
|
export { default as Transition } from './transition';
|
package/umd/index.js
CHANGED
@@ -1,34 +1,40 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "./
|
3
|
+
define(["exports", "./tabs", "./sticky", "./load-more", "./cell", "./action-sheet", "./avatar", "./badge", "./button", "./carousel", "./checkbox", "./circle-progress", "./collapse", "./context-provider", "./count-down", "./date-picker", "./dialog", "./divider", "./dropdown", "./dropdown-menu", "./ellipsis", "./form", "./grid", "./image", "./image-picker", "./image-preview", "./index-bar", "./input", "./keyboard", "./loading", "./masking", "./nav-bar", "./notice-bar", "./notify", "./pagination", "./picker", "./picker-view", "./popover", "./popup", "./popup-swiper", "./portal", "./progress", "./pull-refresh", "./radio", "./rate", "./search-bar", "./show-monitor", "./slider", "./stepper", "./steps", "./swipe-action", "./swipe-load", "./switch", "./tab-bar", "./tag", "./textarea", "./toast", "./transition"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("./
|
5
|
+
factory(exports, require("./tabs"), require("./sticky"), require("./load-more"), require("./cell"), require("./action-sheet"), require("./avatar"), require("./badge"), require("./button"), require("./carousel"), require("./checkbox"), require("./circle-progress"), require("./collapse"), require("./context-provider"), require("./count-down"), require("./date-picker"), require("./dialog"), require("./divider"), require("./dropdown"), require("./dropdown-menu"), require("./ellipsis"), require("./form"), require("./grid"), require("./image"), require("./image-picker"), require("./image-preview"), require("./index-bar"), require("./input"), require("./keyboard"), require("./loading"), require("./masking"), require("./nav-bar"), require("./notice-bar"), require("./notify"), require("./pagination"), require("./picker"), require("./picker-view"), require("./popover"), require("./popup"), require("./popup-swiper"), require("./portal"), require("./progress"), require("./pull-refresh"), require("./radio"), require("./rate"), require("./search-bar"), require("./show-monitor"), require("./slider"), require("./stepper"), require("./steps"), require("./swipe-action"), require("./swipe-load"), require("./switch"), require("./tab-bar"), require("./tag"), require("./textarea"), require("./toast"), require("./transition"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.
|
10
|
+
factory(mod.exports, global.tabs, global.sticky, global.loadMore, global.cell, global.actionSheet, global.avatar, global.badge, global.button, global.carousel, global.checkbox, global.circleProgress, global.collapse, global.contextProvider, global.countDown, global.datePicker, global.dialog, global.divider, global.dropdown, global.dropdownMenu, global.ellipsis, global.form, global.grid, global.image, global.imagePicker, global.imagePreview, global.indexBar, global.input, global.keyboard, global.loading, global.masking, global.navBar, global.noticeBar, global.notify, global.pagination, global.picker, global.pickerView, global.popover, global.popup, global.popupSwiper, global.portal, global.progress, global.pullRefresh, global.radio, global.rate, global.searchBar, global.showMonitor, global.slider, global.stepper, global.steps, global.swipeAction, global.swipeLoad, global._switch, global.tabBar, global.tag, global.textarea, global.toast, global.transition);
|
11
11
|
global.index = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports,
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _tabs, _sticky, _loadMore, _cell, _actionSheet, _avatar, _badge, _button, _carousel, _checkbox, _circleProgress, _collapse, _contextProvider, _countDown, _datePicker, _dialog, _divider, _dropdown, _dropdownMenu, _ellipsis, _form, _grid, _image, _imagePicker, _imagePreview, _indexBar, _input, _keyboard, _loading, _masking, _navBar, _noticeBar, _notify, _pagination, _picker, _pickerView, _popover, _popup, _popupSwiper, _portal, _progress, _pullRefresh, _radio, _rate, _searchBar, _showMonitor, _slider, _stepper, _steps, _swipeAction, _swipeLoad, _switch, _tabBar, _tag, _textarea, _toast, _transition) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
17
17
|
|
18
18
|
_exports.__esModule = true;
|
19
19
|
_exports.Transition = _exports.Toast = _exports.Textarea = _exports.Tag = _exports.Tabs = _exports.TabBar = _exports.Switch = _exports.SwipeLoad = _exports.SwipeAction = _exports.Sticky = _exports.Steps = _exports.Stepper = _exports.Slider = _exports.ShowMonitor = _exports.SearchBar = _exports.Rate = _exports.Radio = _exports.PullRefresh = _exports.Progress = _exports.Portal = _exports.PopupSwiper = _exports.Popup = _exports.Popover = _exports.PickerView = _exports.Picker = _exports.Pagination = _exports.Notify = _exports.NoticeBar = _exports.NavBar = _exports.Masking = _exports.Loading = _exports.LoadMore = _exports.Keyboard = _exports.Input = _exports.IndexBar = _exports.ImagePreview = _exports.ImagePicker = _exports.Image = _exports.Grid = _exports.Form = _exports.Ellipsis = _exports.DropdownMenu = _exports.Dropdown = _exports.Divider = _exports.Dialog = _exports.DatePicker = _exports.CountDown = _exports.ContextProvider = _exports.Collapse = _exports.CircleProgress = _exports.Checkbox = _exports.Cell = _exports.Carousel = _exports.Button = _exports.Badge = _exports.Avatar = _exports.ActionSheet = void 0;
|
20
|
-
|
21
|
-
_exports.
|
20
|
+
_tabs = _interopRequireDefault(_tabs);
|
21
|
+
_exports.Tabs = _tabs.default;
|
22
|
+
_sticky = _interopRequireDefault(_sticky);
|
23
|
+
_exports.Sticky = _sticky.default;
|
24
|
+
_loadMore = _interopRequireDefault(_loadMore);
|
25
|
+
_exports.LoadMore = _loadMore.default;
|
26
|
+
_cell = _interopRequireDefault(_cell);
|
27
|
+
_exports.Cell = _cell.default;
|
22
28
|
_actionSheet = _interopRequireDefault(_actionSheet);
|
23
29
|
_exports.ActionSheet = _actionSheet.default;
|
24
30
|
_avatar = _interopRequireDefault(_avatar);
|
25
31
|
_exports.Avatar = _avatar.default;
|
26
32
|
_badge = _interopRequireDefault(_badge);
|
27
33
|
_exports.Badge = _badge.default;
|
34
|
+
_button = _interopRequireDefault(_button);
|
35
|
+
_exports.Button = _button.default;
|
28
36
|
_carousel = _interopRequireDefault(_carousel);
|
29
37
|
_exports.Carousel = _carousel.default;
|
30
|
-
_cell = _interopRequireDefault(_cell);
|
31
|
-
_exports.Cell = _cell.default;
|
32
38
|
_checkbox = _interopRequireDefault(_checkbox);
|
33
39
|
_exports.Checkbox = _checkbox.default;
|
34
40
|
_circleProgress = _interopRequireDefault(_circleProgress);
|
@@ -41,10 +47,10 @@
|
|
41
47
|
_exports.CountDown = _countDown.default;
|
42
48
|
_datePicker = _interopRequireDefault(_datePicker);
|
43
49
|
_exports.DatePicker = _datePicker.default;
|
44
|
-
_divider = _interopRequireDefault(_divider);
|
45
|
-
_exports.Divider = _divider.default;
|
46
50
|
_dialog = _interopRequireDefault(_dialog);
|
47
51
|
_exports.Dialog = _dialog.default;
|
52
|
+
_divider = _interopRequireDefault(_divider);
|
53
|
+
_exports.Divider = _divider.default;
|
48
54
|
_dropdown = _interopRequireDefault(_dropdown);
|
49
55
|
_exports.Dropdown = _dropdown.default;
|
50
56
|
_dropdownMenu = _interopRequireDefault(_dropdownMenu);
|
@@ -53,32 +59,20 @@
|
|
53
59
|
_exports.Ellipsis = _ellipsis.default;
|
54
60
|
_form = _interopRequireDefault(_form);
|
55
61
|
_exports.Form = _form.default;
|
56
|
-
_input = _interopRequireDefault(_input);
|
57
|
-
_exports.Input = _input.default;
|
58
|
-
_textarea = _interopRequireDefault(_textarea);
|
59
|
-
_exports.Textarea = _textarea.default;
|
60
|
-
_radio = _interopRequireDefault(_radio);
|
61
|
-
_exports.Radio = _radio.default;
|
62
|
-
_rate = _interopRequireDefault(_rate);
|
63
|
-
_exports.Rate = _rate.default;
|
64
|
-
_slider = _interopRequireDefault(_slider);
|
65
|
-
_exports.Slider = _slider.default;
|
66
62
|
_grid = _interopRequireDefault(_grid);
|
67
63
|
_exports.Grid = _grid.default;
|
68
64
|
_image = _interopRequireDefault(_image);
|
69
65
|
_exports.Image = _image.default;
|
70
|
-
_showMonitor = _interopRequireDefault(_showMonitor);
|
71
|
-
_exports.ShowMonitor = _showMonitor.default;
|
72
66
|
_imagePicker = _interopRequireDefault(_imagePicker);
|
73
67
|
_exports.ImagePicker = _imagePicker.default;
|
74
68
|
_imagePreview = _interopRequireDefault(_imagePreview);
|
75
69
|
_exports.ImagePreview = _imagePreview.default;
|
76
70
|
_indexBar = _interopRequireDefault(_indexBar);
|
77
71
|
_exports.IndexBar = _indexBar.default;
|
72
|
+
_input = _interopRequireDefault(_input);
|
73
|
+
_exports.Input = _input.default;
|
78
74
|
_keyboard = _interopRequireDefault(_keyboard);
|
79
75
|
_exports.Keyboard = _keyboard.default;
|
80
|
-
_loadMore = _interopRequireDefault(_loadMore);
|
81
|
-
_exports.LoadMore = _loadMore.default;
|
82
76
|
_loading = _interopRequireDefault(_loading);
|
83
77
|
_exports.Loading = _loading.default;
|
84
78
|
_masking = _interopRequireDefault(_masking);
|
@@ -107,14 +101,20 @@
|
|
107
101
|
_exports.Progress = _progress.default;
|
108
102
|
_pullRefresh = _interopRequireDefault(_pullRefresh);
|
109
103
|
_exports.PullRefresh = _pullRefresh.default;
|
104
|
+
_radio = _interopRequireDefault(_radio);
|
105
|
+
_exports.Radio = _radio.default;
|
106
|
+
_rate = _interopRequireDefault(_rate);
|
107
|
+
_exports.Rate = _rate.default;
|
110
108
|
_searchBar = _interopRequireDefault(_searchBar);
|
111
109
|
_exports.SearchBar = _searchBar.default;
|
110
|
+
_showMonitor = _interopRequireDefault(_showMonitor);
|
111
|
+
_exports.ShowMonitor = _showMonitor.default;
|
112
|
+
_slider = _interopRequireDefault(_slider);
|
113
|
+
_exports.Slider = _slider.default;
|
112
114
|
_stepper = _interopRequireDefault(_stepper);
|
113
115
|
_exports.Stepper = _stepper.default;
|
114
116
|
_steps = _interopRequireDefault(_steps);
|
115
117
|
_exports.Steps = _steps.default;
|
116
|
-
_sticky = _interopRequireDefault(_sticky);
|
117
|
-
_exports.Sticky = _sticky.default;
|
118
118
|
_swipeAction = _interopRequireDefault(_swipeAction);
|
119
119
|
_exports.SwipeAction = _swipeAction.default;
|
120
120
|
_swipeLoad = _interopRequireDefault(_swipeLoad);
|
@@ -123,10 +123,10 @@
|
|
123
123
|
_exports.Switch = _switch.default;
|
124
124
|
_tabBar = _interopRequireDefault(_tabBar);
|
125
125
|
_exports.TabBar = _tabBar.default;
|
126
|
-
_tabs = _interopRequireDefault(_tabs);
|
127
|
-
_exports.Tabs = _tabs.default;
|
128
126
|
_tag = _interopRequireDefault(_tag);
|
129
127
|
_exports.Tag = _tag.default;
|
128
|
+
_textarea = _interopRequireDefault(_textarea);
|
129
|
+
_exports.Textarea = _textarea.default;
|
130
130
|
_toast = _interopRequireDefault(_toast);
|
131
131
|
_exports.Toast = _toast.default;
|
132
132
|
_transition = _interopRequireDefault(_transition);
|
package/umd/load-more/index.d.ts
CHANGED
@@ -62,6 +62,11 @@ export interface LoadMoreProps {
|
|
62
62
|
* @default () => window
|
63
63
|
*/
|
64
64
|
getScrollContainer?: () => HTMLElement | Window | null;
|
65
|
+
/**
|
66
|
+
* 当多个 loadmore 在同一页面时,通过传入节点的 offsetHeight + offsetTop 代替 scrollHeight
|
67
|
+
* @en When multiple loadmores are on the same page, pass in the offsetHeight + offsetTop of the node instead of scrollHeight
|
68
|
+
*/
|
69
|
+
getOffsetNode?: () => HTMLElement | Window | null;
|
65
70
|
/**
|
66
71
|
* 触发loading的时机,当为click时,点击后将触发getData
|
67
72
|
* @en The timing of triggering loading, when it is click, getData will be triggered after clicking
|
package/umd/load-more/index.js
CHANGED
@@ -45,6 +45,7 @@
|
|
45
45
|
defaultStatus = _props$defaultStatus === void 0 ? 'prepare' : _props$defaultStatus,
|
46
46
|
status = props.status,
|
47
47
|
getScrollContainer = props.getScrollContainer,
|
48
|
+
getOffsetNode = props.getOffsetNode,
|
48
49
|
_props$trigger = props.trigger,
|
49
50
|
trigger = _props$trigger === void 0 ? 'scroll' : _props$trigger,
|
50
51
|
_props$threshold = props.threshold,
|
@@ -147,7 +148,7 @@
|
|
147
148
|
}, [changeStatus]);
|
148
149
|
|
149
150
|
function checkNeedTrigger(top, ths) {
|
150
|
-
var scrollHeight = (0, _mobileUtils.getScrollContainerAttribute)('scrollHeight', getScrollContainer);
|
151
|
+
var scrollHeight = getOffsetNode ? (0, _mobileUtils.getScrollContainerAttribute)('offsetHeight', getOffsetNode) + (0, _mobileUtils.getScrollContainerAttribute)('offsetTop', getOffsetNode) : (0, _mobileUtils.getScrollContainerAttribute)('scrollHeight', getScrollContainer);
|
151
152
|
var clientHeight = (0, _mobileUtils.getScrollContainerAttribute)('clientHeight', getScrollContainer);
|
152
153
|
return scrollHeight - top - clientHeight <= ths;
|
153
154
|
}
|
package/umd/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" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
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" | "initialBodyOverflow" | "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" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
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" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
|
213
213
|
key?: string | undefined;
|
214
214
|
}) => void;
|
215
215
|
};
|
package/umd/masking/index.js
CHANGED
@@ -185,7 +185,8 @@
|
|
185
185
|
timeout: maskTransitionTimeout,
|
186
186
|
type: maskTransitionType,
|
187
187
|
mountOnEnter: mountOnEnter,
|
188
|
-
unmountOnExit: unmountOnExit
|
188
|
+
unmountOnExit: unmountOnExit,
|
189
|
+
nodeRef: maskRef
|
189
190
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
190
191
|
ref: maskRef,
|
191
192
|
className: (0, _mobileUtils.cls)(prefixCls + "-masking-mask", extraClass, maskClass),
|
@@ -196,7 +197,8 @@
|
|
196
197
|
timeout: contentTransitionTimeout,
|
197
198
|
type: contentTransitionType,
|
198
199
|
mountOnEnter: mountOnEnter,
|
199
|
-
unmountOnExit: unmountOnExit
|
200
|
+
unmountOnExit: unmountOnExit,
|
201
|
+
nodeRef: contentRef
|
200
202
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
201
203
|
ref: contentRef,
|
202
204
|
className: (0, _mobileUtils.cls)(prefixCls + "-masking-content", {
|