@aloudata/aloudata-design 2.0.0-beta.7 → 2.0.0-beta.9

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 (49) hide show
  1. package/dist/Avatar/component/Avatar/index.js +9 -7
  2. package/dist/Avatar/style/index.less +8 -1
  3. package/dist/Checkbox/index.js +10 -4
  4. package/dist/Checkbox/style/index.less +12 -0
  5. package/dist/Checkbox/type.d.ts +11 -0
  6. package/dist/DataPreviewTable/constant.d.ts +1 -1
  7. package/dist/DataPreviewTable/constant.js +1 -1
  8. package/dist/DataPreviewTable/style/index.less +11 -11
  9. package/dist/Empty/style/index.less +1 -1
  10. package/dist/Form/style/index.less +27 -6
  11. package/dist/Icon/components/CloseCircleLightLine.d.ts +11 -0
  12. package/dist/Icon/components/CloseCircleLightLine.js +35 -0
  13. package/dist/Icon/components/User.d.ts +11 -0
  14. package/dist/Icon/components/User.js +41 -0
  15. package/dist/Icon/components/UserGroup.d.ts +11 -0
  16. package/dist/Icon/components/UserGroup.js +39 -0
  17. package/dist/Icon/index.d.ts +3 -0
  18. package/dist/Icon/index.js +4 -1
  19. package/dist/Icon/svg/Close-Circle-light-line.svg +5 -0
  20. package/dist/Icon/svg/check-circle-light-line.svg +1 -1
  21. package/dist/Icon/svg/information-circle-light-line.svg +1 -1
  22. package/dist/Icon/svg/user.svg +4 -0
  23. package/dist/Icon/svg/userGroup.svg +7 -0
  24. package/dist/InputNumber/style/index.less +12 -9
  25. package/dist/MemberPicker/components/MultipleOption.js +2 -0
  26. package/dist/MemberPicker/components/NickLabel.d.ts +2 -0
  27. package/dist/MemberPicker/components/NickLabel.js +8 -2
  28. package/dist/MemberPicker/components/Panel.js +2 -2
  29. package/dist/MemberPicker/components/SelectedMemberTags.js +4 -1
  30. package/dist/MemberPicker/components/SingleOption.js +1 -0
  31. package/dist/MemberPicker/style/index.less +30 -25
  32. package/dist/Navigator/style/index.less +1 -1
  33. package/dist/Popconfirm/index.js +2 -2
  34. package/dist/Popconfirm/style/index.less +47 -9
  35. package/dist/Spin/index.js +2 -3
  36. package/dist/Table/index.js +17 -2
  37. package/dist/Table/style/index.less +10 -6
  38. package/dist/Table/types.d.ts +1 -0
  39. package/dist/Tree/Tree.js +1 -1
  40. package/dist/Tree/style/index.less +4 -4
  41. package/dist/Tree/style/mixin.less +3 -5
  42. package/dist/Tree/style/reset.less +15 -0
  43. package/dist/ald.min.css +1 -1
  44. package/dist/notification/demo/footer.d.ts +3 -0
  45. package/dist/notification/demo/footer.js +44 -0
  46. package/dist/notification/index.js +77 -48
  47. package/dist/notification/style/index.less +49 -11
  48. package/dist/style/themes/default/index.less +1 -1
  49. package/package.json +1 -1
