@aloudata/aloudata-design 0.4.8-beta.6 → 0.4.8-beta.8

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.
@@ -1,7 +1,7 @@
1
1
  @import '../../style/index.less';
2
2
  @import './variables.less';
3
3
 
4
- .ant-btn.ald-btn {
4
+ .ald-btn {
5
5
  &.ald-btn {
6
6
  // &-loading::before{
7
7
  // // display: none !important;
@@ -14,6 +14,11 @@ var SearchSmall = function SearchSmall() {
14
14
  fill: "#EFF2F5",
15
15
  stroke: "#F9FAFB",
16
16
  strokeWidth: "5"
17
+ }), /*#__PURE__*/React.createElement("path", {
18
+ fillRule: "evenodd",
19
+ clipRule: "evenodd",
20
+ d: "M19.4074 15.3333C17.1574 15.3333 15.3333 17.1574 15.3333 19.4074C15.3333 21.6575 17.1574 23.4815 19.4074 23.4815C20.5031 23.4815 21.4978 23.0489 22.23 22.3453C22.2466 22.3241 22.2646 22.3037 22.2842 22.2842C22.3037 22.2646 22.3241 22.2466 22.3453 22.23C23.0489 21.4978 23.4815 20.5031 23.4815 19.4074C23.4815 17.1574 21.6575 15.3333 19.4074 15.3333ZM23.6734 22.7306C24.3887 21.8138 24.8148 20.6603 24.8148 19.4074C24.8148 16.421 22.3938 14 19.4074 14C16.421 14 14 16.421 14 19.4074C14 22.3938 16.421 24.8148 19.4074 24.8148C20.6603 24.8148 21.8138 24.3887 22.7306 23.6734L24.8619 25.8047C25.1223 26.0651 25.5444 26.0651 25.8047 25.8047C26.0651 25.5444 26.0651 25.1223 25.8047 24.8619L23.6734 22.7306Z",
21
+ fill: "#667085"
17
22
  }));
18
23
  };
19
24
 
@@ -46,12 +46,23 @@
46
46
  width:160px;
47
47
  height: 160px;
48
48
  }
49
+
50
+ .ald-empty-title{
51
+ margin-top: 20px;
52
+ }
49
53
  }
50
54
 
51
55
  &.ald-empty-small{
56
+ padding:24px;
57
+
52
58
  .ald-empty-image-wrap{
53
59
  width:40px;
54
60
  height: 40px;
61
+
62
+ }
63
+
64
+ .ald-empty-title{
65
+ margin-top: 12px;
55
66
  }
56
67
  }
57
68
  }
