antd-mobile 5.33.2 → 5.35.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 (165) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +1778 -2992
  2. package/2x/bundle/antd-mobile.cjs.js +7 -15
  3. package/2x/bundle/antd-mobile.es.development.js +778 -1992
  4. package/2x/bundle/antd-mobile.es.js +9185 -9967
  5. package/2x/bundle/antd-mobile.umd.development.js +1778 -2992
  6. package/2x/bundle/antd-mobile.umd.js +7 -15
  7. package/2x/bundle/css-vars-patch.css +3 -3
  8. package/2x/bundle/style.css +8 -11
  9. package/2x/cjs/components/button/button.d.ts +1 -1
  10. package/2x/cjs/components/button/button.patch.css +3 -3
  11. package/2x/cjs/components/cascader-view/use-cascader-value-extend.js +10 -5
  12. package/2x/cjs/components/checkbox/native-input.js +1 -1
  13. package/2x/cjs/components/config-provider/config-provider.d.ts +3 -2
  14. package/2x/cjs/components/error-block/create-error-block.d.ts +1 -0
  15. package/2x/cjs/components/error-block/create-error-block.js +1 -0
  16. package/2x/cjs/components/error-block/index.d.ts +0 -1
  17. package/2x/cjs/components/error-block/index.js +2 -3
  18. package/2x/cjs/components/form/form-item.js +1 -0
  19. package/2x/cjs/components/form/form.js +2 -2
  20. package/2x/cjs/components/infinite-scroll/infinite-scroll.js +8 -4
  21. package/2x/cjs/components/picker-view/wheel.js +7 -4
  22. package/2x/cjs/components/popover/index.d.ts +1 -1
  23. package/2x/cjs/components/popover/popover.d.ts +1 -1
  24. package/2x/cjs/components/radio/radio.css +1 -1
  25. package/2x/cjs/components/radio/radio.d.ts +1 -1
  26. package/2x/cjs/components/radio/radio.js +5 -5
  27. package/2x/cjs/components/result-page/result-page.css +5 -5
  28. package/2x/cjs/components/stepper/stepper.js +2 -2
  29. package/2x/cjs/components/swipe-action/swipe-action.d.ts +1 -1
  30. package/2x/cjs/components/swiper/index.d.ts +3 -2
  31. package/2x/cjs/components/swiper/swiper.css +2 -1
  32. package/2x/cjs/components/swiper/swiper.d.ts +18 -4
  33. package/2x/cjs/components/swiper/swiper.js +98 -53
  34. package/2x/cjs/components/text-area/text-area.css +0 -4
  35. package/2x/cjs/global/css-vars-patch.css +3 -3
  36. package/2x/cjs/index.d.ts +1 -1
  37. package/2x/cjs/index.js +6 -0
  38. package/2x/cjs/locales/hu-HU.d.ts +139 -0
  39. package/2x/cjs/locales/hu-HU.js +148 -0
  40. package/2x/cjs/locales/th-TH.d.ts +139 -0
  41. package/2x/cjs/locales/th-TH.js +149 -0
  42. package/2x/cjs/utils/with-default-props.js +8 -9
  43. package/2x/cjs/utils/with-stop-propagation.d.ts +1 -1
  44. package/2x/cjs/utils/with-stop-propagation.js +2 -1
  45. package/2x/es/components/button/button.d.ts +1 -1
  46. package/2x/es/components/button/button.patch.css +3 -3
  47. package/2x/es/components/cascader-view/use-cascader-value-extend.js +8 -3
  48. package/2x/es/components/checkbox/native-input.js +1 -1
  49. package/2x/es/components/config-provider/config-provider.d.ts +3 -2
  50. package/2x/es/components/error-block/create-error-block.d.ts +1 -0
  51. package/2x/es/components/error-block/create-error-block.js +1 -0
  52. package/2x/es/components/error-block/index.d.ts +0 -1
  53. package/2x/es/components/error-block/index.js +0 -1
  54. package/2x/es/components/form/form-item.js +1 -0
  55. package/2x/es/components/form/form.js +2 -2
  56. package/2x/es/components/infinite-scroll/infinite-scroll.js +8 -4
  57. package/2x/es/components/picker-view/wheel.js +6 -3
  58. package/2x/es/components/popover/index.d.ts +1 -1
  59. package/2x/es/components/popover/popover.d.ts +1 -1
  60. package/2x/es/components/radio/radio.css +1 -1
  61. package/2x/es/components/radio/radio.d.ts +1 -1
  62. package/2x/es/components/radio/radio.js +4 -4
  63. package/2x/es/components/result-page/result-page.css +5 -5
  64. package/2x/es/components/stepper/stepper.js +1 -1
  65. package/2x/es/components/swipe-action/swipe-action.d.ts +1 -1
  66. package/2x/es/components/swiper/index.d.ts +3 -2
  67. package/2x/es/components/swiper/swiper.css +2 -1
  68. package/2x/es/components/swiper/swiper.d.ts +18 -4
  69. package/2x/es/components/swiper/swiper.js +98 -53
  70. package/2x/es/components/text-area/text-area.css +0 -4
  71. package/2x/es/global/css-vars-patch.css +3 -3
  72. package/2x/es/index.d.ts +1 -1
  73. package/2x/es/index.js +1 -1
  74. package/2x/es/locales/hu-HU.d.ts +139 -0
  75. package/2x/es/locales/hu-HU.js +140 -0
  76. package/2x/es/locales/th-TH.d.ts +139 -0
  77. package/2x/es/locales/th-TH.js +142 -0
  78. package/2x/es/utils/with-default-props.js +8 -8
  79. package/2x/es/utils/with-stop-propagation.d.ts +1 -1
  80. package/2x/es/utils/with-stop-propagation.js +2 -1
  81. package/2x/package.json +12 -4
  82. package/bundle/antd-mobile.cjs.development.js +1778 -2992
  83. package/bundle/antd-mobile.cjs.js +7 -15
  84. package/bundle/antd-mobile.compatible.umd.js +1 -1
  85. package/bundle/antd-mobile.es.development.js +778 -1992
  86. package/bundle/antd-mobile.es.js +9185 -9967
  87. package/bundle/antd-mobile.umd.development.js +1778 -2992
  88. package/bundle/antd-mobile.umd.js +7 -15
  89. package/bundle/css-vars-patch.css +3 -3
  90. package/bundle/style.css +1 -1
  91. package/cjs/components/button/button.d.ts +1 -1
  92. package/cjs/components/button/button.patch.css +3 -3
  93. package/cjs/components/cascader-view/use-cascader-value-extend.js +10 -5
  94. package/cjs/components/checkbox/native-input.js +1 -1
  95. package/cjs/components/config-provider/config-provider.d.ts +3 -2
  96. package/cjs/components/error-block/create-error-block.d.ts +1 -0
  97. package/cjs/components/error-block/create-error-block.js +1 -0
  98. package/cjs/components/error-block/index.d.ts +0 -1
  99. package/cjs/components/error-block/index.js +2 -3
  100. package/cjs/components/form/form-item.js +1 -0
  101. package/cjs/components/form/form.js +2 -2
  102. package/cjs/components/infinite-scroll/infinite-scroll.js +8 -4
  103. package/cjs/components/picker-view/wheel.js +7 -4
  104. package/cjs/components/popover/index.d.ts +1 -1
  105. package/cjs/components/popover/popover.d.ts +1 -1
  106. package/cjs/components/radio/radio.css +1 -1
  107. package/cjs/components/radio/radio.d.ts +1 -1
  108. package/cjs/components/radio/radio.js +5 -5
  109. package/cjs/components/result-page/result-page.css +5 -5
  110. package/cjs/components/stepper/stepper.js +2 -2
  111. package/cjs/components/swipe-action/swipe-action.d.ts +1 -1
  112. package/cjs/components/swiper/index.d.ts +3 -2
  113. package/cjs/components/swiper/swiper.css +2 -1
  114. package/cjs/components/swiper/swiper.d.ts +18 -4
  115. package/cjs/components/swiper/swiper.js +98 -53
  116. package/cjs/components/text-area/text-area.css +0 -3
  117. package/cjs/global/css-vars-patch.css +3 -3
  118. package/cjs/index.d.ts +1 -1
  119. package/cjs/index.js +6 -0
  120. package/cjs/locales/hu-HU.d.ts +139 -0
  121. package/cjs/locales/hu-HU.js +148 -0
  122. package/cjs/locales/th-TH.d.ts +139 -0
  123. package/cjs/locales/th-TH.js +149 -0
  124. package/cjs/utils/with-default-props.js +8 -9
  125. package/cjs/utils/with-stop-propagation.d.ts +1 -1
  126. package/cjs/utils/with-stop-propagation.js +2 -1
  127. package/es/components/button/button.d.ts +1 -1
  128. package/es/components/button/button.patch.css +3 -3
  129. package/es/components/cascader-view/use-cascader-value-extend.js +8 -3
  130. package/es/components/checkbox/native-input.js +1 -1
  131. package/es/components/config-provider/config-provider.d.ts +3 -2
  132. package/es/components/error-block/create-error-block.d.ts +1 -0
  133. package/es/components/error-block/create-error-block.js +1 -0
  134. package/es/components/error-block/index.d.ts +0 -1
  135. package/es/components/error-block/index.js +0 -1
  136. package/es/components/form/form-item.js +1 -0
  137. package/es/components/form/form.js +2 -2
  138. package/es/components/infinite-scroll/infinite-scroll.js +8 -4
  139. package/es/components/picker-view/wheel.js +6 -3
  140. package/es/components/popover/index.d.ts +1 -1
  141. package/es/components/popover/popover.d.ts +1 -1
  142. package/es/components/radio/radio.css +1 -1
  143. package/es/components/radio/radio.d.ts +1 -1
  144. package/es/components/radio/radio.js +4 -4
  145. package/es/components/result-page/result-page.css +5 -5
  146. package/es/components/stepper/stepper.js +1 -1
  147. package/es/components/swipe-action/swipe-action.d.ts +1 -1
  148. package/es/components/swiper/index.d.ts +3 -2
  149. package/es/components/swiper/swiper.css +2 -1
  150. package/es/components/swiper/swiper.d.ts +18 -4
  151. package/es/components/swiper/swiper.js +98 -53
  152. package/es/components/text-area/text-area.css +0 -3
  153. package/es/global/css-vars-patch.css +3 -3
  154. package/es/index.d.ts +1 -1
  155. package/es/index.js +1 -1
  156. package/es/locales/hu-HU.d.ts +139 -0
  157. package/es/locales/hu-HU.js +140 -0
  158. package/es/locales/th-TH.d.ts +139 -0
  159. package/es/locales/th-TH.js +142 -0
  160. package/es/utils/with-default-props.js +8 -8
  161. package/es/utils/with-stop-propagation.d.ts +1 -1
  162. package/es/utils/with-stop-propagation.js +2 -1
  163. package/package.json +12 -4
  164. package/umd/antd-mobile.js +1 -1
  165. package/umd/antd-mobile.js.LICENSE.txt +0 -9
