@aloudata/aloudata-design 0.3.5 → 0.4.0-beta.10

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 (145) 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 +7 -1
  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 +3 -0
  41. package/es/Popconfirm/index.js +2 -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 +1 -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 +94 -4
  51. package/es/Steps/style/index.less +10 -4
  52. package/es/Table/Table.js +51 -29
  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 +6 -1
  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.js +2 -2
  61. package/es/Tabs/style/index.less +1 -1
  62. package/es/Tooltip/index.d.ts +2 -2
  63. package/es/Tooltip/index.js +4 -4
  64. package/es/index.d.ts +7 -3
  65. package/es/index.js +3 -1
  66. package/es/style/themes/default/scrollBar.less +10 -7
  67. package/es/style/themes/default/themeColor.module.less +328 -106
  68. package/es/style/themes/default/themeColor.module.less.d.ts +94 -4
  69. package/lib/Avatar/component/Avatar/index.d.ts +84 -0
  70. package/lib/Avatar/component/Avatar/index.js +61 -0
  71. package/lib/Avatar/index.d.ts +1 -13
  72. package/lib/Avatar/index.js +3 -44
  73. package/lib/Avatar/style/index.less +1 -1
  74. package/lib/Breadcrumb/index.d.ts +5 -2
  75. package/lib/Breadcrumb/index.js +17 -8
  76. package/lib/Button/index.d.ts +1 -1
  77. package/lib/Button/index.js +3 -8
  78. package/lib/Button/style/index.less +7 -1
  79. package/lib/Button/style/variables.less +26 -26
  80. package/lib/Checkbox/component/CheckboxGroup/index.d.ts +4 -0
  81. package/lib/Checkbox/component/CheckboxGroup/index.js +42 -0
  82. package/lib/Checkbox/index.d.ts +4 -5
  83. package/lib/Checkbox/index.js +4 -13
  84. package/lib/Checkbox/style/index.less +36 -16
  85. package/lib/Checkbox/type.d.ts +94 -0
  86. package/lib/Checkbox/type.js +13 -0
  87. package/lib/Divider/index.d.ts +40 -2
  88. package/lib/Divider/index.js +11 -1
  89. package/lib/Divider/style/index.less +4 -0
  90. package/lib/Divider/style/index.less.d.ts +183 -0
  91. package/lib/Dropdown/Button.d.ts +4 -4
  92. package/lib/Dropdown/Button.js +5 -5
  93. package/lib/Dropdown/index.d.ts +5 -5
  94. package/lib/Dropdown/index.js +5 -5
  95. package/lib/Icon/icons.d.ts +9 -0
  96. package/lib/Icon/icons.js +1597 -0
  97. package/lib/Input/components/Input/index.d.ts +13 -1
  98. package/lib/Input/components/Input/index.js +1 -3
  99. package/lib/Input/components/Password/index.d.ts +6 -1
  100. package/lib/Input/components/Password/index.js +14 -4
  101. package/lib/Input/components/TextArea/index.d.ts +1 -1
  102. package/lib/Input/style/index.less +139 -59
  103. package/lib/InputNumber/index.d.ts +3 -3
  104. package/lib/InputNumber/style/index.less +66 -26
  105. package/lib/InputNumber/type.d.ts +161 -0
  106. package/lib/InputNumber/type.js +5 -0
  107. package/lib/Menu/index.d.ts +2 -0
  108. package/lib/Popconfirm/index.d.ts +3 -0
  109. package/lib/Popconfirm/index.js +13 -0
  110. package/lib/Popconfirm/style/index.d.ts +2 -0
  111. package/lib/Popconfirm/style/index.js +5 -0
  112. package/lib/Popconfirm/style/index.less +1 -0
  113. package/lib/Progress/index.d.ts +3 -0
  114. package/lib/Progress/index.js +13 -0
  115. package/lib/Progress/style/index.d.ts +2 -0
  116. package/lib/Progress/style/index.js +5 -0
  117. package/lib/Progress/style/index.less +1 -0
  118. package/lib/Select/style/variables.less.d.ts +94 -4
  119. package/lib/Steps/style/index.less +10 -4
  120. package/lib/Table/Table.js +51 -30
  121. package/lib/Table/components/TableHead/index.d.ts +0 -1
  122. package/lib/Table/components/TableHead/index.js +1 -2
  123. package/lib/Table/interface.d.ts +2 -0
  124. package/lib/Table/style/index.less +6 -1
  125. package/lib/Table/style/variable.less +0 -5
  126. package/lib/Table/style/variable.less.d.ts +1 -1
  127. package/lib/Table/utils.js +16 -9
  128. package/lib/Tabs/index.js +2 -2
  129. package/lib/Tabs/style/index.less +1 -1
  130. package/lib/Tooltip/index.d.ts +2 -2
  131. package/lib/Tooltip/index.js +4 -4
  132. package/lib/index.d.ts +7 -3
  133. package/lib/index.js +16 -0
  134. package/lib/style/themes/default/scrollBar.less +10 -7
  135. package/lib/style/themes/default/themeColor.module.less +328 -106
  136. package/lib/style/themes/default/themeColor.module.less.d.ts +94 -4
  137. package/package.json +3 -3
  138. package/es/Icon/icons.json +0 -418
  139. package/es/Table/hooks/useTableColumn.d.ts +0 -28
  140. package/es/Table/hooks/useTableColumn.js +0 -53
  141. package/es/Table/style/index.less.d.ts +0 -126
  142. package/lib/Icon/icons.json +0 -418
  143. package/lib/Table/hooks/useTableColumn.d.ts +0 -28
  144. package/lib/Table/hooks/useTableColumn.js +0 -66
  145. package/lib/Table/style/index.less.d.ts +0 -126
