@aloudata/aloudata-design 2.0.0-beta.3 → 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.
@@ -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
  }