antd-mobile 5.31.1 → 5.32.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/bundle/antd-mobile.cjs.development.js +281 -252
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +282 -253
- package/2x/bundle/antd-mobile.es.js +4494 -4468
- package/2x/bundle/antd-mobile.umd.development.js +281 -252
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/style.css +1 -0
- package/2x/cjs/components/calendar/convert.js +1 -6
- package/2x/cjs/components/capsule-tabs/capsule-tabs.js +2 -4
- package/2x/cjs/components/cascader/cascader.d.ts +2 -0
- package/2x/cjs/components/cascader/index.d.ts +1 -0
- package/2x/cjs/components/checkbox/checkbox.d.ts +2 -0
- package/2x/cjs/components/checkbox/checkbox.js +1 -0
- package/2x/cjs/components/checkbox/index.d.ts +1 -0
- package/2x/cjs/components/collapse/collapse.js +1 -1
- package/2x/cjs/components/date-picker/date-picker-date-utils.js +24 -36
- package/2x/cjs/components/date-picker/date-picker-week-utils.js +12 -18
- package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +7 -5
- package/2x/cjs/components/date-picker-view/date-picker-view.js +8 -2
- package/2x/cjs/components/dropdown/dropdown.js +1 -1
- package/2x/cjs/components/footer/footer.js +17 -21
- package/2x/cjs/components/image-uploader/image-uploader.js +1 -3
- package/2x/cjs/components/input/input.js +5 -1
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.js +1 -1
- package/2x/cjs/components/modal/modal.js +11 -13
- package/2x/cjs/components/popover/popover.js +5 -7
- package/2x/cjs/components/popup/popup.js +3 -3
- package/2x/cjs/components/radio/radio.d.ts +1 -0
- package/2x/cjs/components/radio/radio.js +1 -0
- package/2x/cjs/components/rate/star.d.ts +1 -1
- package/2x/cjs/components/result/result.js +2 -2
- package/2x/cjs/components/safe-area/safe-area.d.ts +1 -1
- package/2x/cjs/components/safe-area/safe-area.js +1 -1
- package/2x/cjs/components/side-bar/side-bar.d.ts +1 -2
- package/2x/cjs/components/side-bar/side-bar.js +4 -2
- package/2x/cjs/components/skeleton/skeleton.d.ts +1 -1
- package/2x/cjs/components/stepper/stepper.js +1 -5
- package/2x/cjs/components/tab-bar/tab-bar.d.ts +1 -2
- package/2x/cjs/components/tab-bar/tab-bar.js +4 -2
- package/2x/cjs/components/tabs/tabs.js +1 -1
- package/2x/cjs/components/text-area/text-area.css +1 -0
- package/2x/cjs/components/tree-select/multiple.js +2 -6
- package/2x/cjs/components/virtual-input/virtual-input.js +1 -1
- package/2x/cjs/locales/ru-RU.d.ts +134 -0
- package/2x/cjs/locales/ru-RU.js +144 -0
- package/2x/es/components/calendar/convert.js +1 -6
- package/2x/es/components/capsule-tabs/capsule-tabs.js +3 -5
- package/2x/es/components/cascader/cascader.d.ts +2 -0
- package/2x/es/components/cascader/index.d.ts +1 -0
- package/2x/es/components/checkbox/checkbox.d.ts +2 -0
- package/2x/es/components/checkbox/checkbox.js +1 -0
- package/2x/es/components/checkbox/index.d.ts +1 -0
- package/2x/es/components/collapse/collapse.js +2 -2
- package/2x/es/components/date-picker/date-picker-date-utils.js +24 -36
- package/2x/es/components/date-picker/date-picker-week-utils.js +12 -18
- package/2x/es/components/date-picker-view/date-picker-view.d.ts +7 -5
- package/2x/es/components/date-picker-view/date-picker-view.js +8 -2
- package/2x/es/components/dropdown/dropdown.js +2 -2
- package/2x/es/components/footer/footer.js +17 -21
- package/2x/es/components/image-uploader/image-uploader.js +1 -3
- package/2x/es/components/input/input.js +5 -1
- package/2x/es/components/jumbo-tabs/jumbo-tabs.js +2 -2
- package/2x/es/components/modal/modal.js +11 -13
- package/2x/es/components/popover/popover.js +5 -7
- package/2x/es/components/popup/popup.js +3 -3
- package/2x/es/components/radio/radio.d.ts +1 -0
- package/2x/es/components/radio/radio.js +1 -0
- package/2x/es/components/rate/star.d.ts +1 -1
- package/2x/es/components/result/result.js +2 -2
- package/2x/es/components/safe-area/safe-area.d.ts +1 -1
- package/2x/es/components/safe-area/safe-area.js +1 -1
- package/2x/es/components/side-bar/side-bar.d.ts +1 -2
- package/2x/es/components/side-bar/side-bar.js +2 -2
- package/2x/es/components/skeleton/skeleton.d.ts +1 -1
- package/2x/es/components/stepper/stepper.js +1 -5
- package/2x/es/components/tab-bar/tab-bar.d.ts +1 -2
- package/2x/es/components/tab-bar/tab-bar.js +2 -2
- package/2x/es/components/tabs/tabs.js +2 -2
- package/2x/es/components/text-area/text-area.css +1 -0
- package/2x/es/components/tree-select/multiple.js +2 -6
- package/2x/es/components/virtual-input/virtual-input.js +1 -1
- package/2x/es/locales/ru-RU.d.ts +134 -0
- package/2x/es/locales/ru-RU.js +137 -0
- package/2x/package.json +2 -2
- package/bundle/antd-mobile.cjs.development.js +281 -252
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +282 -253
- package/bundle/antd-mobile.es.js +4494 -4468
- package/bundle/antd-mobile.umd.development.js +281 -252
- package/bundle/antd-mobile.umd.js +9 -9
- package/bundle/style.css +1 -1
- package/cjs/components/calendar/convert.js +1 -6
- package/cjs/components/capsule-tabs/capsule-tabs.js +2 -4
- package/cjs/components/cascader/cascader.d.ts +2 -0
- package/cjs/components/cascader/index.d.ts +1 -0
- package/cjs/components/checkbox/checkbox.d.ts +2 -0
- package/cjs/components/checkbox/checkbox.js +1 -0
- package/cjs/components/checkbox/index.d.ts +1 -0
- package/cjs/components/collapse/collapse.js +1 -1
- package/cjs/components/date-picker/date-picker-date-utils.js +24 -36
- package/cjs/components/date-picker/date-picker-week-utils.js +12 -18
- package/cjs/components/date-picker-view/date-picker-view.d.ts +7 -5
- package/cjs/components/date-picker-view/date-picker-view.js +8 -2
- package/cjs/components/dropdown/dropdown.js +1 -1
- package/cjs/components/footer/footer.js +17 -21
- package/cjs/components/image-uploader/image-uploader.js +1 -3
- package/cjs/components/input/input.js +5 -1
- package/cjs/components/jumbo-tabs/jumbo-tabs.js +1 -1
- package/cjs/components/modal/modal.js +11 -13
- package/cjs/components/popover/popover.js +5 -7
- package/cjs/components/popup/popup.js +3 -3
- package/cjs/components/radio/radio.d.ts +1 -0
- package/cjs/components/radio/radio.js +1 -0
- package/cjs/components/rate/star.d.ts +1 -1
- package/cjs/components/result/result.js +2 -2
- package/cjs/components/safe-area/safe-area.d.ts +1 -1
- package/cjs/components/safe-area/safe-area.js +1 -1
- package/cjs/components/side-bar/side-bar.d.ts +1 -2
- package/cjs/components/side-bar/side-bar.js +4 -2
- package/cjs/components/skeleton/skeleton.d.ts +1 -1
- package/cjs/components/stepper/stepper.js +1 -5
- package/cjs/components/tab-bar/tab-bar.d.ts +1 -2
- package/cjs/components/tab-bar/tab-bar.js +4 -2
- package/cjs/components/tabs/tabs.js +1 -1
- package/cjs/components/text-area/text-area.css +1 -0
- package/cjs/components/tree-select/multiple.js +2 -6
- package/cjs/components/virtual-input/virtual-input.js +1 -1
- package/cjs/locales/ru-RU.d.ts +134 -0
- package/cjs/locales/ru-RU.js +144 -0
- package/es/components/calendar/convert.js +1 -6
- package/es/components/capsule-tabs/capsule-tabs.js +3 -5
- package/es/components/cascader/cascader.d.ts +2 -0
- package/es/components/cascader/index.d.ts +1 -0
- package/es/components/checkbox/checkbox.d.ts +2 -0
- package/es/components/checkbox/checkbox.js +1 -0
- package/es/components/checkbox/index.d.ts +1 -0
- package/es/components/collapse/collapse.js +2 -2
- package/es/components/date-picker/date-picker-date-utils.js +24 -36
- package/es/components/date-picker/date-picker-week-utils.js +12 -18
- package/es/components/date-picker-view/date-picker-view.d.ts +7 -5
- package/es/components/date-picker-view/date-picker-view.js +8 -2
- package/es/components/dropdown/dropdown.js +2 -2
- package/es/components/footer/footer.js +17 -21
- package/es/components/image-uploader/image-uploader.js +1 -3
- package/es/components/input/input.js +5 -1
- package/es/components/jumbo-tabs/jumbo-tabs.js +2 -2
- package/es/components/modal/modal.js +11 -13
- package/es/components/popover/popover.js +5 -7
- package/es/components/popup/popup.js +3 -3
- package/es/components/radio/radio.d.ts +1 -0
- package/es/components/radio/radio.js +1 -0
- package/es/components/rate/star.d.ts +1 -1
- package/es/components/result/result.js +2 -2
- package/es/components/safe-area/safe-area.d.ts +1 -1
- package/es/components/safe-area/safe-area.js +1 -1
- package/es/components/side-bar/side-bar.d.ts +1 -2
- package/es/components/side-bar/side-bar.js +2 -2
- package/es/components/skeleton/skeleton.d.ts +1 -1
- package/es/components/stepper/stepper.js +1 -5
- package/es/components/tab-bar/tab-bar.d.ts +1 -2
- package/es/components/tab-bar/tab-bar.js +2 -2
- package/es/components/tabs/tabs.js +2 -2
- package/es/components/text-area/text-area.css +1 -0
- package/es/components/tree-select/multiple.js +2 -6
- package/es/components/virtual-input/virtual-input.js +1 -1
- package/es/locales/ru-RU.d.ts +134 -0
- package/es/locales/ru-RU.js +137 -0
- package/package.json +2 -2
- package/umd/antd-mobile.js +1 -1
|
@@ -35,29 +35,25 @@ export const Footer = p => {
|
|
|
35
35
|
className: classNames(classPrefix)
|
|
36
36
|
}, label && React.createElement("div", {
|
|
37
37
|
className: `${classPrefix}-label`
|
|
38
|
-
}, React.createElement(Divider, null, label)), links
|
|
38
|
+
}, React.createElement(Divider, null, label)), !!(links === null || links === void 0 ? void 0 : links.length) && React.createElement("div", {
|
|
39
39
|
className: `${classPrefix}-links`
|
|
40
|
-
}, links.map((link, index) => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}));
|
|
50
|
-
})), content && React.createElement("div", {
|
|
40
|
+
}, links.map((link, index) => React.createElement(React.Fragment, {
|
|
41
|
+
key: index
|
|
42
|
+
}, React.createElement("a", {
|
|
43
|
+
href: link.href,
|
|
44
|
+
rel: 'noopener noreferrer',
|
|
45
|
+
onClick: event => clickLinkItem(link, index, event)
|
|
46
|
+
}, link.text), index !== links.length - 1 && React.createElement(Divider, {
|
|
47
|
+
direction: 'vertical'
|
|
48
|
+
})))), content && React.createElement("div", {
|
|
51
49
|
className: `${classPrefix}-content`
|
|
52
50
|
}, content), chips && chips.length > 0 && React.createElement("div", {
|
|
53
51
|
className: `${classPrefix}-chips`
|
|
54
|
-
}, chips.map((chip, index) => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, chip.text);
|
|
62
|
-
}))));
|
|
52
|
+
}, chips.map((chip, index) => React.createElement("div", {
|
|
53
|
+
key: index,
|
|
54
|
+
onClick: () => clickChipItem(chip, index),
|
|
55
|
+
className: classNames(`${classPrefix}-chip`, {
|
|
56
|
+
[`${classPrefix}-chip-link`]: chip.type === 'link'
|
|
57
|
+
})
|
|
58
|
+
}, chip.text)))));
|
|
63
59
|
};
|
|
@@ -95,9 +95,7 @@ export const ImageUploader = p => {
|
|
|
95
95
|
let files = [].slice.call(rawFiles);
|
|
96
96
|
e.target.value = ''; // HACK: fix the same file doesn't trigger onChange
|
|
97
97
|
if (props.beforeUpload) {
|
|
98
|
-
const postFiles = files.map(file =>
|
|
99
|
-
return processFile(file, files);
|
|
100
|
-
});
|
|
98
|
+
const postFiles = files.map(file => processFile(file, files));
|
|
101
99
|
yield Promise.all(postFiles).then(filesList => {
|
|
102
100
|
files = filesList.filter(Boolean);
|
|
103
101
|
});
|
|
@@ -57,7 +57,11 @@ export const Input = forwardRef((p, ref) => {
|
|
|
57
57
|
function checkValue() {
|
|
58
58
|
let nextValue = value;
|
|
59
59
|
if (props.type === 'number') {
|
|
60
|
-
|
|
60
|
+
const boundValue = nextValue && bound(parseFloat(nextValue), props.min, props.max).toString();
|
|
61
|
+
// fix the display issue of numbers starting with 0
|
|
62
|
+
if (Number(nextValue) !== Number(boundValue)) {
|
|
63
|
+
nextValue = boundValue;
|
|
64
|
+
}
|
|
61
65
|
}
|
|
62
66
|
if (nextValue !== value) {
|
|
63
67
|
setValue(nextValue);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
1
|
+
import React, { isValidElement, useRef } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { animated } from '@react-spring/web';
|
|
4
4
|
import { withNativeProps } from '../../utils/native-props';
|
|
@@ -20,7 +20,7 @@ export const JumboTabs = props => {
|
|
|
20
20
|
let firstActiveKey = null;
|
|
21
21
|
const panes = [];
|
|
22
22
|
traverseReactNode(props.children, (child, index) => {
|
|
23
|
-
if (!
|
|
23
|
+
if (!isValidElement(child)) return;
|
|
24
24
|
const key = child.key;
|
|
25
25
|
if (typeof key !== 'string') return;
|
|
26
26
|
if (index === 0) {
|
|
@@ -31,19 +31,17 @@ export const Modal = p => {
|
|
|
31
31
|
direction: 'vertical',
|
|
32
32
|
block: true,
|
|
33
33
|
className: classNames(cls('footer'), props.actions.length === 0 && cls('footer-empty'))
|
|
34
|
-
}, props.actions.map((action, index) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
46
|
-
})));
|
|
34
|
+
}, props.actions.map((action, index) => React.createElement(ModalActionButton, {
|
|
35
|
+
key: action.key,
|
|
36
|
+
action: action,
|
|
37
|
+
onAction: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
+
var _a, _b, _c;
|
|
39
|
+
yield Promise.all([(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action), (_b = props.onAction) === null || _b === void 0 ? void 0 : _b.call(props, action, index)]);
|
|
40
|
+
if (props.closeOnAction) {
|
|
41
|
+
(_c = props.onClose) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
}))));
|
|
47
45
|
return React.createElement(CenterPopup, {
|
|
48
46
|
className: classNames(cls(), props.className),
|
|
49
47
|
style: props.style,
|
|
@@ -31,13 +31,11 @@ export const Popover = forwardRef((p, ref) => {
|
|
|
31
31
|
defaultValue: props.defaultVisible,
|
|
32
32
|
onChange: props.onVisibleChange
|
|
33
33
|
});
|
|
34
|
-
useImperativeHandle(ref, () => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
}, [visible]);
|
|
34
|
+
useImperativeHandle(ref, () => ({
|
|
35
|
+
show: () => setVisible(true),
|
|
36
|
+
hide: () => setVisible(false),
|
|
37
|
+
visible
|
|
38
|
+
}), [visible]);
|
|
41
39
|
const targetRef = useRef(null);
|
|
42
40
|
const floatingRef = useRef(null);
|
|
43
41
|
const arrowRef = useRef(null);
|
|
@@ -21,18 +21,18 @@ const defaultProps = Object.assign(Object.assign({}, defaultPopupBaseProps), {
|
|
|
21
21
|
});
|
|
22
22
|
export const Popup = p => {
|
|
23
23
|
const props = mergeProps(defaultProps, p);
|
|
24
|
+
const bodyCls = classNames(`${classPrefix}-body`, props.bodyClassName, `${classPrefix}-body-position-${props.position}`);
|
|
24
25
|
const {
|
|
25
26
|
locale
|
|
26
27
|
} = useConfig();
|
|
27
|
-
const bodyCls = classNames(`${classPrefix}-body`, props.bodyClassName, `${classPrefix}-body-position-${props.position}`);
|
|
28
28
|
const [active, setActive] = useState(props.visible);
|
|
29
|
+
const ref = useRef(null);
|
|
30
|
+
useLockScroll(ref, props.disableBodyScroll && active ? 'strict' : false);
|
|
29
31
|
useIsomorphicLayoutEffect(() => {
|
|
30
32
|
if (props.visible) {
|
|
31
33
|
setActive(true);
|
|
32
34
|
}
|
|
33
35
|
}, [props.visible]);
|
|
34
|
-
const ref = useRef(null);
|
|
35
|
-
useLockScroll(ref, props.disableBodyScroll && active ? 'strict' : false);
|
|
36
36
|
const unmountedRef = useUnmountedRef();
|
|
37
37
|
const {
|
|
38
38
|
percent
|
|
@@ -11,5 +11,6 @@ export declare type RadioProps = {
|
|
|
11
11
|
id?: string;
|
|
12
12
|
icon?: (checked: boolean) => React.ReactNode;
|
|
13
13
|
children?: React.ReactNode;
|
|
14
|
+
onClick?: (event: React.MouseEvent<HTMLLabelElement, MouseEvent>) => void;
|
|
14
15
|
} & NativeProps<'--icon-size' | '--font-size' | '--gap'>;
|
|
15
16
|
export declare const Radio: FC<RadioProps>;
|
|
@@ -56,6 +56,7 @@ export const Radio = p => {
|
|
|
56
56
|
}, checked && React.createElement(CheckIcon, null));
|
|
57
57
|
};
|
|
58
58
|
return withNativeProps(props, React.createElement("label", {
|
|
59
|
+
onClick: props.onClick,
|
|
59
60
|
className: classNames(classPrefix, {
|
|
60
61
|
[`${classPrefix}-checked`]: checked,
|
|
61
62
|
[`${classPrefix}-disabled`]: disabled,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
export declare const Star: FC;
|
|
@@ -30,7 +30,7 @@ export const Result = p => {
|
|
|
30
30
|
className: `${classPrefix}-icon`
|
|
31
31
|
}, resultIcon), React.createElement("div", {
|
|
32
32
|
className: `${classPrefix}-title`
|
|
33
|
-
}, title), description
|
|
33
|
+
}, title), !!description && React.createElement("div", {
|
|
34
34
|
className: `${classPrefix}-description`
|
|
35
|
-
}, description)
|
|
35
|
+
}, description)));
|
|
36
36
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { isValidElement } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import Badge from '../badge';
|
|
4
4
|
import { withNativeProps } from '../../utils/native-props';
|
|
@@ -15,7 +15,7 @@ export const SideBar = props => {
|
|
|
15
15
|
let firstActiveKey = null;
|
|
16
16
|
const items = [];
|
|
17
17
|
traverseReactNode(props.children, (child, index) => {
|
|
18
|
-
if (!
|
|
18
|
+
if (!isValidElement(child)) return;
|
|
19
19
|
const key = child.key;
|
|
20
20
|
if (typeof key !== 'string') return;
|
|
21
21
|
if (index === 0) {
|
|
@@ -64,11 +64,7 @@ export function InnerStepper(p, ref) {
|
|
|
64
64
|
};
|
|
65
65
|
const formatValue = value => {
|
|
66
66
|
if (value === null) return '';
|
|
67
|
-
|
|
68
|
-
return formatter(value);
|
|
69
|
-
} else {
|
|
70
|
-
return fixedValue(value);
|
|
71
|
-
}
|
|
67
|
+
return formatter ? formatter(value) : fixedValue(value);
|
|
72
68
|
};
|
|
73
69
|
// ======================== Value & InputValue ========================
|
|
74
70
|
const [mergedValue, setMergedValue] = useMergedState(defaultValue, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { isValidElement } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { withNativeProps } from '../../utils/native-props';
|
|
4
4
|
import { mergeProps } from '../../utils/with-default-props';
|
|
@@ -20,7 +20,7 @@ export const TabBar = p => {
|
|
|
20
20
|
let firstActiveKey = null;
|
|
21
21
|
const items = [];
|
|
22
22
|
traverseReactNode(props.children, (child, index) => {
|
|
23
|
-
if (!
|
|
23
|
+
if (!isValidElement(child)) return;
|
|
24
24
|
const key = child.key;
|
|
25
25
|
if (typeof key !== 'string') return;
|
|
26
26
|
if (index === 0) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
1
|
+
import React, { isValidElement, useRef } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { useSpring, animated } from '@react-spring/web';
|
|
4
4
|
import { withNativeProps } from '../../utils/native-props';
|
|
@@ -28,7 +28,7 @@ export const Tabs = p => {
|
|
|
28
28
|
let firstActiveKey = null;
|
|
29
29
|
const panes = [];
|
|
30
30
|
traverseReactNode(props.children, (child, index) => {
|
|
31
|
-
if (!
|
|
31
|
+
if (!isValidElement(child)) return;
|
|
32
32
|
const key = child.key;
|
|
33
33
|
if (typeof key !== 'string') return;
|
|
34
34
|
if (index === 0) {
|
|
@@ -224,13 +224,9 @@ export const Multiple = p => {
|
|
|
224
224
|
}
|
|
225
225
|
const isLeaf = deep === index + 1;
|
|
226
226
|
if (isLeaf) {
|
|
227
|
-
return React.createElement(React.Fragment, null, renderSelectAllLeafItem(columnOptions, index), columnOptions.map(option =>
|
|
228
|
-
return renderLeafItem(option);
|
|
229
|
-
}));
|
|
227
|
+
return React.createElement(React.Fragment, null, renderSelectAllLeafItem(columnOptions, index), columnOptions.map(option => renderLeafItem(option)));
|
|
230
228
|
}
|
|
231
|
-
return React.createElement(React.Fragment, null, renderSelectAllItem(columnOptions, index), columnOptions.map(option =>
|
|
232
|
-
return renderItem(option);
|
|
233
|
-
}));
|
|
229
|
+
return React.createElement(React.Fragment, null, renderSelectAllItem(columnOptions, index), columnOptions.map(option => renderItem(option)));
|
|
234
230
|
};
|
|
235
231
|
const renderColumns = () => {
|
|
236
232
|
var _a;
|
|
@@ -106,7 +106,7 @@ export const VirtualInput = forwardRef((p, ref) => {
|
|
|
106
106
|
},
|
|
107
107
|
role: 'button',
|
|
108
108
|
"aria-label": locale.Input.clear
|
|
109
|
-
}, React.createElement(CloseCircleFill, null)),
|
|
109
|
+
}, React.createElement(CloseCircleFill, null)), [undefined, null, ''].includes(value) && React.createElement("div", {
|
|
110
110
|
className: `${classPrefix}-placeholder`
|
|
111
111
|
}, props.placeholder), keyboardElement));
|
|
112
112
|
});
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
declare const ruRU: {
|
|
2
|
+
locale: string;
|
|
3
|
+
common: {
|
|
4
|
+
confirm: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
loading: string;
|
|
7
|
+
close: string;
|
|
8
|
+
};
|
|
9
|
+
Calendar: {
|
|
10
|
+
markItems: string[];
|
|
11
|
+
renderYearAndMonth: (year: number, month: number) => string;
|
|
12
|
+
};
|
|
13
|
+
Cascader: {
|
|
14
|
+
placeholder: string;
|
|
15
|
+
};
|
|
16
|
+
Dialog: {
|
|
17
|
+
ok: string;
|
|
18
|
+
};
|
|
19
|
+
DatePicker: {
|
|
20
|
+
tillNow: string;
|
|
21
|
+
};
|
|
22
|
+
ErrorBlock: {
|
|
23
|
+
default: {
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
busy: {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
disconnected: {
|
|
32
|
+
title: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
empty: {
|
|
36
|
+
title: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
Form: {
|
|
41
|
+
required: string;
|
|
42
|
+
optional: string;
|
|
43
|
+
defaultValidateMessages: {
|
|
44
|
+
default: string;
|
|
45
|
+
required: string;
|
|
46
|
+
enum: string;
|
|
47
|
+
whitespace: string;
|
|
48
|
+
date: {
|
|
49
|
+
format: string;
|
|
50
|
+
parse: string;
|
|
51
|
+
invalid: string;
|
|
52
|
+
};
|
|
53
|
+
types: {
|
|
54
|
+
string: string;
|
|
55
|
+
method: string;
|
|
56
|
+
array: string;
|
|
57
|
+
object: string;
|
|
58
|
+
number: string;
|
|
59
|
+
date: string;
|
|
60
|
+
boolean: string;
|
|
61
|
+
integer: string;
|
|
62
|
+
float: string;
|
|
63
|
+
regexp: string;
|
|
64
|
+
email: string;
|
|
65
|
+
url: string;
|
|
66
|
+
hex: string;
|
|
67
|
+
};
|
|
68
|
+
string: {
|
|
69
|
+
len: string;
|
|
70
|
+
min: string;
|
|
71
|
+
max: string;
|
|
72
|
+
range: string;
|
|
73
|
+
};
|
|
74
|
+
number: {
|
|
75
|
+
len: string;
|
|
76
|
+
min: string;
|
|
77
|
+
max: string;
|
|
78
|
+
range: string;
|
|
79
|
+
};
|
|
80
|
+
array: {
|
|
81
|
+
len: string;
|
|
82
|
+
min: string;
|
|
83
|
+
max: string;
|
|
84
|
+
range: string;
|
|
85
|
+
};
|
|
86
|
+
pattern: {
|
|
87
|
+
mismatch: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
ImageUploader: {
|
|
92
|
+
uploading: string;
|
|
93
|
+
upload: string;
|
|
94
|
+
};
|
|
95
|
+
InfiniteScroll: {
|
|
96
|
+
noMore: string;
|
|
97
|
+
failedToLoad: string;
|
|
98
|
+
retry: string;
|
|
99
|
+
};
|
|
100
|
+
Input: {
|
|
101
|
+
clear: string;
|
|
102
|
+
};
|
|
103
|
+
Mask: {
|
|
104
|
+
name: string;
|
|
105
|
+
};
|
|
106
|
+
Modal: {
|
|
107
|
+
ok: string;
|
|
108
|
+
};
|
|
109
|
+
PasscodeInput: {
|
|
110
|
+
name: string;
|
|
111
|
+
};
|
|
112
|
+
PullToRefresh: {
|
|
113
|
+
pulling: string;
|
|
114
|
+
canRelease: string;
|
|
115
|
+
complete: string;
|
|
116
|
+
};
|
|
117
|
+
SearchBar: {
|
|
118
|
+
name: string;
|
|
119
|
+
};
|
|
120
|
+
Slider: {
|
|
121
|
+
name: string;
|
|
122
|
+
};
|
|
123
|
+
Stepper: {
|
|
124
|
+
decrease: string;
|
|
125
|
+
increase: string;
|
|
126
|
+
};
|
|
127
|
+
Switch: {
|
|
128
|
+
name: string;
|
|
129
|
+
};
|
|
130
|
+
Selector: {
|
|
131
|
+
name: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export default ruRU;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { mergeLocale } from '../utils/merge-locale';
|
|
2
|
+
import { base } from './base';
|
|
3
|
+
const typeTemplate = '${label} не соответствует типу ${type}';
|
|
4
|
+
const ruRU = mergeLocale(base, {
|
|
5
|
+
locale: 'ru',
|
|
6
|
+
common: {
|
|
7
|
+
confirm: 'Подтвердить',
|
|
8
|
+
cancel: 'Отменить',
|
|
9
|
+
loading: 'Загрузка',
|
|
10
|
+
close: 'Закрыть'
|
|
11
|
+
},
|
|
12
|
+
Calendar: {
|
|
13
|
+
markItems: ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'],
|
|
14
|
+
renderYearAndMonth: (year, month) => `${year}/${month}`
|
|
15
|
+
},
|
|
16
|
+
Cascader: {
|
|
17
|
+
placeholder: 'Выбор'
|
|
18
|
+
},
|
|
19
|
+
Dialog: {
|
|
20
|
+
ok: 'ОК'
|
|
21
|
+
},
|
|
22
|
+
DatePicker: {
|
|
23
|
+
tillNow: 'До настоящего времени'
|
|
24
|
+
},
|
|
25
|
+
ErrorBlock: {
|
|
26
|
+
default: {
|
|
27
|
+
title: 'Упс! Что-то пошло не так',
|
|
28
|
+
description: 'Пожалуйста, подождите минуту и повторите попытку'
|
|
29
|
+
},
|
|
30
|
+
busy: {
|
|
31
|
+
title: 'Упс, не загружается',
|
|
32
|
+
description: 'Попробуйте обновить страницу'
|
|
33
|
+
},
|
|
34
|
+
disconnected: {
|
|
35
|
+
title: 'Сеть занята',
|
|
36
|
+
description: 'Попробуйте обновить страницу'
|
|
37
|
+
},
|
|
38
|
+
empty: {
|
|
39
|
+
title: 'Хм, не могу найти...',
|
|
40
|
+
description: 'Хотите попробовать другой запрос?'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
Form: {
|
|
44
|
+
required: 'Обязательное',
|
|
45
|
+
optional: 'Опциональное',
|
|
46
|
+
defaultValidateMessages: {
|
|
47
|
+
default: 'Ошибка валидации поля ${label}',
|
|
48
|
+
required: 'Пожалуйста, заполните поле ${label}',
|
|
49
|
+
enum: 'Значение ${label} должно быть одним из [${enum}]',
|
|
50
|
+
whitespace: '${label} не может быть пустым символом',
|
|
51
|
+
date: {
|
|
52
|
+
format: '${label} имеет некорректный формат даты',
|
|
53
|
+
parse: '${label} не может быть конвертировано в дату',
|
|
54
|
+
invalid: '${label} не является валидной датой'
|
|
55
|
+
},
|
|
56
|
+
types: {
|
|
57
|
+
string: typeTemplate,
|
|
58
|
+
method: typeTemplate,
|
|
59
|
+
array: typeTemplate,
|
|
60
|
+
object: typeTemplate,
|
|
61
|
+
number: typeTemplate,
|
|
62
|
+
date: typeTemplate,
|
|
63
|
+
boolean: typeTemplate,
|
|
64
|
+
integer: typeTemplate,
|
|
65
|
+
float: typeTemplate,
|
|
66
|
+
regexp: typeTemplate,
|
|
67
|
+
email: typeTemplate,
|
|
68
|
+
url: typeTemplate,
|
|
69
|
+
hex: typeTemplate
|
|
70
|
+
},
|
|
71
|
+
string: {
|
|
72
|
+
len: 'Длина ${label} должна быть ${len} символов(-а)',
|
|
73
|
+
min: 'Длина ${label} должна быть не меньше ${min} символов(-а)',
|
|
74
|
+
max: 'Длина ${label} должна быть не больше ${max} символов(-а)',
|
|
75
|
+
range: 'Длина ${label} должна быть в диапазоне от ${min} до ${max} символов(-а)'
|
|
76
|
+
},
|
|
77
|
+
number: {
|
|
78
|
+
len: '${label} должно быть равно ${len}',
|
|
79
|
+
min: '${label} должно быть значением не меньше ${min}',
|
|
80
|
+
max: '${label} должно быть значением не больше ${max}',
|
|
81
|
+
range: '${label} должно быть значением в диапазоне от ${min} до ${max}'
|
|
82
|
+
},
|
|
83
|
+
array: {
|
|
84
|
+
len: 'Размер ${label} должен быть ${len}',
|
|
85
|
+
min: 'Размер ${label} должен быть не меньше ${min}',
|
|
86
|
+
max: 'Размер ${label} должен быть не больше ${max}',
|
|
87
|
+
range: 'Размер ${label} должен быть в диапазоне от ${min} до ${max}'
|
|
88
|
+
},
|
|
89
|
+
pattern: {
|
|
90
|
+
mismatch: '${label} не соответствует шаблону ${pattern}'
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
ImageUploader: {
|
|
95
|
+
uploading: 'Выгружается...',
|
|
96
|
+
upload: 'Выгрузить'
|
|
97
|
+
},
|
|
98
|
+
InfiniteScroll: {
|
|
99
|
+
noMore: 'Больше нет',
|
|
100
|
+
failedToLoad: 'Ошибка загрузки',
|
|
101
|
+
retry: 'Повторить'
|
|
102
|
+
},
|
|
103
|
+
Input: {
|
|
104
|
+
clear: 'очистить'
|
|
105
|
+
},
|
|
106
|
+
Mask: {
|
|
107
|
+
name: 'Маска'
|
|
108
|
+
},
|
|
109
|
+
Modal: {
|
|
110
|
+
ok: 'ОК'
|
|
111
|
+
},
|
|
112
|
+
PasscodeInput: {
|
|
113
|
+
name: 'Ввод пароля'
|
|
114
|
+
},
|
|
115
|
+
PullToRefresh: {
|
|
116
|
+
pulling: 'Прокрутите вниз, чтобы обновления',
|
|
117
|
+
canRelease: 'Отпустите, чтобы немедленно обновить',
|
|
118
|
+
complete: 'Обновление успешно'
|
|
119
|
+
},
|
|
120
|
+
SearchBar: {
|
|
121
|
+
name: 'Панель поиска'
|
|
122
|
+
},
|
|
123
|
+
Slider: {
|
|
124
|
+
name: 'Слайдер'
|
|
125
|
+
},
|
|
126
|
+
Stepper: {
|
|
127
|
+
decrease: 'вычесть',
|
|
128
|
+
increase: 'прибавить'
|
|
129
|
+
},
|
|
130
|
+
Switch: {
|
|
131
|
+
name: 'Переключатель'
|
|
132
|
+
},
|
|
133
|
+
Selector: {
|
|
134
|
+
name: 'Селектор'
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
export default ruRU;
|
package/2x/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-mobile",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.32.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@floating-ui/dom": "^1.2
|
|
5
|
+
"@floating-ui/dom": "^1.4.2",
|
|
6
6
|
"@rc-component/mini-decimal": "^1.1.0",
|
|
7
7
|
"@react-spring/web": "~9.6.1",
|
|
8
8
|
"@use-gesture/react": "10.2.20",
|