@@ -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,42 @@
1
+ var _excluded = ["size", "showFullValue", "children"];
2
+
3
+ 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; }
4
+
5
+ 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; }
6
+
7
+ import * as React from 'react';
8
+ import InternalAvatar from 'antd/es/avatar/avatar';
9
+ import classNames from 'classnames';
10
+ var ZERO = 0;
11
+
12
+ var Avatar = function Avatar(props) {
13
+ var _props$size = props.size,
14
+ size = _props$size === void 0 ? 'middle' : _props$size,
15
+ _props$showFullValue = props.showFullValue,
16
+ showFullValue = _props$showFullValue === void 0 ? false : _props$showFullValue,
17
+ children = props.children,
18
+ restProps = _objectWithoutProperties(props, _excluded);
19
+
20
+ var getSizeClass = function getSizeClass(avatarSize) {
21
+ if (['large', 'small', 'mini'].includes("".concat(avatarSize))) {
22
+ return classNames('ald-avatar', "ald-avatar-".concat(avatarSize));
23
+ }
24
+
25
+ return classNames('ald-avatar', 'ald-avatar-middle');
26
+ };
27
+
28
+ var getChildren = function getChildren() {
29
+ if (!showFullValue && typeof children === 'string') {
30
+ return children[ZERO].toLocaleUpperCase();
31
+ }
32
+
33
+ return children;
34
+ };
35
+
36
+ return /*#__PURE__*/React.createElement(InternalAvatar, Object.assign({
37
+ size: typeof size === 'number' ? size : undefined,
38
+ className: getSizeClass(size)
39
+ }, restProps), getChildren());
40
+ };
41
+
42
+ export default Avatar;
@@ -1,15 +1,3 @@
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' | 'mini' | number;
6
- interface IAvatarProps extends Omit<antdAvatarProps, 'size'> {
7
- size?: TSize;
8
- }
1
+ import Avatar, { IAvatarProps } from './component/Avatar';
9
2
  export type { IAvatarProps };
10
- interface ICompoundedComponent extends React.ForwardRefExoticComponent<IAvatarProps & React.RefAttributes<HTMLElement>> {
11
- Group: typeof Group;
12
- }
13
- declare const Avatar: ICompoundedComponent;
14
- export { Group };
15
3
  export default Avatar;
@@ -1,33 +1,4 @@
1
- var _excluded = ["size"];
2
-
3
- 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; }
4
-
5
- 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; }
6
-
7
- import * as React from 'react';
8
- import InternalAvatar from 'antd/es/avatar/avatar';
9
1
  import Group from 'antd/es/avatar/group';
