acud 1.0.21 → 1.0.23

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 (171) hide show
  1. package/CHANGELOG.md +148 -0
  2. package/dist/acud.css +543 -246
  3. package/dist/acud.css.map +1 -1
  4. package/dist/acud.js +18653 -17994
  5. package/dist/acud.js.map +1 -1
  6. package/dist/acud.min.css +1 -1
  7. package/dist/acud.min.css.map +1 -1
  8. package/dist/acud.min.js +11 -11
  9. package/dist/acud.min.js.map +1 -1
  10. package/es/avatar/SizeContext.d.ts +10 -0
  11. package/es/avatar/SizeContext.js +12 -0
  12. package/es/avatar/avatar.d.ts +25 -0
  13. package/es/avatar/avatar.js +206 -0
  14. package/es/avatar/group.d.ts +15 -0
  15. package/es/avatar/group.js +64 -0
  16. package/es/avatar/index.d.ts +11 -0
  17. package/es/avatar/index.js +6 -0
  18. package/es/avatar/style/css.js +5 -0
  19. package/es/avatar/style/group.less +17 -0
  20. package/es/avatar/style/index.css +108 -0
  21. package/es/avatar/style/index.d.ts +3 -0
  22. package/es/avatar/style/index.js +5 -0
  23. package/es/avatar/style/index.less +68 -0
  24. package/es/avatar/style/rtl.less +15 -0
  25. package/es/divider/index.d.ts +14 -0
  26. package/es/divider/index.js +63 -0
  27. package/es/divider/style/css.js +2 -0
  28. package/es/divider/style/index.css +126 -0
  29. package/es/divider/style/index.d.ts +2 -0
  30. package/es/divider/style/index.js +2 -0
  31. package/es/divider/style/index.less +137 -0
  32. package/es/divider/style/rtl.less +38 -0
  33. package/es/dropdown/style/index.css +4 -4
  34. package/es/dropdown/style/index.less +5 -5
  35. package/es/grid/hooks/useBreakpoint.d.ts +1 -1
  36. package/es/grid/hooks/useBreakpoint.js +11 -9
  37. package/es/index.d.ts +2 -0
  38. package/es/index.js +2 -0
  39. package/es/menu/style/index.css +16 -12
  40. package/es/menu/style/index.less +5 -3
  41. package/es/menu/style/sider.less +2 -0
  42. package/es/modal/DialogBox.d.ts +2 -2
  43. package/es/modal/DialogBox.js +3 -2
  44. package/es/pagination/rc-pagination/Pagination.js +0 -1
  45. package/es/style/themes/default/components/avatar.less +13 -0
  46. package/es/style/themes/default/components/divider.less +6 -0
  47. package/es/style/themes/default/components/index.less +2 -0
  48. package/es/table/style/index.css +4 -3
  49. package/es/table/style/index.less +4 -0
  50. package/es/tag/style/index.css +46 -0
  51. package/es/tag/style/index.less +37 -0
  52. package/es/tree-select/index.d.ts +4 -4
  53. package/es/tree-select/index.js +1 -1
  54. package/es/tree-select/src/LegacyContext.d.ts +24 -0
  55. package/es/tree-select/src/LegacyContext.js +3 -0
  56. package/es/tree-select/src/OptionList.d.ts +8 -0
  57. package/es/tree-select/src/OptionList.js +338 -0
  58. package/es/tree-select/src/TreeNode.d.ts +9 -0
  59. package/es/tree-select/src/TreeNode.js +6 -0
  60. package/es/tree-select/src/TreeSelect.d.ts +122 -0
  61. package/es/tree-select/src/TreeSelect.js +534 -0
  62. package/es/tree-select/src/TreeSelectContext.d.ts +16 -0
  63. package/es/tree-select/src/TreeSelectContext.js +3 -0
  64. package/es/tree-select/src/hooks/useCache.d.ts +7 -0
  65. package/es/tree-select/src/hooks/useCache.js +29 -0
  66. package/es/tree-select/src/hooks/useCheckedKeys.d.ts +5 -0
  67. package/es/tree-select/src/hooks/useCheckedKeys.js +29 -0
  68. package/es/tree-select/src/hooks/useDataEntities.d.ts +7 -0
  69. package/es/tree-select/src/hooks/useDataEntities.js +30 -0
  70. package/es/tree-select/src/hooks/useFilterTreeData.d.ts +7 -0
  71. package/es/tree-select/src/hooks/useFilterTreeData.js +49 -0
  72. package/es/tree-select/src/hooks/useRefFunc.d.ts +5 -0
  73. package/es/tree-select/src/hooks/useRefFunc.js +14 -0
  74. package/es/tree-select/src/hooks/useTreeData.d.ts +8 -0
  75. package/es/tree-select/src/hooks/useTreeData.js +55 -0
  76. package/es/tree-select/src/index.d.ts +7 -0
  77. package/es/tree-select/src/index.js +9 -0
  78. package/es/tree-select/src/interface.d.ts +77 -0
  79. package/es/tree-select/src/interface.js +1 -0
  80. package/es/tree-select/src/utils/legacyUtil.d.ts +6 -0
  81. package/es/tree-select/src/utils/legacyUtil.js +144 -0
  82. package/es/tree-select/src/utils/strategyUtil.d.ts +9 -0
  83. package/es/tree-select/src/utils/strategyUtil.js +40 -0
  84. package/es/tree-select/src/utils/valueUtil.d.ts +14 -0
  85. package/es/tree-select/src/utils/valueUtil.js +46 -0
  86. package/es/tree-select/src/utils/warningPropsUtil.d.ts +5 -0
  87. package/es/tree-select/src/utils/warningPropsUtil.js +31 -0
  88. package/es/tree-select/style/index.css +10 -0
  89. package/es/tree-select/style/index.less +11 -0
  90. package/lib/avatar/SizeContext.d.ts +10 -0
  91. package/lib/avatar/SizeContext.js +26 -0
  92. package/lib/avatar/avatar.d.ts +25 -0
  93. package/lib/avatar/avatar.js +233 -0
  94. package/lib/avatar/group.d.ts +15 -0
  95. package/lib/avatar/group.js +88 -0
  96. package/lib/avatar/index.d.ts +11 -0
  97. package/lib/avatar/index.js +23 -0
  98. package/lib/avatar/style/css.js +7 -0
  99. package/lib/avatar/style/group.less +17 -0
  100. package/lib/avatar/style/index.css +108 -0
  101. package/lib/avatar/style/index.d.ts +3 -0
  102. package/lib/avatar/style/index.js +7 -0
  103. package/lib/avatar/style/index.less +68 -0
  104. package/lib/avatar/style/rtl.less +15 -0
  105. package/lib/divider/index.d.ts +14 -0
  106. package/lib/divider/index.js +74 -0
  107. package/lib/divider/style/css.js +5 -0
  108. package/lib/divider/style/index.css +126 -0
  109. package/lib/divider/style/index.d.ts +2 -0
  110. package/lib/divider/style/index.js +5 -0
  111. package/lib/divider/style/index.less +137 -0
  112. package/lib/divider/style/rtl.less +38 -0
  113. package/lib/dropdown/style/index.css +4 -4
  114. package/lib/dropdown/style/index.less +5 -5
  115. package/lib/grid/hooks/useBreakpoint.d.ts +1 -1
  116. package/lib/grid/hooks/useBreakpoint.js +11 -9
  117. package/lib/index.d.ts +2 -0
  118. package/lib/index.js +16 -0
  119. package/lib/menu/style/index.css +16 -12
  120. package/lib/menu/style/index.less +5 -3
  121. package/lib/menu/style/sider.less +2 -0
  122. package/lib/modal/DialogBox.d.ts +2 -2
  123. package/lib/modal/DialogBox.js +3 -2
  124. package/lib/pagination/rc-pagination/Pagination.js +0 -1
  125. package/lib/style/components.less +2 -0
  126. package/lib/style/themes/default/components/avatar.less +13 -0
  127. package/lib/style/themes/default/components/divider.less +6 -0
  128. package/lib/style/themes/default/components/index.less +2 -0
  129. package/lib/table/style/index.css +4 -3
  130. package/lib/table/style/index.less +4 -0
  131. package/lib/tag/style/index.css +46 -0
  132. package/lib/tag/style/index.less +37 -0
  133. package/lib/tree-select/index.d.ts +4 -4
  134. package/lib/tree-select/index.js +7 -7
  135. package/lib/tree-select/src/LegacyContext.d.ts +24 -0
  136. package/lib/tree-select/src/LegacyContext.js +18 -0
  137. package/lib/tree-select/src/OptionList.d.ts +8 -0
  138. package/lib/tree-select/src/OptionList.js +366 -0
  139. package/lib/tree-select/src/TreeNode.d.ts +9 -0
  140. package/lib/tree-select/src/TreeNode.js +14 -0
  141. package/lib/tree-select/src/TreeSelect.d.ts +122 -0
  142. package/lib/tree-select/src/TreeSelect.js +572 -0
  143. package/lib/tree-select/src/TreeSelectContext.d.ts +16 -0
  144. package/lib/tree-select/src/TreeSelectContext.js +18 -0
  145. package/lib/tree-select/src/hooks/useCache.d.ts +7 -0
  146. package/lib/tree-select/src/hooks/useCache.js +47 -0
  147. package/lib/tree-select/src/hooks/useCheckedKeys.d.ts +5 -0
  148. package/lib/tree-select/src/hooks/useCheckedKeys.js +49 -0
  149. package/lib/tree-select/src/hooks/useDataEntities.d.ts +7 -0
  150. package/lib/tree-select/src/hooks/useDataEntities.js +52 -0
  151. package/lib/tree-select/src/hooks/useFilterTreeData.d.ts +7 -0
  152. package/lib/tree-select/src/hooks/useFilterTreeData.js +70 -0
  153. package/lib/tree-select/src/hooks/useRefFunc.d.ts +5 -0
  154. package/lib/tree-select/src/hooks/useRefFunc.js +27 -0
  155. package/lib/tree-select/src/hooks/useTreeData.d.ts +8 -0
  156. package/lib/tree-select/src/hooks/useTreeData.js +71 -0
  157. package/lib/tree-select/src/index.d.ts +7 -0
  158. package/lib/tree-select/src/index.js +45 -0
  159. package/lib/tree-select/src/interface.d.ts +77 -0
  160. package/lib/tree-select/src/interface.js +5 -0
  161. package/lib/tree-select/src/utils/legacyUtil.d.ts +6 -0
  162. package/lib/tree-select/src/utils/legacyUtil.js +166 -0
  163. package/lib/tree-select/src/utils/strategyUtil.d.ts +9 -0
  164. package/lib/tree-select/src/utils/strategyUtil.js +53 -0
  165. package/lib/tree-select/src/utils/valueUtil.d.ts +14 -0
  166. package/lib/tree-select/src/utils/valueUtil.js +61 -0
  167. package/lib/tree-select/src/utils/warningPropsUtil.d.ts +5 -0
  168. package/lib/tree-select/src/utils/warningPropsUtil.js +43 -0
  169. package/lib/tree-select/style/index.css +10 -0
  170. package/lib/tree-select/style/index.less +11 -0
  171. package/package.json +1 -1
