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
@@ -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>;
@@ -21,10 +21,21 @@
21
21
 
22
22
  .adm-modal-main {
23
23
  width: 100%;
24
+ max-height: 70vh;
24
25
  font-size: 28px;
25
26
  background-color: white;
26
27
  border-radius: 16px;
27
28
  overflow: hidden;
29
+ display: flex;
30
+ flex-direction: column;
31
+ }
32
+
33
+ .adm-modal-main > * {
34
+ flex: none;
35
+ }
36
+
37
+ .adm-modal-main > .adm-modal-image-container {
38
+ flex: auto;
28
39
  }
29
40
 
30
41
  .adm-modal-main .adm-modal-body {
@@ -86,4 +97,8 @@
86
97
 
87
98
  .adm-modal-main .adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary):active {
88
99
  opacity: 0.7;
100
+ }
101
+
102
+ .adm-modal-image-container {
103
+ overflow-y: auto;
89
104
  }
@@ -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", {
@@ -24,14 +24,14 @@
24
24
  .adm-nav-bar-back {
25
25
  display: flex;
26
26
  align-items: center;
27
- margin-right: 24px;
27
+ margin-right: 32px;
28
28
  padding: 12px 0;
29
29
  cursor: pointer;
30
30
  }
31
31
 
32
32
  .adm-nav-bar-back-arrow {
33
- font-size: 36px;
34
- margin-right: 12px;
33
+ font-size: 48px;
34
+ margin-right: 8px;
35
35
  }
36
36
 
37
37
  .adm-nav-bar-left {
@@ -1,15 +1,18 @@
1
1
  .adm-notice-bar {
2
- height: 60px;
2
+ --background-color: #ababab;
3
+ --border-color: #999999;
4
+ --text-color: #ffffff;
5
+ --font-size: 30px;
6
+ --icon-font-size: 36px;
7
+ --height: 76px;
8
+ height: var(--height);
3
9
  box-sizing: border-box;
4
- font-size: 28px;
5
- line-height: 60px;
10
+ font-size: var(--font-size);
11
+ line-height: var(--height);
6
12
  padding: 0 24px;
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 2px var(--border-color);
14
17
  border-left: none;
15
18
  border-right: none;
@@ -39,9 +42,11 @@
39
42
  --text-color: #1677ff;
40
43
  }
41
44
 
42
- .adm-notice-bar .adm-notice-bar-left:not(:empty) {
45
+ .adm-notice-bar .adm-notice-bar-left {
43
46
  flex-shrink: 0;
44
47
  margin-right: 16px;
48
+ font-size: var(--icon-font-size);
49
+ line-height: var(--height);
45
50
  }
46
51
 
47
52
  .adm-notice-bar .adm-notice-bar-content {
@@ -57,11 +62,14 @@
57
62
  width: auto;
58
63
  transition-timing-function: linear;
59
64
  position: absolute;
60
- padding: 0 8px;
61
65
  white-space: nowrap;
62
66
  }
63
67
 
64
68
  .adm-notice-bar .adm-notice-bar-right {
65
69
  flex-shrink: 0;
66
70
  margin-left: 24px;
71
+ }
72
+
73
+ .adm-notice-bar-close-icon {
74
+ font-size: 36px;
67
75
  }
@@ -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
 
@@ -13,13 +13,13 @@
13
13
  display: flex;
14
14
  justify-content: space-between;
15
15
  align-items: center;
16
- padding: 12px 16px;
16
+ padding: 8px 8px;
17
17
  }
18
18
 
19
19
  .adm-picker-header-button {
20
20
  font-size: 30px;
21
21
  display: inline-block;
22
- padding: 8px 8px;
22
+ padding: 16px 16px;
23
23
  }
24
24
 
25
25
  .adm-picker-header-title {
@@ -38,4 +38,9 @@
38
38
 
39
39
  .adm-picker-body > .adm-picker-view {
40
40
  --height: 100%;
41
+ }
42
+
43
+ .adm-picker-popup .adm-popup-body {
44
+ border-top-left-radius: 16px;
45
+ border-top-right-radius: 16px;
41
46
  }
@@ -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: () => {
@@ -110,9 +110,9 @@
110
110
  }
111
111
 
112
112
  .adm-picker-view-mask-top {
113
- background: linear-gradient(0deg, rgba(255, 255, 255, 0.7) 50%, #ffffff);
113
+ background: linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);
114
114
  }
115
115
 
116
116
  .adm-picker-view-mask-bottom {
117
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 50%, #ffffff);
117
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);
118
118
  }
@@ -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
  });
