antd-mobile 5.15.1 → 5.16.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/README.md +30 -16
- package/2x/bundle/antd-mobile.cjs.js +322 -193
- package/2x/bundle/antd-mobile.es.js +323 -194
- package/2x/bundle/style.css +66 -13
- package/2x/cjs/components/action-sheet/action-sheet.d.ts +2 -4
- package/2x/cjs/components/action-sheet/action-sheet.js +6 -2
- package/2x/cjs/components/cascader/cascader.d.ts +29 -4
- package/2x/cjs/components/cascader/cascader.js +41 -19
- package/2x/cjs/components/cascader/index.d.ts +21 -2
- package/2x/cjs/components/center-popup/center-popup.css +11 -0
- package/2x/cjs/components/center-popup/center-popup.d.ts +3 -20
- package/2x/cjs/components/center-popup/center-popup.js +24 -13
- package/2x/cjs/components/date-picker/date-picker.d.ts +2 -2
- package/2x/cjs/components/date-picker/date-picker.js +3 -1
- package/2x/cjs/components/date-picker/index.d.ts +1 -1
- package/2x/cjs/components/input/input.css +4 -0
- package/2x/cjs/components/input/input.d.ts +7 -4
- package/2x/cjs/components/input/input.js +5 -1
- package/2x/cjs/components/list/index.d.ts +10 -2
- package/2x/cjs/components/list/list.d.ts +13 -2
- package/2x/cjs/components/list/list.js +16 -6
- package/2x/cjs/components/modal/modal-action-button.d.ts +2 -2
- package/2x/cjs/components/modal/modal.css +0 -9
- package/2x/cjs/components/modal/modal.js +4 -11
- package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -5
- package/2x/cjs/components/number-keyboard/number-keyboard.js +13 -7
- package/2x/cjs/components/picker/index.d.ts +2 -6
- package/2x/cjs/components/picker/picker.d.ts +2 -6
- package/2x/cjs/components/picker/picker.js +8 -7
- package/2x/cjs/components/picker-view/picker-view.css +1 -0
- package/2x/cjs/components/picker-view/wheel.js +10 -8
- package/2x/cjs/components/popup/popup-base-props.d.ts +35 -0
- package/2x/cjs/components/popup/popup-base-props.js +18 -0
- package/2x/cjs/components/popup/popup.css +32 -0
- package/2x/cjs/components/popup/popup.d.ts +3 -19
- package/2x/cjs/components/popup/popup.js +43 -18
- package/2x/cjs/components/progress-bar/progress-bar.css +17 -3
- package/2x/cjs/components/progress-bar/progress-bar.d.ts +4 -2
- package/2x/cjs/components/progress-bar/progress-bar.js +27 -5
- package/2x/cjs/components/slider/slider.js +2 -1
- package/2x/cjs/components/slider/thumb.d.ts +2 -1
- package/2x/cjs/components/slider/thumb.js +13 -1
- package/2x/cjs/components/stepper/stepper.js +14 -3
- package/2x/cjs/components/steps/steps.css +1 -1
- package/2x/cjs/locales/base.d.ts +7 -0
- package/2x/cjs/locales/base.js +7 -0
- package/2x/cjs/locales/en-US.d.ts +7 -0
- package/2x/cjs/locales/es-ES.d.ts +7 -0
- package/2x/cjs/locales/fa-IR.d.ts +7 -0
- package/2x/cjs/locales/fr-FR.d.ts +7 -0
- package/2x/cjs/locales/id-ID.d.ts +118 -0
- package/2x/cjs/locales/id-ID.js +121 -0
- package/2x/cjs/locales/kk-KZ.d.ts +118 -0
- package/2x/cjs/locales/kk-KZ.js +124 -0
- package/2x/cjs/locales/ko-KR.d.ts +7 -0
- package/2x/cjs/locales/zh-CN.d.ts +7 -0
- package/2x/cjs/locales/zh-CN.js +7 -0
- package/2x/cjs/locales/zh-HK.d.ts +7 -0
- package/2x/cjs/locales/zh-TW.d.ts +7 -0
- package/2x/es/components/action-sheet/action-sheet.d.ts +2 -4
- package/2x/es/components/action-sheet/action-sheet.js +6 -2
- package/2x/es/components/cascader/cascader.d.ts +29 -4
- package/2x/es/components/cascader/cascader.js +42 -18
- package/2x/es/components/cascader/index.d.ts +21 -2
- package/2x/es/components/center-popup/center-popup.css +11 -0
- package/2x/es/components/center-popup/center-popup.d.ts +3 -20
- package/2x/es/components/center-popup/center-popup.js +22 -13
- package/2x/es/components/date-picker/date-picker.d.ts +2 -2
- package/2x/es/components/date-picker/date-picker.js +3 -1
- package/2x/es/components/date-picker/index.d.ts +1 -1
- package/2x/es/components/input/input.css +4 -0
- package/2x/es/components/input/input.d.ts +7 -4
- package/2x/es/components/input/input.js +5 -1
- package/2x/es/components/list/index.d.ts +10 -2
- package/2x/es/components/list/list.d.ts +13 -2
- package/2x/es/components/list/list.js +12 -4
- package/2x/es/components/modal/modal-action-button.d.ts +2 -2
- package/2x/es/components/modal/modal.css +0 -9
- package/2x/es/components/modal/modal.js +4 -10
- package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -5
- package/2x/es/components/number-keyboard/number-keyboard.js +13 -7
- package/2x/es/components/picker/index.d.ts +2 -6
- package/2x/es/components/picker/picker.d.ts +2 -6
- package/2x/es/components/picker/picker.js +8 -6
- package/2x/es/components/picker-view/picker-view.css +1 -0
- package/2x/es/components/picker-view/wheel.js +10 -8
- package/2x/es/components/popup/popup-base-props.d.ts +35 -0
- package/2x/es/components/popup/popup-base-props.js +11 -0
- package/2x/es/components/popup/popup.css +32 -0
- package/2x/es/components/popup/popup.d.ts +3 -19
- package/2x/es/components/popup/popup.js +41 -19
- package/2x/es/components/progress-bar/progress-bar.css +17 -3
- package/2x/es/components/progress-bar/progress-bar.d.ts +4 -2
- package/2x/es/components/progress-bar/progress-bar.js +25 -5
- package/2x/es/components/slider/slider.js +2 -1
- package/2x/es/components/slider/thumb.d.ts +2 -1
- package/2x/es/components/slider/thumb.js +12 -1
- package/2x/es/components/stepper/stepper.js +13 -3
- package/2x/es/components/steps/steps.css +1 -1
- package/2x/es/locales/base.d.ts +7 -0
- package/2x/es/locales/base.js +7 -0
- package/2x/es/locales/en-US.d.ts +7 -0
- package/2x/es/locales/es-ES.d.ts +7 -0
- package/2x/es/locales/fa-IR.d.ts +7 -0
- package/2x/es/locales/fr-FR.d.ts +7 -0
- package/2x/es/locales/id-ID.d.ts +118 -0
- package/2x/es/locales/id-ID.js +111 -0
- package/2x/es/locales/kk-KZ.d.ts +118 -0
- package/2x/es/locales/kk-KZ.js +114 -0
- package/2x/es/locales/ko-KR.d.ts +7 -0
- package/2x/es/locales/zh-CN.d.ts +7 -0
- package/2x/es/locales/zh-CN.js +7 -0
- package/2x/es/locales/zh-HK.d.ts +7 -0
- package/2x/es/locales/zh-TW.d.ts +7 -0
- package/2x/package.json +1 -1
- package/2x/umd/antd-mobile.js +1 -1
- package/README.md +30 -16
- package/bundle/antd-mobile.cjs.js +322 -193
- package/bundle/antd-mobile.es.js +323 -194
- package/bundle/style.css +56 -12
- package/cjs/components/action-sheet/action-sheet.d.ts +2 -4
- package/cjs/components/action-sheet/action-sheet.js +6 -2
- package/cjs/components/cascader/cascader.d.ts +29 -4
- package/cjs/components/cascader/cascader.js +41 -19
- package/cjs/components/cascader/index.d.ts +21 -2
- package/cjs/components/center-popup/center-popup.css +10 -0
- package/cjs/components/center-popup/center-popup.d.ts +3 -20
- package/cjs/components/center-popup/center-popup.js +24 -13
- package/cjs/components/date-picker/date-picker.d.ts +2 -2
- package/cjs/components/date-picker/date-picker.js +3 -1
- package/cjs/components/date-picker/index.d.ts +1 -1
- package/cjs/components/input/input.css +3 -0
- package/cjs/components/input/input.d.ts +7 -4
- package/cjs/components/input/input.js +5 -1
- package/cjs/components/list/index.d.ts +10 -2
- package/cjs/components/list/list.d.ts +13 -2
- package/cjs/components/list/list.js +16 -6
- package/cjs/components/modal/modal-action-button.d.ts +2 -2
- package/cjs/components/modal/modal.css +0 -8
- package/cjs/components/modal/modal.js +4 -11
- package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -5
- package/cjs/components/number-keyboard/number-keyboard.js +13 -7
- package/cjs/components/picker/index.d.ts +2 -6
- package/cjs/components/picker/picker.d.ts +2 -6
- package/cjs/components/picker/picker.js +8 -7
- package/cjs/components/picker-view/picker-view.css +1 -0
- package/cjs/components/picker-view/wheel.js +10 -8
- package/cjs/components/popup/popup-base-props.d.ts +35 -0
- package/cjs/components/popup/popup-base-props.js +18 -0
- package/cjs/components/popup/popup.css +26 -0
- package/cjs/components/popup/popup.d.ts +3 -19
- package/cjs/components/popup/popup.js +43 -18
- package/cjs/components/progress-bar/progress-bar.css +15 -3
- package/cjs/components/progress-bar/progress-bar.d.ts +4 -2
- package/cjs/components/progress-bar/progress-bar.js +27 -5
- package/cjs/components/slider/slider.js +2 -1
- package/cjs/components/slider/thumb.d.ts +2 -1
- package/cjs/components/slider/thumb.js +13 -1
- package/cjs/components/stepper/stepper.js +14 -3
- package/cjs/components/steps/steps.css +1 -1
- package/cjs/locales/base.d.ts +7 -0
- package/cjs/locales/base.js +7 -0
- package/cjs/locales/en-US.d.ts +7 -0
- package/cjs/locales/es-ES.d.ts +7 -0
- package/cjs/locales/fa-IR.d.ts +7 -0
- package/cjs/locales/fr-FR.d.ts +7 -0
- package/cjs/locales/id-ID.d.ts +118 -0
- package/cjs/locales/id-ID.js +121 -0
- package/cjs/locales/kk-KZ.d.ts +118 -0
- package/cjs/locales/kk-KZ.js +124 -0
- package/cjs/locales/ko-KR.d.ts +7 -0
- package/cjs/locales/zh-CN.d.ts +7 -0
- package/cjs/locales/zh-CN.js +7 -0
- package/cjs/locales/zh-HK.d.ts +7 -0
- package/cjs/locales/zh-TW.d.ts +7 -0
- package/es/components/action-sheet/action-sheet.d.ts +2 -4
- package/es/components/action-sheet/action-sheet.js +6 -2
- package/es/components/cascader/cascader.d.ts +29 -4
- package/es/components/cascader/cascader.js +42 -18
- package/es/components/cascader/index.d.ts +21 -2
- package/es/components/center-popup/center-popup.css +10 -0
- package/es/components/center-popup/center-popup.d.ts +3 -20
- package/es/components/center-popup/center-popup.js +22 -13
- package/es/components/date-picker/date-picker.d.ts +2 -2
- package/es/components/date-picker/date-picker.js +3 -1
- package/es/components/date-picker/index.d.ts +1 -1
- package/es/components/input/input.css +3 -0
- package/es/components/input/input.d.ts +7 -4
- package/es/components/input/input.js +5 -1
- package/es/components/list/index.d.ts +10 -2
- package/es/components/list/list.d.ts +13 -2
- package/es/components/list/list.js +12 -4
- package/es/components/modal/modal-action-button.d.ts +2 -2
- package/es/components/modal/modal.css +0 -8
- package/es/components/modal/modal.js +4 -10
- package/es/components/number-keyboard/number-keyboard.d.ts +1 -5
- package/es/components/number-keyboard/number-keyboard.js +13 -7
- package/es/components/picker/index.d.ts +2 -6
- package/es/components/picker/picker.d.ts +2 -6
- package/es/components/picker/picker.js +8 -6
- package/es/components/picker-view/picker-view.css +1 -0
- package/es/components/picker-view/wheel.js +10 -8
- package/es/components/popup/popup-base-props.d.ts +35 -0
- package/es/components/popup/popup-base-props.js +11 -0
- package/es/components/popup/popup.css +26 -0
- package/es/components/popup/popup.d.ts +3 -19
- package/es/components/popup/popup.js +41 -19
- package/es/components/progress-bar/progress-bar.css +15 -3
- package/es/components/progress-bar/progress-bar.d.ts +4 -2
- package/es/components/progress-bar/progress-bar.js +25 -5
- package/es/components/slider/slider.js +2 -1
- package/es/components/slider/thumb.d.ts +2 -1
- package/es/components/slider/thumb.js +12 -1
- package/es/components/stepper/stepper.js +13 -3
- package/es/components/steps/steps.css +1 -1
- package/es/locales/base.d.ts +7 -0
- package/es/locales/base.js +7 -0
- package/es/locales/en-US.d.ts +7 -0
- package/es/locales/es-ES.d.ts +7 -0
- package/es/locales/fa-IR.d.ts +7 -0
- package/es/locales/fr-FR.d.ts +7 -0
- package/es/locales/id-ID.d.ts +118 -0
- package/es/locales/id-ID.js +111 -0
- package/es/locales/kk-KZ.d.ts +118 -0
- package/es/locales/kk-KZ.js +114 -0
- package/es/locales/ko-KR.d.ts +7 -0
- package/es/locales/zh-CN.d.ts +7 -0
- package/es/locales/zh-CN.js +7 -0
- package/es/locales/zh-HK.d.ts +7 -0
- package/es/locales/zh-TW.d.ts +7 -0
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -1,20 +1,40 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { withNativeProps } from '../../utils/native-props';
|
|
3
3
|
import { mergeProps } from '../../utils/with-default-props';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { isNodeWithContent } from '../../utils/is-node-with-content';
|
|
4
6
|
const classPrefix = `adm-progress-bar`;
|
|
7
|
+
const defaultProps = {
|
|
8
|
+
percent: 0,
|
|
9
|
+
rounded: true,
|
|
10
|
+
text: false
|
|
11
|
+
};
|
|
5
12
|
export const ProgressBar = p => {
|
|
6
|
-
const props = mergeProps(
|
|
7
|
-
percent: 0
|
|
8
|
-
}, p);
|
|
13
|
+
const props = mergeProps(defaultProps, p);
|
|
9
14
|
const fillStyle = {
|
|
10
15
|
width: `${props.percent}%`
|
|
11
16
|
};
|
|
17
|
+
|
|
18
|
+
const textElement = function () {
|
|
19
|
+
if (props.text === true) {
|
|
20
|
+
return `${props.percent}%`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (typeof props.text === 'function') {
|
|
24
|
+
return props.text(props.percent);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return props.text;
|
|
28
|
+
}();
|
|
29
|
+
|
|
12
30
|
return withNativeProps(props, React.createElement("div", {
|
|
13
|
-
className: classPrefix
|
|
31
|
+
className: classNames(classPrefix, props.rounded && `${classPrefix}-rounded`)
|
|
14
32
|
}, React.createElement("div", {
|
|
15
33
|
className: `${classPrefix}-trail`
|
|
16
34
|
}, React.createElement("div", {
|
|
17
35
|
className: `${classPrefix}-fill`,
|
|
18
36
|
style: fillStyle
|
|
19
|
-
})))
|
|
37
|
+
})), isNodeWithContent(textElement) && React.createElement("div", {
|
|
38
|
+
className: `${classPrefix}-text`
|
|
39
|
+
}, textElement)));
|
|
20
40
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC, RefObject, ReactNode } from 'react';
|
|
2
|
+
import { NativeProps } from '../../utils/native-props';
|
|
2
3
|
declare type ThumbProps = {
|
|
3
4
|
value: number;
|
|
4
5
|
min: number;
|
|
@@ -8,6 +9,6 @@ declare type ThumbProps = {
|
|
|
8
9
|
trackRef: RefObject<HTMLDivElement>;
|
|
9
10
|
icon?: React.ReactNode;
|
|
10
11
|
popover: boolean | ((value: number) => ReactNode);
|
|
11
|
-
};
|
|
12
|
+
} & NativeProps;
|
|
12
13
|
declare const Thumb: FC<ThumbProps>;
|
|
13
14
|
export default Thumb;
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useState } from 'react';
|
|
|
2
2
|
import { useDrag } from '@use-gesture/react';
|
|
3
3
|
import { ThumbIcon } from './thumb-icon';
|
|
4
4
|
import { Popover } from '../popover/popover';
|
|
5
|
+
import { useConfig } from '../config-provider';
|
|
5
6
|
const classPrefix = `adm-slider`;
|
|
6
7
|
|
|
7
8
|
const Thumb = props => {
|
|
@@ -14,6 +15,9 @@ const Thumb = props => {
|
|
|
14
15
|
icon
|
|
15
16
|
} = props;
|
|
16
17
|
const prevValue = useRef(value);
|
|
18
|
+
const {
|
|
19
|
+
locale
|
|
20
|
+
} = useConfig();
|
|
17
21
|
|
|
18
22
|
const currentPosition = () => {
|
|
19
23
|
return {
|
|
@@ -53,7 +57,14 @@ const Thumb = props => {
|
|
|
53
57
|
return React.createElement("div", Object.assign({
|
|
54
58
|
className: `${classPrefix}-thumb-container`,
|
|
55
59
|
style: currentPosition()
|
|
56
|
-
}, bind()
|
|
60
|
+
}, bind(), {
|
|
61
|
+
role: 'slider',
|
|
62
|
+
"aria-label": props['aria-label'] || locale.Slider.name,
|
|
63
|
+
"aria-valuemax": max,
|
|
64
|
+
"aria-valuemin": min,
|
|
65
|
+
"aria-valuenow": value,
|
|
66
|
+
"aria-disabled": disabled
|
|
67
|
+
}), renderPopoverContent ? React.createElement(Popover, {
|
|
57
68
|
content: renderPopoverContent(value),
|
|
58
69
|
placement: 'top',
|
|
59
70
|
visible: dragging,
|
|
@@ -8,6 +8,7 @@ import { bound } from '../../utils/bound';
|
|
|
8
8
|
import Input from '../input';
|
|
9
9
|
import Button from '../button';
|
|
10
10
|
import Big from 'big.js';
|
|
11
|
+
import { useConfig } from '../config-provider';
|
|
11
12
|
const classPrefix = `adm-stepper`;
|
|
12
13
|
const defaultProps = {
|
|
13
14
|
defaultValue: 0,
|
|
@@ -24,6 +25,9 @@ export const Stepper = p => {
|
|
|
24
25
|
min,
|
|
25
26
|
inputReadOnly
|
|
26
27
|
} = props;
|
|
28
|
+
const {
|
|
29
|
+
locale
|
|
30
|
+
} = useConfig();
|
|
27
31
|
const [value, setValue] = usePropsValue(props);
|
|
28
32
|
const [inputValue, setInputValue] = useState(() => convertValueToText(value, props.digits));
|
|
29
33
|
|
|
@@ -105,7 +109,8 @@ export const Stepper = p => {
|
|
|
105
109
|
disabled: minusDisabled(),
|
|
106
110
|
fill: 'none',
|
|
107
111
|
shape: 'rectangular',
|
|
108
|
-
color: 'primary'
|
|
112
|
+
color: 'primary',
|
|
113
|
+
"aria-label": locale.Stepper.decrease
|
|
109
114
|
}, React.createElement(MinusOutline, null)), React.createElement("div", {
|
|
110
115
|
className: `${classPrefix}-middle`
|
|
111
116
|
}, React.createElement(Input, {
|
|
@@ -127,14 +132,19 @@ export const Stepper = p => {
|
|
|
127
132
|
setHasFocus(false);
|
|
128
133
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
129
134
|
},
|
|
130
|
-
readOnly: inputReadOnly
|
|
135
|
+
readOnly: inputReadOnly,
|
|
136
|
+
role: 'spinbutton',
|
|
137
|
+
"aria-valuenow": Number(inputValue),
|
|
138
|
+
"aria-valuemax": max,
|
|
139
|
+
"aria-valuemin": min
|
|
131
140
|
})), React.createElement(Button, {
|
|
132
141
|
className: `${classPrefix}-plus`,
|
|
133
142
|
onClick: handlePlus,
|
|
134
143
|
disabled: plusDisabled(),
|
|
135
144
|
fill: 'none',
|
|
136
145
|
shape: 'rectangular',
|
|
137
|
-
color: 'primary'
|
|
146
|
+
color: 'primary',
|
|
147
|
+
"aria-label": locale.Stepper.increase
|
|
138
148
|
}, React.createElement(AddOutline, null))));
|
|
139
149
|
};
|
|
140
150
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
.adm-step .adm-step-indicator .adm-step-icon-container {
|
|
15
15
|
position: absolute;
|
|
16
16
|
z-index: 1;
|
|
17
|
-
background: var(--adm-color-
|
|
17
|
+
background: var(--adm-color-background);
|
|
18
18
|
color: var(--icon-color);
|
|
19
19
|
}
|
|
20
20
|
.adm-step .adm-step-indicator .adm-step-icon-container > .antd-mobile-icon {
|
package/es/locales/base.d.ts
CHANGED
package/es/locales/base.js
CHANGED
|
@@ -105,6 +105,13 @@ export const base = {
|
|
|
105
105
|
canRelease: 'Release to refresh immediately',
|
|
106
106
|
complete: 'Refresh successful'
|
|
107
107
|
},
|
|
108
|
+
Slider: {
|
|
109
|
+
name: 'Slider'
|
|
110
|
+
},
|
|
111
|
+
Stepper: {
|
|
112
|
+
decrease: 'decrease',
|
|
113
|
+
increase: 'increase'
|
|
114
|
+
},
|
|
108
115
|
Switch: {
|
|
109
116
|
name: 'Switch'
|
|
110
117
|
}
|
package/es/locales/en-US.d.ts
CHANGED
package/es/locales/es-ES.d.ts
CHANGED
package/es/locales/fa-IR.d.ts
CHANGED
package/es/locales/fr-FR.d.ts
CHANGED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare const idID: {
|
|
2
|
+
locale: string;
|
|
3
|
+
common: {
|
|
4
|
+
confirm: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
loading: string;
|
|
7
|
+
};
|
|
8
|
+
Calendar: {
|
|
9
|
+
markItems: string[];
|
|
10
|
+
renderYearAndMonth: (year: number, month: number) => string;
|
|
11
|
+
};
|
|
12
|
+
Cascader: {
|
|
13
|
+
placeholder: string;
|
|
14
|
+
};
|
|
15
|
+
Dialog: {
|
|
16
|
+
ok: string;
|
|
17
|
+
};
|
|
18
|
+
ErrorBlock: {
|
|
19
|
+
default: {
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
busy: {
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
disconnected: {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
empty: {
|
|
32
|
+
title: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
Form: {
|
|
37
|
+
required: string;
|
|
38
|
+
optional: string;
|
|
39
|
+
defaultValidateMessages: {
|
|
40
|
+
default: string;
|
|
41
|
+
required: string;
|
|
42
|
+
enum: string;
|
|
43
|
+
whitespace: string;
|
|
44
|
+
date: {
|
|
45
|
+
format: string;
|
|
46
|
+
parse: string;
|
|
47
|
+
invalid: string;
|
|
48
|
+
};
|
|
49
|
+
types: {
|
|
50
|
+
string: string;
|
|
51
|
+
method: string;
|
|
52
|
+
array: string;
|
|
53
|
+
object: string;
|
|
54
|
+
number: string;
|
|
55
|
+
date: string;
|
|
56
|
+
boolean: string;
|
|
57
|
+
integer: string;
|
|
58
|
+
float: string;
|
|
59
|
+
regexp: string;
|
|
60
|
+
email: string;
|
|
61
|
+
url: string;
|
|
62
|
+
hex: string;
|
|
63
|
+
};
|
|
64
|
+
string: {
|
|
65
|
+
len: string;
|
|
66
|
+
min: string;
|
|
67
|
+
max: string;
|
|
68
|
+
range: string;
|
|
69
|
+
};
|
|
70
|
+
number: {
|
|
71
|
+
len: string;
|
|
72
|
+
min: string;
|
|
73
|
+
max: string;
|
|
74
|
+
range: string;
|
|
75
|
+
};
|
|
76
|
+
array: {
|
|
77
|
+
len: string;
|
|
78
|
+
min: string;
|
|
79
|
+
max: string;
|
|
80
|
+
range: string;
|
|
81
|
+
};
|
|
82
|
+
pattern: {
|
|
83
|
+
mismatch: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
ImageUploader: {
|
|
88
|
+
uploading: string;
|
|
89
|
+
upload: string;
|
|
90
|
+
};
|
|
91
|
+
InfiniteScroll: {
|
|
92
|
+
noMore: string;
|
|
93
|
+
failedToLoad: string;
|
|
94
|
+
retry: string;
|
|
95
|
+
};
|
|
96
|
+
Mask: {
|
|
97
|
+
name: string;
|
|
98
|
+
};
|
|
99
|
+
Modal: {
|
|
100
|
+
ok: string;
|
|
101
|
+
};
|
|
102
|
+
PullToRefresh: {
|
|
103
|
+
pulling: string;
|
|
104
|
+
canRelease: string;
|
|
105
|
+
complete: string;
|
|
106
|
+
};
|
|
107
|
+
Slider: {
|
|
108
|
+
name: string;
|
|
109
|
+
};
|
|
110
|
+
Stepper: {
|
|
111
|
+
decrease: string;
|
|
112
|
+
increase: string;
|
|
113
|
+
};
|
|
114
|
+
Switch: {
|
|
115
|
+
name: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export default idID;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { mergeLocale } from '../utils/merge-locale';
|
|
2
|
+
import { base } from './base';
|
|
3
|
+
const typeTemplate = '${label} bukan ${type} yang valid';
|
|
4
|
+
const idID = mergeLocale(base, {
|
|
5
|
+
locale: 'id-ID',
|
|
6
|
+
common: {
|
|
7
|
+
confirm: 'Yakin',
|
|
8
|
+
cancel: 'Batal ',
|
|
9
|
+
loading: 'memuat'
|
|
10
|
+
},
|
|
11
|
+
Calendar: {
|
|
12
|
+
markItems: ['Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu', 'Minggu'],
|
|
13
|
+
renderYearAndMonth: (year, month) => `${year} Tahun ${month} Bulan`
|
|
14
|
+
},
|
|
15
|
+
Cascader: {
|
|
16
|
+
placeholder: 'Silahkan Pilih'
|
|
17
|
+
},
|
|
18
|
+
Dialog: {
|
|
19
|
+
ok: 'Saya mendapatkannya'
|
|
20
|
+
},
|
|
21
|
+
ErrorBlock: {
|
|
22
|
+
default: {
|
|
23
|
+
title: 'Halaman mengalami beberapa permasalahan kecil',
|
|
24
|
+
description: 'Coba lagi nanti'
|
|
25
|
+
},
|
|
26
|
+
busy: {
|
|
27
|
+
title: 'kepadatan diawal',
|
|
28
|
+
description: 'Coba untuk menyegarkan'
|
|
29
|
+
},
|
|
30
|
+
disconnected: {
|
|
31
|
+
title: 'jaringan sedikit sibuk',
|
|
32
|
+
description: 'Gerakkan jari Anda untuk membantu memperbaiki'
|
|
33
|
+
},
|
|
34
|
+
empty: {
|
|
35
|
+
title: 'Itu tidak menemukan apa yang Anda butuhkan',
|
|
36
|
+
description: 'Silahkan cari yang lain'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
Form: {
|
|
40
|
+
required: 'Diperlukan',
|
|
41
|
+
optional: 'opsional untuk diisi',
|
|
42
|
+
defaultValidateMessages: {
|
|
43
|
+
default: 'Kesalahan validasi bidang ${label}',
|
|
44
|
+
required: 'Harap masukkan ${label}',
|
|
45
|
+
enum: '${label} harus salah satu dari [${enum}]',
|
|
46
|
+
whitespace: '${label} tidak boleh berupa karakter kosong',
|
|
47
|
+
date: {
|
|
48
|
+
format: 'Format tanggal ${label} tidak valid',
|
|
49
|
+
parse: '${label} tidak dapat dikonversi ke tanggal',
|
|
50
|
+
invalid: '${label} adalah tanggal yang tidak valid'
|
|
51
|
+
},
|
|
52
|
+
types: {
|
|
53
|
+
string: typeTemplate,
|
|
54
|
+
method: typeTemplate,
|
|
55
|
+
array: typeTemplate,
|
|
56
|
+
object: typeTemplate,
|
|
57
|
+
number: typeTemplate,
|
|
58
|
+
date: typeTemplate,
|
|
59
|
+
boolean: typeTemplate,
|
|
60
|
+
integer: typeTemplate,
|
|
61
|
+
float: typeTemplate,
|
|
62
|
+
regexp: typeTemplate,
|
|
63
|
+
email: typeTemplate,
|
|
64
|
+
url: typeTemplate,
|
|
65
|
+
hex: typeTemplate
|
|
66
|
+
},
|
|
67
|
+
string: {
|
|
68
|
+
len: '${label} harus berupa ${len} karakter',
|
|
69
|
+
min: '${label} Minimal ${min} karakter',
|
|
70
|
+
max: '${label}Maksimum ${max} karakter',
|
|
71
|
+
range: '${label} harus antara ${min}-${max} karakter'
|
|
72
|
+
},
|
|
73
|
+
number: {
|
|
74
|
+
len: '${label} harus sama dengan ${len}',
|
|
75
|
+
min: 'Nilai minimum ${label} adalah ${min}',
|
|
76
|
+
max: '${label} memiliki nilai maksimum ${max}',
|
|
77
|
+
range: '${label} harus antara ${min}-${max}'
|
|
78
|
+
},
|
|
79
|
+
array: {
|
|
80
|
+
len: 'Harus ${len} ${label}',
|
|
81
|
+
min: 'Minimal ${min} ${label}',
|
|
82
|
+
max: 'Hingga ${max} ${label}',
|
|
83
|
+
range: 'Jumlah ${label} harus antara ${min}-${max}'
|
|
84
|
+
},
|
|
85
|
+
pattern: {
|
|
86
|
+
mismatch: '${label} tidak cocok dengan pola ${pattern}'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
ImageUploader: {
|
|
91
|
+
uploading: 'mengunggah...',
|
|
92
|
+
upload: 'diunggah'
|
|
93
|
+
},
|
|
94
|
+
InfiniteScroll: {
|
|
95
|
+
noMore: 'tidak ada lagi',
|
|
96
|
+
failedToLoad: 'Gagal memuat',
|
|
97
|
+
retry: 'memuat ulang'
|
|
98
|
+
},
|
|
99
|
+
Mask: {
|
|
100
|
+
name: 'lapisan pelindung'
|
|
101
|
+
},
|
|
102
|
+
Modal: {
|
|
103
|
+
ok: 'Saya mendapatkannya'
|
|
104
|
+
},
|
|
105
|
+
PullToRefresh: {
|
|
106
|
+
pulling: 'Tarik ke bawah untuk menyegarkan',
|
|
107
|
+
canRelease: 'Lepaskan untuk menyegarkan segera',
|
|
108
|
+
complete: 'Segarkan berhasil'
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export default idID;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare const kkKZ: {
|
|
2
|
+
locale: string;
|
|
3
|
+
common: {
|
|
4
|
+
confirm: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
loading: string;
|
|
7
|
+
};
|
|
8
|
+
Calendar: {
|
|
9
|
+
markItems: string[];
|
|
10
|
+
renderYearAndMonth: (year: number, month: number) => string;
|
|
11
|
+
};
|
|
12
|
+
Cascader: {
|
|
13
|
+
placeholder: string;
|
|
14
|
+
};
|
|
15
|
+
Dialog: {
|
|
16
|
+
ok: string;
|
|
17
|
+
};
|
|
18
|
+
ErrorBlock: {
|
|
19
|
+
default: {
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
busy: {
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
disconnected: {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
empty: {
|
|
32
|
+
title: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
Form: {
|
|
37
|
+
required: string;
|
|
38
|
+
optional: string;
|
|
39
|
+
defaultValidateMessages: {
|
|
40
|
+
default: string;
|
|
41
|
+
required: string;
|
|
42
|
+
enum: string;
|
|
43
|
+
whitespace: string;
|
|
44
|
+
date: {
|
|
45
|
+
format: string;
|
|
46
|
+
parse: string;
|
|
47
|
+
invalid: string;
|
|
48
|
+
};
|
|
49
|
+
types: {
|
|
50
|
+
string: string;
|
|
51
|
+
method: string;
|
|
52
|
+
array: string;
|
|
53
|
+
object: string;
|
|
54
|
+
number: string;
|
|
55
|
+
date: string;
|
|
56
|
+
boolean: string;
|
|
57
|
+
integer: string;
|
|
58
|
+
float: string;
|
|
59
|
+
regexp: string;
|
|
60
|
+
email: string;
|
|
61
|
+
url: string;
|
|
62
|
+
hex: string;
|
|
63
|
+
};
|
|
64
|
+
string: {
|
|
65
|
+
len: string;
|
|
66
|
+
min: string;
|
|
67
|
+
max: string;
|
|
68
|
+
range: string;
|
|
69
|
+
};
|
|
70
|
+
number: {
|
|
71
|
+
len: string;
|
|
72
|
+
min: string;
|
|
73
|
+
max: string;
|
|
74
|
+
range: string;
|
|
75
|
+
};
|
|
76
|
+
array: {
|
|
77
|
+
len: string;
|
|
78
|
+
min: string;
|
|
79
|
+
max: string;
|
|
80
|
+
range: string;
|
|
81
|
+
};
|
|
82
|
+
pattern: {
|
|
83
|
+
mismatch: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
ImageUploader: {
|
|
88
|
+
uploading: string;
|
|
89
|
+
upload: string;
|
|
90
|
+
};
|
|
91
|
+
InfiniteScroll: {
|
|
92
|
+
noMore: string;
|
|
93
|
+
failedToLoad: string;
|
|
94
|
+
retry: string;
|
|
95
|
+
};
|
|
96
|
+
Mask: {
|
|
97
|
+
name: string;
|
|
98
|
+
};
|
|
99
|
+
Modal: {
|
|
100
|
+
ok: string;
|
|
101
|
+
};
|
|
102
|
+
PullToRefresh: {
|
|
103
|
+
pulling: string;
|
|
104
|
+
canRelease: string;
|
|
105
|
+
complete: string;
|
|
106
|
+
};
|
|
107
|
+
Slider: {
|
|
108
|
+
name: string;
|
|
109
|
+
};
|
|
110
|
+
Stepper: {
|
|
111
|
+
decrease: string;
|
|
112
|
+
increase: string;
|
|
113
|
+
};
|
|
114
|
+
Switch: {
|
|
115
|
+
name: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export default kkKZ;
|