@aloudata/aloudata-design 1.10.14 → 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/Button/index.d.ts +3 -4
  2. package/dist/Button/index.js +7 -20
  3. package/dist/Button/style/size.less +21 -8
  4. package/dist/Button/style/type.less +61 -33
  5. package/dist/Button/style/variables.less +229 -44
  6. package/dist/Checkbox/style/index.less +111 -114
  7. package/dist/Dropdown/index.d.ts +1 -2
  8. package/dist/Dropdown/style/index.less +70 -107
  9. package/dist/Icon/components/AlertTriangleDuotone.d.ts +1 -1
  10. package/dist/Icon/components/AlertTriangleLine.d.ts +11 -0
  11. package/dist/Icon/components/AlertTriangleLine.js +35 -0
  12. package/dist/Icon/components/ArrowDownFill.d.ts +11 -0
  13. package/dist/Icon/components/ArrowDownFill.js +35 -0
  14. package/dist/Icon/components/AttentionCircleFill.d.ts +11 -0
  15. package/dist/Icon/components/AttentionCircleFill.js +35 -0
  16. package/dist/Icon/components/AttentionTriangleFill.d.ts +11 -0
  17. package/dist/Icon/components/AttentionTriangleFill.js +35 -0
  18. package/dist/Icon/components/AttentionTriangleLightLine.d.ts +11 -0
  19. package/dist/Icon/components/AttentionTriangleLightLine.js +35 -0
  20. package/dist/Icon/components/CancelCircleDuotone.d.ts +1 -1
  21. package/dist/Icon/components/CheckCircleDuotone.d.ts +1 -1
  22. package/dist/Icon/components/CheckCircleFill.d.ts +11 -0
  23. package/dist/Icon/components/CheckCircleFill.js +35 -0
  24. package/dist/Icon/components/CheckCircleLightLine.d.ts +11 -0
  25. package/dist/Icon/components/CheckCircleLightLine.js +38 -0
  26. package/dist/Icon/components/CheckLightLine.d.ts +11 -0
  27. package/dist/Icon/components/CheckLightLine.js +35 -0
  28. package/dist/Icon/components/ChevronDownLine.d.ts +1 -1
  29. package/dist/Icon/components/ChevronLeftLine.d.ts +1 -1
  30. package/dist/Icon/components/ChevronRightLine.d.ts +1 -1
  31. package/dist/Icon/components/CircleLightLine.d.ts +11 -0
  32. package/dist/Icon/components/CircleLightLine.js +38 -0
  33. package/dist/Icon/components/CloseCircleFill.d.ts +11 -0
  34. package/dist/Icon/components/CloseCircleFill.js +35 -0
  35. package/dist/Icon/components/CloseLLine.d.ts +1 -1
  36. package/dist/Icon/components/CloseLightLine.d.ts +11 -0
  37. package/dist/Icon/components/CloseLightLine.js +35 -0
  38. package/dist/Icon/components/CloseMLine.d.ts +1 -1
  39. package/dist/Icon/components/DragLine.d.ts +1 -1
  40. package/dist/Icon/components/Ellipsis.d.ts +11 -0
  41. package/dist/Icon/components/Ellipsis.js +35 -0
  42. package/dist/Icon/components/EyeOffLine.d.ts +1 -1
  43. package/dist/Icon/components/EyeOnLine.d.ts +1 -1
  44. package/dist/Icon/components/FoldDownFill.d.ts +1 -1
  45. package/dist/Icon/components/FoldUpFill.d.ts +1 -1
  46. package/dist/Icon/components/InfoCircleDuotone.d.ts +1 -1
  47. package/dist/Icon/components/InfoCircleLine.d.ts +1 -1
  48. package/dist/Icon/components/InformationCircleFill.d.ts +11 -0
  49. package/dist/Icon/components/InformationCircleFill.js +35 -0
  50. package/dist/Icon/components/InformationCircleLightLine.d.ts +11 -0
  51. package/dist/Icon/components/InformationCircleLightLine.js +38 -0
  52. package/dist/Icon/components/Loading2Line.d.ts +1 -1
  53. package/dist/Icon/components/LoadingDuotone.d.ts +11 -0
  54. package/dist/Icon/components/LoadingDuotone.js +39 -0
  55. package/dist/Icon/components/LoadingLine.d.ts +1 -1
  56. package/dist/Icon/components/MoreVerticalLine.d.ts +1 -1
  57. package/dist/Icon/components/SearchLine.d.ts +1 -1
  58. package/dist/Icon/components/TriangleLightLine.d.ts +11 -0
  59. package/dist/Icon/components/TriangleLightLine.js +35 -0
  60. package/dist/Icon/index.d.ts +16 -3
  61. package/dist/Icon/index.js +16 -2
  62. package/dist/Icon/svg/Loading-duotone.svg +6 -0
  63. package/dist/Icon/svg/alert-triangle-duotone.svg +3 -1
  64. package/dist/Icon/svg/alert-triangle-line.svg +5 -0
  65. package/dist/Icon/svg/arrow-down-fill.svg +5 -0
  66. package/dist/Icon/svg/attention-circle-fill.svg +5 -0
  67. package/dist/Icon/svg/attention-triangle-fill.svg +5 -0
  68. package/dist/Icon/svg/attention-triangle-light-line.svg +5 -0
  69. package/dist/Icon/svg/cancel-circle-duotone.svg +7 -3
  70. package/dist/Icon/svg/check-circle-duotone.svg +6 -2
  71. package/dist/Icon/svg/check-circle-fill.svg +5 -0
  72. package/dist/Icon/svg/check-circle-light-line.svg +8 -0
  73. package/dist/Icon/svg/check-light-line.svg +5 -0
  74. package/dist/Icon/svg/chevron-down-line.svg +6 -4
  75. package/dist/Icon/svg/chevron-left-line.svg +6 -4
  76. package/dist/Icon/svg/chevron-right-line.svg +6 -4
  77. package/dist/Icon/svg/circle-light-line.svg +9 -0
  78. package/dist/Icon/svg/close-L-line.svg +11 -9
  79. package/dist/Icon/svg/close-circle-fill.svg +5 -0
  80. package/dist/Icon/svg/close-light-line.svg +5 -0
  81. package/dist/Icon/svg/close-m-line.svg +6 -4
  82. package/dist/Icon/svg/drag-line.svg +6 -4
  83. package/dist/Icon/svg/ellipsis.svg +5 -0
  84. package/dist/Icon/svg/eye-off-line.svg +6 -4
  85. package/dist/Icon/svg/eye-on-line.svg +14 -8
  86. package/dist/Icon/svg/fold-down-fill.svg +7 -6
  87. package/dist/Icon/svg/fold-up-fill.svg +7 -6
  88. package/dist/Icon/svg/info-circle-duotone.svg +4 -2
  89. package/dist/Icon/svg/info-circle-line.svg +3 -1
  90. package/dist/Icon/svg/information-circle-fill.svg +5 -0
  91. package/dist/Icon/svg/information-circle-light-line.svg +9 -0
  92. package/dist/Icon/svg/loading-2-line.svg +4 -2
  93. package/dist/Icon/svg/loading-line.svg +6 -4
  94. package/dist/Icon/svg/more-vertical-line.svg +6 -4
  95. package/dist/Icon/svg/search-line.svg +6 -4
  96. package/dist/Icon/svg/triangle-light-line.svg +5 -0
  97. package/dist/IconButton/index.d.ts +2 -2
  98. package/dist/IconButton/index.js +8 -19
  99. package/dist/IconButton/style/index.less +49 -25
  100. package/dist/Input/components/Input/index.js +18 -2
  101. package/dist/Input/components/Password/index.d.ts +0 -5
  102. package/dist/Input/components/Password/index.js +10 -10
  103. package/dist/Input/components/TextArea/index.js +15 -2
  104. package/dist/Input/index.d.ts +2 -5
  105. package/dist/Input/index.js +1 -3
  106. package/dist/Input/style/index.less +4 -565
  107. package/dist/Input/style/reset.less +22 -0
  108. package/dist/Input/style/size.less +82 -0
  109. package/dist/Input/style/status.less +105 -0
  110. package/dist/MemberPicker/style/index.less +2 -2
  111. package/dist/Menu/index.js +6 -9
  112. package/dist/Menu/style/index.less +72 -133
  113. package/dist/Modal/index.d.ts +1 -1
  114. package/dist/Modal/index.js +32 -43
  115. package/dist/Modal/style/index.less +3 -191
  116. package/dist/Modal/style/modal.less +132 -0
  117. package/dist/Modal/style/modalConfirm.less +100 -0
  118. package/dist/Pagination/index.js +4 -2
  119. package/dist/Pagination/style/index.less +11 -4
  120. package/dist/Popconfirm/index.js +8 -7
  121. package/dist/Popconfirm/style/index.less +16 -6
  122. package/dist/Popover/style/index.less +29 -29
  123. package/dist/Radio/components/Group/index.js +3 -5
  124. package/dist/Radio/components/Radio/index.js +2 -1
  125. package/dist/Radio/interface/radioGroup.d.ts +1 -1
  126. package/dist/Radio/style/index.less +69 -56
  127. package/dist/Select/components/{MultipleOption.d.ts → Option.d.ts} +2 -2
  128. package/dist/Select/components/{MultipleOption.js → Option.js} +14 -11
  129. package/dist/Select/components/SingleOption.d.ts +2 -2
  130. package/dist/Select/components/SingleOption.js +3 -1
  131. package/dist/Select/index.d.ts +5 -0
  132. package/dist/Select/index.js +26 -40
  133. package/dist/Select/style/index.less +96 -76
  134. package/dist/Select/style/layout.less +41 -0
  135. package/dist/Select/style/option.less +42 -3
  136. package/dist/Select/style/selectDropdown.less +17 -0
  137. package/dist/Select/style/size.less +95 -82
  138. package/dist/Select/style/status.less +69 -21
  139. package/dist/Select/style/variables.less +8 -15
  140. package/dist/Spin/CustomIcon/index.d.ts +3 -0
  141. package/dist/Spin/CustomIcon/index.js +20 -15
  142. package/dist/Spin/CustomIcon/index.less +32 -105
  143. package/dist/Spin/index.d.ts +2 -0
  144. package/dist/Spin/index.js +8 -2
  145. package/dist/Spin/style/index.less +9 -1
  146. package/dist/Switch/index.d.ts +1 -1
  147. package/dist/Switch/style/index.less +130 -56
  148. package/dist/Table/style/index.less +16 -8
  149. package/dist/Tabs/index.d.ts +2 -2
  150. package/dist/Tabs/index.js +4 -4
  151. package/dist/Tabs/style/index.less +20 -16
  152. package/dist/TextLink/index.d.ts +44 -0
  153. package/dist/TextLink/index.js +25 -0
  154. package/dist/TextLink/style/index.d.ts +2 -0
  155. package/dist/TextLink/style/index.js +2 -0
  156. package/dist/TextLink/style/index.less +9 -0
  157. package/dist/TextLink/style/size.less +37 -0
  158. package/dist/TextLink/style/type.less +44 -0
  159. package/dist/Tree/style/var.less +1 -1
  160. package/dist/ald.min.css +1 -1
  161. package/dist/index.d.ts +2 -1
  162. package/dist/index.js +1 -1
  163. package/dist/index.less +1 -0
  164. package/dist/message/index.js +15 -14
  165. package/dist/message/style/color.less +22 -41
  166. package/dist/message/style/index.less +15 -16
  167. package/dist/notification/demo/index.js +1 -0
  168. package/dist/notification/index.js +18 -18
  169. package/dist/notification/style/index.less +12 -6
  170. package/dist/style/index.less +1 -0
  171. package/dist/style/themes/default/default.less +1 -1
  172. package/dist/style/themes/default/index.less +3 -3
  173. package/dist/style/themes/default/scrollBar.less +1 -1
  174. package/dist/style/var/default.css +1334 -0
  175. package/package.json +4 -3
  176. package/dist/Icon/components/Icon.d.ts +0 -32
  177. package/dist/Icon/components/Icon.js +0 -25
  178. package/dist/Input/components/Group/index.d.ts +0 -18
  179. package/dist/Input/components/Group/index.js +0 -19
  180. package/dist/Menu/style/dropdown.less +0 -61
  181. package/dist/Select/style/multiple.less +0 -55
  182. package/dist/Select/style/single.less +0 -44
