antd-mobile 5.11.0 → 5.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2x/cjs/components/calendar/calendar.d.ts +4 -0
- package/2x/cjs/components/calendar/calendar.js +13 -9
- package/2x/cjs/components/capsule-tabs/capsule-tabs.css +1 -0
- package/2x/cjs/components/cascade-picker/cascade-picker-utils.d.ts +2 -2
- package/2x/cjs/components/cascade-picker/cascade-picker-utils.js +37 -16
- package/2x/cjs/components/cascade-picker/cascade-picker.d.ts +6 -3
- package/2x/cjs/components/cascade-picker/cascade-picker.js +10 -11
- package/2x/cjs/components/cascade-picker/index.d.ts +4 -2
- package/2x/cjs/components/cascade-picker-view/cascade-picker-view.js +2 -7
- package/2x/cjs/components/date-picker/date-picker.d.ts +18 -4
- package/2x/cjs/components/date-picker/date-picker.js +5 -6
- package/2x/cjs/components/date-picker/index.d.ts +15 -2
- package/2x/cjs/components/dialog/dialog.js +2 -2
- package/2x/cjs/components/form/form-item.d.ts +2 -1
- package/2x/cjs/components/form/form-item.js +21 -4
- package/2x/cjs/components/form/utils.d.ts +1 -0
- package/2x/cjs/components/form/utils.js +20 -0
- package/2x/cjs/components/image-uploader/image-uploader.js +10 -4
- package/2x/cjs/components/input/input.d.ts +2 -2
- package/2x/cjs/components/input/input.js +1 -0
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.css +1 -0
- package/2x/cjs/components/list/list-item.js +7 -5
- package/2x/cjs/components/list/list.css +1 -0
- package/2x/cjs/components/mask/mask.js +1 -1
- package/2x/cjs/components/modal/modal.js +2 -2
- package/2x/cjs/components/picker/index.d.ts +44 -3
- package/2x/cjs/components/picker/picker.d.ts +32 -2
- package/2x/cjs/components/picker/picker.js +43 -16
- package/2x/cjs/components/popup/popup.js +1 -1
- package/2x/cjs/components/swipe-action/swipe-action.js +1 -1
- package/2x/cjs/components/swiper/index.d.ts +16 -1
- package/2x/cjs/components/swiper/swiper.d.ts +16 -1
- package/2x/cjs/components/tabs/tabs.css +1 -0
- package/2x/cjs/components/text-area/text-area.d.ts +2 -2
- package/2x/cjs/components/text-area/text-area.js +4 -1
- package/2x/cjs/components/toast/methods.js +3 -7
- package/2x/cjs/components/virtual-input/virtual-input.js +2 -1
- package/2x/cjs/locales/base.d.ts +1 -0
- package/2x/cjs/locales/base.js +2 -1
- package/2x/cjs/locales/en-US.d.ts +1 -0
- package/2x/cjs/locales/es-ES.d.ts +1 -0
- package/2x/cjs/locales/fa-IR.d.ts +1 -0
- package/2x/cjs/locales/ko-KR.d.ts +1 -0
- package/2x/cjs/locales/zh-CN.d.ts +1 -0
- package/2x/cjs/locales/zh-CN.js +2 -1
- package/2x/cjs/locales/zh-HK.d.ts +1 -0
- package/2x/cjs/locales/zh-TW.d.ts +1 -0
- package/2x/cjs/utils/is-node-with-content.d.ts +4 -0
- package/2x/cjs/utils/is-node-with-content.js +10 -0
- package/2x/cjs/utils/render-to-body.js +3 -6
- package/2x/cjs/utils/render.d.ts +9 -0
- package/2x/cjs/utils/render.js +80 -0
- package/2x/cjs/utils/use-drag-and-pinch.d.ts +1 -1
- package/2x/cjs/utils/use-props-value.d.ts +1 -1
- package/2x/es/components/calendar/calendar.d.ts +4 -0
- package/2x/es/components/calendar/calendar.js +13 -9
- package/2x/es/components/capsule-tabs/capsule-tabs.css +1 -0
- package/2x/es/components/cascade-picker/cascade-picker-utils.d.ts +2 -2
- package/2x/es/components/cascade-picker/cascade-picker-utils.js +35 -15
- package/2x/es/components/cascade-picker/cascade-picker.d.ts +6 -3
- package/2x/es/components/cascade-picker/cascade-picker.js +7 -10
- package/2x/es/components/cascade-picker/index.d.ts +4 -2
- package/2x/es/components/cascade-picker-view/cascade-picker-view.js +3 -7
- package/2x/es/components/date-picker/date-picker.d.ts +18 -4
- package/2x/es/components/date-picker/date-picker.js +6 -5
- package/2x/es/components/date-picker/index.d.ts +15 -2
- package/2x/es/components/dialog/dialog.js +2 -2
- package/2x/es/components/form/form-item.d.ts +2 -1
- package/2x/es/components/form/form-item.js +23 -4
- package/2x/es/components/form/utils.d.ts +1 -0
- package/2x/es/components/form/utils.js +17 -0
- package/2x/es/components/image-uploader/image-uploader.js +9 -4
- package/2x/es/components/input/input.d.ts +2 -2
- package/2x/es/components/input/input.js +1 -0
- package/2x/es/components/jumbo-tabs/jumbo-tabs.css +1 -0
- package/2x/es/components/list/list-item.js +6 -5
- package/2x/es/components/list/list.css +1 -0
- package/2x/es/components/mask/mask.js +1 -1
- package/2x/es/components/modal/modal.js +2 -2
- package/2x/es/components/picker/index.d.ts +44 -3
- package/2x/es/components/picker/picker.d.ts +32 -2
- package/2x/es/components/picker/picker.js +42 -17
- package/2x/es/components/popup/popup.js +1 -1
- package/2x/es/components/swipe-action/swipe-action.js +1 -1
- package/2x/es/components/swiper/index.d.ts +16 -1
- package/2x/es/components/swiper/swiper.d.ts +16 -1
- package/2x/es/components/tabs/tabs.css +1 -0
- package/2x/es/components/text-area/text-area.d.ts +2 -2
- package/2x/es/components/text-area/text-area.js +4 -2
- package/2x/es/components/toast/methods.js +3 -3
- package/2x/es/components/virtual-input/virtual-input.js +2 -1
- package/2x/es/locales/base.d.ts +1 -0
- package/2x/es/locales/base.js +2 -1
- package/2x/es/locales/en-US.d.ts +1 -0
- package/2x/es/locales/es-ES.d.ts +1 -0
- package/2x/es/locales/fa-IR.d.ts +1 -0
- package/2x/es/locales/ko-KR.d.ts +1 -0
- package/2x/es/locales/zh-CN.d.ts +1 -0
- package/2x/es/locales/zh-CN.js +2 -1
- package/2x/es/locales/zh-HK.d.ts +1 -0
- package/2x/es/locales/zh-TW.d.ts +1 -0
- package/2x/es/utils/is-node-with-content.d.ts +4 -0
- package/2x/es/utils/is-node-with-content.js +3 -0
- package/2x/es/utils/render-to-body.js +3 -3
- package/2x/es/utils/render.d.ts +9 -0
- package/2x/es/utils/render.js +65 -0
- package/2x/es/utils/use-drag-and-pinch.d.ts +1 -1
- package/2x/es/utils/use-props-value.d.ts +1 -1
- package/2x/package.json +8 -8
- package/bundle/antd-mobile.cjs.js +5093 -4356
- package/bundle/antd-mobile.es.js +5094 -4357
- package/bundle/style.css +4 -0
- package/cjs/components/calendar/calendar.d.ts +4 -0
- package/cjs/components/calendar/calendar.js +13 -9
- package/cjs/components/capsule-tabs/capsule-tabs.css +1 -0
- package/cjs/components/cascade-picker/cascade-picker-utils.d.ts +2 -2
- package/cjs/components/cascade-picker/cascade-picker-utils.js +37 -16
- package/cjs/components/cascade-picker/cascade-picker.d.ts +6 -3
- package/cjs/components/cascade-picker/cascade-picker.js +10 -11
- package/cjs/components/cascade-picker/index.d.ts +4 -2
- package/cjs/components/cascade-picker-view/cascade-picker-view.js +2 -7
- package/cjs/components/date-picker/date-picker.d.ts +18 -4
- package/cjs/components/date-picker/date-picker.js +5 -6
- package/cjs/components/date-picker/index.d.ts +15 -2
- package/cjs/components/dialog/dialog.js +2 -2
- package/cjs/components/form/form-item.d.ts +2 -1
- package/cjs/components/form/form-item.js +21 -4
- package/cjs/components/form/utils.d.ts +1 -0
- package/cjs/components/form/utils.js +20 -0
- package/cjs/components/image-uploader/image-uploader.js +10 -4
- package/cjs/components/input/input.d.ts +2 -2
- package/cjs/components/input/input.js +1 -0
- package/cjs/components/jumbo-tabs/jumbo-tabs.css +1 -0
- package/cjs/components/list/list-item.js +7 -5
- package/cjs/components/list/list.css +1 -0
- package/cjs/components/mask/mask.js +1 -1
- package/cjs/components/modal/modal.js +2 -2
- package/cjs/components/picker/index.d.ts +44 -3
- package/cjs/components/picker/picker.d.ts +32 -2
- package/cjs/components/picker/picker.js +43 -16
- package/cjs/components/popup/popup.js +1 -1
- package/cjs/components/swipe-action/swipe-action.js +1 -1
- package/cjs/components/swiper/index.d.ts +16 -1
- package/cjs/components/swiper/swiper.d.ts +16 -1
- package/cjs/components/tabs/tabs.css +1 -0
- package/cjs/components/text-area/text-area.d.ts +2 -2
- package/cjs/components/text-area/text-area.js +4 -1
- package/cjs/components/toast/methods.js +3 -7
- package/cjs/components/virtual-input/virtual-input.js +2 -1
- package/cjs/locales/base.d.ts +1 -0
- package/cjs/locales/base.js +2 -1
- package/cjs/locales/en-US.d.ts +1 -0
- package/cjs/locales/es-ES.d.ts +1 -0
- package/cjs/locales/fa-IR.d.ts +1 -0
- package/cjs/locales/ko-KR.d.ts +1 -0
- package/cjs/locales/zh-CN.d.ts +1 -0
- package/cjs/locales/zh-CN.js +2 -1
- package/cjs/locales/zh-HK.d.ts +1 -0
- package/cjs/locales/zh-TW.d.ts +1 -0
- package/cjs/utils/is-node-with-content.d.ts +4 -0
- package/cjs/utils/is-node-with-content.js +10 -0
- package/cjs/utils/render-to-body.js +3 -6
- package/cjs/utils/render.d.ts +9 -0
- package/cjs/utils/render.js +80 -0
- package/cjs/utils/use-drag-and-pinch.d.ts +1 -1
- package/cjs/utils/use-props-value.d.ts +1 -1
- package/es/components/calendar/calendar.d.ts +4 -0
- package/es/components/calendar/calendar.js +13 -9
- package/es/components/capsule-tabs/capsule-tabs.css +1 -0
- package/es/components/cascade-picker/cascade-picker-utils.d.ts +2 -2
- package/es/components/cascade-picker/cascade-picker-utils.js +35 -15
- package/es/components/cascade-picker/cascade-picker.d.ts +6 -3
- package/es/components/cascade-picker/cascade-picker.js +7 -10
- package/es/components/cascade-picker/index.d.ts +4 -2
- package/es/components/cascade-picker-view/cascade-picker-view.js +3 -7
- package/es/components/date-picker/date-picker.d.ts +18 -4
- package/es/components/date-picker/date-picker.js +6 -5
- package/es/components/date-picker/index.d.ts +15 -2
- package/es/components/dialog/dialog.js +2 -2
- package/es/components/form/form-item.d.ts +2 -1
- package/es/components/form/form-item.js +23 -4
- package/es/components/form/utils.d.ts +1 -0
- package/es/components/form/utils.js +17 -0
- package/es/components/image-uploader/image-uploader.js +9 -4
- package/es/components/input/input.d.ts +2 -2
- package/es/components/input/input.js +1 -0
- package/es/components/jumbo-tabs/jumbo-tabs.css +1 -0
- package/es/components/list/list-item.js +6 -5
- package/es/components/list/list.css +1 -0
- package/es/components/mask/mask.js +1 -1
- package/es/components/modal/modal.js +2 -2
- package/es/components/picker/index.d.ts +44 -3
- package/es/components/picker/picker.d.ts +32 -2
- package/es/components/picker/picker.js +42 -17
- package/es/components/popup/popup.js +1 -1
- package/es/components/swipe-action/swipe-action.js +1 -1
- package/es/components/swiper/index.d.ts +16 -1
- package/es/components/swiper/swiper.d.ts +16 -1
- package/es/components/tabs/tabs.css +1 -0
- package/es/components/text-area/text-area.d.ts +2 -2
- package/es/components/text-area/text-area.js +4 -2
- package/es/components/toast/methods.js +3 -3
- package/es/components/virtual-input/virtual-input.js +2 -1
- package/es/locales/base.d.ts +1 -0
- package/es/locales/base.js +2 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/es-ES.d.ts +1 -0
- package/es/locales/fa-IR.d.ts +1 -0
- package/es/locales/ko-KR.d.ts +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +2 -1
- package/es/locales/zh-HK.d.ts +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/utils/is-node-with-content.d.ts +4 -0
- package/es/utils/is-node-with-content.js +3 -0
- package/es/utils/render-to-body.js +3 -3
- package/es/utils/render.d.ts +9 -0
- package/es/utils/render.js +65 -0
- package/es/utils/use-drag-and-pinch.d.ts +1 -1
- package/es/utils/use-props-value.d.ts +1 -1
- package/package.json +8 -8
- package/umd/antd-mobile.js +1 -1
- package/2x/cjs/components/cascade-picker/use-cascade-picker-options.d.ts +0 -5
- package/2x/cjs/components/cascade-picker/use-cascade-picker-options.js +0 -40
- package/2x/es/components/cascade-picker/use-cascade-picker-options.d.ts +0 -5
- package/2x/es/components/cascade-picker/use-cascade-picker-options.js +0 -32
- package/cjs/components/cascade-picker/use-cascade-picker-options.d.ts +0 -5
- package/cjs/components/cascade-picker/use-cascade-picker-options.js +0 -40
- package/es/components/cascade-picker/use-cascade-picker-options.d.ts +0 -5
- package/es/components/cascade-picker/use-cascade-picker-options.js +0 -32
|
@@ -1,9 +1,50 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import './picker.less';
|
|
3
2
|
import { prompt } from './prompt';
|
|
4
|
-
export type { PickerProps } from './picker';
|
|
3
|
+
export type { PickerProps, PickerRef, PickerActions } from './picker';
|
|
5
4
|
export type { PickerValue, PickerColumnItem, PickerColumn, PickerValueExtend, } from '../picker-view';
|
|
6
|
-
declare const _default: import("react").NamedExoticComponent<
|
|
5
|
+
declare const _default: import("react").NamedExoticComponent<{
|
|
6
|
+
columns: import("../picker-view").PickerColumn[] | ((value: import("../picker-view").PickerValue[]) => import("../picker-view").PickerColumn[]);
|
|
7
|
+
value?: import("../picker-view").PickerValue[] | undefined;
|
|
8
|
+
defaultValue?: import("../picker-view").PickerValue[] | undefined;
|
|
9
|
+
onSelect?: ((value: import("../picker-view").PickerValue[], extend: import("../picker-view").PickerValueExtend) => void) | undefined;
|
|
10
|
+
onConfirm?: ((value: import("../picker-view").PickerValue[], extend: import("../picker-view").PickerValueExtend) => void) | undefined;
|
|
11
|
+
onCancel?: (() => void) | undefined;
|
|
12
|
+
onClose?: (() => void) | undefined;
|
|
13
|
+
closeOnMaskClick?: boolean | undefined;
|
|
14
|
+
visible?: boolean | undefined;
|
|
15
|
+
title?: import("react").ReactNode;
|
|
16
|
+
confirmText?: import("react").ReactNode;
|
|
17
|
+
cancelText?: import("react").ReactNode;
|
|
18
|
+
children?: ((items: (import("../picker-view").PickerColumnItem | null)[], actions: import("./picker").PickerActions) => import("react").ReactNode) | undefined;
|
|
19
|
+
renderLabel?: ((item: import("../picker-view").PickerColumnItem) => import("react").ReactNode) | undefined;
|
|
20
|
+
mouseWheel?: boolean | undefined;
|
|
21
|
+
popupClassName?: string | undefined;
|
|
22
|
+
popupStyle?: import("react").CSSProperties | undefined;
|
|
23
|
+
forceRender?: boolean | undefined;
|
|
24
|
+
destroyOnClose?: boolean | undefined;
|
|
25
|
+
} & Pick<import("../popup").PopupProps, "onClick" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & import("../../utils/native-props").NativeProps<"--item-height" | "--header-button-font-size" | "--title-font-size" | "--item-font-size"> & import("react").RefAttributes<import("./picker").PickerActions>> & {
|
|
26
|
+
readonly type: import("react").ForwardRefExoticComponent<{
|
|
27
|
+
columns: import("../picker-view").PickerColumn[] | ((value: import("../picker-view").PickerValue[]) => import("../picker-view").PickerColumn[]);
|
|
28
|
+
value?: import("../picker-view").PickerValue[] | undefined;
|
|
29
|
+
defaultValue?: import("../picker-view").PickerValue[] | undefined;
|
|
30
|
+
onSelect?: ((value: import("../picker-view").PickerValue[], extend: import("../picker-view").PickerValueExtend) => void) | undefined;
|
|
31
|
+
onConfirm?: ((value: import("../picker-view").PickerValue[], extend: import("../picker-view").PickerValueExtend) => void) | undefined;
|
|
32
|
+
onCancel?: (() => void) | undefined;
|
|
33
|
+
onClose?: (() => void) | undefined;
|
|
34
|
+
closeOnMaskClick?: boolean | undefined;
|
|
35
|
+
visible?: boolean | undefined;
|
|
36
|
+
title?: import("react").ReactNode;
|
|
37
|
+
confirmText?: import("react").ReactNode;
|
|
38
|
+
cancelText?: import("react").ReactNode;
|
|
39
|
+
children?: ((items: (import("../picker-view").PickerColumnItem | null)[], actions: import("./picker").PickerActions) => import("react").ReactNode) | undefined;
|
|
40
|
+
renderLabel?: ((item: import("../picker-view").PickerColumnItem) => import("react").ReactNode) | undefined;
|
|
41
|
+
mouseWheel?: boolean | undefined;
|
|
42
|
+
popupClassName?: string | undefined;
|
|
43
|
+
popupStyle?: import("react").CSSProperties | undefined;
|
|
44
|
+
forceRender?: boolean | undefined;
|
|
45
|
+
destroyOnClose?: boolean | undefined;
|
|
46
|
+
} & Pick<import("../popup").PopupProps, "onClick" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & import("../../utils/native-props").NativeProps<"--item-height" | "--header-button-font-size" | "--title-font-size" | "--item-font-size"> & import("react").RefAttributes<import("./picker").PickerActions>>;
|
|
47
|
+
} & {
|
|
7
48
|
prompt: typeof prompt;
|
|
8
49
|
};
|
|
9
50
|
export default _default;
|
|
@@ -2,6 +2,12 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { PopupProps } from '../popup';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
4
|
import { PickerColumn, PickerColumnItem, PickerValue, PickerValueExtend } from './index';
|
|
5
|
+
export declare type PickerActions = {
|
|
6
|
+
open: () => void;
|
|
7
|
+
close: () => void;
|
|
8
|
+
toggle: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare type PickerRef = PickerActions;
|
|
5
11
|
export declare type PickerProps = {
|
|
6
12
|
columns: PickerColumn[] | ((value: PickerValue[]) => PickerColumn[]);
|
|
7
13
|
value?: PickerValue[];
|
|
@@ -15,8 +21,32 @@ export declare type PickerProps = {
|
|
|
15
21
|
title?: ReactNode;
|
|
16
22
|
confirmText?: ReactNode;
|
|
17
23
|
cancelText?: ReactNode;
|
|
18
|
-
children?: (items: (PickerColumnItem | null)[]) => ReactNode;
|
|
24
|
+
children?: (items: (PickerColumnItem | null)[], actions: PickerActions) => ReactNode;
|
|
19
25
|
renderLabel?: (item: PickerColumnItem) => ReactNode;
|
|
20
26
|
mouseWheel?: boolean;
|
|
27
|
+
popupClassName?: string;
|
|
28
|
+
popupStyle?: React.CSSProperties;
|
|
29
|
+
forceRender?: boolean;
|
|
30
|
+
destroyOnClose?: boolean;
|
|
21
31
|
} & Pick<PopupProps, 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'stopPropagation'> & NativeProps<'--header-button-font-size' | '--title-font-size' | '--item-font-size' | '--item-height'>;
|
|
22
|
-
export declare const Picker: React.
|
|
32
|
+
export declare const Picker: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
33
|
+
columns: PickerColumn[] | ((value: PickerValue[]) => PickerColumn[]);
|
|
34
|
+
value?: PickerValue[] | undefined;
|
|
35
|
+
defaultValue?: PickerValue[] | undefined;
|
|
36
|
+
onSelect?: ((value: PickerValue[], extend: PickerValueExtend) => void) | undefined;
|
|
37
|
+
onConfirm?: ((value: PickerValue[], extend: PickerValueExtend) => void) | undefined;
|
|
38
|
+
onCancel?: (() => void) | undefined;
|
|
39
|
+
onClose?: (() => void) | undefined;
|
|
40
|
+
closeOnMaskClick?: boolean | undefined;
|
|
41
|
+
visible?: boolean | undefined;
|
|
42
|
+
title?: ReactNode;
|
|
43
|
+
confirmText?: ReactNode;
|
|
44
|
+
cancelText?: ReactNode;
|
|
45
|
+
children?: ((items: (PickerColumnItem | null)[], actions: PickerActions) => ReactNode) | undefined;
|
|
46
|
+
renderLabel?: ((item: PickerColumnItem) => ReactNode) | undefined;
|
|
47
|
+
mouseWheel?: boolean | undefined;
|
|
48
|
+
popupClassName?: string | undefined;
|
|
49
|
+
popupStyle?: React.CSSProperties | undefined;
|
|
50
|
+
forceRender?: boolean | undefined;
|
|
51
|
+
destroyOnClose?: boolean | undefined;
|
|
52
|
+
} & Pick<PopupProps, "onClick" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & NativeProps<"--item-height" | "--header-button-font-size" | "--title-font-size" | "--item-font-size"> & React.RefAttributes<PickerActions>>>;
|
|
@@ -7,6 +7,8 @@ exports.Picker = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
10
12
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
11
13
|
|
|
12
14
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
@@ -27,6 +29,8 @@ var _safeArea = _interopRequireDefault(require("../safe-area"));
|
|
|
27
29
|
|
|
28
30
|
var _pickerUtils = require("./picker-utils");
|
|
29
31
|
|
|
32
|
+
var _shouldRender = require("../../utils/should-render");
|
|
33
|
+
|
|
30
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
35
|
|
|
32
36
|
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); }
|
|
@@ -39,7 +43,7 @@ const defaultProps = {
|
|
|
39
43
|
closeOnMaskClick: true,
|
|
40
44
|
renderLabel: _pickerUtils.defaultRenderLabel
|
|
41
45
|
};
|
|
42
|
-
const Picker = (0, _react.memo)(p => {
|
|
46
|
+
const Picker = (0, _react.memo)((0, _react.forwardRef)((p, ref) => {
|
|
43
47
|
var _a;
|
|
44
48
|
|
|
45
49
|
const {
|
|
@@ -49,6 +53,29 @@ const Picker = (0, _react.memo)(p => {
|
|
|
49
53
|
confirmText: locale.common.confirm,
|
|
50
54
|
cancelText: locale.common.cancel
|
|
51
55
|
}, p);
|
|
56
|
+
const [visible, setVisible] = (0, _usePropsValue.usePropsValue)({
|
|
57
|
+
value: props.visible,
|
|
58
|
+
defaultValue: false,
|
|
59
|
+
onChange: v => {
|
|
60
|
+
var _a;
|
|
61
|
+
|
|
62
|
+
if (v === false) {
|
|
63
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const actions = {
|
|
68
|
+
toggle: () => {
|
|
69
|
+
setVisible(v => !v);
|
|
70
|
+
},
|
|
71
|
+
open: () => {
|
|
72
|
+
setVisible(true);
|
|
73
|
+
},
|
|
74
|
+
close: () => {
|
|
75
|
+
setVisible(false);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
(0, _react.useImperativeHandle)(ref, () => actions);
|
|
52
79
|
const [value, setValue] = (0, _usePropsValue.usePropsValue)(Object.assign(Object.assign({}, props), {
|
|
53
80
|
onChange: val => {
|
|
54
81
|
var _a;
|
|
@@ -63,9 +90,9 @@ const Picker = (0, _react.memo)(p => {
|
|
|
63
90
|
if (innerValue !== value) {
|
|
64
91
|
setInnerValue(value);
|
|
65
92
|
}
|
|
66
|
-
}, [
|
|
93
|
+
}, [visible]);
|
|
67
94
|
(0, _react.useEffect)(() => {
|
|
68
|
-
if (!
|
|
95
|
+
if (!visible) {
|
|
69
96
|
setInnerValue(value);
|
|
70
97
|
}
|
|
71
98
|
}, [value]);
|
|
@@ -74,10 +101,11 @@ const Picker = (0, _react.memo)(p => {
|
|
|
74
101
|
|
|
75
102
|
setInnerValue(val);
|
|
76
103
|
|
|
77
|
-
if (
|
|
104
|
+
if (visible) {
|
|
78
105
|
(_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, val, ext);
|
|
79
106
|
}
|
|
80
107
|
});
|
|
108
|
+
const shouldRender = (0, _shouldRender.useShouldRender)(visible, props.forceRender, props.destroyOnClose);
|
|
81
109
|
const pickerElement = (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
82
110
|
className: classPrefix
|
|
83
111
|
}, _react.default.createElement("div", {
|
|
@@ -85,20 +113,18 @@ const Picker = (0, _react.memo)(p => {
|
|
|
85
113
|
}, _react.default.createElement("a", {
|
|
86
114
|
className: `${classPrefix}-header-button`,
|
|
87
115
|
onClick: () => {
|
|
88
|
-
var _a
|
|
116
|
+
var _a;
|
|
89
117
|
|
|
90
118
|
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
91
|
-
(
|
|
119
|
+
setVisible(false);
|
|
92
120
|
}
|
|
93
121
|
}, props.cancelText), _react.default.createElement("div", {
|
|
94
122
|
className: `${classPrefix}-header-title`
|
|
95
123
|
}, props.title), _react.default.createElement("a", {
|
|
96
124
|
className: `${classPrefix}-header-button`,
|
|
97
125
|
onClick: () => {
|
|
98
|
-
var _a;
|
|
99
|
-
|
|
100
126
|
setValue(innerValue);
|
|
101
|
-
(
|
|
127
|
+
setVisible(false);
|
|
102
128
|
}
|
|
103
129
|
}, props.confirmText)), _react.default.createElement("div", {
|
|
104
130
|
className: `${classPrefix}-body`
|
|
@@ -111,15 +137,16 @@ const Picker = (0, _react.memo)(p => {
|
|
|
111
137
|
}))));
|
|
112
138
|
|
|
113
139
|
const popupElement = _react.default.createElement(_popup.default, {
|
|
114
|
-
|
|
115
|
-
|
|
140
|
+
style: props.popupStyle,
|
|
141
|
+
className: (0, _classnames.default)(`${classPrefix}-popup`, props.popupClassName),
|
|
142
|
+
visible: visible,
|
|
116
143
|
position: 'bottom',
|
|
117
144
|
onMaskClick: () => {
|
|
118
|
-
var _a
|
|
145
|
+
var _a;
|
|
119
146
|
|
|
120
147
|
if (!props.closeOnMaskClick) return;
|
|
121
148
|
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
122
|
-
(
|
|
149
|
+
setVisible(false);
|
|
123
150
|
},
|
|
124
151
|
getContainer: props.getContainer,
|
|
125
152
|
destroyOnClose: true,
|
|
@@ -128,11 +155,11 @@ const Picker = (0, _react.memo)(p => {
|
|
|
128
155
|
onClick: props.onClick,
|
|
129
156
|
forceRender: true,
|
|
130
157
|
stopPropagation: props.stopPropagation
|
|
131
|
-
}, pickerElement, _react.default.createElement(_safeArea.default, {
|
|
158
|
+
}, shouldRender && pickerElement, _react.default.createElement(_safeArea.default, {
|
|
132
159
|
position: 'bottom'
|
|
133
160
|
}));
|
|
134
161
|
|
|
135
|
-
return _react.default.createElement(_react.default.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, extend.items));
|
|
136
|
-
});
|
|
162
|
+
return _react.default.createElement(_react.default.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, extend.items, actions));
|
|
163
|
+
}));
|
|
137
164
|
exports.Picker = Picker;
|
|
138
165
|
Picker.displayName = 'Picker';
|
|
@@ -80,7 +80,7 @@ const Popup = p => {
|
|
|
80
80
|
className: classPrefix,
|
|
81
81
|
onClick: props.onClick,
|
|
82
82
|
style: {
|
|
83
|
-
display: active ?
|
|
83
|
+
display: active ? undefined : 'none'
|
|
84
84
|
}
|
|
85
85
|
}, props.mask && _react.default.createElement(_mask.default, {
|
|
86
86
|
visible: props.visible,
|
|
@@ -206,7 +206,7 @@ const SwipeAction = (0, _react.forwardRef)((p, ref) => {
|
|
|
206
206
|
}
|
|
207
207
|
}, _react.default.createElement(_web.animated.div, {
|
|
208
208
|
style: {
|
|
209
|
-
pointerEvents: x.to(v => v !== 0 && x.goal !== 0 ? 'none' : '
|
|
209
|
+
pointerEvents: x.to(v => v !== 0 && x.goal !== 0 ? 'none' : 'auto')
|
|
210
210
|
}
|
|
211
211
|
}, props.children)), (0, _withStopPropagation.withStopPropagation)(props.stopPropagation, _react.default.createElement("div", {
|
|
212
212
|
className: 'adm-swipe-action-actions adm-swipe-action-actions-right',
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './swiper.less';
|
|
3
3
|
export type { SwiperProps, SwiperRef } from './swiper';
|
|
4
|
-
declare const _default: import("react").ForwardRefExoticComponent<
|
|
4
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
5
|
+
defaultIndex?: number | undefined;
|
|
6
|
+
allowTouchMove?: boolean | undefined;
|
|
7
|
+
autoplay?: boolean | undefined;
|
|
8
|
+
autoplayInterval?: number | undefined;
|
|
9
|
+
loop?: boolean | undefined;
|
|
10
|
+
direction?: "vertical" | "horizontal" | undefined;
|
|
11
|
+
onIndexChange?: ((index: number) => void) | undefined;
|
|
12
|
+
indicatorProps?: Pick<import("../page-indicator").PageIndicatorProps, "style" | "className" | "color"> | undefined;
|
|
13
|
+
indicator?: ((total: number, current: number) => import("react").ReactNode) | undefined;
|
|
14
|
+
slideSize?: number | undefined;
|
|
15
|
+
trackOffset?: number | undefined;
|
|
16
|
+
stuckAtBoundary?: boolean | undefined;
|
|
17
|
+
rubberband?: boolean | undefined;
|
|
18
|
+
children?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | undefined;
|
|
19
|
+
} & import("../../utils/native-props").NativeProps<"--border-radius" | "--width" | "--height" | "--track-padding"> & import("react").RefAttributes<import("./swiper").SwiperRef>> & {
|
|
5
20
|
Item: import("react").FC<{
|
|
6
21
|
onClick?: ((e: import("react").MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
7
22
|
children?: import("react").ReactNode;
|
|
@@ -22,4 +22,19 @@ export declare type SwiperProps = {
|
|
|
22
22
|
rubberband?: boolean;
|
|
23
23
|
children?: ReactElement | ReactElement[];
|
|
24
24
|
} & NativeProps<'--height' | '--width' | '--border-radius' | '--track-padding'>;
|
|
25
|
-
export declare const Swiper: React.ForwardRefExoticComponent<
|
|
25
|
+
export declare const Swiper: React.ForwardRefExoticComponent<{
|
|
26
|
+
defaultIndex?: number | undefined;
|
|
27
|
+
allowTouchMove?: boolean | undefined;
|
|
28
|
+
autoplay?: boolean | undefined;
|
|
29
|
+
autoplayInterval?: number | undefined;
|
|
30
|
+
loop?: boolean | undefined;
|
|
31
|
+
direction?: "vertical" | "horizontal" | undefined;
|
|
32
|
+
onIndexChange?: ((index: number) => void) | undefined;
|
|
33
|
+
indicatorProps?: Pick<PageIndicatorProps, "style" | "className" | "color"> | undefined;
|
|
34
|
+
indicator?: ((total: number, current: number) => ReactNode) | undefined;
|
|
35
|
+
slideSize?: number | undefined;
|
|
36
|
+
trackOffset?: number | undefined;
|
|
37
|
+
stuckAtBoundary?: boolean | undefined;
|
|
38
|
+
rubberband?: boolean | undefined;
|
|
39
|
+
children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
|
|
40
|
+
} & NativeProps<"--border-radius" | "--width" | "--height" | "--track-padding"> & React.RefAttributes<SwiperRef>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
|
-
export declare type TextAreaProps = Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'autoComplete' | 'autoFocus' | 'disabled' | 'readOnly' | 'onFocus' | 'onBlur' | 'onCompositionStart' | 'onCompositionEnd' | 'onClick'> & {
|
|
4
|
+
export declare type TextAreaProps = Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'autoComplete' | 'autoFocus' | 'disabled' | 'readOnly' | 'name' | 'onFocus' | 'onBlur' | 'onCompositionStart' | 'onCompositionEnd' | 'onClick'> & {
|
|
5
5
|
onChange?: (val: string) => void;
|
|
6
6
|
value?: string;
|
|
7
7
|
defaultValue?: string;
|
|
@@ -20,7 +20,7 @@ export declare type TextAreaRef = {
|
|
|
20
20
|
focus: () => void;
|
|
21
21
|
blur: () => void;
|
|
22
22
|
};
|
|
23
|
-
export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "onClick" | "disabled" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "autoComplete" | "autoFocus" | "readOnly"> & {
|
|
23
|
+
export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "onClick" | "disabled" | "name" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "autoComplete" | "autoFocus" | "readOnly"> & {
|
|
24
24
|
onChange?: ((val: string) => void) | undefined;
|
|
25
25
|
value?: string | undefined;
|
|
26
26
|
defaultValue?: string | undefined;
|
|
@@ -7,6 +7,8 @@ exports.TextArea = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
+
var _ahooks = require("ahooks");
|
|
11
|
+
|
|
10
12
|
var _nativeProps = require("../../utils/native-props");
|
|
11
13
|
|
|
12
14
|
var _usePropsValue = require("../../utils/use-props-value");
|
|
@@ -57,7 +59,7 @@ const TextArea = (0, _react.forwardRef)((p, ref) => {
|
|
|
57
59
|
(_a = nativeTextAreaRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
58
60
|
}
|
|
59
61
|
}));
|
|
60
|
-
(0,
|
|
62
|
+
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
61
63
|
if (!autoSize) return;
|
|
62
64
|
const textArea = nativeTextAreaRef.current;
|
|
63
65
|
if (!textArea) return;
|
|
@@ -130,6 +132,7 @@ const TextArea = (0, _react.forwardRef)((p, ref) => {
|
|
|
130
132
|
autoFocus: props.autoFocus,
|
|
131
133
|
disabled: props.disabled,
|
|
132
134
|
readOnly: props.readOnly,
|
|
135
|
+
name: props.name,
|
|
133
136
|
onFocus: props.onFocus,
|
|
134
137
|
onBlur: props.onBlur,
|
|
135
138
|
onClick: props.onClick
|
|
@@ -11,13 +11,11 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _getContainer = require("../../utils/get-container");
|
|
13
13
|
|
|
14
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
15
|
-
|
|
16
14
|
var _toast = require("./toast");
|
|
17
15
|
|
|
18
16
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
var _render = require("../../utils/render");
|
|
21
19
|
|
|
22
20
|
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); }
|
|
23
21
|
|
|
@@ -26,7 +24,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
26
24
|
const containers = [];
|
|
27
25
|
|
|
28
26
|
function unmount(container) {
|
|
29
|
-
const unmountResult =
|
|
27
|
+
const unmountResult = (0, _render.unmount)(container);
|
|
30
28
|
|
|
31
29
|
if (unmountResult && container.parentNode) {
|
|
32
30
|
container.parentNode.removeChild(container);
|
|
@@ -85,11 +83,9 @@ function show(p) {
|
|
|
85
83
|
}));
|
|
86
84
|
});
|
|
87
85
|
const ref = (0, _react.createRef)();
|
|
88
|
-
|
|
89
|
-
_reactDom.default.render(_react.default.createElement(TempToast, {
|
|
86
|
+
(0, _render.render)(_react.default.createElement(TempToast, {
|
|
90
87
|
ref: ref
|
|
91
88
|
}), container);
|
|
92
|
-
|
|
93
89
|
return {
|
|
94
90
|
close: () => {
|
|
95
91
|
var _a;
|
|
@@ -105,7 +105,8 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
|
|
|
105
105
|
|
|
106
106
|
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
107
107
|
(_c = (_b = keyboard.props).onClose) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
108
|
-
}
|
|
108
|
+
},
|
|
109
|
+
getContainer: null
|
|
109
110
|
});
|
|
110
111
|
|
|
111
112
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
package/2x/cjs/locales/base.d.ts
CHANGED
package/2x/cjs/locales/base.js
CHANGED
package/2x/cjs/locales/zh-CN.js
CHANGED
|
@@ -5,23 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.renderToBody = renderToBody;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
var _render = require("./render");
|
|
11
9
|
|
|
12
10
|
function renderToBody(element) {
|
|
13
11
|
const container = document.createElement('div');
|
|
14
12
|
document.body.appendChild(container);
|
|
15
13
|
|
|
16
14
|
function unmount() {
|
|
17
|
-
const unmountResult =
|
|
15
|
+
const unmountResult = (0, _render.unmount)(container);
|
|
18
16
|
|
|
19
17
|
if (unmountResult && container.parentNode) {
|
|
20
18
|
container.parentNode.removeChild(container);
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
(0, _render.render)(element, container);
|
|
26
23
|
return unmount;
|
|
27
24
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import type { Root } from 'react-dom/client';
|
|
3
|
+
declare const MARK = "__antd_mobile_root__";
|
|
4
|
+
declare type ContainerType = (Element | DocumentFragment) & {
|
|
5
|
+
[MARK]?: Root;
|
|
6
|
+
};
|
|
7
|
+
export declare function render(node: ReactElement, container: ContainerType): void;
|
|
8
|
+
export declare function unmount(container: ContainerType): boolean | Promise<void>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.render = render;
|
|
7
|
+
exports.unmount = unmount;
|
|
8
|
+
|
|
9
|
+
var _tslib = require("tslib");
|
|
10
|
+
|
|
11
|
+
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
12
|
+
|
|
13
|
+
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); }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
// Let compiler not to search module usage
|
|
18
|
+
const fullClone = Object.assign({}, ReactDOM);
|
|
19
|
+
const {
|
|
20
|
+
version,
|
|
21
|
+
render: reactRender,
|
|
22
|
+
unmountComponentAtNode
|
|
23
|
+
} = fullClone;
|
|
24
|
+
let createRoot;
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
const mainVersion = Number((version || '').split('.')[0]);
|
|
28
|
+
|
|
29
|
+
if (mainVersion >= 18) {
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
31
|
+
createRoot = require('react-dom/client').createRoot;
|
|
32
|
+
}
|
|
33
|
+
} catch (e) {// Do nothing;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const MARK = '__antd_mobile_root__';
|
|
37
|
+
|
|
38
|
+
function legacyRender(node, container) {
|
|
39
|
+
reactRender(node, container);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function concurrentRender(node, container) {
|
|
43
|
+
const root = container[MARK] || createRoot(container);
|
|
44
|
+
root.render(node);
|
|
45
|
+
container[MARK] = root;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function render(node, container) {
|
|
49
|
+
if (createRoot) {
|
|
50
|
+
concurrentRender(node, container);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
legacyRender(node, container);
|
|
55
|
+
} // ========================== Unmount =========================
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
function legacyUnmount(container) {
|
|
59
|
+
return unmountComponentAtNode(container);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function concurrentUnmount(container) {
|
|
63
|
+
return (0, _tslib.__awaiter)(this, void 0, void 0, function* () {
|
|
64
|
+
// Delay to unmount to avoid React 18 sync warning
|
|
65
|
+
return Promise.resolve().then(() => {
|
|
66
|
+
var _a;
|
|
67
|
+
|
|
68
|
+
(_a = container[MARK]) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
69
|
+
delete container[MARK];
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function unmount(container) {
|
|
75
|
+
if (createRoot) {
|
|
76
|
+
return concurrentUnmount(container);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return legacyUnmount(container);
|
|
80
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useDragAndPinch: <Config extends import("@use-gesture/react").UserGestureConfig = import("@use-gesture/react").UserGestureConfig>(_handlers: Partial<import("@use-gesture/react").NativeHandlers<import("@use-gesture/react").EventTypes> & import("@use-gesture/react").UserHandlers<import("@use-gesture/react").EventTypes>>, _config?:
|
|
1
|
+
export declare const useDragAndPinch: <Config extends import("@use-gesture/react").UserGestureConfig = import("@use-gesture/react").UserGestureConfig>(_handlers: Partial<import("@use-gesture/react").NativeHandlers<import("@use-gesture/react").EventTypes> & import("@use-gesture/react").UserHandlers<import("@use-gesture/react").EventTypes>>, _config?: Config | undefined) => Config["target"] extends object ? void : (...args: any[]) => import("@use-gesture/react").ReactDOMAttributes;
|