@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.
Files changed (83) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/_helpers/hooks.js +1 -1
  5. package/cjs/action-sheet/index.d.ts +2 -2
  6. package/cjs/badge/index.js +2 -1
  7. package/cjs/dialog/index.d.ts +2 -2
  8. package/cjs/image-preview/index.d.ts +2 -2
  9. package/cjs/image-preview/index.js +2 -1
  10. package/cjs/image-preview/style/css/index.css +3 -0
  11. package/cjs/image-preview/style/index.less +4 -0
  12. package/cjs/index.d.ts +12 -12
  13. package/cjs/index.js +46 -46
  14. package/cjs/load-more/index.d.ts +5 -0
  15. package/cjs/load-more/index.js +2 -1
  16. package/cjs/masking/index.d.ts +2 -2
  17. package/cjs/masking/index.js +4 -2
  18. package/cjs/notify/index.d.ts +8 -8
  19. package/cjs/popover/popover.js +10 -2
  20. package/cjs/popup/index.d.ts +2 -2
  21. package/cjs/popup-swiper/index.d.ts +2 -2
  22. package/cjs/slider/hooks/index.d.ts +1 -1
  23. package/cjs/slider/popover.js +6 -2
  24. package/cjs/stepper/hooks/useButtonClick.js +8 -9
  25. package/cjs/style.d.ts +13 -13
  26. package/cjs/style.js +24 -24
  27. package/cjs/toast/index.d.ts +12 -12
  28. package/cjs/toast/index.js +5 -2
  29. package/dist/index.js +13828 -13802
  30. package/dist/index.min.js +3 -3
  31. package/dist/style.css +3273 -3270
  32. package/dist/style.min.css +1 -1
  33. package/esm/_helpers/hooks.js +2 -2
  34. package/esm/action-sheet/index.d.ts +2 -2
  35. package/esm/badge/index.js +2 -1
  36. package/esm/dialog/index.d.ts +2 -2
  37. package/esm/image-preview/index.d.ts +2 -2
  38. package/esm/image-preview/index.js +2 -1
  39. package/esm/image-preview/style/css/index.css +3 -0
  40. package/esm/image-preview/style/index.less +4 -0
  41. package/esm/index.d.ts +12 -12
  42. package/esm/index.js +12 -12
  43. package/esm/load-more/index.d.ts +5 -0
  44. package/esm/load-more/index.js +2 -1
  45. package/esm/masking/index.d.ts +2 -2
  46. package/esm/masking/index.js +4 -2
  47. package/esm/notify/index.d.ts +8 -8
  48. package/esm/popover/popover.js +10 -2
  49. package/esm/popup/index.d.ts +2 -2
  50. package/esm/popup-swiper/index.d.ts +2 -2
  51. package/esm/slider/hooks/index.d.ts +1 -1
  52. package/esm/slider/popover.js +7 -3
  53. package/esm/stepper/hooks/useButtonClick.js +8 -9
  54. package/esm/style.d.ts +13 -13
  55. package/esm/style.js +13 -13
  56. package/esm/toast/index.d.ts +12 -12
  57. package/esm/toast/index.js +5 -2
  58. package/package.json +3 -3
  59. package/umd/_helpers/hooks.js +1 -1
  60. package/umd/action-sheet/index.d.ts +2 -2
  61. package/umd/badge/index.js +2 -1
  62. package/umd/dialog/index.d.ts +2 -2
  63. package/umd/image-preview/index.d.ts +2 -2
  64. package/umd/image-preview/index.js +2 -1
  65. package/umd/image-preview/style/css/index.css +3 -0
  66. package/umd/image-preview/style/index.less +4 -0
  67. package/umd/index.d.ts +12 -12
  68. package/umd/index.js +28 -28
  69. package/umd/load-more/index.d.ts +5 -0
  70. package/umd/load-more/index.js +2 -1
  71. package/umd/masking/index.d.ts +2 -2
  72. package/umd/masking/index.js +4 -2
  73. package/umd/notify/index.d.ts +8 -8
  74. package/umd/popover/popover.js +10 -2
  75. package/umd/popup/index.d.ts +2 -2
  76. package/umd/popup-swiper/index.d.ts +2 -2
  77. package/umd/slider/hooks/index.d.ts +1 -1
  78. package/umd/slider/popover.js +6 -2
  79. package/umd/stepper/hooks/useButtonClick.js +8 -9
  80. package/umd/style.d.ts +13 -13
  81. package/umd/style.js +2 -2
  82. package/umd/toast/index.d.ts +12 -12
  83. package/umd/toast/index.js +5 -2
