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.
Files changed (232) hide show
  1. package/2x/README.md +30 -16
  2. package/2x/bundle/antd-mobile.cjs.js +322 -193
  3. package/2x/bundle/antd-mobile.es.js +323 -194
  4. package/2x/bundle/style.css +66 -13
  5. package/2x/cjs/components/action-sheet/action-sheet.d.ts +2 -4
  6. package/2x/cjs/components/action-sheet/action-sheet.js +6 -2
  7. package/2x/cjs/components/cascader/cascader.d.ts +29 -4
  8. package/2x/cjs/components/cascader/cascader.js +41 -19
  9. package/2x/cjs/components/cascader/index.d.ts +21 -2
  10. package/2x/cjs/components/center-popup/center-popup.css +11 -0
  11. package/2x/cjs/components/center-popup/center-popup.d.ts +3 -20
  12. package/2x/cjs/components/center-popup/center-popup.js +24 -13
  13. package/2x/cjs/components/date-picker/date-picker.d.ts +2 -2
  14. package/2x/cjs/components/date-picker/date-picker.js +3 -1
  15. package/2x/cjs/components/date-picker/index.d.ts +1 -1
  16. package/2x/cjs/components/input/input.css +4 -0
  17. package/2x/cjs/components/input/input.d.ts +7 -4
  18. package/2x/cjs/components/input/input.js +5 -1
  19. package/2x/cjs/components/list/index.d.ts +10 -2
  20. package/2x/cjs/components/list/list.d.ts +13 -2
  21. package/2x/cjs/components/list/list.js +16 -6
  22. package/2x/cjs/components/modal/modal-action-button.d.ts +2 -2
  23. package/2x/cjs/components/modal/modal.css +0 -9
  24. package/2x/cjs/components/modal/modal.js +4 -11
  25. package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -5
  26. package/2x/cjs/components/number-keyboard/number-keyboard.js +13 -7
  27. package/2x/cjs/components/picker/index.d.ts +2 -6
  28. package/2x/cjs/components/picker/picker.d.ts +2 -6
  29. package/2x/cjs/components/picker/picker.js +8 -7
  30. package/2x/cjs/components/picker-view/picker-view.css +1 -0
  31. package/2x/cjs/components/picker-view/wheel.js +10 -8
  32. package/2x/cjs/components/popup/popup-base-props.d.ts +35 -0
  33. package/2x/cjs/components/popup/popup-base-props.js +18 -0
  34. package/2x/cjs/components/popup/popup.css +32 -0
  35. package/2x/cjs/components/popup/popup.d.ts +3 -19
  36. package/2x/cjs/components/popup/popup.js +43 -18
  37. package/2x/cjs/components/progress-bar/progress-bar.css +17 -3
  38. package/2x/cjs/components/progress-bar/progress-bar.d.ts +4 -2
  39. package/2x/cjs/components/progress-bar/progress-bar.js +27 -5
  40. package/2x/cjs/components/slider/slider.js +2 -1
  41. package/2x/cjs/components/slider/thumb.d.ts +2 -1
  42. package/2x/cjs/components/slider/thumb.js +13 -1
  43. package/2x/cjs/components/stepper/stepper.js +14 -3
  44. package/2x/cjs/components/steps/steps.css +1 -1
  45. package/2x/cjs/locales/base.d.ts +7 -0
  46. package/2x/cjs/locales/base.js +7 -0
  47. package/2x/cjs/locales/en-US.d.ts +7 -0
  48. package/2x/cjs/locales/es-ES.d.ts +7 -0
  49. package/2x/cjs/locales/fa-IR.d.ts +7 -0
  50. package/2x/cjs/locales/fr-FR.d.ts +7 -0
  51. package/2x/cjs/locales/id-ID.d.ts +118 -0
  52. package/2x/cjs/locales/id-ID.js +121 -0
  53. package/2x/cjs/locales/kk-KZ.d.ts +118 -0
  54. package/2x/cjs/locales/kk-KZ.js +124 -0
  55. package/2x/cjs/locales/ko-KR.d.ts +7 -0
  56. package/2x/cjs/locales/zh-CN.d.ts +7 -0
  57. package/2x/cjs/locales/zh-CN.js +7 -0
  58. package/2x/cjs/locales/zh-HK.d.ts +7 -0
  59. package/2x/cjs/locales/zh-TW.d.ts +7 -0
  60. package/2x/es/components/action-sheet/action-sheet.d.ts +2 -4
  61. package/2x/es/components/action-sheet/action-sheet.js +6 -2
  62. package/2x/es/components/cascader/cascader.d.ts +29 -4
  63. package/2x/es/components/cascader/cascader.js +42 -18
  64. package/2x/es/components/cascader/index.d.ts +21 -2
  65. package/2x/es/components/center-popup/center-popup.css +11 -0
  66. package/2x/es/components/center-popup/center-popup.d.ts +3 -20
  67. package/2x/es/components/center-popup/center-popup.js +22 -13
  68. package/2x/es/components/date-picker/date-picker.d.ts +2 -2
  69. package/2x/es/components/date-picker/date-picker.js +3 -1
  70. package/2x/es/components/date-picker/index.d.ts +1 -1
  71. package/2x/es/components/input/input.css +4 -0
  72. package/2x/es/components/input/input.d.ts +7 -4
  73. package/2x/es/components/input/input.js +5 -1
  74. package/2x/es/components/list/index.d.ts +10 -2
  75. package/2x/es/components/list/list.d.ts +13 -2
  76. package/2x/es/components/list/list.js +12 -4
  77. package/2x/es/components/modal/modal-action-button.d.ts +2 -2
  78. package/2x/es/components/modal/modal.css +0 -9
  79. package/2x/es/components/modal/modal.js +4 -10
  80. package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -5
  81. package/2x/es/components/number-keyboard/number-keyboard.js +13 -7
  82. package/2x/es/components/picker/index.d.ts +2 -6
  83. package/2x/es/components/picker/picker.d.ts +2 -6
  84. package/2x/es/components/picker/picker.js +8 -6
  85. package/2x/es/components/picker-view/picker-view.css +1 -0
  86. package/2x/es/components/picker-view/wheel.js +10 -8
  87. package/2x/es/components/popup/popup-base-props.d.ts +35 -0
  88. package/2x/es/components/popup/popup-base-props.js +11 -0
  89. package/2x/es/components/popup/popup.css +32 -0
  90. package/2x/es/components/popup/popup.d.ts +3 -19
  91. package/2x/es/components/popup/popup.js +41 -19
  92. package/2x/es/components/progress-bar/progress-bar.css +17 -3
  93. package/2x/es/components/progress-bar/progress-bar.d.ts +4 -2
  94. package/2x/es/components/progress-bar/progress-bar.js +25 -5
  95. package/2x/es/components/slider/slider.js +2 -1
  96. package/2x/es/components/slider/thumb.d.ts +2 -1
  97. package/2x/es/components/slider/thumb.js +12 -1
  98. package/2x/es/components/stepper/stepper.js +13 -3
  99. package/2x/es/components/steps/steps.css +1 -1
  100. package/2x/es/locales/base.d.ts +7 -0
  101. package/2x/es/locales/base.js +7 -0
  102. package/2x/es/locales/en-US.d.ts +7 -0
  103. package/2x/es/locales/es-ES.d.ts +7 -0
  104. package/2x/es/locales/fa-IR.d.ts +7 -0
  105. package/2x/es/locales/fr-FR.d.ts +7 -0
  106. package/2x/es/locales/id-ID.d.ts +118 -0
  107. package/2x/es/locales/id-ID.js +111 -0
  108. package/2x/es/locales/kk-KZ.d.ts +118 -0
  109. package/2x/es/locales/kk-KZ.js +114 -0
  110. package/2x/es/locales/ko-KR.d.ts +7 -0
  111. package/2x/es/locales/zh-CN.d.ts +7 -0
  112. package/2x/es/locales/zh-CN.js +7 -0
  113. package/2x/es/locales/zh-HK.d.ts +7 -0
  114. package/2x/es/locales/zh-TW.d.ts +7 -0
  115. package/2x/package.json +1 -1
  116. package/2x/umd/antd-mobile.js +1 -1
  117. package/README.md +30 -16
  118. package/bundle/antd-mobile.cjs.js +322 -193
  119. package/bundle/antd-mobile.es.js +323 -194
  120. package/bundle/style.css +56 -12
  121. package/cjs/components/action-sheet/action-sheet.d.ts +2 -4
  122. package/cjs/components/action-sheet/action-sheet.js +6 -2
  123. package/cjs/components/cascader/cascader.d.ts +29 -4
  124. package/cjs/components/cascader/cascader.js +41 -19
  125. package/cjs/components/cascader/index.d.ts +21 -2
  126. package/cjs/components/center-popup/center-popup.css +10 -0
  127. package/cjs/components/center-popup/center-popup.d.ts +3 -20
  128. package/cjs/components/center-popup/center-popup.js +24 -13
  129. package/cjs/components/date-picker/date-picker.d.ts +2 -2
  130. package/cjs/components/date-picker/date-picker.js +3 -1
  131. package/cjs/components/date-picker/index.d.ts +1 -1
  132. package/cjs/components/input/input.css +3 -0
  133. package/cjs/components/input/input.d.ts +7 -4
  134. package/cjs/components/input/input.js +5 -1
  135. package/cjs/components/list/index.d.ts +10 -2
  136. package/cjs/components/list/list.d.ts +13 -2
  137. package/cjs/components/list/list.js +16 -6
  138. package/cjs/components/modal/modal-action-button.d.ts +2 -2
  139. package/cjs/components/modal/modal.css +0 -8
  140. package/cjs/components/modal/modal.js +4 -11
  141. package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -5
  142. package/cjs/components/number-keyboard/number-keyboard.js +13 -7
  143. package/cjs/components/picker/index.d.ts +2 -6
  144. package/cjs/components/picker/picker.d.ts +2 -6
  145. package/cjs/components/picker/picker.js +8 -7
  146. package/cjs/components/picker-view/picker-view.css +1 -0
  147. package/cjs/components/picker-view/wheel.js +10 -8
  148. package/cjs/components/popup/popup-base-props.d.ts +35 -0
  149. package/cjs/components/popup/popup-base-props.js +18 -0
  150. package/cjs/components/popup/popup.css +26 -0
  151. package/cjs/components/popup/popup.d.ts +3 -19
  152. package/cjs/components/popup/popup.js +43 -18
  153. package/cjs/components/progress-bar/progress-bar.css +15 -3
  154. package/cjs/components/progress-bar/progress-bar.d.ts +4 -2
  155. package/cjs/components/progress-bar/progress-bar.js +27 -5
  156. package/cjs/components/slider/slider.js +2 -1
  157. package/cjs/components/slider/thumb.d.ts +2 -1
  158. package/cjs/components/slider/thumb.js +13 -1
  159. package/cjs/components/stepper/stepper.js +14 -3
  160. package/cjs/components/steps/steps.css +1 -1
  161. package/cjs/locales/base.d.ts +7 -0
  162. package/cjs/locales/base.js +7 -0
  163. package/cjs/locales/en-US.d.ts +7 -0
  164. package/cjs/locales/es-ES.d.ts +7 -0
  165. package/cjs/locales/fa-IR.d.ts +7 -0
  166. package/cjs/locales/fr-FR.d.ts +7 -0
  167. package/cjs/locales/id-ID.d.ts +118 -0
  168. package/cjs/locales/id-ID.js +121 -0
  169. package/cjs/locales/kk-KZ.d.ts +118 -0
  170. package/cjs/locales/kk-KZ.js +124 -0
  171. package/cjs/locales/ko-KR.d.ts +7 -0
  172. package/cjs/locales/zh-CN.d.ts +7 -0
  173. package/cjs/locales/zh-CN.js +7 -0
  174. package/cjs/locales/zh-HK.d.ts +7 -0
  175. package/cjs/locales/zh-TW.d.ts +7 -0
  176. package/es/components/action-sheet/action-sheet.d.ts +2 -4
  177. package/es/components/action-sheet/action-sheet.js +6 -2
  178. package/es/components/cascader/cascader.d.ts +29 -4
  179. package/es/components/cascader/cascader.js +42 -18
  180. package/es/components/cascader/index.d.ts +21 -2
  181. package/es/components/center-popup/center-popup.css +10 -0
  182. package/es/components/center-popup/center-popup.d.ts +3 -20
  183. package/es/components/center-popup/center-popup.js +22 -13
  184. package/es/components/date-picker/date-picker.d.ts +2 -2
  185. package/es/components/date-picker/date-picker.js +3 -1
  186. package/es/components/date-picker/index.d.ts +1 -1
  187. package/es/components/input/input.css +3 -0
  188. package/es/components/input/input.d.ts +7 -4
  189. package/es/components/input/input.js +5 -1
  190. package/es/components/list/index.d.ts +10 -2
  191. package/es/components/list/list.d.ts +13 -2
  192. package/es/components/list/list.js +12 -4
  193. package/es/components/modal/modal-action-button.d.ts +2 -2
  194. package/es/components/modal/modal.css +0 -8
  195. package/es/components/modal/modal.js +4 -10
  196. package/es/components/number-keyboard/number-keyboard.d.ts +1 -5
  197. package/es/components/number-keyboard/number-keyboard.js +13 -7
  198. package/es/components/picker/index.d.ts +2 -6
  199. package/es/components/picker/picker.d.ts +2 -6
  200. package/es/components/picker/picker.js +8 -6
  201. package/es/components/picker-view/picker-view.css +1 -0
  202. package/es/components/picker-view/wheel.js +10 -8
  203. package/es/components/popup/popup-base-props.d.ts +35 -0
  204. package/es/components/popup/popup-base-props.js +11 -0
  205. package/es/components/popup/popup.css +26 -0
  206. package/es/components/popup/popup.d.ts +3 -19
  207. package/es/components/popup/popup.js +41 -19
  208. package/es/components/progress-bar/progress-bar.css +15 -3
  209. package/es/components/progress-bar/progress-bar.d.ts +4 -2
  210. package/es/components/progress-bar/progress-bar.js +25 -5
  211. package/es/components/slider/slider.js +2 -1
  212. package/es/components/slider/thumb.d.ts +2 -1
  213. package/es/components/slider/thumb.js +12 -1
  214. package/es/components/stepper/stepper.js +13 -3
  215. package/es/components/steps/steps.css +1 -1
  216. package/es/locales/base.d.ts +7 -0
  217. package/es/locales/base.js +7 -0
  218. package/es/locales/en-US.d.ts +7 -0
  219. package/es/locales/es-ES.d.ts +7 -0
  220. package/es/locales/fa-IR.d.ts +7 -0
  221. package/es/locales/fr-FR.d.ts +7 -0
  222. package/es/locales/id-ID.d.ts +118 -0
  223. package/es/locales/id-ID.js +111 -0
  224. package/es/locales/kk-KZ.d.ts +118 -0
  225. package/es/locales/kk-KZ.js +114 -0
  226. package/es/locales/ko-KR.d.ts +7 -0
  227. package/es/locales/zh-CN.d.ts +7 -0
  228. package/es/locales/zh-CN.js +7 -0
  229. package/es/locales/zh-HK.d.ts +7 -0
  230. package/es/locales/zh-TW.d.ts +7 -0
  231. package/package.json +1 -1
  232. 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
  };