@@ -0,0 +1,139 @@
1
+ declare const thTH: {
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 thTH;
@@ -0,0 +1,142 @@
1
+ import { mergeLocale } from '../utils/merge-locale';
2
+ import { base } from './base';
3
+ const typeTemplate = '${label}ไม่ใช่${type}ที่ถูกต้อง';
4
+ const thTH = mergeLocale(base, {
5
+ locale: 'th-TH',
6
+ common: {
7
+ confirm: 'ยืนยัน',
8
+ cancel: 'ยกเลิก',
9
+ loading: 'กำลังโหลด',
10
+ close: 'ปิด'
11
+ },
12
+ Calendar: {
13
+ title: 'เลือกวันที่',
14
+ confirm: 'ยืนยัน',
15
+ start: 'เริ่ม',
16
+ end: 'เสร็จ',
17
+ today: 'วันนี้',
18
+ markItems: ['วันจันทร์', 'วันอังคาร', 'วันพุธ', 'วันพฤหัสบดี', 'วันศุกร์', 'วันเสาร์', 'วันอาทิตย์'],
19
+ yearAndMonth: '${year}/${month}'
20
+ },
21
+ Cascader: {
22
+ placeholder: 'เลือก'
23
+ },
24
+ Dialog: {
25
+ ok: 'โอเค'
26
+ },
27
+ DatePicker: {
28
+ tillNow: 'จนถึงตอนนี้'
29
+ },
30
+ ErrorBlock: {
31
+ default: {
32
+ title: 'อุ๊ปส์, มีบางอย่างผิดพลาด',
33
+ description: 'กรุณารอสักครู่แล้วลองอีกครั้ง'
34
+ },
35
+ busy: {
36
+ title: 'อุ๊ปส์, ไม่ได้โหลด',
37
+ description: 'ลองรีเฟรชหน้า'
38
+ },
39
+ disconnected: {
40
+ title: 'เครือข่ายไม่ว่าง',
41
+ description: 'ลองรีเฟรชหน้า'
42
+ },
43
+ empty: {
44
+ title: 'อืมม, ไม่พบ...',
45
+ description: 'ลองค้นหาใหม่?'
46
+ }
47
+ },
48
+ Form: {
49
+ required: 'จำเป็น',
50
+ optional: 'ไม่จำเป็น',
51
+ defaultValidateMessages: {
52
+ default: 'ข้อผิดพลาดในการตรวจสอบฟิลด์ ${label}',
53
+ required: 'กรุณากรอก ${label}',
54
+ enum: '${label} ต้องเป็นหนึ่งใน [${enum}]',
55
+ whitespace: '${label} ต้องไม่มีช่องว่าง',
56
+ date: {
57
+ format: 'รูปแบบวันที่ ${label} ไม่ถูกต้อง',
58
+ parse: '${label} ไม่สามารถแปลงเป็นวันที่ได้',
59
+ invalid: '${label} เป็นวันที่ไม่ถูกต้อง'
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} ต้องมี ${len} ตัวอักษร',
78
+ min: '${label} ต้องมีอย่างน้อย ${min} ตัวอักษร',
79
+ max: '${label} ต้องมีไม่เกิน ${max} ตัวอักษร',
80
+ range: '${label} ต้องอยู่ระหว่าง ${min}-${max} ตัวอักษร'
81
+ },
82
+ number: {
83
+ len: '${label} ต้องเท่ากับ ${len}',
84
+ min: '${label} ต้องมีอย่างน้อย ${min}',
85
+ max: '${label} ต้องมีไม่เกิน ${max}',
86
+ range: '${label} ต้องอยู่ระหว่าง ${min}-${max}'
87
+ },
88
+ array: {
89
+ len: 'ต้องมี ${len} ${label}',
90
+ min: 'อย่างน้อย ${min} ${label}',
91
+ max: 'มากสุด ${max} ${label}',
92
+ range: 'จำนวน ${label} ต้องอยู่ระหว่าง ${min}-${max}'
93
+ },
94
+ pattern: {
95
+ mismatch: '${label} ไม่ตรงกับรูปแบบ ${pattern}'
96
+ }
97
+ }
98
+ },
99
+ ImageUploader: {
100
+ uploading: 'กำลังอัปโหลด...',
101
+ upload: 'อัปโหลด'
102
+ },
103
+ InfiniteScroll: {
104
+ noMore: 'ไม่มีเพิ่มเติม',
105
+ failedToLoad: 'โหลดล้มเหลว',
106
+ retry: 'ลองใหม่'
107
+ },
108
+ Input: {
109
+ clear: 'ชัดเจน'
110
+ },
111
+ Mask: {
112
+ name: 'มาสก์'
113
+ },
114
+ Modal: {
115
+ ok: 'ตกลง'
116
+ },
117
+ PasscodeInput: {
118
+ name: 'ป้อนรหัสผ่าน'
119
+ },
120
+ PullToRefresh: {
121
+ pulling: 'ดึงลงเพื่อรีเฟรช',
122
+ canRelease: 'ปล่อยเพื่อรีเฟรชทันที',
123
+ complete: 'รีเฟรชสำเร็จ'
124
+ },
125
+ SearchBar: {
126
+ name: 'แถบค้นหา'
127
+ },
128
+ Slider: {
129
+ name: 'สไลด์เดอร์'
130
+ },
131
+ Stepper: {
132
+ decrease: 'ลด',
133
+ increase: 'เพิ่ม'
134
+ },
135
+ Switch: {
136
+ name: 'สวิตช์'
137
+ },
138
+ Selector: {
139
+ name: 'เลือก'
140
+ }
141
+ });
142
+ export default thTH;
@@ -1,11 +1,11 @@
1
- import assignWith from 'lodash/assignWith';
2
1
  export function mergeProps(...items) {
3
- function customizer(objValue, srcValue) {
4
- return srcValue === undefined ? objValue : srcValue;
5
- }
6
- let ret = Object.assign({}, items[0]);
7
- for (let i = 1; i < items.length; i++) {
8
- ret = assignWith(ret, items[i], customizer);
9
- }
2
+ const ret = {};
3
+ items.forEach(item => {
4
+ Object.keys(item).forEach(key => {
5
+ if (item[key] !== undefined) {
6
+ ret[key] = item[key];
7
+ }
8
+ });
9
+ });
10
10
  return ret;
11
11
  }
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { ReactElement } from 'react';
3
- export declare type PropagationEvent = 'click';
3
+ export declare type PropagationEvent = 'click' | 'touchstart';
4
4
  export declare function withStopPropagation(events: PropagationEvent[], element: ReactElement): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  const eventToPropRecord = {
3
- 'click': 'onClick'
3
+ 'click': 'onClick',
4
+ 'touchstart': 'onTouchStart'
4
5
  };
