antd-mobile 5.0.0-rc.19 → 5.0.0-rc.22

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 (237) hide show
  1. package/2x/README.md +1 -1
  2. package/2x/cjs/components/avatar/avatar.d.ts +1 -1
  3. package/2x/cjs/components/badge/badge.css +1 -1
  4. package/2x/cjs/components/button/button.css +4 -3
  5. package/2x/cjs/components/calendar/calendar.js +4 -0
  6. package/2x/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
  7. package/2x/cjs/components/check-list/check-list.css +0 -4
  8. package/2x/cjs/components/checkbox/checkbox.css +6 -16
  9. package/2x/cjs/components/checkbox/checkbox.js +1 -1
  10. package/2x/cjs/components/date-picker/date-picker.d.ts +2 -2
  11. package/2x/cjs/components/dialog/dialog-action-button.js +1 -0
  12. package/2x/cjs/components/dialog/dialog.css +15 -0
  13. package/2x/cjs/components/dialog/dialog.js +4 -2
  14. package/2x/cjs/components/error-block/error-block.d.ts +1 -1
  15. package/2x/cjs/components/floating-panel/floating-panel.d.ts +2 -0
  16. package/2x/cjs/components/floating-panel/floating-panel.js +5 -0
  17. package/2x/cjs/components/form/form-item.css +5 -0
  18. package/2x/cjs/components/form/form.css +10 -0
  19. package/2x/cjs/components/form/form.js +1 -5
  20. package/2x/cjs/components/form/index.css +15 -0
  21. package/2x/cjs/components/image/image.d.ts +1 -0
  22. package/2x/cjs/components/image/image.js +4 -1
  23. package/2x/cjs/components/input/input.css +28 -25
  24. package/2x/cjs/components/input/input.d.ts +2 -2
  25. package/2x/cjs/components/input/input.js +7 -3
  26. package/2x/cjs/components/jumbo-tabs/jumbo-tabs.css +4 -1
  27. package/2x/cjs/components/list/list-item.js +1 -1
  28. package/2x/cjs/components/list/list.css +3 -5
  29. package/2x/cjs/components/list/list.d.ts +1 -1
  30. package/2x/cjs/components/modal/modal.css +15 -0
  31. package/2x/cjs/components/modal/modal.js +4 -2
  32. package/2x/cjs/components/nav-bar/nav-bar.css +3 -3
  33. package/2x/cjs/components/notice-bar/notice-bar.css +16 -8
  34. package/2x/cjs/components/notice-bar/notice-bar.d.ts +1 -1
  35. package/2x/cjs/components/notice-bar/notice-bar.js +5 -3
  36. package/2x/cjs/components/picker/picker.css +7 -2
  37. package/2x/cjs/components/picker/picker.js +1 -0
  38. package/2x/cjs/components/picker-view/picker-view.css +2 -2
  39. package/2x/cjs/components/popover/popover.js +6 -5
  40. package/2x/cjs/components/radio/radio.css +5 -5
  41. package/2x/cjs/components/result/result.css +2 -5
  42. package/2x/cjs/components/search-bar/search-bar.css +14 -9
  43. package/2x/cjs/components/selector/selector.css +4 -0
  44. package/2x/cjs/components/side-bar/corner.d.ts +3 -0
  45. package/2x/cjs/components/side-bar/corner.js +28 -0
  46. package/2x/cjs/components/side-bar/side-bar.css +31 -18
  47. package/2x/cjs/components/side-bar/side-bar.js +22 -5
  48. package/2x/cjs/components/spin-loading/spin-loading.css +1 -19
  49. package/2x/cjs/components/spin-loading/spin-loading.d.ts +1 -1
  50. package/2x/cjs/components/spin-loading/spin-loading.js +33 -5
  51. package/2x/cjs/components/stepper/stepper.css +4 -7
  52. package/2x/cjs/components/stepper/stepper.js +2 -1
  53. package/2x/cjs/components/swipe-action/swipe-action.d.ts +2 -2
  54. package/2x/cjs/components/swipe-action/swipe-action.js +1 -1
  55. package/2x/cjs/components/swiper/swiper.js +14 -19
  56. package/2x/cjs/components/tabs/tabs.css +1 -1
  57. package/2x/cjs/components/tag/tag.css +3 -3
  58. package/2x/cjs/components/virtual-input/virtual-input.d.ts +1 -1
  59. package/2x/cjs/utils/get-scroll-parent.js +1 -1
  60. package/2x/es/components/avatar/avatar.d.ts +1 -1
  61. package/2x/es/components/badge/badge.css +1 -1
  62. package/2x/es/components/button/button.css +4 -3
  63. package/2x/es/components/calendar/calendar.js +2 -0
  64. package/2x/es/components/capsule-tabs/capsule-tabs.css +1 -1
  65. package/2x/es/components/check-list/check-list.css +0 -4
  66. package/2x/es/components/checkbox/checkbox.css +6 -16
  67. package/2x/es/components/checkbox/checkbox.js +1 -1
  68. package/2x/es/components/date-picker/date-picker.d.ts +2 -2
  69. package/2x/es/components/dialog/dialog-action-button.js +1 -0
  70. package/2x/es/components/dialog/dialog.css +15 -0
  71. package/2x/es/components/dialog/dialog.js +4 -2
  72. package/2x/es/components/error-block/error-block.d.ts +1 -1
  73. package/2x/es/components/floating-panel/floating-panel.d.ts +2 -0
  74. package/2x/es/components/floating-panel/floating-panel.js +5 -0
  75. package/2x/es/components/form/form-item.css +5 -0
  76. package/2x/es/components/form/form.css +10 -0
  77. package/2x/es/components/form/form.js +1 -5
  78. package/2x/es/components/form/index.css +15 -0
  79. package/2x/es/components/image/image.d.ts +1 -0
  80. package/2x/es/components/image/image.js +4 -1
  81. package/2x/es/components/input/input.css +28 -25
  82. package/2x/es/components/input/input.d.ts +2 -2
  83. package/2x/es/components/input/input.js +4 -3
  84. package/2x/es/components/jumbo-tabs/jumbo-tabs.css +4 -1
  85. package/2x/es/components/list/list-item.js +1 -1
  86. package/2x/es/components/list/list.css +3 -5
  87. package/2x/es/components/list/list.d.ts +1 -1
  88. package/2x/es/components/modal/modal.css +15 -0
  89. package/2x/es/components/modal/modal.js +4 -2
  90. package/2x/es/components/nav-bar/nav-bar.css +3 -3
  91. package/2x/es/components/notice-bar/notice-bar.css +16 -8
  92. package/2x/es/components/notice-bar/notice-bar.d.ts +1 -1
  93. package/2x/es/components/notice-bar/notice-bar.js +5 -3
  94. package/2x/es/components/picker/picker.css +7 -2
  95. package/2x/es/components/picker/picker.js +1 -0
  96. package/2x/es/components/picker-view/picker-view.css +2 -2
  97. package/2x/es/components/popover/popover.js +6 -5
  98. package/2x/es/components/radio/radio.css +5 -5
  99. package/2x/es/components/result/result.css +2 -5
  100. package/2x/es/components/search-bar/search-bar.css +14 -9
  101. package/2x/es/components/selector/selector.css +4 -0
  102. package/2x/es/components/side-bar/corner.d.ts +3 -0
  103. package/2x/es/components/side-bar/corner.js +14 -0
  104. package/2x/es/components/side-bar/side-bar.css +31 -18
  105. package/2x/es/components/side-bar/side-bar.js +21 -5
  106. package/2x/es/components/spin-loading/spin-loading.css +1 -19
  107. package/2x/es/components/spin-loading/spin-loading.d.ts +1 -1
  108. package/2x/es/components/spin-loading/spin-loading.js +32 -5
  109. package/2x/es/components/stepper/stepper.css +4 -7
  110. package/2x/es/components/stepper/stepper.js +2 -1
  111. package/2x/es/components/swipe-action/swipe-action.d.ts +2 -2
  112. package/2x/es/components/swipe-action/swipe-action.js +1 -1
  113. package/2x/es/components/swiper/swiper.js +13 -19
  114. package/2x/es/components/tabs/tabs.css +1 -1
  115. package/2x/es/components/tag/tag.css +3 -3
  116. package/2x/es/components/virtual-input/virtual-input.d.ts +1 -1
  117. package/2x/es/utils/get-scroll-parent.js +1 -1
  118. package/2x/package.json +2 -2
  119. package/README.md +1 -1
  120. package/cjs/components/avatar/avatar.d.ts +1 -1
  121. package/cjs/components/badge/badge.css +1 -1
  122. package/cjs/components/button/button.css +4 -3
  123. package/cjs/components/calendar/calendar.js +4 -0
  124. package/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
  125. package/cjs/components/check-list/check-list.css +0 -3
  126. package/cjs/components/checkbox/checkbox.css +6 -14
  127. package/cjs/components/checkbox/checkbox.js +1 -1
  128. package/cjs/components/date-picker/date-picker.d.ts +2 -2
  129. package/cjs/components/dialog/dialog-action-button.js +1 -0
  130. package/cjs/components/dialog/dialog.css +12 -0
  131. package/cjs/components/dialog/dialog.js +4 -2
  132. package/cjs/components/error-block/error-block.d.ts +1 -1
  133. package/cjs/components/floating-panel/floating-panel.d.ts +2 -0
  134. package/cjs/components/floating-panel/floating-panel.js +5 -0
  135. package/cjs/components/form/form-item.css +4 -0
  136. package/cjs/components/form/form.css +8 -0
  137. package/cjs/components/form/form.js +1 -5
  138. package/cjs/components/form/index.css +12 -0
  139. package/cjs/components/image/image.d.ts +1 -0
  140. package/cjs/components/image/image.js +4 -1
  141. package/cjs/components/input/input.css +26 -24
  142. package/cjs/components/input/input.d.ts +2 -2
  143. package/cjs/components/input/input.js +7 -3
  144. package/cjs/components/jumbo-tabs/jumbo-tabs.css +4 -1
  145. package/cjs/components/list/list-item.js +1 -1
  146. package/cjs/components/list/list.css +3 -4
  147. package/cjs/components/list/list.d.ts +1 -1
  148. package/cjs/components/modal/modal.css +12 -0
  149. package/cjs/components/modal/modal.js +4 -2
  150. package/cjs/components/nav-bar/nav-bar.css +3 -3
  151. package/cjs/components/notice-bar/notice-bar.css +15 -8
  152. package/cjs/components/notice-bar/notice-bar.d.ts +1 -1
  153. package/cjs/components/notice-bar/notice-bar.js +5 -3
  154. package/cjs/components/picker/picker.css +6 -2
  155. package/cjs/components/picker/picker.js +1 -0
  156. package/cjs/components/picker-view/picker-view.css +2 -2
  157. package/cjs/components/popover/popover.js +6 -5
  158. package/cjs/components/radio/radio.css +5 -5
  159. package/cjs/components/result/result.css +2 -5
  160. package/cjs/components/search-bar/search-bar.css +13 -9
  161. package/cjs/components/selector/selector.css +3 -0
  162. package/cjs/components/side-bar/corner.d.ts +3 -0
  163. package/cjs/components/side-bar/corner.js +28 -0
  164. package/cjs/components/side-bar/side-bar.css +27 -17
  165. package/cjs/components/side-bar/side-bar.js +22 -5
  166. package/cjs/components/spin-loading/spin-loading.css +1 -17
  167. package/cjs/components/spin-loading/spin-loading.d.ts +1 -1
  168. package/cjs/components/spin-loading/spin-loading.js +33 -5
  169. package/cjs/components/stepper/stepper.css +4 -6
  170. package/cjs/components/stepper/stepper.js +2 -1
  171. package/cjs/components/swipe-action/swipe-action.d.ts +2 -2
  172. package/cjs/components/swipe-action/swipe-action.js +1 -1
  173. package/cjs/components/swiper/swiper.js +14 -19
  174. package/cjs/components/tabs/tabs.css +1 -1
  175. package/cjs/components/tag/tag.css +3 -3
  176. package/cjs/components/virtual-input/virtual-input.d.ts +1 -1
  177. package/cjs/utils/get-scroll-parent.js +1 -1
  178. package/es/components/avatar/avatar.d.ts +1 -1
  179. package/es/components/badge/badge.css +1 -1
  180. package/es/components/button/button.css +4 -3
  181. package/es/components/calendar/calendar.js +2 -0
  182. package/es/components/capsule-tabs/capsule-tabs.css +1 -1
  183. package/es/components/check-list/check-list.css +0 -3
  184. package/es/components/checkbox/checkbox.css +6 -14
  185. package/es/components/checkbox/checkbox.js +1 -1
  186. package/es/components/date-picker/date-picker.d.ts +2 -2
  187. package/es/components/dialog/dialog-action-button.js +1 -0
  188. package/es/components/dialog/dialog.css +12 -0
  189. package/es/components/dialog/dialog.js +4 -2
  190. package/es/components/error-block/error-block.d.ts +1 -1
  191. package/es/components/floating-panel/floating-panel.d.ts +2 -0
  192. package/es/components/floating-panel/floating-panel.js +5 -0
  193. package/es/components/form/form-item.css +4 -0
  194. package/es/components/form/form.css +8 -0
  195. package/es/components/form/form.js +1 -5
  196. package/es/components/form/index.css +12 -0
  197. package/es/components/image/image.d.ts +1 -0
  198. package/es/components/image/image.js +4 -1
  199. package/es/components/input/input.css +26 -24
  200. package/es/components/input/input.d.ts +2 -2
  201. package/es/components/input/input.js +4 -3
  202. package/es/components/jumbo-tabs/jumbo-tabs.css +4 -1
  203. package/es/components/list/list-item.js +1 -1
  204. package/es/components/list/list.css +3 -4
  205. package/es/components/list/list.d.ts +1 -1
  206. package/es/components/modal/modal.css +12 -0
  207. package/es/components/modal/modal.js +4 -2
  208. package/es/components/nav-bar/nav-bar.css +3 -3
  209. package/es/components/notice-bar/notice-bar.css +15 -8
  210. package/es/components/notice-bar/notice-bar.d.ts +1 -1
  211. package/es/components/notice-bar/notice-bar.js +5 -3
  212. package/es/components/picker/picker.css +6 -2
  213. package/es/components/picker/picker.js +1 -0
  214. package/es/components/picker-view/picker-view.css +2 -2
  215. package/es/components/popover/popover.js +6 -5
  216. package/es/components/radio/radio.css +5 -5
  217. package/es/components/result/result.css +2 -5
  218. package/es/components/search-bar/search-bar.css +13 -9
  219. package/es/components/selector/selector.css +3 -0
  220. package/es/components/side-bar/corner.d.ts +3 -0
  221. package/es/components/side-bar/corner.js +14 -0
  222. package/es/components/side-bar/side-bar.css +27 -17
  223. package/es/components/side-bar/side-bar.js +21 -5
  224. package/es/components/spin-loading/spin-loading.css +1 -17
  225. package/es/components/spin-loading/spin-loading.d.ts +1 -1
  226. package/es/components/spin-loading/spin-loading.js +32 -5
  227. package/es/components/stepper/stepper.css +4 -6
  228. package/es/components/stepper/stepper.js +2 -1
  229. package/es/components/swipe-action/swipe-action.d.ts +2 -2
  230. package/es/components/swipe-action/swipe-action.js +1 -1
  231. package/es/components/swiper/swiper.js +13 -19
  232. package/es/components/tabs/tabs.css +1 -1
  233. package/es/components/tag/tag.css +3 -3
  234. package/es/components/virtual-input/virtual-input.d.ts +1 -1
  235. package/es/utils/get-scroll-parent.js +1 -1
  236. package/package.json +2 -2
  237. package/umd/antd-mobile.js +1 -1