@@ -0,0 +1,126 @@
1
+ /* color */
2
+ /* 默认颜色 */
3
+ /* 通用-icon */
4
+ /* 标签 */
5
+ /* 默认颜色 */
6
+ /* 其他颜色 */
7
+ /* 通用 */
8
+ /* 水平 */
9
+ /* 垂直 */
10
+ /* 序号水平 */
11
+ /* 序号垂直 */
12
+ .acud-divider {
13
+ margin: 0;
14
+ padding: 0;
15
+ border-top: 1px solid rgba(0, 0, 0, 0.06);
16
+ }
17
+ .acud-divider-vertical {
18
+ position: relative;
19
+ top: -0.06em;
20
+ display: inline-block;
21
+ height: 0.9em;
22
+ margin: 0 8px;
23
+ vertical-align: middle;
24
+ border-top: 0;
25
+ border-left: 1px solid rgba(0, 0, 0, 0.06);
26
+ }
27
+ .acud-divider-horizontal {
28
+ display: flex;
29
+ clear: both;
30
+ width: 100%;
31
+ min-width: 100%;
32
+ margin: 24px 0;
33
+ }
34
+ .acud-divider-horizontal.acud-divider-with-text {
35
+ display: flex;
36
+ margin: 16px 0;
37
+ color: rgba(0, 0, 0, 0.85);
38
+ font-weight: 500;
39
+ font-size: 14px;
40
+ white-space: nowrap;
41
+ text-align: center;
42
+ border-top: 0;
43
+ border-top-color: rgba(0, 0, 0, 0.06);
44
+ }
45
+ .acud-divider-horizontal.acud-divider-with-text::before,
46
+ .acud-divider-horizontal.acud-divider-with-text::after {
47
+ position: relative;
48
+ top: 50%;
49
+ width: 50%;
50
+ border-top: 1px solid transparent;
51
+ border-top-color: inherit;
52
+ border-bottom: 0;
53
+ transform: translateY(50%);
54
+ content: '';
55
+ }
56
+ .acud-divider-horizontal.acud-divider-with-text-left::before {
57
+ top: 50%;
58
+ width: 5%;
59
+ }
60
+ .acud-divider-horizontal.acud-divider-with-text-left::after {
61
+ top: 50%;
62
+ width: 95%;
63
+ }
64
+ .acud-divider-horizontal.acud-divider-with-text-right::before {
65
+ top: 50%;
66
+ width: 95%;
67
+ }
68
+ .acud-divider-horizontal.acud-divider-with-text-right::after {
69
+ top: 50%;
70
+ width: 5%;
71
+ }
72
+ .acud-divider-inner-text {
73
+ display: inline-block;
74
+ padding: 0 1em;
75
+ }
76
+ .acud-divider-dashed {
77
+ background: none;
78
+ border-color: rgba(0, 0, 0, 0.06);
79
+ border-style: dashed;
80
+ border-width: 1px 0 0;
81
+ }
82
+ .acud-divider-horizontal.acud-divider-with-text.acud-divider-dashed::before,
83
+ .acud-divider-horizontal.acud-divider-with-text.acud-divider-dashed::after {
84
+ border-style: dashed none none;
85
+ }
86
+ .acud-divider-vertical.acud-divider-dashed {
87
+ border-width: 0 0 0 1px;
88
+ }
89
+ .acud-divider-plain.acud-divider-with-text {
90
+ color: #151B26;
91
+ font-weight: normal;
92
+ font-size: 12px;
93
+ }
94
+ .acud-divider-horizontal.acud-divider-with-text-left.acud-divider-no-default-orientation-margin-left::before {
95
+ width: 0;
96
+ }
97
+ .acud-divider-horizontal.acud-divider-with-text-left.acud-divider-no-default-orientation-margin-left::after {
98
+ width: 100%;
99
+ }
100
+ .acud-divider-horizontal.acud-divider-with-text-left.acud-divider-no-default-orientation-margin-left .acud-divider-inner-text {
101
+ padding-left: 0;
102
+ }
103
+ .acud-divider-horizontal.acud-divider-with-text-right.acud-divider-no-default-orientation-margin-right::before {
104
+ width: 100%;
105
+ }
106
+ .acud-divider-horizontal.acud-divider-with-text-right.acud-divider-no-default-orientation-margin-right::after {
107
+ width: 0;
108
+ }
109
+ .acud-divider-horizontal.acud-divider-with-text-right.acud-divider-no-default-orientation-margin-right .acud-divider-inner-text {
110
+ padding-right: 0;
111
+ }
112
+ .acud-divider-rtl {
113
+ direction: rtl;
114
+ }
115
+ .acud-divider-rtl.acud-divider-horizontal.acud-divider-with-text-left::before {
116
+ width: 95%;
117
+ }
118
+ .acud-divider-rtl.acud-divider-horizontal.acud-divider-with-text-left::after {
119
+ width: 5%;
120
+ }
121
+ .acud-divider-rtl.acud-divider-horizontal.acud-divider-with-text-right::before {
122
+ width: 5%;
123
+ }
124
+ .acud-divider-rtl.acud-divider-horizontal.acud-divider-with-text-right::after {
125
+ width: 95%;
126
+ }
@@ -0,0 +1,2 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -0,0 +1,137 @@
1
+ @import '../../style/themes/index';
2
+ @import '../../style/mixins/index';
3
+
4
+ @divider-prefix-cls: ~'@{acud-prefix}-divider';
5
+
6
+ .@{divider-prefix-cls} {
7
+ .reset-component();
8
+
9
+ border-top: @border-width-base solid @divider-color;
10
+
11
+ &-vertical {
12
+ position: relative;
13
+ top: -0.06em;
14
+ display: inline-block;
15
+ height: 0.9em;
16
+ margin: 0 @divider-vertical-gutter;
17
+ vertical-align: middle;
18
+ border-top: 0;
19
+ border-left: @border-width-base solid @divider-color;
20
+ }
21
+
22
+ &-horizontal {
23
+ display: flex;
24
+ clear: both;
25
+ width: 100%;
26
+ min-width: 100%; // Fix https://github.com/acud-design/acud-design/issues/10914
27
+ margin: 24px 0;
28
+ }
29
+
30
+ &-horizontal&-with-text {
31
+ display: flex;
32
+ margin: 16px 0;
33
+ color: @heading-color;
34
+ font-weight: 500;
35
+ font-size: @font-size-lg;
36
+ white-space: nowrap;
37
+ text-align: center;
38
+ border-top: 0;
39
+ border-top-color: @divider-color;
40
+
41
+ &::before,
42
+ &::after {
43
+ position: relative;
44
+ top: 50%;
45
+ width: 50%;
46
+ border-top: @border-width-base solid transparent;
47
+ // Chrome not accept `inherit` in `border-top`
48
+ border-top-color: inherit;
49
+ border-bottom: 0;
50
+ transform: translateY(50%);
51
+ content: '';
52
+ }
53
+ }
54
+
55
+ &-horizontal&-with-text-left {
56
+ &::before {
57
+ top: 50%;
58
+ width: @divider-orientation-margin;
59
+ }
60
+
61
+ &::after {
62
+ top: 50%;
63
+ width: 100% - @divider-orientation-margin;
64
+ }
65
+ }
66
+
67
+ &-horizontal&-with-text-right {
68
+ &::before {
69
+ top: 50%;
70
+ width: 100% - @divider-orientation-margin;
71
+ }
72
+
73
+ &::after {
74
+ top: 50%;
75
+ width: @divider-orientation-margin;
76
+ }
77
+ }
78
+
79
+ &-inner-text {
80
+ display: inline-block;
81
+ padding: 0 @divider-text-padding;
82
+ }
83
+
84
+ &-dashed {
85
+ background: none;
86
+ border-color: @divider-color;
87
+ border-style: dashed;
88
+ border-width: @border-width-base 0 0;
89
+ }
90
+
91
+ &-horizontal&-with-text&-dashed {
92
+ &::before,
93
+ &::after {
94
+ border-style: dashed none none;
95
+ }
96
+ }
97
+
98
+ &-vertical&-dashed {
99
+ border-width: 0 0 0 @border-width-base;
100
+ }
101
+
102
+ &-plain&-with-text {
103
+ color: @text-color;
104
+ font-weight: normal;
105
+ font-size: @font-size-base;
106
+ }
107
+
108
+ &-horizontal&-with-text-left&-no-default-orientation-margin-left {
109
+ &::before {
110
+ width: 0;
111
+ }
112
+
113
+ &::after {
114
+ width: 100%;
115
+ }
116
+
117
+ .@{divider-prefix-cls}-inner-text {
118
+ padding-left: 0;
119
+ }
120
+ }
121
+
122
+ &-horizontal&-with-text-right&-no-default-orientation-margin-right {
123
+ &::before {
124
+ width: 100%;
125
+ }
126
+
127
+ &::after {
128
+ width: 0;
129
+ }
130
+
131
+ .@{divider-prefix-cls}-inner-text {
132
+ padding-right: 0;
133
+ }
134
+ }
135
+ }
136
+
137
+ @import './rtl';
@@ -0,0 +1,38 @@
1
+ @import '../../style/themes/index';
2
+ @import '../../style/mixins/index';
3
+
4
+ @divider-prefix-cls: ~'@{acud-prefix}-divider';
5
+
6
+ .@{divider-prefix-cls} {
7
+ &-rtl {
8
+ direction: rtl;
9
+ }
10
+
11
+ &-horizontal&-with-text-left {
12
+ &::before {
13
+ .@{divider-prefix-cls}-rtl& {
14
+ width: 100% - @divider-orientation-margin;
15
+ }
16
+ }
17
+
18
+ &::after {
19
+ .@{divider-prefix-cls}-rtl& {
20
+ width: @divider-orientation-margin;
21
+ }
22
+ }
23
+ }
24
+
25
+ &-horizontal&-with-text-right {
26
+ &::before {
27
+ .@{divider-prefix-cls}-rtl& {
28
+ width: @divider-orientation-margin;
29
+ }
30
+ }
31
+
32
+ &::after {
33
+ .@{divider-prefix-cls}-rtl& {
34
+ width: 100% - @divider-orientation-margin;
35
+ }
36
+ }
37
+ }
38
+ }
@@ -37,6 +37,10 @@
37
37
  .acud-dropdown-menu-hidden {
38
38
  display: none;
39
39
  }