@@ -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" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onTouchMove" | "onPreventTouchMove" | "getScrollContainer" | "needBottomOffset" | "translateZ" | "onTouchEnd" | "onTouchStart" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
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" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onTouchMove" | "onPreventTouchMove" | "getScrollContainer" | "needBottomOffset" | "translateZ" | "onTouchEnd" | "onTouchStart" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
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时表示阻止本组件内部处理事件
@@ -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" | "min" | "onAfterChange" | "suffixLabel" | "prefixLabel" | "useRange" | "useAnimation" | "showTooltip" | "showMarks" | "useMarkOnly" | "draggableTrackOnly" | "formatTooltip" | "renderThumb">> & Pick<SliderProps, "value" | "defaultValue" | "marks">>;
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';
@@ -24,15 +24,19 @@ function Popover(_ref) {
24
24
  _useContext$prefixCls = _useContext.prefixCls,
25
25
  prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls;
26
26
 
27
+ var domRef = (0, _react.useRef)(null);
27
28
  return /*#__PURE__*/_react.default.createElement("div", {
28
29
  className: prefixCls + "-slider-popover-wrapper"
29
30
  }, /*#__PURE__*/_react.default.createElement(_transition.default, {
30
31
  in: visible,
31
32
  timeout: 300,
32
33
  type: "fade",
33
- mountOnEnter: true
34
+ mountOnEnter: true,
35
+ unmountOnExit: true,
36
+ nodeRef: domRef
34
37
  }, /*#__PURE__*/_react.default.createElement("div", {
35
- className: prefixCls + "-slider-popover" + (content ? '' : ' no-content')
38
+ className: prefixCls + "-slider-popover" + (content ? '' : ' no-content'),
39
+ ref: domRef
36
40
  }, /*#__PURE__*/_react.default.createElement("div", {
37
41
  className: prefixCls + "-slider-popover-content"
38
42
  }, content), /*#__PURE__*/_react.default.createElement("div", {
@@ -22,16 +22,15 @@ function useButtonClick(params) {
22
22
  updateValue = params.updateValue,
23
23
  onAddButtonClick = params.onAddButtonClick,
24
24
  onMinusButtonClick = params.onMinusButtonClick;
25
+ var minusDisable = actualInputValue <= min || disabled;
25
26
 
26
- var _useState = (0, _react.useState)(function () {
27
- return actualInputValue === min || disabled;
28
- }),
27
+ var _useState = (0, _react.useState)(minusDisable),
29
28
  minusButtonDisable = _useState[0],
30
29
  setMinusButtonDisable = _useState[1];
31
30
 
32
- var _useState2 = (0, _react.useState)(function () {
33
- return actualInputValue === max || disabled;
34
- }),
31
+ var addDisable = actualInputValue >= max || disabled;
32
+
33
+ var _useState2 = (0, _react.useState)(addDisable),
35
34
  addButtonDisable = _useState2[0],
36
35
  setAddButtonDisable = _useState2[1];
37
36
 
@@ -62,9 +61,9 @@ function useButtonClick(params) {
62
61
 
63
62
 
64
63
  (0, _react.useEffect)(function () {
65
- setMinusButtonDisable(actualInputValue <= min);
66
- setAddButtonDisable(actualInputValue >= max);
67
- }, [actualInputValue]);
64
+ setMinusButtonDisable(minusDisable);
65
+ setAddButtonDisable(addDisable);
66
+ }, [minusDisable, addDisable]);
68
67
  return {
69
68
  minusButtonDisable: minusButtonDisable,
70
69
  addButtonDisable: addButtonDisable,
package/cjs/style.d.ts CHANGED
@@ -1,35 +1,32 @@
1
1
  import '../style/public.less';
2
- import './button/style';
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 './show-monitor/style';
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/cjs/style.js CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  require("../style/public.less");
4
4
 
5
- require("./button/style");
5
+ require("./tabs/style");
6
+
7
+ require("./sticky/style");
8
+
9
+ require("./load-more/style");
10
+
11
+ require("./cell/style");
6
12
 
7
13
  require("./action-sheet/style");
8
14
 
@@ -10,9 +16,9 @@ require("./avatar/style");
10
16
 
11
17
  require("./badge/style");
12
18
 
13
- require("./carousel/style");
19
+ require("./button/style");
14
20
 
15
- require("./cell/style");
21
+ require("./carousel/style");
16
22
 
17
23
  require("./checkbox/style");
18
24
 
@@ -26,10 +32,10 @@ require("./count-down/style");
26
32
 
27
33
  require("./date-picker/style");
28
34
 
29
- require("./divider/style");
30
-
31
35
  require("./dialog/style");
32
36
 
37
+ require("./divider/style");
38
+
33
39
  require("./dropdown/style");
34
40
 
35
41
  require("./dropdown-menu/style");
@@ -38,31 +44,19 @@ require("./ellipsis/style");
38
44
 
39
45
  require("./form/style");
40
46
 
41
- require("./input/style");
42
-
43
- require("./textarea/style");
44
-
45
- require("./radio/style");
46
-
47
- require("./image-picker/style");
48
-
49
- require("./rate/style");
50
-
51
- require("./slider/style");
52
-
53
47
  require("./grid/style");
54
48
 
55
49
  require("./image/style");
56
50
 
57
- require("./show-monitor/style");
51
+ require("./image-picker/style");
58
52
 
59
53
  require("./image-preview/style");
60
54
 
61
55
  require("./index-bar/style");
62
56
 
63
- require("./keyboard/style");
57
+ require("./input/style");
64
58
 
65
- require("./load-more/style");
59
+ require("./keyboard/style");
66
60
 
67
61
  require("./loading/style");
68
62
 
@@ -92,14 +86,20 @@ require("./progress/style");
92
86
 
93
87
  require("./pull-refresh/style");
94
88
 
89
+ require("./radio/style");
90
+
91
+ require("./rate/style");
92
+
95
93
  require("./search-bar/style");
96
94
 
95
+ require("./show-monitor/style");
96
+
97
+ require("./slider/style");
98
+
97
99
  require("./stepper/style");
98
100
 
99
101
  require("./steps/style");
100
102
 
101
- require("./sticky/style");
102
-
103
103
  require("./swipe-action/style");
104
104
 
105
105
  require("./swipe-load/style");
@@ -108,10 +108,10 @@ require("./switch/style");
108
108
 
109
109
  require("./tab-bar/style");
110
110
 
111
- require("./tabs/style");
112
-
113
111
  require("./tag/style");
114
112
 
113
+ require("./textarea/style");
114
+
115
115
  require("./toast/style");
116
116
 
117
117
  require("./transition/style");
@@ -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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "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" | "className" | "duration" | "loadingIcon" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
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
  };
@@ -71,6 +71,7 @@ var Toast = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
71
71
  initialBodyOverflow = props.initialBodyOverflow;
72
72
  var closeTimerRef = (0, _react.useRef)();
73
73
  var domRef = (0, _react.useRef)(null);
74
+ var wrapDomRef = (0, _react.useRef)(null);
74
75
  var isInitialMount = (0, _react.useRef)(false);
75
76
  var hasType = type && type !== 'info';
76
77
  (0, _react.useImperativeHandle)(ref, function () {
@@ -139,7 +140,8 @@ var Toast = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
139
140
  className: (0, _mobileUtils.cls)(prefixClass + "-wrapper", "from-" + direction, {
140
141
  'no-event': !disableBodyTouch
141
142
  }),
142
- onClick: handleClickMask
143
+ onClick: handleClickMask,
144
+ ref: wrapDomRef
143
145
  }, /*#__PURE__*/_react.default.createElement("div", {
144
146
  className: (0, _mobileUtils.cls)(prefixClass + "-inner", layout, (_cls = {}, _cls[prefixClass + "-inner-mixin"] = (loading || hasType || icon) && layout === 'vertical', _cls))
145
147
  }, loading && /*#__PURE__*/_react.default.createElement("div", {
@@ -166,7 +168,8 @@ var Toast = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
166
168
  }, /*#__PURE__*/_react.default.createElement(_transition.default, {
167
169
  in: visible,
168
170
  timeout: transitionDuration,
169
- type: "fade"
171
+ type: "fade",
172
+ nodeRef: wrapDomRef
170
173
  }, renderComponent(prefixCls + "-toast"))));
171
174
  });
172
175
  });