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
@@ -3,7 +3,7 @@
3
3
  overflow: hidden;
4
4
  height: 100%;
5
5
  position: relative;
6
- background-color: var(--adm-color-white);
6
+ background-color: var(--adm-color-background);
7
7
  --sticky-offset-top: 0;
8
8
  }
9
9
  .adm-index-bar-body {
@@ -22,7 +22,7 @@
22
22
  padding: 0 12px;
23
23
  color: var(--adm-color-weak);
24
24
  font-size: var(--adm-font-size-main);
25
- background-color: var(--adm-color-box);
25
+ background-color: var(--adm-color-fill-content);
26
26
  }
27
27
  .adm-index-bar-sidebar {
28
28
  position: absolute;
@@ -43,7 +43,7 @@
43
43
  right: 60px;
44
44
  width: 47px;
45
45
  height: 47px;
46
- color: var(--adm-color-white);
46
+ color: var(--adm-color-text-light-solid);
47
47
  font-size: 25px;
48
48
  line-height: 47px;
49
49
  text-align: center;
@@ -70,7 +70,7 @@
70
70
  align-items: center;
71
71
  }
72
72
  .adm-index-bar-sidebar-item-active {
73
- color: var(--adm-color-white);
73
+ color: var(--adm-color-text-light-solid);
74
74
  background-color: var(--adm-color-primary);
75
75
  border-radius: 50%;
76
76
  }
@@ -26,7 +26,7 @@ export declare type InputRef = {
26
26
  blur: () => void;
27
27
  nativeElement: HTMLInputElement | null;
28
28
  };
29
- export declare const Input: React.ForwardRefExoticComponent<Pick<NativeInputProps, "pattern" | "onClick" | "name" | "type" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "autoFocus" | "maxLength" | "minLength" | "step"> & {
29
+ export declare const Input: React.ForwardRefExoticComponent<Pick<NativeInputProps, "pattern" | "onClick" | "name" | "type" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoFocus" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "maxLength" | "minLength" | "step"> & {
30
30
  value?: string | undefined;
31
31
  defaultValue?: string | undefined;
32
32
  onChange?: ((val: string) => void) | undefined;
@@ -49,13 +49,13 @@
49
49
  border-radius: 10px;
50
50
  color: var(--adm-color-weak);
51
51
  font-size: var(--adm-font-size-main);
52
- background-color: var(--adm-color-box);
52
+ background-color: var(--adm-color-fill-content);
53
53
  }
54
54
  .adm-jumbo-tabs-tab-active {
55
55
  color: var(--adm-color-primary);
56
56
  }
57
57
  .adm-jumbo-tabs-tab-active .adm-jumbo-tabs-tab-description {
58
- color: var(--adm-color-white);
58
+ color: var(--adm-color-text-light-solid);
59
59
  background-color: var(--adm-color-primary);
60
60
  }