40
+ .acud-dropdown-demo-image > img {
41
+ width: 18px;
42
+ margin-right: 8px;
43
+ }
40
44
  .acud-dropdown-trigger {
41
45
  cursor: pointer;
42
46
  position: relative;
@@ -76,10 +80,6 @@
76
80
  .acud-dropdown-trigger .trigger-title-withicon[disabled]:active {
77
81
  color: #B8BABF;
78
82
  }
79
- .acud-dropdown-trigger img {
80
- width: 18px;
81
- margin-right: 8px;
82
- }
83
83
  .acud-dropdown-trigger a {
84
84
  color: #2468F2;
85
85
  }
@@ -36,6 +36,11 @@
36
36
  display: none;
37
37
  }
38
38
 
39
+ &-demo-image > img {
40
+ width: @dropdown-img-width;
41
+ margin-right: @dropdown-trigger-space;
42
+ }
43
+
39
44
  // 触点
40
45
  &-trigger {
41
46
  cursor: pointer;
@@ -52,11 +57,6 @@
52
57
  }
53
58
  }
54
59
 
55
- & img {
56
- width: @dropdown-img-width;
57
- margin-right: @dropdown-trigger-space;
58
- }
59
-
60
60
  & a {
61
61
  color: @blue-base;
62
62
  }