5
6
  export function withStopPropagation(events, element) {
6
7
  const props = Object.assign({}, element.props);
package/2x/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.33.2",
3
+ "version": "5.35.0",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "@floating-ui/dom": "^1.4.2",
@@ -12,9 +12,11 @@
12
12
  "antd-mobile-v5-count": "^1.0.1",
13
13
  "classnames": "^2.3.2",
14
14
  "dayjs": "^1.11.7",
15
- "lodash": "^4.17.21",
15
+ "deepmerge": "^4.3.1",
16
+ "nano-memoize": "^3.0.16",
16
17
  "rc-field-form": "~1.27.4",
17
- "rc-util": "^5.30.0",
18
+ "rc-util": "^5.38.1",
19
+ "react-fast-compare": "^3.2.2",
18
20
  "react-is": "^18.2.0",
19
21
  "runes2": "^1.1.2",
20
22
  "staged-components": "^1.1.3",
@@ -43,5 +45,11 @@
43
45
  "url": "git+https://github.com/ant-design/ant-design-mobile.git",
44
46
  "branch": "master",
45
47
  "platform": "github"
46
- }
48
+ },
49
+ "size-limit": [
50
+ {
51
+ "path": "./lib/bundle/antd-mobile.es.js",
52
+ "limit": "200 kB"
53
+ }
54
+ ]
47
55
  }