61
61
  .adm-jumbo-tabs-tab-disabled {
@@ -1,7 +1,7 @@
1
1
  .adm-notice-bar {
2
2
  --background-color: #ababab;
3
3
  --border-color: #999999;
4
- --text-color: var(--adm-color-white);
4
+ --text-color: var(--adm-color-text-light-solid);
5
5
  --font-size: var(--adm-font-size-7);
6
6
  --icon-font-size: var(--adm-font-size-10);
7
7
  --height: 40px;
@@ -97,16 +97,18 @@ const NumberKeyboard = p => {
97
97
  className: (0, _classnames.default)(`${classPrefix}-header`, {
98
98
  [`${classPrefix}-header-with-title`]: !!title
99
99
  })
100
- }, title && _react.default.createElement("div", {
101
- className: `${classPrefix}-title`
100
+ }, 'title' && _react.default.createElement("div", {
101
+ className: `${classPrefix}-title`,
102
+ "aria-label": title
102
103
  }, title), showCloseButton && _react.default.createElement("span", {
103
104
  className: `${classPrefix}-header-close-button`,
104
105
  onClick: () => {
105
106
  var _a;
106
107
  (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
107
108
  },
108
- role: 'button',
109
- title: 'CLOSE'
109
+ role: 'grid',
110
+ title: 'CLOSE',
111
+ tabIndex: -1
110
112
  }, _react.default.createElement(_antdMobileIcons.DownOutline, null)));
111
113
  };
112
114
  const renderKey = (key, index) => {
@@ -117,8 +119,9 @@ const NumberKeyboard = p => {
117
119
  [`${classPrefix}-key-mid`]: index === 9 && !!confirmText && keys.length < 12
118
120
  });
119
121
  const ariaProps = key ? {
120
- role: 'button',
121
- title: key
122
+ role: 'grid',
123
+ title: key,
124
+ tabIndex: -1
122
125
  } : undefined;
123
126
  return _react.default.createElement("div", Object.assign({
124
127
  key: key,
@@ -170,11 +173,14 @@ const NumberKeyboard = p => {
170
173
  onBackspacePressEnd();
171
174
  },
172
175
  title: 'BACKSPACE',
173
- role: 'button'
176
+ role: 'grid',
177
+ tabIndex: -1
174
178
  }, _react.default.createElement(_antdMobileIcons.TextDeletionOutline, null)), _react.default.createElement("div", {
175
179
  className: `${classPrefix}-key ${classPrefix}-key-extra ${classPrefix}-key-ok`,
176
180
  onTouchEnd: e => onKeyPress(e, 'OK'),
177
- role: 'button'
181
+ role: 'grid',
182
+ tabIndex: -1,
183
+ "aria-label": confirmText
178
184
  }, confirmText))), props.safeArea && _react.default.createElement("div", {
179
185
  className: `${classPrefix}-footer`
180
186
  }, _react.default.createElement(_safeArea.default, {
@@ -18,7 +18,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
18
18
  content: import("react").ReactNode;
19
19
  } & {
20
20
  className?: string | undefined;
21
- style?: (import("react").CSSProperties & Partial<Record<"--z-index", string>>) | undefined;
21
+ style?: (import("react").CSSProperties & Partial<Record<"--z-index" | "--arrow-size", string>>) | undefined;
22
22
  tabIndex?: number | undefined;
23
23
  } & import("react").AriaAttributes & import("react").RefAttributes<import("./popover").PopoverRef>> & {
24
24
  Menu: import("react").ForwardRefExoticComponent<Omit<import("./popover").PopoverProps, "content"> & {
@@ -57,7 +57,7 @@
57
57
  .adm-popover-arrow-icon {
58
58
  display: block;
59
59
  height: var(--arrow-size);
60
- width: 15px;
60
+ width: calc(var(--arrow-size) / 8 * 15);
61
61
  position: absolute;
62
62
  top: 50%;
63
63
  left: 50%;
@@ -15,7 +15,7 @@ export declare type PopoverProps = {
15
15
  placement?: Placement | DeprecatedPlacement;
16
16
  stopPropagation?: PropagationEvent[];
17
17
  content: React.ReactNode;
18
- } & NativeProps<'--z-index'>;
18
+ } & NativeProps<'--z-index' | '--arrow-size'>;
19
19
  export declare type PopoverRef = {
20
20
  show: () => void;
21
21
  hide: () => void;
@@ -35,6 +35,6 @@ export declare const Popover: React.ForwardRefExoticComponent<{
35
35
  content: React.ReactNode;
36
36
  } & {
37
37
  className?: string | undefined;
38
- style?: (React.CSSProperties & Partial<Record<"--z-index", string>>) | undefined;
38
+ style?: (React.CSSProperties & Partial<Record<"--z-index" | "--arrow-size", string>>) | undefined;
39
39
  tabIndex?: number | undefined;
40
40
  } & React.AriaAttributes & React.RefAttributes<PopoverRef>>;
@@ -108,7 +108,7 @@ const Popover = (0, _react.forwardRef)((p, ref) => {
108
108
  top: arrowY != null ? `${arrowY}px` : '',
109
109
  right: '',
110
110
  bottom: '',
111
- [arrowSide]: `-${(0, _convertPx.convertPx)(8)}px`
111
+ [arrowSide]: 'calc(var(--arrow-size) * -1)'
112
112
  });
113
113
  const arrowRotate = {
114
114
  top: '0deg',
@@ -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
  })
@@ -18,7 +18,7 @@
18
18
  box-sizing: border-box;
19
19
  width: var(--icon-size);
20
20
  height: var(--icon-size);
21
- color: var(--adm-color-white);
21
+ color: var(--adm-color-text-light-solid);
22
22
  }
23
23
  .adm-radio .adm-radio-icon > svg {
24
24
  display: block;
@@ -41,7 +41,7 @@
41
41
  .adm-radio.adm-radio-disabled .adm-radio-icon {
42
42
  color: #b7b7b7;
43
43
  border-color: var(--adm-color-light);
44
- background-color: var(--adm-color-box);
44
+ background-color: var(--adm-color-fill-content);
45
45
  }
46
46
  .adm-radio .adm-radio-custom-icon {
47
47
  font-size: var(--icon-size);
@@ -1,7 +1,7 @@
1
1
  .adm-search-bar {
2
2
  --height: 32px;
3
3
  --padding-left: 8px;
4
- --background: var(--adm-color-box);
4
+ --background: var(--adm-color-fill-content);
5
5
  --border-radius: 6px;
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: 105px;
4
4
  --item-border-radius: 8px;
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;
@@ -12,7 +12,7 @@
12
12
  position: relative;
13
13
  width: 100%;
14
14
  height: 3px;
15
- background-color: var(--adm-color-box);
15
+ background-color: var(--adm-color-fill-content);
16
16
  border-radius: 3px;
17
17
  }
18
18
  .adm-slider-fill {
@@ -34,7 +34,7 @@
34
34
  width: 7px;
35
35
  height: 7px;
36
36
  margin-left: -3px;
37
- background-color: var(--adm-color-box);
37
+ background-color: var(--adm-color-fill-content);
38
38
  border-radius: 50%;
39
39
  }
40
40
  .adm-slider-tick-active {
@@ -47,7 +47,7 @@
47
47
  border-radius: 50%;
48
48
  text-align: center;
49
49
  line-height: 28px;
50
- background: var(--adm-color-white);
50
+ background: var(--adm-color-text-light-solid);
51
51
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.12);
52
52
  color: var(--fill-color);
53
53
  }
@@ -3,14 +3,14 @@
3
3
  --input-width: 44px;
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: 2px;
8
8
  --border: none;
9
9
  --border-inner: solid 2px 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;
@@ -31,7 +31,7 @@
31
31
  .adm-swipe-action-action-button.adm-button {
32
32
  --border-radius: 0;
33
33
  --border-width: 0;
34
- --text-color: var(--adm-color-white);
34
+ --text-color: var(--adm-color-text-light-solid);
35
35
  padding-left: 20px;
36
36
  padding-right: 20px;
37
37
  }
@@ -52,7 +52,7 @@
52
52
  width: calc(var(--height) - 2 * var(--border-width));
53
53
  height: calc(var(--height) - 2 * var(--border-width));
54
54
  border-radius: calc(var(--height) - 2 * var(--border-width));
55
- background: var(--adm-color-white);
55
+ background: var(--adm-color-text-light-solid);
56
56
  position: absolute;
57
57
  z-index: 2;
58
58
  top: var(--border-width);
@@ -83,7 +83,7 @@
83
83
  }
84
84
  .adm-switch.adm-switch-checked .adm-switch-inner {
85
85
  margin: 0 calc(var(--height) - var(--border-width) + 5px) 0 10px;
86
- color: var(--adm-color-white);
86
+ color: var(--adm-color-text-light-solid);
87
87
  }
88
88
  .adm-switch.adm-switch-disabled {
89
89
  cursor: not-allowed;
@@ -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;