@@ -43,12 +43,15 @@ export default function SelectedMemberTags(props) {
43
43
  return /*#__PURE__*/React.createElement("div", {
44
44
  className: 'ald-member-picker-selected-member-tag',
45
45
  key: getId(user)
46
+ }, /*#__PURE__*/React.createElement("div", {
47
+ className: 'ald-member-picker-selected-member-tag-user'
46
48
  }, /*#__PURE__*/React.createElement(NickLabel, {
49
+ type: user.type,
47
50
  id: getId(user),
48
51
  name: user.name,
49
52
  photo: getPhoto(user),
50
53
  account: getAccount(user)
51
- }), !hasLocked && /*#__PURE__*/React.createElement(CloseMLine, {
54
+ })), !hasLocked && /*#__PURE__*/React.createElement(CloseMLine, {
52
55
  size: 20,
53
56
  className: 'ald-member-picker-close',
54
57
  color: "#98A2B3",
@@ -21,6 +21,7 @@ export default function SingleOption(params) {
21
21
  className: classnames('ald-member-picker-option', className, 'ald-member-picker-singleOption', _defineProperty({}, 'ald-member-picker-single-option-selected', selected)),
22
22
  onClick: onClick
23
23
  }, /*#__PURE__*/React.createElement(NickLabel, {
24
+ type: user.type,
24
25
  id: getId(user),
25
26
  name: user.name,
26
27
  photo: getPhoto(user),
@@ -23,9 +23,6 @@
23
23
  border-radius: 2px;
24
24
  // .memberSelection {
25
25
  // }
26
- .ald-member-picker-selected-member-tags {
27
- border-left: 1px solid var(--colors-gray-400, #dbdbdb);
28
- }
29
26
 
30
27
  .ald-member-picker-selector-footer {
31
28
  grid-column: 1 / 3;
@@ -35,6 +32,7 @@
35
32
 
36
33
  .ald-member-picker-member-selection-wrapper {
37
34
  width: 50%;
35
+ border-right: 1px solid var(--alias-colors-border-default, #e5e7eb);
38
36
  }
39
37
 
40
38
  .ald-member-picker-member-list-wrap {
@@ -52,7 +50,7 @@
52
50
  .ald-member-picker-search-input.ald-member-picker-search-input {
53
51
  border: none;
54
52
  border-bottom: 1px solid var(--colors-gray-300, #e8e8e8) !important;
55
- border-radius: 0;
53
+ border-radius: 0 !important;
56
54
  flex: 0 0 32px;
57
55
 
58
56
  &.ant-input-affix-wrapper-focused {
@@ -73,7 +71,7 @@
73
71
  }
74
72
 
75
73
  .ald-member-picker-member-list {
76
- height: 200px;
74
+ height: 300px;
77
75
 
78
76
  &.ald-member-picker-member-list-null {
79
77
  display: none;
@@ -83,6 +81,7 @@
83
81
 
84
82
  .ald-member-picker-selected-member-tags-wrap {
85
83
  width: 50%;
84
+ height: 100%;
86
85
  max-height: 320px;
87
86
  padding: 8px;
88
87
 
@@ -103,19 +102,21 @@
103
102
 
104
103
  .ald-member-picker-selected-member-tag {
105
104
  display: flex;
106
- padding: 1px 5px;
107
105
  justify-content: center;
108
- gap: var(--global-number-spacing-spacing-xxs, 4px);
109
- border-radius: var(--global-number-radius-radius-sm, 2px);
110
- border: 1px solid var(--colors-gray-300, #e8e8e8);
111
- font-size: 13px;
112
- font-style: normal;
106
+ align-items: center;
107
+ border-radius: var(--alias-radius-50, 4px);
108
+ border: 1px solid
109
+ var(--alias-colors-border-accent-gray-subtler-default, #e5e7eb);
110
+ background: var(--alias-colors-bg-accent-gray-subtler-default, #f9fafb);
111
+ color: var(--alias-colors-text-accent-gray-default, #374151);
112
+ text-align: center;
113
+ font-size: 14px;
113
114
  font-weight: 400;
114
- line-height: 20px;
115
- height: 24px;
116
- max-width: 100%;
115
+ line-height: 20px; /* 142.857% */
117
116
 
118
117
  .ald-member-picker-close {
118
+ border-left: 1px solid
119
+ var(--alias-colors-border-accent-gray-subtler-default, #e5e7eb);
119
120
  cursor: pointer;
120
121
  }
121
122
  }
@@ -131,18 +132,18 @@
131
132
  align-items: center;
132
133
  gap: var(--global-number-spacing-spacing-sm, 12px);
133
134
  align-self: stretch;
134
- border-top: 1px solid var(--colors-gray-300, #e8e8e8);
135
- background: var(--colors-gray-97, #f8f8f8);
135
+ border-top: 1px solid var(--alias-colors-border-default, #e5e7eb);
136
+ background: var(--alias-colors-bg-skeleton-subtler, #fff);
136
137
  }
137
138
 
138
139
  .ald-member-picker-option {
139
- padding: 0 8px;
140
+ padding: 0 12px;
140
141
  display: flex;
141
142
  align-items: center;
142
143
  box-sizing: border-box;
143
- height: 32px;
144
+ height: 36px;
144
145
  line-height: 20px;
145
- gap: 4px;
146
+ gap: 6px;
146
147
  cursor: pointer;
147
148
  justify-content: space-between;
148
149
 
@@ -232,8 +233,13 @@
232
233
  }
233
234
  }
234
235
 
236
+ .ald-member-picker-selected-member-tag-user {
237
+ padding: 2px 6px;
238
+ display: flex;
239
+ align-items: center;
240
+ }
241
+
235
242
  .ald-member-picker-nick-label {
236
- font-size: 0;
237
243
  display: inline-flex;
238
244
  gap: 4px;
239
245
  flex-wrap: nowrap;
@@ -247,15 +253,14 @@
247
253
  }
248
254
 
249
255
  .ald-member-picker-nick-label-name {
250
- color: var(--colors-gray-900, #171717);
251
- font-size: 13px;
252
- font-style: normal;
256
+ color: var(--alias-colors-text-default, #1f2937);
257
+ font-size: 14px;
253
258
  font-weight: 400;
254
- line-height: 20px;
259
+ line-height: 20px; /* 142.857% */
255
260
  white-space: nowrap;
256
261
  text-overflow: ellipsis;
257
262
  overflow: hidden;
258
- max-width: 140px;
263
+ max-width: 130px;
259
264
  }
260
265
  }
261
266
 
@@ -1,7 +1,7 @@
1
1
  @import '../../style/index.less';
2
2
  @import '../../Icon/index.less';
3
3
 
4
- @ald-prefix: ant;
4
+ @ald-prefix: ald;
5
5
  @header-height: 80px;
6
6
  @footer-height: 88px;
7
7
 
@@ -6,7 +6,7 @@ import { Popconfirm } from 'antd';
6
6
  import classNames from 'classnames';
7
7
  import React from 'react';
8
8
  import { btnPrefix, getButtonSizeClass, getButtonType, getDangerStatus, getShape } from "../Button";
9
- import { AlertTriangleLine } from "../Icon";
9
+ import { AttentionTriangleFill } from "../Icon";
10
10
  function MyPopconfirm(props) {
11
11
  var _props$okButtonProps = props.okButtonProps,
12
12
  okButtonProps = _props$okButtonProps === void 0 ? {} : _props$okButtonProps,
@@ -15,7 +15,7 @@ function MyPopconfirm(props) {
15
15
  okType = props.okType,
16
16
  rootClassName = props.rootClassName,
17
17
  _props$icon = props.icon,
18
- icon = _props$icon === void 0 ? /*#__PURE__*/React.createElement(AlertTriangleLine, {
18
+ icon = _props$icon === void 0 ? /*#__PURE__*/React.createElement(AttentionTriangleFill, {
19
19
  size: 20,
20
20
  color: "#D64343",
21
21
  fill: "#fff"
@@ -1,9 +1,41 @@
1
1
  @import '../../style/index.less';
2
2
  @import '../../Button/style/index.less';
3
3
 
4
+ .ant-popover-arrow.ant-popover-arrow.ant-popover-arrow {
5
+ overflow: visible;
6
+ }
7
+
8
+ .ant-popover[class] .ant-popover-arrow::before {
9
+ content: '';
10
+ width: 10px;
11
+ display: inline-block;
12
+ bottom: -6px;
13
+ position: absolute;
14
+ left: 4px;
15
+ height: 10px;
16
+ border: 1px solid #d1d5db;
17
+ transform: rotate(45deg);
18
+ clip-path: none;
19
+ }
20
+
21
+ .ant-popover[class] .ant-popover-arrow::after {
22
+ content: '';
23
+ width: 15px;
24
+ background-color: #fff;
25
+ display: inline-block;
26
+ bottom: -11px;
27
+ position: absolute;
28
+ left: 1px;
29
+ height: 10px;
30
+ transform: none;
31
+ box-shadow: none !important;
32
+ }
33
+
4
34
  .ald-pop-confirm.ant-popover.ant-popover .ant-popover-inner {
35
+ width: 240px;
5
36
  padding: 12px;
6
- border-radius: 2px;
37
+ border: 1px solid #d1d5db;
38
+ border-radius: 6px;
7
39
  box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08),
8
40
  0 4px 6px -2px rgba(16, 24, 40, 0.03);
9
41
 
@@ -11,29 +43,35 @@
11
43
  .ant-popconfirm-message {
12
44
  padding-bottom: 12px;
13
45
  margin-bottom: 0;
14
- align-items: center;
15
46
  }
16
47
 
17
48
  .ant-popconfirm-buttons {
18
49
  padding-top: 12px;
50
+ padding-left: 24px;
51
+ display: flex;
52
+ align-items: center;
53
+ gap: 16px;
54
+ flex-direction: row-reverse;
55
+ justify-content: start;
19
56
  }
20
57
  }
21
58
  }
22
59
 
23
60
  .ant-popconfirm-message {
24
61
  .ant-popconfirm-message-icon {
25
- line-height: 20px;
26
- display: flex;
27
- align-items: center;
62
+ display: inline-block;
63
+ height: 100%;
28
64
  }
29
65
 
30
66
  .ant-popconfirm-message-title {
31
67
  font-weight: 400;
32
- font-size: 13px;
33
- line-height: 20px;
34
- color: var(--colors-gray-900, #171717);
68
+ font-size: 12px;
69
+ line-height: 16px;
70
+ color: var(--alias-colors-text-default, #1f2937);
35
71
  margin-inline-start: 4px;
36
- margin-left: 4px !important;
72
+ margin-left: 8px !important;
73
+ width: 190px;
74
+ word-break: break-all;
37
75
  }
38
76
  }
39
77
 
@@ -16,14 +16,13 @@ function CustomSpin(props) {
16
16
  if (size === 'middle') {
17
17
  spinSize = 'default';
18
18
  }
19
- return /*#__PURE__*/React.createElement(Spin, _extends({
19
+ return /*#__PURE__*/React.createElement(Spin, _extends({}, restProps, {
20
20
  className: classNames('ald-spin', props.className),
21
21
  indicator: /*#__PURE__*/React.createElement(CustomIcon, {
22
22
  size: props.size,
23
23
  tip: tip,
24
24
  direction: direction
25
- })
26
- }, restProps, {
25
+ }),
27
26
  tip: null,
28
27
  size: spinSize
29
28
  }));
@@ -34,7 +34,8 @@ function Table(props, ref) {
34
34
  _props$rowClassName = props.rowClassName,
35
35
  rowClassName = _props$rowClassName === void 0 ? function () {
36
36
  return '';
37
- } : _props$rowClassName;
37
+ } : _props$rowClassName,
38
+ onRowClick = props.onRowClick;
38
39
  var _useState = useState(null),
39
40
  _useState2 = _slicedToArray(_useState, 2),
40
41
  totalSize = _useState2[0],
@@ -117,6 +118,19 @@ function Table(props, ref) {
117
118
  }));
118
119
  }));
119
120
  }));
121
+ var onClickRow = useCallback(function (rowData, rowIndex) {
122
+ return function () {
123
+ var _window$getSelection;
124
+ if (typeof onRowClick !== 'function') {
125
+ return;
126
+ }
127
+ if (((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.toString().length) !== 0) {
128
+ // 防止选择文本时触发 onRowClick
129
+ return;
130
+ }
131
+ onRowClick(rowData, rowIndex);
132
+ };
133
+ }, [onRowClick]);
120
134
 
121
135
  // 渲染 body
122
136
  var bodyContent = /*#__PURE__*/React.createElement(Spin, {
@@ -135,7 +149,8 @@ function Table(props, ref) {
135
149
  })) : _.map(rows, function (row, rowIndex) {
136
150
  return /*#__PURE__*/React.createElement("div", {
137
151
  key: row.id,
138
- className: classnames(prefixCls('tr'), rowClassName(row.original, rowIndex))
152
+ className: classnames(prefixCls('tr'), _defineProperty({}, prefixCls('row-hover'), typeof onRowClick === 'function'), rowClassName(row.original, rowIndex)),
153
+ onClick: onClickRow(row.original, rowIndex)
139
154
  }, _.map(row.getVisibleCells(), function (cell) {
140
155
  return /*#__PURE__*/React.createElement("div", {
141
156
  className: prefixCls('td'),
@@ -105,12 +105,16 @@
105
105
  min-height: 200px;
106
106
  overflow: auto;
107
107
 
108
- .ald-table-tr:hover {
109
- .ald-table-td {
110
- background-color: var(
111
- --alias-colors-bg-interaction-hover,
112
- rgba(0, 0, 0, 0.05)
113
- );
108
+ .ald-table-tr {
109
+ &.ald-table-row-hover:hover {
110
+ cursor: pointer;
111
+
112
+ .ald-table-td {
113
+ background-color: var(
114
+ --alias-colors-bg-interaction-hover,
115
+ rgba(0, 0, 0, 0.05)
116
+ );
117
+ }
114
118
  }
115
119
  }
116
120
  }
@@ -13,6 +13,7 @@ export interface ITableProps<TDataItem extends object> {
13
13
  pagination?: IPaginationProps;
14
14
  empty?: React.ReactNode;
15
15
  rowClassName?: (record: TDataItem, index: number) => string;
16
+ onRowClick?: (record: TDataItem, index: number) => void;
16
17
  }
17
18
  export interface ITableRef {
18
19
  scrollToFirstRow: () => void;
package/dist/Tree/Tree.js CHANGED
@@ -111,7 +111,7 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
111
111
  virtual: virtual
112
112
  }, newProps, {
113
113
  prefixCls: prefixCls,
114
- className: classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-icon-hide"), !showIcon), _defineProperty(_classNames, "".concat(prefixCls, "-block-node"), blockNode), _defineProperty(_classNames, "".concat(prefixCls, "-unselectable"), !selectable), _defineProperty(_classNames, "".concat(prefixCls, "-large"), size === 'large'), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className),
114
+ className: classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-icon-hide"), !showIcon), _defineProperty(_classNames, "".concat(prefixCls, "-block-node"), blockNode), _defineProperty(_classNames, "".concat(prefixCls, "-unselectable"), !selectable), _defineProperty(_classNames, "".concat(prefixCls, "-large"), size === 'large'), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _defineProperty(_classNames, 'ald-draggable-tree', draggable), _classNames), className),
115
115
  direction: direction,
116
116
  checkable: checkable ? /*#__PURE__*/React.createElement("span", {
117
117
  className: "".concat(prefixCls, "-checkbox-inner")
@@ -14,16 +14,16 @@
14
14
  @tree-padding-default: 4px;
15
15
  @tree-line-height-default: 16px;
16
16
  .aldCheckboxFn();
17
-
17
+ @tree-prefix-cls: ~'@{ald-prefix}-tree';
18
18
  .@{tree-prefix-cls} {
19
19
  .antTreeFn(@tree-prefix-cls);
20
20
  }
21
21
 
22
22
  .ald-tree {
23
- padding: 3px 0;
23
+ padding: 0;
24
24
 
25
- &.draggable-tree {
26
- padding: 0;
25
+ &.ald-draggable-tree {
26
+ padding: 3px 0;
27
27
  }
28
28
 
29
29
  .ald-tree-treenode.ald-tree-treenode-draggable {
@@ -68,7 +68,7 @@
68
68
  bottom: 0;
69
69
  border: 1px solid @primary-color;
70
70
  opacity: 0;
71
- animation: ant-tree-node-fx-do-not-use 0.3s;
71
+ animation: ald-tree-node-fx-do-not-use 0.3s;
72
72
  animation-play-state: running;
73
73
  animation-fill-mode: forwards;
74
74
  content: '';
@@ -165,7 +165,7 @@
165
165
  display: inline-block;
166
166
  width: 100%;
167
167
  height: 100%;
168
- // https://github.com/ant-design/ant-design/issues/31884
168
+
169
169
  &::before {
170
170
  position: absolute;
171
171
  top: 0;
@@ -229,7 +229,6 @@
229
229
  }
230
230
  }
231
231
 
232
- // https://github.com/ant-design/ant-design/issues/28217
233
232
  &-unselectable &-node-content-wrapper:hover {
234
233
  background-color: transparent;
235
234
  }
@@ -278,7 +277,6 @@
278
277
  background: @component-background;
279
278
 
280
279
  &-line-icon {
281
- // https://github.com/ant-design/ant-design/issues/32813
282
280
  vertical-align: -0.15em;
283
281
  }
284
282
  }
@@ -297,7 +295,7 @@
297
295
  }
298
296
  }
299
297
 
300
- @keyframes ant-tree-node-fx-do-not-use {
298
+ @keyframes ald-tree-node-fx-do-not-use {
301
299
  0% {
302
300
  opacity: 0;
303
301
  }
@@ -9,3 +9,18 @@
9
9
  list-style: none;
10
10
  font-feature-settings: @font-feature-settings-base;
11
11
  }
12
+
13
+ .ald-tree-list-scrollbar {
14
+ width: 6px;
15
+
16
+ .ald-tree-list-scrollbar-thumb {
17
+ background: #575757 !important;
18
+ border-radius: var(--scrollbar-size);
19
+ position: relative;
20
+ opacity: 0.2 !important;
21
+
22
+ &:hover {
23
+ opacity: 0.6 !important;
24
+ }
25
+ }
26
+ }