@@ -1670,4 +1670,36 @@ export default [{
1670
1670
  "categoryCN": "线性",
1671
1671
  "author": "阿广",
1672
1672
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\"><path fill=\"#000\" d=\"M3.75 2.25h16.5a1.5 1.5 0 0 1 1.5 1.5v16.5a1.5 1.5 0 0 1-1.5 1.5H3.75a1.5 1.5 0 0 1-1.5-1.5V3.75a1.5 1.5 0 0 1 1.5-1.5Zm3.75 4.5v-3H3.75v3H7.5Zm12.75 1.5H9v5.25h11.25V8.25ZM3.75 13.5H7.5V8.25H3.75v5.25ZM7.5 15H3.75v5.25H7.5V15ZM9 15v5.25h11.25V15H9ZM20.25 3.75H9v3h11.25v-3Z\" clip-rule=\"evenodd\" fill-rule=\"evenodd\" data-follow-fill=\"#000\"></path></svg>"
1673
+ }, {
1674
+ "id": 209,
1675
+ "title": "圆点-小号-填充",
1676
+ "name": "dot-s-fill",
1677
+ "category": "Fill",
1678
+ "categoryCN": "填充",
1679
+ "author": "阿广",
1680
+ "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\"><path fill=\"#000\" d=\"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z\" data-follow-fill=\"#000\"></path></svg>"
1681
+ }, {
1682
+ "id": 210,
1683
+ "title": "定时-线性",
1684
+ "name": "timing-line",
1685
+ "category": "Line",
1686
+ "categoryCN": "线性",
1687
+ "author": "阿广",
1688
+ "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\"><path stroke-width=\"1.5\" stroke=\"#000\" d=\"M12 5.25v7.5h5.25\" data-follow-stroke=\"#000\"></path><path fill=\"#000\" d=\"M5.085 7.5H9V9H3V3h1.5v2.76A9.75 9.75 0 0 1 21.75 12h-1.5A8.25 8.25 0 0 0 5.085 7.5Zm13.83 9H15V15h6v6h-1.5v-2.76A9.75 9.75 0 0 1 2.25 12h1.5a8.25 8.25 0 0 0 15.165 4.5Z\" clip-rule=\"evenodd\" fill-rule=\"evenodd\" data-follow-fill=\"#000\"></path></svg>"
1689
+ }, {
1690
+ "id": 211,
1691
+ "title": "明细加速-线性",
1692
+ "name": "details-accelerate-line",
1693
+ "category": "Line",
1694
+ "categoryCN": "线性",
1695
+ "author": "阿广",
1696
+ "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\"><path fill=\"#000\" d=\"M6.75 4.5H1.5V6h5.25V4.5ZM6.75 18H1.5v1.5h5.25V18ZM6.75 11.25H1.5v1.5h5.25v-1.5ZM11.707 22.44a.75.75 0 0 1-.45-.802l1.366-8.887H9a.75.75 0 0 1-.75-.923l2.25-9.75a.75.75 0 0 1 .75-.577h7.5a.75.75 0 0 1 .735.915L18.188 8.25h3.562a.75.75 0 0 1 .675.42.75.75 0 0 1-.082.75l-9.75 12.75a.75.75 0 0 1-.593.33.818.818 0 0 1-.293-.06Zm4.605-12.69 1.5-6.75H11.85l-1.905 8.25h4.432l-1.192 7.71 7.065-9.21h-3.938Z\" data-follow-fill=\"#000\"></path></svg>"
1697
+ }, {
1698
+ "id": 212,
1699
+ "title": "聚合加速-线性",
1700
+ "name": "polymerization-accelerate-line",
1701
+ "category": "Line",
1702
+ "categoryCN": "线性",
1703
+ "author": "阿广",
1704
+ "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\"><path stroke-linejoin=\"round\" stroke-width=\"1.5\" stroke=\"#000\" d=\"M6.75 5.25h-4.5v13.5h4.5\" data-follow-stroke=\"#000\"></path><path fill=\"#000\" d=\"M11.707 22.44a.75.75 0 0 1-.45-.802l1.366-8.888H9a.75.75 0 0 1-.75-.922l2.25-9.75a.75.75 0 0 1 .75-.578h7.5a.75.75 0 0 1 .735.915L18.188 8.25h3.562a.75.75 0 0 1 .675.42.75.75 0 0 1-.082.75l-9.75 12.75a.75.75 0 0 1-.593.33.82.82 0 0 1-.293-.06Zm4.605-12.69 1.5-6.75H11.85l-1.905 8.25h4.432l-1.192 7.71 7.065-9.21h-3.938Z\" data-follow-fill=\"#000\"></path></svg>"
1673
1705
  }];
@@ -222,7 +222,7 @@
222
222
  }
223
223
 
