antd-mobile 5.2.0 → 5.2.1
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 +1 -28
- 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/dropdown/item.js +2 -2
- package/2x/cjs/components/form/form.d.ts +2 -2
- package/2x/cjs/components/form/index.d.ts +2 -2
- 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/passcode-input/passcode-input.d.ts +1 -1
- package/2x/cjs/components/picker/prompt.d.ts +2 -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 +11 -2
- package/2x/cjs/components/swiper/index.d.ts +3 -3
- package/2x/cjs/components/swiper/swiper.d.ts +3 -3
- 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.js +3 -1
- 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 +1 -28
- 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/dropdown/item.js +1 -1
- package/2x/es/components/form/form.d.ts +2 -2
- package/2x/es/components/form/index.d.ts +2 -2
- 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/passcode-input/passcode-input.d.ts +1 -1
- package/2x/es/components/picker/prompt.d.ts +2 -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 +11 -2
- package/2x/es/components/swiper/index.d.ts +3 -3
- package/2x/es/components/swiper/swiper.d.ts +3 -3
- 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.js +3 -1
- 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/{es/utils/use-should-render.js → 2x/es/utils/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/cjs/components/calendar/calendar.d.ts +1 -28
- 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/dropdown/item.js +2 -2
- package/cjs/components/form/form.d.ts +2 -2
- package/cjs/components/form/index.d.ts +2 -2
- 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/passcode-input/passcode-input.d.ts +1 -1
- package/cjs/components/picker/prompt.d.ts +2 -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 +11 -2
- package/cjs/components/swiper/index.d.ts +3 -3
- package/cjs/components/swiper/swiper.d.ts +3 -3
- 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.js +3 -1
- 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 +1 -28
- 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/dropdown/item.js +1 -1
- package/es/components/form/form.d.ts +2 -2
- package/es/components/form/index.d.ts +2 -2
- 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/passcode-input/passcode-input.d.ts +1 -1
- package/es/components/picker/prompt.d.ts +2 -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 +11 -2
- package/es/components/swiper/index.d.ts +3 -3
- package/es/components/swiper/swiper.d.ts +3 -3
- 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.js +3 -1
- 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/{2x/es/utils/use-should-render.js → es/utils/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/cjs/utils/use-should-render.d.ts +0 -1
- package/2x/es/utils/use-should-render.d.ts +0 -1
- package/cjs/utils/use-should-render.d.ts +0 -1
- package/es/utils/use-should-render.d.ts +0 -1
|
@@ -28,32 +28,5 @@ export declare type CalendarProps = {
|
|
|
28
28
|
defaultValue?: [Date, Date] | null;
|
|
29
29
|
onChange?: (val: [Date, Date]) => void;
|
|
30
30
|
}) & NativeProps;
|
|
31
|
-
export declare const Calendar: React.ForwardRefExoticComponent<
|
|
32
|
-
weekStartsOn?: "Monday" | "Sunday" | undefined;
|
|
33
|
-
renderLabel?: ((date: Date) => string | null | undefined) | undefined;
|
|
34
|
-
onPageChange?: ((year: number, month: number) => void) | undefined;
|
|
35
|
-
} & {
|
|
36
|
-
selectionMode?: undefined;
|
|
37
|
-
value?: undefined;
|
|
38
|
-
defaultValue?: undefined;
|
|
39
|
-
onChange?: undefined;
|
|
40
|
-
} & NativeProps<never> & React.RefAttributes<CalenderRef>) | ({
|
|
41
|
-
weekStartsOn?: "Monday" | "Sunday" | undefined;
|
|
42
|
-
renderLabel?: ((date: Date) => string | null | undefined) | undefined;
|
|
43
|
-
onPageChange?: ((year: number, month: number) => void) | undefined;
|
|
44
|
-
} & {
|
|
45
|
-
selectionMode: 'single';
|
|
46
|
-
value?: Date | null | undefined;
|
|
47
|
-
defaultValue?: Date | null | undefined;
|
|
48
|
-
onChange?: ((val: Date) => void) | undefined;
|
|
49
|
-
} & NativeProps<never> & React.RefAttributes<CalenderRef>) | ({
|
|
50
|
-
weekStartsOn?: "Monday" | "Sunday" | undefined;
|
|
51
|
-
renderLabel?: ((date: Date) => string | null | undefined) | undefined;
|
|
52
|
-
onPageChange?: ((year: number, month: number) => void) | undefined;
|
|
53
|
-
} & {
|
|
54
|
-
selectionMode: 'range';
|
|
55
|
-
value?: [Date, Date] | null | undefined;
|
|
56
|
-
defaultValue?: [Date, Date] | null | undefined;
|
|
57
|
-
onChange?: ((val: [Date, Date]) => void) | undefined;
|
|
58
|
-
} & NativeProps<never> & React.RefAttributes<CalenderRef>)>;
|
|
31
|
+
export declare const Calendar: React.ForwardRefExoticComponent<CalendarProps & React.RefAttributes<CalenderRef>>;
|
|
59
32
|
export {};
|
|
@@ -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); }
|
|
@@ -110,23 +112,18 @@ const CapsuleTabs = props => {
|
|
|
110
112
|
return null;
|
|
111
113
|
}
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
}, pane.props.children);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return null;
|
|
115
|
+
const active = pane.key === activeKey;
|
|
116
|
+
return _react.default.createElement(_shouldRender.ShouldRender, {
|
|
117
|
+
key: pane.key,
|
|
118
|
+
active: active,
|
|
119
|
+
forceRender: pane.props.forceRender,
|
|
120
|
+
destroyOnClose: pane.props.destroyOnClose
|
|
121
|
+
}, _react.default.createElement("div", {
|
|
122
|
+
className: `${classPrefix}-content`,
|
|
123
|
+
style: {
|
|
124
|
+
display: active ? 'block' : 'none'
|
|
125
|
+
}
|
|
126
|
+
}, pane.props.children));
|
|
130
127
|
})));
|
|
131
128
|
};
|
|
132
129
|
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { CascadePickerProps } from './cascade-picker';
|
|
2
|
-
|
|
2
|
+
import type { PickerValue } from '../picker';
|
|
3
|
+
export declare function prompt(props: Omit<CascadePickerProps, 'value' | 'visible' | 'children'>): Promise<PickerValue[] | null>;
|
|
@@ -21,7 +21,9 @@ var _usePropsValue = require("../../utils/use-props-value");
|
|
|
21
21
|
|
|
22
22
|
var _ahooks = require("ahooks");
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _shouldRender = require("../../utils/should-render");
|
|
25
|
+
|
|
26
|
+
var _useIsomorphicUpdateLayoutEffect = require("../../utils/use-isomorphic-update-layout-effect");
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
@@ -42,7 +44,7 @@ const CollapsePanelContent = props => {
|
|
|
42
44
|
visible
|
|
43
45
|
} = props;
|
|
44
46
|
const innerRef = (0, _react.useRef)(null);
|
|
45
|
-
const shouldRender = (0,
|
|
47
|
+
const shouldRender = (0, _shouldRender.useShouldRender)(visible, props.forceRender, props.destroyOnClose);
|
|
46
48
|
const [{
|
|
47
49
|
height
|
|
48
50
|
}, api] = (0, _web.useSpring)(() => ({
|
|
@@ -59,7 +61,7 @@ const CollapsePanelContent = props => {
|
|
|
59
61
|
immediate: true
|
|
60
62
|
});
|
|
61
63
|
});
|
|
62
|
-
(0,
|
|
64
|
+
(0, _useIsomorphicUpdateLayoutEffect.useIsomorphicUpdateLayoutEffect)(() => {
|
|
63
65
|
const inner = innerRef.current;
|
|
64
66
|
if (!inner) return;
|
|
65
67
|
|
|
@@ -19,6 +19,8 @@ var _usePropsValue = require("../../utils/use-props-value");
|
|
|
19
19
|
|
|
20
20
|
var _datePickerUtils = require("./date-picker-utils");
|
|
21
21
|
|
|
22
|
+
var _bound = require("../../utils/bound");
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
26
|
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); }
|
|
@@ -47,7 +49,15 @@ const DatePicker = p => {
|
|
|
47
49
|
}
|
|
48
50
|
});
|
|
49
51
|
const now = (0, _react.useMemo)(() => new Date(), []);
|
|
50
|
-
const pickerValue = (0, _react.useMemo)(() =>
|
|
52
|
+
const pickerValue = (0, _react.useMemo)(() => {
|
|
53
|
+
let date = value;
|
|
54
|
+
|
|
55
|
+
if (date === null) {
|
|
56
|
+
date = new Date((0, _bound.bound)(now.getDate(), props.min.getDate(), props.max.getDate()));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (0, _datePickerUtils.convertDateToStringArray)(date, props.precision);
|
|
60
|
+
}, [value, props.precision]);
|
|
51
61
|
const onConfirm = (0, _react.useCallback)(val => {
|
|
52
62
|
setValue((0, _datePickerUtils.convertStringArrayToDate)(val, props.precision));
|
|
53
63
|
}, [setValue, props.precision]);
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _nativeProps = require("../../utils/native-props");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _shouldRender = require("../../utils/should-render");
|
|
15
15
|
|
|
16
16
|
var _antdMobileIcons = require("antd-mobile-icons");
|
|
17
17
|
|
|
@@ -47,7 +47,7 @@ const ItemChildrenWrap = props => {
|
|
|
47
47
|
const {
|
|
48
48
|
active = false
|
|
49
49
|
} = props;
|
|
50
|
-
const shouldRender = (0,
|
|
50
|
+
const shouldRender = (0, _shouldRender.useShouldRender)(active, props.forceRender, props.destroyOnClose);
|
|
51
51
|
const cls = (0, _classnames.default)(`${classPrefix}-content`, {
|
|
52
52
|
[`${classPrefix}-content-hidden`]: !active
|
|
53
53
|
});
|
|
@@ -12,6 +12,6 @@ export declare type FormProps = Pick<RcFormProps, 'form' | 'initialValues' | 'na
|
|
|
12
12
|
};
|
|
13
13
|
export declare const Form: React.ForwardRefExoticComponent<Pick<RcFormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & NativeProps<"--border-inner" | "--border-top" | "--border-bottom"> & Partial<FormContextType> & {
|
|
14
14
|
footer?: ReactNode;
|
|
15
|
-
layout?:
|
|
15
|
+
layout?: FormLayout | undefined;
|
|
16
16
|
mode?: ListProps['mode'];
|
|
17
|
-
} & React.RefAttributes<
|
|
17
|
+
} & React.RefAttributes<FormInstance>>;
|
|
@@ -8,9 +8,9 @@ export type { FormSubscribeProps } from './form-subscribe';
|
|
|
8
8
|
export type { ValidateMessages, FieldData, NamePath, } from 'rc-field-form/es/interface';
|
|
9
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,
|
|
@@ -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>;
|
|
@@ -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);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
|
+
declare type SelectorValue = string | number;
|
|
3
4
|
export interface SelectorOption<V> {
|
|
4
5
|
label: ReactNode;
|
|
5
6
|
description?: ReactNode;
|
|
@@ -18,4 +19,5 @@ export declare type SelectorProps<V> = {
|
|
|
18
19
|
}) => void;
|
|
19
20
|
showCheckMark?: boolean;
|
|
20
21
|
} & NativeProps<'--color' | '--checked-color' | '--text-color' | '--checked-text-color' | '--border' | '--checked-border' | '--border-radius' | '--padding'>;
|
|
21
|
-
export declare const Selector: <V extends
|
|
22
|
+
export declare const Selector: <V extends SelectorValue>(p: SelectorProps<V>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
23
|
+
export {};
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
import { InputProps } from '../input';
|
|
4
|
-
|
|
4
|
+
declare type ValueProps = {
|
|
5
|
+
allowEmpty: true;
|
|
5
6
|
value?: number | null;
|
|
6
7
|
defaultValue?: number | null;
|
|
7
8
|
onChange?: (value: number | null) => void;
|
|
9
|
+
};
|
|
10
|
+
declare type ValuePropsWithNull = {
|
|
11
|
+
allowEmpty?: false;
|
|
12
|
+
value?: number;
|
|
13
|
+
defaultValue?: number;
|
|
14
|
+
onChange?: (value: number) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare type StepperProps = Pick<InputProps, 'onFocus' | 'onBlur'> & (ValuePropsWithNull | ValueProps) & {
|
|
8
17
|
min?: number;
|
|
9
18
|
max?: number;
|
|
10
19
|
step?: number;
|
|
11
20
|
digits?: number;
|
|
12
21
|
disabled?: boolean;
|
|
13
22
|
inputReadOnly?: boolean;
|
|
14
|
-
allowEmpty?: boolean;
|
|
15
23
|
} & NativeProps<'--height' | '--input-width' | '--input-font-size' | '--input-background-color' | '--border-radius' | '--border' | '--border-inner' | '--active-border' | '--button-font-size' | '--button-background-color' | '--button-width' | '--input-font-color' | '--button-text-color'>;
|
|
16
24
|
export declare const Stepper: FC<StepperProps>;
|
|
25
|
+
export {};
|
|
@@ -7,15 +7,15 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
7
7
|
autoplay?: boolean | undefined;
|
|
8
8
|
autoplayInterval?: number | undefined;
|
|
9
9
|
loop?: boolean | undefined;
|
|
10
|
-
direction?: "
|
|
10
|
+
direction?: "vertical" | "horizontal" | undefined;
|
|
11
11
|
onIndexChange?: ((index: number) => void) | undefined;
|
|
12
|
-
indicatorProps?: Pick<import("../page-indicator").PageIndicatorProps, "style" | "
|
|
12
|
+
indicatorProps?: Pick<import("../page-indicator").PageIndicatorProps, "style" | "className" | "color"> | undefined;
|
|
13
13
|
indicator?: ((total: number, current: number) => import("react").ReactNode) | undefined;
|
|
14
14
|
slideSize?: number | undefined;
|
|
15
15
|
trackOffset?: number | undefined;
|
|
16
16
|
stuckAtBoundary?: boolean | undefined;
|
|
17
17
|
rubberband?: boolean | undefined;
|
|
18
|
-
children?: import("react").ReactElement<any, string |
|
|
18
|
+
children?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | undefined;
|
|
19
19
|
} & import("../../utils/native-props").NativeProps<"--border-radius" | "--width" | "--height" | "--track-padding"> & import("react").RefAttributes<import("./swiper").SwiperRef>> & {
|
|
20
20
|
Item: import("react").FC<{
|
|
21
21
|
onClick?: ((e: import("react").MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
@@ -28,13 +28,13 @@ export declare const Swiper: React.ForwardRefExoticComponent<{
|
|
|
28
28
|
autoplay?: boolean | undefined;
|
|
29
29
|
autoplayInterval?: number | undefined;
|
|
30
30
|
loop?: boolean | undefined;
|
|
31
|
-
direction?: "
|
|
31
|
+
direction?: "vertical" | "horizontal" | undefined;
|
|
32
32
|
onIndexChange?: ((index: number) => void) | undefined;
|
|
33
|
-
indicatorProps?: Pick<PageIndicatorProps, "style" | "
|
|
33
|
+
indicatorProps?: Pick<PageIndicatorProps, "style" | "className" | "color"> | undefined;
|
|
34
34
|
indicator?: ((total: number, current: number) => ReactNode) | undefined;
|
|
35
35
|
slideSize?: number | undefined;
|
|
36
36
|
trackOffset?: number | undefined;
|
|
37
37
|
stuckAtBoundary?: boolean | undefined;
|
|
38
38
|
rubberband?: boolean | undefined;
|
|
39
|
-
children?: React.ReactElement<any, string |
|
|
39
|
+
children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
|
|
40
40
|
} & NativeProps<"--border-radius" | "--width" | "--height" | "--track-padding"> & React.RefAttributes<SwiperRef>>;
|
|
@@ -25,6 +25,10 @@ var _useResizeEffect = require("../../utils/use-resize-effect");
|
|
|
25
25
|
|
|
26
26
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
27
27
|
|
|
28
|
+
var _useIsomorphicUpdateLayoutEffect = require("../../utils/use-isomorphic-update-layout-effect");
|
|
29
|
+
|
|
30
|
+
var _shouldRender = require("../../utils/should-render");
|
|
31
|
+
|
|
28
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
33
|
|
|
30
34
|
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); }
|
|
@@ -166,7 +170,7 @@ const Tabs = p => {
|
|
|
166
170
|
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
167
171
|
animate(!x.isAnimating);
|
|
168
172
|
}, []);
|
|
169
|
-
(0,
|
|
173
|
+
(0, _useIsomorphicUpdateLayoutEffect.useIsomorphicUpdateLayoutEffect)(() => {
|
|
170
174
|
animate();
|
|
171
175
|
}, [activeKey]);
|
|
172
176
|
(0, _useResizeEffect.useResizeEffect)(() => {
|
|
@@ -253,24 +257,18 @@ const Tabs = p => {
|
|
|
253
257
|
return null;
|
|
254
258
|
}
|
|
255
259
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
display: 'none'
|
|
269
|
-
}
|
|
270
|
-
}, pane.props.children);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
return null;
|
|
260
|
+
const active = pane.key === activeKey;
|
|
261
|
+
return _react.default.createElement(_shouldRender.ShouldRender, {
|
|
262
|
+
key: pane.key,
|
|
263
|
+
active: active,
|
|
264
|
+
forceRender: pane.props.forceRender,
|
|
265
|
+
destroyOnClose: pane.props.destroyOnClose
|
|
266
|
+
}, _react.default.createElement("div", {
|
|
267
|
+
className: `${classPrefix}-content`,
|
|
268
|
+
style: {
|
|
269
|
+
display: active ? 'block' : 'none'
|
|
270
|
+
}
|
|
271
|
+
}, pane.props.children));
|
|
274
272
|
})));
|
|
275
273
|
};
|
|
276
274
|
|
|
@@ -18,7 +18,7 @@ export declare const VirtualInput: React.ForwardRefExoticComponent<{
|
|
|
18
18
|
onFocus?: (() => void) | undefined;
|
|
19
19
|
onBlur?: (() => void) | undefined;
|
|
20
20
|
onClick?: ((e: React.MouseEvent<HTMLDivElement>) => void) | undefined;
|
|
21
|
-
keyboard?: React.ReactElement<NumberKeyboardProps, string |
|
|
21
|
+
keyboard?: React.ReactElement<NumberKeyboardProps, string | React.JSXElementConstructor<any>> | undefined;
|
|
22
22
|
clearable?: boolean | undefined;
|
|
23
23
|
onClear?: (() => void) | undefined;
|
|
24
|
-
} & Pick<InputProps, "value" | "
|
|
24
|
+
} & Pick<InputProps, "value" | "onChange" | "disabled" | "placeholder"> & NativeProps<"--color" | "--font-size" | "--placeholder-color" | "--text-align" | "--disabled-color" | "--caret-width" | "--caret-color"> & React.RefAttributes<VirtualInputRef>>;
|
|
@@ -16,9 +16,11 @@ function measureCSSLength(raw) {
|
|
|
16
16
|
return parseFloat(withUnit);
|
|
17
17
|
} else if (withUnit.endsWith('rem')) {
|
|
18
18
|
return parseFloat(withUnit) * parseFloat(window.getComputedStyle(document.documentElement).fontSize);
|
|
19
|
+
} else if (withUnit.endsWith('vw')) {
|
|
20
|
+
return parseFloat(withUnit) * window.innerWidth / 100;
|
|
19
21
|
} else {
|
|
20
22
|
if (_isDev.isDev) {
|
|
21
|
-
(0, _devLog.devError)('Global', 'You are using a not supported CSS unit. Only `px` and `
|
|
23
|
+
(0, _devLog.devError)('Global', 'You are using a not supported CSS unit. Only `px` `rem` and `vw` are supported.');
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
return 0;
|
|
@@ -5,4 +5,4 @@ export interface NativeProps<S extends string = never> {
|
|
|
5
5
|
style?: CSSProperties & Partial<Record<S, string>>;
|
|
6
6
|
tabIndex?: number;
|
|
7
7
|
}
|
|
8
|
-
export declare function withNativeProps<P extends NativeProps>(props: P, element: ReactElement): React.ReactElement<any, string |
|
|
8
|
+
export declare function withNativeProps<P extends NativeProps>(props: P, element: ReactElement): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
export declare type GetContainer = HTMLElement | (() => HTMLElement) | null;
|
|
3
|
-
export declare function renderToContainer(getContainer: GetContainer, node: ReactElement): ReactElement<any, string |
|
|
3
|
+
export declare function renderToContainer(getContainer: GetContainer, node: ReactElement): ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, ReactElement } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
active: boolean;
|
|
4
|
+
forceRender?: boolean;
|
|
5
|
+
destroyOnClose?: boolean;
|
|
6
|
+
children: ReactElement;
|
|
7
|
+
}
|
|
8
|
+
export declare const ShouldRender: FC<Props>;
|
|
9
|
+
export declare function useShouldRender(active: boolean, forceRender?: boolean, destroyOnClose?: boolean): boolean;
|
|
10
|
+
export {};
|
|
@@ -3,10 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.ShouldRender = void 0;
|
|
6
7
|
exports.useShouldRender = useShouldRender;
|
|
7
8
|
|
|
8
9
|
var _useInitialized = require("./use-initialized");
|
|
9
10
|
|
|
11
|
+
const ShouldRender = props => {
|
|
12
|
+
const shouldRender = useShouldRender(props.active, props.forceRender, props.destroyOnClose);
|
|
13
|
+
return shouldRender ? props.children : null;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.ShouldRender = ShouldRender;
|
|
17
|
+
|
|
10
18
|
function useShouldRender(active, forceRender, destroyOnClose) {
|
|
11
19
|
const initialized = (0, _useInitialized.useInitialized)(active);
|
|
12
20
|
if (forceRender) return true;
|