antd-mobile 5.35.0 → 5.36.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 (116) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +45 -175
  2. package/2x/bundle/antd-mobile.cjs.js +7 -7
  3. package/2x/bundle/antd-mobile.es.development.js +45 -175
  4. package/2x/bundle/antd-mobile.es.js +5189 -5319
  5. package/2x/bundle/antd-mobile.umd.development.js +45 -175
  6. package/2x/bundle/antd-mobile.umd.js +7 -7
  7. package/2x/cjs/components/button/button.d.ts +2 -2
  8. package/2x/cjs/components/input/input.d.ts +2 -4
  9. package/2x/cjs/components/input/input.js +8 -17
  10. package/2x/cjs/components/input/useInputHandleKeyDown.d.ts +8 -0
  11. package/2x/cjs/components/input/useInputHandleKeyDown.js +29 -0
  12. package/2x/cjs/components/result-page/result-page.d.ts +1 -1
  13. package/2x/cjs/components/swiper/index.d.ts +1 -1
  14. package/2x/cjs/components/swiper/swiper.d.ts +2 -2
  15. package/2x/cjs/components/swiper/swiper.js +5 -1
  16. package/2x/cjs/components/text-area/text-area.d.ts +6 -2
  17. package/2x/cjs/components/text-area/text-area.js +9 -1
  18. package/2x/cjs/locales/ar-SA.d.ts +139 -0
  19. package/2x/cjs/locales/ar-SA.js +149 -0
  20. package/2x/cjs/locales/de-DE.d.ts +139 -0
  21. package/2x/cjs/locales/de-DE.js +149 -0
  22. package/2x/cjs/locales/ms-MY.d.ts +139 -0
  23. package/2x/cjs/locales/ms-MY.js +149 -0
  24. package/2x/cjs/locales/pt-BR.d.ts +139 -0
  25. package/2x/cjs/locales/pt-BR.js +144 -0
  26. package/2x/cjs/locales/vi-VN.d.ts +139 -0
  27. package/2x/cjs/locales/vi-VN.js +149 -0
  28. package/2x/cjs/locales/zh-CN.d.ts +2 -138
  29. package/2x/cjs/locales/zh-CN.js +2 -4
  30. package/2x/cjs/locales/zh-CN.test.d.ts +1 -0
  31. package/2x/cjs/locales/zh-CN.test.js +19 -0
  32. package/2x/es/components/button/button.d.ts +2 -2
  33. package/2x/es/components/input/input.d.ts +2 -4
  34. package/2x/es/components/input/input.js +8 -17
  35. package/2x/es/components/input/useInputHandleKeyDown.d.ts +8 -0
  36. package/2x/es/components/input/useInputHandleKeyDown.js +23 -0
  37. package/2x/es/components/result-page/result-page.d.ts +1 -1
  38. package/2x/es/components/swiper/index.d.ts +1 -1
  39. package/2x/es/components/swiper/swiper.d.ts +2 -2
  40. package/2x/es/components/swiper/swiper.js +5 -1
  41. package/2x/es/components/text-area/text-area.d.ts +6 -2
  42. package/2x/es/components/text-area/text-area.js +9 -1
  43. package/2x/es/locales/ar-SA.d.ts +139 -0
  44. package/2x/es/locales/ar-SA.js +142 -0
  45. package/2x/es/locales/de-DE.d.ts +139 -0
  46. package/2x/es/locales/de-DE.js +142 -0
  47. package/2x/es/locales/ms-MY.d.ts +139 -0
  48. package/2x/es/locales/ms-MY.js +142 -0
  49. package/2x/es/locales/pt-BR.d.ts +139 -0
  50. package/2x/es/locales/pt-BR.js +137 -0
  51. package/2x/es/locales/vi-VN.d.ts +139 -0
  52. package/2x/es/locales/vi-VN.js +142 -0
  53. package/2x/es/locales/zh-CN.d.ts +2 -138
  54. package/2x/es/locales/zh-CN.js +2 -4
  55. package/2x/es/locales/zh-CN.test.d.ts +1 -0
  56. package/2x/es/locales/zh-CN.test.js +16 -0
  57. package/2x/package.json +29 -20
  58. package/bundle/antd-mobile.cjs.development.js +45 -175
  59. package/bundle/antd-mobile.cjs.js +7 -7
  60. package/bundle/antd-mobile.compatible.umd.js +1 -1
  61. package/bundle/antd-mobile.es.development.js +45 -175
  62. package/bundle/antd-mobile.es.js +5189 -5319
  63. package/bundle/antd-mobile.umd.development.js +45 -175
  64. package/bundle/antd-mobile.umd.js +7 -7
  65. package/cjs/components/button/button.d.ts +2 -2
  66. package/cjs/components/input/input.d.ts +2 -4
  67. package/cjs/components/input/input.js +8 -17
  68. package/cjs/components/input/useInputHandleKeyDown.d.ts +8 -0
  69. package/cjs/components/input/useInputHandleKeyDown.js +29 -0
  70. package/cjs/components/result-page/result-page.d.ts +1 -1
  71. package/cjs/components/swiper/index.d.ts +1 -1
  72. package/cjs/components/swiper/swiper.d.ts +2 -2
  73. package/cjs/components/swiper/swiper.js +5 -1
  74. package/cjs/components/text-area/text-area.d.ts +6 -2
  75. package/cjs/components/text-area/text-area.js +9 -1
  76. package/cjs/locales/ar-SA.d.ts +139 -0
  77. package/cjs/locales/ar-SA.js +149 -0
  78. package/cjs/locales/de-DE.d.ts +139 -0
  79. package/cjs/locales/de-DE.js +149 -0
  80. package/cjs/locales/ms-MY.d.ts +139 -0
  81. package/cjs/locales/ms-MY.js +149 -0
  82. package/cjs/locales/pt-BR.d.ts +139 -0
  83. package/cjs/locales/pt-BR.js +144 -0
  84. package/cjs/locales/vi-VN.d.ts +139 -0
  85. package/cjs/locales/vi-VN.js +149 -0
  86. package/cjs/locales/zh-CN.d.ts +2 -138
  87. package/cjs/locales/zh-CN.js +2 -4
  88. package/cjs/locales/zh-CN.test.d.ts +1 -0
  89. package/cjs/locales/zh-CN.test.js +19 -0
  90. package/es/components/button/button.d.ts +2 -2
  91. package/es/components/input/input.d.ts +2 -4
  92. package/es/components/input/input.js +8 -17
  93. package/es/components/input/useInputHandleKeyDown.d.ts +8 -0
  94. package/es/components/input/useInputHandleKeyDown.js +23 -0
  95. package/es/components/result-page/result-page.d.ts +1 -1
  96. package/es/components/swiper/index.d.ts +1 -1
  97. package/es/components/swiper/swiper.d.ts +2 -2
  98. package/es/components/swiper/swiper.js +5 -1
  99. package/es/components/text-area/text-area.d.ts +6 -2
  100. package/es/components/text-area/text-area.js +9 -1
  101. package/es/locales/ar-SA.d.ts +139 -0
  102. package/es/locales/ar-SA.js +142 -0
  103. package/es/locales/de-DE.d.ts +139 -0
  104. package/es/locales/de-DE.js +142 -0
  105. package/es/locales/ms-MY.d.ts +139 -0
  106. package/es/locales/ms-MY.js +142 -0
  107. package/es/locales/pt-BR.d.ts +139 -0
  108. package/es/locales/pt-BR.js +137 -0
  109. package/es/locales/vi-VN.d.ts +139 -0
  110. package/es/locales/vi-VN.js +142 -0
  111. package/es/locales/zh-CN.d.ts +2 -138
  112. package/es/locales/zh-CN.js +2 -4
  113. package/es/locales/zh-CN.test.d.ts +1 -0
  114. package/es/locales/zh-CN.test.js +16 -0
  115. package/package.json +29 -20
  116. package/umd/antd-mobile.js +1 -1
