antd-mobile 5.28.2 → 5.29.1

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 (266) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +429 -217
  2. package/2x/bundle/antd-mobile.cjs.js +9 -9
  3. package/2x/bundle/antd-mobile.es.development.js +429 -217
  4. package/2x/bundle/antd-mobile.es.js +4918 -4678
  5. package/2x/bundle/antd-mobile.umd.development.js +429 -217
  6. package/2x/bundle/antd-mobile.umd.js +9 -9
  7. package/2x/bundle/style.css +36 -33
  8. package/2x/cjs/components/action-sheet/action-sheet.css +1 -1
  9. package/2x/cjs/components/action-sheet/action-sheet.js +6 -2
  10. package/2x/cjs/components/avatar/avatar.d.ts +1 -1
  11. package/2x/cjs/components/avatar/avatar.js +2 -1
  12. package/2x/cjs/components/badge/badge.css +2 -2
  13. package/2x/cjs/components/button/button.css +2 -2
  14. package/2x/cjs/components/calendar/calendar.js +1 -1
  15. package/2x/cjs/components/capsule-tabs/capsule-tabs.css +2 -2
  16. package/2x/cjs/components/check-list/check-list-item.js +3 -1
  17. package/2x/cjs/components/check-list/check-list.d.ts +1 -0
  18. package/2x/cjs/components/check-list/check-list.js +2 -0
  19. package/2x/cjs/components/check-list/context.d.ts +1 -0
  20. package/2x/cjs/components/checkbox/checkbox.css +2 -2
  21. package/2x/cjs/components/ellipsis/ellipsis.js +1 -1
  22. package/2x/cjs/components/image/image.css +1 -1
  23. package/2x/cjs/components/index-bar/index-bar.css +4 -4
  24. package/2x/cjs/components/input/input.d.ts +1 -1
  25. package/2x/cjs/components/jumbo-tabs/jumbo-tabs.css +2 -2
  26. package/2x/cjs/components/notice-bar/notice-bar.css +1 -1
  27. package/2x/cjs/components/number-keyboard/number-keyboard.js +14 -8
  28. package/2x/cjs/components/popover/index.d.ts +1 -1
  29. package/2x/cjs/components/popover/popover.css +1 -1
  30. package/2x/cjs/components/popover/popover.d.ts +2 -2
  31. package/2x/cjs/components/popover/popover.js +1 -1
  32. package/2x/cjs/components/popup/popup.js +13 -11
  33. package/2x/cjs/components/radio/radio.css +2 -2
  34. package/2x/cjs/components/search-bar/search-bar.css +1 -1
  35. package/2x/cjs/components/selector/selector.css +1 -1
  36. package/2x/cjs/components/selector/selector.js +10 -2
  37. package/2x/cjs/components/side-bar/side-bar.css +1 -1
  38. package/2x/cjs/components/slider/slider.css +3 -3
  39. package/2x/cjs/components/stepper/stepper.css +2 -2
  40. package/2x/cjs/components/swipe-action/swipe-action.css +1 -1
  41. package/2x/cjs/components/switch/switch.css +2 -2
  42. package/2x/cjs/components/tabs/tabs.js +5 -2
  43. package/2x/cjs/components/text-area/text-area.d.ts +1 -1
  44. package/2x/cjs/components/text-area/text-area.js +1 -0
  45. package/2x/cjs/components/virtual-input/virtual-input.js +11 -2
  46. package/2x/cjs/global/global.css +5 -2
  47. package/2x/cjs/global/theme-default.css +5 -2
  48. package/2x/cjs/locales/base.d.ts +3 -0
  49. package/2x/cjs/locales/base.js +3 -0
  50. package/2x/cjs/locales/da-DK.d.ts +134 -0
  51. package/2x/cjs/locales/da-DK.js +132 -0
  52. package/2x/cjs/locales/en-US.d.ts +3 -0
  53. package/2x/cjs/locales/es-ES.d.ts +3 -0
  54. package/2x/cjs/locales/fa-IR.d.ts +3 -0
  55. package/2x/cjs/locales/fr-FR.d.ts +3 -0
  56. package/2x/cjs/locales/id-ID.d.ts +3 -0
  57. package/2x/cjs/locales/it-IT.d.ts +134 -0
  58. package/2x/cjs/locales/it-IT.js +144 -0
  59. package/2x/cjs/locales/ja-JP.d.ts +3 -0
  60. package/2x/cjs/locales/kk-KZ.d.ts +3 -0
  61. package/2x/cjs/locales/ko-KR.d.ts +3 -0
  62. package/2x/cjs/locales/nb-NO.d.ts +134 -0
  63. package/2x/cjs/locales/nb-NO.js +144 -0
  64. package/2x/cjs/locales/nl-NL.d.ts +134 -0
  65. package/2x/cjs/locales/nl-NL.js +144 -0
  66. package/2x/cjs/locales/zh-CN.d.ts +3 -0
  67. package/2x/cjs/locales/zh-CN.js +3 -0
  68. package/2x/cjs/locales/zh-HK.d.ts +3 -0
  69. package/2x/cjs/locales/zh-TW.d.ts +3 -0
  70. package/2x/es/components/action-sheet/action-sheet.css +1 -1
  71. package/2x/es/components/action-sheet/action-sheet.js +6 -2
  72. package/2x/es/components/avatar/avatar.d.ts +1 -1
  73. package/2x/es/components/avatar/avatar.js +2 -1
  74. package/2x/es/components/badge/badge.css +2 -2
  75. package/2x/es/components/button/button.css +2 -2
  76. package/2x/es/components/calendar/calendar.js +1 -1
  77. package/2x/es/components/capsule-tabs/capsule-tabs.css +2 -2
  78. package/2x/es/components/check-list/check-list-item.js +3 -1
  79. package/2x/es/components/check-list/check-list.d.ts +1 -0
  80. package/2x/es/components/check-list/check-list.js +2 -0
  81. package/2x/es/components/check-list/context.d.ts +1 -0
  82. package/2x/es/components/checkbox/checkbox.css +2 -2
  83. package/2x/es/components/ellipsis/ellipsis.js +1 -1
  84. package/2x/es/components/image/image.css +1 -1
  85. package/2x/es/components/index-bar/index-bar.css +4 -4
  86. package/2x/es/components/input/input.d.ts +1 -1
  87. package/2x/es/components/jumbo-tabs/jumbo-tabs.css +2 -2
  88. package/2x/es/components/notice-bar/notice-bar.css +1 -1
  89. package/2x/es/components/number-keyboard/number-keyboard.js +14 -8
  90. package/2x/es/components/popover/index.d.ts +1 -1
  91. package/2x/es/components/popover/popover.css +1 -1
  92. package/2x/es/components/popover/popover.d.ts +2 -2
  93. package/2x/es/components/popover/popover.js +1 -1
  94. package/2x/es/components/popup/popup.js +13 -11
  95. package/2x/es/components/radio/radio.css +2 -2
  96. package/2x/es/components/search-bar/search-bar.css +1 -1
  97. package/2x/es/components/selector/selector.css +1 -1
  98. package/2x/es/components/selector/selector.js +10 -2
  99. package/2x/es/components/side-bar/side-bar.css +1 -1
  100. package/2x/es/components/slider/slider.css +3 -3
  101. package/2x/es/components/stepper/stepper.css +2 -2
  102. package/2x/es/components/swipe-action/swipe-action.css +1 -1
  103. package/2x/es/components/switch/switch.css +2 -2
  104. package/2x/es/components/tabs/tabs.js +5 -2
  105. package/2x/es/components/text-area/text-area.d.ts +1 -1
  106. package/2x/es/components/text-area/text-area.js +1 -0
  107. package/2x/es/components/virtual-input/virtual-input.js +11 -2
  108. package/2x/es/global/global.css +5 -2
  109. package/2x/es/global/theme-default.css +5 -2
  110. package/2x/es/locales/base.d.ts +3 -0
  111. package/2x/es/locales/base.js +3 -0
  112. package/2x/es/locales/da-DK.d.ts +134 -0
  113. package/2x/es/locales/da-DK.js +125 -0
  114. package/2x/es/locales/en-US.d.ts +3 -0
  115. package/2x/es/locales/es-ES.d.ts +3 -0
  116. package/2x/es/locales/fa-IR.d.ts +3 -0
  117. package/2x/es/locales/fr-FR.d.ts +3 -0
  118. package/2x/es/locales/id-ID.d.ts +3 -0
  119. package/2x/es/locales/it-IT.d.ts +134 -0
  120. package/2x/es/locales/it-IT.js +137 -0
  121. package/2x/es/locales/ja-JP.d.ts +3 -0
  122. package/2x/es/locales/kk-KZ.d.ts +3 -0
  123. package/2x/es/locales/ko-KR.d.ts +3 -0
  124. package/2x/es/locales/nb-NO.d.ts +134 -0
  125. package/2x/es/locales/nb-NO.js +137 -0
  126. package/2x/es/locales/nl-NL.d.ts +134 -0
  127. package/2x/es/locales/nl-NL.js +137 -0
  128. package/2x/es/locales/zh-CN.d.ts +3 -0
  129. package/2x/es/locales/zh-CN.js +3 -0
  130. package/2x/es/locales/zh-HK.d.ts +3 -0
  131. package/2x/es/locales/zh-TW.d.ts +3 -0
  132. package/2x/package.json +1 -1
  133. package/bundle/antd-mobile.cjs.development.js +429 -217
  134. package/bundle/antd-mobile.cjs.js +9 -9
  135. package/bundle/antd-mobile.compatible.umd.js +1 -1
  136. package/bundle/antd-mobile.es.development.js +429 -217
  137. package/bundle/antd-mobile.es.js +4918 -4678
  138. package/bundle/antd-mobile.umd.development.js +429 -217
  139. package/bundle/antd-mobile.umd.js +9 -9
  140. package/bundle/style.css +1 -1
  141. package/cjs/components/action-sheet/action-sheet.css +1 -1
  142. package/cjs/components/action-sheet/action-sheet.js +6 -2
  143. package/cjs/components/avatar/avatar.d.ts +1 -1
  144. package/cjs/components/avatar/avatar.js +2 -1
  145. package/cjs/components/badge/badge.css +2 -2
  146. package/cjs/components/button/button.css +2 -2
  147. package/cjs/components/calendar/calendar.js +1 -1
  148. package/cjs/components/capsule-tabs/capsule-tabs.css +2 -2
  149. package/cjs/components/check-list/check-list-item.js +3 -1
  150. package/cjs/components/check-list/check-list.d.ts +1 -0
  151. package/cjs/components/check-list/check-list.js +2 -0
  152. package/cjs/components/check-list/context.d.ts +1 -0
  153. package/cjs/components/checkbox/checkbox.css +2 -2
  154. package/cjs/components/ellipsis/ellipsis.js +1 -1
  155. package/cjs/components/image/image.css +1 -1
  156. package/cjs/components/index-bar/index-bar.css +4 -4
  157. package/cjs/components/input/input.d.ts +1 -1
  158. package/cjs/components/jumbo-tabs/jumbo-tabs.css +2 -2
  159. package/cjs/components/notice-bar/notice-bar.css +1 -1
  160. package/cjs/components/number-keyboard/number-keyboard.js +14 -8
  161. package/cjs/components/popover/index.d.ts +1 -1
  162. package/cjs/components/popover/popover.css +1 -1
  163. package/cjs/components/popover/popover.d.ts +2 -2
  164. package/cjs/components/popover/popover.js +1 -1
  165. package/cjs/components/popup/popup.js +13 -11
  166. package/cjs/components/radio/radio.css +2 -2
  167. package/cjs/components/search-bar/search-bar.css +1 -1
  168. package/cjs/components/selector/selector.css +1 -1
  169. package/cjs/components/selector/selector.js +10 -2
  170. package/cjs/components/side-bar/side-bar.css +1 -1
  171. package/cjs/components/slider/slider.css +3 -3
  172. package/cjs/components/stepper/stepper.css +2 -2
  173. package/cjs/components/swipe-action/swipe-action.css +1 -1
  174. package/cjs/components/switch/switch.css +2 -2
  175. package/cjs/components/tabs/tabs.js +5 -2
  176. package/cjs/components/text-area/text-area.d.ts +1 -1
  177. package/cjs/components/text-area/text-area.js +1 -0
  178. package/cjs/components/virtual-input/virtual-input.js +11 -2
  179. package/cjs/global/global.css +5 -2
  180. package/cjs/global/theme-default.css +5 -2
  181. package/cjs/locales/base.d.ts +3 -0
  182. package/cjs/locales/base.js +3 -0
  183. package/cjs/locales/da-DK.d.ts +134 -0
  184. package/cjs/locales/da-DK.js +132 -0
  185. package/cjs/locales/en-US.d.ts +3 -0
  186. package/cjs/locales/es-ES.d.ts +3 -0
  187. package/cjs/locales/fa-IR.d.ts +3 -0
  188. package/cjs/locales/fr-FR.d.ts +3 -0
  189. package/cjs/locales/id-ID.d.ts +3 -0
  190. package/cjs/locales/it-IT.d.ts +134 -0
  191. package/cjs/locales/it-IT.js +144 -0
  192. package/cjs/locales/ja-JP.d.ts +3 -0
  193. package/cjs/locales/kk-KZ.d.ts +3 -0
  194. package/cjs/locales/ko-KR.d.ts +3 -0
  195. package/cjs/locales/nb-NO.d.ts +134 -0
  196. package/cjs/locales/nb-NO.js +144 -0
  197. package/cjs/locales/nl-NL.d.ts +134 -0
  198. package/cjs/locales/nl-NL.js +144 -0
  199. package/cjs/locales/zh-CN.d.ts +3 -0
  200. package/cjs/locales/zh-CN.js +3 -0
  201. package/cjs/locales/zh-HK.d.ts +3 -0
  202. package/cjs/locales/zh-TW.d.ts +3 -0
  203. package/es/components/action-sheet/action-sheet.css +1 -1
  204. package/es/components/action-sheet/action-sheet.js +6 -2
  205. package/es/components/avatar/avatar.d.ts +1 -1
  206. package/es/components/avatar/avatar.js +2 -1
  207. package/es/components/badge/badge.css +2 -2
  208. package/es/components/button/button.css +2 -2
  209. package/es/components/calendar/calendar.js +1 -1
  210. package/es/components/capsule-tabs/capsule-tabs.css +2 -2
  211. package/es/components/check-list/check-list-item.js +3 -1
  212. package/es/components/check-list/check-list.d.ts +1 -0
  213. package/es/components/check-list/check-list.js +2 -0
  214. package/es/components/check-list/context.d.ts +1 -0
  215. package/es/components/checkbox/checkbox.css +2 -2
  216. package/es/components/ellipsis/ellipsis.js +1 -1
  217. package/es/components/image/image.css +1 -1
  218. package/es/components/index-bar/index-bar.css +4 -4
  219. package/es/components/input/input.d.ts +1 -1
  220. package/es/components/jumbo-tabs/jumbo-tabs.css +2 -2
  221. package/es/components/notice-bar/notice-bar.css +1 -1
  222. package/es/components/number-keyboard/number-keyboard.js +14 -8
  223. package/es/components/popover/index.d.ts +1 -1
  224. package/es/components/popover/popover.css +1 -1
  225. package/es/components/popover/popover.d.ts +2 -2
  226. package/es/components/popover/popover.js +1 -1
  227. package/es/components/popup/popup.js +13 -11
  228. package/es/components/radio/radio.css +2 -2
  229. package/es/components/search-bar/search-bar.css +1 -1
  230. package/es/components/selector/selector.css +1 -1
  231. package/es/components/selector/selector.js +10 -2
  232. package/es/components/side-bar/side-bar.css +1 -1
  233. package/es/components/slider/slider.css +3 -3
  234. package/es/components/stepper/stepper.css +2 -2
  235. package/es/components/swipe-action/swipe-action.css +1 -1
  236. package/es/components/switch/switch.css +2 -2
  237. package/es/components/tabs/tabs.js +5 -2
  238. package/es/components/text-area/text-area.d.ts +1 -1
  239. package/es/components/text-area/text-area.js +1 -0
  240. package/es/components/virtual-input/virtual-input.js +11 -2
  241. package/es/global/global.css +5 -2
  242. package/es/global/theme-default.css +5 -2
  243. package/es/locales/base.d.ts +3 -0
  244. package/es/locales/base.js +3 -0
  245. package/es/locales/da-DK.d.ts +134 -0
  246. package/es/locales/da-DK.js +125 -0
  247. package/es/locales/en-US.d.ts +3 -0
  248. package/es/locales/es-ES.d.ts +3 -0
  249. package/es/locales/fa-IR.d.ts +3 -0
  250. package/es/locales/fr-FR.d.ts +3 -0
  251. package/es/locales/id-ID.d.ts +3 -0
  252. package/es/locales/it-IT.d.ts +134 -0
  253. package/es/locales/it-IT.js +137 -0
  254. package/es/locales/ja-JP.d.ts +3 -0
  255. package/es/locales/kk-KZ.d.ts +3 -0
  256. package/es/locales/ko-KR.d.ts +3 -0
  257. package/es/locales/nb-NO.d.ts +134 -0
  258. package/es/locales/nb-NO.js +137 -0
  259. package/es/locales/nl-NL.d.ts +134 -0
  260. package/es/locales/nl-NL.js +137 -0
  261. package/es/locales/zh-CN.d.ts +3 -0
  262. package/es/locales/zh-CN.js +3 -0
  263. package/es/locales/zh-HK.d.ts +3 -0
  264. package/es/locales/zh-TW.d.ts +3 -0
  265. package/package.json +1 -1
  266. package/umd/antd-mobile.js +1 -1
