@arco-design/mobile-react 2.27.3 → 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 +27 -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/form/type.js +2 -0
- 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-bar/utils.js +1 -3
- 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/show-monitor/index.js +4 -3
- 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 +13859 -13830
- 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/form/type.js +2 -0
- 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-bar/utils.js +1 -2
- 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/show-monitor/index.js +4 -3
- 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/form/type.js +2 -0
- 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-bar/utils.js +5 -5
- 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/show-monitor/index.js +4 -3
- 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/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", {
|
package/umd/notify/index.d.ts
CHANGED
@@ -51,8 +51,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
|
|
51
51
|
* @param {string | NotifyProps} config
|
52
52
|
* @returns {{ update: (config: NotifyProps) => void; close: () => void }}
|
53
53
|
*/
|
54
|
-
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
55
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
54
|
+
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
55
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
|
56
56
|
close: () => void;
|
57
57
|
};
|
58
58
|
/**
|
@@ -61,8 +61,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
|
|
61
61
|
* @param {string | NotifyProps} config
|
62
62
|
* @returns {{ update: (config: NotifyProps) => void; close: () => void }}
|
63
63
|
*/
|
64
|
-
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
65
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
64
|
+
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
65
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
|
66
66
|
close: () => void;
|
67
67
|
};
|
68
68
|
/**
|
@@ -71,8 +71,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
|
|
71
71
|
* @param {string | NotifyProps} config
|
72
72
|
* @returns {{ update: (config: NotifyProps) => void; close: () => void }}
|
73
73
|
*/
|
74
|
-
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
75
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
74
|
+
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
75
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
|
76
76
|
close: () => void;
|
77
77
|
};
|
78
78
|
/**
|
@@ -81,8 +81,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
|
|
81
81
|
* @param {string | NotifyProps} config
|
82
82
|
* @returns {{ update: (config: NotifyProps) => void; close: () => void }}
|
83
83
|
*/
|
84
|
-
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
85
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
84
|
+
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
85
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
|
86
86
|
close: () => void;
|
87
87
|
};
|
88
88
|
};
|
package/umd/popover/popover.js
CHANGED
@@ -86,6 +86,8 @@
|
|
86
86
|
var wrapperRef = (0, _react.useRef)(null);
|
87
87
|
var childRef = (0, _react.useRef)(null);
|
88
88
|
var popoverRef = (0, _react.useRef)(null);
|
89
|
+
var transitionNodeRef = (0, _react.useRef)(null);
|
90
|
+
var maskRef = (0, _react.useRef)(null);
|
89
91
|
|
90
92
|
var _usePosition = (0, _hooks.usePosition)(props, popoverRef, childRef, wrapperRef),
|
91
93
|
direction = _usePosition.direction,
|
@@ -217,7 +219,10 @@
|
|
217
219
|
className: (0, _mobileUtils.cls)(theme + "-theme", innerPopoverClassName, {
|
218
220
|
bordered: bordered
|
219
221
|
}),
|
220
|
-
ref:
|
222
|
+
ref: function ref(ele) {
|
223
|
+
popoverRef.current = ele;
|
224
|
+
transitionNodeRef.current = ele == null ? void 0 : ele.dom;
|
225
|
+
},
|
221
226
|
direction: direction,
|
222
227
|
minWidth: minWidth,
|
223
228
|
maxWidth: maxWidth,
|
@@ -245,6 +250,7 @@
|
|
245
250
|
in: visibleState && !isCalcPosition,
|
246
251
|
timeout: transitionTimeout,
|
247
252
|
type: transitionName,
|
253
|
+
nodeRef: transitionNodeRef,
|
248
254
|
mountOnEnter: true,
|
249
255
|
unmountOnExit: true
|
250
256
|
}, renderInnerPopover()));
|
@@ -253,12 +259,14 @@
|
|
253
259
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showMask && /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_transition.default, {
|
254
260
|
in: visibleState && !isCalcPosition,
|
255
261
|
timeout: maskTransitionTimeout,
|
262
|
+
nodeRef: maskRef,
|
256
263
|
type: "fade",
|
257
264
|
mountOnEnter: true,
|
258
265
|
unmountOnExit: true
|
259
266
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
260
267
|
className: prefixCls + "-popover-mask",
|
261
|
-
onClick: onClickMask
|
268
|
+
onClick: onClickMask,
|
269
|
+
ref: maskRef
|
262
270
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
263
271
|
className: (0, _mobileUtils.cls)(prefixCls + "-popover", className, theme + "-theme", mode + "-mode", {
|
264
272
|
bordered: bordered,
|
package/umd/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" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
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" | "initialBodyOverflow" | "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" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
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" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
|
74
74
|
key?: string | undefined;
|
75
75
|
}) => void;
|
76
76
|
};
|
@@ -76,11 +76,11 @@ declare const _default: React.ForwardRefExoticComponent<PopupSwiperProps & React
|
|
76
76
|
* @param {string | PopupSwiperProps} config Configuration
|
77
77
|
* @returns {{ close: () => void; update: (newConfig: PopupSwiperProps) => void; }}
|
78
78
|
*/
|
79
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "
|
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" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
|
80
80
|
key?: string | undefined;
|
81
81
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
82
82
|
close: () => void;
|
83
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "
|
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" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
|
84
84
|
key?: string | undefined;
|
85
85
|
}) => void; /**
|
86
86
|
* 内容面板 touchstart 事件,返回true时表示阻止本组件内部处理事件
|
@@ -239,8 +239,9 @@
|
|
239
239
|
onOnceEmittedListeners[key] = [];
|
240
240
|
}, []);
|
241
241
|
|
242
|
-
function handleCheckChildrenExist() {
|
243
|
-
|
242
|
+
function handleCheckChildrenExist(target) {
|
243
|
+
var dom = target || domRef.current;
|
244
|
+
return isChildrenExist.current && (dom == null ? void 0 : dom.children.length);
|
244
245
|
}
|
245
246
|
|
246
247
|
function handleObserverStatusChange(entries) {
|
@@ -260,7 +261,7 @@
|
|
260
261
|
* @en Callback when the visible status of current element changes before the comparison
|
261
262
|
*/
|
262
263
|
|
263
|
-
isIntersecting !== curVisible && handleCheckChildrenExist() && onCompVisibleChange(isIntersecting, target);
|
264
|
+
isIntersecting !== curVisible && handleCheckChildrenExist(target) && onCompVisibleChange(isIntersecting, target);
|
264
265
|
/**
|
265
266
|
* 当前元素状态由不可见变为可见,且只触发一次
|
266
267
|
* @en The current element is invisible -> visible, and once, triggers the callback
|
@@ -5,7 +5,7 @@ export declare type LinePosition = {
|
|
5
5
|
length: number;
|
6
6
|
start: number;
|
7
7
|
};
|
8
|
-
export declare const SliderContext: React.Context<Required<Pick<SliderProps, "max" | "disabled" | "style" | "size" | "step" | "type" | "className" | "onChange" | "
|
8
|
+
export declare const SliderContext: React.Context<Required<Pick<SliderProps, "max" | "disabled" | "style" | "size" | "step" | "type" | "className" | "onChange" | "onAfterChange" | "min" | "suffixLabel" | "prefixLabel" | "useRange" | "useAnimation" | "showTooltip" | "showMarks" | "useMarkOnly" | "draggableTrackOnly" | "formatTooltip" | "renderThumb">> & Pick<SliderProps, "value" | "defaultValue" | "marks">>;
|
9
9
|
export * from './useSliderIcon';
|
10
10
|
export * from './useSliderInit';
|
11
11
|
export * from './useSliderStyle';
|
package/umd/slider/popover.js
CHANGED
@@ -33,15 +33,19 @@
|
|
33
33
|
_useContext$prefixCls = _useContext.prefixCls,
|
34
34
|
prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls;
|
35
35
|
|
36
|
+
var domRef = (0, _react.useRef)(null);
|
36
37
|
return /*#__PURE__*/_react.default.createElement("div", {
|
37
38
|
className: prefixCls + "-slider-popover-wrapper"
|
38
39
|
}, /*#__PURE__*/_react.default.createElement(_transition.default, {
|
39
40
|
in: visible,
|
40
41
|
timeout: 300,
|
41
42
|
type: "fade",
|
42
|
-
mountOnEnter: true
|
43
|
+
mountOnEnter: true,
|
44
|
+
unmountOnExit: true,
|
45
|
+
nodeRef: domRef
|
43
46
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
44
|
-
className: prefixCls + "-slider-popover" + (content ? '' : ' no-content')
|
47
|
+
className: prefixCls + "-slider-popover" + (content ? '' : ' no-content'),
|
48
|
+
ref: domRef
|
45
49
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
46
50
|
className: prefixCls + "-slider-popover-content"
|
47
51
|
}, content), /*#__PURE__*/_react.default.createElement("div", {
|
@@ -33,16 +33,15 @@
|
|
33
33
|
updateValue = params.updateValue,
|
34
34
|
onAddButtonClick = params.onAddButtonClick,
|
35
35
|
onMinusButtonClick = params.onMinusButtonClick;
|
36
|
+
var minusDisable = actualInputValue <= min || disabled;
|
36
37
|
|
37
|
-
var _useState = (0, _react.useState)(
|
38
|
-
return actualInputValue === min || disabled;
|
39
|
-
}),
|
38
|
+
var _useState = (0, _react.useState)(minusDisable),
|
40
39
|
minusButtonDisable = _useState[0],
|
41
40
|
setMinusButtonDisable = _useState[1];
|
42
41
|
|
43
|
-
var
|
44
|
-
|
45
|
-
|
42
|
+
var addDisable = actualInputValue >= max || disabled;
|
43
|
+
|
44
|
+
var _useState2 = (0, _react.useState)(addDisable),
|
46
45
|
addButtonDisable = _useState2[0],
|
47
46
|
setAddButtonDisable = _useState2[1];
|
48
47
|
|
@@ -73,9 +72,9 @@
|
|
73
72
|
|
74
73
|
|
75
74
|
(0, _react.useEffect)(function () {
|
76
|
-
setMinusButtonDisable(
|
77
|
-
setAddButtonDisable(
|
78
|
-
}, [
|
75
|
+
setMinusButtonDisable(minusDisable);
|
76
|
+
setAddButtonDisable(addDisable);
|
77
|
+
}, [minusDisable, addDisable]);
|
79
78
|
return {
|
80
79
|
minusButtonDisable: minusButtonDisable,
|
81
80
|
addButtonDisable: addButtonDisable,
|
package/umd/style.d.ts
CHANGED
@@ -1,35 +1,32 @@
|
|
1
1
|
import '../style/public.less';
|
2
|
-
import './
|
2
|
+
import './tabs/style';
|
3
|
+
import './sticky/style';
|
4
|
+
import './load-more/style';
|
5
|
+
import './cell/style';
|
3
6
|
import './action-sheet/style';
|
4
7
|
import './avatar/style';
|
5
8
|
import './badge/style';
|
9
|
+
import './button/style';
|
6
10
|
import './carousel/style';
|
7
|
-
import './cell/style';
|
8
11
|
import './checkbox/style';
|
9
12
|
import './circle-progress/style';
|
10
13
|
import './collapse/style';
|
11
14
|
import './context-provider/style';
|
12
15
|
import './count-down/style';
|
13
16
|
import './date-picker/style';
|
14
|
-
import './divider/style';
|
15
17
|
import './dialog/style';
|
18
|
+
import './divider/style';
|
16
19
|
import './dropdown/style';
|
17
20
|
import './dropdown-menu/style';
|
18
21
|
import './ellipsis/style';
|
19
22
|
import './form/style';
|
20
|
-
import './input/style';
|
21
|
-
import './textarea/style';
|
22
|
-
import './radio/style';
|
23
|
-
import './image-picker/style';
|
24
|
-
import './rate/style';
|
25
|
-
import './slider/style';
|
26
23
|
import './grid/style';
|
27
24
|
import './image/style';
|
28
|
-
import './
|
25
|
+
import './image-picker/style';
|
29
26
|
import './image-preview/style';
|
30
27
|
import './index-bar/style';
|
28
|
+
import './input/style';
|
31
29
|
import './keyboard/style';
|
32
|
-
import './load-more/style';
|
33
30
|
import './loading/style';
|
34
31
|
import './masking/style';
|
35
32
|
import './nav-bar/style';
|
@@ -44,15 +41,18 @@ import './popup-swiper/style';
|
|
44
41
|
import './portal/style';
|
45
42
|
import './progress/style';
|
46
43
|
import './pull-refresh/style';
|
44
|
+
import './radio/style';
|
45
|
+
import './rate/style';
|
47
46
|
import './search-bar/style';
|
47
|
+
import './show-monitor/style';
|
48
|
+
import './slider/style';
|
48
49
|
import './stepper/style';
|
49
50
|
import './steps/style';
|
50
|
-
import './sticky/style';
|
51
51
|
import './swipe-action/style';
|
52
52
|
import './swipe-load/style';
|
53
53
|
import './switch/style';
|
54
54
|
import './tab-bar/style';
|
55
|
-
import './tabs/style';
|
56
55
|
import './tag/style';
|
56
|
+
import './textarea/style';
|
57
57
|
import './toast/style';
|
58
58
|
import './transition/style';
|
package/umd/style.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["../style/public.less", "./
|
3
|
+
define(["../style/public.less", "./tabs/style", "./sticky/style", "./load-more/style", "./cell/style", "./action-sheet/style", "./avatar/style", "./badge/style", "./button/style", "./carousel/style", "./checkbox/style", "./circle-progress/style", "./collapse/style", "./context-provider/style", "./count-down/style", "./date-picker/style", "./dialog/style", "./divider/style", "./dropdown/style", "./dropdown-menu/style", "./ellipsis/style", "./form/style", "./grid/style", "./image/style", "./image-picker/style", "./image-preview/style", "./index-bar/style", "./input/style", "./keyboard/style", "./loading/style", "./masking/style", "./nav-bar/style", "./notice-bar/style", "./notify/style", "./pagination/style", "./picker/style", "./picker-view/style", "./popover/style", "./popup/style", "./popup-swiper/style", "./portal/style", "./progress/style", "./pull-refresh/style", "./radio/style", "./rate/style", "./search-bar/style", "./show-monitor/style", "./slider/style", "./stepper/style", "./steps/style", "./swipe-action/style", "./swipe-load/style", "./switch/style", "./tab-bar/style", "./tag/style", "./textarea/style", "./toast/style", "./transition/style"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(require("../style/public.less"), require("./
|
5
|
+
factory(require("../style/public.less"), require("./tabs/style"), require("./sticky/style"), require("./load-more/style"), require("./cell/style"), require("./action-sheet/style"), require("./avatar/style"), require("./badge/style"), require("./button/style"), require("./carousel/style"), require("./checkbox/style"), require("./circle-progress/style"), require("./collapse/style"), require("./context-provider/style"), require("./count-down/style"), require("./date-picker/style"), require("./dialog/style"), require("./divider/style"), require("./dropdown/style"), require("./dropdown-menu/style"), require("./ellipsis/style"), require("./form/style"), require("./grid/style"), require("./image/style"), require("./image-picker/style"), require("./image-preview/style"), require("./index-bar/style"), require("./input/style"), require("./keyboard/style"), require("./loading/style"), require("./masking/style"), require("./nav-bar/style"), require("./notice-bar/style"), require("./notify/style"), require("./pagination/style"), require("./picker/style"), require("./picker-view/style"), require("./popover/style"), require("./popup/style"), require("./popup-swiper/style"), require("./portal/style"), require("./progress/style"), require("./pull-refresh/style"), require("./radio/style"), require("./rate/style"), require("./search-bar/style"), require("./show-monitor/style"), require("./slider/style"), require("./stepper/style"), require("./steps/style"), require("./swipe-action/style"), require("./swipe-load/style"), require("./switch/style"), require("./tab-bar/style"), require("./tag/style"), require("./textarea/style"), require("./toast/style"), require("./transition/style"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
package/umd/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/umd/toast/index.js
CHANGED
@@ -68,6 +68,7 @@
|
|
68
68
|
initialBodyOverflow = props.initialBodyOverflow;
|
69
69
|
var closeTimerRef = (0, _react.useRef)();
|
70
70
|
var domRef = (0, _react.useRef)(null);
|
71
|
+
var wrapDomRef = (0, _react.useRef)(null);
|
71
72
|
var isInitialMount = (0, _react.useRef)(false);
|
72
73
|
var hasType = type && type !== 'info';
|
73
74
|
(0, _react.useImperativeHandle)(ref, function () {
|
@@ -136,7 +137,8 @@
|
|
136
137
|
className: (0, _mobileUtils.cls)(prefixClass + "-wrapper", "from-" + direction, {
|
137
138
|
'no-event': !disableBodyTouch
|
138
139
|
}),
|
139
|
-
onClick: handleClickMask
|
140
|
+
onClick: handleClickMask,
|
141
|
+
ref: wrapDomRef
|
140
142
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
141
143
|
className: (0, _mobileUtils.cls)(prefixClass + "-inner", layout, (_cls = {}, _cls[prefixClass + "-inner-mixin"] = (loading || hasType || icon) && layout === 'vertical', _cls))
|
142
144
|
}, loading && /*#__PURE__*/_react.default.createElement("div", {
|
@@ -163,7 +165,8 @@
|
|
163
165
|
}, /*#__PURE__*/_react.default.createElement(_transition.default, {
|
164
166
|
in: visible,
|
165
167
|
timeout: transitionDuration,
|
166
|
-
type: "fade"
|
168
|
+
type: "fade",
|
169
|
+
nodeRef: wrapDomRef
|
167
170
|
}, renderComponent(prefixCls + "-toast"))));
|
168
171
|
});
|
169
172
|
});
|