@@ -13,7 +13,7 @@ export const ListItem = props => {
13
13
  }, props.prefix && React.createElement("div", {
14
14
  className: `${classPrefix}-content-prefix`
15
15
  }, props.prefix), React.createElement("div", {
16
- className: classNames(`${classPrefix}-content-main`, (props.title || props.description) && `${classPrefix}-content-main-multi-row`)
16
+ className: `${classPrefix}-content-main`
17
17
  }, props.title && React.createElement("div", {
18
18
  className: `${classPrefix}-title`
19
19
  }, props.title), props.children, props.description && React.createElement("div", {
@@ -8,12 +8,14 @@
8
8
  --border-top: solid 1px var(--adm-border-color);
9
9
  --border-bottom: solid 1px var(--adm-border-color);
10
10
  --padding-left: 12px;
11
+ --padding-right: 12px;
11
12
  --font-size: 17px;
12
13
  }
13
14
  .adm-list-header {
14
15
  color: var(--adm-color-weak);
15
16
  font-size: var(--header-font-size);
16
17
  padding-left: var(--padding-left);
18
+ padding-right: var(--padding-right);
17
19
  margin: 16px 0 4px;
18
20
  }
19
21
  .adm-list-body {
@@ -48,8 +50,8 @@
48
50
  display: flex;
49
51
  align-items: var(--align-items);
50
52
  justify-content: flex-start;
51
- padding: 0 12px;
52
53
  border-top: var(--border-inner);
54
+ padding-right: var(--padding-right);
53
55
  }
54
56
  .adm-list-item-content-prefix {
55
57
  width: var(--prefix-width);
@@ -58,9 +60,6 @@
58
60
  }
59
61
  .adm-list-item-content-main {
60
62
  flex: auto;
61
- padding: 14px 0;
62
- }
63
- .adm-list-item-content-main.adm-list-item-content-main-multi-row {
64
63
  padding: 12px 0;
65
64
  }
66
65
  .adm-list-item-content-extra {
@@ -3,5 +3,5 @@ import { NativeProps } from '../../utils/native-props';
3
3
  export declare type ListProps = {
4
4
  header?: ReactNode;
5
5
  mode?: 'default' | 'card';
6
- } & NativeProps<'--header-font-size' | '--prefix-width' | '--prefix-padding-right' | '--align-items' | '--active-background-color' | '--border-inner' | '--border-top' | '--border-bottom' | '--padding-left' | '--font-size'>;
6
+ } & NativeProps<'--header-font-size' | '--prefix-width' | '--prefix-padding-right' | '--align-items' | '--active-background-color' | '--border-inner' | '--border-top' | '--border-bottom' | '--padding-left' | '--padding-right' | '--font-size'>;
7
7
  export declare const List: FC<ListProps>;
@@ -18,10 +18,19 @@
18
18
  }
19
19
  .adm-modal-main {
20
20
  width: 100%;
21
+ max-height: 70vh;
21
22
  font-size: 14px;
22
23
  background-color: white;
23
24
  border-radius: 8px;
24
25
  overflow: hidden;
26
+ display: flex;
27
+ flex-direction: column;
28
+ }
29
+ .adm-modal-main > * {
30
+ flex: none;
31
+ }
32
+ .adm-modal-main > .adm-modal-image-container {
33
+ flex: auto;
25
34
  }
26
35
  .adm-modal-main .adm-modal-body {
27
36
  padding: 20px 12px 12px;
@@ -73,3 +82,6 @@
73
82
  .adm-modal-main .adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary):active {
74
83
  opacity: 0.7;
75
84
  }
85
+ .adm-modal-image-container {
86
+ overflow-y: auto;
87
+ }
@@ -71,11 +71,13 @@ export const Modal = p => {
71
71
  style: Object.assign({}, style),
72
72
  onClick: e => e.stopPropagation(),
73
73
  className: `${classPrefix}-main`
74
- }, !!props.image && React.createElement(Image, {
74
+ }, !!props.image && React.createElement("div", {
75
+ className: `${classPrefix}-image-container`
76
+ }, React.createElement(Image, {
75
77
  src: props.image,
76
78
  alt: 'modal header image',
77
79
  width: '100%'
78
- }), React.createElement("div", {
80
+ })), React.createElement("div", {
79
81
  style: props.bodyStyle,
80
82
  className: classNames(`${classPrefix}-body`, props.bodyClassName)
81
83
  }, props.showCloseButton && React.createElement("a", {
@@ -21,13 +21,13 @@
21
21
  .adm-nav-bar-back {
22
22
  display: flex;
23
23
  align-items: center;
24
- margin-right: 12px;
24
+ margin-right: 16px;
25
25
  padding: 6px 0;
26
26
  cursor: pointer;
27
27
  }
28
28
  .adm-nav-bar-back-arrow {
29
- font-size: 18px;
30
- margin-right: 6px;
29
+ font-size: 24px;
30
+ margin-right: 4px;
31
31
  }
32
32
  .adm-nav-bar-left {
33
33
  font-size: 15px;
@@ -1,15 +1,18 @@
1
1
  .adm-notice-bar {
2
- height: 30px;
2
+ --background-color: #ababab;
3
+ --border-color: #999999;
4
+ --text-color: #ffffff;
5
+ --font-size: 15px;
6
+ --icon-font-size: 18px;
7
+ --height: 38px;
8
+ height: var(--height);
3
9
  box-sizing: border-box;
4
- font-size: 14px;
5
- line-height: 30px;
10
+ font-size: var(--font-size);
11
+ line-height: var(--height);
6
12
  padding: 0 12px;
7
13
  display: flex;
8
14
  align-items: center;
9
15
  justify-content: space-between;
10
- --background-color: #b2b2b2;
11
- --border-color: #a0a0a0;
12
- --text-color: #ffffff;
13
16
  border: solid 1px var(--border-color);
14
17
  border-left: none;
15
18
  border-right: none;
@@ -34,9 +37,11 @@
34
37
  --border-color: #bcd8ff;
35
38
  --text-color: #1677ff;
36
39
  }
37
- .adm-notice-bar .adm-notice-bar-left:not(:empty) {
40
+ .adm-notice-bar .adm-notice-bar-left {
38
41
  flex-shrink: 0;
39
42
  margin-right: 8px;
43
+ font-size: var(--icon-font-size);
44
+ line-height: var(--height);
40
45
  }
41
46
  .adm-notice-bar .adm-notice-bar-content {
42
47
  flex: 1;
@@ -50,10 +55,12 @@
50
55
  width: auto;
51
56
  transition-timing-function: linear;
52
57
  position: absolute;
53
- padding: 0 4px;
54
58
  white-space: nowrap;
55
59
  }
56
60
  .adm-notice-bar .adm-notice-bar-right {
57
61
  flex-shrink: 0;
58
62
  margin-left: 12px;
59
63
  }
64
+ .adm-notice-bar-close-icon {
65
+ font-size: 18px;
66
+ }
@@ -17,5 +17,5 @@ export declare type NoticeBarProps = {
17
17
  extra?: React.ReactNode;
18
18
  /** 左侧广播图标 */
19
19
  icon?: React.ReactNode;
20
- } & NativeProps<'--background-color' | '--border-color' | '--text-color'>;
20
+ } & NativeProps<'--background-color' | '--border-color' | '--text-color' | '--font-size' | '--icon-font-size' | '--height'>;
21
21
  export declare const NoticeBar: React.NamedExoticComponent<NoticeBarProps>;
@@ -10,7 +10,8 @@ const classPrefix = `adm-notice-bar`;
10
10
  const defaultProps = {
11
11
  color: 'default',
12
12
  delay: 2000,
13
- speed: 50
13
+ speed: 50,
14
+ icon: React.createElement(SoundOutline, null)
14
15
  };
15
16
  export const NoticeBar = memo(p => {
16
17
  const props = mergeProps(defaultProps, p);
@@ -67,9 +68,9 @@ export const NoticeBar = memo(p => {
67
68
  if (!visible) return null;
68
69
  return withNativeProps(props, React.createElement("div", {
69
70
  className: classNames(classPrefix, `${classPrefix}-${props.color}`)
70
- }, React.createElement("span", {
71
+ }, props.icon && React.createElement("span", {
71
72
  className: `${classPrefix}-left`
72
- }, 'icon' in props ? props.icon : React.createElement(SoundOutline, null)), React.createElement("span", {
73
+ }, props.icon), React.createElement("span", {
73
74
  ref: containerRef,
74
75
  className: `${classPrefix}-content`
75
76
  }, React.createElement("span", {
@@ -82,6 +83,7 @@ export const NoticeBar = memo(p => {
82
83
  }, props.content)), (props.closeable || props.extra) && React.createElement("span", {
83
84
  className: `${classPrefix}-right`
84
85
  }, props.extra, props.closeable && React.createElement(CloseOutline, {
86
+ className: `${classPrefix}-close-icon`,
85
87
  onClick: () => {
86
88
  var _a;
87
89
 
@@ -12,12 +12,12 @@
12
12
  display: flex;
13
13
  justify-content: space-between;
14
14
  align-items: center;
15
- padding: 6px 8px;
15
+ padding: 4px 4px;
16
16
  }
17
17
  .adm-picker-header-button {
18
18
  font-size: 15px;
19
19
  display: inline-block;
20
- padding: 4px 4px;
20
+ padding: 8px 8px;
21
21
  }
22
22
  .adm-picker-header-title {
23
23
  padding: 4px 4px;
@@ -34,3 +34,7 @@
34
34
  .adm-picker-body > .adm-picker-view {
35
35
  --height: 100%;
36
36
  }
37
+ .adm-picker-popup .adm-popup-body {
38
+ border-top-left-radius: 8px;
39
+ border-top-right-radius: 8px;
40
+ }
@@ -83,6 +83,7 @@ export const Picker = memo(p => {
83
83
  onChange: onChange
84
84
  }))));
85
85
  const popupElement = React.createElement(Popup, {
86
+ className: `${classPrefix}-popup`,
86
87
  visible: props.visible,
87
88
  position: 'bottom',
88
89
  onMaskClick: () => {
@@ -96,8 +96,8 @@
96
96
  border-bottom: solid 1px var(--adm-border-color);
97
97
  }
98
98
  .adm-picker-view-mask-top {
99
- background: linear-gradient(0deg, rgba(255, 255, 255, 0.7) 50%, #ffffff);
99
+ background: linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);
100
100
  }
101
101
  .adm-picker-view-mask-bottom {
102
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 50%, #ffffff);
102
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);
103
103
  }
@@ -30,7 +30,10 @@ export const Popover = forwardRef((p, ref) => {
30
30
  visible
31
31
  };
32
32
  }, [visible]);
33
- return withStopPropagation(props.stopPropagation, React.createElement(Tooltip, Object.assign({}, props, {
33
+ const overlay = withStopPropagation(props.stopPropagation, React.createElement("div", {
34
+ className: `${classPrefix}-inner-content`
35
+ }, props.content));
36
+ return React.createElement(Tooltip, Object.assign({}, props, {
34
37
  overlayClassName: classNames(`${classPrefix}-${mode}`, props.overlayClassName),
35
38
  destroyTooltipOnHide: props.destroyOnHide,
36
39
  prefixCls: classPrefix,
@@ -52,8 +55,6 @@ export const Popover = forwardRef((p, ref) => {
52
55
  },
53
56
  motionDeadline: 200
54
57
  },
55
- overlay: React.createElement("div", {
56
- className: `${classPrefix}-inner-content`
57
- }, props.content)
58
- }), props.children));
58
+ overlay: overlay
59
+ }), props.children);
59
60
  });
@@ -13,7 +13,7 @@
13
13
  }
14
14
  .adm-radio .adm-radio-icon {
15
15
  flex: none;
16
- border: 1px solid #ccc;
16
+ border: 1px solid var(--adm-color-light);
17
17
  border-radius: var(--icon-size);
18
18
  box-sizing: border-box;
19
19
  display: flex;
@@ -39,12 +39,12 @@
39
39
  cursor: not-allowed;
40
40
  }
41
41
  .adm-radio.adm-radio-disabled .adm-radio-content {
42
- color: var(--adm-color-weak);
42
+ opacity: 0.4;
43
43
  }
44
44
  .adm-radio.adm-radio-disabled .adm-radio-icon {
45
- color: #ccc;
46
- border-color: #ccc;
47
- background-color: #ebedf0;
45
+ color: #b7b7b7;
46
+ border-color: var(--adm-color-light);
47
+ background-color: #f5f5f5;
48
48
  }
49
49
  .adm-radio .adm-radio-custom-icon {
50
50
  font-size: var(--icon-size);
@@ -1,9 +1,6 @@
1
1
  .adm-result {
2
- --bg-color: var(--adm-color-white);
3
- --color: var(--adm-color-text);
4
- --adm-color-weak: var(--adm-color-weak);
5
2
  padding: 32px 12px;
6
- background-color: var(--bg-color);
3
+ background-color: var(--adm-color-white);
7
4
  }
8
5
  .adm-result-icon {
9
6
  box-sizing: border-box;
@@ -16,7 +13,7 @@
16
13
  font-size: 52px;
17
14
  }
18
15
  .adm-result-title {
19
- color: var(--color);
16
+ color: var(--adm-color-text);
20
17
  font-size: 18px;
21
18
  line-height: 1.4;
22
19
  text-align: center;
@@ -1,13 +1,14 @@
1
1
  .adm-search-bar {
2
- display: flex;
3
- justify-content: center;
4
- align-items: center;
5
- --height: 28px;
2
+ --height: 32px;
6
3
  --padding-left: 8px;
7
4
  --background: #f5f5f5;
8
5
  --border-radius: 6px;
9
6
  --placeholder-color: var(--adm-color-weak);
10
7
  ---placeholder-color: var(--placeholder-color);
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+ height: var(--height);
11
12
  }
12
13
  .adm-search-bar .adm-search-bar-input-box {
13
14
  flex: auto;
@@ -21,20 +22,20 @@
21
22
  }
22
23
  .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input-box-icon {
23
24
  flex: none;
24
- color: var(---placeholder-color);
25
+ color: var(--adm-color-light);
25
26
  font-size: 16px;
26
27
  }
27
28
  .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input {
28
29
  flex: auto;
29
30
  padding: 4px 8px 4px 4px;
30
- height: var(--height);
31
+ height: calc(var(--height) - 2px);
31
32
  box-sizing: border-box;
32
33
  }
33
- .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input-wrapper {
34
+ .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input {
34
35
  --placeholder-color: var(---placeholder-color);
36
+ --font-size: 15px;
35
37
  }
36
- .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input .adm-input {
37
- font-size: 13px;
38
+ .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input .adm-input-element {
38
39
  line-height: 19px;
39
40
  }
40
41
  .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-search-bar-input-without-icon {
@@ -47,6 +48,9 @@
47
48
  .adm-search-bar .adm-search-bar-cancel-button.adm-button {
48
49
  padding: 3px 12px;
49
50
  }
51
+ .adm-search-bar-active .adm-input.adm-input {
52
+ --placeholder-color: var(--adm-color-light);
53
+ }
50
54
  .adm-search-bar-active .adm-search-bar-input-box {
51
55
  border-color: var(--adm-color-primary);
52
56
  background: var(--adm-color-white);
@@ -5,6 +5,9 @@
5
5
  font-size: 15px;
6
6
  line-height: 1.4;
7
7
  }
8
+ .adm-selector .adm-space.adm-space {
9
+ --gap: 12px;
10
+ }
8
11
  .adm-selector-item {
9
12
  padding: 8px 16px;
10
13
  position: relative;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { NativeProps } from '../../utils/native-props';
3
+ export declare const Corner: React.NamedExoticComponent<NativeProps<never>>;
@@ -0,0 +1,14 @@
1
+ import React, { memo } from 'react';
2
+ import { withNativeProps } from '../../utils/native-props';
3
+ export const Corner = memo(props => withNativeProps(props, React.createElement("svg", {
4
+ viewBox: '0 0 30 30'
5
+ }, React.createElement("g", {
6
+ stroke: 'none',
7
+ strokeWidth: '1',
8
+ fill: 'none',
9
+ fillRule: 'evenodd'
10
+ }, React.createElement("path", {
11
+ d: 'M30,0 C13.4314575,3.04359188e-15 -2.02906125e-15,13.4314575 0,30 L0,30 L0,0 Z',
12
+ fill: 'var(--adm-color-white)',
13
+ transform: 'translate(15.000000, 15.000000) scale(-1, -1) translate(-15.000000, -15.000000) '
14
+ })))));
@@ -6,10 +6,22 @@
6
6
  width: var(--width);
7
7
  height: var(--height);
8
8
  box-sizing: border-box;
9
- font-size: 15px;
9
+ font-size: 13px;
10
10
  overflow-y: auto;
11
11
  transform: translateZ(0);
12
12
  -webkit-transform: translateZ(0);
13
+ background-color: var(--background-color);
14
+ display: flex;
15
+ flex-direction: column;
16
+ }
17
+ .adm-side-bar-items {
18
+ flex: none;
19
+ overflow: hidden;
20
+ }
21
+ .adm-side-bar-extra-space {
22
+ flex: auto;
23
+ overflow: hidden;
24
+ position: relative;
13
25
  }
14
26
  .adm-side-bar-item {
15
27
  display: flex;
@@ -19,6 +31,7 @@
19
31
  position: relative;
20
32
  cursor: pointer;
21
33
  background-color: var(--background-color);
34
+ overflow: visible;
22
35
  }
23
36
  .adm-side-bar-item-highlight {
24
37
  position: absolute;
@@ -34,27 +47,21 @@
34
47
  background-color: var(--adm-color-white);
35
48
  position: relative;
36
49
  }
37
- .adm-side-bar-item-active + .adm-side-bar-item {
38
- border-top-right-radius: var(--item-border-radius);
39
- }
40
- .adm-side-bar-item-active::before {
41
- content: '';
50
+ .adm-side-bar-item-corner {
42
51
  width: var(--item-border-radius);
43
52
  height: var(--item-border-radius);
44
- background-color: var(--adm-color-white);
45
53
  position: absolute;
46
- top: calc(var(--item-border-radius) * -1);
54
+ z-index: 100;
47
55
  right: 0;
56
+ user-select: none;
57
+ pointer-events: none;
48
58
  }
49
- .adm-side-bar-item-active::after {
50
- content: '';
51
- width: var(--item-border-radius);
52
- height: var(--item-border-radius);
53
- background-color: var(--background-color);
54
- border-bottom-right-radius: var(--item-border-radius);
55
- position: absolute;
56
- top: calc(var(--item-border-radius) * -1);
57
- right: 0;
59
+ .adm-side-bar-item-corner-top {
60
+ top: 0;
61
+ transform: rotate(-90deg);
62
+ }
63
+ .adm-side-bar-item-corner-bottom {
64
+ bottom: 0;
58
65
  }
59
66
  .adm-side-bar-item-disabled {
60
67
  cursor: not-allowed;
@@ -62,3 +69,6 @@
62
69
  .adm-side-bar-item-disabled .adm-side-bar-item-title {
63
70
  opacity: 0.4;
64
71
  }
72
+ .adm-side-bar-badge.adm-badge {
73
+ --right: -4px;
74
+ }
@@ -3,6 +3,7 @@ import classNames from 'classnames';
3
3
  import Badge from '../badge';
4
4
  import { withNativeProps } from '../../utils/native-props';
5
5
  import { usePropsValue } from '../../utils/use-props-value';
6
+ import { Corner } from './corner';
6
7
  const classPrefix = `adm-side-bar`;
7
8
  export const SideBarItem = () => {
8
9
  return null;
@@ -33,10 +34,16 @@ export const SideBar = props => {
33
34
  (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, v);
34
35
  }
35
36
  });
37
+ const lastItem = items[items.length - 1];
38
+ const isLastItemActive = lastItem && lastItem.key === activeKey;
36
39
  return withNativeProps(props, React.createElement("div", {
37
- className: classNames(classPrefix)
38
- }, items.map(item => {
40
+ className: classPrefix
41
+ }, React.createElement("div", {
42
+ className: `${classPrefix}-items`
43
+ }, items.map((item, index) => {
39
44
  const active = item.key === activeKey;
45
+ const isActiveNextSibling = items[index - 1] && items[index - 1].key === activeKey;
46
+ const isActivePreviousSibling = items[index + 1] && items[index + 1].key === activeKey;
40
47
  return withNativeProps(item.props, React.createElement("div", {
41
48
  key: item.key,
42
49
  onClick: () => {
@@ -50,12 +57,21 @@ export const SideBar = props => {
50
57
  [`${classPrefix}-item-active`]: active,
51
58
  [`${classPrefix}-item-disabled`]: item.props.disabled
52
59
  })
53
- }, React.createElement(Badge, {
54
- content: item.props.badge
60
+ }, React.createElement(React.Fragment, null, isActiveNextSibling && React.createElement(Corner, {
61
+ className: `${classPrefix}-item-corner ${classPrefix}-item-corner-top`
62
+ }), isActivePreviousSibling && React.createElement(Corner, {
63
+ className: `${classPrefix}-item-corner ${classPrefix}-item-corner-bottom`
64
+ })), React.createElement(Badge, {
65
+ content: item.props.badge,
66
+ className: `${classPrefix}-badge`
55
67
  }, React.createElement("div", {
56
68
  className: `${classPrefix}-item-title`
57
69
  }, active && React.createElement("div", {
58
70
  className: `${classPrefix}-item-highlight`
59
71
  }), item.props.title))));
60
- })));
72
+ })), React.createElement("div", {
73
+ className: classNames(`${classPrefix}-extra-space`, isLastItemActive && `${classPrefix}-item-active-next-sibling`)
74
+ }, isLastItemActive && React.createElement(Corner, {
75
+ className: `${classPrefix}-item-corner ${classPrefix}-item-corner-top`
76
+ }))));
61
77
  };
@@ -1,9 +1,8 @@
1
1
  .adm-spin-loading {
2
2
  --color: var(--adm-color-weak);
3
3
  --size: 32px;
4
- --track-width: calc(var(--size) / 16);
5
4
  --pi: 3.14159265;
6
- --radius: calc(var(--size) / 2 - var(--track-width) / 2);
5
+ --radius: 15;
7
6
  --circumference: calc(var(--radius) * var(--pi) * 2);
8
7
  width: var(--size);
9
8
  height: var(--size);
@@ -15,13 +14,6 @@
15
14
  }
16
15
  .adm-spin-loading-svg > .adm-spin-loading-fill {
17
16
  stroke: var(--color);
18
- stroke-width: var(--track-width);
19
- stroke-dasharray: var(--circumference);
20
- stroke-linecap: square;
21
- animation: adm-spin-loading-fill 1s infinite alternate-reverse linear;
22
- r: var(--radius);
23
- cx: calc(var(--size) / 2);
24
- cy: calc(var(--size) / 2);
25
17
  }
26
18
  @keyframes adm-spin-loading-rotate {
27
19
  from {
@@ -31,11 +23,3 @@
31
23
  transform: rotate(360deg);
32
24
  }
33
25
  }
34
- @keyframes adm-spin-loading-fill {
35
- from {
36
- stroke-dashoffset: calc(var(--circumference) * (1 - 0.4));
37
- }
38
- to {
39
- stroke-dashoffset: calc(var(--circumference) * (1 - 0.8));
40
- }
41
- }
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
3
  export declare type SpinLoadingProps = {
4
4
  color?: 'default' | 'primary' | 'white' | (string & {});
5
- } & NativeProps<'--color' | '--size' | '--track-width'>;
5
+ } & NativeProps<'--color' | '--size'>;
6
6
  export declare const SpinLoading: React.NamedExoticComponent<SpinLoadingProps>;
@@ -1,6 +1,7 @@
1
1
  import React, { memo } from 'react';
2
2
  import { withNativeProps } from '../../utils/native-props';
3
3
  import { mergeProps } from '../../utils/with-default-props';
4
+ import { useSpring, animated } from '@react-spring/web';
4
5
  const classPrefix = 'adm-spin-loading';
5
6
  const colorRecord = {
6
7
  default: 'var(--adm-color-weak)',
@@ -10,19 +11,45 @@ const colorRecord = {
10
11
  const defaultProps = {
11
12
  color: 'default'
12
13
  };
14
+ const circumference = 15 * 3.14159265358979 * 2;
13
15
  export const SpinLoading = memo(p => {
14
16
  var _a;
15
17
 
16
18
  const props = mergeProps(defaultProps, p);
17
- return withNativeProps(props, React.createElement("div", {
19
+ const {
20
+ percent
21
+ } = useSpring({
22
+ loop: {
23
+ reverse: true
24
+ },
25
+ from: {
26
+ percent: 30
27
+ },
28
+ to: {
29
+ percent: 80
30
+ },
31
+ config: {
32
+ duration: 1200
33
+ }
34
+ });
35
+ return withNativeProps(props, React.createElement(animated.div, {
18
36
  className: classPrefix,
19
37
  style: {
20
- '--color': (_a = colorRecord[props.color]) !== null && _a !== void 0 ? _a : props.color
38
+ '--color': (_a = colorRecord[props.color]) !== null && _a !== void 0 ? _a : props.color,
39
+ '--percent': percent
21
40
  }
22
41
  }, React.createElement("svg", {
23
- className: `${classPrefix}-svg`
24
- }, React.createElement("circle", {
42
+ className: `${classPrefix}-svg`,
43
+ viewBox: '0 0 32 32'
44
+ }, React.createElement(animated.circle, {
25
45
  className: `${classPrefix}-fill`,
26
- fill: 'transparent'
46
+ fill: 'transparent',
47
+ strokeWidth: '2',
48
+ strokeDasharray: circumference,
49
+ strokeDashoffset: percent,
50
+ strokeLinecap: 'square',
51
+ r: 15,
52
+ cx: 16,
53
+ cy: 16
27
54
  }))));
28
55
  });
@@ -31,12 +31,10 @@
31
31
  }
32
32
  .adm-stepper .adm-stepper-input {
33
33
  height: var(--height);
34
- background-color: var(--input-background-color);
35
- }
36
- .adm-stepper .adm-stepper-input > input {
37
- text-align: center;
38
- font-size: var(--input-font-size);
39
- color: var(--input-font-color);
34
+ --background-color: var(--input-background-color);
35
+ --font-size: var(--input-font-size);
36
+ --color: var(--input-font-color);
37
+ --text-align: center;
40
38
  }
41
39
  .adm-stepper-minus,
42
40
  .adm-stepper-plus {