@aloudata/aloudata-design 0.4.0-beta.1 → 0.4.0-beta.11

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 (155) hide show
  1. package/es/Avatar/component/Avatar/index.d.ts +84 -0
  2. package/es/Avatar/component/Avatar/index.js +42 -0
  3. package/es/Avatar/index.d.ts +1 -13
  4. package/es/Avatar/index.js +1 -30
  5. package/es/Avatar/style/index.less +1 -1
  6. package/es/Breadcrumb/index.d.ts +5 -2
  7. package/es/Breadcrumb/index.js +17 -7
  8. package/es/Button/index.d.ts +1 -1
  9. package/es/Button/index.js +3 -8
  10. package/es/Button/style/index.less +6 -0
  11. package/es/Button/style/variables.less +26 -26
  12. package/es/Checkbox/component/CheckboxGroup/index.d.ts +4 -0
  13. package/es/Checkbox/component/CheckboxGroup/index.js +27 -0
  14. package/es/Checkbox/index.d.ts +4 -5
  15. package/es/Checkbox/index.js +3 -12
  16. package/es/Checkbox/style/index.less +36 -16
  17. package/es/Checkbox/type.d.ts +94 -0
  18. package/es/Checkbox/type.js +6 -0
  19. package/es/Divider/index.d.ts +40 -2
  20. package/es/Divider/index.js +10 -1
  21. package/es/Divider/style/index.less +4 -0
  22. package/es/Divider/style/index.less.d.ts +183 -0
  23. package/es/Dropdown/Button.d.ts +4 -4
  24. package/es/Dropdown/Button.js +5 -5
  25. package/es/Dropdown/index.d.ts +5 -5
  26. package/es/Dropdown/index.js +5 -5
  27. package/es/Icon/icons.d.ts +9 -0
  28. package/es/Icon/icons.js +1590 -0
  29. package/es/Input/components/Input/index.d.ts +13 -1
  30. package/es/Input/components/Input/index.js +1 -3
  31. package/es/Input/components/Password/index.d.ts +6 -1
  32. package/es/Input/components/Password/index.js +11 -3
  33. package/es/Input/components/TextArea/index.d.ts +1 -1
  34. package/es/Input/style/index.less +139 -59
  35. package/es/InputNumber/index.d.ts +3 -3
  36. package/es/InputNumber/style/index.less +66 -26
  37. package/es/InputNumber/type.d.ts +161 -0
  38. package/es/InputNumber/type.js +1 -0
  39. package/es/Menu/index.d.ts +2 -0
  40. package/es/Popconfirm/index.d.ts +90 -0
  41. package/es/Popconfirm/index.js +111 -0
  42. package/es/Popconfirm/style/index.d.ts +2 -0
  43. package/es/Popconfirm/style/index.js +2 -0
  44. package/es/Popconfirm/style/index.less +57 -0
  45. package/es/Progress/index.d.ts +3 -0
  46. package/es/Progress/index.js +2 -0
  47. package/es/Progress/style/index.d.ts +2 -0
  48. package/es/Progress/style/index.js +2 -0
  49. package/es/Progress/style/index.less +1 -0
  50. package/es/Select/style/variables.less.d.ts +6 -0
  51. package/es/Steps/style/index.less +10 -4
  52. package/es/Table/Table.js +87 -91
  53. package/es/Table/components/TableHead/index.d.ts +0 -1
  54. package/es/Table/components/TableHead/index.js +1 -2
  55. package/es/Table/interface.d.ts +2 -0
  56. package/es/Table/style/index.less +14 -5
  57. package/es/Table/style/variable.less +0 -5
  58. package/es/Table/style/variable.less.d.ts +1 -1
  59. package/es/Table/utils.js +16 -9
  60. package/es/Tabs/index.d.ts +21 -6
  61. package/es/Tabs/index.js +3 -5
  62. package/es/Tabs/style/index.less +1 -1
  63. package/es/Tooltip/index.d.ts +2 -2
  64. package/es/Tooltip/index.js +4 -4
  65. package/es/index.d.ts +7 -3
  66. package/es/index.js +3 -1
  67. package/es/style/themes/default/scrollBar.less +10 -7
  68. package/es/style/themes/default/themeColor.module.less +176 -166
  69. package/es/style/themes/default/themeColor.module.less.d.ts +6 -0
  70. package/lib/Avatar/component/Avatar/index.d.ts +84 -0
  71. package/lib/Avatar/component/Avatar/index.js +61 -0
  72. package/lib/Avatar/index.d.ts +1 -13
  73. package/lib/Avatar/index.js +3 -44
  74. package/lib/Avatar/style/index.less +1 -1
  75. package/lib/Breadcrumb/index.d.ts +5 -2
  76. package/lib/Breadcrumb/index.js +17 -8
  77. package/lib/Button/index.d.ts +1 -1
  78. package/lib/Button/index.js +3 -8
  79. package/lib/Button/style/index.less +6 -0
  80. package/lib/Button/style/variables.less +26 -26
  81. package/lib/Checkbox/component/CheckboxGroup/index.d.ts +4 -0
  82. package/lib/Checkbox/component/CheckboxGroup/index.js +42 -0
  83. package/lib/Checkbox/index.d.ts +4 -5
  84. package/lib/Checkbox/index.js +4 -13
  85. package/lib/Checkbox/style/index.less +36 -16
  86. package/lib/Checkbox/type.d.ts +94 -0
  87. package/lib/Checkbox/type.js +13 -0
  88. package/lib/Divider/index.d.ts +40 -2
  89. package/lib/Divider/index.js +11 -1
  90. package/lib/Divider/style/index.less +4 -0
  91. package/lib/Divider/style/index.less.d.ts +183 -0
  92. package/lib/Dropdown/Button.d.ts +4 -4
  93. package/lib/Dropdown/Button.js +5 -5
  94. package/lib/Dropdown/index.d.ts +5 -5
  95. package/lib/Dropdown/index.js +5 -5
  96. package/lib/Icon/icons.d.ts +9 -0
  97. package/lib/Icon/icons.js +1597 -0
  98. package/lib/Input/components/Input/index.d.ts +13 -1
  99. package/lib/Input/components/Input/index.js +1 -3
  100. package/lib/Input/components/Password/index.d.ts +6 -1
  101. package/lib/Input/components/Password/index.js +14 -4
  102. package/lib/Input/components/TextArea/index.d.ts +1 -1
  103. package/lib/Input/style/index.less +139 -59
  104. package/lib/InputNumber/index.d.ts +3 -3
  105. package/lib/InputNumber/style/index.less +66 -26
  106. package/lib/InputNumber/type.d.ts +161 -0
  107. package/lib/InputNumber/type.js +5 -0
  108. package/lib/Menu/index.d.ts +2 -0
  109. package/lib/Popconfirm/index.d.ts +90 -0
  110. package/lib/Popconfirm/index.js +127 -0
  111. package/lib/Popconfirm/style/index.d.ts +2 -0
  112. package/lib/Popconfirm/style/index.js +5 -0
  113. package/lib/Popconfirm/style/index.less +57 -0
  114. package/lib/Progress/index.d.ts +3 -0
  115. package/lib/Progress/index.js +13 -0
  116. package/lib/Progress/style/index.d.ts +2 -0
  117. package/lib/Progress/style/index.js +5 -0
  118. package/lib/Progress/style/index.less +1 -0
  119. package/lib/Select/style/variables.less.d.ts +6 -0
  120. package/lib/Steps/style/index.less +10 -4
  121. package/lib/Table/Table.js +90 -96
  122. package/lib/Table/components/TableHead/index.d.ts +0 -1
  123. package/lib/Table/components/TableHead/index.js +1 -2
  124. package/lib/Table/interface.d.ts +2 -0
  125. package/lib/Table/style/index.less +14 -5
  126. package/lib/Table/style/variable.less +0 -5
  127. package/lib/Table/style/variable.less.d.ts +1 -1
  128. package/lib/Table/utils.js +16 -9
  129. package/lib/Tabs/index.d.ts +21 -6
  130. package/lib/Tabs/index.js +3 -7
  131. package/lib/Tabs/style/index.less +1 -1
  132. package/lib/Tooltip/index.d.ts +2 -2
  133. package/lib/Tooltip/index.js +4 -4
  134. package/lib/index.d.ts +7 -3
  135. package/lib/index.js +16 -0
  136. package/lib/style/themes/default/scrollBar.less +10 -7
  137. package/lib/style/themes/default/themeColor.module.less +176 -166
  138. package/lib/style/themes/default/themeColor.module.less.d.ts +6 -0
  139. package/package.json +4 -3
  140. package/es/Icon/icons.json +0 -418
  141. package/es/Table/hooks/useFrame.d.ts +0 -7
  142. package/es/Table/hooks/useFrame.js +0 -90
  143. package/es/Table/hooks/useTableColumn.d.ts +0 -28
  144. package/es/Table/hooks/useTableColumn.js +0 -53
  145. package/es/Table/style/index.less.d.ts +0 -126
  146. package/es/Tabs/TabPane.d.ts +0 -21
  147. package/es/Tabs/TabPane.js +0 -6
  148. package/lib/Icon/icons.json +0 -418
  149. package/lib/Table/hooks/useFrame.d.ts +0 -7
  150. package/lib/Table/hooks/useFrame.js +0 -98
  151. package/lib/Table/hooks/useTableColumn.d.ts +0 -28
  152. package/lib/Table/hooks/useTableColumn.js +0 -66
  153. package/lib/Table/style/index.less.d.ts +0 -126
  154. package/lib/Tabs/TabPane.d.ts +0 -21
  155. package/lib/Tabs/TabPane.js +0 -18