@@ -1,3 +1,3 @@
1
1
  import { ScreenMap } from '../../_util/responsiveObserve';
2
- declare function useBreakpoint(): ScreenMap;
2
+ declare function useBreakpoint(refreshOnChange?: boolean): ScreenMap;
3
3
  export default useBreakpoint;
@@ -1,22 +1,24 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import { useEffect, useState } from 'react';
1
+ import { useEffect, useRef } from 'react';
2
+ import useForceUpdate from '../../_util/hooks/useForceUpdate';
3
3
  import ResponsiveObserve from '../../_util/responsiveObserve';
4
4
 
5
5
  function useBreakpoint() {
6
- var _useState = useState({}),
7
- _useState2 = _slicedToArray(_useState, 2),
8
- screens = _useState2[0],
9
- setScreens = _useState2[1];
10
-
6
+ var refreshOnChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
7
+ var screensRef = useRef({});
8
+ var forceUpdate = useForceUpdate();
11
9
  useEffect(function () {
12
10
  var token = ResponsiveObserve.subscribe(function (supportScreens) {
13
- setScreens(supportScreens);
11
+ screensRef.current = supportScreens;
12
+
13
+ if (refreshOnChange) {
14
+ forceUpdate();
15
+ }
14
16
  });
15
17
  return function () {
16
18
  return ResponsiveObserve.unsubscribe(token);
17
19
  };
18
20
  }, []);
19
- return screens;
21
+ return screensRef.current;
20
22
  }