224
224
  .ald-input-group-large {
225
- .ald-input {
225
+ &:not(.ant-input-group-compact) .ald-input {
226
226
  height: @input-height-large;
227
227
  padding: @input-padding-large;
228
228
  font-size: @input-font-size-large;
@@ -236,21 +236,26 @@
236
236
  }
237
237
  }
238
238
 
239
- &.ant-input-group-compact {
240
- .ald-input {
241
- &:first-of-type {
242
- border-radius: @input-border-radius-large 0 0 @input-border-radius-large;
243
- }
244
-
245
- &:last-of-type {
246
- border-radius: 0 @input-border-radius-large @input-border-radius-large 0;
247
- }
239
+ &.ant-input-group-compact{
240
+ .ald-input,.ald-select,.ald-btn.ant-btn{
241
+ border-radius: 0;
248
242
  }
249
243
  }
244
+
245
+ &.ant-input-group-compact>*:first-child{
246
+ border-start-start-radius: @input-border-radius-large !important;
247
+ border-end-start-radius: @input-border-radius-large !important;
248
+ }
249
+
250
+ &.ant-input-group-compact>*:last-child{
251
+ border-inline-end-width: 1px;
252
+ border-start-end-radius: @input-border-radius-large !important;
253
+ border-end-end-radius: @input-border-radius-large !important;
254
+ }
250
255
  }
251
256
 
252
257
  .ald-input-group-middle {
253
- .ald-input {
258
+ &:not(.ant-input-group-compact) .ald-input {
254
259
  height: @input-height-middle;
255
260
  padding: @input-padding-middle;
256
261
  font-size: @input-font-size-middle;
@@ -265,21 +270,26 @@
265
270
  }
266
271
  }
267
272
 
268
- &.ant-input-group-compact {
269
- .ald-input {
270
- &:first-of-type {
271
- border-radius: @input-border-radius-middle 0 0 @input-border-radius-middle;
272
- }
273
-
274
- &:last-of-type {
275
- border-radius: 0 @input-border-radius-middle @input-border-radius-middle 0;
276
- }
273
+ &.ant-input-group-compact{
274
+ .ald-input,.ald-select,.ald-btn.ant-btn{
275
+ border-radius: 0;
277
276
  }
278
277
  }
278
+
279
+ &.ant-input-group-compact>*:first-child{
280
+ border-start-start-radius: @input-border-radius-middle !important;
281
+ border-end-start-radius: @input-border-radius-middle !important;
282
+ }
283
+
284
+ &.ant-input-group-compact>*:last-child{
285
+ border-inline-end-width: 1px;
286
+ border-start-end-radius: @input-border-radius-middle !important;
287
+ border-end-end-radius: @input-border-radius-middle !important;
288
+ }
279
289
  }
280
290
 
281
291
  .ald-input-group-small {
282
- .ald-input {
292
+ &:not(.ant-input-group-compact) .ald-input {
283
293
  height: @input-height-small;
284
294
  padding: @input-padding-small;
285
295
  font-size: @input-font-size-small;
@@ -294,17 +304,22 @@
294
304
  }
295
305
  }
296
306
 
297
- &.ant-input-group-compact {
298
- .ald-input {
299
- &:first-of-type {
300
- border-radius: @input-border-radius-small 0 0 @input-border-radius-small;
301
- }
302
-
303
- &:last-of-type {
304
- border-radius: 0 @input-border-radius-small @input-border-radius-small 0;
305
- }
307
+ &.ant-input-group-compact{
308
+ .ald-input,.ald-select,.ald-btn.ant-btn{
309
+ border-radius: 0;
306
310
  }
307
311
  }
312
+
313
+ &.ant-input-group-compact>*:first-child{
314
+ border-start-start-radius: @input-border-radius-small !important;
315
+ border-end-start-radius: @input-border-radius-small !important;
316
+ }
317
+
318
+ &.ant-input-group-compact>*:last-child{
319
+ border-inline-end-width: 1px;
320
+ border-start-end-radius: @input-border-radius-small !important;
321
+ border-end-end-radius: @input-border-radius-small !important;
322
+ }
308
323
  }
309
324
 
310
325
  .ald-textarea-large {
@@ -2,7 +2,7 @@
2
2
  @import '../../Icon/index.less';
3
3
  @import './dropdown.less';
4
4
 
5
- .ald-menu.ant-menu {
5
+ .ald-menu-light.ald-menu.ant-menu {
6
6
  &.ant-menu-root.ant-menu-vertical {
7
7
  border: none;
8
8
  }
@@ -23,7 +23,7 @@
23
23
  transition: none;
24
24
 
25
25
  &:hover {
26
- background-color: @BG90 !important;
26
+ background-color: @BG90;
27
27
  }
28
28
 
29
29
  &:active {
@@ -85,12 +85,13 @@ var OriginModal = function OriginModal(props) {
85
85
  }, subTitle))),
86
86
  className: classNames('ald-modal', className),
87
87
  okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
88
- cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary', okType),
88
+ cancelButtonProps: getButtonProps(cancelButtonProps, 'secondary'),
89
89
  okText: okText,
90
90
  cancelText: cancelText,
91
91
  width: width || DEFAULT_WIDTH,
92
92
  closeIcon: closeIcon || /*#__PURE__*/React.createElement(CloseLLine, {
93
93
  size: 16,
94
+ fill: theme.NL40,
94
95
  className: "ald-modal-close"
95
96
  })
96
97
  }), children);
@@ -9,12 +9,14 @@ export default function MultipleList(params) {
9
9
  className = params.className;
10
10
 
11
11
  var onClick = function onClick() {
12
- //TODO: 这里有bug 等待antd升级 https://github.com/ant-design/ant-design/pull/39078
12
+ if (disabled) return;
13
13
  onChange === null || onChange === void 0 ? void 0 : onChange(!selected);
14
14
  };
15
15
 
16
16
  return /*#__PURE__*/React.createElement("div", {
17
- className: classnames('ald-multiple-option', className),
17
+ className: classnames('ald-multiple-option', className, {
18
+ 'ald-multiple-option-disabled': disabled
19
+ }),
18
20
  onClick: onClick
19
21
  }, /*#__PURE__*/React.createElement(Checkbox, {
20
22
  checked: selected,
@@ -16,7 +16,9 @@ export default function SingleOption(params) {
16
16
  };
17
17
 
18
18
  return /*#__PURE__*/React.createElement("div", {
19
- className: classnames('ald-single-option', className),
19
+ className: classnames('ald-single-option', className, {
20
+ 'ald-single-option-disabled': disabled
21
+ }),
20
22
  onClick: onClick
21
23
  }, /*#__PURE__*/React.createElement("div", {
22
24
  className: "ald-icons-check-line"
@@ -32,7 +32,7 @@ import { FoldDownFill } from '@aloudata/icons-react';
32
32
  import { Select as AntdSelect } from 'antd';
33
33
  import classNames from 'classnames';
34
34
  import List from 'rc-virtual-list';
35
- import React, { forwardRef, useEffect, useLayoutEffect, useMemo } from 'react';
35
+ import React, { forwardRef, useEffect, useLayoutEffect, useMemo, useRef } from 'react';
36
36
  import Empty from "../Empty";
37
37
  import MultipleOption from "./components/MultipleOption";
38
38
  import SingleOption from "./components/SingleOption";
@@ -102,7 +102,11 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
102
102
  _props$listItemHeight = props.listItemHeight,
103
103
  listItemHeight = _props$listItemHeight === void 0 ? 36 : _props$listItemHeight,
104
104
  _props$notFoundConten = props.notFoundContent,
105
- notFoundContent = _props$notFoundConten === void 0 ? /*#__PURE__*/React.createElement(Empty, null) : _props$notFoundConten,
105
+ notFoundContent = _props$notFoundConten === void 0 ? /*#__PURE__*/React.createElement(Empty, {
106
+ image: Empty.PRESENTED_IMAGE_SEARCH_SMALL,
107
+ size: "small",
108
+ title: "No data"
109
+ }) : _props$notFoundConten,
106
110
  value = props.value,
107
111
  _props$style = props.style,
108
112
  style = _props$style === void 0 ? {} : _props$style,
@@ -129,6 +133,8 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
129
133
  prefixWidth = _React$useState6[0],
130
134
  setPrefixWidth = _React$useState6[1];
131
135
 
136
+ var updatedRef = useRef(false);
137
+
132
138
  var onMultipleOptionChange = function onMultipleOptionChange(option, selected) {
133
139
  var newOptions = [];
134
140
 
@@ -291,7 +297,11 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
291
297
  };
292
298
 
293
299
  useEffect(function () {
294
- setSelectedOptions(getSelectedOptionsFromValue(isMultiple, options, value));
300
+ if (updatedRef.current) {
301
+ setSelectedOptions(getSelectedOptionsFromValue(isMultiple, options, value));
302
+ } else {
303
+ updatedRef.current = true;
304
+ }
295
305
  }, [value]);
296
306
  return /*#__PURE__*/React.createElement("div", {
297
307
  className: classNames('ald-select', className, {
@@ -26,7 +26,11 @@
26
26
  background-color: @BG100;
27
27
  // padding: 0 4px;
28
28
  cursor: pointer;
29
- width:100%;
29
+ width: 100%;
30
+
31
+ .ant-select-selector {
32
+ color: @NL0;
33
+ }
30
34
 
31
35
  .ald-select-prefix {
32
36
  color: @NL40;
@@ -51,7 +55,6 @@
51
55
  border: none;
52
56
  }
53
57
  }
54
-
55
58
  }
56
59
 
57
60
  .ant-select-selection-overflow {
@@ -21,6 +21,15 @@
21
21
  &:hover{
22
22
  background-color: @BG90;
23
23
  }
24
+
25
+ &.ald-multiple-option-disabled{
26
+ opacity: 0.5;
27
+
28
+ &:hover{
29
+ background: none;
30
+ cursor: default;
31
+ }
32
+ }
24
33
  }
25
34
 
26
35
  .ald-multiple-option-label{
@@ -25,5 +25,14 @@
25
25
  .ald-single-option-text{
26
26
  white-space: nowrap;
27
27
  }
28
+
29
+ &.ald-single-option-disabled{
30
+ opacity: 0.5;
31
+
32
+ &:hover{
33
+ background: none;
34
+ cursor: default;
35
+ }
36
+ }
28
37
  }
29
38
  }
@@ -63,8 +63,10 @@
63
63
  &-thead {
64
64
  flex: 1;
65
65
  overflow: hidden;
66
- font-size: 14px;
66
+ font-size: 13px;
67
67
  font-weight: 600;
68
+ background-color: @BG80;
69
+ mix-blend-mode: multiply;
68
70
 
69
71
  .ald-table-row {
70
72
  min-width: 9999px; // 防止拖动时的闪动
@@ -76,7 +78,6 @@
76
78
  padding: 6px 16px;
77
79
  color: @NL0;
78
80
  line-height: 20px;
79
- background-color: @BG80;
80
81
  height: 100%;
81
82
 
82
83
  .ald-table-cell-content {
@@ -92,7 +93,7 @@
92
93
  z-index: 1;
93
94
  display: inline-block;
94
95
  width: 12px;
95
- height: 14px;
96
+ height: 1em;
96
97
  transform: translateY(-50%);
97
98
  touch-action: none;
98
99
 
@@ -101,6 +102,7 @@
101
102
  width: 1px;
102
103
  height: 100%;
103
104
  background-color: @BG70;
105
+ mix-blend-mode: multiply;
104
106
  content: '';
105
107
  }
106
108
  }
@@ -130,7 +132,7 @@
130
132
  display: flex;
131
133
  align-items: center;
132
134
  padding-left: 16px;
133
- color: @NL40;
135
+ color: @NL0;
134
136
 
135
137
  .ald-table-cell-container {
136
138
  width: 100%;
@@ -192,8 +194,8 @@
192
194
 
193
195
  &-left {
194
196
  color: @NL0;
195
- font-weight: 500;
196
- font-size: 14px;
197
+ font-weight: 600;
198
+ font-size: 13px;
197
199
  }
198
200
 
199
201
  &-right {
@@ -202,7 +204,7 @@
202
204
  justify-content: flex-end;
203
205
  height: 28px;
204
206
  color: @NL0;
205
- font-size: 14px;
207
+ font-size: 13px;
206
208
  }
207
209
  }
208
210
 
@@ -39,6 +39,7 @@ export interface ITabsProps extends Omit<TabsProps, 'size'> {
39
39
  tabPosition?: 'left' | 'right' | 'top' | 'bottom';
40
40
  className?: string;
41
41
  children?: React.ReactNode;
42
+ headerBackgroundColor?: string;
42
43
  }
43
44
  declare function Tabs(props: ITabsProps): JSX.Element;
44
45
  declare namespace Tabs {
@@ -1,4 +1,4 @@
1
- var _excluded = ["size", "className", "popupClassName", "adaptHeight"];
1
+ var _excluded = ["size", "className", "popupClassName", "adaptHeight", "style", "headerBackgroundColor"];
2
2
 
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -23,6 +23,9 @@ export default function Tabs(props) {
23
23
  className = props.className,
24
24
  popupClassName = props.popupClassName,
25
25
  adaptHeight = props.adaptHeight,
26
+ _props$style = props.style,
27
+ style = _props$style === void 0 ? {} : _props$style,
28
+ headerBackgroundColor = props.headerBackgroundColor,
26
29
  otherProps = _objectWithoutProperties(props, _excluded);
27
30
 
28
31
  var tabsProps = _objectSpread({}, otherProps);
@@ -37,6 +40,9 @@ export default function Tabs(props) {
37
40
  }, /*#__PURE__*/React.createElement(MoreVerticalLine, {
38
41
  color: "currentColor"
39
42
  })),
43
+ style: Object.assign(style, {
44
+ "--header-bg-color": headerBackgroundColor
45
+ }),
40
46
  tabBarGutter: 24,
41
47
  popupClassName: classNames(popupClassName, 'ald-tabs-dropdown'),
42
48
  className: classNames('ald-tabs', className, {
@@ -22,6 +22,10 @@
22
22
  .ant-tabs.ald-tabs {
23
23
  &.ant-tabs {
24
24
  color: @NL40;
25
+
26
+ .ant-tabs-nav {
27
+ background-color: var(--header-bg-color);
28
+ }
25
29
  }
26
30
 
27
31
  .ant-tabs-tab {
@@ -125,7 +129,7 @@
125
129
  &.ant-tabs-bottom > .ant-tabs-nav,
126
130
  &.ant-tabs-top > div > .ant-tabs-nav,
127
131
  &.ant-tabs-bottom > div > .ant-tabs-nav {
128
- margin: 0 0 20px;
132
+ margin: 0 0 16px;
129
133
 
130
134
  &::before {
131
135
  border-color: @BG70;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloudata/aloudata-design",
3
- "version": "0.4.8-beta.6",
3
+ "version": "0.4.8-beta.8",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -50,8 +50,8 @@
50
50
  ]
51
51
  },
52
52
  "dependencies": {
53
- "@aloudata/icons-react": "0.1.5",
54
- "@aloudata/icons-svg": "0.1.5",
53
+ "@aloudata/icons-react": "0.1.7",
54
+ "@aloudata/icons-svg": "0.1.7",
55
55
  "antd": "5.2.0",
56
56
  "memoize-one": "^6.0.0",
57
57
  "rc-menu": "^9.8.0",