@@ -155,7 +155,8 @@ export const Slider = p => {
155
155
  dragLockRef.current -= 1;
156
156
  }, 100);
157
157
  }
158
- }
158
+ },
159
+ "aria-label": props['aria-label']
159
160
  });
160
161
  };
161
162
 
@@ -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()), renderPopoverContent ? React.createElement(Popover, {
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
 
@@ -17,7 +17,7 @@
17
17
  .adm-step .adm-step-indicator .adm-step-icon-container {
18
18
  position: absolute;
19
19
  z-index: 1;
20
- background: var(--adm-color-white);
20
+ background: var(--adm-color-background);
21
21
  color: var(--icon-color);
22
22
  }
23
23
 
@@ -104,6 +104,13 @@ export declare const base: {
104
104
  canRelease: string;
105
105
  complete: string;
106
106
  };
107
+ Slider: {
108
+ name: string;
109
+ };
110
+ Stepper: {
111
+ decrease: string;
112
+ increase: string;
113
+ };
107
114
  Switch: {
108
115
  name: string;
109
116
  };
@@ -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
  }
@@ -104,6 +104,13 @@ declare const enUS: {
104
104
  canRelease: string;
105
105
  complete: string;
106
106
  };
107
+ Slider: {
108
+ name: string;
109
+ };
110
+ Stepper: {
111
+ decrease: string;
112
+ increase: string;
113
+ };
107
114
  Switch: {
108
115
  name: string;
109
116
  };
@@ -104,6 +104,13 @@ declare const esES: {
104
104
  canRelease: string;
105
105
  complete: string;
106
106
  };
107
+ Slider: {
108
+ name: string;
109
+ };
110
+ Stepper: {
111
+ decrease: string;
112
+ increase: string;
113
+ };
107
114
  Switch: {
108
115
  name: string;
109
116
  };
@@ -104,6 +104,13 @@ declare const faIR: {
104
104
  canRelease: string;
105
105
  complete: string;
106
106
  };
107
+ Slider: {
108
+ name: string;
109
+ };
110
+ Stepper: {
111
+ decrease: string;
112
+ increase: string;
113
+ };
107
114
  Switch: {
108
115
  name: string;
109
116
  };
@@ -104,6 +104,13 @@ declare const frFR: {
104
104
  canRelease: string;
105
105
  complete: string;
106
106
  };
107
+ Slider: {
108
+ name: string;
109
+ };
110
+ Stepper: {
111
+ decrease: string;
112
+ increase: string;
113
+ };
107
114
  Switch: {
108
115
  name: string;
109
116
  };
@@ -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;