21
23
 
22
24
  export default useBreakpoint;
package/es/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as Affix } from './affix';
2
+ export { default as Avatar } from './avatar';
2
3
  export { default as Alert } from './alert';
3
4
  export { default as Anchor } from './anchor';
4
5
  export { default as BackTop } from './back-top';
@@ -15,6 +16,7 @@ export { default as Collapse } from './collapse';
15
16
  export { default as ConfigProvider } from './config-provider';
16
17
  export { default as DatePicker } from './date-picker';
17
18
  export { default as DialogBox } from './dialog-box';
19
+ export { default as Divider } from './divider';
18
20
  export { default as Drawer } from './drawer';
19
21
  export { default as Dropdown } from './dropdown';
20
22
  export { default as Empty } from './empty';
package/es/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  * @author
4
4
  */
5
5
  export { default as Affix } from './affix';
6
+ export { default as Avatar } from './avatar';
6
7
  export { default as Alert } from './alert';
7
8
  export { default as Anchor } from './anchor';
8
9
  export { default as BackTop } from './back-top';
@@ -19,6 +20,7 @@ export { default as Collapse } from './collapse';
19
20
  export { default as ConfigProvider } from './config-provider';
20
21
  export { default as DatePicker } from './date-picker';
21
22
  export { default as DialogBox } from './dialog-box';