@@ -88,17 +88,19 @@ const Popup = p => {
88
88
  className: bodyCls,
89
89
  style: Object.assign(Object.assign({}, props.bodyStyle), {
90
90
  transform: percent.to(v => {
91
- if (props.position === 'bottom') {
92
- return `translate(0, ${v}%)`;
93
- }
94
- if (props.position === 'top') {
95
- return `translate(0, -${v}%)`;
96
- }
97
- if (props.position === 'left') {
98
- return `translate(-${v}%, 0)`;
99
- }
100
- if (props.position === 'right') {
101
- return `translate(${v}%, 0)`;
91
+ if (v) {
92
+ if (props.position === 'bottom') {
93
+ return `translate(0, ${v}%)`;
94
+ }
95
+ if (props.position === 'top') {
96
+ return `translate(0, -${v}%)`;
97
+ }
98
+ if (props.position === 'left') {
99
+ return `translate(-${v}%, 0)`;
100
+ }
101
+ if (props.position === 'right') {
102
+ return `translate(${v}%, 0)`;
103
+ }
102
104
  }
103
105
  return 'none';
104
106
  })
@@ -20,7 +20,7 @@
20
20
  box-sizing: border-box;
21
21
  width: var(--icon-size);
22
22
  height: var(--icon-size);
23
- color: var(--adm-color-white);
23
+ color: var(--adm-color-text-light-solid);
24
24
  }
25
25
 
26
26
  .adm-radio .adm-radio-icon > svg {
@@ -49,7 +49,7 @@
49
49
  .adm-radio.adm-radio-disabled .adm-radio-icon {
50
50
  color: #b7b7b7;
51
51
  border-color: var(--adm-color-light);
52
- background-color: var(--adm-color-box);
52
+ background-color: var(--adm-color-fill-content);
53
53
  }
54
54
 
55
55
  .adm-radio .adm-radio-custom-icon {
@@ -1,7 +1,7 @@
1
1
  .adm-search-bar {
2
2
  --height: 64px;
3
3
  --padding-left: 16px;
4
- --background: var(--adm-color-box);
4
+ --background: var(--adm-color-fill-content);
5
5
  --border-radius: 12px;
6
6
  --placeholder-color: var(--adm-color-weak);
7
7
  ---placeholder-color: var(--placeholder-color);
@@ -1,5 +1,5 @@
1
1
  .adm-selector {
2
- --color: var(--adm-color-box);
2
+ --color: var(--adm-color-fill-content);
3
3
  --checked-color: #e7f1ff;
4
4
  --text-color: var(--adm-color-text);
5
5
  --checked-text-color: var(--adm-color-primary);
@@ -12,6 +12,7 @@ var _space = _interopRequireDefault(require("../space"));
12
12
  var _grid = _interopRequireDefault(require("../grid"));
13
13
  var _usePropsValue = require("../../utils/use-props-value");
14
14
  var _checkMark = require("./check-mark");
15
+ var _configProvider = require("../config-provider");
15
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
17
  const classPrefix = `adm-selector`;
17
18
  const defaultProps = {
@@ -34,6 +35,9 @@ const Selector = p => {
34
35
  (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, val, extend);
35
36
  }
36
37
  });
38
+ const {
39
+ locale
40
+ } = (0, _configProvider.useConfig)();
37
41
  const items = props.options.map(option => {
38
42
  const active = (value || []).includes(option.value);
39
43
  const disabled = option.disabled || props.disabled;
@@ -56,7 +60,9 @@ const Selector = p => {
56
60
  const val = active ? [] : [option.value];
57
61
  setValue(val);
58
62
  }
59
- }
63
+ },
64
+ role: 'option',
65
+ "aria-selected": active && !props.multiple || active && props.multiple
60
66
  }, option.label, option.description && _react.default.createElement("div", {
61
67
  className: `${classPrefix}-item-description`
62
68
  }, option.description), active && props.showCheckMark && _react.default.createElement("div", {
@@ -64,7 +70,9 @@ const Selector = p => {
64
70
  }, _react.default.createElement(_checkMark.CheckMark, null)));
65
71
  });
66
72
  return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
67
- className: classPrefix
73
+ className: classPrefix,
74
+ role: 'listbox',
75
+ "aria-label": locale.Selector.name
68
76
  }, !props.columns && _react.default.createElement(_space.default, {
69
77
  wrap: true
70
78
  }, items), props.columns && _react.default.createElement(_grid.default, {
@@ -2,7 +2,7 @@
2
2
  --height: 100%;
3
3
  --width: 210px;
4
4
  --item-border-radius: 16px;
5
- --background-color: var(--adm-color-box);
5
+ --background-color: var(--adm-color-fill-content);
6
6
  width: var(--width);
7
7
  height: var(--height);
8
8
  box-sizing: border-box;
@@ -14,7 +14,7 @@
14
14
  position: relative;
15
15
  width: 100%;
16
16
  height: 6px;
17
- background-color: var(--adm-color-box);
17
+ background-color: var(--adm-color-fill-content);
18
18
  border-radius: 6px;
19
19
  }
20
20
 
@@ -39,7 +39,7 @@
39
39
  width: 14px;
40
40
  height: 14px;
41
41
  margin-left: -6px;
42
- background-color: var(--adm-color-box);
42
+ background-color: var(--adm-color-fill-content);
43
43
  border-radius: 50%;
44
44
  }
45
45
 
@@ -54,7 +54,7 @@
54
54
  border-radius: 50%;
55
55
  text-align: center;
56
56
  line-height: 56px;
57
- background: var(--adm-color-white);
57
+ background: var(--adm-color-text-light-solid);
58
58
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.12);
59
59
  color: var(--fill-color);
60
60
  }
