antd-mobile 5.12.1 → 5.12.4
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/2x/cjs/components/badge/badge.d.ts +1 -1
- package/2x/cjs/components/badge/badge.js +3 -1
- package/2x/cjs/components/badge/index.d.ts +1 -1
- package/2x/cjs/components/button/button.d.ts +6 -4
- package/2x/cjs/components/button/button.js +5 -1
- package/2x/cjs/components/calendar/calendar.js +2 -2
- package/2x/cjs/components/dialog/dialog.d.ts +2 -1
- package/2x/cjs/components/dropdown/dropdown.css +1 -1
- package/2x/cjs/components/error-block/images/busy.d.ts +1 -0
- package/2x/cjs/components/error-block/images/default.d.ts +1 -0
- package/2x/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/cjs/components/error-block/images/empty.d.ts +1 -0
- package/2x/cjs/components/image/broken-image-icon.d.ts +1 -0
- package/2x/cjs/components/image/broken-image-icon.js +21 -0
- package/2x/cjs/components/image/image-icon.d.ts +1 -0
- package/2x/cjs/components/image/image-icon.js +21 -0
- package/2x/cjs/components/image/image.css +4 -2
- package/2x/cjs/components/image/image.d.ts +1 -1
- package/2x/cjs/components/image/image.js +6 -4
- package/2x/cjs/components/image-uploader/image-uploader.js +1 -4
- package/2x/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
- package/2x/cjs/components/modal/modal.d.ts +2 -1
- package/2x/cjs/components/popup/popup.d.ts +2 -1
- package/2x/cjs/components/search-bar/search-bar.js +5 -8
- package/2x/cjs/components/side-bar/side-bar.d.ts +2 -1
- package/2x/cjs/components/tabs/tabs.css +4 -3
- package/2x/cjs/components/tabs/tabs.d.ts +1 -1
- package/2x/cjs/components/toast/toast.css +1 -1
- package/2x/cjs/components/toast/toast.d.ts +2 -1
- package/2x/cjs/utils/get-scroll-parent.js +1 -1
- package/2x/es/components/badge/badge.d.ts +1 -1
- package/2x/es/components/badge/badge.js +1 -1
- package/2x/es/components/badge/index.d.ts +1 -1
- package/2x/es/components/button/button.d.ts +6 -4
- package/2x/es/components/button/button.js +5 -1
- package/2x/es/components/calendar/calendar.js +2 -2
- package/2x/es/components/dialog/dialog.d.ts +2 -1
- package/2x/es/components/dropdown/dropdown.css +1 -1
- package/2x/es/components/error-block/images/busy.d.ts +1 -0
- package/2x/es/components/error-block/images/default.d.ts +1 -0
- package/2x/es/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/es/components/error-block/images/empty.d.ts +1 -0
- package/2x/es/components/image/broken-image-icon.d.ts +1 -0
- package/2x/es/components/image/broken-image-icon.js +9 -0
- package/2x/es/components/image/image-icon.d.ts +1 -0
- package/2x/es/components/image/image-icon.js +9 -0
- package/2x/es/components/image/image.css +4 -2
- package/2x/es/components/image/image.d.ts +1 -1
- package/2x/es/components/image/image.js +4 -3
- package/2x/es/components/image-uploader/image-uploader.js +2 -5
- package/2x/es/components/infinite-scroll/infinite-scroll.js +8 -6
- package/2x/es/components/modal/modal.d.ts +2 -1
- package/2x/es/components/popup/popup.d.ts +2 -1
- package/2x/es/components/search-bar/search-bar.js +5 -8
- package/2x/es/components/side-bar/side-bar.d.ts +2 -1
- package/2x/es/components/tabs/tabs.css +4 -3
- package/2x/es/components/tabs/tabs.d.ts +1 -1
- package/2x/es/components/toast/toast.css +1 -1
- package/2x/es/components/toast/toast.d.ts +2 -1
- package/2x/es/utils/get-scroll-parent.js +1 -1
- package/2x/package.json +3 -8
- package/bundle/antd-mobile.cjs.js +39 -24
- package/bundle/antd-mobile.es.js +40 -25
- package/bundle/style.css +10 -7
- package/cjs/components/badge/badge.d.ts +1 -1
- package/cjs/components/badge/badge.js +3 -1
- package/cjs/components/badge/index.d.ts +1 -1
- package/cjs/components/button/button.d.ts +6 -4
- package/cjs/components/button/button.js +5 -1
- package/cjs/components/calendar/calendar.js +2 -2
- package/cjs/components/dialog/dialog.d.ts +2 -1
- package/cjs/components/dropdown/dropdown.css +1 -1
- package/cjs/components/error-block/images/busy.d.ts +1 -0
- package/cjs/components/error-block/images/default.d.ts +1 -0
- package/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/cjs/components/error-block/images/empty.d.ts +1 -0
- package/cjs/components/image/broken-image-icon.d.ts +1 -0
- package/cjs/components/image/broken-image-icon.js +21 -0
- package/cjs/components/image/image-icon.d.ts +1 -0
- package/cjs/components/image/image-icon.js +21 -0
- package/cjs/components/image/image.css +4 -2
- package/cjs/components/image/image.d.ts +1 -1
- package/cjs/components/image/image.js +6 -4
- package/cjs/components/image-uploader/image-uploader.js +1 -4
- package/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
- package/cjs/components/modal/modal.d.ts +2 -1
- package/cjs/components/popup/popup.d.ts +2 -1
- package/cjs/components/search-bar/search-bar.js +5 -8
- package/cjs/components/side-bar/side-bar.d.ts +2 -1
- package/cjs/components/tabs/tabs.css +4 -3
- package/cjs/components/tabs/tabs.d.ts +1 -1
- package/cjs/components/toast/toast.css +1 -1
- package/cjs/components/toast/toast.d.ts +2 -1
- package/cjs/utils/get-scroll-parent.js +1 -1
- package/es/components/badge/badge.d.ts +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/index.d.ts +1 -1
- package/es/components/button/button.d.ts +6 -4
- package/es/components/button/button.js +5 -1
- package/es/components/calendar/calendar.js +2 -2
- package/es/components/dialog/dialog.d.ts +2 -1
- package/es/components/dropdown/dropdown.css +1 -1
- package/es/components/error-block/images/busy.d.ts +1 -0
- package/es/components/error-block/images/default.d.ts +1 -0
- package/es/components/error-block/images/disconnected.d.ts +1 -0
- package/es/components/error-block/images/empty.d.ts +1 -0
- package/es/components/image/broken-image-icon.d.ts +1 -0
- package/es/components/image/broken-image-icon.js +9 -0
- package/es/components/image/image-icon.d.ts +1 -0
- package/es/components/image/image-icon.js +9 -0
- package/es/components/image/image.css +4 -2
- package/es/components/image/image.d.ts +1 -1
- package/es/components/image/image.js +4 -3
- package/es/components/image-uploader/image-uploader.js +2 -5
- package/es/components/infinite-scroll/infinite-scroll.js +8 -6
- package/es/components/modal/modal.d.ts +2 -1
- package/es/components/popup/popup.d.ts +2 -1
- package/es/components/search-bar/search-bar.js +5 -8
- package/es/components/side-bar/side-bar.d.ts +2 -1
- package/es/components/tabs/tabs.css +4 -3
- package/es/components/tabs/tabs.d.ts +1 -1
- package/es/components/toast/toast.css +1 -1
- package/es/components/toast/toast.d.ts +2 -1
- package/es/utils/get-scroll-parent.js +1 -1
- package/package.json +3 -8
- package/umd/antd-mobile.js +1 -1
|
@@ -14,13 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
.adm-image-tip {
|
|
16
16
|
position: relative;
|
|
17
|
-
background-color: #
|
|
17
|
+
background-color: #f5f5f5;
|
|
18
18
|
height: 100%;
|
|
19
19
|
min-height: 48px;
|
|
20
20
|
min-width: 48px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.adm-image-tip >
|
|
23
|
+
.adm-image-tip > svg {
|
|
24
|
+
width: 48px;
|
|
25
|
+
height: 48px;
|
|
24
26
|
position: absolute;
|
|
25
27
|
left: 50%;
|
|
26
28
|
top: 50%;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { mergeProps } from '../../utils/with-default-props';
|
|
2
2
|
import React, { useState, useRef } from 'react';
|
|
3
3
|
import { withNativeProps } from '../../utils/native-props';
|
|
4
|
-
import { PictureOutline, PictureWrongOutline } from 'antd-mobile-icons';
|
|
5
4
|
import { staged } from 'staged-components';
|
|
6
5
|
import { toCSSLength } from '../../utils/to-css-length';
|
|
7
6
|
import { LazyDetector } from './lazy-detector';
|
|
8
7
|
import { useIsomorphicUpdateLayoutEffect } from '../../utils/use-isomorphic-update-layout-effect';
|
|
8
|
+
import { ImageIcon } from './image-icon';
|
|
9
|
+
import { BrokenImageIcon } from './broken-image-icon';
|
|
9
10
|
const classPrefix = `adm-image`;
|
|
10
11
|
const defaultProps = {
|
|
11
12
|
fit: 'fill',
|
|
12
13
|
placeholder: React.createElement("div", {
|
|
13
14
|
className: `${classPrefix}-tip`
|
|
14
|
-
}, React.createElement(
|
|
15
|
+
}, React.createElement(ImageIcon, null)),
|
|
15
16
|
fallback: React.createElement("div", {
|
|
16
17
|
className: `${classPrefix}-tip`
|
|
17
|
-
}, React.createElement(
|
|
18
|
+
}, React.createElement(BrokenImageIcon, null)),
|
|
18
19
|
lazy: false
|
|
19
20
|
};
|
|
20
21
|
export const Image = staged(p => {
|
|
@@ -5,7 +5,7 @@ import { mergeProps } from '../../utils/with-default-props';
|
|
|
5
5
|
import ImageViewer from '../image-viewer';
|
|
6
6
|
import PreviewItem from './preview-item';
|
|
7
7
|
import { usePropsValue } from '../../utils/use-props-value';
|
|
8
|
-
import { useIsomorphicLayoutEffect,
|
|
8
|
+
import { useIsomorphicLayoutEffect, useUnmount } from 'ahooks';
|
|
9
9
|
import Space from '../space';
|
|
10
10
|
import { withNativeProps } from '../../utils/native-props';
|
|
11
11
|
import { useConfig } from '../config-provider';
|
|
@@ -28,9 +28,6 @@ export const ImageUploader = p => {
|
|
|
28
28
|
} = useConfig();
|
|
29
29
|
const props = mergeProps(defaultProps, p);
|
|
30
30
|
const [value, setValue] = usePropsValue(props);
|
|
31
|
-
const updateValue = useMemoizedFn(updater => {
|
|
32
|
-
setValue(updater(value));
|
|
33
|
-
});
|
|
34
31
|
const [tasks, setTasks] = useState([]);
|
|
35
32
|
useIsomorphicLayoutEffect(() => {
|
|
36
33
|
setTasks(prev => prev.filter(task => {
|
|
@@ -109,7 +106,7 @@ export const ImageUploader = p => {
|
|
|
109
106
|
return task;
|
|
110
107
|
});
|
|
111
108
|
});
|
|
112
|
-
|
|
109
|
+
setValue(prev => {
|
|
113
110
|
const newVal = Object.assign({}, result);
|
|
114
111
|
return [...prev, newVal];
|
|
115
112
|
});
|
|
@@ -27,9 +27,11 @@ export const InfiniteScroll = p => {
|
|
|
27
27
|
threshold: 250
|
|
28
28
|
}, p);
|
|
29
29
|
const doLoadMore = useLockFn(() => props.loadMore());
|
|
30
|
-
const elementRef = useRef(null);
|
|
30
|
+
const elementRef = useRef(null); // Prevent duplicated trigger of `check` function
|
|
31
|
+
|
|
31
32
|
const [flag, setFlag] = useState({});
|
|
32
33
|
const nextFlagRef = useRef(flag);
|
|
34
|
+
const [scrollParent, setScrollParent] = useState();
|
|
33
35
|
const check = useMemoizedFn(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
36
|
if (nextFlagRef.current !== flag) return;
|
|
35
37
|
if (!props.hasMore) return;
|
|
@@ -37,6 +39,7 @@ export const InfiniteScroll = p => {
|
|
|
37
39
|
if (!element) return;
|
|
38
40
|
if (!element.offsetParent) return;
|
|
39
41
|
const parent = getScrollParent(element);
|
|
42
|
+
setScrollParent(parent);
|
|
40
43
|
if (!parent) return;
|
|
41
44
|
const rect = element.getBoundingClientRect();
|
|
42
45
|
const elementTop = rect.top;
|
|
@@ -56,18 +59,17 @@ export const InfiniteScroll = p => {
|
|
|
56
59
|
useEffect(() => {
|
|
57
60
|
const element = elementRef.current;
|
|
58
61
|
if (!element) return;
|
|
59
|
-
|
|
60
|
-
if (!parent) return;
|
|
62
|
+
if (!scrollParent) return;
|
|
61
63
|
|
|
62
64
|
function onScroll() {
|
|
63
65
|
check();
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
scrollParent.addEventListener('scroll', onScroll);
|
|
67
69
|
return () => {
|
|
68
|
-
|
|
70
|
+
scrollParent.removeEventListener('scroll', onScroll);
|
|
69
71
|
};
|
|
70
|
-
}, []);
|
|
72
|
+
}, [scrollParent]);
|
|
71
73
|
return withNativeProps(props, React.createElement("div", {
|
|
72
74
|
className: classPrefix,
|
|
73
75
|
ref: elementRef
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC, ReactNode } from 'react';
|
|
2
|
+
import type { MaskProps } from '../mask';
|
|
2
3
|
import { Action } from './modal-action-button';
|
|
3
4
|
import { GetContainer } from '../../utils/render-to-container';
|
|
4
5
|
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
@@ -19,7 +20,7 @@ export declare type ModalProps = {
|
|
|
19
20
|
getContainer?: GetContainer;
|
|
20
21
|
bodyStyle?: React.CSSProperties;
|
|
21
22
|
bodyClassName?: string;
|
|
22
|
-
maskStyle?:
|
|
23
|
+
maskStyle?: MaskProps['style'];
|
|
23
24
|
maskClassName?: string;
|
|
24
25
|
stopPropagation?: PropagationEvent[];
|
|
25
26
|
showCloseButton?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
|
+
import type { MaskProps } from '../mask';
|
|
3
4
|
import { GetContainer } from '../../utils/render-to-container';
|
|
4
5
|
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
5
6
|
export declare type PopupProps = {
|
|
@@ -15,7 +16,7 @@ export declare type PopupProps = {
|
|
|
15
16
|
bodyClassName?: string;
|
|
16
17
|
bodyStyle?: React.CSSProperties;
|
|
17
18
|
maskClassName?: string;
|
|
18
|
-
maskStyle?:
|
|
19
|
+
maskStyle?: MaskProps['style'];
|
|
19
20
|
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
20
21
|
stopPropagation?: PropagationEvent[];
|
|
21
22
|
children?: React.ReactNode;
|
|
@@ -52,7 +52,7 @@ export const SearchBar = forwardRef((p, ref) => {
|
|
|
52
52
|
}));
|
|
53
53
|
|
|
54
54
|
const renderCancelButton = () => {
|
|
55
|
-
let isShowCancel
|
|
55
|
+
let isShowCancel;
|
|
56
56
|
|
|
57
57
|
if (typeof props.showCancelButton === 'function') {
|
|
58
58
|
isShowCancel = props.showCancelButton(hasFocus, value);
|
|
@@ -61,13 +61,7 @@ export const SearchBar = forwardRef((p, ref) => {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
return isShowCancel && React.createElement("div", {
|
|
64
|
-
className: `${classPrefix}-suffix
|
|
65
|
-
onMouseDown: e => {
|
|
66
|
-
e.preventDefault();
|
|
67
|
-
},
|
|
68
|
-
onTouchStart: e => {
|
|
69
|
-
e.preventDefault();
|
|
70
|
-
}
|
|
64
|
+
className: `${classPrefix}-suffix`
|
|
71
65
|
}, React.createElement(Button, {
|
|
72
66
|
fill: 'none',
|
|
73
67
|
className: `${classPrefix}-cancel-button`,
|
|
@@ -80,6 +74,9 @@ export const SearchBar = forwardRef((p, ref) => {
|
|
|
80
74
|
|
|
81
75
|
(_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
82
76
|
(_c = props.onCancel) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
77
|
+
},
|
|
78
|
+
onMouseDown: e => {
|
|
79
|
+
e.preventDefault();
|
|
83
80
|
}
|
|
84
81
|
}, props.cancelText));
|
|
85
82
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { BadgeProps } from '../badge';
|
|
3
4
|
import { NativeProps } from '../../utils/native-props';
|
|
4
5
|
export declare type SideBarItemProps = {
|
|
5
6
|
title?: ReactNode;
|
|
6
7
|
disabled?: boolean;
|
|
7
|
-
badge?:
|
|
8
|
+
badge?: BadgeProps['content'];
|
|
8
9
|
} & NativeProps;
|
|
9
10
|
export declare const SideBarItem: FC<SideBarItemProps>;
|
|
10
11
|
export declare type SideBarProps = {
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
--content-padding: 24px;
|
|
4
4
|
--active-line-height: 4px;
|
|
5
5
|
--active-line-border-radius: var(--active-line-height);
|
|
6
|
+
--active-line-color: var(--adm-color-primary);
|
|
7
|
+
--active-title-color: var(--adm-color-primary);
|
|
6
8
|
position: relative;
|
|
7
9
|
min-width: 0;
|
|
8
10
|
}
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
.adm-tabs-tab-active {
|
|
48
|
-
color: var(--
|
|
50
|
+
color: var(--active-title-color);
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
.adm-tabs-tab-disabled {
|
|
@@ -57,8 +59,7 @@
|
|
|
57
59
|
position: absolute;
|
|
58
60
|
bottom: 0;
|
|
59
61
|
height: var(--active-line-height);
|
|
60
|
-
|
|
61
|
-
background: var(--adm-color-primary);
|
|
62
|
+
background: var(--active-line-color);
|
|
62
63
|
border-radius: var(--active-line-border-radius);
|
|
63
64
|
}
|
|
64
65
|
|
|
@@ -15,5 +15,5 @@ export declare type TabsProps = {
|
|
|
15
15
|
stretch?: boolean;
|
|
16
16
|
onChange?: (key: string) => void;
|
|
17
17
|
children?: React.ReactNode;
|
|
18
|
-
} & NativeProps<'--fixed-active-line-width' | '--active-line-height' | '--active-line-border-radius' | '--title-font-size' | '--content-padding'>;
|
|
18
|
+
} & NativeProps<'--fixed-active-line-width' | '--active-line-height' | '--active-line-border-radius' | '--title-font-size' | '--content-padding' | '--active-title-color' | '--active-line-color'>;
|
|
19
19
|
export declare const Tabs: FC<TabsProps>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
import type { MaskProps } from '../mask';
|
|
2
3
|
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
3
4
|
import { GetContainer } from '../../utils/render-to-container';
|
|
4
5
|
export interface ToastProps {
|
|
5
6
|
afterClose?: () => void;
|
|
6
|
-
maskStyle?:
|
|
7
|
+
maskStyle?: MaskProps['style'];
|
|
7
8
|
maskClassName?: string;
|
|
8
9
|
maskClickable?: boolean;
|
|
9
10
|
content?: ReactNode;
|
|
@@ -19,7 +19,7 @@ export function getScrollParent(el, root = defaultRoot) {
|
|
|
19
19
|
overflowY
|
|
20
20
|
} = window.getComputedStyle(node);
|
|
21
21
|
|
|
22
|
-
if (overflowStylePatterns.includes(overflowY)) {
|
|
22
|
+
if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
|
|
23
23
|
return node;
|
|
24
24
|
}
|
|
25
25
|
|
package/2x/package.json
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-mobile",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.4",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@floating-ui/dom": "^0.4.5",
|
|
6
6
|
"@react-spring/web": "^9.4.5",
|
|
7
|
-
"@
|
|
8
|
-
"@types/react-is": "^17.0.3",
|
|
9
|
-
"@types/react-virtualized": "^9.21.21",
|
|
10
|
-
"@types/resize-observer-browser": "^0.1.7",
|
|
11
|
-
"@use-gesture/react": "^10.2.12",
|
|
7
|
+
"@use-gesture/react": "10.2.14",
|
|
12
8
|
"ahooks": "^3.3.10",
|
|
13
9
|
"antd-mobile-icons": "^0.2.2",
|
|
14
10
|
"antd-mobile-v5-count": "^1.0.1",
|
|
@@ -43,6 +39,5 @@
|
|
|
43
39
|
"url": "git+https://github.com/ant-design/ant-design-mobile.git",
|
|
44
40
|
"branch": "master",
|
|
45
41
|
"platform": "github"
|
|
46
|
-
}
|
|
47
|
-
"packageManager": "yarn@3.2.0"
|
|
42
|
+
}
|
|
48
43
|
}
|
|
@@ -1626,7 +1626,7 @@ function getScrollParent(el2, root2 = defaultRoot) {
|
|
|
1626
1626
|
const {
|
|
1627
1627
|
overflowY
|
|
1628
1628
|
} = window.getComputedStyle(node);
|
|
1629
|
-
if (overflowStylePatterns.includes(overflowY)) {
|
|
1629
|
+
if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
|
|
1630
1630
|
return node;
|
|
1631
1631
|
}
|
|
1632
1632
|
node = node.parentNode;
|
|
@@ -9144,7 +9144,11 @@ const Button = React$1.forwardRef((p2, ref) => {
|
|
|
9144
9144
|
[`${classPrefix$1d}-large`]: props.size === "large",
|
|
9145
9145
|
[`${classPrefix$1d}-loading`]: loading
|
|
9146
9146
|
}, `${classPrefix$1d}-shape-${props.shape}`),
|
|
9147
|
-
disabled
|
|
9147
|
+
disabled,
|
|
9148
|
+
onMouseDown: props.onMouseDown,
|
|
9149
|
+
onMouseUp: props.onMouseUp,
|
|
9150
|
+
onTouchStart: props.onTouchStart,
|
|
9151
|
+
onTouchEnd: props.onTouchEnd
|
|
9148
9152
|
}, loading ? React__default["default"].createElement("div", {
|
|
9149
9153
|
className: `${classPrefix$1d}-loading-wrapper`
|
|
9150
9154
|
}, props.loadingIcon, props.loadingText) : props.children));
|
|
@@ -9416,7 +9420,7 @@ const Avatar = (p2) => {
|
|
|
9416
9420
|
};
|
|
9417
9421
|
var badge = "";
|
|
9418
9422
|
const classPrefix$18 = `adm-badge`;
|
|
9419
|
-
const dot =
|
|
9423
|
+
const dot = React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
9420
9424
|
const Badge$1 = (props) => {
|
|
9421
9425
|
const {
|
|
9422
9426
|
content,
|
|
@@ -9661,10 +9665,10 @@ const Calendar = React$1.forwardRef((p2, ref) => {
|
|
|
9661
9665
|
isSelect = isBegin || isEnd || d.isAfter(begin, "day") && d.isBefore(end, "day");
|
|
9662
9666
|
}
|
|
9663
9667
|
const inThisMonth = d.month() === current.month();
|
|
9664
|
-
const disabled =
|
|
9668
|
+
const disabled = maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
9665
9669
|
cells.push(React__default["default"].createElement("div", {
|
|
9666
9670
|
key: d.valueOf(),
|
|
9667
|
-
className: classNames__default["default"](`${classPrefix$17}-cell`, disabled && `${classPrefix$17}-cell-disabled`, inThisMonth && {
|
|
9671
|
+
className: classNames__default["default"](`${classPrefix$17}-cell`, (disabled || !inThisMonth) && `${classPrefix$17}-cell-disabled`, inThisMonth && {
|
|
9668
9672
|
[`${classPrefix$17}-cell-today`]: d.isSame(today, "day"),
|
|
9669
9673
|
[`${classPrefix$17}-cell-selected`]: isSelect,
|
|
9670
9674
|
[`${classPrefix$17}-cell-selected-begin`]: isBegin,
|
|
@@ -12263,15 +12267,31 @@ const LazyDetector = (props) => {
|
|
|
12263
12267
|
ref
|
|
12264
12268
|
});
|
|
12265
12269
|
};
|
|
12270
|
+
const ImageIcon = () => React__default["default"].createElement("svg", {
|
|
12271
|
+
viewBox: "0 0 48 48",
|
|
12272
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12273
|
+
}, React__default["default"].createElement("path", {
|
|
12274
|
+
d: "M41.396 6.234c1.923 0 3.487 1.574 3.487 3.505v29.14c0 1.937-1.568 3.51-3.491 3.51H6.604c-1.923 0-3.487-1.573-3.487-3.51V9.745c0-1.936 1.564-3.51 3.487-3.51Zm0 2.847H6.604c-.355 0-.654.3-.654.658V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.405 2.405 0 0 1 1.933.752l4.182 4.525 7.58-11.005a2.374 2.374 0 0 1 1.96-1.01c.79 0 1.532.38 1.966 1.01L42.05 34.89V9.74a.664.664 0 0 0-.654-.658Zm-28.305 2.763a3.119 3.119 0 0 1 3.117 3.117 3.119 3.119 0 0 1-3.117 3.117 3.122 3.122 0 0 1-3.117-3.117 3.119 3.119 0 0 1 3.117-3.117Z",
|
|
12275
|
+
fill: "#DBDBDB",
|
|
12276
|
+
fillRule: "nonzero"
|
|
12277
|
+
}));
|
|
12278
|
+
const BrokenImageIcon = () => React__default["default"].createElement("svg", {
|
|
12279
|
+
viewBox: "0 0 48 48",
|
|
12280
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12281
|
+
}, React__default["default"].createElement("path", {
|
|
12282
|
+
d: "M19.233 6.233 17.42 9.08l-10.817.001a.665.665 0 0 0-.647.562l-.007.096V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.415 2.415 0 0 1 1.807.625l.126.127 4.182 4.525 2.267-3.292 5.461 7.841-4.065 7.375H6.604c-1.86 0-3.382-1.47-3.482-3.317l-.005-.192V9.744c0-1.872 1.461-3.405 3.296-3.505l.19-.005h12.63Zm22.163 0c1.86 0 3.382 1.472 3.482 3.314l.005.192v29.14a3.507 3.507 0 0 1-3.3 3.505l-.191.006H27.789l3.63-6.587.06-.119a1.87 1.87 0 0 0-.163-1.853l-6.928-9.949 3.047-4.422a2.374 2.374 0 0 1 1.96-1.01 2.4 2.4 0 0 1 1.86.87l.106.14L42.05 34.89V9.74a.664.664 0 0 0-.654-.658H21.855l1.812-2.848h17.73Zm-28.305 5.611c.794 0 1.52.298 2.07.788l-.843 1.325-.067.114a1.87 1.87 0 0 0 .11 1.959l.848 1.217c-.556.515-1.3.83-2.118.83a3.122 3.122 0 0 1-3.117-3.116 3.119 3.119 0 0 1 3.117-3.117Z",
|
|
12283
|
+
fill: "#DBDBDB",
|
|
12284
|
+
fillRule: "nonzero"
|
|
12285
|
+
}));
|
|
12266
12286
|
const classPrefix$S = `adm-image`;
|
|
12267
12287
|
const defaultProps$H = {
|
|
12268
12288
|
fit: "fill",
|
|
12269
12289
|
placeholder: React__default["default"].createElement("div", {
|
|
12270
12290
|
className: `${classPrefix$S}-tip`
|
|
12271
|
-
}, React__default["default"].createElement(
|
|
12291
|
+
}, React__default["default"].createElement(ImageIcon, null)),
|
|
12272
12292
|
fallback: React__default["default"].createElement("div", {
|
|
12273
12293
|
className: `${classPrefix$S}-tip`
|
|
12274
|
-
}, React__default["default"].createElement(
|
|
12294
|
+
}, React__default["default"].createElement(BrokenImageIcon, null)),
|
|
12275
12295
|
lazy: false
|
|
12276
12296
|
};
|
|
12277
12297
|
const Image$1 = stagedComponents.staged((p2) => {
|
|
@@ -14923,9 +14943,6 @@ const ImageUploader = (p2) => {
|
|
|
14923
14943
|
} = useConfig();
|
|
14924
14944
|
const props = mergeProps(defaultProps$t, p2);
|
|
14925
14945
|
const [value, setValue] = usePropsValue(props);
|
|
14926
|
-
const updateValue = ahooks.useMemoizedFn((updater) => {
|
|
14927
|
-
setValue(updater(value));
|
|
14928
|
-
});
|
|
14929
14946
|
const [tasks, setTasks] = React$1.useState([]);
|
|
14930
14947
|
ahooks.useIsomorphicLayoutEffect(() => {
|
|
14931
14948
|
setTasks((prev) => prev.filter((task) => {
|
|
@@ -14997,7 +15014,7 @@ const ImageUploader = (p2) => {
|
|
|
14997
15014
|
return task;
|
|
14998
15015
|
});
|
|
14999
15016
|
});
|
|
15000
|
-
|
|
15017
|
+
setValue((prev) => {
|
|
15001
15018
|
const newVal = Object.assign({}, result2);
|
|
15002
15019
|
return [...prev, newVal];
|
|
15003
15020
|
});
|
|
@@ -15276,6 +15293,7 @@ const InfiniteScroll = (p2) => {
|
|
|
15276
15293
|
const elementRef = React$1.useRef(null);
|
|
15277
15294
|
const [flag, setFlag] = React$1.useState({});
|
|
15278
15295
|
const nextFlagRef = React$1.useRef(flag);
|
|
15296
|
+
const [scrollParent, setScrollParent] = React$1.useState();
|
|
15279
15297
|
const check = ahooks.useMemoizedFn(() => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
15280
15298
|
if (nextFlagRef.current !== flag)
|
|
15281
15299
|
return;
|
|
@@ -15287,6 +15305,7 @@ const InfiniteScroll = (p2) => {
|
|
|
15287
15305
|
if (!element.offsetParent)
|
|
15288
15306
|
return;
|
|
15289
15307
|
const parent = getScrollParent(element);
|
|
15308
|
+
setScrollParent(parent);
|
|
15290
15309
|
if (!parent)
|
|
15291
15310
|
return;
|
|
15292
15311
|
const rect = element.getBoundingClientRect();
|
|
@@ -15306,17 +15325,16 @@ const InfiniteScroll = (p2) => {
|
|
|
15306
15325
|
const element = elementRef.current;
|
|
15307
15326
|
if (!element)
|
|
15308
15327
|
return;
|
|
15309
|
-
|
|
15310
|
-
if (!parent)
|
|
15328
|
+
if (!scrollParent)
|
|
15311
15329
|
return;
|
|
15312
15330
|
function onScroll() {
|
|
15313
15331
|
check();
|
|
15314
15332
|
}
|
|
15315
|
-
|
|
15333
|
+
scrollParent.addEventListener("scroll", onScroll);
|
|
15316
15334
|
return () => {
|
|
15317
|
-
|
|
15335
|
+
scrollParent.removeEventListener("scroll", onScroll);
|
|
15318
15336
|
};
|
|
15319
|
-
}, []);
|
|
15337
|
+
}, [scrollParent]);
|
|
15320
15338
|
return withNativeProps(props, React__default["default"].createElement("div", {
|
|
15321
15339
|
className: classPrefix$w,
|
|
15322
15340
|
ref: elementRef
|
|
@@ -16562,20 +16580,14 @@ const SearchBar = React$1.forwardRef((p2, ref) => {
|
|
|
16562
16580
|
}
|
|
16563
16581
|
}));
|
|
16564
16582
|
const renderCancelButton = () => {
|
|
16565
|
-
let isShowCancel
|
|
16583
|
+
let isShowCancel;
|
|
16566
16584
|
if (typeof props.showCancelButton === "function") {
|
|
16567
16585
|
isShowCancel = props.showCancelButton(hasFocus, value);
|
|
16568
16586
|
} else {
|
|
16569
16587
|
isShowCancel = props.showCancelButton && hasFocus;
|
|
16570
16588
|
}
|
|
16571
16589
|
return isShowCancel && React__default["default"].createElement("div", {
|
|
16572
|
-
className: `${classPrefix$i}-suffix
|
|
16573
|
-
onMouseDown: (e) => {
|
|
16574
|
-
e.preventDefault();
|
|
16575
|
-
},
|
|
16576
|
-
onTouchStart: (e) => {
|
|
16577
|
-
e.preventDefault();
|
|
16578
|
-
}
|
|
16590
|
+
className: `${classPrefix$i}-suffix`
|
|
16579
16591
|
}, React__default["default"].createElement(Button, {
|
|
16580
16592
|
fill: "none",
|
|
16581
16593
|
className: `${classPrefix$i}-cancel-button`,
|
|
@@ -16586,6 +16598,9 @@ const SearchBar = React$1.forwardRef((p2, ref) => {
|
|
|
16586
16598
|
}
|
|
16587
16599
|
(_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
16588
16600
|
(_c = props.onCancel) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
16601
|
+
},
|
|
16602
|
+
onMouseDown: (e) => {
|
|
16603
|
+
e.preventDefault();
|
|
16589
16604
|
}
|
|
16590
16605
|
}, props.cancelText));
|
|
16591
16606
|
};
|
package/bundle/antd-mobile.es.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useSpring, animated, to } from "@react-spring/web";
|
|
|
6
6
|
import dayjs from "dayjs";
|
|
7
7
|
import { isFragment, isMemo } from "react-is";
|
|
8
8
|
import { useDrag, useWheel, createUseGesture, dragAction, pinchAction } from "@use-gesture/react";
|
|
9
|
-
import { RightOutline, CheckOutline, DownOutline,
|
|
9
|
+
import { RightOutline, CheckOutline, DownOutline, DownFill, QuestionCircleOutline, CloseOutline, AddOutline, CloseCircleFill, LeftOutline, SoundOutline, TextDeletionOutline, StarFill, CheckCircleFill, InformationCircleFill, ClockCircleFill, ExclamationCircleFill, SearchOutline, MinusOutline } from "antd-mobile-icons";
|
|
10
10
|
import { staged } from "staged-components";
|
|
11
11
|
import RcForm, { List as List$2, Field, useForm, useWatch } from "rc-field-form";
|
|
12
12
|
import { computePosition, offset, shift, limitShift, flip, hide, arrow, autoUpdate } from "@floating-ui/dom";
|
|
@@ -1616,7 +1616,7 @@ function getScrollParent(el2, root2 = defaultRoot) {
|
|
|
1616
1616
|
const {
|
|
1617
1617
|
overflowY
|
|
1618
1618
|
} = window.getComputedStyle(node);
|
|
1619
|
-
if (overflowStylePatterns.includes(overflowY)) {
|
|
1619
|
+
if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
|
|
1620
1620
|
return node;
|
|
1621
1621
|
}
|
|
1622
1622
|
node = node.parentNode;
|
|
@@ -9134,7 +9134,11 @@ const Button = forwardRef((p2, ref) => {
|
|
|
9134
9134
|
[`${classPrefix$1d}-large`]: props.size === "large",
|
|
9135
9135
|
[`${classPrefix$1d}-loading`]: loading
|
|
9136
9136
|
}, `${classPrefix$1d}-shape-${props.shape}`),
|
|
9137
|
-
disabled
|
|
9137
|
+
disabled,
|
|
9138
|
+
onMouseDown: props.onMouseDown,
|
|
9139
|
+
onMouseUp: props.onMouseUp,
|
|
9140
|
+
onTouchStart: props.onTouchStart,
|
|
9141
|
+
onTouchEnd: props.onTouchEnd
|
|
9138
9142
|
}, loading ? React$1.createElement("div", {
|
|
9139
9143
|
className: `${classPrefix$1d}-loading-wrapper`
|
|
9140
9144
|
}, props.loadingIcon, props.loadingText) : props.children));
|
|
@@ -9406,7 +9410,7 @@ const Avatar = (p2) => {
|
|
|
9406
9410
|
};
|
|
9407
9411
|
var badge = "";
|
|
9408
9412
|
const classPrefix$18 = `adm-badge`;
|
|
9409
|
-
const dot =
|
|
9413
|
+
const dot = React$1.createElement(React$1.Fragment, null);
|
|
9410
9414
|
const Badge$1 = (props) => {
|
|
9411
9415
|
const {
|
|
9412
9416
|
content,
|
|
@@ -9651,10 +9655,10 @@ const Calendar = forwardRef((p2, ref) => {
|
|
|
9651
9655
|
isSelect = isBegin || isEnd || d.isAfter(begin, "day") && d.isBefore(end, "day");
|
|
9652
9656
|
}
|
|
9653
9657
|
const inThisMonth = d.month() === current.month();
|
|
9654
|
-
const disabled =
|
|
9658
|
+
const disabled = maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
9655
9659
|
cells.push(React$1.createElement("div", {
|
|
9656
9660
|
key: d.valueOf(),
|
|
9657
|
-
className: classNames(`${classPrefix$17}-cell`, disabled && `${classPrefix$17}-cell-disabled`, inThisMonth && {
|
|
9661
|
+
className: classNames(`${classPrefix$17}-cell`, (disabled || !inThisMonth) && `${classPrefix$17}-cell-disabled`, inThisMonth && {
|
|
9658
9662
|
[`${classPrefix$17}-cell-today`]: d.isSame(today, "day"),
|
|
9659
9663
|
[`${classPrefix$17}-cell-selected`]: isSelect,
|
|
9660
9664
|
[`${classPrefix$17}-cell-selected-begin`]: isBegin,
|
|
@@ -12253,15 +12257,31 @@ const LazyDetector = (props) => {
|
|
|
12253
12257
|
ref
|
|
12254
12258
|
});
|
|
12255
12259
|
};
|
|
12260
|
+
const ImageIcon = () => React$1.createElement("svg", {
|
|
12261
|
+
viewBox: "0 0 48 48",
|
|
12262
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12263
|
+
}, React$1.createElement("path", {
|
|
12264
|
+
d: "M41.396 6.234c1.923 0 3.487 1.574 3.487 3.505v29.14c0 1.937-1.568 3.51-3.491 3.51H6.604c-1.923 0-3.487-1.573-3.487-3.51V9.745c0-1.936 1.564-3.51 3.487-3.51Zm0 2.847H6.604c-.355 0-.654.3-.654.658V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.405 2.405 0 0 1 1.933.752l4.182 4.525 7.58-11.005a2.374 2.374 0 0 1 1.96-1.01c.79 0 1.532.38 1.966 1.01L42.05 34.89V9.74a.664.664 0 0 0-.654-.658Zm-28.305 2.763a3.119 3.119 0 0 1 3.117 3.117 3.119 3.119 0 0 1-3.117 3.117 3.122 3.122 0 0 1-3.117-3.117 3.119 3.119 0 0 1 3.117-3.117Z",
|
|
12265
|
+
fill: "#DBDBDB",
|
|
12266
|
+
fillRule: "nonzero"
|
|
12267
|
+
}));
|
|
12268
|
+
const BrokenImageIcon = () => React$1.createElement("svg", {
|
|
12269
|
+
viewBox: "0 0 48 48",
|
|
12270
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12271
|
+
}, React$1.createElement("path", {
|
|
12272
|
+
d: "M19.233 6.233 17.42 9.08l-10.817.001a.665.665 0 0 0-.647.562l-.007.096V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.415 2.415 0 0 1 1.807.625l.126.127 4.182 4.525 2.267-3.292 5.461 7.841-4.065 7.375H6.604c-1.86 0-3.382-1.47-3.482-3.317l-.005-.192V9.744c0-1.872 1.461-3.405 3.296-3.505l.19-.005h12.63Zm22.163 0c1.86 0 3.382 1.472 3.482 3.314l.005.192v29.14a3.507 3.507 0 0 1-3.3 3.505l-.191.006H27.789l3.63-6.587.06-.119a1.87 1.87 0 0 0-.163-1.853l-6.928-9.949 3.047-4.422a2.374 2.374 0 0 1 1.96-1.01 2.4 2.4 0 0 1 1.86.87l.106.14L42.05 34.89V9.74a.664.664 0 0 0-.654-.658H21.855l1.812-2.848h17.73Zm-28.305 5.611c.794 0 1.52.298 2.07.788l-.843 1.325-.067.114a1.87 1.87 0 0 0 .11 1.959l.848 1.217c-.556.515-1.3.83-2.118.83a3.122 3.122 0 0 1-3.117-3.116 3.119 3.119 0 0 1 3.117-3.117Z",
|
|
12273
|
+
fill: "#DBDBDB",
|
|
12274
|
+
fillRule: "nonzero"
|
|
12275
|
+
}));
|
|
12256
12276
|
const classPrefix$S = `adm-image`;
|
|
12257
12277
|
const defaultProps$H = {
|
|
12258
12278
|
fit: "fill",
|
|
12259
12279
|
placeholder: React$1.createElement("div", {
|
|
12260
12280
|
className: `${classPrefix$S}-tip`
|
|
12261
|
-
}, React$1.createElement(
|
|
12281
|
+
}, React$1.createElement(ImageIcon, null)),
|
|
12262
12282
|
fallback: React$1.createElement("div", {
|
|
12263
12283
|
className: `${classPrefix$S}-tip`
|
|
12264
|
-
}, React$1.createElement(
|
|
12284
|
+
}, React$1.createElement(BrokenImageIcon, null)),
|
|
12265
12285
|
lazy: false
|
|
12266
12286
|
};
|
|
12267
12287
|
const Image$1 = staged((p2) => {
|
|
@@ -14913,9 +14933,6 @@ const ImageUploader = (p2) => {
|
|
|
14913
14933
|
} = useConfig();
|
|
14914
14934
|
const props = mergeProps(defaultProps$t, p2);
|
|
14915
14935
|
const [value, setValue] = usePropsValue(props);
|
|
14916
|
-
const updateValue = useMemoizedFn((updater) => {
|
|
14917
|
-
setValue(updater(value));
|
|
14918
|
-
});
|
|
14919
14936
|
const [tasks, setTasks] = useState([]);
|
|
14920
14937
|
useIsomorphicLayoutEffect(() => {
|
|
14921
14938
|
setTasks((prev) => prev.filter((task) => {
|
|
@@ -14987,7 +15004,7 @@ const ImageUploader = (p2) => {
|
|
|
14987
15004
|
return task;
|
|
14988
15005
|
});
|
|
14989
15006
|
});
|
|
14990
|
-
|
|
15007
|
+
setValue((prev) => {
|
|
14991
15008
|
const newVal = Object.assign({}, result2);
|
|
14992
15009
|
return [...prev, newVal];
|
|
14993
15010
|
});
|
|
@@ -15266,6 +15283,7 @@ const InfiniteScroll = (p2) => {
|
|
|
15266
15283
|
const elementRef = useRef(null);
|
|
15267
15284
|
const [flag, setFlag] = useState({});
|
|
15268
15285
|
const nextFlagRef = useRef(flag);
|
|
15286
|
+
const [scrollParent, setScrollParent] = useState();
|
|
15269
15287
|
const check = useMemoizedFn(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
15270
15288
|
if (nextFlagRef.current !== flag)
|
|
15271
15289
|
return;
|
|
@@ -15277,6 +15295,7 @@ const InfiniteScroll = (p2) => {
|
|
|
15277
15295
|
if (!element.offsetParent)
|
|
15278
15296
|
return;
|
|
15279
15297
|
const parent = getScrollParent(element);
|
|
15298
|
+
setScrollParent(parent);
|
|
15280
15299
|
if (!parent)
|
|
15281
15300
|
return;
|
|
15282
15301
|
const rect = element.getBoundingClientRect();
|
|
@@ -15296,17 +15315,16 @@ const InfiniteScroll = (p2) => {
|
|
|
15296
15315
|
const element = elementRef.current;
|
|
15297
15316
|
if (!element)
|
|
15298
15317
|
return;
|
|
15299
|
-
|
|
15300
|
-
if (!parent)
|
|
15318
|
+
if (!scrollParent)
|
|
15301
15319
|
return;
|
|
15302
15320
|
function onScroll() {
|
|
15303
15321
|
check();
|
|
15304
15322
|
}
|
|
15305
|
-
|
|
15323
|
+
scrollParent.addEventListener("scroll", onScroll);
|
|
15306
15324
|
return () => {
|
|
15307
|
-
|
|
15325
|
+
scrollParent.removeEventListener("scroll", onScroll);
|
|
15308
15326
|
};
|
|
15309
|
-
}, []);
|
|
15327
|
+
}, [scrollParent]);
|
|
15310
15328
|
return withNativeProps(props, React$1.createElement("div", {
|
|
15311
15329
|
className: classPrefix$w,
|
|
15312
15330
|
ref: elementRef
|
|
@@ -16552,20 +16570,14 @@ const SearchBar = forwardRef((p2, ref) => {
|
|
|
16552
16570
|
}
|
|
16553
16571
|
}));
|
|
16554
16572
|
const renderCancelButton = () => {
|
|
16555
|
-
let isShowCancel
|
|
16573
|
+
let isShowCancel;
|
|
16556
16574
|
if (typeof props.showCancelButton === "function") {
|
|
16557
16575
|
isShowCancel = props.showCancelButton(hasFocus, value);
|
|
16558
16576
|
} else {
|
|
16559
16577
|
isShowCancel = props.showCancelButton && hasFocus;
|
|
16560
16578
|
}
|
|
16561
16579
|
return isShowCancel && React$1.createElement("div", {
|
|
16562
|
-
className: `${classPrefix$i}-suffix
|
|
16563
|
-
onMouseDown: (e) => {
|
|
16564
|
-
e.preventDefault();
|
|
16565
|
-
},
|
|
16566
|
-
onTouchStart: (e) => {
|
|
16567
|
-
e.preventDefault();
|
|
16568
|
-
}
|
|
16580
|
+
className: `${classPrefix$i}-suffix`
|
|
16569
16581
|
}, React$1.createElement(Button, {
|
|
16570
16582
|
fill: "none",
|
|
16571
16583
|
className: `${classPrefix$i}-cancel-button`,
|
|
@@ -16576,6 +16588,9 @@ const SearchBar = forwardRef((p2, ref) => {
|
|
|
16576
16588
|
}
|
|
16577
16589
|
(_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
16578
16590
|
(_c = props.onCancel) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
16591
|
+
},
|
|
16592
|
+
onMouseDown: (e) => {
|
|
16593
|
+
e.preventDefault();
|
|
16579
16594
|
}
|
|
16580
16595
|
}, props.cancelText));
|
|
16581
16596
|
};
|