@arco-design/mobile-react 2.36.1 → 2.37.0
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 +23 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/hooks.d.ts +1 -1
- package/cjs/_helpers/hooks.js +1 -1
- package/cjs/_helpers/react-dom.d.ts +5 -5
- package/cjs/_helpers/react-dom.js +49 -32
- package/cjs/_helpers/render.js +6 -3
- package/cjs/action-sheet/index.d.ts +3 -2
- package/cjs/action-sheet/index.js +2 -2
- package/cjs/carousel/index.js +8 -7
- package/cjs/checkbox/checkbox.d.ts +1 -1
- package/cjs/checkbox/group.d.ts +1 -1
- package/cjs/checkbox/hooks/useMergeProps.d.ts +1 -1
- package/cjs/checkbox/index.d.ts +2 -2
- package/cjs/context-provider/index.d.ts +8 -2
- package/cjs/count-down/hooks.js +2 -2
- package/cjs/dialog/index.d.ts +8 -3
- package/cjs/dialog/methods.d.ts +6 -2
- package/cjs/dropdown-menu/helper.d.ts +2 -2
- package/cjs/ellipsis/components/native-ellipsis.d.ts +2 -3
- package/cjs/ellipsis/components/native-ellipsis.js +1 -2
- package/cjs/form/form-item.d.ts +33 -2
- package/cjs/form/form-item.js +142 -121
- package/cjs/form/index.js +3 -1
- package/cjs/form/linked-container.d.ts +1 -1
- package/cjs/form/linked-container.js +4 -0
- package/cjs/form/style/css/index.css +4 -1
- package/cjs/form/style/index.less +6 -1
- package/cjs/form/type.d.ts +29 -6
- package/cjs/form/type.js +10 -2
- package/cjs/form/useForm.d.ts +2 -17
- package/cjs/form/useForm.js +98 -17
- package/cjs/form/utils.d.ts +2 -0
- package/cjs/form/utils.js +42 -2
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/index-bar/group.js +3 -1
- package/cjs/index-bar/index.d.ts +2 -2
- package/cjs/index-bar/utils.d.ts +1 -1
- package/cjs/input/index.js +1 -1
- package/cjs/masking/index.d.ts +2 -2
- package/cjs/notify/index.d.ts +8 -8
- package/cjs/notify/index.js +2 -2
- package/cjs/picker-view/components/cascader.js +3 -1
- package/cjs/picker-view/components/picker-cell.js +1 -1
- package/cjs/picker-view/index.js +3 -1
- package/cjs/popup/index.d.ts +2 -2
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/pull-refresh/hooks.d.ts +2 -2
- package/cjs/radio/group.d.ts +1 -1
- package/cjs/radio/group.js +1 -1
- package/cjs/radio/index.d.ts +2 -2
- package/cjs/radio/radio.d.ts +1 -1
- package/cjs/radio/type.d.ts +2 -2
- package/cjs/skeleton/elements.js +9 -3
- package/cjs/slider/hooks/index.d.ts +1 -1
- package/cjs/slider/hooks/useSliderEvents.d.ts +1 -1
- package/cjs/stepper/hooks/useValue.d.ts +2 -1
- package/cjs/steps/index.d.ts +1 -1
- package/cjs/tabs/type.d.ts +2 -2
- package/cjs/toast/index.d.ts +12 -12
- package/cjs/toast/index.js +1 -1
- package/dist/index.js +3070 -411
- package/dist/index.min.js +4 -4
- package/dist/style.css +4 -1
- package/dist/style.min.css +1 -1
- package/esm/_helpers/hooks.d.ts +1 -1
- package/esm/_helpers/hooks.js +1 -1
- package/esm/_helpers/react-dom.d.ts +5 -5
- package/esm/_helpers/react-dom.js +49 -30
- package/esm/_helpers/render.js +6 -3
- package/esm/action-sheet/index.d.ts +3 -2
- package/esm/action-sheet/index.js +2 -2
- package/esm/carousel/index.js +8 -7
- package/esm/checkbox/checkbox.d.ts +1 -1
- package/esm/checkbox/group.d.ts +1 -1
- package/esm/checkbox/hooks/useMergeProps.d.ts +1 -1
- package/esm/checkbox/index.d.ts +2 -2
- package/esm/context-provider/index.d.ts +8 -2
- package/esm/count-down/hooks.js +2 -2
- package/esm/dialog/index.d.ts +8 -3
- package/esm/dialog/methods.d.ts +6 -2
- package/esm/dropdown-menu/helper.d.ts +2 -2
- package/esm/ellipsis/components/native-ellipsis.d.ts +2 -3
- package/esm/ellipsis/components/native-ellipsis.js +1 -1
- package/esm/form/form-item.d.ts +33 -2
- package/esm/form/form-item.js +143 -122
- package/esm/form/index.js +3 -1
- package/esm/form/linked-container.d.ts +1 -1
- package/esm/form/linked-container.js +4 -0
- package/esm/form/style/css/index.css +4 -1
- package/esm/form/style/index.less +6 -1
- package/esm/form/type.d.ts +29 -6
- package/esm/form/type.js +8 -1
- package/esm/form/useForm.d.ts +2 -17
- package/esm/form/useForm.js +97 -17
- package/esm/form/utils.d.ts +2 -0
- package/esm/form/utils.js +31 -1
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/index-bar/group.js +3 -1
- package/esm/index-bar/index.d.ts +2 -2
- package/esm/index-bar/utils.d.ts +1 -1
- package/esm/input/index.js +1 -1
- package/esm/masking/index.d.ts +2 -2
- package/esm/notify/index.d.ts +8 -8
- package/esm/notify/index.js +2 -2
- package/esm/picker-view/components/cascader.js +3 -1
- package/esm/picker-view/components/picker-cell.js +1 -1
- package/esm/picker-view/index.js +3 -1
- package/esm/popup/index.d.ts +2 -2
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/pull-refresh/hooks.d.ts +2 -2
- package/esm/radio/group.d.ts +1 -1
- package/esm/radio/group.js +1 -1
- package/esm/radio/index.d.ts +2 -2
- package/esm/radio/radio.d.ts +1 -1
- package/esm/radio/type.d.ts +2 -2
- package/esm/skeleton/elements.js +9 -3
- package/esm/slider/hooks/index.d.ts +1 -1
- package/esm/slider/hooks/useSliderEvents.d.ts +1 -1
- package/esm/stepper/hooks/useValue.d.ts +2 -1
- package/esm/steps/index.d.ts +1 -1
- package/esm/tabs/type.d.ts +2 -2
- package/esm/toast/index.d.ts +12 -12
- package/esm/toast/index.js +1 -1
- package/esnext/_helpers/hooks.js +1 -1
- package/esnext/_helpers/react-dom.d.ts +5 -5
- package/esnext/_helpers/react-dom.js +47 -28
- package/esnext/_helpers/render.js +3 -2
- package/esnext/action-sheet/index.d.ts +3 -2
- package/esnext/action-sheet/index.js +1 -1
- package/esnext/carousel/index.js +7 -5
- package/esnext/context-provider/index.d.ts +8 -2
- package/esnext/context-provider/index.js +1 -1
- package/esnext/count-down/hooks.js +2 -2
- package/esnext/dialog/index.d.ts +8 -3
- package/esnext/dialog/methods.d.ts +6 -2
- package/esnext/dropdown-menu/helper.d.ts +1 -1
- package/esnext/ellipsis/components/native-ellipsis.d.ts +2 -3
- package/esnext/ellipsis/components/native-ellipsis.js +1 -1
- package/esnext/form/form-item.d.ts +33 -2
- package/esnext/form/form-item.js +85 -71
- package/esnext/form/index.js +2 -1
- package/esnext/form/linked-container.d.ts +1 -1
- package/esnext/form/linked-container.js +3 -0
- package/esnext/form/style/css/index.css +4 -1
- package/esnext/form/style/index.less +6 -1
- package/esnext/form/type.d.ts +29 -6
- package/esnext/form/type.js +7 -0
- package/esnext/form/useForm.d.ts +2 -17
- package/esnext/form/useForm.js +72 -13
- package/esnext/form/utils.d.ts +2 -0
- package/esnext/form/utils.js +26 -0
- package/esnext/image-preview/index.d.ts +2 -2
- package/esnext/index-bar/group.js +5 -1
- package/esnext/index-bar/index.d.ts +2 -2
- package/esnext/input/index.js +1 -1
- package/esnext/masking/index.d.ts +2 -2
- package/esnext/notify/index.d.ts +8 -8
- package/esnext/notify/index.js +2 -2
- package/esnext/picker-view/components/cascader.js +5 -1
- package/esnext/picker-view/components/picker-cell.js +1 -1
- package/esnext/picker-view/index.js +5 -1
- package/esnext/popup/index.d.ts +2 -2
- package/esnext/popup-swiper/index.d.ts +2 -2
- package/esnext/pull-refresh/hooks.d.ts +2 -2
- package/esnext/radio/group.js +3 -1
- package/esnext/radio/type.d.ts +2 -2
- package/esnext/skeleton/elements.js +15 -3
- package/esnext/slider/hooks/useSliderEvents.d.ts +1 -1
- package/esnext/tabs/type.d.ts +2 -2
- package/esnext/toast/index.d.ts +12 -12
- package/esnext/toast/index.js +1 -1
- package/package.json +3 -3
- package/umd/_helpers/hooks.d.ts +1 -1
- package/umd/_helpers/hooks.js +1 -1
- package/umd/_helpers/react-dom.d.ts +5 -5
- package/umd/_helpers/react-dom.js +53 -35
- package/umd/_helpers/render.js +6 -3
- package/umd/action-sheet/index.d.ts +3 -2
- package/umd/action-sheet/index.js +2 -2
- package/umd/carousel/index.js +8 -7
- package/umd/checkbox/checkbox.d.ts +1 -1
- package/umd/checkbox/group.d.ts +1 -1
- package/umd/checkbox/hooks/useMergeProps.d.ts +1 -1
- package/umd/checkbox/index.d.ts +2 -2
- package/umd/context-provider/index.d.ts +8 -2
- package/umd/count-down/hooks.js +2 -2
- package/umd/dialog/index.d.ts +8 -3
- package/umd/dialog/methods.d.ts +6 -2
- package/umd/dropdown-menu/helper.d.ts +2 -2
- package/umd/ellipsis/components/native-ellipsis.d.ts +2 -3
- package/umd/ellipsis/components/native-ellipsis.js +1 -2
- package/umd/form/form-item.d.ts +33 -2
- package/umd/form/form-item.js +142 -121
- package/umd/form/index.js +3 -1
- package/umd/form/linked-container.d.ts +1 -1
- package/umd/form/linked-container.js +4 -0
- package/umd/form/style/css/index.css +4 -1
- package/umd/form/style/index.less +6 -1
- package/umd/form/type.d.ts +29 -6
- package/umd/form/type.js +9 -1
- package/umd/form/useForm.d.ts +2 -17
- package/umd/form/useForm.js +98 -21
- package/umd/form/utils.d.ts +2 -0
- package/umd/form/utils.js +40 -5
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/index-bar/group.js +3 -1
- package/umd/index-bar/index.d.ts +2 -2
- package/umd/index-bar/utils.d.ts +1 -1
- package/umd/input/index.js +1 -1
- package/umd/masking/index.d.ts +2 -2
- package/umd/notify/index.d.ts +8 -8
- package/umd/notify/index.js +2 -2
- package/umd/picker-view/components/cascader.js +3 -1
- package/umd/picker-view/components/picker-cell.js +1 -1
- package/umd/picker-view/index.js +3 -1
- package/umd/popup/index.d.ts +2 -2
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/pull-refresh/hooks.d.ts +2 -2
- package/umd/radio/group.d.ts +1 -1
- package/umd/radio/group.js +1 -1
- package/umd/radio/index.d.ts +2 -2
- package/umd/radio/radio.d.ts +1 -1
- package/umd/radio/type.d.ts +2 -2
- package/umd/skeleton/elements.js +9 -3
- package/umd/slider/hooks/index.d.ts +1 -1
- package/umd/slider/hooks/useSliderEvents.d.ts +1 -1
- package/umd/stepper/hooks/useValue.d.ts +2 -1
- package/umd/steps/index.d.ts +1 -1
- package/umd/tabs/type.d.ts +2 -2
- package/umd/toast/index.d.ts +12 -12
- package/umd/toast/index.js +1 -1
@@ -280,9 +280,9 @@ declare const _default: React.ForwardRefExoticComponent<ImagePreviewProps & Reac
|
|
280
280
|
* @param {ImagePreviewProps} config configuration
|
281
281
|
* @returns {{ close: () => void; update: (newConfig: ImagePreviewProps) => void; }}
|
282
282
|
*/
|
283
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "
|
283
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "className" | "context" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "offsetBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "renderExtra" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
284
284
|
close: () => void;
|
285
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "
|
285
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "className" | "context" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "onClose" | "fit" | "loadingArea" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "offsetBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "renderExtra" | "extra" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">) => void;
|
286
286
|
};
|
287
287
|
};
|
288
288
|
/**
|
@@ -25,7 +25,11 @@ export const IndexBarGroup = forwardRef((props, ref) => {
|
|
25
25
|
[`${prefixCls}-index-bar-group-active`]: activeIndex === groupIndex,
|
26
26
|
}) }, groupIndex));
|
27
27
|
const groupDom = domRef.current;
|
28
|
-
return sticky ? (React.createElement(Sticky, { getContainer: () => groupDom, stickyStyle: "absolute", getScrollContainer: getScrollContainer, ref: stickyRef =>
|
28
|
+
return sticky ? (React.createElement(Sticky, { getContainer: () => groupDom, stickyStyle: "absolute", getScrollContainer: getScrollContainer, ref: stickyRef => {
|
29
|
+
if (stickyRef) {
|
30
|
+
updateRef(groupIndex, stickyRef);
|
31
|
+
}
|
32
|
+
} }, titleDom)) : (titleDom);
|
29
33
|
};
|
30
34
|
return (React.createElement("div", { className: cls(`${prefixCls}-index-bar-group`, className), style: style, "data-index": groupIndex, ref: domRef },
|
31
35
|
renderIndexTitle(),
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import type { IndexBarBaseData, IndexBarProps, IndexBarRef } from './type';
|
2
|
+
import type { IndexBarBaseData, IndexBarProps, IndexBarRef, IndexBarGroupProps } from './type';
|
3
3
|
export type { IndexBarProps, IndexBarRef, IndexBarGroupProps, IndexBarGroupRef, IndexBarChangeTrigger, IndexBarIndexType, IndexBarTipType, } from './type';
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<IndexBarProps<IndexBarBaseData> & React.RefAttributes<IndexBarRef>> & {
|
5
|
-
Group: React.ForwardRefExoticComponent<
|
5
|
+
Group: React.ForwardRefExoticComponent<IndexBarGroupProps<IndexBarBaseData> & React.RefAttributes<import("./type").IndexBarGroupRef>>;
|
6
6
|
};
|
7
7
|
/**
|
8
8
|
* 索引栏组件
|
package/esnext/input/index.js
CHANGED
@@ -12,7 +12,7 @@ const Input = forwardRef((props, ref) => {
|
|
12
12
|
}));
|
13
13
|
function renderInput({ prefixCls }) {
|
14
14
|
const prefix = `${prefixCls}-input`;
|
15
|
-
return renderWrapper(prefix, type
|
15
|
+
return renderWrapper(prefix, `${type} single-line`, React.createElement("input", Object.assign({}, nativeProps, { id: id, name: name, maxLength: maxLength, placeholder: placeholder, readOnly: readOnly, onFocus: handleFocus, onBlur: handleBlur, onKeyUp: onKeyUp, onKeyPress: onKeyPress, ref: inputRef, className: cls(prefix, inputClass), style: inputStyle, value: inputValue, type: type, disabled: disabled, pattern: pattern, onChange: handleChange, onInput: handleInput, onKeyDown: handleKeyDown, onClick: handleClick, "aria-disabled": disabled, "aria-label": ariaLabel })));
|
16
16
|
}
|
17
17
|
return React.createElement(ContextLayout, null, renderInput);
|
18
18
|
});
|
@@ -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" | "
|
208
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "className" | "context" | "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" | "
|
212
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "className" | "context" | "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/esnext/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" | "
|
55
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "
|
54
|
+
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "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" | "
|
65
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "
|
64
|
+
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "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" | "
|
75
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "
|
74
|
+
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "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" | "
|
85
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "
|
84
|
+
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "getContainer" | "onClose">) => void;
|
86
86
|
close: () => void;
|
87
87
|
};
|
88
88
|
};
|
package/esnext/notify/index.js
CHANGED
@@ -9,8 +9,8 @@ const Notify = forwardRef((props, ref) => {
|
|
9
9
|
const { className = '', style, visible = false, transitionDuration = 300, content, duration = 3000, onClose, type = 'info', close, getContainer, } = props;
|
10
10
|
const domRef = useRef(null);
|
11
11
|
const innerRef = useRef(null);
|
12
|
-
const closeTimerRef = useRef();
|
13
|
-
const onCloseTimeRef = useRef();
|
12
|
+
const closeTimerRef = useRef(undefined);
|
13
|
+
const onCloseTimeRef = useRef(undefined);
|
14
14
|
const [hasTrans, setHasTrans] = useState(!visible);
|
15
15
|
const [innerHeight, setInnerHeight] = useState(0);
|
16
16
|
useImperativeHandle(ref, () => ({
|
@@ -49,6 +49,10 @@ const Cascader = forwardRef((props, ref) => {
|
|
49
49
|
return childrenTree;
|
50
50
|
}
|
51
51
|
const formatData = useMemo(() => _formatData(), [data, selectedValue]);
|
52
|
-
return (React.createElement(MultiPicker, { prefixCls: `${prefixCls}-picker`, data: formatData, selectedValue: selectedValue, itemHeight: itemHeight, onValueChange: _onValueChange }, formatData.map((item, index) => (React.createElement(PickerCell, { key: `${index}_picker_cell_cascader`, data: item || [], style: itemStyle, prefixCls: `${prefixCls}-picker`, clickable: clickable, itemHeight: itemHeight, wrapperHeight: wrapperHeight, disabled: disabled, rows: rows, hideEmptyCols: hideEmptyCols, ref: cellRef =>
|
52
|
+
return (React.createElement(MultiPicker, { prefixCls: `${prefixCls}-picker`, data: formatData, selectedValue: selectedValue, itemHeight: itemHeight, onValueChange: _onValueChange }, formatData.map((item, index) => (React.createElement(PickerCell, { key: `${index}_picker_cell_cascader`, data: item || [], style: itemStyle, prefixCls: `${prefixCls}-picker`, clickable: clickable, itemHeight: itemHeight, wrapperHeight: wrapperHeight, disabled: disabled, rows: rows, hideEmptyCols: hideEmptyCols, ref: cellRef => {
|
53
|
+
if (cellRef) {
|
54
|
+
pickerCellsRef.current[index] = cellRef;
|
55
|
+
}
|
56
|
+
}, touchToStop: touchToStop })))));
|
53
57
|
});
|
54
58
|
export default Cascader;
|
@@ -22,7 +22,7 @@ const PickerCell = forwardRef((props, ref) => {
|
|
22
22
|
const rowCount = Math.max(rows % 2 === 0 ? rows + 1 : rows, 3);
|
23
23
|
const isTouchMoveRef = useRef(false);
|
24
24
|
const isTouchStopped = useRef(false);
|
25
|
-
const unmountCallbackRef = useRef();
|
25
|
+
const unmountCallbackRef = useRef(undefined);
|
26
26
|
const timeRef = useRef(null);
|
27
27
|
const colStyle = useMemo(() => getStyleWithVendor({
|
28
28
|
transform: `translate3d(0px, ${transformY || 0}px, 0px)`,
|
@@ -117,7 +117,11 @@ const PickerView = forwardRef((props, ref) => {
|
|
117
117
|
...itemStyle,
|
118
118
|
};
|
119
119
|
return (React.createElement(ContextLayout, null, ({ prefixCls }) => (React.createElement("div", { className: `${prefixCls}-picker-view all-border-box ${className}`, style: { height: `${itemHeight * rows}px` }, ref: wrapperRef },
|
120
|
-
cascade ? (React.createElement(Cascader, { prefixCls: prefixCls || '', cols: cols, itemStyle: newItemStyle, data: data, selectedValue: scrollValue, onValueChange: _onValueChange, clickable: clickable, itemHeight: itemHeight, wrapperHeight: wrapperHeight, disabled: disabled, rows: rows, hideEmptyCols: hideEmptyCols, ref: cascaderRef, touchToStop: touchToStop })) : (React.createElement(MultiPicker, { prefixCls: `${prefixCls}-picker`, data: innerData, itemHeight: itemHeight, selectedValue: scrollValue, onValueChange: _onValueChange }, innerData.map((item, index) => (React.createElement(PickerCell, { key: `${index}_picker_cell_normal`, data: item, style: newItemStyle, prefixCls: `${prefixCls}-picker`, clickable: clickable, itemHeight: itemHeight, wrapperHeight: wrapperHeight, disabled: disabled, rows: rows, hideEmptyCols: hideEmptyCols, ref: cellRef =>
|
120
|
+
cascade ? (React.createElement(Cascader, { prefixCls: prefixCls || '', cols: cols, itemStyle: newItemStyle, data: data, selectedValue: scrollValue, onValueChange: _onValueChange, clickable: clickable, itemHeight: itemHeight, wrapperHeight: wrapperHeight, disabled: disabled, rows: rows, hideEmptyCols: hideEmptyCols, ref: cascaderRef, touchToStop: touchToStop })) : (React.createElement(MultiPicker, { prefixCls: `${prefixCls}-picker`, data: innerData, itemHeight: itemHeight, selectedValue: scrollValue, onValueChange: _onValueChange }, innerData.map((item, index) => (React.createElement(PickerCell, { key: `${index}_picker_cell_normal`, data: item, style: newItemStyle, prefixCls: `${prefixCls}-picker`, clickable: clickable, itemHeight: itemHeight, wrapperHeight: wrapperHeight, disabled: disabled, rows: rows, hideEmptyCols: hideEmptyCols, ref: cellRef => {
|
121
|
+
if (cellRef) {
|
122
|
+
pickerCellsRef.current[index] = cellRef;
|
123
|
+
}
|
124
|
+
}, touchToStop: touchToStop }))))),
|
121
125
|
React.createElement("div", { className: `${prefixCls}-picker-selection` },
|
122
126
|
React.createElement("div", { className: `${prefixCls}-picker-selection-mask ${prefixCls}-picker-selection-mask-top` }),
|
123
127
|
React.createElement("div", { ref: barRef, className: `${prefixCls}-picker-selection-bar`, style: selectionBarHeight }),
|
package/esnext/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" | "
|
69
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "className" | "context" | "translateZ" | "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" | "
|
73
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "className" | "context" | "translateZ" | "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
|
};
|
@@ -73,11 +73,11 @@ declare const _default: React.ForwardRefExoticComponent<PopupSwiperProps & React
|
|
73
73
|
* @param {string | PopupSwiperProps} config Configuration
|
74
74
|
* @returns {{ close: () => void; update: (newConfig: PopupSwiperProps) => void; }}
|
75
75
|
*/
|
76
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "
|
76
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "className" | "context" | "translateZ" | "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"> & {
|
77
77
|
key?: string | undefined;
|
78
78
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
79
79
|
close: () => void;
|
80
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "
|
80
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "className" | "context" | "translateZ" | "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"> & {
|
81
81
|
key?: string | undefined;
|
82
82
|
}) => void;
|
83
83
|
};
|
@@ -17,14 +17,14 @@ export declare const useCommonState: ({ onRefresh, loosingMinHeight, }: {
|
|
17
17
|
tipsHeight: number;
|
18
18
|
};
|
19
19
|
export declare const useAddScrollEvents: ({ domRef, handleTouchStart, handleTouchMove, handleTouchEnd, }: {
|
20
|
-
domRef: RefObject<HTMLDivElement>;
|
20
|
+
domRef: RefObject<HTMLDivElement | null>;
|
21
21
|
handleTouchStart: (evt: HTMLElementEventMap['touchstart']) => void;
|
22
22
|
handleTouchMove: (evt: HTMLElementEventMap['touchmove']) => void;
|
23
23
|
handleTouchEnd: (evt: HTMLElementEventMap['touchend']) => void;
|
24
24
|
}) => void;
|
25
25
|
export declare const useCheckAsStart: ({ allowPullWhenNotTop, domRef, }: {
|
26
26
|
allowPullWhenNotTop: boolean;
|
27
|
-
domRef: RefObject<HTMLDivElement>;
|
27
|
+
domRef: RefObject<HTMLDivElement | null>;
|
28
28
|
}) => {
|
29
29
|
ifShouldHandle: () => boolean | null;
|
30
30
|
};
|
package/esnext/radio/group.js
CHANGED
@@ -39,7 +39,9 @@ export function componentGenerator(Comp) {
|
|
39
39
|
layout,
|
40
40
|
disabled,
|
41
41
|
icons,
|
42
|
-
value: groupValue === void 0
|
42
|
+
value: groupValue === void 0 || groupValue === null
|
43
|
+
? []
|
44
|
+
: [groupValue],
|
43
45
|
onChange: handleChange,
|
44
46
|
} },
|
45
47
|
children,
|
package/esnext/radio/type.d.ts
CHANGED
@@ -8,10 +8,10 @@ export interface RadioGroupProps<T extends ValueType = ValueType, P extends Radi
|
|
8
8
|
*/
|
9
9
|
options?: P[];
|
10
10
|
/**
|
11
|
-
*
|
11
|
+
* 受控模式,选中的选项,传null表示取消选中
|
12
12
|
* @en Checked option, controlled mode
|
13
13
|
*/
|
14
|
-
value?: T;
|
14
|
+
value?: T | null;
|
15
15
|
/**
|
16
16
|
* 默认选中项
|
17
17
|
* @en Default checked value
|
@@ -80,7 +80,11 @@ export const SkeletonParagraph = forwardRef((props, ref) => {
|
|
80
80
|
return (React.createElement("div", { className: cls(`${prefixCls}-skeleton-paragraph`, className), style: style, ref: domRef }, Array.from(new Array(rows)).map((_, idx) => (React.createElement("div", { key: idx, className: cls(`${prefixCls}-skeleton-item`, `${prefixCls}-skeleton-paragraph-line`, showAnimation && `${prefixCls}-skeleton-animation-${animation}`), style: {
|
81
81
|
width: getWidth(idx),
|
82
82
|
backgroundColor,
|
83
|
-
}, ref: el =>
|
83
|
+
}, ref: el => {
|
84
|
+
if (el) {
|
85
|
+
lineDomRefs.current[idx] = el;
|
86
|
+
}
|
87
|
+
} }, isGradientAnimation && offsets !== undefined && (React.createElement("div", { className: `${prefixCls}-skeleton-animation-item`, style: { left: 0 - (offsets[idx] || 0) } })))))));
|
84
88
|
});
|
85
89
|
export const SkeletonAvatar = forwardRef((props, ref) => {
|
86
90
|
const { className = '', style } = props;
|
@@ -108,10 +112,18 @@ export const SkeletonGrid = forwardRef((props, ref) => {
|
|
108
112
|
dom: domRef.current,
|
109
113
|
}));
|
110
114
|
return (React.createElement("div", { className: cls(`${prefixCls}-skeleton-grid`, className), style: style, ref: domRef }, Array.from(new Array(columns)).map((_, idx) => (React.createElement("div", { key: idx, className: cls(`${prefixCls}-skeleton-grid-item`) },
|
111
|
-
React.createElement("div", { className: cls(`${prefixCls}-skeleton-item`, `${prefixCls}-skeleton-grid-icon`, showAnimation && `${prefixCls}-skeleton-animation-${animation}`), style: { backgroundColor }, ref: el =>
|
115
|
+
React.createElement("div", { className: cls(`${prefixCls}-skeleton-item`, `${prefixCls}-skeleton-grid-icon`, showAnimation && `${prefixCls}-skeleton-animation-${animation}`), style: { backgroundColor }, ref: el => {
|
116
|
+
if (el) {
|
117
|
+
iconDomRefs.current[idx] = el;
|
118
|
+
}
|
119
|
+
} }, isGradientAnimation && iconOffsets !== undefined && (React.createElement("div", { className: `${prefixCls}-skeleton-animation-item`, style: {
|
112
120
|
left: 0 - (iconOffsets?.[idx] || 0),
|
113
121
|
} }))),
|
114
|
-
React.createElement("div", { className: cls(`${prefixCls}-skeleton-item`, `${prefixCls}-skeleton-grid-text`, showAnimation && `${prefixCls}-skeleton-animation-${animation}`), style: { backgroundColor }, ref: el =>
|
122
|
+
React.createElement("div", { className: cls(`${prefixCls}-skeleton-item`, `${prefixCls}-skeleton-grid-text`, showAnimation && `${prefixCls}-skeleton-animation-${animation}`), style: { backgroundColor }, ref: el => {
|
123
|
+
if (el) {
|
124
|
+
textDomRefs.current[idx] = el;
|
125
|
+
}
|
126
|
+
} }, isGradientAnimation && textOffsets !== undefined && (React.createElement("div", { className: `${prefixCls}-skeleton-animation-item`, style: {
|
115
127
|
left: 0 - (textOffsets?.[idx] || 0),
|
116
128
|
} }))))))));
|
117
129
|
});
|
@@ -7,7 +7,7 @@ declare enum IsTouchingStatus {
|
|
7
7
|
}
|
8
8
|
export declare const useSliderEvents: ({ getLinePosition, lineRef, valueGroup, setValueGroup, setCommonIsTouching, }: {
|
9
9
|
getLinePosition: () => LinePosition;
|
10
|
-
lineRef: RefObject<HTMLDivElement>;
|
10
|
+
lineRef: RefObject<HTMLDivElement | null>;
|
11
11
|
valueGroup: number | number[];
|
12
12
|
setValueGroup: React.Dispatch<React.SetStateAction<number | [number, number]>>;
|
13
13
|
setCommonIsTouching: React.Dispatch<React.SetStateAction<number>>;
|
package/esnext/tabs/type.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CSSProperties, ReactNode
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
2
2
|
export declare type TabData = string | {
|
3
3
|
title: ReactNode;
|
4
4
|
[x: string]: any;
|
@@ -573,7 +573,7 @@ export interface TabCellRef {
|
|
573
573
|
}
|
574
574
|
export interface TabPaneProps extends Pick<TabsProps, 'duration' | 'transitionDuration' | 'lazyloadCount' | 'hideContentStyle' | 'renderHideContent' | 'mode' | 'tabPaneClass' | 'tabPaneStyle' | 'tabPaneExtra' | 'getScrollContainer' | 'scrollThrottle' | 'scrollOffset' | 'goLastWhenScrollBottom' | 'scrollVertical' | 'translateZ' | 'fullScreen' | 'autoHeight' | 'onScroll' | 'swipeEnergySaving'> {
|
575
575
|
prefixCls?: string;
|
576
|
-
panes:
|
576
|
+
panes: ReactNode[];
|
577
577
|
activeIndex: number;
|
578
578
|
activeIndexRef: React.MutableRefObject<number>;
|
579
579
|
tabDirection: 'horizontal' | 'vertical';
|
package/esnext/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" | "
|
189
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "
|
188
|
+
toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "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" | "
|
200
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "
|
199
|
+
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "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" | "
|
211
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "
|
210
|
+
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "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" | "
|
222
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "
|
221
|
+
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "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" | "
|
233
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "
|
232
|
+
loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "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" | "
|
244
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "
|
243
|
+
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "className" | "duration" | "context" | "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" | "className" | "duration" | "context" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
245
245
|
close: () => void;
|
246
246
|
hide: () => void;
|
247
247
|
};
|
package/esnext/toast/index.js
CHANGED
@@ -12,7 +12,7 @@ import { usePreventBodyScroll } from '../_helpers';
|
|
12
12
|
export * from './methods';
|
13
13
|
const Toast = forwardRef((props, ref) => {
|
14
14
|
const { className, getContainer, visible = false, onClose, close, type = 'info', icon, layout = 'vertical', duration = 3000, transitionDuration = 300, content, loading = false, loadingIcon, disableBodyTouch = false, loadingInner, direction = 'center', typeIconMap, initialBodyOverflow, } = props;
|
15
|
-
const closeTimerRef = useRef();
|
15
|
+
const closeTimerRef = useRef(undefined);
|
16
16
|
const domRef = useRef(null);
|
17
17
|
const wrapDomRef = useRef(null);
|
18
18
|
const isInitialMount = useRef(false);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arco-design/mobile-react",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.37.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "esm/index.js",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"author": "taoyiyue@bytedance.com",
|
16
16
|
"license": "ISC",
|
17
17
|
"dependencies": {
|
18
|
-
"@arco-design/mobile-utils": "2.
|
18
|
+
"@arco-design/mobile-utils": "2.22.0",
|
19
19
|
"@arco-design/transformable": "^1.0.0",
|
20
20
|
"@babel/runtime": "^7",
|
21
21
|
"lodash.throttle": "^4.1.1",
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"publishConfig": {
|
48
48
|
"access": "public"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "9b5b8001d5399a3233e02179497a4a3958a74a23"
|
51
51
|
}
|
package/umd/_helpers/hooks.d.ts
CHANGED
@@ -146,7 +146,7 @@ export declare function useLatestRef<T>(variable: T): React.MutableRefObject<T>;
|
|
146
146
|
* const systemWithHarmony = useSystem({ detectHarmony: true });
|
147
147
|
* ```
|
148
148
|
*/
|
149
|
-
export declare function useSystem(options?: SystemOptions): "" | "
|
149
|
+
export declare function useSystem(options?: SystemOptions): "" | "pc" | "android" | "ios" | "harmony";
|
150
150
|
/**
|
151
151
|
* 获取页面视口宽高大小,并在页面有resize时更新大小
|
152
152
|
* @desc {en} Get the width and height of the page viewport, and update the size when the page is resized
|
package/umd/_helpers/hooks.js
CHANGED
@@ -794,7 +794,7 @@
|
|
794
794
|
clickTimes = _useState11[0],
|
795
795
|
setClickTimes = _useState11[1];
|
796
796
|
|
797
|
-
var eventRef = (0, _react.useRef)();
|
797
|
+
var eventRef = (0, _react.useRef)(undefined);
|
798
798
|
(0, _react.useEffect)(function () {
|
799
799
|
var timer = setTimeout(function () {
|
800
800
|
if (clickTimes === 1) onClick(eventRef.current);
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { ReactElement } from 'react';
|
2
2
|
export interface RootType {
|
3
|
-
render: (
|
3
|
+
render: (element: ReactElement) => void;
|
4
4
|
_unmount: () => void;
|
5
5
|
}
|
6
6
|
export interface RootTypeReact extends RootType {
|
7
7
|
unmount?: () => void;
|
8
8
|
}
|
9
|
-
export declare type CreateRootFnType = (container: Element | DocumentFragment) =>
|
10
|
-
|
11
|
-
|
12
|
-
_unmount: () => void;
|
9
|
+
export declare type CreateRootFnType = (container: Element | DocumentFragment) => {
|
10
|
+
render: (element: ReactElement) => void;
|
11
|
+
unmount?: () => void;
|
13
12
|
};
|
13
|
+
export declare const render: (app: ReactElement, container: Element | DocumentFragment, createRootFunction?: CreateRootFnType | undefined) => RootType;
|