@@ -3,14 +3,14 @@
3
3
  --input-width: 88px;
4
4
  --input-font-size: var(--adm-font-size-main);
5
5
  --input-font-color: var(--adm-color-text);
6
- --input-background-color: var(--adm-color-box);
6
+ --input-background-color: var(--adm-color-fill-content);
7
7
  --border-radius: 4px;
8
8
  --border: none;
9
9
  --border-inner: solid 4px transparent;
10
10
  --active-border: var(--border);
11
11
  --button-font-size: var(--adm-font-size-7);
12
12
  --button-text-color: var(--adm-color-primary);
13
- --button-background-color: var(--adm-color-box);
13
+ --button-background-color: var(--adm-color-fill-content);
14
14
  --button-width: var(--height);
15
15
  display: flex;
16
16
  align-items: center;
@@ -36,7 +36,7 @@
36
36
  .adm-swipe-action-action-button.adm-button {
37
37
  --border-radius: 0;
38
38
  --border-width: 0;
39
- --text-color: var(--adm-color-white);
39
+ --text-color: var(--adm-color-text-light-solid);
40
40
  padding-left: 40px;
41
41
  padding-right: 40px;
42
42
  }
@@ -57,7 +57,7 @@
57
57
  width: calc(var(--height) - 2 * var(--border-width));
