@arco-design/mobile-react 2.27.4 → 2.27.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/hooks.js +1 -1
- package/cjs/action-sheet/index.d.ts +2 -2
- package/cjs/badge/index.js +2 -1
- package/cjs/dialog/index.d.ts +2 -2
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/image-preview/index.js +2 -1
- package/cjs/image-preview/style/css/index.css +3 -0
- package/cjs/image-preview/style/index.less +4 -0
- package/cjs/index.d.ts +12 -12
- package/cjs/index.js +46 -46
- package/cjs/load-more/index.d.ts +5 -0
- package/cjs/load-more/index.js +2 -1
- package/cjs/masking/index.d.ts +2 -2
- package/cjs/masking/index.js +4 -2
- package/cjs/notify/index.d.ts +8 -8
- package/cjs/popover/popover.js +10 -2
- package/cjs/popup/index.d.ts +2 -2
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/slider/hooks/index.d.ts +1 -1
- package/cjs/slider/popover.js +6 -2
- package/cjs/stepper/hooks/useButtonClick.js +8 -9
- package/cjs/style.d.ts +13 -13
- package/cjs/style.js +24 -24
- package/cjs/toast/index.d.ts +12 -12
- package/cjs/toast/index.js +5 -2
- package/dist/index.js +13828 -13802
- package/dist/index.min.js +3 -3
- package/dist/style.css +3273 -3270
- package/dist/style.min.css +1 -1
- package/esm/_helpers/hooks.js +2 -2
- package/esm/action-sheet/index.d.ts +2 -2
- package/esm/badge/index.js +2 -1
- package/esm/dialog/index.d.ts +2 -2
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/image-preview/index.js +2 -1
- package/esm/image-preview/style/css/index.css +3 -0
- package/esm/image-preview/style/index.less +4 -0
- package/esm/index.d.ts +12 -12
- package/esm/index.js +12 -12
- package/esm/load-more/index.d.ts +5 -0
- package/esm/load-more/index.js +2 -1
- package/esm/masking/index.d.ts +2 -2
- package/esm/masking/index.js +4 -2
- package/esm/notify/index.d.ts +8 -8
- package/esm/popover/popover.js +10 -2
- package/esm/popup/index.d.ts +2 -2
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/slider/hooks/index.d.ts +1 -1
- package/esm/slider/popover.js +7 -3
- package/esm/stepper/hooks/useButtonClick.js +8 -9
- package/esm/style.d.ts +13 -13
- package/esm/style.js +13 -13
- package/esm/toast/index.d.ts +12 -12
- package/esm/toast/index.js +5 -2
- package/package.json +3 -3
- package/umd/_helpers/hooks.js +1 -1
- package/umd/action-sheet/index.d.ts +2 -2
- package/umd/badge/index.js +2 -1
- package/umd/dialog/index.d.ts +2 -2
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/image-preview/index.js +2 -1
- package/umd/image-preview/style/css/index.css +3 -0
- package/umd/image-preview/style/index.less +4 -0
- package/umd/index.d.ts +12 -12
- package/umd/index.js +28 -28
- package/umd/load-more/index.d.ts +5 -0
- package/umd/load-more/index.js +2 -1
- package/umd/masking/index.d.ts +2 -2
- package/umd/masking/index.js +4 -2
- package/umd/notify/index.d.ts +8 -8
- package/umd/popover/popover.js +10 -2
- package/umd/popup/index.d.ts +2 -2
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/slider/hooks/index.d.ts +1 -1
- package/umd/slider/popover.js +6 -2
- package/umd/stepper/hooks/useButtonClick.js +8 -9
- package/umd/style.d.ts +13 -13
- package/umd/style.js +2 -2
- package/umd/toast/index.d.ts +12 -12
- package/umd/toast/index.js +5 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,21 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.27.5](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.27.4...@arco-design/mobile-react@2.27.5) (2023-07-04)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* `ImagePreview` fix long picture display problem ([#137](https://github.com/arco-design/arco-design-mobile/issues/137)) ([3df1f71](https://github.com/arco-design/arco-design-mobile/commit/3df1f71a8b1f63ed5e1986284f2746438de59d70))
|
12
|
+
* `LoadMore` fix the inaccurate scrollheight when using multiple loadmore ([#130](https://github.com/arco-design/arco-design-mobile/issues/130)) ([da76f12](https://github.com/arco-design/arco-design-mobile/commit/da76f125734579a1921a3ace0964d5ff845cd545))
|
13
|
+
* `Stepper` disable status ([#134](https://github.com/arco-design/arco-design-mobile/issues/134)) ([71dabe7](https://github.com/arco-design/arco-design-mobile/commit/71dabe71f3508ac8cb9a800d8ac1be01df509f28))
|
14
|
+
* error caught when using "getComputedStyle" ([#129](https://github.com/arco-design/arco-design-mobile/issues/129)) ([daa8f67](https://github.com/arco-design/arco-design-mobile/commit/daa8f67961d9d2751a14c0c3f7759b54fe0579cb))
|
15
|
+
* transition in StrictMode ([#131](https://github.com/arco-design/arco-design-mobile/issues/131)) ([084448b](https://github.com/arco-design/arco-design-mobile/commit/084448b0e4b43ea7d8632e232c1665ce00449c3d))
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
6
21
|
## [2.27.4](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.27.3...@arco-design/mobile-react@2.27.4) (2023-05-19)
|
7
22
|
|
8
23
|
|
package/README.en-US.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.27.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.27.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.27.4/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.27.4/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## Full import
|
package/README.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.27.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.27.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.27.4/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.27.4/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## 引入全部
|
package/cjs/_helpers/hooks.js
CHANGED
@@ -209,7 +209,7 @@ function usePopupScroll(visible, popupDom, getScrollContainer, orientationDirect
|
|
209
209
|
if (ele) {
|
210
210
|
var actualEle = Array.isArray(ele) ? ele : [ele];
|
211
211
|
scrollRef.current = actualEle.reduce(function (acc, nowEle) {
|
212
|
-
return [].concat(acc, nowEle &&
|
212
|
+
return [].concat(acc, nowEle && (0, _mobileUtils.safeGetComputedStyle)(nowEle).overflow !== 'hidden' ? [{
|
213
213
|
ele: nowEle,
|
214
214
|
maxScrollX: orientationDirection === 'left' || orientationDirection === 'right' ? nowEle.scrollHeight - nowEle.clientHeight : nowEle.scrollWidth - nowEle.clientWidth,
|
215
215
|
maxScrollY: orientationDirection === 'left' || orientationDirection === 'right' ? nowEle.scrollWidth - nowEle.clientWidth : nowEle.scrollHeight - nowEle.clientHeight
|
@@ -86,11 +86,11 @@ declare const _default: React.ForwardRefExoticComponent<ActionSheetProps & React
|
|
86
86
|
* @param {ActionSheetProps} config setting
|
87
87
|
* @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
|
88
88
|
*/
|
89
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
89
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
|
90
90
|
key?: string | undefined;
|
91
91
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
92
92
|
close: () => void;
|
93
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
93
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
|
94
94
|
key?: string | undefined;
|
95
95
|
}) => void;
|
96
96
|
};
|
package/cjs/badge/index.js
CHANGED
@@ -65,7 +65,8 @@ var Badge = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
65
65
|
return /*#__PURE__*/_react.default.createElement(_transition.default, {
|
66
66
|
in: visible,
|
67
67
|
timeout: timeout,
|
68
|
-
type: "scale"
|
68
|
+
type: "scale",
|
69
|
+
nodeRef: domRef
|
69
70
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
70
71
|
className: (0, _mobileUtils.cls)(prefixCls + "-badge", className, (_cls = {}, _cls[prefixCls + "-badge-dot dot"] = dot, _cls[prefixCls + "-badge-bordered bordered"] = bordered, _cls[prefixCls + "-badge-absolute absolute"] = absolute, _cls)),
|
71
72
|
style: style,
|
package/cjs/dialog/index.d.ts
CHANGED
@@ -193,11 +193,11 @@ declare const _default: React.ForwardRefExoticComponent<DialogProps & React.RefA
|
|
193
193
|
* @param {DialogProps} config Configuration
|
194
194
|
* @returns {{ close: () => void; update: (newConfig: DialogProps) => void; }}
|
195
195
|
*/
|
196
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
196
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
|
197
197
|
key?: string | undefined;
|
198
198
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
199
199
|
close: () => void;
|
200
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
200
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
|
201
201
|
key?: string | undefined;
|
202
202
|
}) => void;
|
203
203
|
};
|
@@ -269,9 +269,9 @@ declare const _default: React.ForwardRefExoticComponent<ImagePreviewProps & Reac
|
|
269
269
|
* @param {ImagePreviewProps} config configuration
|
270
270
|
* @returns {{ close: () => void; update: (newConfig: ImagePreviewProps) => void; }}
|
271
271
|
*/
|
272
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "
|
272
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "loadingArea" | "onClose" | "fit" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
273
273
|
close: () => void;
|
274
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "
|
274
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ImagePreviewProps & React.RefAttributes<ImagePreviewRef>>, "style" | "ref" | "key" | "context" | "className" | "swipeable" | "lazyloadCount" | "onChange" | "onAfterChange" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "loadingArea" | "onClose" | "fit" | "errorArea" | "showLoading" | "showError" | "retryTime" | "staticLabel" | "animateDurationSlide" | "loop" | "renderIndicator" | "indicatorPos" | "showIndicator" | "hideSingleIndicator" | "spaceBetween" | "percentToChange" | "distanceToChange" | "speedToChange" | "images" | "openIndex" | "displayDuration" | "replaceFallbackWhenLoaded" | "noselect" | "scrollBezier" | "swipeToClose" | "getMinScale" | "getMaxScale" | "getDoubleClickScale" | "getThumbBounds" | "onImageClick" | "onImageDoubleClick" | "onImageLongTap">) => void;
|
275
275
|
};
|
276
276
|
};
|
277
277
|
/**
|
@@ -910,7 +910,8 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
910
910
|
timeout: displayDuration,
|
911
911
|
type: "fade",
|
912
912
|
mountOnEnter: true,
|
913
|
-
unmountOnExit: true
|
913
|
+
unmountOnExit: true,
|
914
|
+
nodeRef: domRef
|
914
915
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
915
916
|
className: (0, _mobileUtils.cls)(prefixCls + "-image-preview", 'all-border-box', {
|
916
917
|
noselect: noselect
|
package/cjs/index.d.ts
CHANGED
@@ -1,34 +1,31 @@
|
|
1
|
-
export { default as
|
1
|
+
export { default as Tabs } from './tabs';
|
2
|
+
export { default as Sticky } from './sticky';
|
3
|
+
export { default as LoadMore } from './load-more';
|
4
|
+
export { default as Cell } from './cell';
|
2
5
|
export { default as ActionSheet } from './action-sheet';
|
3
6
|
export { default as Avatar } from './avatar';
|
4
7
|
export { default as Badge } from './badge';
|
8
|
+
export { default as Button } from './button';
|
5
9
|
export { default as Carousel } from './carousel';
|
6
|
-
export { default as Cell } from './cell';
|
7
10
|
export { default as Checkbox } from './checkbox';
|
8
11
|
export { default as CircleProgress } from './circle-progress';
|
9
12
|
export { default as Collapse } from './collapse';
|
10
13
|
export { default as ContextProvider } from './context-provider';
|
11
14
|
export { default as CountDown } from './count-down';
|
12
15
|
export { default as DatePicker } from './date-picker';
|
13
|
-
export { default as Divider } from './divider';
|
14
16
|
export { default as Dialog } from './dialog';
|
17
|
+
export { default as Divider } from './divider';
|
15
18
|
export { default as Dropdown } from './dropdown';
|
16
19
|
export { default as DropdownMenu } from './dropdown-menu';
|
17
20
|
export { default as Ellipsis } from './ellipsis';
|
18
21
|
export { default as Form } from './form';
|
19
|
-
export { default as Input } from './input';
|
20
|
-
export { default as Textarea } from './textarea';
|
21
|
-
export { default as Radio } from './radio';
|
22
|
-
export { default as Rate } from './rate';
|
23
|
-
export { default as Slider } from './slider';
|
24
22
|
export { default as Grid } from './grid';
|
25
23
|
export { default as Image } from './image';
|
26
|
-
export { default as ShowMonitor } from './show-monitor';
|
27
24
|
export { default as ImagePicker } from './image-picker';
|
28
25
|
export { default as ImagePreview } from './image-preview';
|
29
26
|
export { default as IndexBar } from './index-bar';
|
27
|
+
export { default as Input } from './input';
|
30
28
|
export { default as Keyboard } from './keyboard';
|
31
|
-
export { default as LoadMore } from './load-more';
|
32
29
|
export { default as Loading } from './loading';
|
33
30
|
export { default as Masking } from './masking';
|
34
31
|
export { default as NavBar } from './nav-bar';
|
@@ -43,15 +40,18 @@ export { default as PopupSwiper } from './popup-swiper';
|
|
43
40
|
export { default as Portal } from './portal';
|
44
41
|
export { default as Progress } from './progress';
|
45
42
|
export { default as PullRefresh } from './pull-refresh';
|
43
|
+
export { default as Radio } from './radio';
|
44
|
+
export { default as Rate } from './rate';
|
46
45
|
export { default as SearchBar } from './search-bar';
|
46
|
+
export { default as ShowMonitor } from './show-monitor';
|
47
|
+
export { default as Slider } from './slider';
|
47
48
|
export { default as Stepper } from './stepper';
|
48
49
|
export { default as Steps } from './steps';
|
49
|
-
export { default as Sticky } from './sticky';
|
50
50
|
export { default as SwipeAction } from './swipe-action';
|
51
51
|
export { default as SwipeLoad } from './swipe-load';
|
52
52
|
export { default as Switch } from './switch';
|
53
53
|
export { default as TabBar } from './tab-bar';
|
54
|
-
export { default as Tabs } from './tabs';
|
55
54
|
export { default as Tag } from './tag';
|
55
|
+
export { default as Textarea } from './textarea';
|
56
56
|
export { default as Toast } from './toast';
|
57
57
|
export { default as Transition } from './transition';
|
package/cjs/index.js
CHANGED
@@ -5,9 +5,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
exports.__esModule = true;
|
6
6
|
exports.Transition = exports.Toast = exports.Textarea = exports.Tag = exports.Tabs = exports.TabBar = exports.Switch = exports.SwipeLoad = exports.SwipeAction = exports.Sticky = exports.Steps = exports.Stepper = exports.Slider = exports.ShowMonitor = exports.SearchBar = exports.Rate = exports.Radio = exports.PullRefresh = exports.Progress = exports.Portal = exports.PopupSwiper = exports.Popup = exports.Popover = exports.PickerView = exports.Picker = exports.Pagination = exports.Notify = exports.NoticeBar = exports.NavBar = exports.Masking = exports.Loading = exports.LoadMore = exports.Keyboard = exports.Input = exports.IndexBar = exports.ImagePreview = exports.ImagePicker = exports.Image = exports.Grid = exports.Form = exports.Ellipsis = exports.DropdownMenu = exports.Dropdown = exports.Divider = exports.Dialog = exports.DatePicker = exports.CountDown = exports.ContextProvider = exports.Collapse = exports.CircleProgress = exports.Checkbox = exports.Cell = exports.Carousel = exports.Button = exports.Badge = exports.Avatar = exports.ActionSheet = void 0;
|
7
7
|
|
8
|
-
var
|
8
|
+
var _tabs = _interopRequireDefault(require("./tabs"));
|
9
9
|
|
10
|
-
exports.
|
10
|
+
exports.Tabs = _tabs.default;
|
11
|
+
|
12
|
+
var _sticky = _interopRequireDefault(require("./sticky"));
|
13
|
+
|
14
|
+
exports.Sticky = _sticky.default;
|
15
|
+
|
16
|
+
var _loadMore = _interopRequireDefault(require("./load-more"));
|
17
|
+
|
18
|
+
exports.LoadMore = _loadMore.default;
|
19
|
+
|
20
|
+
var _cell = _interopRequireDefault(require("./cell"));
|
21
|
+
|
22
|
+
exports.Cell = _cell.default;
|
11
23
|
|
12
24
|
var _actionSheet = _interopRequireDefault(require("./action-sheet"));
|
13
25
|
|
@@ -21,13 +33,13 @@ var _badge = _interopRequireDefault(require("./badge"));
|
|
21
33
|
|
22
34
|
exports.Badge = _badge.default;
|
23
35
|
|
24
|
-
var
|
36
|
+
var _button = _interopRequireDefault(require("./button"));
|
25
37
|
|
26
|
-
exports.
|
38
|
+
exports.Button = _button.default;
|
27
39
|
|
28
|
-
var
|
40
|
+
var _carousel = _interopRequireDefault(require("./carousel"));
|
29
41
|
|
30
|
-
exports.
|
42
|
+
exports.Carousel = _carousel.default;
|
31
43
|
|
32
44
|
var _checkbox = _interopRequireDefault(require("./checkbox"));
|
33
45
|
|
@@ -53,14 +65,14 @@ var _datePicker = _interopRequireDefault(require("./date-picker"));
|
|
53
65
|
|
54
66
|
exports.DatePicker = _datePicker.default;
|
55
67
|
|
56
|
-
var _divider = _interopRequireDefault(require("./divider"));
|
57
|
-
|
58
|
-
exports.Divider = _divider.default;
|
59
|
-
|
60
68
|
var _dialog = _interopRequireDefault(require("./dialog"));
|
61
69
|
|
62
70
|
exports.Dialog = _dialog.default;
|
63
71
|
|
72
|
+
var _divider = _interopRequireDefault(require("./divider"));
|
73
|
+
|
74
|
+
exports.Divider = _divider.default;
|
75
|
+
|
64
76
|
var _dropdown = _interopRequireDefault(require("./dropdown"));
|
65
77
|
|
66
78
|
exports.Dropdown = _dropdown.default;
|
@@ -77,26 +89,6 @@ var _form = _interopRequireDefault(require("./form"));
|
|
77
89
|
|
78
90
|
exports.Form = _form.default;
|
79
91
|
|
80
|
-
var _input = _interopRequireDefault(require("./input"));
|
81
|
-
|
82
|
-
exports.Input = _input.default;
|
83
|
-
|
84
|
-
var _textarea = _interopRequireDefault(require("./textarea"));
|
85
|
-
|
86
|
-
exports.Textarea = _textarea.default;
|
87
|
-
|
88
|
-
var _radio = _interopRequireDefault(require("./radio"));
|
89
|
-
|
90
|
-
exports.Radio = _radio.default;
|
91
|
-
|
92
|
-
var _rate = _interopRequireDefault(require("./rate"));
|
93
|
-
|
94
|
-
exports.Rate = _rate.default;
|
95
|
-
|
96
|
-
var _slider = _interopRequireDefault(require("./slider"));
|
97
|
-
|
98
|
-
exports.Slider = _slider.default;
|
99
|
-
|
100
92
|
var _grid = _interopRequireDefault(require("./grid"));
|
101
93
|
|
102
94
|
exports.Grid = _grid.default;
|
@@ -105,10 +97,6 @@ var _image = _interopRequireDefault(require("./image"));
|
|
105
97
|
|
106
98
|
exports.Image = _image.default;
|
107
99
|
|
108
|
-
var _showMonitor = _interopRequireDefault(require("./show-monitor"));
|
109
|
-
|
110
|
-
exports.ShowMonitor = _showMonitor.default;
|
111
|
-
|
112
100
|
var _imagePicker = _interopRequireDefault(require("./image-picker"));
|
113
101
|
|
114
102
|
exports.ImagePicker = _imagePicker.default;
|
@@ -121,13 +109,13 @@ var _indexBar = _interopRequireDefault(require("./index-bar"));
|
|
121
109
|
|
122
110
|
exports.IndexBar = _indexBar.default;
|
123
111
|
|
124
|
-
var
|
112
|
+
var _input = _interopRequireDefault(require("./input"));
|
125
113
|
|
126
|
-
exports.
|
114
|
+
exports.Input = _input.default;
|
127
115
|
|
128
|
-
var
|
116
|
+
var _keyboard = _interopRequireDefault(require("./keyboard"));
|
129
117
|
|
130
|
-
exports.
|
118
|
+
exports.Keyboard = _keyboard.default;
|
131
119
|
|
132
120
|
var _loading = _interopRequireDefault(require("./loading"));
|
133
121
|
|
@@ -185,10 +173,26 @@ var _pullRefresh = _interopRequireDefault(require("./pull-refresh"));
|
|
185
173
|
|
186
174
|
exports.PullRefresh = _pullRefresh.default;
|
187
175
|
|
176
|
+
var _radio = _interopRequireDefault(require("./radio"));
|
177
|
+
|
178
|
+
exports.Radio = _radio.default;
|
179
|
+
|
180
|
+
var _rate = _interopRequireDefault(require("./rate"));
|
181
|
+
|
182
|
+
exports.Rate = _rate.default;
|
183
|
+
|
188
184
|
var _searchBar = _interopRequireDefault(require("./search-bar"));
|
189
185
|
|
190
186
|
exports.SearchBar = _searchBar.default;
|
191
187
|
|
188
|
+
var _showMonitor = _interopRequireDefault(require("./show-monitor"));
|
189
|
+
|
190
|
+
exports.ShowMonitor = _showMonitor.default;
|
191
|
+
|
192
|
+
var _slider = _interopRequireDefault(require("./slider"));
|
193
|
+
|
194
|
+
exports.Slider = _slider.default;
|
195
|
+
|
192
196
|
var _stepper = _interopRequireDefault(require("./stepper"));
|
193
197
|
|
194
198
|
exports.Stepper = _stepper.default;
|
@@ -197,10 +201,6 @@ var _steps = _interopRequireDefault(require("./steps"));
|
|
197
201
|
|
198
202
|
exports.Steps = _steps.default;
|
199
203
|
|
200
|
-
var _sticky = _interopRequireDefault(require("./sticky"));
|
201
|
-
|
202
|
-
exports.Sticky = _sticky.default;
|
203
|
-
|
204
204
|
var _swipeAction = _interopRequireDefault(require("./swipe-action"));
|
205
205
|
|
206
206
|
exports.SwipeAction = _swipeAction.default;
|
@@ -217,14 +217,14 @@ var _tabBar = _interopRequireDefault(require("./tab-bar"));
|
|
217
217
|
|
218
218
|
exports.TabBar = _tabBar.default;
|
219
219
|
|
220
|
-
var _tabs = _interopRequireDefault(require("./tabs"));
|
221
|
-
|
222
|
-
exports.Tabs = _tabs.default;
|
223
|
-
|
224
220
|
var _tag = _interopRequireDefault(require("./tag"));
|
225
221
|
|
226
222
|
exports.Tag = _tag.default;
|
227
223
|
|
224
|
+
var _textarea = _interopRequireDefault(require("./textarea"));
|
225
|
+
|
226
|
+
exports.Textarea = _textarea.default;
|
227
|
+
|
228
228
|
var _toast = _interopRequireDefault(require("./toast"));
|
229
229
|
|
230
230
|
exports.Toast = _toast.default;
|
package/cjs/load-more/index.d.ts
CHANGED
@@ -62,6 +62,11 @@ export interface LoadMoreProps {
|
|
62
62
|
* @default () => window
|
63
63
|
*/
|
64
64
|
getScrollContainer?: () => HTMLElement | Window | null;
|
65
|
+
/**
|
66
|
+
* 当多个 loadmore 在同一页面时,通过传入节点的 offsetHeight + offsetTop 代替 scrollHeight
|
67
|
+
* @en When multiple loadmores are on the same page, pass in the offsetHeight + offsetTop of the node instead of scrollHeight
|
68
|
+
*/
|
69
|
+
getOffsetNode?: () => HTMLElement | Window | null;
|
65
70
|
/**
|
66
71
|
* 触发loading的时机,当为click时,点击后将触发getData
|
67
72
|
* @en The timing of triggering loading, when it is click, getData will be triggered after clicking
|
package/cjs/load-more/index.js
CHANGED
@@ -40,6 +40,7 @@ var LoadMore = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
40
40
|
defaultStatus = _props$defaultStatus === void 0 ? 'prepare' : _props$defaultStatus,
|
41
41
|
status = props.status,
|
42
42
|
getScrollContainer = props.getScrollContainer,
|
43
|
+
getOffsetNode = props.getOffsetNode,
|
43
44
|
_props$trigger = props.trigger,
|
44
45
|
trigger = _props$trigger === void 0 ? 'scroll' : _props$trigger,
|
45
46
|
_props$threshold = props.threshold,
|
@@ -142,7 +143,7 @@ var LoadMore = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
142
143
|
}, [changeStatus]);
|
143
144
|
|
144
145
|
function checkNeedTrigger(top, ths) {
|
145
|
-
var scrollHeight = (0, _mobileUtils.getScrollContainerAttribute)('scrollHeight', getScrollContainer);
|
146
|
+
var scrollHeight = getOffsetNode ? (0, _mobileUtils.getScrollContainerAttribute)('offsetHeight', getOffsetNode) + (0, _mobileUtils.getScrollContainerAttribute)('offsetTop', getOffsetNode) : (0, _mobileUtils.getScrollContainerAttribute)('scrollHeight', getScrollContainer);
|
146
147
|
var clientHeight = (0, _mobileUtils.getScrollContainerAttribute)('clientHeight', getScrollContainer);
|
147
148
|
return scrollHeight - top - clientHeight <= ths;
|
148
149
|
}
|
package/cjs/masking/index.d.ts
CHANGED
@@ -205,11 +205,11 @@ declare const _default: React.ForwardRefExoticComponent<MaskingProps & React.Ref
|
|
205
205
|
* @param {MaskingProps} config Configuration
|
206
206
|
* @returns {{ close: () => void; update: (newConfig: MaskingProps) => void; }}
|
207
207
|
*/
|
208
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
208
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
|
209
209
|
key?: string | undefined;
|
210
210
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
211
211
|
close: () => void;
|
212
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
212
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
|
213
213
|
key?: string | undefined;
|
214
214
|
}) => void;
|
215
215
|
};
|
package/cjs/masking/index.js
CHANGED
@@ -184,7 +184,8 @@ var Masking = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
184
184
|
timeout: maskTransitionTimeout,
|
185
185
|
type: maskTransitionType,
|
186
186
|
mountOnEnter: mountOnEnter,
|
187
|
-
unmountOnExit: unmountOnExit
|
187
|
+
unmountOnExit: unmountOnExit,
|
188
|
+
nodeRef: maskRef
|
188
189
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
189
190
|
ref: maskRef,
|
190
191
|
className: (0, _mobileUtils.cls)(prefixCls + "-masking-mask", extraClass, maskClass),
|
@@ -195,7 +196,8 @@ var Masking = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
195
196
|
timeout: contentTransitionTimeout,
|
196
197
|
type: contentTransitionType,
|
197
198
|
mountOnEnter: mountOnEnter,
|
198
|
-
unmountOnExit: unmountOnExit
|
199
|
+
unmountOnExit: unmountOnExit,
|
200
|
+
nodeRef: contentRef
|
199
201
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
200
202
|
ref: contentRef,
|
201
203
|
className: (0, _mobileUtils.cls)(prefixCls + "-masking-content", {
|
package/cjs/notify/index.d.ts
CHANGED
@@ -51,8 +51,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
|
|
51
51
|
* @param {string | NotifyProps} config
|
52
52
|
* @returns {{ update: (config: NotifyProps) => void; close: () => void }}
|
53
53
|
*/
|
54
|
-
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
55
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
54
|
+
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
55
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
|
56
56
|
close: () => void;
|
57
57
|
};
|
58
58
|
/**
|
@@ -61,8 +61,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
|
|
61
61
|
* @param {string | NotifyProps} config
|
62
62
|
* @returns {{ update: (config: NotifyProps) => void; close: () => void }}
|
63
63
|
*/
|
64
|
-
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
65
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
64
|
+
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
65
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
|
66
66
|
close: () => void;
|
67
67
|
};
|
68
68
|
/**
|
@@ -71,8 +71,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
|
|
71
71
|
* @param {string | NotifyProps} config
|
72
72
|
* @returns {{ update: (config: NotifyProps) => void; close: () => void }}
|
73
73
|
*/
|
74
|
-
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
75
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
74
|
+
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
75
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
|
76
76
|
close: () => void;
|
77
77
|
};
|
78
78
|
/**
|
@@ -81,8 +81,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
|
|
81
81
|
* @param {string | NotifyProps} config
|
82
82
|
* @returns {{ update: (config: NotifyProps) => void; close: () => void }}
|
83
83
|
*/
|
84
|
-
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
85
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
84
|
+
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
85
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
|
86
86
|
close: () => void;
|
87
87
|
};
|
88
88
|
};
|
package/cjs/popover/popover.js
CHANGED
@@ -84,6 +84,8 @@ var Popover = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
84
84
|
var wrapperRef = (0, _react.useRef)(null);
|
85
85
|
var childRef = (0, _react.useRef)(null);
|
86
86
|
var popoverRef = (0, _react.useRef)(null);
|
87
|
+
var transitionNodeRef = (0, _react.useRef)(null);
|
88
|
+
var maskRef = (0, _react.useRef)(null);
|
87
89
|
|
88
90
|
var _usePosition = (0, _hooks.usePosition)(props, popoverRef, childRef, wrapperRef),
|
89
91
|
direction = _usePosition.direction,
|
@@ -215,7 +217,10 @@ var Popover = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
215
217
|
className: (0, _mobileUtils.cls)(theme + "-theme", innerPopoverClassName, {
|
216
218
|
bordered: bordered
|
217
219
|
}),
|
218
|
-
ref:
|
220
|
+
ref: function ref(ele) {
|
221
|
+
popoverRef.current = ele;
|
222
|
+
transitionNodeRef.current = ele == null ? void 0 : ele.dom;
|
223
|
+
},
|
219
224
|
direction: direction,
|
220
225
|
minWidth: minWidth,
|
221
226
|
maxWidth: maxWidth,
|
@@ -243,6 +248,7 @@ var Popover = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
243
248
|
in: visibleState && !isCalcPosition,
|
244
249
|
timeout: transitionTimeout,
|
245
250
|
type: transitionName,
|
251
|
+
nodeRef: transitionNodeRef,
|
246
252
|
mountOnEnter: true,
|
247
253
|
unmountOnExit: true
|
248
254
|
}, renderInnerPopover()));
|
@@ -251,12 +257,14 @@ var Popover = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
251
257
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showMask && /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_transition.default, {
|
252
258
|
in: visibleState && !isCalcPosition,
|
253
259
|
timeout: maskTransitionTimeout,
|
260
|
+
nodeRef: maskRef,
|
254
261
|
type: "fade",
|
255
262
|
mountOnEnter: true,
|
256
263
|
unmountOnExit: true
|
257
264
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
258
265
|
className: prefixCls + "-popover-mask",
|
259
|
-
onClick: onClickMask
|
266
|
+
onClick: onClickMask,
|
267
|
+
ref: maskRef
|
260
268
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
261
269
|
className: (0, _mobileUtils.cls)(prefixCls + "-popover", className, theme + "-theme", mode + "-mode", {
|
262
270
|
bordered: bordered,
|
package/cjs/popup/index.d.ts
CHANGED
@@ -66,11 +66,11 @@ declare const _default: React.ForwardRefExoticComponent<PopupProps & React.RefAt
|
|
66
66
|
* @param {PopupProps} config Configuration
|
67
67
|
* @returns {{ close: () => void; update: (newConfig: PopupProps) => void; }}
|
68
68
|
*/
|
69
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
69
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
|
70
70
|
key?: string | undefined;
|
71
71
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
72
72
|
close: () => void;
|
73
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
73
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
|
74
74
|
key?: string | undefined;
|
75
75
|
}) => void;
|
76
76
|
};
|