@@ -0,0 +1,139 @@
1
+ declare const viVN: {
2
+ locale: string;
3
+ common: {
4
+ confirm: string;
5
+ cancel: string;
6
+ loading: string;
7
+ close: string;
8
+ };
9
+ Calendar: {
10
+ title: string;
11
+ confirm: string;
12
+ start: string;
13
+ end: string;
14
+ today: string;
15
+ markItems: string[];
16
+ yearAndMonth: string;
17
+ };
18
+ Cascader: {
19
+ placeholder: string;
20
+ };
21
+ Dialog: {
22
+ ok: string;
23
+ };
24
+ DatePicker: {
25
+ tillNow: string;
26
+ };
27
+ ErrorBlock: {
28
+ default: {
29
+ title: string;
30
+ description: string;
31
+ };
32
+ busy: {
33
+ title: string;
34
+ description: string;
35
+ };
36
+ disconnected: {
37
+ title: string;
38
+ description: string;
39
+ };
40
+ empty: {
41
+ title: string;
42
+ description: string;
43
+ };
44
+ };
45
+ Form: {
46
+ required: string;
47
+ optional: string;
48
+ defaultValidateMessages: {
49
+ default: string;
50
+ required: string;
51
+ enum: string;
52
+ whitespace: string;
53
+ date: {
54
+ format: string;
55
+ parse: string;
56
+ invalid: string;
57
+ };
58
+ types: {
59
+ string: string;
60
+ method: string;
61
+ array: string;
62
+ object: string;
63
+ number: string;
64
+ date: string;
65
+ boolean: string;
66
+ integer: string;
67
+ float: string;
68
+ regexp: string;
69
+ email: string;
70
+ url: string;
71
+ hex: string;
72
+ };
73
+ string: {
74
+ len: string;
75
+ min: string;
76
+ max: string;
77
+ range: string;
78
+ };
79
+ number: {
80
+ len: string;
81
+ min: string;
82
+ max: string;
83
+ range: string;
84
+ };
85
+ array: {
86
+ len: string;
87
+ min: string;
88
+ max: string;
89
+ range: string;
90
+ };
91
+ pattern: {
92
+ mismatch: string;
93
+ };
94
+ };
95
+ };
96
+ ImageUploader: {
97
+ uploading: string;
98
+ upload: string;
99
+ };
100
+ InfiniteScroll: {
101
+ noMore: string;
102
+ failedToLoad: string;
103
+ retry: string;
104
+ };
105
+ Input: {
106
+ clear: string;
107
+ };
108
+ Mask: {
109
+ name: string;
110
+ };
111
+ Modal: {
112
+ ok: string;
113
+ };
114
+ PasscodeInput: {
115
+ name: string;
116
+ };
117
+ PullToRefresh: {
118
+ pulling: string;
119
+ canRelease: string;
120
+ complete: string;
121
+ };
122
+ SearchBar: {
123
+ name: string;
124
+ };
125
+ Slider: {
126
+ name: string;
127
+ };
128
+ Stepper: {
129
+ decrease: string;
130
+ increase: string;
131
+ };
132
+ Switch: {
133
+ name: string;
134
+ };
135
+ Selector: {
136
+ name: string;
137
+ };
138
+ };
139
+ export default viVN;
@@ -0,0 +1,142 @@
1
+ import { mergeLocale } from '../utils/merge-locale';
2
+ import { base } from './base';
3
+ const typeTemplate = '${label} không phải là một ${type} hợp lệ';
4
+ const viVN = mergeLocale(base, {
5
+ 'locale': 'vi-VN',
6
+ 'common': {
7
+ 'confirm': 'Chắc chắn',
8
+ 'cancel': 'Hủy',
9
+ 'loading': 'Đang tải',
10
+ 'close': 'Đóng'
11
+ },
12
+ 'Calendar': {
13
+ 'title': 'Chọn ngày',
14
+ 'confirm': 'Xác nhận',
15
+ 'start': 'Bắt đầu',
16
+ 'end': 'Kết thúc',
17
+ 'today': 'Hôm nay',
18
+ 'markItems': ['Một', 'Hai', 'Ba', 'Bốn', 'Năm', 'Sáu', 'Ngày'],
19
+ 'yearAndMonth': 'Tháng ${month} năm ${year}'
20
+ },
21
+ 'Cascader': {
22
+ 'placeholder': 'Vui lòng lựa chọn'
23
+ },
24
+ 'Dialog': {
25
+ 'ok': 'OK'
26
+ },
27
+ 'DatePicker': {
28
+ 'tillNow': 'Đến nay'
29
+ },
30
+ 'ErrorBlock': {
31
+ 'default': {
32
+ 'title': 'Trang đang gặp một số vấn đề nhỏ',
33
+ 'description': 'Đợi chút rồi thử'
34
+ },
35
+ 'busy': {
36
+ 'title': 'Ùn tắc phía trước',
37
+ 'description': 'Thử quét mới'
38
+ },
39
+ 'disconnected': {
40
+ 'title': 'Mạng đang bận',
41
+ 'description': 'Chạm khẽ để chỉnh sửa'
42
+ },
43
+ 'empty': {
44
+ 'title': 'Không tìm thấy thứ bạn cần',
45
+ 'description': 'Tìm cái khác'
46
+ }
47
+ },
48
+ 'Form': {
49
+ 'required': 'Bắt buộc',
50
+ 'optional': 'Tùy chọn',
51
+ 'defaultValidateMessages': {
52
+ 'default': 'Lỗi xác thực trường ${label}',
53
+ 'required': 'Vui lòng nhập ${label}',
54
+ 'enum': '${label} phải là một trong [${enum}]',
55
+ 'whitespace': '${label} không được là ký tự trống',
56
+ 'date': {
57
+ 'format': '${label}Định dạng ngày tháng không còn hiệu lực',
58
+ 'parse': '${label} Không thể chuyển đổi thành ngày',
59
+ 'invalid': '${label} là một ngày không hợp lệ'
60
+ },
61
+ 'types': {
62
+ 'string': typeTemplate,
63
+ 'method': typeTemplate,
64
+ 'array': typeTemplate,
65
+ 'object': typeTemplate,
66
+ 'number': typeTemplate,
67
+ 'date': typeTemplate,
68
+ 'boolean': typeTemplate,
69
+ 'integer': typeTemplate,
70
+ 'float': typeTemplate,
71
+ 'regexp': typeTemplate,
72
+ 'email': typeTemplate,
73
+ 'url': typeTemplate,
74
+ 'hex': typeTemplate
75
+ },
76
+ 'string': {
77
+ 'len': '${label} phải là ${len} ký tự',
78
+ 'min': '${label} tối thiểu ${min} ký tự',
79
+ 'max': '${label} tối đa ${max} ký tự',
80
+ 'range': '${label} phải ở giữa chữ ${min} - ${max}'
81
+ },
82
+ 'number': {
83
+ 'len': '${label} phải bằng ${len}',
84
+ 'min': '${label} giá trị tối thiểu là ${min}',
85
+ 'max': '${label} giá trị tối đa là ${max}',
86
+ 'range': '${label} phải ở giữa ${min} - ${max}'
87
+ },
88
+ 'array': {
89
+ 'len': 'Phải là ${len} chiếc ${label}',
90
+ 'min': 'Tối thiểu ${min} chiếc ${label}',
91
+ 'max': 'Tối đa ${max} chiếc ${label}',
92
+ 'range': '${label} số lượng phải ở giữa ${min} - ${max}'
93
+ },
94
+ 'pattern': {
95
+ 'mismatch': '${label} không khớp với mẫu ${pattern}'
96
+ }
97
+ }
98
+ },
99
+ 'ImageUploader': {
100
+ 'uploading': 'Đang tải lên...',
101
+ 'upload': 'Tải lên'
102
+ },
103
+ 'InfiniteScroll': {
104
+ 'noMore': 'Hết rồi bạn ơi',
105
+ 'failedToLoad': 'Tải xuống thất bại',
106
+ 'retry': 'Tải lại'
107
+ },
108
+ 'Input': {
109
+ 'clear': 'Xóa'
110
+ },
111
+ 'Mask': {
112
+ 'name': 'Nền tối'
113
+ },
114
+ 'Modal': {
115
+ 'ok': 'OK'
116
+ },
117
+ 'PasscodeInput': {
118
+ 'name': 'Khung nhập mật khẩu'
119
+ },
120
+ 'PullToRefresh': {
121
+ 'pulling': 'Kéo xuống để làm mới',
122
+ 'canRelease': 'Thả ra để làm mới',
123
+ 'complete': 'Làm mới thành công'
124
+ },
125
+ 'SearchBar': {
126
+ 'name': 'Khung tìm kiếm'
127
+ },
128
+ 'Slider': {
129
+ 'name': 'Thanh nhập liệu trượt'
130
+ },
131
+ 'Stepper': {
132
+ 'decrease': 'Giảm',
133
+ 'increase': 'Tăng'
134
+ },
135
+ 'Switch': {
136
+ 'name': 'Bật tắt'
137
+ },
138
+ 'Selector': {
139
+ 'name': 'Chọn nhóm'
140
+ }
141
+ });
142
+ export default viVN;
@@ -1,139 +1,3 @@
1
- declare const zhCN: {
2
- locale: string;
3
- common: {
4
- confirm: string;
5
- cancel: string;
6
- loading: string;
7
- close: string;
8
- };
9
- Calendar: {
10
- title: string;
11
- confirm: string;
12
- start: string;
13
- end: string;
14
- today: string;
15
- markItems: string[];
16
- yearAndMonth: string;
17
- };
18
- Cascader: {
19
- placeholder: string;
20
- };
21
- Dialog: {
22
- ok: string;
23
- };
24
- DatePicker: {
25
- tillNow: string;
26
- };
27
- ErrorBlock: {
28
- default: {
29
- title: string;
30
- description: string;
31
- };
32
- busy: {
33
- title: string;
34
- description: string;
35
- };
36
- disconnected: {
37
- title: string;
38
- description: string;
39
- };
40
- empty: {
41
- title: string;
42
- description: string;
43
- };
44
- };
45
- Form: {
46
- required: string;
47
- optional: string;
48
- defaultValidateMessages: {
49
- default: string;
50
- required: string;
51
- enum: string;
52
- whitespace: string;
53
- date: {
54
- format: string;
55
- parse: string;
56
- invalid: string;
57
- };
58
- types: {
59
- string: string;
60
- method: string;
61
- array: string;
62
- object: string;
63
- number: string;
64
- date: string;
65
- boolean: string;
66
- integer: string;
67
- float: string;
68
- regexp: string;
69
- email: string;
70
- url: string;
71
- hex: string;
72
- };
73
- string: {
74
- len: string;
75
- min: string;
76
- max: string;
77
- range: string;
78
- };
79
- number: {
80
- len: string;
81
- min: string;
82
- max: string;
83
- range: string;
84
- };
85
- array: {
86
- len: string;
87
- min: string;
88
- max: string;
89
- range: string;
90
- };
91
- pattern: {
92
- mismatch: string;
93
- };
94
- };
95
- };
96
- ImageUploader: {
97
- uploading: string;
98
- upload: string;
99
- };
100
- InfiniteScroll: {
101
- noMore: string;
102
- failedToLoad: string;
103
- retry: string;
104
- };
105
- Input: {
106
- clear: string;
107
- };
108
- Mask: {
109
- name: string;
110
- };
111
- Modal: {
112
- ok: string;
113
- };
114
- PasscodeInput: {
115
- name: string;
116
- };
117
- PullToRefresh: {
118
- pulling: string;
119
- canRelease: string;
120
- complete: string;
121
- };
122
- SearchBar: {
123
- name: string;
124
- };
125
- Slider: {
126
- name: string;
127
- };
128
- Stepper: {
129
- decrease: string;
130
- increase: string;
131
- };
132
- Switch: {
133
- name: string;
134
- };
135
- Selector: {
136
- name: string;
137
- };
138
- };
1
+ import { Locale } from './base';
2
+ declare const zhCN: Locale;
139
3
  export default zhCN;