@@ -1,13 +1,16 @@
1
- ::-webkit-scrollbar-thumb {
2
- background: @NL90;
3
- background-clip: padding-box;
1
+ &::-webkit-scrollbar {
2
+ width: 12px !important;
3
+ height: 12px !important;
4
+ opacity: 0.5;
5
+ }
6
+
7
+ &::-webkit-scrollbar-thumb {
8
+ background-color: rgba(152, 162, 179, 0.5);
4
9
  border: 3px solid transparent;
5
10
  border-radius: 6px;
11
+ background-clip: padding-box;
6
12
  }
7
13
 
8
- ::-webkit-scrollbar {
9
- width: 12px;
10
- height: 12px;
11
- min-height: 12px;
14
+ &::-webkit-scrollbar-track {
12
15
  background-color: transparent;
13
16
  }
@@ -3,98 +3,98 @@
3
3
  * 中性色是色彩系统的基础。 UI 设计中的几乎所有东西:文本、表单、背景、分隔线等等通常都是中性的。
4
4
  **/
5
5
  @NL0: #101828;
6
- @NL97: fade(@NL0, 3%);//TODO: 版本升级后,删除NL97;新版无此色号
7
- @NL95:#FCFCFD;
8
- @NL90: #F9FAFB;
9
- @NL80: #F2F4F7;
10
- @NL70: #EAECF0;
11
- @NL60: #D0D5DD;
12
- @NL50: #98A2B3;
6
+ @NL97: fade(@NL0, 3%); //TODO: 版本升级后,删除NL97;新版无此色号
7
+ @NL95: #fcfcfd;
8
+ @NL90: #f9fafb;
9
+ @NL80: #f2f4f7;
10
+ @NL70: #eaecf0;
11
+ @NL60: #d0d5dd;
12
+ @NL50: #98a2b3;
13
13
  @NL40: #667085;
14
14
  @NL30: #475467;
15
15
  @NL20: #344054;
16
- @NL10: #1D2939;
16
+ @NL10: #1d2939;
17
17
 
18
18
  /**
19
19
  *中性深色背景 Neutral Dark
20
20
  * 中性色是色彩系统的基础。 UI 设计中的几乎所有东西:文本、表单、背景、分隔线等等通常都是中性的。
21
21
  **/
22
- @ND0: #FCFCFD;
23
- @ND97: fade(@ND0, 3%);//TODO: 版本升级后,删除ND97;新版无此色号
24
- @ND95:#101828;
25
- @ND90: #1D2939;
22
+ @ND0: #fcfcfd;
23
+ @ND97: fade(@ND0, 3%); //TODO: 版本升级后,删除ND97;新版无此色号
24
+ @ND95: #101828;
25
+ @ND90: #1d2939;
26
26
  @ND80: #344054;
27
27
  @ND70: #475467;
28
28
  @ND60: #667085;
29
- @ND50: #98A2B3;
30
- @ND40: #D0D5DD;
31
- @ND30: #EAECF0;
32
- @ND20: #F2F4F7;
33
- @ND10: #F9FAFB;
29
+ @ND50: #98a2b3;
30
+ @ND40: #d0d5dd;
31
+ @ND30: #eaecf0;
32
+ @ND20: #f2f4f7;
33
+ @ND10: #f9fafb;
34
34
 
35
35
  /**
36
36
  * 品牌色 Brand
37
37
  * 主色调是你的 "品牌 "颜色,用于所有互动元素,如按钮、链接、输入等。这种颜色可以定义整体感觉,并能引起人们的情感。
38
38
  **/
39
39
  @B10: #194185;
40
- @B20: #1849A9;
41
- @B30: #175CD3;
42
- @B40: #1570EF;
43
- @B50: #2E90FA;
44
- @B60: #53B1FD;
45
- @B70: #84CAFF;
46
- @B80: #B2DDFF;
47
- @B90: #D1E9FF;
48
- @B95: #EFF8FF;
49
- @B98: #F5FAFF;
40
+ @B20: #1849a9;
41
+ @B30: #175cd3;
42
+ @B40: #1570ef;
43
+ @B50: #2e90fa;
44
+ @B60: #53b1fd;
45
+ @B70: #84caff;
46
+ @B80: #b2ddff;
47
+ @B90: #d1e9ff;
48
+ @B95: #eff8ff;
49
+ @B98: #f5faff;
50
50
 
51
51
  /**
52
52
  * 辅助A Secondary A
53
53
  * 绿色传达了一个积极的行动,积极的趋势,或成功的确认。
54
54
  **/
55
- @SA10: #054F31;
56
- @SA20: #05603A;
57
- @SA30: #027A48;
58
- @SA40: #1570EF;
59
- @SA50: #12B76A;
60
- @SA60: #32D583;
61
- @SA70: #6CE9A6;
62
- @SA80: #A6F4C5;
63
- @SA90: #D1FADF;
64
- @SA95: #ECFDF3;
65
- @SA98: #F6FEF9;
55
+ @SA10: #054f31;
56
+ @SA20: #05603a;
57
+ @SA30: #027a48;
58
+ @SA40: #039855;
59
+ @SA50: #12b76a;
60
+ @SA60: #32d583;
61
+ @SA70: #6ce9a6;
62
+ @SA80: #a6f4c5;
63
+ @SA90: #d1fadf;
64
+ @SA95: #ecfdf3;
65
+ @SA98: #f6fef9;
66
66
 
67
67
  /**
68
68
  * 辅助B Secondary B
69
69
  * 橙色可以传达一个警示信号。这些颜色通常被用于提醒,以抓住用户的注意力。
70
70
  **/
71
- @SB10: #7A2E0E;
72
- @SB20: #93370D;
73
- @SB30: #B54708;
74
- @SB40: #DC6803;
75
- @SB50: #F79009;
76
- @SB60: #FDB022;
77
- @SB70: #FEC84B;
78
- @SB80: #FEDF89;
79
- @SB90: #FEF0C7;
80
- @SB95: #FFFAEB;
81
- @SB98: #FFFCF5;
71
+ @SB10: #7a2e0e;
72
+ @SB20: #93370d;
73
+ @SB30: #b54708;
74
+ @SB40: #dc6803;
75
+ @SB50: #f79009;
76
+ @SB60: #fdb022;
77
+ @SB70: #fec84b;
78
+ @SB80: #fedf89;
79
+ @SB90: #fef0c7;
80
+ @SB95: #fffaeb;
81
+ @SB98: #fffcf5;
82
82
 
83
83
  /**
84
84
  * 辅助C Secondary C
85
85
  * 红色在错误状态和 "破坏性 "行动中使用。它们传达了一种破坏性/负面消极的行动,例如将一个用户从你的团队中删除。
86
86
  **/
87
- @SC10: #7A271A;
87
+ @SC10: #7a271a;
88
88
  @SC20: #912018;
89
- @SC30: #B42318;
90
- @SC40: #D92D20;
91
- @SC50: #F04438;
92
- @SC60: #F97066;
93
- @SC70: #FDA29B;
94
- @SC80: #FECDCA;
95
- @SC90: #FEE4E2;
96
- @SC95: #FEF3F2;
97
- @SC98: #FFFBFA;
89
+ @SC30: #b42318;
90
+ @SC40: #d92d20;
91
+ @SC50: #f04438;
92
+ @SC60: #f97066;
93
+ @SC70: #fda29b;
94
+ @SC80: #fecdca;
95
+ @SC90: #fee4e2;
96
+ @SC95: #fef3f2;
97
+ @SC98: #fffbfa;
98
98
 
99
99
  /**
100
100
  * 背景色 Background
@@ -102,156 +102,160 @@
102
102
  **/
103
103
  @BG0: #000000;
104
104
  @BG10: #101828;
105
- @BG20: #1D2939;
105
+ @BG20: #1d2939;
106
106
  @BG30: #475467;
107
107
  @BG40: #667085;
108
- @BG50: #98A2B3;
109
- @BG60: #D0D5DD;
110
- @BG70: #EAECF0;
111
- @BG80: #F2F4F7;
112
- @BG90: #F8FAFB;
113
- @BG95: #F9FAFB;
114
- @BG97: #FCFCFD;
115
- @BG100:#FFFFFF;
116
-
108
+ @BG50: #98a2b3;
109
+ @BG60: #d0d5dd;
110
+ @BG70: #eaecf0;
111
+ @BG80: #f2f4f7;
112
+ @BG90: #f5f6f7;
113
+ @BG95: #f9fafb;
114
+ @BG97: #fcfcfd;
115
+ @BG100: #ffffff;
117
116
 
118
117
  /***
119
118
  * 投影
120
119
  ***/
121
- @shadow-L:0px 11px 15px rgba(0, 26, 51, 0.1), 0px 9px 46px rgba(0, 26, 51, 0.05), 0px 24px 38px rgba(0, 26, 51, 0.03);
122
-
123
- // 业务颜色
120
+ @shadow-L: 0px 11px 15px rgba(0, 26, 51, 0.1), 0px 9px 46px rgba(0, 26, 51, 0.05),
121
+ 0px 24px 38px rgba(0, 26, 51, 0.03);
122
+ @shadow-xl: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03);
123
+ @shadow-lg: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
124
+ @shadow-md: 0px 4px 6px -2px rgba(16, 24, 40, 0.08), 0px 2px 4px -2px rgba(16, 24, 40, 0.03);
125
+ @shadow-sm: 0px 1px 4px rgba(16, 24, 40, 0.06), 0px 1px 2px rgba(16, 24, 40, 0.04);
126
+ @shadow-xs: 0px 1px 2px rgba(16, 24, 40, 0.05);
127
+ @shadow-body-top-left: -4px -4px 2px rgba(0, 0, 0, 0.05);
128
+ @shadow-primary:0px 0px 0px 4px rgba(21, 111, 238, 0.12);
129
+ // 业务颜色
124
130
  // 除了原色之外,在业务、提示和标签等组件中使用一些次要颜色也很有帮助。这些次要颜色应该少用或作为重点使用,而主要颜色应该占优先地位。
125
131
 
126
132
  /**
127
133
  * 业务A (Tertiary A)
128
134
  **/
129
135
 
130
- @TA10: #2B4212;
136
+ @TA10: #2b4212;
131
137
  @TA20: #335015;
132
- @TA30: #3F611A;
133
- @TA40: #4F7A21;
134
- @TA50: #669F2A;
135
- @TA60: #86CB3C;
136
- @TA70: #ACDC79;
137
- @TA80: #CDEAAF;
138
- @TA90: #E6F4D7;
139
- @TA95: #F5FBEE;
140
- @TA98: #FAFDF7;
141
-
138
+ @TA30: #3f611a;
139
+ @TA40: #4f7a21;
140
+ @TA50: #669f2a;
141
+ @TA60: #86cb3c;
142
+ @TA70: #acdc79;
143
+ @TA80: #cdeaaf;
144
+ @TA90: #e6f4d7;
145
+ @TA95: #f5fbee;
146
+ @TA98: #fafdf7;
142
147
 
143
148
  /**
144
149
  * 业务B (Tertiary B)
145
150
  **/
146
151
 
147
- @TB10: #134E48;
148
- @TB20: #125D56;
149
- @TB30: #0F7569;
150
- @TB40: #0E9384;
151
- @TB50: #15B79E;
152
- @TB60: #2ED2B7;
153
- @TB70: #5EE9CF;
154
- @TB80: #99F6E0;
155
- @TB90: #CCFBEF;
156
- @TB95: #F0FDF9;
157
- @TB98: #F6FEFC;
152
+ @TB10: #134e48;
153
+ @TB20: #125d56;
154
+ @TB30: #0f7569;
155
+ @TB40: #0e9384;
156
+ @TB50: #15b79e;
157
+ @TB60: #2ed2b7;
158
+ @TB70: #5ee9cf;
159
+ @TB80: #99f6e0;
160
+ @TB90: #ccfbef;
161
+ @TB95: #f0fdf9;
162
+ @TB98: #f6fefc;
158
163
 
159
164
  /**
160
165
  * 业务C (Tertiary C)
161
166
  **/
162
167
 
163
168
  @TC10: #013743;
164
- @TC20: #024D5E;
165
- @TC30: #036E86;
166
- @TC40: #0386A4;
167
- @TC50: #049BBD;
168
- @TC60: #05AED4;
169
- @TC70: #72C0DD;
170
- @TC80: #A1D2E6;
171
- @TC90: #C5E2EE;
172
- @TC95: #E4F0F6;
173
- @TC98: #F1F8FB;
169
+ @TC20: #024d5e;
170
+ @TC30: #036e86;
171
+ @TC40: #0386a4;
172
+ @TC50: #049bbd;
173
+ @TC60: #05aed4;
174
+ @TC70: #72c0dd;
175
+ @TC80: #a1d2e6;
176
+ @TC90: #c5e2ee;
177
+ @TC95: #e4f0f6;
178
+ @TC98: #f1f8fb;
174
179
 
175
180
  /**
176
181
  * 业务D (Tertiary D)
177
182
  **/
178
183
 
179
- @TD10: #2D3282;
180
- @TD20: #2D31A5;
181
- @TD30: #3537CC;
182
- @TD40: #444CE7;
183
- @TD50: #6071F3;
184
- @TD60: #7F98F9;
185
- @TD70: #A3BBFD;
186
- @TD80: #C7D7FE;
187
- @TD90: #E0EAFF;
188
- @TD95: #EEF4FF;
189
- @TD98: #F5F8FF;
184
+ @TD10: #2d3282;
185
+ @TD20: #2d31a5;
186
+ @TD30: #3537cc;
187
+ @TD40: #444ce7;
188
+ @TD50: #6071f3;
189
+ @TD60: #7f98f9;
190
+ @TD70: #a3bbfd;
191
+ @TD80: #c7d7fe;
192
+ @TD90: #e0eaff;
193
+ @TD95: #eef4ff;
194
+ @TD98: #f5f8ff;
190
195
 
191
196
  /**
192
197
  * 业务E (Tertiary E)
193
198
  **/
194
199
 
195
- @TE10: #271B47;
200
+ @TE10: #271b47;
196
201
  @TE20: #382765;
197
- @TE30: #4F378F;
198
- @TE40: #6144AF;
199
- @TE50: #704ECB;
200
- @TE60: #7E58E3;
201
- @TE70: #A08AE8;
202
- @TE80: #BCAFEE;
203
- @TE90: #D4CDF4;
204
- @TE95: #EAE7F9;
205
- @TE98: #F5F3FC;
202
+ @TE30: #4f378f;
203
+ @TE40: #6144af;
204
+ @TE50: #704ecb;
205
+ @TE60: #7e58e3;
206
+ @TE70: #a08ae8;
207
+ @TE80: #bcafee;
208
+ @TE90: #d4cdf4;
209
+ @TE95: #eae7f9;
210
+ @TE98: #f5f3fc;
206
211
 
207
212
  /**
208
213
  * 业务F (Tertiary F)
209
214
  **/
210
215
 
211
- @TF10: #6E1876;
216
+ @TF10: #6e1876;
212
217
  @TF20: #821890;
213
- @TF30: #9F1AB0;
214
- @TF40: #BA24D5;
215
- @TF50: #D444F1;
216
- @TF60: #E477FA;
217
- @TF70: #EDAAFC;
218
- @TF80: #F6D0FE;
219
- @TF90: #FBE8FF;
220
- @TF95: #FDF4FF;
221
- @TF98: #FEFAFF;
218
+ @TF30: #9f1ab0;
219
+ @TF40: #ba24d5;
220
+ @TF50: #d444f1;
221
+ @TF60: #e477fa;
222
+ @TF70: #edaafc;
223
+ @TF80: #f6d0fe;
224
+ @TF90: #fbe8ff;
225
+ @TF95: #fdf4ff;
226
+ @TF98: #fefaff;
222
227
 
223
228
  /**
224
229
  * 业务G (Tertiary G)
225
230
  **/
226
231
 
227
232
  @TG10: #851651;
228
- @TG20: #9E155E;
229
- @TG30: #C01573;
230
- @TG40: #DC2590;
231
- @TG50: #EE46BC;
232
- @TG60: #F570C7;
233
- @TG70: #F9A7DF;
234
- @TG80: #FCCEEE;
235
- @TG90: #FCE7F6;
236
- @TG95: #FDF2FA;
237
- @TG98: #FEF6FB;
233
+ @TG20: #9e155e;
234
+ @TG30: #c01573;
235
+ @TG40: #dc2590;
236
+ @TG50: #ee46bc;
237
+ @TG60: #f570c7;
238
+ @TG70: #f9a7df;
239
+ @TG80: #fcceee;
240
+ @TG90: #fce7f6;
241
+ @TG95: #fdf2fa;
242
+ @TG98: #fef6fb;
238
243
 
239
244
  /**
240
245
  * 业务H (Tertiary H)
241
246
  **/
242
247
 
243
- @TH10: #713B11;
244
- @TH20: #85490D;
245
- @TH30: #A15B06;
246
- @TH40: #CA8403;
247
- @TH50: #EAA907;
248
- @TH60: #FAC414;
249
- @TH70: #FDE272;
250
- @TH80: #FEEE94;
251
- @TH90: #FDF7C3;
252
- @TH95: #FEFBE8;
253
- @TH98: #FEFDF0;
254
-
248
+ @TH10: #713b11;
249
+ @TH20: #85490d;
250
+ @TH30: #a15b06;
251
+ @TH40: #ca8403;
252
+ @TH50: #eaa907;
253
+ @TH60: #fac414;
254
+ @TH70: #fde272;
255
+ @TH80: #feee94;
256
+ @TH90: #fdf7c3;
257
+ @TH95: #fefbe8;
258
+ @TH98: #fefdf0;
255
259
 
256
260
  // 用css module的能力,将less变量输出给js,供js文件中使用
257
261
  :export {
@@ -337,6 +341,12 @@
337
341
  BG97: @BG97;
338
342
  BG100: @BG100;
339
343
  SHADOW_L: @shadow-L;
344
+ SHADOW_BODY_TOP_LEFT: @shadow-body-top-left;
345
+ SHADOW_XS: @shadow-xs;
346
+ SHADOW_SM: @shadow-sm;
347
+ SHADOW_MD: @shadow-md;
348
+ SHADOW_LG: @shadow-lg;
349
+ SHADOW_XL: @shadow-xl;
340
350
  TA10: @TA10;
341
351
  TA20: @TA20;
342
352
  TA30: @TA30;
@@ -347,7 +357,7 @@
347
357
  TA80: @TA80;
348
358
  TA90: @TA90;
349
359
  TA95: @TA95;
350
- TA98: @TA98;
360
+ TA98: @TA98;
351
361
 
352
362
  TB10: @TB10;
353
363
  TB20: @TB20;
@@ -359,7 +369,7 @@
359
369
  TB80: @TB80;
360
370
  TB90: @TB90;
361
371
  TB95: @TB95;
362
- TB98: @TB98;
372
+ TB98: @TB98;
363
373
 
364
374
  TC10: @TC10;
365
375
  TC20: @TC20;
@@ -371,7 +381,7 @@
371
381
  TC80: @TC80;
372
382
  TC90: @TC90;
373
383
  TC95: @TC95;
374
- TC98: @TC98;
384
+ TC98: @TC98;
375
385
 
376
386
  TD10: @TD10;
377
387
  TD20: @TD20;
@@ -383,7 +393,7 @@
383
393
  TD80: @TD80;
384
394
  TD90: @TD90;
385
395
  TD95: @TD95;
386
- TD98: @TD98;
396
+ TD98: @TD98;
387
397
 
388
398
  TE10: @TE10;
389
399
  TE20: @TE20;
@@ -395,7 +405,7 @@
395
405
  TE80: @TE80;
396
406
  TE90: @TE90;
397
407
  TE95: @TE95;
398
- TE98: @TE98;
408
+ TE98: @TE98;
399
409
 
400
410
  TF10: @TF10;
401
411
  TF20: @TF20;
@@ -407,7 +417,7 @@
407
417
  TF80: @TF80;
408
418
  TF90: @TF90;
409
419
  TF95: @TF95;
410
- TF98: @TF98;
420
+ TF98: @TF98;
411
421
 
412
422
  TG10: @TG10;
413
423
  TG20: @TG20;
@@ -419,7 +429,7 @@
419
429
  TG80: @TG80;
420
430
  TG90: @TG90;
421
431
  TG95: @TG95;
422
- TG98: @TG98;
432
+ TG98: @TG98;
423
433
 
424
434
  TH10: @TH10;
425
435
  TH20: @TH20;
@@ -431,5 +441,5 @@
431
441
  TH80: @TH80;
432
442
  TH90: @TH90;
433
443
  TH95: @TH95;
434
- TH98: @TH98;
435
- }
444
+ TH98: @TH98;
445
+ }
@@ -82,7 +82,13 @@ interface CssExports {
82
82
  'SC90': string;
83
83
  'SC95': string;
84
84
  'SC98': string;
85
+ 'SHADOW_BODY_TOP_LEFT': string;
85
86
  'SHADOW_L': string;
87
+ 'SHADOW_LG': string;
88
+ 'SHADOW_MD': string;
89
+ 'SHADOW_SM': string;
90
+ 'SHADOW_XL': string;
91
+ 'SHADOW_XS': string;
86
92
  'TA10': string;
87
93
  'TA20': string;
88
94
  'TA30': string;
@@ -0,0 +1,84 @@
1
+ import * as React from 'react';
2
+ import { AvatarProps as antdAvatarProps } from 'antd/es/avatar/avatar';
3
+ import Group from 'antd/es/avatar/group';
4
+ export type { GroupProps } from 'antd/es/avatar/group';
5
+ declare type TSize = 'large' | 'middle' | 'small' | number;
6
+ export interface IAvatarProps extends Omit<antdAvatarProps, 'size'> {
7
+ /**
8
+ * @description 指定头像的形状
9
+ * @type 'circle' |'square'
10
+ * @default circle
11
+ */
12
+ shape?: 'circle' | 'square';
13
+ /**
14
+ * @description 字符类型距离左右两侧边界单位像素
15
+ * @type number
16
+ * @default 4
17
+ */
18
+ gap?: number;
19
+ /**
20
+ * @description 图片头像的资源地址或者图片元素
21
+ * @type string | ReactNode
22
+ * @default -
23
+ */
24
+ src?: React.ReactNode;
25
+ /**
26
+ * @description 设置图片类头像响应式资源地址
27
+ * @type string
28
+ * @default -
29
+ */
30
+ srcSet?: string;
31
+ /**
32
+ * @description 图片是否允许拖动
33
+ * @type boolean | 'true' | 'false'
34
+ * @default -
35
+ */
36
+ draggable?: boolean;
37
+ /**
38
+ * @description 设置头像的自定义图标
39
+ * @type ReactNode
40
+ * @default -
41
+ */
42
+ icon?: React.ReactNode;
43
+ /**
44
+ * @description 图像无法显示时的替代文本
45
+ * @type string
46
+ * @default -
47
+ */
48
+ alt?: string;
49
+ /**
50
+ * @description CORS属性设置
51
+ * @type '' | 'anonymous' | 'use-credentials'
52
+ * @default -
53
+ */
54
+ crossOrigin?: '' | 'anonymous' | 'use-credentials';
55
+ /**
56
+ * @description 点击事件
57
+ * @type (e?: React.MouseEvent<HTMLElement>) => void
58
+ * @default -
59
+ */
60
+ onClick?: (e?: React.MouseEvent<HTMLElement>) => void;
61
+ /**
62
+ * @description 图片加载失败的事件,返回false会关闭组件默认的fallback行为
63
+ * @type () => boolean
64
+ * @default -
65
+ */
66
+ onError?: () => boolean;
67
+ /**
68
+ * @description 头像的大小,可以显示的设置数字或者预设的大小值
69
+ * @type 'large' | 'middle' | 'small' | number
70
+ * @default middle
71
+ */
72
+ size?: TSize;
73
+ /**
74
+ * @description 是否展示完整的children内容,如果children为string则默认截取第一个单词作为头像展示
75
+ * @type boolean
76
+ * @default false
77
+ */
78
+ showFullValue?: boolean;
79
+ }
80
+ interface ICompoundedComponent extends React.ForwardRefExoticComponent<IAvatarProps & React.RefAttributes<HTMLElement>> {
81
+ Group: typeof Group;
82
+ }
83
+ declare const _default: ICompoundedComponent;
84
+ export default _default;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var React = _interopRequireWildcard(require("react"));
11
+
12
+ var _avatar = _interopRequireDefault(require("antd/es/avatar/avatar"));
13
+
14
+ var _classnames = _interopRequireDefault(require("classnames"));
15
+
16
+ var _excluded = ["size", "showFullValue", "children"];
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
24
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
25
+
26
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
27
+
28
+ var ZERO = 0;
29
+
30
+ var Avatar = function Avatar(props) {
31
+ var _props$size = props.size,
32
+ size = _props$size === void 0 ? 'middle' : _props$size,
33
+ _props$showFullValue = props.showFullValue,
34
+ showFullValue = _props$showFullValue === void 0 ? false : _props$showFullValue,
35
+ children = props.children,
36
+ restProps = _objectWithoutProperties(props, _excluded);
37
+
38
+ var getSizeClass = function getSizeClass(avatarSize) {
39
+ if (['large', 'small', 'mini'].includes("".concat(avatarSize))) {
40
+ return (0, _classnames.default)('ald-avatar', "ald-avatar-".concat(avatarSize));
41
+ }
42
+
43
+ return (0, _classnames.default)('ald-avatar', 'ald-avatar-middle');
44
+ };
45
+
46
+ var getChildren = function getChildren() {
47
+ if (!showFullValue && typeof children === 'string') {
48
+ return children[ZERO].toLocaleUpperCase();
49
+ }
50
+
51
+ return children;
52
+ };
53
+
54
+ return /*#__PURE__*/React.createElement(_avatar.default, Object.assign({
55
+ size: typeof size === 'number' ? size : undefined,
56
+ className: getSizeClass(size)
57
+ }, restProps), getChildren());
58
+ };
59
+
60
+ var _default = Avatar;
61
+ exports.default = _default;