58
58
  height: calc(var(--height) - 2 * var(--border-width));
59
59
  border-radius: calc(var(--height) - 2 * var(--border-width));
60
- background: var(--adm-color-white);
60
+ background: var(--adm-color-text-light-solid);
61
61
  position: absolute;
62
62
  z-index: 2;
63
63
  top: var(--border-width);
@@ -93,7 +93,7 @@
93
93
 
94
94
  .adm-switch.adm-switch-checked .adm-switch-inner {
95
95
  margin: 0 calc(var(--height) - var(--border-width) + 10px) 0 20px;
96
- color: var(--adm-color-white);
96
+ color: var(--adm-color-text-light-solid);
97
97
  }
98
98
 
99
99
  .adm-switch.adm-switch-disabled {
@@ -192,7 +192,8 @@ const Tabs = p => {
192
192
  className: `${classPrefix}-tab-list`,
193
193
  ref: tabListContainerRef,
194
194
  scrollLeft: scrollLeft,
195
- onScroll: updateMask
195
+ onScroll: updateMask,
196
+ role: 'tablist'
196
197
  }, _react.default.createElement(_web.animated.div, {
197
198
  ref: activeLineRef,
198
199
  className: `${classPrefix}-tab-line`,
@@ -219,7 +220,9 @@ const Tabs = p => {
219
220
  className: (0, _classnames.default)(`${classPrefix}-tab`, {
220
221
  [`${classPrefix}-tab-active`]: pane.key === activeKey,
221
222
  [`${classPrefix}-tab-disabled`]: pane.props.disabled
222
- })
223
+ }),
224
+ role: 'tab',
225
+ "aria-selected": pane.key === activeKey
223
226
  }, pane.props.title)))))), panes.map(pane => {
224
227
  if (pane.props.children === undefined) {
225
228
  return null;
@@ -21,7 +21,7 @@ export declare type TextAreaRef = {
21
21
  blur: () => void;
22
22
  nativeElement: HTMLTextAreaElement | null;
23
23
  };
24
- export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "onClick" | "disabled" | "name" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "autoComplete" | "autoFocus" | "readOnly"> & {
24
+ export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "onClick" | "disabled" | "name" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "autoFocus" | "autoComplete" | "readOnly"> & {
25
25
  onChange?: ((val: string) => void) | undefined;
26
26
  value?: string | undefined;
27
27
  defaultValue?: string | undefined;
@@ -126,6 +126,7 @@ const TextArea = (0, _react.forwardRef)((p, ref) => {
126
126
  ref: hiddenTextAreaRef,
127
127
  className: `${classPrefix}-element ${classPrefix}-element-hidden`,
128
128
  value: value,
129
+ rows: props.rows,
129
130
  "aria-hidden": true,
130
131
  readOnly: true
131
132
  })));
@@ -11,6 +11,7 @@ var _usePropsValue = require("../../utils/use-props-value");
11
11
  var _classnames = _interopRequireDefault(require("classnames"));
12
12
  var _antdMobileIcons = require("antd-mobile-icons");
13
13
  var _ahooks = require("ahooks");
14
+ var _configProvider = require("../config-provider");
14
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
17
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -24,6 +25,9 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
24
25
  const rootRef = (0, _react.useRef)(null);
25
26
  const contentRef = (0, _react.useRef)(null);
26
27
  const [hasFocus, setHasFocus] = (0, _react.useState)(false);
28
+ const {
29
+ locale
30
+ } = (0, _configProvider.useConfig)();
27
31
  function scrollToEnd() {
28
32
  const root = rootRef.current;
29
33
  if (!root) return;
@@ -88,12 +92,15 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
88
92
  [`${classPrefix}-disabled`]: props.disabled
89
93
  }),
90
94
  tabIndex: props.disabled ? undefined : 0,
95
+ role: 'option',
91
96
  onFocus: onFocus,
92
97
  onBlur: onBlur,
93
98
  onClick: props.onClick
94
99
  }, _react.default.createElement("div", {
95
100
  className: `${classPrefix}-content`,
96
- ref: contentRef
101
+ ref: contentRef,
102
+ "aria-disabled": props.disabled,
103
+ "aria-label": props.placeholder
97
104
  }, value, _react.default.createElement("div", {
98
105
  className: `${classPrefix}-caret-container`
99
106
  }, hasFocus && _react.default.createElement("div", {
@@ -105,7 +112,9 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
105
112
  e.stopPropagation();
106
113
  setValue('');
107
114
  (_a = props.onClear) === null || _a === void 0 ? void 0 : _a.call(props);
108
- }
115
+ },
116
+ role: 'button',
117
+ "aria-label": locale.Input.clear
109
118
  }, _react.default.createElement(_antdMobileIcons.CloseCircleFill, null)), !value && _react.default.createElement("div", {
110
119
  className: `${classPrefix}-placeholder`
111
120
  }, props.placeholder), keyboardElement));