10
- import classNames from 'classnames';
11
-
12
- var Avatar = function A(props) {
13
- var _props$size = props.size,
14
- size = _props$size === void 0 ? 'middle' : _props$size,
15
- restProps = _objectWithoutProperties(props, _excluded);
16
-
17
- var getSizeClass = function getSizeClass(avatarSize) {
18
- if (['large', 'small', 'mini'].includes("".concat(avatarSize))) {
19
- return classNames('ald-avatar', "ald-avatar-".concat(avatarSize));
20
- }
21
-
22
- return classNames('ald-avatar', 'ald-avatar-middle');
23
- };
24
-
25
- return /*#__PURE__*/React.createElement(InternalAvatar, Object.assign({
26
- size: typeof size === 'number' ? size : undefined,
27
- className: getSizeClass(size)
28
- }, restProps));
29
- };
30
-
2
+ import Avatar from './component/Avatar';
31
3
  Avatar.Group = Group;
32
- export { Group };
33
4
  export default Avatar;
@@ -2,7 +2,7 @@
2
2
 
3
3
  .ald-avatar.ald-avatar {
4
4
  color: @ND0;
5
- background-color: @B60;
5
+ background-color: @B40;
6
6
 
7
7
  &-large {
8
8
  width: 40px;
@@ -1,8 +1,11 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { BreadcrumbItemProps, BreadcrumbProps } from 'antd';
3
3
  export type { BreadcrumbItemProps, BreadcrumbProps };
4
+ interface IBreadcrumbItemInterface extends React.FC<BreadcrumbItemProps> {
5
+ __ANT_BREADCRUMB_ITEM: boolean;
6
+ }
4
7
  declare const Breadcrumb: {
5
8
  (props: BreadcrumbProps): JSX.Element;
6
- Item(props: BreadcrumbItemProps): JSX.Element;
9
+ Item: IBreadcrumbItemInterface;
7
10
  };
8
11
  export default Breadcrumb;
@@ -9,28 +9,38 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
9
9
 
10
10
  import React from 'react';
11
11
  import classNames from 'classnames';
12
- var BreadcrumbItem = _Breadcrumb.Item;
13
12
 
14
13
  var Breadcrumb = function Breadcrumb(props) {
15
14
  var className = props.className,
16
15
  separator = props.separator,
17
16
  restProps = _objectWithoutProperties(props, _excluded);
18
17
 
19
- return /*#__PURE__*/React.createElement(_Breadcrumb, Object.assign({}, restProps, {
20
- separator: separator || /*#__PURE__*/React.createElement("span", {
18
+ var getSeparator = function getSeparator() {
19
+ if (separator === null) {
20
+ return separator;
21
+ }
22
+
23
+ return separator || /*#__PURE__*/React.createElement("span", {
21
24
  className: "default-separator"
22
- }),
25
+ });
26
+ };
27
+
28
+ return /*#__PURE__*/React.createElement(_Breadcrumb, Object.assign({}, restProps, {
29
+ separator: getSeparator(),
23
30
  className: classNames('ald-breadcrumb', className)
24
31
  }));
25
32
  };
26
33
 
27
- Breadcrumb.Item = function (props) {
34
+ var BreadcrumbItem = function BreadcrumbItem(props) {
28
35
  var className = props.className,
29
36
  restProps = _objectWithoutProperties(props, _excluded2);
30
37
 
31
- return /*#__PURE__*/React.createElement(BreadcrumbItem, Object.assign({}, restProps, {
38
+ return /*#__PURE__*/React.createElement(_Breadcrumb.Item, Object.assign({}, restProps, {
32
39
  className: classNames('ald-breadcrumb-item', className)
33
40
  }));
34
- };
41
+ }; // eslint-disable-next-line no-underscore-dangle
42
+
35
43
 
44
+ BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
45
+ Breadcrumb.Item = BreadcrumbItem;
36
46
  export default Breadcrumb;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { ButtonProps as AntdButtonProps } from 'antd/lib/button';
3
3
  export declare type ButtonType = 'primary' | 'secondary' | 'dangerous' | 'text' | 'link';
4
- export declare type Size = 'mini' | 'small' | 'default' | 'large';
4
+ export declare type Size = 'small' | 'default' | 'large';
5
5
  export interface IButtonProps extends Omit<AntdButtonProps, 'type' | 'size' | 'dangerous' | 'shape' | 'icon' | 'href' | 'target' | 'onClick' | 'loading'> {
6
6
  /**
7
7
  * @description 类型
@@ -17,10 +17,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
17
17
  import React from 'react';
18
18
  import classNames from 'classnames';
19
19
  var iconPrefixCls = 'aldicon';
20
- var ICON_LARGE = 16;
21
- var ICON_MIDDLE = 14;
22
- var ICON_SMALL = 12;
23
- var ICON_MINI = 12;
20
+ var ICON_LARGE = 24;
21
+ var ICON_MIDDLE = 20;
22
+ var ICON_SMALL = 16;
24
23
 
25
24
  function Button(props) {
26
25
  var prefix = 'ald-btn';
@@ -75,10 +74,6 @@ function Button(props) {
75
74
  return ICON_SMALL;
76
75
  }
77
76
 
78
- if (ButtonSize === 'mini') {
79
- return ICON_MINI;
80
- }
81
-
82
77
  return ICON_MIDDLE;
83
78
  }
84
79
 
@@ -15,7 +15,7 @@
15
15
  display: inline-flex;
16
16
  align-items: center;
17
17
  justify-content: center;
18
- font-weight: 500;
18
+ font-weight: 600;
19
19
  font-size: 12px;
20
20
  text-shadow: none;
21
21
  }
@@ -51,6 +51,7 @@
51
51
  background-color: @button-primary-bg-color-disable;
52
52
  border-color: @button-primary-bg-color-disable;
53
53
  cursor: default;
54
+ opacity: 0.5;
54
55
 
55
56
  &:hover,
56
57
  &:focus,
@@ -88,6 +89,7 @@
88
89
  background-color: @button-dangerous-bg-color-disable;
89
90
  border-color: @button-dangerous-bg-color-disable;
90
91
  cursor: default;
92
+ opacity: 0.5;
91
93
 
92
94
  &:hover,
93
95
  &:focus,
@@ -134,6 +136,7 @@
134
136
  background-color: @button-secondary-bg-color-disable;
135
137
  border-color: @button-secondary-border-color;
136
138
  cursor: default;
139
+ opacity: 0.5;
137
140
 
138
141
  &:hover,
139
142
  &:focus,
@@ -168,6 +171,7 @@
168
171
  color: @button-text-color-disable;
169
172
  background-color: @button-text-bg-color-disable;
170
173
  cursor: default;
174
+ opacity: 0.5;
171
175
 
172
176
  &:hover,
173
177
  &:focus,
@@ -208,6 +212,7 @@
208
212
  background-color: @button-link-bg-color-disable;
209
213
  border-color: @button-link-bg-color-disable;
210
214
  cursor: default;
215
+ opacity: 0.5;
211
216
 
212
217
  &:hover,
213
218
  &:focus,
@@ -231,6 +236,7 @@
231
236
  height: @button-height-large;
232
237
  padding: @button-border-padding-large;
233
238
  font-size: @button-text-size-large;
239
+ line-height: 24px;
234
240
  border-radius: @button-border-radius-large;
235
241
 
236
242
  &.ant-btn-icon-only {
@@ -7,19 +7,19 @@
7
7
  @button-height-large: 36px;
8
8
  @button-text-size-large: 16px;
9
9
  @button-border-radius-large: 8px;
10
- @button-border-padding-large: 0 11px;
10
+ @button-border-padding-large: 6px 14px;
11
11
  @button-left-icon-margin-right-large: 8px;
12
12
 
13
13
  @button-height-middle: 32px;
14
14
  @button-text-size-middle: 14px;
15
- @button-border-radius-middle: 6px;
16
- @button-border-padding-middle: 0 11px;
15
+ @button-border-radius-middle: 8px;
16
+ @button-border-padding-middle: 6px 12px;
17
17
  @button-left-icon-margin-right-middle: 8px;
18
18
 
19
19
  @button-height-small: 28px;
20
20
  @button-text-size-small: 12px;
21
- @button-border-radius-small: 4px;
22
- @button-border-padding-small: 0 7px;
21
+ @button-border-radius-small: 6px;
22
+ @button-border-padding-small: 6px 10px;
23
23
  @button-left-icon-margin-right-small: 4px;
24
24
 
25
25
  @button-height-mini: 24px;
@@ -29,39 +29,39 @@
29
29
  @button-left-icon-margin-right-mini: 4px;
30
30
 
31
31
  /**** type控制 ****/
32
- @button-primary-bg-color: @B60;
33
- @button-primary-bg-color-active: @B50;
34
- @button-primary-bg-color-disable: @B90;
32
+ @button-primary-bg-color: @B40;
33
+ @button-primary-bg-color-active: @B30;
34
+ @button-primary-bg-color-disable: @B40;
35
35
  @button-primary-color: @ND0;
36
36
  @button-primary-color-active: @ND0;
37
37
  @button-primary-color-disable: @ND0;
38
38
 
39
- @button-dangerous-bg-color: @SC60;
40
- @button-dangerous-bg-color-active: @SC50;
41
- @button-dangerous-bg-color-disable: @SC90;
39
+ @button-dangerous-bg-color: @SC40;
40
+ @button-dangerous-bg-color-active: @SC30;
41
+ @button-dangerous-bg-color-disable: @SC40;
42
42
  @button-dangerous-color: @ND0;
43
43
  @button-dangerous-color-active: @ND0;
44
44
  @button-dangerous-color-disable: @ND0;
45
45
 
46
- @button-secondary-bg-color: @BG97;
47
- @button-secondary-bg-color-active: @BG95;
48
- @button-secondary-bg-color-disable: @BG97;
49
- @button-secondary-color: @NL30;
50
- @button-secondary-color-active: @B60;
51
- @button-secondary-color-disable: @NL80;
52
- @button-secondary-border-color: @NL90;
53
- @button-secondary-border-color-active: @B60;
46
+ @button-secondary-bg-color: @BG100;
47
+ @button-secondary-bg-color-active: @BG90;
48
+ @button-secondary-bg-color-disable: @BG100;
49
+ @button-secondary-color: @NL20;
50
+ @button-secondary-color-active: @NL20;
51
+ @button-secondary-color-disable: @NL20;
52
+ @button-secondary-border-color: @BG60;
53
+ @button-secondary-border-color-active: @BG60;
54
54
 
55
55
  @button-text-bg-color: transparent;
56
- @button-text-bg-color-active: @NL97;
56
+ @button-text-bg-color-active: @NL90;
57
57
  @button-text-bg-color-disable: transparent;
58
- @button-text-color: @NL30;
59
- @button-text-color-active: @B60;
60
- @button-text-color-disable: @NL80;
58
+ @button-text-color: @NL20;
59
+ @button-text-color-active: @NL20;
60
+ @button-text-color-disable: @NL20;
61
61
 
62
62
  @button-link-bg-color: transparent;
63
63
  @button-link-bg-color-active: transparent;
64
64
  @button-link-bg-color-disable: transparent;
65
- @button-link-color: @B60;
66
- @button-link-color-active: @B50;
67
- @button-link-color-disable: @B90;
65
+ @button-link-color: @B30;
66
+ @button-link-color-active: @B20;
67
+ @button-link-color-disable: @B30;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ICheckboxGroupProps } from '../../type';
3
+ declare const CheckboxGroup: (props: ICheckboxGroupProps) => JSX.Element;
4
+ export default CheckboxGroup;
@@ -0,0 +1,27 @@
1
+ import "antd/es/checkbox/style";
2
+ import _Checkbox from "antd/es/checkbox";
3
+ var _excluded = ["className", "direction"];
4
+
5
+ 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; }
6
+
7
+ 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; }
8
+
9
+ import classNames from 'classnames';
10
+ import React from 'react';
11
+ import { EDirection } from '../../type'; // "vertical" | "horizontal"
12
+
13
+ var AntdCheckboxGroup = _Checkbox.Group;
14
+
15
+ var CheckboxGroup = function CheckboxGroup(props) {
16
+ var className = props.className,
17
+ direction = props.direction,
18
+ otherProps = _objectWithoutProperties(props, _excluded);
19
+
20
+ return /*#__PURE__*/React.createElement(AntdCheckboxGroup, Object.assign({
21
+ className: classNames('ald-checkbox', className, {
22
+ 'ald-checkout-group-vertical': direction === EDirection.VERTICAL
23
+ })
24
+ }, otherProps));
25
+ };
26
+
27
+ export default CheckboxGroup;
@@ -1,11 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { CheckboxProps } from 'antd';
3
- import { CheckboxGroupProps } from 'antd/lib/checkbox';
2
+ import { ICheckboxGroupProps, ICheckboxProps } from './type';
4
3
  export type { CheckboxValueType, CheckboxOptionType } from 'antd/es/checkbox/Group';
5
4
  export type { CheckboxChangeEvent } from 'antd/es/checkbox/Checkbox';
6
- declare function Checkbox(props: CheckboxProps): JSX.Element;
5
+ declare function Checkbox(props: ICheckboxProps): JSX.Element;
7
6
  declare namespace Checkbox {
8
- var Group: (props: CheckboxGroupProps) => JSX.Element;
7
+ var Group: (props: ICheckboxGroupProps) => JSX.Element;
9
8
  }
10
- export type { CheckboxProps };
9
+ export type { ICheckboxProps, ICheckboxGroupProps };
11
10
  export default Checkbox;
@@ -1,7 +1,6 @@
1
1
  import "antd/es/checkbox/style";
2
2
  import _Checkbox from "antd/es/checkbox";
3
- var _excluded = ["className"],
4
- _excluded2 = ["className"];
3
+ var _excluded = ["className"];
5
4
 
6
5
  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; }
7
6
 
@@ -9,7 +8,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
9
8
 
10
9
  import React from 'react';
11
10
  import classNames from 'classnames';
12
- var CheckboxGroup = _Checkbox.Group;
11
+ import CheckboxGroup from './component/CheckboxGroup';
13
12
 
14
13
  function Checkbox(props) {
15
14
  var className = props.className,
@@ -20,13 +19,5 @@ function Checkbox(props) {
20
19
  }, otherProps));
21
20
  }
22
21
 
23
- Checkbox.Group = function (props) {
24
- var className = props.className,
25
- otherProps = _objectWithoutProperties(props, _excluded2);
26
-
27
- return /*#__PURE__*/React.createElement(CheckboxGroup, Object.assign({
28
- className: classNames('ald-checkbox', className)
29
- }, otherProps));
30
- };
31
-
22
+ Checkbox.Group = CheckboxGroup;
32
23
  export default Checkbox;
@@ -25,14 +25,14 @@
25
25
  .ant-checkbox-checked {
26
26
  &::after,
27
27
  .ant-checkbox-inner {
28
- background-color: @B60;
29
- border-color: @B60;
28
+ background-color: @B95;
29
+ border-color: @B40;
30
30
  border-radius: 4px;
31
31
  }
32
32
 
33
33
  .ant-checkbox-inner {
34
- background-color: @B60;
35
- border-color: @B60;
34
+ background-color: @B95;
35
+ border-color: @B40;
36
36
 
37
37
  &::after {
38
38
  top: 3px;
@@ -40,7 +40,7 @@
40
40
  z-index: 10;
41
41
  width: 10px;
42
42
  height: 8px;
43
- background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEwIDgiIGZpbGw9IndoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTkuNjc1NzMgMC4yNjI4NTJDMTAuMDgyOCAwLjYzNjA0NCAxMC4xMTA0IDEuMjY4NjEgOS43MzcxNiAxLjY3NTczTDQuMjM3MTYgNy42NzU3M0M0LjA0Nzc1IDcuODgyMzYgMy43ODAzMSA4LjAwMDAxIDMuNTAwMDEgOC4wMDAwMUMzLjIxOTcgOC4wMDAwMSAyLjk1MjI2IDcuODgyMzYgMi43NjI4NSA3LjY3NTczTDAuMjYyODUyIDQuOTQ4NDZDLTAuMTEwMzQxIDQuNTQxMzQgLTAuMDgyODM3OCAzLjkwODc3IDAuMzI0MjgxIDMuNTM1NThDMC43MzE0IDMuMTYyMzkgMS4zNjM5NyAzLjE4OTg5IDEuNzM3MTYgMy41OTcwMUwzLjUwMDAxIDUuNTIwMTFMOC4yNjI4NSAwLjMyNDI4MUM4LjYzNjA0IC0wLjA4MjgzNzggOS4yNjg2MSAtMC4xMTAzNDEgOS42NzU3MyAwLjI2Mjg1MloiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=')
43
+ background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEwIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOS42NzU3MyAwLjI2Mjg1MkMxMC4wODI4IDAuNjM2MDQ0IDEwLjExMDQgMS4yNjg2MSA5LjczNzE2IDEuNjc1NzNMNC4yMzcxNiA3LjY3NTczQzQuMDQ3NzUgNy44ODIzNiAzLjc4MDMxIDguMDAwMDEgMy41MDAwMSA4LjAwMDAxQzMuMjE5NyA4LjAwMDAxIDIuOTUyMjYgNy44ODIzNiAyLjc2Mjg1IDcuNjc1NzNMMC4yNjI4NTIgNC45NDg0NkMtMC4xMTAzNDEgNC41NDEzNCAtMC4wODI4Mzc4IDMuOTA4NzcgMC4zMjQyODEgMy41MzU1OEMwLjczMTQgMy4xNjIzOSAxLjM2Mzk3IDMuMTg5ODkgMS43MzcxNiAzLjU5NzAxTDMuNTAwMDEgNS41MjAxMUw4LjI2Mjg1IDAuMzI0MjgxQzguNjM2MDQgLTAuMDgyODM3OCA5LjI2ODYxIC0wLjExMDM0MSA5LjY3NTczIDAuMjYyODUyWiIgZmlsbD0iIzE1NzBFRiIvPgo8L3N2Zz4K')
44
44
  no-repeat;
45
45
  border-width: 0;
46
46
  transform: none;
@@ -50,15 +50,17 @@
50
50
 
51
51
  .ant-checkbox-disabled {
52
52
  cursor: default;
53
+ opacity: 0.5;
53
54
 
54
55
  & + span {
55
56
  color: @NL0;
56
57
  cursor: default;
58
+ opacity: 0.5;
57
59
  }
58
60
 
59
61
  .ant-checkbox-inner {
60
- background-color: @NL90;
61
- border-color: @NL90;
62
+ background-color: @B95;
63
+ border-color: @B40;
62
64
 
63
65
  &::after {
64
66
  top: 3px;
@@ -66,7 +68,7 @@
66
68
  z-index: 10;
67
69
  width: 10px;
68
70
  height: 8px;
69
- background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEwIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOS42NzU3MyAwLjI2Mjg1MkMxMC4wODI4IDAuNjM2MDQ0IDEwLjExMDQgMS4yNjg2MSA5LjczNzE2IDEuNjc1NzNMNC4yMzcxNiA3LjY3NTczQzQuMDQ3NzUgNy44ODIzNiAzLjc4MDMxIDguMDAwMDEgMy41MDAwMSA4LjAwMDAxQzMuMjE5NyA4LjAwMDAxIDIuOTUyMjYgNy44ODIzNiAyLjc2Mjg1IDcuNjc1NzNMMC4yNjI4NTIgNC45NDg0NkMtMC4xMTAzNDEgNC41NDEzNCAtMC4wODI4Mzc4IDMuOTA4NzcgMC4zMjQyODEgMy41MzU1OEMwLjczMTQgMy4xNjIzOSAxLjM2Mzk3IDMuMTg5ODkgMS43MzcxNiAzLjU5NzAxTDMuNTAwMDEgNS41MjAxMUw4LjI2Mjg1IDAuMzI0MjgxQzguNjM2MDQgLTAuMDgyODM3OCA5LjI2ODYxIC0wLjExMDM0MSA5LjY3NTczIDAuMjYyODUyWiIgZmlsbD0iIzAwMUEzMyIgZmlsbC1vcGFjaXR5PSIwLjIiLz4KPC9zdmc+Cg==');
71
+ background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEwIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOS42NzU3MyAwLjI2Mjg1MkMxMC4wODI4IDAuNjM2MDQ0IDEwLjExMDQgMS4yNjg2MSA5LjczNzE2IDEuNjc1NzNMNC4yMzcxNiA3LjY3NTczQzQuMDQ3NzUgNy44ODIzNiAzLjc4MDMxIDguMDAwMDEgMy41MDAwMSA4LjAwMDAxQzMuMjE5NyA4LjAwMDAxIDIuOTUyMjYgNy44ODIzNiAyLjc2Mjg1IDcuNjc1NzNMMC4yNjI4NTIgNC45NDg0NkMtMC4xMTAzNDEgNC41NDEzNCAtMC4wODI4Mzc4IDMuOTA4NzcgMC4zMjQyODEgMy41MzU1OEMwLjczMTQgMy4xNjIzOSAxLjM2Mzk3IDMuMTg5ODkgMS43MzcxNiAzLjU5NzAxTDMuNTAwMDEgNS41MjAxMUw4LjI2Mjg1IDAuMzI0MjgxQzguNjM2MDQgLTAuMDgyODM3OCA5LjI2ODYxIC0wLjExMDM0MSA5LjY3NTczIDAuMjYyODUyWiIgZmlsbD0iIzE1NzBFRiIvPgo8L3N2Zz4K');
70
72
  border-width: 0;
71
73
  transform: none;
72
74
  }
@@ -75,12 +77,13 @@
75
77
 
76
78
  .ant-checkbox-indeterminate {
77
79
  .ant-checkbox-inner {
78
- background-color: @B60;
79
- border-color: @B60;
80
+ background-color: @B95;
81
+ border-color: @B40;
80
82
 
81
83
  &::after {
82
84
  width: 10px;
83
85
  height: 2px;
86
+ background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgdmlld0JveD0iMCAwIDEwIDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMCIgaGVpZ2h0PSIyIiByeD0iMSIgZmlsbD0iIzE1NzBFRiIvPgo8L3N2Zz4K');
84
87
  background-color: @ND0;
85
88
  border-radius: 2px;
86
89
  }
@@ -88,26 +91,43 @@
88
91
  }
89
92
 
90
93
  .ant-checkbox + span {
94
+ display: flex;
95
+ align-items: center;
91
96
  padding-right: 10px;
92
97
  padding-left: 10px;
93
98
  }
94
- }
95
99
 
96
- .ant-checkbox-group.ald-checkbox,
97
- .ant-checkbox-wrapper.ald-checkbox {
98
100
  &:hover .ant-checkbox-inner {
99
- border-color: @B60;
101
+ border-color: @B40;
102
+ }
103
+
104
+ .ant-checkbox-disabled .ant-checkbox-inner:hover {
105
+ box-shadow: unset;
106
+ }
107
+
108
+ .ant-checkbox:hover .ant-checkbox-inner {
109
+ border-color: @B40;
110
+ box-shadow: @shadow-primary;
100
111
  }
112
+ }
101
113
 
114
+ .ant-checkbox-group.ald-checkbox,
115
+ .ant-checkbox-wrapper.ald-checkbox {
102
116
  .ant-checkbox-input:focus + .ant-checkbox-inner {
103
- border-color: @NL60;
117
+ border-color: @B40;
104
118
  }
105
119
 
106
120
  .ant-checkbox:hover .ant-checkbox-inner {
107
- border-color: @B60;
121
+ border-color: @B40;
108
122
  }
109
123
  }
110
124
 
111
125
  .ald-checkbox.ant-checkbox-wrapper-disabled {
112
126
  cursor: default;
113
127
  }
128
+
129
+ .ald-checkout-group-vertical {
130
+ display: flex;
131
+ flex-direction: column;
132
+ gap: 16px;
133
+ }