antd-mobile 5.1.0 → 5.2.2
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/README.md +9 -1
- package/2x/cjs/components/calendar/calendar.d.ts +11 -2
- package/2x/cjs/components/calendar/calendar.js +32 -10
- package/2x/cjs/components/calendar/index.d.ts +1 -1
- package/2x/cjs/components/capsule-tabs/capsule-tabs.d.ts +1 -0
- package/2x/cjs/components/capsule-tabs/capsule-tabs.js +14 -17
- package/2x/cjs/components/cascade-picker/prompt.d.ts +2 -1
- package/2x/cjs/components/collapse/collapse.js +5 -3
- package/2x/cjs/components/date-picker/date-picker.js +11 -1
- package/2x/cjs/components/dialog/clear.d.ts +1 -0
- package/2x/cjs/components/dialog/clear.js +14 -0
- package/2x/cjs/components/dialog/dialog.css +27 -18
- package/2x/cjs/components/dialog/dialog.js +39 -42
- package/2x/cjs/components/dialog/index.d.ts +2 -0
- package/2x/cjs/components/dialog/index.js +4 -1
- package/2x/cjs/components/dialog/show.d.ts +1 -0
- package/2x/cjs/components/dialog/show.js +23 -11
- package/2x/cjs/components/dropdown/dropdown.css +2 -1
- package/2x/cjs/components/dropdown/item.js +2 -2
- package/2x/cjs/components/form/form.css +12 -0
- package/2x/cjs/components/form/form.d.ts +4 -4
- package/2x/cjs/components/form/index.css +12 -0
- package/2x/cjs/components/form/index.d.ts +3 -3
- package/2x/cjs/components/image-viewer/image-viewer.d.ts +1 -1
- package/2x/cjs/components/image-viewer/index.d.ts +1 -1
- package/2x/cjs/components/input/input.d.ts +2 -2
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.d.ts +1 -0
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.js +14 -17
- package/2x/cjs/components/mask/mask.js +2 -2
- package/2x/cjs/components/modal/clear.d.ts +1 -0
- package/2x/cjs/components/modal/clear.js +14 -0
- package/2x/cjs/components/modal/index.d.ts +2 -0
- package/2x/cjs/components/modal/index.js +4 -1
- package/2x/cjs/components/modal/modal.css +27 -21
- package/2x/cjs/components/modal/modal.js +39 -36
- package/2x/cjs/components/modal/show.d.ts +1 -0
- package/2x/cjs/components/modal/show.js +23 -11
- package/2x/cjs/components/passcode-input/passcode-input.d.ts +1 -1
- package/2x/cjs/components/picker/prompt.d.ts +2 -2
- package/2x/cjs/components/picker-view/picker-view.css +0 -10
- package/2x/cjs/components/picker-view/wheel.js +7 -14
- package/2x/cjs/components/popover/arrow.js +1 -2
- package/2x/cjs/components/popover/index.d.ts +3 -3
- package/2x/cjs/components/popover/popover-menu.d.ts +1 -1
- package/2x/cjs/components/popover/popover.d.ts +1 -1
- package/2x/cjs/components/popup/popup.js +2 -2
- package/2x/cjs/components/search-bar/search-bar.js +1 -0
- package/2x/cjs/components/selector/selector.d.ts +3 -1
- package/2x/cjs/components/stepper/stepper.d.ts +12 -2
- package/2x/cjs/components/stepper/stepper.js +43 -16
- package/2x/cjs/components/swiper/index.d.ts +3 -3
- package/2x/cjs/components/swiper/swiper.d.ts +3 -3
- package/2x/cjs/components/switch/spin-icon.d.ts +3 -0
- package/2x/cjs/components/switch/spin-icon.js +37 -0
- package/2x/cjs/components/switch/switch.css +1 -1
- package/2x/cjs/components/switch/switch.js +4 -6
- package/2x/cjs/components/tabs/tabs.d.ts +1 -0
- package/2x/cjs/components/tabs/tabs.js +17 -19
- package/2x/cjs/components/virtual-input/virtual-input.d.ts +2 -2
- package/2x/cjs/utils/measure-css-length.d.ts +1 -0
- package/2x/cjs/utils/measure-css-length.js +28 -0
- package/2x/cjs/utils/native-props.d.ts +1 -1
- package/2x/cjs/utils/render-to-container.d.ts +1 -1
- package/2x/cjs/utils/should-render.d.ts +10 -0
- package/{cjs/utils/use-should-render.js → 2x/cjs/utils/should-render.js} +8 -0
- package/2x/cjs/utils/use-drag-and-pinch.d.ts +1 -2
- package/2x/cjs/utils/use-isomorphic-update-layout-effect.js +1 -3
- package/2x/cjs/utils/use-props-value.d.ts +1 -1
- package/2x/cjs/utils/use-tab-list-scroll.js +3 -1
- package/2x/cjs/utils/use-touch.d.ts +0 -1
- package/2x/cjs/utils/validate.js +1 -1
- package/2x/cjs/utils/with-stop-propagation.d.ts +1 -1
- package/2x/es/components/calendar/calendar.d.ts +11 -2
- package/2x/es/components/calendar/calendar.js +33 -9
- package/2x/es/components/calendar/index.d.ts +1 -1
- package/2x/es/components/capsule-tabs/capsule-tabs.d.ts +1 -0
- package/2x/es/components/capsule-tabs/capsule-tabs.js +13 -17
- package/2x/es/components/cascade-picker/prompt.d.ts +2 -1
- package/2x/es/components/collapse/collapse.js +4 -3
- package/2x/es/components/date-picker/date-picker.js +10 -1
- package/2x/es/components/dialog/clear.d.ts +1 -0
- package/2x/es/components/dialog/clear.js +6 -0
- package/2x/es/components/dialog/dialog.css +27 -18
- package/2x/es/components/dialog/dialog.js +37 -41
- package/2x/es/components/dialog/index.d.ts +2 -0
- package/2x/es/components/dialog/index.js +3 -1
- package/2x/es/components/dialog/show.d.ts +1 -0
- package/2x/es/components/dialog/show.js +20 -11
- package/2x/es/components/dropdown/dropdown.css +2 -1
- package/2x/es/components/dropdown/item.js +1 -1
- package/2x/es/components/form/form.css +12 -0
- package/2x/es/components/form/form.d.ts +4 -4
- package/2x/es/components/form/index.css +12 -0
- package/2x/es/components/form/index.d.ts +3 -3
- package/2x/es/components/image-viewer/image-viewer.d.ts +1 -1
- package/2x/es/components/image-viewer/index.d.ts +1 -1
- package/2x/es/components/input/input.d.ts +2 -2
- package/2x/es/components/jumbo-tabs/jumbo-tabs.d.ts +1 -0
- package/2x/es/components/jumbo-tabs/jumbo-tabs.js +13 -17
- package/2x/es/components/mask/mask.js +1 -1
- package/2x/es/components/modal/clear.d.ts +1 -0
- package/2x/es/components/modal/clear.js +6 -0
- package/2x/es/components/modal/index.d.ts +2 -0
- package/2x/es/components/modal/index.js +3 -1
- package/2x/es/components/modal/modal.css +27 -21
- package/2x/es/components/modal/modal.js +37 -36
- package/2x/es/components/modal/show.d.ts +1 -0
- package/2x/es/components/modal/show.js +20 -11
- package/2x/es/components/passcode-input/passcode-input.d.ts +1 -1
- package/2x/es/components/picker/prompt.d.ts +2 -2
- package/2x/es/components/picker-view/picker-view.css +0 -10
- package/2x/es/components/picker-view/wheel.js +7 -14
- package/2x/es/components/popover/arrow.js +1 -2
- package/2x/es/components/popover/index.d.ts +3 -3
- package/2x/es/components/popover/popover-menu.d.ts +1 -1
- package/2x/es/components/popover/popover.d.ts +1 -1
- package/2x/es/components/popup/popup.js +1 -1
- package/2x/es/components/search-bar/search-bar.js +1 -0
- package/2x/es/components/selector/selector.d.ts +3 -1
- package/2x/es/components/stepper/stepper.d.ts +12 -2
- package/2x/es/components/stepper/stepper.js +43 -16
- package/2x/es/components/swiper/index.d.ts +3 -3
- package/2x/es/components/swiper/swiper.d.ts +3 -3
- package/2x/es/components/switch/spin-icon.d.ts +3 -0
- package/2x/es/components/switch/spin-icon.js +23 -0
- package/2x/es/components/switch/switch.css +1 -1
- package/2x/es/components/switch/switch.js +3 -5
- package/2x/es/components/tabs/tabs.d.ts +1 -0
- package/2x/es/components/tabs/tabs.js +16 -20
- package/2x/es/components/virtual-input/virtual-input.d.ts +2 -2
- package/2x/es/utils/measure-css-length.d.ts +1 -0
- package/2x/es/utils/measure-css-length.js +19 -0
- package/2x/es/utils/native-props.d.ts +1 -1
- package/2x/es/utils/render-to-container.d.ts +1 -1
- package/2x/es/utils/should-render.d.ts +10 -0
- package/2x/es/utils/{use-should-render.js → should-render.js} +4 -0
- package/2x/es/utils/use-drag-and-pinch.d.ts +1 -2
- package/2x/es/utils/use-isomorphic-update-layout-effect.js +1 -2
- package/2x/es/utils/use-props-value.d.ts +1 -1
- package/2x/es/utils/use-tab-list-scroll.js +3 -2
- package/2x/es/utils/use-touch.d.ts +0 -1
- package/2x/es/utils/validate.js +1 -1
- package/2x/es/utils/with-stop-propagation.d.ts +1 -1
- package/2x/package.json +4 -4
- package/README.md +9 -1
- package/cjs/components/calendar/calendar.d.ts +11 -2
- package/cjs/components/calendar/calendar.js +32 -10
- package/cjs/components/calendar/index.d.ts +1 -1
- package/cjs/components/capsule-tabs/capsule-tabs.d.ts +1 -0
- package/cjs/components/capsule-tabs/capsule-tabs.js +14 -17
- package/cjs/components/cascade-picker/prompt.d.ts +2 -1
- package/cjs/components/collapse/collapse.js +5 -3
- package/cjs/components/date-picker/date-picker.js +11 -1
- package/cjs/components/dialog/clear.d.ts +1 -0
- package/cjs/components/dialog/clear.js +14 -0
- package/cjs/components/dialog/dialog.css +26 -18
- package/cjs/components/dialog/dialog.js +39 -42
- package/cjs/components/dialog/index.d.ts +2 -0
- package/cjs/components/dialog/index.js +4 -1
- package/cjs/components/dialog/show.d.ts +1 -0
- package/cjs/components/dialog/show.js +23 -11
- package/cjs/components/dropdown/dropdown.css +2 -1
- package/cjs/components/dropdown/item.js +2 -2
- package/cjs/components/form/form.css +11 -0
- package/cjs/components/form/form.d.ts +4 -4
- package/cjs/components/form/index.css +11 -0
- package/cjs/components/form/index.d.ts +3 -3
- package/cjs/components/image-viewer/image-viewer.d.ts +1 -1
- package/cjs/components/image-viewer/index.d.ts +1 -1
- package/cjs/components/input/input.d.ts +2 -2
- package/cjs/components/jumbo-tabs/jumbo-tabs.d.ts +1 -0
- package/cjs/components/jumbo-tabs/jumbo-tabs.js +14 -17
- package/cjs/components/mask/mask.js +2 -2
- package/cjs/components/modal/clear.d.ts +1 -0
- package/cjs/components/modal/clear.js +14 -0
- package/cjs/components/modal/index.d.ts +2 -0
- package/cjs/components/modal/index.js +4 -1
- package/cjs/components/modal/modal.css +26 -20
- package/cjs/components/modal/modal.js +39 -36
- package/cjs/components/modal/show.d.ts +1 -0
- package/cjs/components/modal/show.js +23 -11
- package/cjs/components/passcode-input/passcode-input.d.ts +1 -1
- package/cjs/components/picker/prompt.d.ts +2 -2
- package/cjs/components/picker-view/picker-view.css +0 -9
- package/cjs/components/picker-view/wheel.js +7 -14
- package/cjs/components/popover/arrow.js +1 -2
- package/cjs/components/popover/index.d.ts +3 -3
- package/cjs/components/popover/popover-menu.d.ts +1 -1
- package/cjs/components/popover/popover.d.ts +1 -1
- package/cjs/components/popup/popup.js +2 -2
- package/cjs/components/search-bar/search-bar.js +1 -0
- package/cjs/components/selector/selector.d.ts +3 -1
- package/cjs/components/stepper/stepper.d.ts +12 -2
- package/cjs/components/stepper/stepper.js +43 -16
- package/cjs/components/swiper/index.d.ts +3 -3
- package/cjs/components/swiper/swiper.d.ts +3 -3
- package/cjs/components/switch/spin-icon.d.ts +3 -0
- package/cjs/components/switch/spin-icon.js +37 -0
- package/cjs/components/switch/switch.css +1 -1
- package/cjs/components/switch/switch.js +4 -6
- package/cjs/components/tabs/tabs.d.ts +1 -0
- package/cjs/components/tabs/tabs.js +17 -19
- package/cjs/components/virtual-input/virtual-input.d.ts +2 -2
- package/cjs/utils/measure-css-length.d.ts +1 -0
- package/cjs/utils/measure-css-length.js +28 -0
- package/cjs/utils/native-props.d.ts +1 -1
- package/cjs/utils/render-to-container.d.ts +1 -1
- package/cjs/utils/should-render.d.ts +10 -0
- package/{2x/cjs/utils/use-should-render.js → cjs/utils/should-render.js} +8 -0
- package/cjs/utils/use-drag-and-pinch.d.ts +1 -2
- package/cjs/utils/use-isomorphic-update-layout-effect.js +1 -3
- package/cjs/utils/use-props-value.d.ts +1 -1
- package/cjs/utils/use-tab-list-scroll.js +3 -1
- package/cjs/utils/use-touch.d.ts +0 -1
- package/cjs/utils/validate.js +1 -1
- package/cjs/utils/with-stop-propagation.d.ts +1 -1
- package/es/components/calendar/calendar.d.ts +11 -2
- package/es/components/calendar/calendar.js +33 -9
- package/es/components/calendar/index.d.ts +1 -1
- package/es/components/capsule-tabs/capsule-tabs.d.ts +1 -0
- package/es/components/capsule-tabs/capsule-tabs.js +13 -17
- package/es/components/cascade-picker/prompt.d.ts +2 -1
- package/es/components/collapse/collapse.js +4 -3
- package/es/components/date-picker/date-picker.js +10 -1
- package/es/components/dialog/clear.d.ts +1 -0
- package/es/components/dialog/clear.js +6 -0
- package/es/components/dialog/dialog.css +26 -18
- package/es/components/dialog/dialog.js +37 -41
- package/es/components/dialog/index.d.ts +2 -0
- package/es/components/dialog/index.js +3 -1
- package/es/components/dialog/show.d.ts +1 -0
- package/es/components/dialog/show.js +20 -11
- package/es/components/dropdown/dropdown.css +2 -1
- package/es/components/dropdown/item.js +1 -1
- package/es/components/form/form.css +11 -0
- package/es/components/form/form.d.ts +4 -4
- package/es/components/form/index.css +11 -0
- package/es/components/form/index.d.ts +3 -3
- package/es/components/image-viewer/image-viewer.d.ts +1 -1
- package/es/components/image-viewer/index.d.ts +1 -1
- package/es/components/input/input.d.ts +2 -2
- package/es/components/jumbo-tabs/jumbo-tabs.d.ts +1 -0
- package/es/components/jumbo-tabs/jumbo-tabs.js +13 -17
- package/es/components/mask/mask.js +1 -1
- package/es/components/modal/clear.d.ts +1 -0
- package/es/components/modal/clear.js +6 -0
- package/es/components/modal/index.d.ts +2 -0
- package/es/components/modal/index.js +3 -1
- package/es/components/modal/modal.css +26 -20
- package/es/components/modal/modal.js +37 -36
- package/es/components/modal/show.d.ts +1 -0
- package/es/components/modal/show.js +20 -11
- package/es/components/passcode-input/passcode-input.d.ts +1 -1
- package/es/components/picker/prompt.d.ts +2 -2
- package/es/components/picker-view/picker-view.css +0 -9
- package/es/components/picker-view/wheel.js +7 -14
- package/es/components/popover/arrow.js +1 -2
- package/es/components/popover/index.d.ts +3 -3
- package/es/components/popover/popover-menu.d.ts +1 -1
- package/es/components/popover/popover.d.ts +1 -1
- package/es/components/popup/popup.js +1 -1
- package/es/components/search-bar/search-bar.js +1 -0
- package/es/components/selector/selector.d.ts +3 -1
- package/es/components/stepper/stepper.d.ts +12 -2
- package/es/components/stepper/stepper.js +43 -16
- package/es/components/swiper/index.d.ts +3 -3
- package/es/components/swiper/swiper.d.ts +3 -3
- package/es/components/switch/spin-icon.d.ts +3 -0
- package/es/components/switch/spin-icon.js +23 -0
- package/es/components/switch/switch.css +1 -1
- package/es/components/switch/switch.js +3 -5
- package/es/components/tabs/tabs.d.ts +1 -0
- package/es/components/tabs/tabs.js +16 -20
- package/es/components/virtual-input/virtual-input.d.ts +2 -2
- package/es/utils/measure-css-length.d.ts +1 -0
- package/es/utils/measure-css-length.js +19 -0
- package/es/utils/native-props.d.ts +1 -1
- package/es/utils/render-to-container.d.ts +1 -1
- package/es/utils/should-render.d.ts +10 -0
- package/es/utils/{use-should-render.js → should-render.js} +4 -0
- package/es/utils/use-drag-and-pinch.d.ts +1 -2
- package/es/utils/use-isomorphic-update-layout-effect.js +1 -2
- package/es/utils/use-props-value.d.ts +1 -1
- package/es/utils/use-tab-list-scroll.js +3 -2
- package/es/utils/use-touch.d.ts +0 -1
- package/es/utils/validate.js +1 -1
- package/es/utils/with-stop-propagation.d.ts +1 -1
- package/package.json +4 -4
- package/umd/antd-mobile.js +1 -1
- package/2x/assets/spin.svg +0 -12
- package/2x/cjs/assets/spin.svg +0 -12
- package/2x/cjs/utils/use-should-render.d.ts +0 -1
- package/2x/es/assets/spin.svg +0 -12
- package/2x/es/utils/use-should-render.d.ts +0 -1
- package/assets/spin.svg +0 -12
- package/cjs/assets/spin.svg +0 -12
- package/cjs/utils/use-should-render.d.ts +0 -1
- package/es/assets/spin.svg +0 -12
- package/es/utils/use-should-render.d.ts +0 -1
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
.adm-form {
|
|
2
|
+
--border-inner: solid 2px var(--adm-border-color);
|
|
3
|
+
--border-top: solid 2px var(--adm-border-color);
|
|
4
|
+
--border-bottom: solid 2px var(--adm-border-color);
|
|
5
|
+
---border-inner: var(--border-inner);
|
|
6
|
+
---border-top: var(--border-top);
|
|
7
|
+
---border-bottom: var(--border-bottom);
|
|
8
|
+
}
|
|
9
|
+
|
|
1
10
|
.adm-form .adm-list.adm-list {
|
|
2
11
|
--padding-left: 32px;
|
|
3
12
|
--padding-right: 24px;
|
|
13
|
+
--border-inner: var(---border-inner);
|
|
14
|
+
--border-top: var(---border-top);
|
|
15
|
+
--border-bottom: var(---border-bottom);
|
|
4
16
|
}
|
|
5
17
|
|
|
6
18
|
.adm-form .adm-form-footer {
|
|
@@ -6,11 +6,11 @@ export type { FormProps, FormInstance } from './form';
|
|
|
6
6
|
export type { FormItemProps } from './form-item';
|
|
7
7
|
export type { FormSubscribeProps } from './form-subscribe';
|
|
8
8
|
export type { ValidateMessages, FieldData, NamePath, } from 'rc-field-form/es/interface';
|
|
9
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<import("rc-field-form").FormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & import("../../utils/native-props").NativeProps<
|
|
9
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<import("rc-field-form").FormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & import("../../utils/native-props").NativeProps<"--border-inner" | "--border-top" | "--border-bottom"> & Partial<import("./context").FormContextType> & {
|
|
10
10
|
footer?: import("react").ReactNode;
|
|
11
|
-
layout?:
|
|
11
|
+
layout?: FormLayout | undefined;
|
|
12
12
|
mode?: "default" | "card" | undefined;
|
|
13
|
-
} & import("react").RefAttributes<
|
|
13
|
+
} & import("react").RefAttributes<import("./form").FormInstance>> & {
|
|
14
14
|
Item: import("react").FC<import("./form-item").FormItemProps>;
|
|
15
15
|
Subscribe: import("react").VFC<import("./form-subscribe").FormSubscribeProps>;
|
|
16
16
|
Header: import("react").FC<{}>;
|
|
@@ -16,7 +16,7 @@ export declare type MultiImageViewerProps = Omit<ImageViewerProps, 'image'> & {
|
|
|
16
16
|
defaultIndex?: number;
|
|
17
17
|
onIndexChange?: (index: number) => void;
|
|
18
18
|
};
|
|
19
|
-
export declare const MultiImageViewer: React.ForwardRefExoticComponent<
|
|
19
|
+
export declare const MultiImageViewer: React.ForwardRefExoticComponent<Omit<ImageViewerProps, "image"> & {
|
|
20
20
|
images?: string[] | undefined;
|
|
21
21
|
defaultIndex?: number | undefined;
|
|
22
22
|
onIndexChange?: ((index: number) => void) | undefined;
|
|
@@ -4,7 +4,7 @@ import { showMultiImageViewer, showImageViewer, clearImageViewer } from './metho
|
|
|
4
4
|
export type { ImageViewerProps, MultiImageViewerProps, MultiImageViewerRef, } from './image-viewer';
|
|
5
5
|
export type { ImageViewerHandler } from './methods';
|
|
6
6
|
declare const _default: import("react").FC<import("./image-viewer").ImageViewerProps> & {
|
|
7
|
-
Multi: import("react").ForwardRefExoticComponent<
|
|
7
|
+
Multi: import("react").ForwardRefExoticComponent<Omit<import("./image-viewer").ImageViewerProps, "image"> & {
|
|
8
8
|
images?: string[] | undefined;
|
|
9
9
|
defaultIndex?: number | undefined;
|
|
10
10
|
onIndexChange?: ((index: number) => void) | undefined;
|
|
@@ -21,7 +21,7 @@ export declare type InputRef = {
|
|
|
21
21
|
focus: () => void;
|
|
22
22
|
blur: () => void;
|
|
23
23
|
};
|
|
24
|
-
export declare const Input: React.ForwardRefExoticComponent<Pick<
|
|
24
|
+
export declare const Input: React.ForwardRefExoticComponent<Pick<NativeInputProps, "pattern" | "type" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "maxLength" | "minLength"> & {
|
|
25
25
|
value?: string | undefined;
|
|
26
26
|
defaultValue?: string | undefined;
|
|
27
27
|
onChange?: ((val: string) => void) | undefined;
|
|
@@ -32,7 +32,7 @@ export declare const Input: React.ForwardRefExoticComponent<Pick<React.DetailedH
|
|
|
32
32
|
onClear?: (() => void) | undefined;
|
|
33
33
|
id?: string | undefined;
|
|
34
34
|
onEnterPress?: ((e: React.KeyboardEvent<HTMLInputElement>) => void) | undefined;
|
|
35
|
-
enterKeyHint?: "
|
|
35
|
+
enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
36
36
|
min?: number | undefined;
|
|
37
37
|
max?: number | undefined;
|
|
38
38
|
} & NativeProps<"--color" | "--font-size" | "--placeholder-color" | "--text-align"> & React.RefAttributes<InputRef>>;
|
|
@@ -21,6 +21,8 @@ var _useTabListScroll = require("../../utils/use-tab-list-scroll");
|
|
|
21
21
|
|
|
22
22
|
var _scrollMask = _interopRequireDefault(require("../scroll-mask"));
|
|
23
23
|
|
|
24
|
+
var _shouldRender = require("../../utils/should-render");
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -114,23 +116,18 @@ const JumboTabs = props => {
|
|
|
114
116
|
return null;
|
|
115
117
|
}
|
|
116
118
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
}, pane.props.children);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return null;
|
|
119
|
+
const active = pane.key === activeKey;
|
|
120
|
+
return _react.default.createElement(_shouldRender.ShouldRender, {
|
|
121
|
+
key: pane.key,
|
|
122
|
+
active: active,
|
|
123
|
+
forceRender: pane.props.forceRender,
|
|
124
|
+
destroyOnClose: pane.props.destroyOnClose
|
|
125
|
+
}, _react.default.createElement("div", {
|
|
126
|
+
className: `${classPrefix}-content`,
|
|
127
|
+
style: {
|
|
128
|
+
display: active ? 'block' : 'none'
|
|
129
|
+
}
|
|
130
|
+
}, pane.props.children));
|
|
134
131
|
})));
|
|
135
132
|
};
|
|
136
133
|
|
|
@@ -21,7 +21,7 @@ var _withDefaultProps = require("../../utils/with-default-props");
|
|
|
21
21
|
|
|
22
22
|
var _configProvider = require("../config-provider");
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _shouldRender = require("../../utils/should-render");
|
|
25
25
|
|
|
26
26
|
var _withStopPropagation = require("../../utils/with-stop-propagation");
|
|
27
27
|
|
|
@@ -89,7 +89,7 @@ const Mask = p => {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
const shouldRender = (0,
|
|
92
|
+
const shouldRender = (0, _shouldRender.useShouldRender)(active, props.forceRender, props.destroyOnClose);
|
|
93
93
|
const node = (0, _withStopPropagation.withStopPropagation)(props.stopPropagation, (0, _nativeProps.withNativeProps)(props, _react.default.createElement(_web.animated.div, {
|
|
94
94
|
className: classPrefix,
|
|
95
95
|
ref: ref,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function clear(): void;
|
|
@@ -3,6 +3,7 @@ import './modal.less';
|
|
|
3
3
|
import { show } from './show';
|
|
4
4
|
import { alert } from './alert';
|
|
5
5
|
import { confirm } from './confirm';
|
|
6
|
+
import { clear } from './clear';
|
|
6
7
|
export type { ModalProps } from './modal';
|
|
7
8
|
export type { Action } from './modal-action-button';
|
|
8
9
|
export type { ModalShowProps, ModalShowRef } from './show';
|
|
@@ -12,5 +13,6 @@ declare const _default: import("react").FC<import("./modal").ModalProps> & {
|
|
|
12
13
|
show: typeof show;
|
|
13
14
|
alert: typeof alert;
|
|
14
15
|
confirm: typeof confirm;
|
|
16
|
+
clear: typeof clear;
|
|
15
17
|
};
|
|
16
18
|
export default _default;
|
|
@@ -13,6 +13,8 @@ var _alert = require("./alert");
|
|
|
13
13
|
|
|
14
14
|
var _confirm = require("./confirm");
|
|
15
15
|
|
|
16
|
+
var _clear = require("./clear");
|
|
17
|
+
|
|
16
18
|
var _attachPropertiesToComponent = require("../../utils/attach-properties-to-component");
|
|
17
19
|
|
|
18
20
|
var _modal2 = require("./modal");
|
|
@@ -20,7 +22,8 @@ var _modal2 = require("./modal");
|
|
|
20
22
|
var _default = (0, _attachPropertiesToComponent.attachPropertiesToComponent)(_modal2.Modal, {
|
|
21
23
|
show: _show.show,
|
|
22
24
|
alert: _alert.alert,
|
|
23
|
-
confirm: _confirm.confirm
|
|
25
|
+
confirm: _confirm.confirm,
|
|
26
|
+
clear: _clear.clear
|
|
24
27
|
});
|
|
25
28
|
|
|
26
29
|
exports.default = _default;
|
|
@@ -19,56 +19,61 @@
|
|
|
19
19
|
transform: translate(-50%, -50%);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.adm-modal-
|
|
22
|
+
.adm-modal-body {
|
|
23
23
|
width: 100%;
|
|
24
24
|
max-height: 70vh;
|
|
25
25
|
box-sizing: border-box;
|
|
26
26
|
font-size: 28px;
|
|
27
27
|
background-color: white;
|
|
28
28
|
border-radius: 16px;
|
|
29
|
-
overflow
|
|
30
|
-
overflow-y: auto;
|
|
29
|
+
overflow: hidden;
|
|
31
30
|
display: flex;
|
|
32
31
|
flex-direction: column;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
.adm-modal-
|
|
34
|
+
.adm-modal-body > * {
|
|
36
35
|
flex: none;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
.adm-modal-
|
|
38
|
+
.adm-modal-body > .adm-modal-content {
|
|
40
39
|
flex: auto;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
.adm-modal-
|
|
44
|
-
padding: 40px
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
42
|
+
.adm-modal-body:not(.adm-modal-with-image) {
|
|
43
|
+
padding-top: 40px;
|
|
47
44
|
}
|
|
48
45
|
|
|
49
|
-
.adm-modal-
|
|
50
|
-
margin-
|
|
46
|
+
.adm-modal-body .adm-modal-image-container {
|
|
47
|
+
margin-bottom: 24px;
|
|
48
|
+
max-height: 40vh;
|
|
49
|
+
overflow-y: scroll;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
.adm-modal-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
.adm-modal-body .adm-modal-header {
|
|
53
|
+
margin-bottom: 16px;
|
|
54
|
+
padding: 0 24px;
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
.adm-modal-
|
|
57
|
+
.adm-modal-body .adm-modal-title {
|
|
58
|
+
margin-bottom: 16px;
|
|
59
|
+
padding: 0 24px;
|
|
59
60
|
font-weight: bold;
|
|
60
61
|
font-size: 36px;
|
|
61
62
|
line-height: 50px;
|
|
62
63
|
text-align: center;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
.adm-modal-
|
|
66
|
+
.adm-modal-body .adm-modal-content {
|
|
67
|
+
padding: 0 24px 24px;
|
|
68
|
+
max-height: 70vh;
|
|
69
|
+
overflow-x: hidden;
|
|
70
|
+
overflow-y: auto;
|
|
66
71
|
font-size: 30px;
|
|
67
72
|
line-height: 1.4;
|
|
68
73
|
color: #333;
|
|
69
74
|
}
|
|
70
75
|
|
|
71
|
-
.adm-modal-
|
|
76
|
+
.adm-modal-body .adm-modal-close {
|
|
72
77
|
position: absolute;
|
|
73
78
|
right: 16px;
|
|
74
79
|
top: 16px;
|
|
@@ -82,6 +87,11 @@
|
|
|
82
87
|
padding: 16px 24px 24px;
|
|
83
88
|
}
|
|
84
89
|
|
|
90
|
+
.adm-modal-footer-empty {
|
|
91
|
+
padding: 0;
|
|
92
|
+
height: 16px;
|
|
93
|
+
}
|
|
94
|
+
|
|
85
95
|
.adm-modal-footer.adm-space {
|
|
86
96
|
--gap-vertical: 40px;
|
|
87
97
|
}
|
|
@@ -102,8 +112,4 @@
|
|
|
102
112
|
|
|
103
113
|
.adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary):active {
|
|
104
114
|
opacity: 0.7;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.adm-modal-image-container {
|
|
108
|
-
overflow-y: auto;
|
|
109
115
|
}
|
|
@@ -81,49 +81,29 @@ const Modal = p => {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
const [active, setActive] = (0, _react.useState)(props.visible);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
}, _react.default.createElement(_mask.default, {
|
|
90
|
-
visible: props.visible,
|
|
91
|
-
onMaskClick: props.closeOnMaskClick ? props.onClose : undefined,
|
|
92
|
-
style: props.maskStyle,
|
|
93
|
-
className: (0, _classnames.default)(`${classPrefix}-mask`, props.maskClassName)
|
|
94
|
-
}), _react.default.createElement("div", {
|
|
95
|
-
className: `${classPrefix}-wrap`,
|
|
96
|
-
style: {
|
|
97
|
-
pointerEvents: props.visible ? 'unset' : 'none'
|
|
98
|
-
}
|
|
99
|
-
}, _react.default.createElement(_web.animated.div, {
|
|
100
|
-
style: Object.assign({}, style),
|
|
101
|
-
onClick: e => e.stopPropagation(),
|
|
102
|
-
className: `${classPrefix}-main`
|
|
84
|
+
|
|
85
|
+
const body = _react.default.createElement("div", {
|
|
86
|
+
className: (0, _classnames.default)(cls('body'), props.image && cls('with-image'), props.bodyClassName),
|
|
87
|
+
style: props.bodyStyle
|
|
103
88
|
}, props.showCloseButton && _react.default.createElement("a", {
|
|
104
|
-
className: (0, _classnames.default)(
|
|
89
|
+
className: (0, _classnames.default)(cls('close'), 'adm-plain-anchor'),
|
|
105
90
|
onClick: props.onClose
|
|
106
91
|
}, _react.default.createElement(_antdMobileIcons.CloseOutline, null)), !!props.image && _react.default.createElement("div", {
|
|
107
|
-
className:
|
|
92
|
+
className: cls('image-container')
|
|
108
93
|
}, _react.default.createElement(_image.default, {
|
|
109
94
|
src: props.image,
|
|
110
95
|
alt: 'modal header image',
|
|
111
96
|
width: '100%'
|
|
112
|
-
})), _react.default.createElement("div", {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}, props.header)), !!props.title && _react.default.createElement("div", {
|
|
120
|
-
className: `${classPrefix}-body-title`
|
|
121
|
-
}, props.title), !!props.content && _react.default.createElement("div", {
|
|
122
|
-
className: `${classPrefix}-body-content`
|
|
123
|
-
}, typeof props.content === 'string' ? _react.default.createElement(_autoCenter.default, null, props.content) : props.content)), _react.default.createElement(_space.default, {
|
|
97
|
+
})), !!props.header && _react.default.createElement("div", {
|
|
98
|
+
className: cls('header')
|
|
99
|
+
}, _react.default.createElement(_autoCenter.default, null, props.header)), !!props.title && _react.default.createElement("div", {
|
|
100
|
+
className: cls('title')
|
|
101
|
+
}, props.title), _react.default.createElement("div", {
|
|
102
|
+
className: cls('content')
|
|
103
|
+
}, typeof props.content === 'string' ? _react.default.createElement(_autoCenter.default, null, props.content) : props.content), _react.default.createElement(_space.default, {
|
|
124
104
|
direction: 'vertical',
|
|
125
105
|
block: true,
|
|
126
|
-
className:
|
|
106
|
+
className: (0, _classnames.default)(cls('footer'), props.actions.length === 0 && cls('footer-empty'))
|
|
127
107
|
}, props.actions.map((action, index) => {
|
|
128
108
|
return _react.default.createElement(_modalActionButton.ModalActionButton, {
|
|
129
109
|
key: action.key,
|
|
@@ -138,8 +118,31 @@ const Modal = p => {
|
|
|
138
118
|
}
|
|
139
119
|
})
|
|
140
120
|
});
|
|
141
|
-
})))
|
|
121
|
+
})));
|
|
122
|
+
|
|
123
|
+
const node = (0, _withStopPropagation.withStopPropagation)(props.stopPropagation, (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
124
|
+
className: cls(),
|
|
125
|
+
style: {
|
|
126
|
+
display: active ? 'unset' : 'none'
|
|
127
|
+
}
|
|
128
|
+
}, _react.default.createElement(_mask.default, {
|
|
129
|
+
visible: props.visible,
|
|
130
|
+
onMaskClick: props.closeOnMaskClick ? props.onClose : undefined,
|
|
131
|
+
style: props.maskStyle,
|
|
132
|
+
className: (0, _classnames.default)(cls('mask'), props.maskClassName)
|
|
133
|
+
}), _react.default.createElement("div", {
|
|
134
|
+
className: cls('wrap'),
|
|
135
|
+
style: {
|
|
136
|
+
pointerEvents: props.visible ? 'unset' : 'none'
|
|
137
|
+
}
|
|
138
|
+
}, _react.default.createElement(_web.animated.div, {
|
|
139
|
+
style: style
|
|
140
|
+
}, body)))));
|
|
142
141
|
return (0, _renderToContainer.renderToContainer)(props.getContainer, node);
|
|
143
142
|
};
|
|
144
143
|
|
|
145
|
-
exports.Modal = Modal;
|
|
144
|
+
exports.Modal = Modal;
|
|
145
|
+
|
|
146
|
+
function cls(name = '') {
|
|
147
|
+
return 'adm-modal' + (name && '-') + name;
|
|
148
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.closeFnSet = void 0;
|
|
6
7
|
exports.show = show;
|
|
7
8
|
|
|
8
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -15,6 +16,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
16
|
|
|
16
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
18
|
|
|
19
|
+
const closeFnSet = new Set();
|
|
20
|
+
exports.closeFnSet = closeFnSet;
|
|
21
|
+
|
|
18
22
|
function show(props) {
|
|
19
23
|
const Wrapper = (0, _react.forwardRef)((_, ref) => {
|
|
20
24
|
const [visible, setVisible] = (0, _react.useState)(false);
|
|
@@ -32,26 +36,34 @@ function show(props) {
|
|
|
32
36
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
33
37
|
close: handleClose
|
|
34
38
|
}));
|
|
39
|
+
|
|
40
|
+
function handleAfterClose() {
|
|
41
|
+
var _a;
|
|
42
|
+
|
|
43
|
+
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
44
|
+
unmount();
|
|
45
|
+
closeFnSet.delete(close);
|
|
46
|
+
}
|
|
47
|
+
|
|
35
48
|
return _react.default.createElement(_modal.Modal, Object.assign({}, props, {
|
|
36
49
|
visible: visible,
|
|
37
50
|
onClose: handleClose,
|
|
38
|
-
afterClose:
|
|
39
|
-
var _a;
|
|
40
|
-
|
|
41
|
-
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
42
|
-
unmount();
|
|
43
|
-
}
|
|
51
|
+
afterClose: handleAfterClose
|
|
44
52
|
}));
|
|
45
53
|
});
|
|
46
54
|
const ref = (0, _react.createRef)();
|
|
47
55
|
const unmount = (0, _renderToBody.renderToBody)(_react.default.createElement(Wrapper, {
|
|
48
56
|
ref: ref
|
|
49
57
|
}));
|
|
50
|
-
return {
|
|
51
|
-
close: () => {
|
|
52
|
-
var _a;
|
|
53
58
|
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
const close = () => {
|
|
60
|
+
var _a;
|
|
61
|
+
|
|
62
|
+
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
closeFnSet.add(close);
|
|
66
|
+
return {
|
|
67
|
+
close
|
|
56
68
|
};
|
|
57
69
|
}
|
|
@@ -30,6 +30,6 @@ export declare const PasscodeInput: React.ForwardRefExoticComponent<{
|
|
|
30
30
|
seperated?: boolean | undefined;
|
|
31
31
|
onBlur?: (() => void) | undefined;
|
|
32
32
|
onFocus?: (() => void) | undefined;
|
|
33
|
-
keyboard?: React.ReactElement<NumberKeyboardProps, string |
|
|
33
|
+
keyboard?: React.ReactElement<NumberKeyboardProps, string | React.JSXElementConstructor<any>> | undefined;
|
|
34
34
|
onFill?: ((val: string) => void) | undefined;
|
|
35
35
|
} & NativeProps<"--border-radius" | "--border-color" | "--cell-size" | "--dot-size" | "--cell-gap"> & React.RefAttributes<PasscodeInputRef>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PickerProps } from './index';
|
|
2
|
-
export declare function prompt(props: Omit<PickerProps, 'value' | 'visible' | 'children'>): Promise<
|
|
1
|
+
import type { PickerProps, PickerValue } from './index';
|
|
2
|
+
export declare function prompt(props: Omit<PickerProps, 'value' | 'visible' | 'children'>): Promise<PickerValue[] | null>;
|
|
@@ -60,16 +60,6 @@
|
|
|
60
60
|
white-space: nowrap;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.adm-picker-view-column-item.adm-picker-view-column-item-dummy {
|
|
64
|
-
position: fixed;
|
|
65
|
-
left: 0;
|
|
66
|
-
bottom: 0;
|
|
67
|
-
padding: 0;
|
|
68
|
-
opacity: 0;
|
|
69
|
-
user-select: none;
|
|
70
|
-
pointer-events: none;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
63
|
.adm-picker-view-column-accessible {
|
|
74
64
|
width: 100%;
|
|
75
65
|
height: 100%;
|
|
@@ -19,7 +19,7 @@ var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
|
19
19
|
|
|
20
20
|
var _ahooks = require("ahooks");
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _measureCssLength = require("../../utils/measure-css-length");
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -50,16 +50,12 @@ const Wheel = (0, _react.memo)(props => {
|
|
|
50
50
|
}
|
|
51
51
|
}));
|
|
52
52
|
const draggingRef = (0, _react.useRef)(false);
|
|
53
|
-
const
|
|
53
|
+
const rootRef = (0, _react.useRef)(null);
|
|
54
54
|
const itemHeight = (0, _react.useRef)(34);
|
|
55
55
|
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
56
|
-
const
|
|
57
|
-
if (!
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (rect.height > 0) {
|
|
61
|
-
itemHeight.current = rect.height;
|
|
62
|
-
}
|
|
56
|
+
const root = rootRef.current;
|
|
57
|
+
if (!root) return;
|
|
58
|
+
itemHeight.current = (0, _measureCssLength.measureCSSLength)(window.getComputedStyle(root).getPropertyValue('--item-height'));
|
|
63
59
|
});
|
|
64
60
|
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
65
61
|
if (draggingRef.current) return;
|
|
@@ -155,12 +151,9 @@ const Wheel = (0, _react.memo)(props => {
|
|
|
155
151
|
}
|
|
156
152
|
|
|
157
153
|
return _react.default.createElement("div", Object.assign({
|
|
154
|
+
ref: rootRef,
|
|
158
155
|
className: `${classPrefix}-column`
|
|
159
|
-
}, bind()), _react.default.createElement(
|
|
160
|
-
ref: dummyItemRef,
|
|
161
|
-
className: (0, _classnames.default)(`${classPrefix}-column-item`, `${classPrefix}-column-item-dummy`),
|
|
162
|
-
"aria-hidden": true
|
|
163
|
-
}), _react.default.createElement(_web.animated.div, {
|
|
156
|
+
}, bind()), _react.default.createElement(_web.animated.div, {
|
|
164
157
|
style: {
|
|
165
158
|
translateY: y
|
|
166
159
|
},
|
|
@@ -17,10 +17,9 @@ const Arrow = (0, _react.memo)(props => {
|
|
|
17
17
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("svg", {
|
|
18
18
|
viewBox: '0 0 30 16'
|
|
19
19
|
}, _react.default.createElement("g", {
|
|
20
|
-
transform: 'translate(-1300.000000, -841.000000)',
|
|
21
20
|
fill: 'currentColor'
|
|
22
21
|
}, _react.default.createElement("path", {
|
|
23
|
-
d: '
|
|
22
|
+
d: 'M0,0 L30,0 L18.07289,14.312538 C16.65863,16.009645 14.13637,16.238942 12.43926,14.824685 C12.25341,14.669808 12.08199,14.49839 11.92711,14.312538 L0,0 L0,0 Z'
|
|
24
23
|
}))));
|
|
25
24
|
});
|
|
26
25
|
exports.Arrow = Arrow;
|
|
@@ -4,16 +4,16 @@ import './popover-menu.less';
|
|
|
4
4
|
export type { PopoverProps, PopoverRef } from './popover';
|
|
5
5
|
export type { PopoverMenuProps, Action } from './popover-menu';
|
|
6
6
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
7
|
-
getContainer?:
|
|
7
|
+
getContainer?: import("../../utils/render-to-container").GetContainer | undefined;
|
|
8
8
|
destroyOnHide?: boolean | undefined;
|
|
9
|
-
children: import("react").ReactElement<any, string |
|
|
9
|
+
children: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
10
10
|
mode?: "dark" | "light" | undefined;
|
|
11
11
|
trigger?: "click" | undefined;
|
|
12
12
|
placement?: "left" | "right" | "bottom" | "top" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | undefined;
|
|
13
13
|
stopPropagation?: "click"[] | undefined;
|
|
14
14
|
content: import("react").ReactNode;
|
|
15
15
|
} & Pick<import("rc-tooltip/lib/Tooltip").TooltipProps, "visible" | "align" | "defaultVisible" | "onVisibleChange"> & import("../../utils/native-props").NativeProps<"--z-index"> & import("react").RefAttributes<import("./popover").PopoverRef>> & {
|
|
16
|
-
Menu: import("react").ForwardRefExoticComponent<
|
|
16
|
+
Menu: import("react").ForwardRefExoticComponent<Omit<import("./popover").PopoverProps, "content"> & {
|
|
17
17
|
actions: import("./popover-menu").Action[];
|
|
18
18
|
onAction?: ((item: import("./popover-menu").Action) => void) | undefined;
|
|
19
19
|
} & import("react").RefAttributes<import("./popover").PopoverRef>>;
|
|
@@ -11,7 +11,7 @@ export declare type PopoverMenuProps = Omit<PopoverProps, 'content'> & {
|
|
|
11
11
|
actions: Action[];
|
|
12
12
|
onAction?: (item: Action) => void;
|
|
13
13
|
};
|
|
14
|
-
export declare const PopoverMenu: React.ForwardRefExoticComponent<
|
|
14
|
+
export declare const PopoverMenu: React.ForwardRefExoticComponent<Omit<PopoverProps, "content"> & {
|
|
15
15
|
actions: Action[];
|
|
16
16
|
onAction?: ((item: Action) => void) | undefined;
|
|
17
17
|
} & React.RefAttributes<PopoverRef>>;
|
|
@@ -19,7 +19,7 @@ export declare type PopoverRef = {
|
|
|
19
19
|
visible: boolean;
|
|
20
20
|
};
|
|
21
21
|
export declare const Popover: React.ForwardRefExoticComponent<{
|
|
22
|
-
getContainer?:
|
|
22
|
+
getContainer?: GetContainer | undefined;
|
|
23
23
|
destroyOnHide?: boolean | undefined;
|
|
24
24
|
children: ReactElement;
|
|
25
25
|
mode?: "dark" | "light" | undefined;
|
|
@@ -23,7 +23,7 @@ var _renderToContainer = require("../../utils/render-to-container");
|
|
|
23
23
|
|
|
24
24
|
var _web = require("@react-spring/web");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _shouldRender = require("../../utils/should-render");
|
|
27
27
|
|
|
28
28
|
var _withStopPropagation = require("../../utils/with-stop-propagation");
|
|
29
29
|
|
|
@@ -48,7 +48,7 @@ const Popup = p => {
|
|
|
48
48
|
const ref = (0, _react.useRef)(null);
|
|
49
49
|
const [active, setActive] = (0, _react.useState)(props.visible);
|
|
50
50
|
(0, _useLockScroll.useLockScroll)(ref, active);
|
|
51
|
-
const shouldRender = (0,
|
|
51
|
+
const shouldRender = (0, _shouldRender.useShouldRender)(active, props.forceRender, props.destroyOnClose);
|
|
52
52
|
const unmountedRef = (0, _ahooks.useUnmountedRef)();
|
|
53
53
|
const {
|
|
54
54
|
percent
|
|
@@ -67,6 +67,7 @@ const SearchBar = (0, _react.forwardRef)((p, ref) => {
|
|
|
67
67
|
|
|
68
68
|
const renderCancelButton = () => {
|
|
69
69
|
let isShowCancel = false;
|
|
70
|
+
const showCancelButton = props.showCancelButton;
|
|
70
71
|
|
|
71
72
|
if (typeof props.showCancelButton === 'function') {
|
|
72
73
|
isShowCancel = props.showCancelButton(hasFocus, value);
|