23
+ export { default as Divider } from './divider';
22
24
  export { default as Drawer } from './drawer';
23
25
  export { default as Dropdown } from './dropdown';
24
26
  export { default as Empty } from './empty';
@@ -188,7 +188,9 @@
188
188
  .acud-menu-global-siderbar .acud-menu-bottom-nav-fold {
189
189
  cursor: pointer;
190
190
  display: flex;
191
+ align-items: center;
191
192
  overflow: hidden;
193
+ height: 40px;
192
194
  }
193
195
  .acud-menu-global-siderbar .acud-menu-bottom-nav-fold-icon {
194
196
  margin-right: 8px;
@@ -207,21 +209,21 @@
207
209
  font-size: 14px;
208
210
  background-color: #FFFFFF;
209
211
  }
210
- .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub.acud-menu-inline) {
212
+ .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub) {
211
213
  box-shadow: 0px 2px 8px 0px rgba(7, 12, 20, 0.12);
212
214
  color: #151B26;
213
215
  }
214
- .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub.acud-menu-inline):hover {
216
+ .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub):hover {
215
217
  color: #2468F2;
216
218
  }
217
- .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub.acud-menu-inline):focus,
218
- .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub.acud-menu-inline):active {
219
+ .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub):focus,
220
+ .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub):active {
219
221
  color: #2468F2;
220
222
  }
221
- .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub.acud-menu-inline)[disabled],
222
- .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub.acud-menu-inline)[disabled]:hover,
223
- .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub.acud-menu-inline)[disabled]:focus,
224
- .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub.acud-menu-inline)[disabled]:active {
223
+ .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub)[disabled],
224
+ .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub)[disabled]:hover,
225
+ .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub)[disabled]:focus,
226
+ .acud-menu:not(.acud-menu-with-icon):not(.acud-menu-global):not(.acud-menu-sub)[disabled]:active {
225
227
  color: #B8BABF;
226
228
  }
