@aloudata/aloudata-design 2.0.0-beta.4 → 2.0.0-beta.5

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.
@@ -78,6 +78,7 @@
78
78
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05),
79
79
  0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
80
80
  overflow: hidden;
81
+ padding: 4px 0;
81
82
  }
82
83
  // dropdown的容器
83
84
  .ant-dropdown.ant-dropdown {
@@ -10,9 +10,9 @@ var Search = function Search() {
10
10
  }, /*#__PURE__*/React.createElement("rect", {
11
11
  width: "240",
12
12
  height: "240",
13
- fill: "url(#pattern0)"
13
+ fill: "url(#patternSearch)"
14
14
  }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("pattern", {
15
- id: "pattern0",
15
+ id: "patternSearch",
16
16
  patternContentUnits: "objectBoundingBox",
17
17
  width: "1",
18
18
  height: "1"
@@ -9,9 +9,9 @@ var SearchSmall = function SearchSmall() {
9
9
  }, /*#__PURE__*/React.createElement("rect", {
10
10
  width: "40",
11
11
  height: "40",
12
- fill: "url(#pattern0)"
12
+ fill: "url(#patternSmall)"
13
13
  }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("pattern", {
14
- id: "pattern0",
14
+ id: "patternSmall",
15
15
  patternContentUnits: "objectBoundingBox",
16
16
  width: "1",
17
17
  height: "1"
@@ -2,12 +2,10 @@
2
2
  // 纯input 输入框,比如普通的<Input /> <Input.textarea />
3
3
  &:not(.ant-input-affix-wrapper) {
4
4
  box-shadow: none;
5
- width: auto;
6
5
  }
7
6
  // 带有其他内容的输入框,比如带 allowClear图标、prefix、suffix、密码图标等。
8
7
  &.ant-input-affix-wrapper {
9
8
  box-shadow: none;
10
- width: auto;
11
9
  // 输入框
12
10
  .ant-input.ant-input {
13
11
  color: inherit;
@@ -4,8 +4,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
4
4
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
5
  import classnames from 'classnames';
6
6
  import React from 'react';
7
- import Button from "../../Button";
8
7
  import Checkbox from "../../Checkbox";
8
+ import TextLink from "../../TextLink/index";
9
9
  import { getAccount, getId, getPhoto } from "../utils";
10
10
  import { isUserGroup } from "../utils/getUsersWithUserId";
11
11
  import NickLabel from "./NickLabel";
@@ -36,8 +36,7 @@ export default function MultipleList(params) {
36
36
  name: user.name,
37
37
  photo: getPhoto(user),
38
38
  account: getAccount(user)
39
- })), isUserGroup(user) && hasNextLevel && /*#__PURE__*/React.createElement(Button, {
40
- type: "link",
39
+ })), isUserGroup(user) && hasNextLevel && /*#__PURE__*/React.createElement(TextLink, {
41
40
  className: "ald-member-picker-btn",
42
41
  onClick: function onClick(e) {
43
42
  onNextLevel === null || onNextLevel === void 0 ? void 0 : onNextLevel(user);
@@ -6,6 +6,7 @@
6
6
  @import '../../Empty/style/index.less';
7
7
  @import '../../message/style/index.less';
8
8
  @import '../../Spin/style/index.less';
9
+ @import '../../TextLink/style/index.less';
9
10
 
10
11
  @btnWidth: 30px;
11
12
 
@@ -308,8 +309,11 @@
308
309
  align-items: center;
309
310
  }
310
311
 
311
- .ald-select-popup.ald-member-picker-popup.ald-member-picker-popup {
312
+ .ald-select-popup.ald-member-picker-popup.ald-member-picker-popup.ald-member-picker-popup {
312
313
  border: none;
313
314
  background-color: transparent;
314
315
  overflow: hidden;
316
+ padding: 0;
317
+ box-shadow: none;
318
+ border-radius: 0;
315
319
  }
@@ -364,7 +364,6 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
364
364
  updatedRef.current = true;
365
365
  }
366
366
  }, [value, innerOptions, isMultiple, defaultValue]);
367
- console.log(value, !_.isEmpty(value !== null && value !== void 0 ? value : currentValue), 'value');
368
367
  return /*#__PURE__*/React.createElement("div", {
369
368
  onMouseDown: function onMouseDown() {
370
369
  if (disabled) return;
@@ -7,7 +7,8 @@ import React from 'react';
7
7
  function TextLink(props) {
8
8
  var _classNames;
9
9
  var propsSize = props.size,
10
- type = props.type,
10
+ _props$type = props.type,
11
+ type = _props$type === void 0 ? 'primary' : _props$type,
11
12
  underline = props.underline,
12
13
  disabled = props.disabled,
13
14
  _props$icon = props.icon,
@@ -19,9 +19,6 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
19
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
20
  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; }
21
21
  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; }
22
- import FileOutlined from '@ant-design/icons/FileOutlined';
23
- import FolderOpenOutlined from '@ant-design/icons/FolderOpenOutlined';
24
- import FolderOutlined from '@ant-design/icons/FolderOutlined';
25
22
  import classNames from 'classnames';
26
23
  import { conductExpandParent } from 'rc-tree/lib/util';
27
24
  import { convertDataToEntities, convertTreeToData } from 'rc-tree/lib/utils/treeUtil';
@@ -29,14 +26,6 @@ import * as React from 'react';
29
26
  import { ConfigContext } from "../ConfigProvider";
30
27
  import Tree from "./Tree";
31
28
  import { calcRangeKeys, convertDirectoryKeysToNodes } from "./utils/dictUtil";
32
- function getIcon(props) {
33
- var isLeaf = props.isLeaf,
34
- expanded = props.expanded;
35
- if (isLeaf) {
36
- return /*#__PURE__*/React.createElement(FileOutlined, null);
37
- }
38
- return expanded ? /*#__PURE__*/React.createElement(FolderOpenOutlined, null) : /*#__PURE__*/React.createElement(FolderOutlined, null);
39
- }
40
29
  function getTreeData(_ref) {
41
30
  var treeData = _ref.treeData,
42
31
  children = _ref.children;
@@ -154,7 +143,6 @@ var DirectoryTree = function DirectoryTree(_ref2, ref) {
154
143
  var prefixCls = getPrefixCls('tree', customizePrefixCls);
155
144
  var connectClassName = classNames("".concat(prefixCls, "-directory"), _defineProperty({}, "".concat(prefixCls, "-directory-rtl"), direction === 'rtl'), className);
156
145
  return /*#__PURE__*/React.createElement(Tree, _extends({
157
- icon: getIcon,
158
146
  ref: ref,
159
147
  blockNode: true
160
148
  }, otherProps, {
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const App: React.FC;
3
+ export default App;
@@ -0,0 +1,44 @@
1
+ import { Tree } from "../../..";
2
+ import React from 'react';
3
+ var DirectoryTree = Tree.DirectoryTree;
4
+ var treeData = [{
5
+ title: 'parent 0',
6
+ key: '0-0',
7
+ children: [{
8
+ title: 'leaf 0-0',
9
+ key: '0-0-0',
10
+ isLeaf: true
11
+ }, {
12
+ title: 'leaf 0-1',
13
+ key: '0-0-1',
14
+ isLeaf: true
15
+ }]
16
+ }, {
17
+ title: 'parent 1',
18
+ key: '0-1',
19
+ children: [{
20
+ title: 'leaf 1-0',
21
+ key: '0-1-0',
22
+ isLeaf: true
23
+ }, {
24
+ title: 'leaf 1-1',
25
+ key: '0-1-1',
26
+ isLeaf: true
27
+ }]
28
+ }];
29
+ var App = function App() {
30
+ var onSelect = function onSelect(keys, info) {
31
+ console.log('Trigger Select', keys, info);
32
+ };
33
+ var onExpand = function onExpand(keys, info) {
34
+ console.log('Trigger Expand', keys, info);
35
+ };
36
+ return /*#__PURE__*/React.createElement(DirectoryTree, {
37
+ multiple: true,
38
+ defaultExpandAll: true,
39
+ onSelect: onSelect,
40
+ onExpand: onExpand,
41
+ treeData: treeData
42
+ });
43
+ };
44
+ export default App;
@@ -6,7 +6,7 @@
6
6
  @import './reset.less';
7
7
  @import './checkbox.less';
8
8
 
9
- @tree-font-size-large: 13px;
9
+ @tree-font-size-large: 14px;
10
10
  @tree-padding-large: 6px 4px;
11
11
  @tree-line-height-large: 20px;
12
12
 
@@ -22,6 +22,10 @@
22
22
  .ald-tree {
23
23
  padding: 3px 0;
24
24
 
25
+ &.draggable-tree {
26
+ padding: 0;
27
+ }
28
+
25
29
  .ald-tree-treenode.ald-tree-treenode-draggable {
26
30
  .ald-tree-draggable-icon {
27
31
  opacity: 1;
@@ -34,8 +38,7 @@
34
38
  align-items: center;
35
39
  font-size: @tree-font-size-default;
36
40
  font-weight: 400;
37
- color: #171717;
38
- width: 100%;
41
+ color: var(--alias-colors-text-default, #1f2937);
39
42
 
40
43
  .ald-tree-draggable-icon {
41
44
  display: inline-flex;
@@ -71,11 +74,10 @@
71
74
 
72
75
  .ald-tree-title {
73
76
  line-height: @tree-line-height-default;
74
- border-radius: 2px;
75
77
  display: inline-flex;
76
78
  align-items: center;
77
79
  justify-content: space-between;
78
- color: #171717;
80
+ color: var(--alias-colors-text-default, #1f2937);
79
81
  flex: 1;
80
82
 
81
83
  .ald-tree-tab-leader {
@@ -87,13 +89,21 @@
87
89
  }
88
90
 
89
91
  &:hover {
90
- background: var(--colors-gray-97, #f8f8f8);
92
+ background: var(--alias-colors-bg-interaction-hover, rgba(0, 0, 0, 0.05));
91
93
  mix-blend-mode: multiply;
92
94
  }
93
95
 
94
96
  &.ald-tree-node-selected {
95
- border-radius: 2px;
96
- background: var(--colors-blue-100, #f0f6ff);
97
+ border-radius: var(--alias-radius-75, 6px);
98
+ background: var(--alias-colors-bg-selected-default, #e8f2fe);
99
+ }
100
+ }
101
+
102
+ &.ald-tree-treenode-disabled {
103
+ .ald-tree-node-content-wrapper {
104
+ &:hover {
105
+ background: inherit;
106
+ }
97
107
  }
98
108
  }
99
109
  }