@@ -1,7 +1,5 @@
1
- import { mergeLocale } from '../utils/merge-locale';
2
- import { base } from './base';
3
1
  const typeTemplate = '${label}不是一个有效的${type}';
4
- const zhCN = mergeLocale(base, {
2
+ const zhCN = {
5
3
  locale: 'zh-CH',
6
4
  common: {
7
5
  confirm: '确定',
@@ -138,5 +136,5 @@ const zhCN = mergeLocale(base, {
138
136
  Selector: {
139
137
  name: '选择组'
140
138
  }
141
- });
139
+ };
142
140
  export default zhCN;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { base } from './base';
2
+ import zhCN from './zh-CN';
3
+ test('zh-CN', () => {
4
+ function compareKeys(a, b) {
5
+ return !Object.keys(a).some(key => {
6
+ if (typeof b[key] === 'string') {
7
+ return false;
8
+ } else if (b[key]) {
9
+ return !compareKeys(a[key], b[key]);
10
+ } else {
11
+ return true;
12
+ }
13
+ });
14
+ }
15
+ expect(compareKeys(base, zhCN)).toBeTruthy();
16
+ });
package/package.json CHANGED
@@ -1,7 +1,35 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.35.0",
3
+ "version": "5.36.0",
4
+ "homepage": "https://github.com/ant-design/ant-design-mobile#readme",
5
+ "bugs": {
6
+ "url": "https://github.com/ant-design/ant-design-mobile/issues"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/ant-design/ant-design-mobile.git",
11
+ "branch": "master",
12
+ "platform": "github"
13
+ },
4
14
  "license": "MIT",
15
+ "sideEffects": [
16
+ "**/*.css",
17
+ "**/*.less",
18
+ "./es/index.js",
19
+ "./src/index.ts",
20
+ "./es/global/index.js",
21
+ "./src/global/index.ts"
22
+ ],
23
+ "main": "./cjs/index.js",
24
+ "unpkg": "./umd/antd-mobile.js",
25
+ "module": "./es/index.js",
26
+ "types": "./es/index.d.ts",
27
+ "typings": "./es/index.d.ts",
28
+ "lint-staged": {
29
+ "*.{cjs,cts,js,jsx,mjs,mts,ts,tsx,vue}": "eslint --fix",
30
+ "*.{cjs,css,cts,html,js,json,jsx,less,md,mjs,mts,scss,ts,tsx,vue,yaml,yml}": "prettier --write",
31
+ "*.{css,less,scss}": "stylelint --fix"
32
+ },
5
33
  "dependencies": {
6
34
  "@floating-ui/dom": "^1.4.2",
7
35
  "@rc-component/mini-decimal": "^1.1.0",
@@ -26,26 +54,7 @@
26
54
  "peerDependencies": {
27
55
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
28
56
  },
29
- "main": "./cjs/index.js",
30
- "module": "./es/index.js",
31
- "types": "./es/index.d.ts",
32
- "typings": "./es/index.d.ts",
33
- "unpkg": "./umd/antd-mobile.js",
34
57
  "GravityCDN": "./umd/antd-mobile.js",
35
- "sideEffects": [
36
- "**/*.css",
37
- "**/*.less",
38
- "./es/index.js",
39
- "./src/index.ts",
40
- "./es/global/index.js",
41
- "./src/global/index.ts"
42
- ],
43
- "repository": {
44
- "type": "git",
45
- "url": "git+https://github.com/ant-design/ant-design-mobile.git",
46
- "branch": "master",
47
- "platform": "github"
48
- },
49
58
  "size-limit": [
50
59
  {
51
60
  "path": "./lib/bundle/antd-mobile.es.js",