227
229
  .acud-menu > li {
@@ -493,10 +495,11 @@
493
495
  overflow: hidden;
494
496
  text-overflow: ellipsis;
495
497
  display: flex;
498
+ align-items: center;
496
499
  margin-bottom: 4px;
497
500
  }
498
- .acud-menu-inline .acud-menu-item .acudicon,
499
- .acud-menu-inline-collapsed .acud-menu-item .acudicon {
501
+ .acud-menu-inline .acud-menu-item > .acud-menu-item-icon,
502
+ .acud-menu-inline-collapsed .acud-menu-item > .acud-menu-item-icon {
500
503
  margin-right: 8px;
501
504
  }
502
505
  .acud-menu-inline .acud-menu-item.acud-menu-item-selected,
@@ -514,8 +517,8 @@
514
517
  top: 0;
515
518
  height: 40px;
516
519
  }
517
- .acud-menu-inline .acud-menu-submenu-title > .acudicon,
518
- .acud-menu-inline-collapsed .acud-menu-submenu-title > .acudicon {
520
+ .acud-menu-inline .acud-menu-submenu-title > .acud-menu-item-icon,
521
+ .acud-menu-inline-collapsed .acud-menu-submenu-title > .acud-menu-item-icon {
519
522
  height: 40px;
520
523
  }
521
524
  .acud-menu-inline.acud-menu-vertical,
@@ -565,6 +568,7 @@
565
568
  display: flex;
566
569
  width: 100%;
567
570
  border-bottom: 1px solid #F2F2F4;
571
+ align-items: center;
568
572
  }