@@ -15,7 +15,7 @@
15
15
 
16
16
  .adm-radio .adm-radio-icon {
17
17
  flex: none;
18
- border: 2px solid #ccc;
18
+ border: 2px solid var(--adm-color-light);
19
19
  border-radius: var(--icon-size);
20
20
  box-sizing: border-box;
21
21
  display: flex;
@@ -46,13 +46,13 @@
46
46
  }
47
47
 
48
48
  .adm-radio.adm-radio-disabled .adm-radio-content {
49
- color: var(--adm-color-weak);
49
+ opacity: 0.4;
50
50
  }
51
51
 
52
52
  .adm-radio.adm-radio-disabled .adm-radio-icon {
53
- color: #ccc;
54
- border-color: #ccc;
55
- background-color: #ebedf0;
53
+ color: #b7b7b7;
54
+ border-color: var(--adm-color-light);
55
+ background-color: #f5f5f5;
56
56
  }
57
57
 
58
58
  .adm-radio .adm-radio-custom-icon {
@@ -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: 64px 24px;
6
- background-color: var(--bg-color);
3
+ background-color: var(--adm-color-white);
7
4
  }
8
5
 
9
6
  .adm-result-icon {
@@ -19,7 +16,7 @@
19
16
  }
20
17
 
21
18
  .adm-result-title {
22
- color: var(--color);
19
+ color: var(--adm-color-text);
23
20
  font-size: 36px;
24
21
  line-height: 1.4;
25
22
  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: 56px;
2
+ --height: 64px;
6
3
  --padding-left: 16px;
7
4
  --background: #f5f5f5;
8
5
  --border-radius: 12px;
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
 
13
14
  .adm-search-bar .adm-search-bar-input-box {
@@ -23,23 +24,23 @@
23
24
 
24
25
  .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input-box-icon {
25
26
  flex: none;
26
- color: var(---placeholder-color);
27
+ color: var(--adm-color-light);
27
28
  font-size: 32px;
28
29
  }
29
30
 
30
31
  .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input {
31
32
  flex: auto;
32
33
  padding: 8px 16px 8px 8px;
33
- height: var(--height);
34
+ height: calc(var(--height) - 4px);
34
35
  box-sizing: border-box;
35
36
  }
36
37
 
37
- .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input-wrapper {
38
+ .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input {
38
39
  --placeholder-color: var(---placeholder-color);
40
+ --font-size: 30px;
39
41
  }
40
42
 
41
- .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input .adm-input {
42
- font-size: 26px;
43
+ .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input .adm-input-element {
43
44
  line-height: 38px;
44
45
  }
45
46
 
@@ -56,6 +57,10 @@
56
57
  padding: 6px 24px;
57
58
  }
58
59
 
60
+ .adm-search-bar-active .adm-input.adm-input {
61
+ --placeholder-color: var(--adm-color-light);
62
+ }
63
+
59
64
  .adm-search-bar-active .adm-search-bar-input-box {
60
65
  border-color: var(--adm-color-primary);
61
66
  background: var(--adm-color-white);
@@ -6,6 +6,10 @@
6
6
  line-height: 1.4;
7
7
  }
8
8
 
9
+ .adm-selector .adm-space.adm-space {
10
+ --gap: 24px;
11
+ }
12
+
9
13
  .adm-selector-item {
10
14
  padding: 16px 32px;
11
15
  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,24 @@
6
6
  width: var(--width);
7
7
  height: var(--height);
8
8
  box-sizing: border-box;
9
- font-size: 30px;
9
+ font-size: 26px;
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
+
18
+ .adm-side-bar-items {
19
+ flex: none;
20
+ overflow: hidden;
21
+ }
22
+
23
+ .adm-side-bar-extra-space {
24
+ flex: auto;
25
+ overflow: hidden;
26
+ position: relative;
13
27
  }
14
28
 
15
29
  .adm-side-bar-item {
@@ -20,6 +34,7 @@
20
34
  position: relative;
21
35
  cursor: pointer;
22
36
  background-color: var(--background-color);
37
+ overflow: visible;
23
38
  }
24
39
 
25
40
  .adm-side-bar-item-highlight {
@@ -38,29 +53,23 @@
38
53
  position: relative;
39
54
  }
40
55
 
41
- .adm-side-bar-item-active + .adm-side-bar-item {
42
- border-top-right-radius: var(--item-border-radius);
43
- }
44
-
45
- .adm-side-bar-item-active::before {
46
- content: '';
56
+ .adm-side-bar-item-corner {
47
57
  width: var(--item-border-radius);
48
58
  height: var(--item-border-radius);
49
- background-color: var(--adm-color-white);
50
59
  position: absolute;
51
- top: calc(var(--item-border-radius) * -1);
60
+ z-index: 100;
52
61
  right: 0;
62
+ user-select: none;
63
+ pointer-events: none;
53
64
  }
54
65
 
55
- .adm-side-bar-item-active::after {
56
- content: '';
57
- width: var(--item-border-radius);
58
- height: var(--item-border-radius);
59
- background-color: var(--background-color);
60
- border-bottom-right-radius: var(--item-border-radius);
61
- position: absolute;
62
- top: calc(var(--item-border-radius) * -1);
63
- right: 0;
66
+ .adm-side-bar-item-corner-top {
67
+ top: 0;
68
+ transform: rotate(-90deg);
69
+ }
70
+
71
+ .adm-side-bar-item-corner-bottom {
72
+ bottom: 0;
64
73
  }
65
74
 
66
75
  .adm-side-bar-item-disabled {
@@ -69,4 +78,8 @@
69
78
 
70
79
  .adm-side-bar-item-disabled .adm-side-bar-item-title {
71
80
  opacity: 0.4;
81
+ }
82
+
83
+ .adm-side-bar-badge.adm-badge {
84
+ --right: -8px;
72
85
  }
@@ -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: 64px;
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);
@@ -17,13 +16,6 @@
17
16
 
18
17
  .adm-spin-loading-svg > .adm-spin-loading-fill {
19
18
  stroke: var(--color);
20
- stroke-width: var(--track-width);
21
- stroke-dasharray: var(--circumference);
22
- stroke-linecap: square;
23
- animation: adm-spin-loading-fill 1s infinite alternate-reverse linear;
24
- r: var(--radius);
25
- cx: calc(var(--size) / 2);
26
- cy: calc(var(--size) / 2);
27
19
  }
28
20
 
29
21
  @keyframes adm-spin-loading-rotate {
@@ -34,14 +26,4 @@
34
26
  to {
35
27
  transform: rotate(360deg);
36
28
  }
37
- }
38
-
39
- @keyframes adm-spin-loading-fill {
40
- from {
41
- stroke-dashoffset: calc(var(--circumference) * (1 - 0.4));
42
- }
43
-
44
- to {
45
- stroke-dashoffset: calc(var(--circumference) * (1 - 0.8));
46
- }
47
29
  }
@@ -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
  });
@@ -34,13 +34,10 @@
34
34
 
35
35
  .adm-stepper .adm-stepper-input {
36
36
  height: var(--height);
37
- background-color: var(--input-background-color);
38
- }
39
-
40
- .adm-stepper .adm-stepper-input > input {
41
- text-align: center;
42
- font-size: var(--input-font-size);
43
- color: var(--input-font-color);
37
+ --background-color: var(--input-background-color);
38
+ --font-size: var(--input-font-size);
39
+ --color: var(--input-font-color);
40
+ --text-align: center;
44
41
  }
45
42
 
46
43
  .adm-stepper-minus,
@@ -79,7 +79,6 @@ export const Stepper = p => {
79
79
 
80
80
  return withNativeProps(props, React.createElement("div", {
81
81
  className: classNames(classPrefix, {
82
- [`${classPrefix}-disabled`]: disabled,
83
82
  [`${classPrefix}-active`]: hasFocus
84
83
  })
85
84
  }, React.createElement(Button, {
@@ -87,6 +86,7 @@ export const Stepper = p => {
87
86
  onClick: handleMinus,
88
87
  disabled: minusDisabled(),
89
88
  fill: 'none',
89
+ shape: 'rectangular',
90
90
  color: 'primary'
91
91
  }, React.createElement(MinusOutline, null)), React.createElement("div", {
92
92
  className: `${classPrefix}-middle`
@@ -115,6 +115,7 @@ export const Stepper = p => {
115
115
  onClick: handlePlus,
116
116
  disabled: plusDisabled(),
117
117
  fill: 'none',
118
+ shape: 'rectangular',
118
119
  color: 'primary'
119
120
  }, React.createElement(AddOutline, null))));
120
121
  };