@@ -16,14 +16,17 @@
16
16
  --adm-color-success: #00b578;
17
17
  --adm-color-warning: #ff8f1f;
18
18
  --adm-color-danger: #ff3141;
19
- --adm-color-white: #ffffff;
20
19
  --adm-color-text: #333333;
21
20
  --adm-color-text-secondary: #666666;
22
21
  --adm-color-weak: #999999;
23
22
  --adm-color-light: #cccccc;
24
23
  --adm-color-border: #eeeeee;
25
- --adm-color-box: #f5f5f5;
26
24
  --adm-color-background: #ffffff;
25
+ --adm-color-white: #ffffff;
26
+ --adm-color-box: #f5f5f5;
27
+ --adm-color-text-light-solid: var(--adm-color-white);
28
+ --adm-color-text-dark-solid: #000000;
29
+ --adm-color-fill-content: var(--adm-color-box);
27
30
  --adm-font-size-main: var(--adm-font-size-5);
28
31
  --adm-font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue',
29
32
  helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',
@@ -16,14 +16,17 @@
16
16
  --adm-color-success: #00b578;
17
17
  --adm-color-warning: #ff8f1f;
18
18
  --adm-color-danger: #ff3141;
19
- --adm-color-white: #ffffff;
20
19
  --adm-color-text: #333333;
