@arco-design/mobile-react 2.29.4 → 2.29.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/action-sheet/index.d.ts +2 -2
- package/cjs/dialog/index.d.ts +2 -2
- package/cjs/image-picker/index.js +14 -6
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/image-preview/index.js +5 -3
- package/cjs/index.d.ts +5 -5
- package/cjs/index.js +16 -16
- package/cjs/load-more/index.d.ts +7 -2
- package/cjs/load-more/index.js +9 -1
- package/cjs/masking/index.d.ts +2 -2
- package/cjs/popup/index.d.ts +2 -2
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/pull-refresh/android-pull-refresh.js +12 -20
- package/cjs/pull-refresh/hooks.js +2 -2
- package/cjs/pull-refresh/style/css/index.css +0 -1
- package/cjs/pull-refresh/style/index.less +0 -1
- package/cjs/style.d.ts +5 -5
- package/cjs/style.js +8 -8
- package/cjs/tabs/tab-pane.js +5 -2
- package/cjs/toast/index.d.ts +12 -12
- package/dist/index.js +2421 -2409
- package/dist/index.min.js +4 -4
- package/dist/style.css +503 -504
- package/dist/style.min.css +1 -1
- package/esm/action-sheet/index.d.ts +2 -2
- package/esm/dialog/index.d.ts +2 -2
- package/esm/image-picker/index.js +13 -6
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/image-preview/index.js +5 -3
- package/esm/index.d.ts +5 -5
- package/esm/index.js +5 -5
- package/esm/load-more/index.d.ts +7 -2
- package/esm/load-more/index.js +9 -1
- package/esm/masking/index.d.ts +2 -2
- package/esm/popup/index.d.ts +2 -2
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/pull-refresh/android-pull-refresh.js +13 -22
- package/esm/pull-refresh/hooks.js +2 -2
- package/esm/pull-refresh/style/css/index.css +0 -1
- package/esm/pull-refresh/style/index.less +0 -1
- package/esm/style.d.ts +5 -5
- package/esm/style.js +5 -5
- package/esm/tabs/tab-pane.js +6 -3
- package/esm/toast/index.d.ts +12 -12
- package/package.json +3 -3
- package/umd/action-sheet/index.d.ts +2 -2
- package/umd/dialog/index.d.ts +2 -2
- package/umd/image-picker/index.js +16 -10
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/image-preview/index.js +5 -3
- package/umd/index.d.ts +5 -5
- package/umd/index.js +14 -14
- package/umd/load-more/index.d.ts +7 -2
- package/umd/load-more/index.js +9 -1
- package/umd/masking/index.d.ts +2 -2
- package/umd/popup/index.d.ts +2 -2
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/pull-refresh/android-pull-refresh.js +15 -24
- package/umd/pull-refresh/hooks.js +2 -2
- package/umd/pull-refresh/style/css/index.css +0 -1
- package/umd/pull-refresh/style/index.less +0 -1
- package/umd/style.d.ts +5 -5
- package/umd/style.js +2 -2
- package/umd/tabs/tab-pane.js +5 -2
- package/umd/toast/index.d.ts +12 -12
@@ -7,6 +7,7 @@ import { IconClose } from '../icon';
|
|
7
7
|
import Image from '../image';
|
8
8
|
import Grid from '../grid';
|
9
9
|
import AddIcon from './add-icon';
|
10
|
+
import { useLatestRef } from '../_helpers';
|
10
11
|
export * from './type';
|
11
12
|
var ImagePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
12
13
|
var _props$className = props.className,
|
@@ -52,7 +53,7 @@ var ImagePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
52
53
|
onDeleteClick = props.onDeleteClick;
|
53
54
|
var domRef = useRef(null);
|
54
55
|
var fileRef = useRef(null);
|
55
|
-
var cacheRef =
|
56
|
+
var cacheRef = useLatestRef(images);
|
56
57
|
useImperativeHandle(ref, function () {
|
57
58
|
return {
|
58
59
|
dom: domRef.current
|
@@ -119,7 +120,7 @@ var ImagePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
119
120
|
file: files[index]
|
120
121
|
};
|
121
122
|
});
|
122
|
-
cacheRef.current = [].concat(
|
123
|
+
cacheRef.current = [].concat(cacheRef.current, res);
|
123
124
|
onChange([].concat(cacheRef.current)); // 执行upload
|
124
125
|
|
125
126
|
if (typeof upload === 'function') {
|
@@ -132,15 +133,21 @@ var ImagePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
132
133
|
var file = _ref2.file;
|
133
134
|
return file === _file;
|
134
135
|
});
|
135
|
-
|
136
|
-
|
137
|
-
|
136
|
+
|
137
|
+
if (index !== -1) {
|
138
|
+
cacheRef.current[index] = _extends({}, cacheRef.current[index], data, {
|
139
|
+
status: undefined
|
140
|
+
});
|
141
|
+
}
|
138
142
|
}).catch(function () {
|
139
143
|
var index = cacheRef.current.findIndex(function (_ref3) {
|
140
144
|
var file = _ref3.file;
|
141
145
|
return file === _file;
|
142
146
|
});
|
143
|
-
|
147
|
+
|
148
|
+
if (index !== -1) {
|
149
|
+
cacheRef.current[index].status = 'error';
|
150
|
+
}
|
144
151
|
}).finally(function () {
|
145
152
|
onChange([].concat(cacheRef.current));
|
146
153
|
});
|
@@ -274,9 +274,9 @@ declare const _default: React.ForwardRefExoticComponent<ImagePreviewProps & Reac
|
|
274
274
|
* @param {ImagePreviewProps} config configuration
|
275
275
|
* @returns {{ close: () => void; update: (newConfig: ImagePreviewProps) => void; }}
|
276
276
|
*/
|
277
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "
|
277
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
278
278
|
close: () => void;
|
279
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "
|
279
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">) => void;
|
280
280
|
};
|
281
281
|
};
|
282
282
|
/**
|
@@ -624,9 +624,11 @@ var ImagePreview = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
624
624
|
|
625
625
|
|
626
626
|
function setImagesStatusByIndex(index, data) {
|
627
|
-
|
628
|
-
|
629
|
-
|
627
|
+
setImagesStatus(function (current) {
|
628
|
+
var newStatus = current.slice();
|
629
|
+
newStatus[index] = _extends({}, newStatus[index] || {}, data);
|
630
|
+
return newStatus;
|
631
|
+
});
|
630
632
|
}
|
631
633
|
/**
|
632
634
|
* 缩略图放大过渡动画设置
|
package/esm/index.d.ts
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
export { default as Tabs } from './tabs';
|
2
2
|
export { default as Sticky } from './sticky';
|
3
|
-
export { default as
|
4
|
-
export { default as
|
3
|
+
export { default as Portal } from './portal';
|
4
|
+
export { default as Toast } from './toast';
|
5
5
|
export { default as ActionSheet } from './action-sheet';
|
6
6
|
export { default as Avatar } from './avatar';
|
7
7
|
export { default as Badge } from './badge';
|
8
8
|
export { default as Button } from './button';
|
9
9
|
export { default as Carousel } from './carousel';
|
10
|
+
export { default as Cell } from './cell';
|
10
11
|
export { default as Checkbox } from './checkbox';
|
11
12
|
export { default as CircleProgress } from './circle-progress';
|
12
13
|
export { default as Collapse } from './collapse';
|
@@ -26,6 +27,7 @@ export { default as ImagePreview } from './image-preview';
|
|
26
27
|
export { default as IndexBar } from './index-bar';
|
27
28
|
export { default as Input } from './input';
|
28
29
|
export { default as Keyboard } from './keyboard';
|
30
|
+
export { default as LoadMore } from './load-more';
|
29
31
|
export { default as Loading } from './loading';
|
30
32
|
export { default as Masking } from './masking';
|
31
33
|
export { default as NavBar } from './nav-bar';
|
@@ -37,14 +39,13 @@ export { default as PickerView } from './picker-view';
|
|
37
39
|
export { default as Popover } from './popover';
|
38
40
|
export { default as Popup } from './popup';
|
39
41
|
export { default as PopupSwiper } from './popup-swiper';
|
40
|
-
export { default as Portal } from './portal';
|
41
42
|
export { default as Progress } from './progress';
|
42
43
|
export { default as PullRefresh } from './pull-refresh';
|
43
44
|
export { default as Radio } from './radio';
|
44
45
|
export { default as Rate } from './rate';
|
45
46
|
export { default as SearchBar } from './search-bar';
|
46
|
-
export { default as Skeleton } from './skeleton';
|
47
47
|
export { default as ShowMonitor } from './show-monitor';
|
48
|
+
export { default as Skeleton } from './skeleton';
|
48
49
|
export { default as Slider } from './slider';
|
49
50
|
export { default as Stepper } from './stepper';
|
50
51
|
export { default as Steps } from './steps';
|
@@ -54,5 +55,4 @@ export { default as Switch } from './switch';
|
|
54
55
|
export { default as TabBar } from './tab-bar';
|
55
56
|
export { default as Tag } from './tag';
|
56
57
|
export { default as Textarea } from './textarea';
|
57
|
-
export { default as Toast } from './toast';
|
58
58
|
export { default as Transition } from './transition';
|
package/esm/index.js
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
export { default as Tabs } from './tabs';
|
2
2
|
export { default as Sticky } from './sticky';
|
3
|
-
export { default as
|
4
|
-
export { default as
|
3
|
+
export { default as Portal } from './portal';
|
4
|
+
export { default as Toast } from './toast';
|
5
5
|
export { default as ActionSheet } from './action-sheet';
|
6
6
|
export { default as Avatar } from './avatar';
|
7
7
|
export { default as Badge } from './badge';
|
8
8
|
export { default as Button } from './button';
|
9
9
|
export { default as Carousel } from './carousel';
|
10
|
+
export { default as Cell } from './cell';
|
10
11
|
export { default as Checkbox } from './checkbox';
|
11
12
|
export { default as CircleProgress } from './circle-progress';
|
12
13
|
export { default as Collapse } from './collapse';
|
@@ -26,6 +27,7 @@ export { default as ImagePreview } from './image-preview';
|
|
26
27
|
export { default as IndexBar } from './index-bar';
|
27
28
|
export { default as Input } from './input';
|
28
29
|
export { default as Keyboard } from './keyboard';
|
30
|
+
export { default as LoadMore } from './load-more';
|
29
31
|
export { default as Loading } from './loading';
|
30
32
|
export { default as Masking } from './masking';
|
31
33
|
export { default as NavBar } from './nav-bar';
|
@@ -37,14 +39,13 @@ export { default as PickerView } from './picker-view';
|
|
37
39
|
export { default as Popover } from './popover';
|
38
40
|
export { default as Popup } from './popup';
|
39
41
|
export { default as PopupSwiper } from './popup-swiper';
|
40
|
-
export { default as Portal } from './portal';
|
41
42
|
export { default as Progress } from './progress';
|
42
43
|
export { default as PullRefresh } from './pull-refresh';
|
43
44
|
export { default as Radio } from './radio';
|
44
45
|
export { default as Rate } from './rate';
|
45
46
|
export { default as SearchBar } from './search-bar';
|
46
|
-
export { default as Skeleton } from './skeleton';
|
47
47
|
export { default as ShowMonitor } from './show-monitor';
|
48
|
+
export { default as Skeleton } from './skeleton';
|
48
49
|
export { default as Slider } from './slider';
|
49
50
|
export { default as Stepper } from './stepper';
|
50
51
|
export { default as Steps } from './steps';
|
@@ -54,5 +55,4 @@ export { default as Switch } from './switch';
|
|
54
55
|
export { default as TabBar } from './tab-bar';
|
55
56
|
export { default as Tag } from './tag';
|
56
57
|
export { default as Textarea } from './textarea';
|
57
|
-
export { default as Toast } from './toast';
|
58
58
|
export { default as Transition } from './transition';
|
package/esm/load-more/index.d.ts
CHANGED
@@ -108,8 +108,8 @@ export interface LoadMoreProps {
|
|
108
108
|
*/
|
109
109
|
getDataAtFirst?: boolean;
|
110
110
|
/**
|
111
|
-
* 当 getDataAtFirst
|
112
|
-
* @en Whether to trigger a request when getDataAtFirst
|
111
|
+
* 当 getDataAtFirst 值为 false 且数据不满一屏时是否触发一次请求,trigger=scroll时有效
|
112
|
+
* @en Whether to trigger a request when getDataAtFirst equals false and the data is not full of one screen, valid when trigger=scroll
|
113
113
|
* @default false
|
114
114
|
*/
|
115
115
|
getDataWhenNoScrollAtFirst?: boolean;
|
@@ -140,6 +140,11 @@ export interface LoadMoreRef {
|
|
140
140
|
* @en Change component state manually
|
141
141
|
*/
|
142
142
|
changeStatus: (status: LoadMoreStatus, scene?: string) => void;
|
143
|
+
/**
|
144
|
+
* 判断是否滚动到底部并手动触发数据获取
|
145
|
+
* @en Determine whether to scroll to the bottom and manually trigger data acquisition
|
146
|
+
*/
|
147
|
+
getDataWithEndReachCheck: () => void;
|
143
148
|
}
|
144
149
|
/**
|
145
150
|
* 上拉加载组件,支持`scroll`和`click`两种触发加载方式,支持滚动监听。支持受控与不受控两种形式。<br>如果引入组件后发现仅触发了初始的`getData`,请确认是否在`getData`方法内没有调用`callback`移除 loading 状态,且未设置`blockWhenLoading`属性为 false。
|
package/esm/load-more/index.js
CHANGED
@@ -132,10 +132,18 @@ var LoadMore = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
132
132
|
}
|
133
133
|
};
|
134
134
|
}, [trigger, disabled, getScrollContainer, handleContainerScroll, throttle]);
|
135
|
+
|
136
|
+
var getDataWithEndReachCheck = function getDataWithEndReachCheck() {
|
137
|
+
if (checkNeedTrigger(0, threshold)) {
|
138
|
+
triggerGetData('pageEnd');
|
139
|
+
}
|
140
|
+
};
|
141
|
+
|
135
142
|
useImperativeHandle(ref, function () {
|
136
143
|
return {
|
137
144
|
dom: domRef.current,
|
138
|
-
changeStatus: changeStatus
|
145
|
+
changeStatus: changeStatus,
|
146
|
+
getDataWithEndReachCheck: getDataWithEndReachCheck
|
139
147
|
};
|
140
148
|
}, [changeStatus]);
|
141
149
|
|
package/esm/masking/index.d.ts
CHANGED
@@ -205,11 +205,11 @@ declare const _default: React.ForwardRefExoticComponent<MaskingProps & React.Ref
|
|
205
205
|
* @param {MaskingProps} config Configuration
|
206
206
|
* @returns {{ close: () => void; update: (newConfig: MaskingProps) => void; }}
|
207
207
|
*/
|
208
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
208
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
|
209
209
|
key?: string | undefined;
|
210
210
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
211
211
|
close: () => void;
|
212
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
212
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
|
213
213
|
key?: string | undefined;
|
214
214
|
}) => void;
|
215
215
|
};
|
package/esm/popup/index.d.ts
CHANGED
@@ -66,11 +66,11 @@ declare const _default: React.ForwardRefExoticComponent<PopupProps & React.RefAt
|
|
66
66
|
* @param {PopupProps} config Configuration
|
67
67
|
* @returns {{ close: () => void; update: (newConfig: PopupProps) => void; }}
|
68
68
|
*/
|
69
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
69
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
|
70
70
|
key?: string | undefined;
|
71
71
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
72
72
|
close: () => void;
|
73
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
73
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
|
74
74
|
key?: string | undefined;
|
75
75
|
}) => void;
|
76
76
|
};
|
@@ -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" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
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" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "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" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "
|
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" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
|
84
84
|
key?: string | undefined;
|
85
85
|
}) => void; /**
|
86
86
|
* 内容面板 touchstart 事件,返回true时表示阻止本组件内部处理事件
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import React, { useRef, forwardRef, useCallback, useMemo, useContext, useEffect, useImperativeHandle } from 'react';
|
2
3
|
import { cls, nextTick, defaultLocale } from '@arco-design/mobile-utils';
|
3
4
|
import Loading from '../loading';
|
4
5
|
import { GlobalContext } from '../context-provider';
|
5
6
|
import { PullRefreshStatus } from './model';
|
6
7
|
import { useCommonState, useAddScrollEvents, useCheckAsStart } from './hooks';
|
7
|
-
import {
|
8
|
+
import { setStyleWithVendor } from '../_helpers';
|
8
9
|
|
9
10
|
var dampRateCalculate = function dampRateCalculate(val, tipsHeight, dampRate) {
|
10
11
|
return val > tipsHeight ? tipsHeight + (val - tipsHeight) / dampRate : val;
|
@@ -53,11 +54,7 @@ export var PullRefresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
53
54
|
onRefresh = props.onRefresh,
|
54
55
|
_props$allowPullWhenN = props.allowPullWhenNotTop,
|
55
56
|
allowPullWhenNotTop = _props$allowPullWhenN === void 0 ? false : _props$allowPullWhenN;
|
56
|
-
|
57
|
-
var _useState = useState({}),
|
58
|
-
transition = _useState[0],
|
59
|
-
setTransition = _useState[1];
|
60
|
-
|
57
|
+
var placeRef = useRef(null);
|
61
58
|
var touchRef = useRef(null);
|
62
59
|
var currentTranslateYRef = useRef(0);
|
63
60
|
var onTouching = useRef(false);
|
@@ -94,17 +91,7 @@ export var PullRefresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
94
91
|
|
95
92
|
var scroll = function scroll(y, ms, callback) {
|
96
93
|
if (y < 5) {
|
97
|
-
if (y < 0) {
|
98
|
-
currentTranslateYRef.current = 0;
|
99
|
-
return;
|
100
|
-
}
|
101
|
-
|
102
|
-
if (ms === 0) {
|
103
|
-
setTimeout(function () {
|
104
|
-
setTransition({
|
105
|
-
transition: 'all 0s'
|
106
|
-
});
|
107
|
-
});
|
94
|
+
if (y < 0 || ms === 0) {
|
108
95
|
currentTranslateYRef.current = 0;
|
109
96
|
return;
|
110
97
|
}
|
@@ -112,10 +99,11 @@ export var PullRefresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
112
99
|
|
113
100
|
var translateY = dampRateCalculate(y, loosingHeight, dampRate);
|
114
101
|
currentTranslateYRef.current = translateY;
|
115
|
-
|
116
|
-
transform: translateY ? "translateY(" + translateY + "px)" : ''
|
102
|
+
placeRef.current && setStyleWithVendor(placeRef.current, _extends({
|
103
|
+
transform: translateY ? "translateY(" + translateY + "px) translateZ(0)" : ''
|
104
|
+
}, ms ? {
|
117
105
|
transition: "all " + ms / 1000 + "s"
|
118
|
-
});
|
106
|
+
} : {}));
|
119
107
|
setTimeout(function () {
|
120
108
|
callback == null ? void 0 : callback();
|
121
109
|
}, ms);
|
@@ -133,6 +121,9 @@ export var PullRefresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
133
121
|
|
134
122
|
loadingRef.current = false;
|
135
123
|
setStatus(PullRefreshStatus.Static);
|
124
|
+
placeRef.current && setStyleWithVendor(placeRef.current, {
|
125
|
+
transition: ''
|
126
|
+
});
|
136
127
|
callback();
|
137
128
|
});
|
138
129
|
};
|
@@ -260,7 +251,7 @@ export var PullRefresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
260
251
|
ref: domRef
|
261
252
|
}, /*#__PURE__*/React.createElement("div", {
|
262
253
|
className: cls(prefixCls + "-pull-refresh-place"),
|
263
|
-
|
254
|
+
ref: placeRef
|
264
255
|
}, /*#__PURE__*/React.createElement("div", {
|
265
256
|
className: cls(prefixCls + "-pull-refresh-label"),
|
266
257
|
ref: labelRef,
|
@@ -96,9 +96,9 @@ export var useCheckAsStart = function useCheckAsStart(_ref3) {
|
|
96
96
|
var allowPullWhenNotTop = _ref3.allowPullWhenNotTop,
|
97
97
|
domRef = _ref3.domRef;
|
98
98
|
var ifShouldHandle = useCallback(function () {
|
99
|
-
var _domRef$current$
|
99
|
+
var _domRef$current$offse, _domRef$current9;
|
100
100
|
|
101
|
-
var domRefHeight = (_domRef$current$
|
101
|
+
var domRefHeight = (_domRef$current$offse = (_domRef$current9 = domRef.current) == null ? void 0 : _domRef$current9.offsetHeight) != null ? _domRef$current$offse : 0;
|
102
102
|
return domRef.current && !(!allowPullWhenNotTop && (domRef.current.scrollTop < 0 || domRef.current.scrollTop > domRef.current.scrollHeight - domRefHeight));
|
103
103
|
}, [allowPullWhenNotTop]);
|
104
104
|
return {
|
package/esm/style.d.ts
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import '../style/public.less';
|
2
2
|
import './tabs/style';
|
3
3
|
import './sticky/style';
|
4
|
-
import './
|
5
|
-
import './
|
4
|
+
import './portal/style';
|
5
|
+
import './toast/style';
|
6
6
|
import './action-sheet/style';
|
7
7
|
import './avatar/style';
|
8
8
|
import './badge/style';
|
9
9
|
import './button/style';
|
10
10
|
import './carousel/style';
|
11
|
+
import './cell/style';
|
11
12
|
import './checkbox/style';
|
12
13
|
import './circle-progress/style';
|
13
14
|
import './collapse/style';
|
@@ -27,6 +28,7 @@ import './image-preview/style';
|
|
27
28
|
import './index-bar/style';
|
28
29
|
import './input/style';
|
29
30
|
import './keyboard/style';
|
31
|
+
import './load-more/style';
|
30
32
|
import './loading/style';
|
31
33
|
import './masking/style';
|
32
34
|
import './nav-bar/style';
|
@@ -38,14 +40,13 @@ import './picker-view/style';
|
|
38
40
|
import './popover/style';
|
39
41
|
import './popup/style';
|
40
42
|
import './popup-swiper/style';
|
41
|
-
import './portal/style';
|
42
43
|
import './progress/style';
|
43
44
|
import './pull-refresh/style';
|
44
45
|
import './radio/style';
|
45
46
|
import './rate/style';
|
46
47
|
import './search-bar/style';
|
47
|
-
import './skeleton/style';
|
48
48
|
import './show-monitor/style';
|
49
|
+
import './skeleton/style';
|
49
50
|
import './slider/style';
|
50
51
|
import './stepper/style';
|
51
52
|
import './steps/style';
|
@@ -55,5 +56,4 @@ import './switch/style';
|
|
55
56
|
import './tab-bar/style';
|
56
57
|
import './tag/style';
|
57
58
|
import './textarea/style';
|
58
|
-
import './toast/style';
|
59
59
|
import './transition/style';
|
package/esm/style.js
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import '../style/public.less';
|
2
2
|
import './tabs/style';
|
3
3
|
import './sticky/style';
|
4
|
-
import './
|
5
|
-
import './
|
4
|
+
import './portal/style';
|
5
|
+
import './toast/style';
|
6
6
|
import './action-sheet/style';
|
7
7
|
import './avatar/style';
|
8
8
|
import './badge/style';
|
9
9
|
import './button/style';
|
10
10
|
import './carousel/style';
|
11
|
+
import './cell/style';
|
11
12
|
import './checkbox/style';
|
12
13
|
import './circle-progress/style';
|
13
14
|
import './collapse/style';
|
@@ -27,6 +28,7 @@ import './image-preview/style';
|
|
27
28
|
import './index-bar/style';
|
28
29
|
import './input/style';
|
29
30
|
import './keyboard/style';
|
31
|
+
import './load-more/style';
|
30
32
|
import './loading/style';
|
31
33
|
import './masking/style';
|
32
34
|
import './nav-bar/style';
|
@@ -38,14 +40,13 @@ import './picker-view/style';
|
|
38
40
|
import './popover/style';
|
39
41
|
import './popup/style';
|
40
42
|
import './popup-swiper/style';
|
41
|
-
import './portal/style';
|
42
43
|
import './progress/style';
|
43
44
|
import './pull-refresh/style';
|
44
45
|
import './radio/style';
|
45
46
|
import './rate/style';
|
46
47
|
import './search-bar/style';
|
47
|
-
import './skeleton/style';
|
48
48
|
import './show-monitor/style';
|
49
|
+
import './skeleton/style';
|
49
50
|
import './slider/style';
|
50
51
|
import './stepper/style';
|
51
52
|
import './steps/style';
|
@@ -55,5 +56,4 @@ import './switch/style';
|
|
55
56
|
import './tab-bar/style';
|
56
57
|
import './tag/style';
|
57
58
|
import './textarea/style';
|
58
|
-
import './toast/style';
|
59
59
|
import './transition/style';
|
package/esm/tabs/tab-pane.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import React, { useRef, forwardRef, useImperativeHandle, useState, useEffect, useMemo } from 'react';
|
3
3
|
import lodashThrottle from 'lodash.throttle';
|
4
|
-
import { cls, scrollWithAnimation, getScrollContainerRect } from '@arco-design/mobile-utils';
|
4
|
+
import { cls, scrollWithAnimation, getScrollContainerRect, isSSR } from '@arco-design/mobile-utils';
|
5
5
|
import { getStyleWithVendor } from '../_helpers';
|
6
6
|
var TabPane = /*#__PURE__*/forwardRef(function (props, ref) {
|
7
7
|
var _cls;
|
@@ -234,12 +234,15 @@ var TabPane = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
234
234
|
}
|
235
235
|
|
236
236
|
var translateStr = translateZ ? ' translateZ(0)' : '';
|
237
|
+
var translatePercentInSSR = (panes.length ? 100 / panes.length : 0) * activeIndex * rtlRatio * -1 + "%";
|
238
|
+
var verticalTranslate = distance - wrapWidth * activeIndex * rtlRatio + "px";
|
239
|
+
var horizontalTranslate = distance - wrapHeight * activeIndex + "px";
|
237
240
|
var sizeStyle = tabDirection === 'vertical' ? {
|
238
241
|
width: 100 * panes.length + "%",
|
239
|
-
transform: "translateX(" + (
|
242
|
+
transform: "translateX(" + (isSSR() ? translatePercentInSSR : verticalTranslate) + ")" + translateStr
|
240
243
|
} : {
|
241
244
|
height: 100 * panes.length + "%",
|
242
|
-
transform: "translateY(" + (
|
245
|
+
transform: "translateY(" + (isSSR() ? translatePercentInSSR : horizontalTranslate) + ")" + translateStr
|
243
246
|
};
|
244
247
|
var heightStyle = currentPaneHeight && currentPaneHeight !== 'auto' ? {
|
245
248
|
height: currentPaneHeight
|
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" | "duration" | "className" | "getContainer" | "onClose" | "
|
189
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
188
|
+
toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
189
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
190
190
|
close: () => void;
|
191
191
|
hide: () => void;
|
192
192
|
};
|
@@ -196,8 +196,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
196
196
|
* @param {string | ToastProps} config Configuration
|
197
197
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
198
198
|
*/
|
199
|
-
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
200
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
199
|
+
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
200
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
201
201
|
close: () => void;
|
202
202
|
hide: () => void;
|
203
203
|
};
|
@@ -207,8 +207,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
207
207
|
* @param {string | ToastProps} config Configuration
|
208
208
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
209
209
|
*/
|
210
|
-
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
211
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
210
|
+
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
211
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
212
212
|
close: () => void;
|
213
213
|
hide: () => void;
|
214
214
|
};
|
@@ -218,8 +218,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
218
218
|
* @param {string | ToastProps} config Configuration
|
219
219
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
220
220
|
*/
|
221
|
-
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
222
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
221
|
+
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
222
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
223
223
|
close: () => void;
|
224
224
|
hide: () => void;
|
225
225
|
};
|
@@ -229,8 +229,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
229
229
|
* @param {string | ToastProps} config Configuration
|
230
230
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
231
231
|
*/
|
232
|
-
loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
233
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
232
|
+
loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
233
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
234
234
|
close: () => void;
|
235
235
|
hide: () => void;
|
236
236
|
};
|
@@ -240,8 +240,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
240
240
|
* @param {string | ToastProps} config Configuration
|
241
241
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
242
242
|
*/
|
243
|
-
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
244
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "
|
243
|
+
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
244
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
|
245
245
|
close: () => void;
|
246
246
|
hide: () => void;
|
247
247
|
};
|