569
573
  .acud-menu-inline-header-item .acudicon {
570
574
  display: flex;
@@ -11,7 +11,7 @@
11
11
  font-size: @menu-font-size;
12
12
  background-color: @menu-bg;
13
13
 
14
- &:not(&-with-icon):not(&-global):not(&-sub&-inline) {
14
+ &:not(&-with-icon):not(&-global):not(&-sub) {
15
15
  box-shadow: @menu-shadow;
16
16
  .basic-tp-config(@menu-light-tp);
17
17
  }
@@ -291,11 +291,12 @@
291
291
  overflow: hidden;
292
292
  text-overflow: ellipsis;
293
293
  display: flex;
294
+ align-items: center;
294
295
  margin-bottom: @P;
295
296
  }
296
297
 
297
298
  .@{menu-prefix-cls}-item {
298
- .@{acud-prefix}icon {
299
+ > .@{menu-prefix-cls}-item-icon {
299
300
  margin-right: @P* 2;
300
301
  }
301
302
  &.@{menu-prefix-cls}-item-selected {
@@ -313,7 +314,7 @@
313
314
  }
314
315
  }
315
316
 
316
- .@{menu-prefix-cls}-submenu-title > .@{acud-prefix}icon{
317
+ .@{menu-prefix-cls}-submenu-title > .@{menu-prefix-cls}-item-icon{
317
318
  height: @menu-item-height;
318
319
  }
319
320
 
@@ -358,6 +359,7 @@
358
359
  display: flex;
359
360
  width: 100%;
360
361
  border-bottom: 1px solid @G9;
362
+ align-items: center;
361
363
  .@{acud-prefix}icon {
362
364
  display: flex;
363
365
  margin-right: 2 * @P;
@@ -96,7 +96,9 @@
96
96
  &-fold {
97
97
  cursor: pointer;
98
98
  display: flex;
99
+ align-items: center;
99
100
  overflow: hidden;
101
+ height: 10 * @P;
100
102
  &-icon {
101
103
  margin-right: 2 * @P;
102
104
  display: flex;
@@ -9,10 +9,10 @@ export interface ModalFuncProps {
9
9
  /** 点击模态框右上角叉、取消按钮、Props.maskClosable 值为 true 时的遮罩层或键盘按下 Esc 时的回调 */
10
10
  onCancel?: (e: React.MouseEvent<HTMLElement>) => void;
11
11
  afterClose?: () => void;
12
+ /** 自定义icon */
13
+ icon?: React.ReactNode;
12
14
  /** 弹框宽度 */
13
15
  width?: number;
14
- /** 弹框高度 */
15
- height?: number;
16
16
  /** 确认按钮文字 */
17
17
  okText?: string;
18
18
  /** 取消按钮文字 */
@@ -81,7 +81,8 @@ var DialogBox = function DialogBox(props) {
81
81
  confirmLoading = props.confirmLoading,
82
82
  onOk = props.onOk,
83
83
  onClose = props.onClose,
84
- restProps = __rest(props, ["visible", "className", "title", "content", "type", "cancelBtn", "okText", "confirmLoading", "onOk", "onClose"]);
84
+ icon = props.icon,
85
+ restProps = __rest(props, ["visible", "className", "title", "content", "type", "cancelBtn", "okText", "confirmLoading", "onOk", "onClose", "icon"]);
85
86
 
86
87
  var _React$useState = React.useState(false),
87
88
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -120,7 +121,7 @@ var DialogBox = function DialogBox(props) {
120
121
  }, [onClose]);
121
122
  var titleNode = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
122
123
  className: "".concat(prefixCls, "-icon")
123
- }, DialogType[type].icon), /*#__PURE__*/React.createElement("div", {
124
+ }, icon || DialogType[type].icon), /*#__PURE__*/React.createElement("div", {
124
125
  className: "".concat(prefixCls, "-title")
125
126
  }, title));
126
127
  var footer = React.useMemo(function () {
@@ -143,7 +143,6 @@ var Pagination = function Pagination(_a) {
143
143
  var allPages = useMemo(function () {
144
144
  return calculatePage(undefined, curState, props);
145
145
  }, [props, curState]);
146
- console.log(allPages);
147
146
  var prevPage = current - 1 > 0 ? current - 1 : 0;
148
147
  var nextPage = current + 1 < allPages ? current + 1 : allPages;
149
148
  var hasOnChange = useMemo(function () {
@@ -0,0 +1,13 @@
1
+
2
+ @avatar-size-base: 32px;
3
+ @avatar-size-lg: 40px;
4
+ @avatar-size-sm: 24px;
5
+ @avatar-font-size-base: 18px;
6
+ @avatar-font-size-lg: 24px;
7
+ @avatar-font-size-sm: 14px;
8
+ @avatar-bg: #ccc;
9
+ @avatar-color: #fff;
10
+ @avatar-border-radius: @border-radius-base;
11
+ @avatar-group-overlapping: -8px;
12
+ @avatar-group-space: 3px;
13
+ @avatar-group-border-color: #fff;
@@ -0,0 +1,6 @@
1
+
2
+ @heading-color: fade(#000, 85%);
3
+ @divider-text-padding: 1em;
4
+ @divider-orientation-margin: 5%;
5
+ @divider-color: rgba(0, 0, 0, 6%);
6
+ @divider-vertical-gutter: 8px;
@@ -1,4 +1,6 @@
1
1
  @import './alert.less';
2
+ @import './avatar.less';
3
+ @import './divider.less';
2
4
  @import './badge.less';
3
5
  @import './button.less';
4
6
  @import './input.less';
@@ -340,12 +340,14 @@ div.acud-table-summary {
340
340
  .acud-table-filter-column {
341
341
  display: flex;
342
342
  justify-content: flex-start;
343
+ align-items: center;
343
344
  }
344
345
  .acud-table-filter-column .acud-dropdown-trigger {
345
346
  display: flex;
346
347
  }
347
348
  .acud-table-filter-column .acud-dropdown-trigger .acudicon-outlined-funnel {
348
349
  display: flex;
350
+ height: 16px;
349
351
  }
350
352
  .acud-table-filter-trigger {
351
353
  position: relative;
@@ -465,9 +467,11 @@ table tr th.acud-table-selection-column::after {
465
467
  padding-inline-start: 4px;
466
468
  margin-left: 0;
467
469
  display: flex;
470
+ align-items: center;
468
471
  }
469
472
  .acud-table-selection-extra .acud-dropdown-trigger {
470
473
  display: flex;
474
+ height: 16px;
471
475
  }
472
476
  .acud-table-selection-extra .acudicon {
473
477
  color: #84868C;
@@ -542,7 +546,6 @@ tr.acud-table-expanded-row .acud-descriptions-view table {
542
546
  }
543
547
  .acud-table-cell-fix-left,
544
548
  .acud-table-cell-fix-right {
545
- position: -webkit-sticky !important;
546
549
  position: sticky !important;
547
550
  z-index: 2;
548
551
  background: #FFFFFF;
@@ -612,13 +615,11 @@ tr.acud-table-expanded-row .acud-descriptions-view table {
612
615
  box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
613
616
  }
614
617
  .acud-table-sticky-holder {
615
- position: -webkit-sticky;
616
618
  position: sticky;
617
619
  z-index: calc(2 + 1);
618
620
  background: #FFFFFF;
619
621
  }
620
622
  .acud-table-sticky-scroll {
621
- position: -webkit-sticky;
622
623
  position: sticky;
623
624
  bottom: 0;
624
625
  z-index: calc(2 + 1);