21
20
  --adm-color-text-secondary: #666666;
22
21
  --adm-color-weak: #999999;
23
22
  --adm-color-light: #cccccc;
24
23
  --adm-color-border: #eeeeee;
25
- --adm-color-box: #f5f5f5;
26
24
  --adm-color-background: #ffffff;
25
+ --adm-color-white: #ffffff;
26
+ --adm-color-box: #f5f5f5;
27
+ --adm-color-text-light-solid: var(--adm-color-white);
28
+ --adm-color-text-dark-solid: #000000;
29
+ --adm-color-fill-content: var(--adm-color-box);
27
30
  --adm-font-size-main: var(--adm-font-size-5);
28
31
  --adm-font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue',
29
32
  helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',
@@ -127,5 +127,8 @@ export declare const base: {
127
127
  Switch: {
128
128
  name: string;
129
129
  };
130
+ Selector: {
131
+ name: string;
132
+ };
130
133
  };
131
134
  export declare type Locale = typeof base;
@@ -133,6 +133,9 @@ const base = {
133
133
  },
134
134
  Switch: {
135
135
  name: 'Switch'
136
+ },
137
+ Selector: {
138
+ name: 'Selector'
136
139
  }
137
140
  };
138
141
  exports.base = base;
@@ -0,0 +1,134 @@
1
+ declare const daDK: {
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 daDK;
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _mergeLocale = require("../utils/merge-locale");
8
+ var _base = require("./base");
9
+ const typeTemplate = '${label} er ikke gyldig som ${type}';
10
+ const daDK = (0, _mergeLocale.mergeLocale)(_base.base, {
11
+ locale: 'da-DK',
12
+ common: {
13
+ confirm: 'Bekræft',
14
+ cancel: 'Afbestille',
15
+ loading: 'Indlæser',
16
+ close: 'Luk'
17
+ },
18
+ Calendar: {
19
+ markItems: ['ma', 'ti', 'on', 'to', 'fr', 'lø', 'sø'],
20
+ renderYearAndMonth: (year, month) => `${month}.${year}`
21
+ },
22
+ Cascader: {
23
+ placeholder: 'Vælger'
24
+ },
25
+ Dialog: {
26
+ ok: 'Bekræft'
27
+ },
28
+ DatePicker: {
29
+ tillNow: 'Indtil nu'
30
+ },
31
+ ErrorBlock: {
32
+ default: {
33
+ title: 'Oops, noget gik galt',
34
+ description: 'Vent et minut og prøv igen'
35
+ },
36
+ busy: {
37
+ title: 'Oops, ikke indlæser',
38
+ description: 'Prøv at opdatere siden'
39
+ },
40
+ disconnected: {
41
+ title: 'Netværket er optaget',
42
+ description: 'Prøv at opdatere siden'
43
+ },
44
+ empty: {
45
+ title: 'Hmm, kunne ikke finde det...',
46
+ description: 'Vil du prøve en ny søgning?'
47
+ }
48
+ },
49
+ Form: {
50
+ required: 'Påkrævet',
51
+ optional: 'Valgfri',
52
+ defaultValidateMessages: {
53
+ default: 'Feltvalideringsfejl for ${label}',
54
+ required: 'Indtast venligst ${label}',
55
+ enum: '${label} skal være en af [${enum}]',
56
+ whitespace: '${label} kan ikke være et tomt tegn',
57
+ date: {
58
+ format: '${label} datoformatet er ugyldigt',
59
+ parse: '${label} kan ikke konverteres til en dato',
60
+ invalid: '${label} er en ugyldig dato'
61
+ },
62
+ types: {
63
+ string: typeTemplate,
64
+ method: typeTemplate,
65
+ array: typeTemplate,
66
+ object: typeTemplate,
67
+ number: typeTemplate,
68
+ date: typeTemplate,
69
+ boolean: typeTemplate,
70
+ integer: typeTemplate,
71
+ float: typeTemplate,
72
+ regexp: typeTemplate,
73
+ email: typeTemplate,
74
+ url: typeTemplate,
75
+ hex: typeTemplate
76
+ },
77
+ string: {
78
+ len: '${label} må være ${len} tegn',
79
+ min: '${label} skal være mindst ${min} tegn',
80
+ max: '${label} skal være op til ${max} tegn',
81
+ range: '${label} skal være imellem ${min}-${max} tegn'
82
+ },
83
+ number: {
84
+ len: '${label} skal være lig med ${len}',
85
+ min: '${label} skal være minimum ${min}',
86
+ max: '${label} skal være maksimalt ${max}',
87
+ range: '${label} skal være imellem ${min}-${max}'
88
+ },
89
+ array: {
90
+ len: 'Må være ${len} ${label}',
91
+ min: 'I det mindste ${min} ${label}',
92
+ max: 'Højst ${max} ${label}',
93
+ range: 'Mængden af ${label} skal være imellem ${min}-${max}'
94
+ },
95
+ pattern: {
96
+ mismatch: '${label} stemmer ikke overens med mønsteret ${pattern}'
97
+ }
98
+ }
99
+ },
100
+ ImageUploader: {
101
+ uploading: 'Uploader...',
102
+ upload: 'Upload'
103
+ },
104
+ InfiniteScroll: {
105
+ noMore: 'Ikke mere',
106
+ failedToLoad: 'Kunne ikke indlæses',
107
+ retry: 'Prøve igen'
108
+ },
109
+ Input: {
110
+ clear: 'slette'
111
+ },
112
+ Mask: {
113
+ name: 'Maske'
114
+ },
115
+ Modal: {
116
+ ok: 'Bekræft'
117
+ },
118
+ PullToRefresh: {
119
+ pulling: 'Rul ned for at opdatere',
120
+ canRelease: 'Slip for at opdatere med det samme',
121
+ complete: 'Opdatering lykkedes'
122
+ },
123
+ Stepper: {
124
+ decrease: 'aftage',
125
+ increase: 'øge'
126
+ },
127
+ Selector: {
128
+ name: 'Vælger'
129
+ }
130
+ });
131
+ var _default = daDK;
132
+ exports.default = _default;
@@ -127,5 +127,8 @@ declare const enUS: {
127
127
  Switch: {
128
128
  name: string;
129
129
  };
130
+ Selector: {
131
+ name: string;
132
+ };
130
133
  };
131
134
  export default enUS;
@@ -127,5 +127,8 @@ declare const esES: {
127
127
  Switch: {
128
128
  name: string;
129
129
  };
130
+ Selector: {
131
+ name: string;
132
+ };
130
133
  };
131
134
  export default esES;
@@ -127,5 +127,8 @@ declare const faIR: {
127
127
  Switch: {
128
128
  name: string;
129
129
  };
130
+ Selector: {
131
+ name: string;
132
+ };
130
133
  };
131
134
  export default faIR;
@@ -127,5 +127,8 @@ declare const frFR: {
127
127
  Switch: {
128
128
  name: string;
129
129
  };
130
+ Selector: {
131
+ name: string;
132
+ };
130
133
  };
131
134
  export default frFR;
@@ -127,5 +127,8 @@ declare const idID: {
127
127
  Switch: {
128
128
  name: string;
129
129
  };
130
+ Selector: {
131
+ name: string;
132
+ };
130
133
  };
131
134
  export default idID;