@@ -1,12 +1,12 @@
1
1
  import type { ButtonProps as AntdButtonProps, ButtonType as AntdButtonType } from 'antd/lib/button';
2
2
  import React from 'react';
3
3
  export declare const btnPrefix = "ald-btn";
4
- export type ButtonType = 'primary' | 'secondary' | 'dangerous' | 'text' | 'link';
4
+ export type ButtonType = 'primary' | 'secondary' | 'dangerous' | 'text' | 'inverse';
5
5
  export type Size = 'small' | 'middle' | 'large';
6
6
  export interface IButtonProps extends Omit<AntdButtonProps, 'type' | 'dangerous' | 'shape' | 'icon' | 'href' | 'target' | 'onClick' | 'loading'> {
7
7
  /**
8
8
  * @description 类型
9
- * @type 'primary' | 'secondary' | 'dangerous' | 'text' | 'link'
9
+ * @type 'primary' | 'secondary' | 'dangerous' | 'text' |'inverse'
10
10
  * @default primary
11
11
  */
12
12
  type?: ButtonType;
@@ -49,9 +49,8 @@ export interface IButtonProps extends Omit<AntdButtonProps, 'type' | 'dangerous'
49
49
  export declare function getButtonType(buttonType: ButtonType): AntdButtonType;
50
50
  export declare function getDangerStatus(buttonType: ButtonType): boolean;
51
51
  export declare function getButtonSizeClass(ButtonSize: Size): string;
52
- export declare function getIconSize(ButtonSize: Size): number;
53
52
  export declare function getShape(ButtonShape: 'circle' | 'default'): 'circle' | 'default';
54
- export declare const setIcon: (iconNode: React.ReactElement, size: Size, loading: boolean | {
53
+ export declare const setIcon: (iconNode: React.ReactElement, loading: boolean | {
55
54
  delay?: number | undefined;
56
55
  }) => React.JSX.Element;
57
56
  declare function Button(props: IButtonProps): React.JSX.Element;
@@ -15,18 +15,15 @@ import React, { useContext } from 'react';
15
15
  import { ConfigContext } from "../ConfigProvider";
16
16
  import SizeContext from "../ConfigProvider/sizeContext";
17
17
  import { LoadingLine } from "../Icon";
18
- var ICON_LARGE = 24;
19
- var ICON_MIDDLE = 20;
20
- var ICON_SMALL = 16;
21
18
  export var btnPrefix = 'ald-btn';
22
19
  export function getButtonType(buttonType) {
23
- if (!['primary', 'secondary', 'dangerous', 'text', 'link'].includes(buttonType)) {
20
+ if (!['primary', 'secondary', 'dangerous', 'text', 'inverse'].includes(buttonType)) {
24
21
  return 'default';
25
22
  }
26
23
  if (buttonType === 'dangerous') {
27
- return 'primary';
24
+ return 'default';
28
25
  }
29
- if (buttonType === 'secondary') {
26
+ if (buttonType === 'secondary' || buttonType === 'inverse') {
30
27
  return 'default';
31
28
  }
32
29
  return buttonType;
@@ -40,35 +37,25 @@ export function getDangerStatus(buttonType) {
40
37
  export function getButtonSizeClass(ButtonSize) {
41
38
  return ['small', 'large'].includes(ButtonSize) ? "".concat(btnPrefix, "-").concat(ButtonSize) : "".concat(btnPrefix, "-middle");
42
39
  }
43
- export function getIconSize(ButtonSize) {
44
- if (ButtonSize === 'large') {
45
- return ICON_LARGE;
46
- }
47
- if (ButtonSize === 'small') {
48
- return ICON_SMALL;
49
- }
50
- return ICON_MIDDLE;
51
- }
52
40
  export function getShape(ButtonShape) {
53
41
  if (ButtonShape === 'circle') {
54
42
  return ButtonShape;
55
43
  }
56
44
  return 'default';
57
45
  }
58
- export var setIcon = function setIcon(iconNode, size, loading) {
46
+ export var setIcon = function setIcon(iconNode, loading) {
59
47
  if (iconNode) {
60
48
  var p = _objectSpread({
61
49
  className: '',
62
- size: ICON_LARGE,
63
50
  fill: 'currentColor'
64
51
  }, iconNode.props);
65
- p.size = getIconSize(size);
52
+ p.size = '1em';
66
53
  return /*#__PURE__*/React.cloneElement(iconNode, p);
67
54
  }
68
55
  if (loading) {
69
56
  return /*#__PURE__*/React.createElement(LoadingLine, {
70
57
  className: "ald-loading-spin",
71
- size: getIconSize(size),
58
+ size: '1em',
72
59
  color: "currentColor"
73
60
  });
74
61
  }
@@ -99,7 +86,7 @@ function Button(props) {
99
86
  var size = compactSize || customSize || contentSize || 'middle';
100
87
  return /*#__PURE__*/React.createElement(AntdButton, _extends({}, rest, {
101
88
  disabled: loading ? true : disabled,
102
- icon: setIcon(icon, size, loading),
89
+ icon: setIcon(icon, loading),
103
90
  type: getButtonType(type),
104
91
  className: classNames(btnPrefix, "".concat(btnPrefix, "-").concat(type), className, getButtonSizeClass(size), compactItemClassnames),
105
92
  danger: getDangerStatus(type),
@@ -2,9 +2,9 @@
2
2
  &-large {
3
3
  min-width: auto;
4
4
  height: @button-height-large;
5
- padding: @button-border-padding-large;
5
+ padding: @button-padding-large;
6
6
  font-size: @button-text-size-large;
7
- line-height: 24px;
7
+ line-height: @button-line-height-large;
8
8
  border-radius: @button-border-radius-large;
9
9
 
10
10
  &.ant-btn-icon-only {
@@ -22,19 +22,24 @@
22
22
  border-radius: 50%;
23
23
  }
24
24
 
25
- gap: @button-left-icon-margin-right-large;
25
+ gap: @button-gap-large;
26
26
 
27
27
  &:not(.ant-btn-circle):not(.ant-btn-icon-only):not(.ald-btn-link) {
28
28
  min-width: @button-text-min-width-large;
29
29
  }
30
+
31
+ svg {
32
+ font-size: @button-line-height-large;
33
+ }
30
34
  }
31
35
 
32
36
  &-middle {
33
37
  min-width: auto;
34
38
  height: @button-height-middle;
35
- padding: @button-border-padding-middle;
39
+ padding: @button-padding-middle;
36
40
  font-size: @button-text-size-middle;
37
41
  border-radius: @button-border-radius-middle;
42
+ line-height: @button-line-height-middle;
38
43
 
39
44
  &.ant-btn-icon-only {
40
45
  min-width: @button-height-middle;
@@ -51,18 +56,22 @@
51
56
  border-radius: 50%;
52
57
  }
53
58
 
54
- gap: @button-left-icon-margin-right-middle;
59
+ gap: @button-gap-middle;
55
60
 
56
61
  &:not(.ant-btn-circle):not(.ant-btn-icon-only):not(.ald-btn-link) {
57
62
  min-width: @button-text-min-width-middle;
58
63
  }
64
+
65
+ svg {
66
+ font-size: @button-line-height-middle;
67
+ }
59
68
  }
60
69
 
61
70
  &-small {
62
71
  height: @button-height-small;
63
- padding: @button-border-padding-small;
72
+ padding: @button-padding-small;
64
73
  font-size: @button-text-size-small;
65
- line-height: 22px;
74
+ line-height: @button-line-height-small;
66
75
  border-radius: @button-border-radius-small;
67
76
 
68
77
  &.ant-btn-icon-only {
@@ -80,10 +89,14 @@
80
89
  border-radius: 50%;
81
90
  }
82
91
 
83
- gap: @button-left-icon-margin-right-small;
92
+ gap: @button-gap-small;
84
93
 
85
94
  &:not(.ant-btn-circle):not(.ant-btn-icon-only):not(.ald-btn-link) {
86
95
  min-width: @button-text-min-width-small;
87
96
  }
97
+
98
+ svg {
99
+ font-size: @button-line-height-small;
100
+ }
88
101
  }
89
102
  }
@@ -40,7 +40,12 @@
40
40
  box-shadow: none;
41
41
  }
42
42
 
43
- &:hover,
43
+ &:hover {
44
+ color: @button-primary-color-hover;
45
+ background-color: @button-primary-bg-color-hover;
46
+ border-color: @button-primary-bg-color-hover;
47
+ }
48
+
44
49
  &:active {
45
50
  color: @button-primary-color-active;
46
51
  background-color: @button-primary-bg-color-active;
@@ -78,7 +83,12 @@
78
83
  box-shadow: unset;
79
84
  }
80
85
 
81
- &:hover:not(:disabled),
86
+ &:hover:not(:disabled) {
87
+ color: @button-dangerous-color-hover;
88
+ background-color: @button-dangerous-bg-color-hover;
89
+ border-color: @button-dangerous-bg-color-hover;
90
+ }
91
+
82
92
  &:active:not(:disabled) {
83
93
  color: @button-dangerous-color-active;
84
94
  background-color: @button-dangerous-bg-color-active;
@@ -125,7 +135,12 @@
125
135
  box-shadow: none;
126
136
  }
127
137
 
128
- &:hover,
138
+ &:hover {
139
+ color: @button-secondary-color-hover;
140
+ background-color: @button-secondary-bg-color-hover;
141
+ border-color: @button-secondary-border-color-hover;
142
+ }
143
+
129
144
  &:active {
130
145
  color: @button-secondary-color-active;
131
146
  background-color: @button-secondary-bg-color-active;
@@ -136,7 +151,7 @@
136
151
  &.ant-btn-loading {
137
152
  color: @button-secondary-color-disable;
138
153
  background-color: @button-secondary-bg-color-disable;
139
- border-color: @button-secondary-border-color;
154
+ border-color: @button-secondary-border-color-disable;
140
155
  cursor: default;
141
156
  opacity: 0.5;
142
157
 
@@ -145,7 +160,7 @@
145
160
  &:active {
146
161
  color: @button-secondary-color-disable;
147
162
  background-color: @button-secondary-bg-color-disable;
148
- border-color: @button-secondary-border-color;
163
+ border-color: @button-secondary-border-color-disable;
149
164
  }
150
165
  }
151
166
  }
@@ -153,26 +168,35 @@
153
168
  &-text {
154
169
  color: @button-text-color;
155
170
  background-color: @button-text-bg-color;
156
- border: none;
171
+ border: 1px solid;
172
+ border-color: @button-text-border-color;
157
173
  box-shadow: none;
158
174
 
159
- &:focus,
160
- &:active {
175
+ &:focus {
161
176
  color: @button-text-color;
162
177
  background-color: @button-text-bg-color;
178
+ border-color: @button-text-border-color;
163
179
  box-shadow: none;
164
180
  }
165
181
 
166
- &:hover,
167
- &.ant-btn-loading {
182
+ &:hover {
183
+ color: @button-text-color-hover;
184
+ background-color: @button-text-bg-color-hover;
185
+ border-color: @button-text-border-color-hover;
186
+ }
187
+
188
+ &:active {
168
189
  color: @button-text-color-active;
169
190
  background-color: @button-text-bg-color-active;
170
- mix-blend-mode: multiply;
191
+ border-color: @button-text-border-color-active;
192
+ box-shadow: none;
171
193
  }
172
194
 
173
- &[disabled] {
195
+ &[disabled],
196
+ &.ant-btn-loading {
174
197
  color: @button-text-color-disable;
175
198
  background-color: @button-text-bg-color-disable;
199
+ border-color: @button-text-border-color-disable;
176
200
  cursor: default;
177
201
  opacity: 0.5;
178
202
 
@@ -181,48 +205,52 @@
181
205
  &:active {
182
206
  color: @button-text-color-disable;
183
207
  background-color: @button-text-bg-color-disable;
208
+ border-color: @button-text-border-color-disable;
184
209
  }
185
210
  }
186
211
  }
187
212
 
188
- &-link {
189
- color: @button-link-color;
190
- font-weight: 400;
191
- //text-shadow: @text-shadow;
192
- background-color: @button-link-bg-color;
193
- border-color: @button-link-bg-color;
213
+ &-inverse {
214
+ color: @button-inverse-color;
215
+ background-color: @button-inverse-bg-color;
216
+ border: 1px solid;
217
+ border-color: @button-inverse-border-color;
194
218
  box-shadow: none;
195
- padding: 0 !important;
196
219
 
197
220
  &:focus {
198
- color: @button-link-color;
199
- //text-shadow: @text-shadow;
200
- background-color: @button-link-bg-color;
201
- border-color: @button-link-bg-color;
221
+ color: @button-inverse-color;
222
+ background-color: @button-inverse-bg-color;
223
+ border-color: @button-inverse-border-color;
202
224
  box-shadow: none;
203
225
  }
204
226
 
205
- &:hover,
227
+ &:hover {
228
+ color: @button-inverse-color-hover;
229
+ background-color: @button-inverse-bg-color-hover;
230
+ border-color: @button-inverse-border-color-hover;
231
+ }
232
+
206
233
  &:active {
207
- color: @button-link-color-active;
208
- background-color: @button-link-bg-color-active;
209
- border-color: @button-link-bg-color-active;
234
+ color: @button-inverse-color-active;
235
+ background-color: @button-inverse-bg-color-active;
236
+ border-color: @button-inverse-border-color-active;
237
+ box-shadow: none;
210
238
  }
211
239
 
212
240
  &[disabled],
213
241
  &.ant-btn-loading {
214
- color: @button-link-color-disable;
215
- background-color: @button-link-bg-color-disable;
216
- border-color: @button-link-bg-color-disable;
242
+ color: @button-inverse-color-disable;
243
+ background-color: @button-inverse-bg-color-disable;
244
+ border-color: @button-inverse-border-color-disable;
217
245
  cursor: default;
218
246
  opacity: 0.5;
219
247
 
220
248
  &:hover,
221
249
  &:focus,
222
250
  &:active {
223
- color: @button-link-color-disable;
224
- background-color: @button-link-bg-color-disable;
225
- border-color: @button-link-bg-color-disable;
251
+ color: @button-inverse-color-disable;
252
+ background-color: @button-inverse-bg-color-disable;
253
+ border-color: @button-inverse-border-color-disable;
226
254
  }
227
255
  }
228
256
  }
@@ -5,65 +5,250 @@
5
5
  /** size控制 **/
6
6
  @button-height-large: 36px;
7
7
  @button-text-size-large: 16px;
8
- @button-border-radius-large: 4px;
9
- @button-border-padding-large: 5px 15px;
10
- @button-left-icon-margin-right-large: 8px;
8
+ @button-border-radius-large: var(--alias-radius-100, 8px);
9
+ @button-padding-large: var(--alias-padding-75-minus-1, 6px)
10
+ var(--alias-padding-150-minus-1, 12px);
11
+ @button-line-height-large: 24px;
12
+ @button-gap-large: 8px;
11
13
  @button-text-min-width-large: 96px;
12
14
 
13
15
  @button-height-middle: 32px;
14
- @button-text-size-middle: 13px;
15
- @button-border-radius-middle: 2px;
16
- @button-border-padding-middle: 5px 11px;
17
- @button-left-icon-margin-right-middle: 4px;
16
+ @button-text-size-middle: 14px;
17
+ @button-border-radius-middle: var(--alias-radius-75, 6px);
18
+ @button-padding-middle: var(--alias-padding-75-minus-1, 6px)
19
+ var(--alias-padding-150-minus-1, 12px);
20
+ @button-line-height-middle: 20px;
21
+ @button-gap-middle: 4px;
18
22
  @button-text-min-width-middle: 76px;
19
23
 
20
24
  @button-height-small: 28px;
21
25
  @button-text-size-small: 12px;
22
26
  @button-border-radius-small: 2px;
23
- @button-border-padding-small: 5px 7px;
24
- @button-left-icon-margin-right-small: 4px;
27
+ @button-padding-small: var(--alias-padding-75-minus-1, 6px)
28
+ var(--alias-padding-150-minus-1, 12px);
29
+ @button-line-height-small: 16px;
30
+ @button-gap-small: var(--alias-radius-50, 4px);
25
31
  @button-text-min-width-small: 64px;
26
32
 
27
33
  // @button-height-mini: 24px;
28
34
  // @button-text-size-mini: 12px;
29
35
  // @button-border-radius-mini: 4px;
30
- // @button-border-padding-mini: 0 7px;
31
- // @button-left-icon-margin-right-mini: 4px;
36
+ // @button-padding-mini: 0 7px;
37
+ // @button-gap-mini: 4px;
32
38
 
33
- /**** type控制 ****/
34
- @button-primary-bg-color: @B40;
35
- @button-primary-bg-color-active: @B30;
36
- @button-primary-bg-color-disable: @B40;
37
- @button-primary-color: @ND0;
38
- @button-primary-color-active: @ND0;
39
- @button-primary-color-disable: @ND0;
39
+ /**** primary按钮 ****/
40
+ // bg color
41
+ @button-primary-bg-color:var(--alias-colors-bg-accent-blue-stronger-default, #126FDD);
42
+ @button-primary-bg-color-hover: var(
43
+ --alias-colors-bg-accent-blue-stronger-hover,
44
+ #0f59b1
45
+ );
46
+ @button-primary-bg-color-active: var(
47
+ --alias-colors-bg-accent-blue-stronger-press,
48
+ #0b4385
49
+ );
50
+ @button-primary-bg-color-disable: var(
51
+ --alias-colors-bg-disabled,
52
+ rgba(0, 0, 0, 0.05)
53
+ );
54
+ // text color
55
+ @button-primary-color: var(--alias-colors-text-inverse-strong, #fff);
56
+ @button-primary-color-hover: var(--alias-colors-text-inverse-strong, #fff);
57
+ @button-primary-color-active: var(--alias-colors-text-inverse-strong, #fff);
58
+ @button-primary-color-disable: var(
59
+ --alias-colors-text-disabled,
60
+ rgba(0, 0, 0, 0.25)
61
+ );
62
+ // border color
63
+ @button-primary-border-color: var(
64
+ --alias-colors-border-transp,
65
+ rgba(0, 0, 0, 0)
66
+ );
67
+ @button-primary-border-color-hover: var(
68
+ --alias-colors-border-transp,
69
+ rgba(0, 0, 0, 0)
70
+ );
71
+ @button-primary-border-color-active: var(
72
+ --alias-colors-border-transp,
73
+ rgba(0, 0, 0, 0)
74
+ );
75
+ @button-primary-border-color-disable: var(
76
+ --alias-colors-border-transp,
77
+ rgba(0, 0, 0, 0)
78
+ );
40
79
 
41
- @button-dangerous-bg-color: @SC40;
42
- @button-dangerous-bg-color-active: @SC30;
43
- @button-dangerous-bg-color-disable: @SC40;
44
- @button-dangerous-color: @ND0;
45
- @button-dangerous-color-active: @ND0;
46
- @button-dangerous-color-disable: @ND0;
80
+ /*********** secondary按钮 ***********/
81
+ // bg color
82
+ @button-secondary-bg-color: var(
83
+ --alias-colors-bg-accent-gray-subtler-default,
84
+ #f9fafb
85
+ );
86
+ @button-secondary-bg-color-hover: var(
87
+ --alias-colors-bg-accent-gray-subtler-default,
88
+ #f9fafb
89
+ );
90
+ @button-secondary-bg-color-active: var(
91
+ --alias-colors-bg-accent-gray-subtler-press,
92
+ #e5e7eb
93
+ );
94
+ @button-secondary-bg-color-disable: var(
95
+ --alias-colors-bg-disabled,
96
+ rgba(0, 0, 0, 0.05)
97
+ );
98
+ // text color
99
+ @button-secondary-color: var(--alias-colors-text-default, #1f2937);
100
+ @button-secondary-color-hover: var(--alias-colors-text-default, #1f2937);
101
+ @button-secondary-color-active: var(--alias-colors-text-default, #1f2937);
102
+ @button-secondary-color-disable: var(
103
+ --alias-colors-text-disabled,
104
+ rgba(0, 0, 0, 0.25)
105
+ );
106
+ // border color
107
+ @button-secondary-border-color: var(
108
+ --alias-colors-border-accent-gray-subtle-default,
109
+ #d1d5db
110
+ );
111
+ @button-secondary-border-color-hover: var(
112
+ --alias-colors-border-accent-gray-subtle-hover,
113
+ #9ca3af
114
+ );
115
+ @button-secondary-border-color-active: var(
116
+ --alias-colors-border-accent-gray-subtle-default,
117
+ #d1d5db
118
+ );
119
+ @button-secondary-border-color-disable: var(
120
+ --alias-colors-border-transp,
121
+ rgba(0, 0, 0, 0)
122
+ );
47
123
 
48
- @button-secondary-bg-color: @BG100;
49
- @button-secondary-bg-color-active: @BG90;
50
- @button-secondary-bg-color-disable: @BG100;
51
- @button-secondary-color: @NL20;
52
- @button-secondary-color-active: @NL20;
53
- @button-secondary-color-disable: @NL20;
54
- @button-secondary-border-color: @BG60;
55
- @button-secondary-border-color-active: @BG60;
124
+ /*********** danger按钮 ***********/
125
+ // bg color
126
+ @button-dangerous-bg-color: var(
127
+ --alias-colors-bg-accent-red-stronger-default,
128
+ #dc2626
129
+ );
130
+ @button-dangerous-bg-color-hover: var(
131
+ --alias-colors-bg-accent-red-stronger-hover,
132
+ #b91c1c
133
+ );
134
+ @button-dangerous-bg-color-active: var(
135
+ --alias-colors-bg-accent-red-stronger-press,
136
+ #991b1b
137
+ );
138
+ @button-dangerous-bg-color-disable: var(
139
+ --alias-colors-bg-disabled,
140
+ rgba(0, 0, 0, 0.05)
141
+ );
142
+ // text color
143
+ @button-dangerous-color: var(--alias-colors-text-inverse-strong, #fff);
144
+ @button-dangerous-color-hover: var(--alias-colors-text-inverse-strong, #fff);
145
+ @button-dangerous-color-active: var(--alias-colors-text-inverse-strong, #fff);
146
+ @button-dangerous-color-disable: var(
147
+ --alias-colors-text-disabled,
148
+ rgba(0, 0, 0, 0.25)
149
+ );
150
+ // border color
151
+ @button-dangerous-border-color: var(
152
+ --alias-colors-border-transp,
153
+ rgba(0, 0, 0, 0)
154
+ );
155
+ @button-dangerous-border-color-hover: var(
156
+ --alias-colors-border-transp,
157
+ rgba(0, 0, 0, 0)
158
+ );
159
+ @button-dangerous-border-color-active: var(
160
+ --alias-colors-border-transp,
161
+ rgba(0, 0, 0, 0)
162
+ );
163
+ @button-dangerous-border-color-disable: var(
164
+ --alias-colors-border-transp,
165
+ rgba(0, 0, 0, 0)
166
+ );
56
167
 
57
- @button-text-bg-color: transparent;
58
- @button-text-bg-color-active: @NL90;
59
- @button-text-bg-color-disable: transparent;
60
- @button-text-color: @NL20;
61
- @button-text-color-active: @NL20;
62
- @button-text-color-disable: @NL20;
168
+ /*********** text按钮 ***********/
169
+ // bg color
170
+ @button-text-bg-color: var(--alias-colors-bg-skeleton-subtler, #fff);
171
+ @button-text-bg-color-hover: var(
172
+ --alias-colors-bg-accent-blue-subtler-hover,
173
+ #d4e7fd
174
+ );
175
+ @button-text-bg-color-active: var(
176
+ --alias-colors-bg-brand-subtlest-press,
177
+ #a9cffb
178
+ );
179
+ @button-text-bg-color-disable: var(--alias-colors-bg-skeleton-subtler, #fff);
180
+ // text color
181
+ @button-text-color: var(--alias-colors-text-default, #1f2937);
182
+ @button-text-color-hover: var(--alias-colors-text-brand, #126fdd);
183
+ @button-text-color-active: var(--alias-colors-text-brand, #126fdd);
184
+ @button-text-color-disable: var(
185
+ --alias-colors-text-disabled,
186
+ rgba(0, 0, 0, 0.25)
187
+ );
188
+ // border color
189
+ @button-text-border-color: var(--alias-colors-border-transp, rgba(0, 0, 0, 0));
190
+ @button-text-border-color-hover: var(
191
+ --alias-colors-border-transp,
192
+ rgba(0, 0, 0, 0)
193
+ );
194
+ @button-text-border-color-active: var(
195
+ --alias-colors-border-transp,
196
+ rgba(0, 0, 0, 0)
197
+ );
198
+ @button-text-border-color-disable: var(
199
+ --alias-colors-border-transp,
200
+ rgba(0, 0, 0, 0)
201
+ );
63
202
 
64
- @button-link-bg-color: transparent;
65
- @button-link-bg-color-active: transparent;
66
- @button-link-bg-color-disable: transparent;
67
- @button-link-color: @B30;
68
- @button-link-color-active: @B20;
69
- @button-link-color-disable: @B30;
203
+ /*********** inverse按钮 ***********/
204
+ // bg color
205
+ @button-inverse-bg-color: var(
206
+ --component-button-background-secondary-inverse-default,
207
+ rgba(255, 255, 255, 0.1)
208
+ );
209
+ @button-inverse-bg-color-hover: var(
210
+ --alias-colors-bg-skeleton-inverse-stronger,
211
+ rgba(255, 255, 255, 0.15)
212
+ );
213
+ @button-inverse-bg-color-active: var(
214
+ --alias-colors-bg-skeleton-inverse-strongest,
215
+ rgba(255, 255, 255, 0.25)
216
+ );
217
+ @button-inverse-bg-color-disable: var(
218
+ --alias-colors-bg-inverse-disabled,
219
+ rgba(255, 255, 255, 0.1)
220
+ );
221
+ // text color
222
+ @button-inverse-color: var(
223
+ --alias-colors-text-inverse-default,
224
+ rgba(255, 255, 255, 0.9)
225
+ );
226
+ @button-inverse-color-hover: var(
227
+ --alias-colors-text-inverse-default,
228
+ rgba(255, 255, 255, 0.9)
229
+ );
230
+ @button-inverse-color-active: var(
231
+ --alias-colors-text-inverse-default,
232
+ rgba(255, 255, 255, 0.9)
233
+ );
234
+ @button-inverse-color-disable: var(
235
+ --alias-colors-text-inverse-disabled,
236
+ rgba(255, 255, 255, 0.25)
237
+ );
238
+ // border color
239
+ @button-inverse-border-color: var(
240
+ --alias-colors-border-transp,
241
+ rgba(0, 0, 0, 0)
242
+ );
243
+ @button-inverse-border-color-hover: var(
244
+ --alias-colors-border-transp,
245
+ rgba(0, 0, 0, 0)
246
+ );
247
+ @button-inverse-border-color-active: var(
248
+ --alias-colors-border-transp,
249
+ rgba(0, 0, 0, 0)
250
+ );
251
+ @button-inverse-border-color-disable: var(
252
+ --alias-colors-border-transp,
253
+ rgba(0, 0, 0, 0)
254
+ );