@bitrise/bitkit 13.295.0 → 13.297.0

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "13.295.0",
4
+ "version": "13.297.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -8,17 +8,24 @@ const BreadcrumbTheme: SystemStyleObject = {
8
8
  },
9
9
  },
10
10
  link: {
11
+ textStyle: 'comp/link/md',
12
+ color: 'text/link',
13
+
11
14
  _activeLink: {
12
15
  _hover: {
16
+ color: 'text/body',
13
17
  textDecoration: 'none',
14
18
  },
15
19
  color: 'text/body',
16
20
  textStyle: 'body/md/semibold',
17
21
  },
18
22
  _hover: {
23
+ color: 'text/link-hover',
19
24
  textDecoration: 'underline',
20
25
  },
21
- color: 'purple.50',
26
+ _active: {
27
+ color: 'text/primary',
28
+ },
22
29
  overflow: 'hidden',
23
30
  textOverflow: 'ellipsis',
24
31
  whiteSpace: 'nowrap',
@@ -13,7 +13,19 @@ const TreeViewBranch = (props: PropsWithChildren<Omit<NodeData, 'type' | 'childr
13
13
 
14
14
  const renderTreeNodes = (nodes: NodeData[]) => {
15
15
  return nodes.map((node) => {
16
- const { id, type, title, description, iconName, iconColor, label, labelIconName, labelIconColor, children } = node;
16
+ const {
17
+ id,
18
+ type,
19
+ title,
20
+ description,
21
+ iconName,
22
+ iconColor,
23
+ label,
24
+ labelIconName,
25
+ labelIconColor,
26
+ children,
27
+ onClick,
28
+ } = node;
17
29
 
18
30
  if (type === 'branch') {
19
31
  return (
@@ -32,6 +44,7 @@ const renderTreeNodes = (nodes: NodeData[]) => {
32
44
  level={-1}
33
45
  indexPath={[]}
34
46
  titlePath={[]}
47
+ onClick={onClick}
35
48
  >
36
49
  {children && renderTreeNodes(children)}
37
50
  </TreeViewNode>
@@ -54,6 +67,7 @@ const renderTreeNodes = (nodes: NodeData[]) => {
54
67
  level={-1}
55
68
  indexPath={[]}
56
69
  titlePath={[]}
70
+ onClick={onClick}
57
71
  />
58
72
  );
59
73
  });
@@ -13,6 +13,7 @@ export type NodeData = {
13
13
  labelIconName?: TypeIconName;
14
14
  labelIconColor?: string;
15
15
  children?: NodeData[];
16
+ onClick?: VoidFunction;
16
17
  };
17
18
 
18
19
  export type NodePath = {
@@ -115,6 +115,7 @@ const TreeViewNode = ({
115
115
  label,
116
116
  labelIconName,
117
117
  labelIconColor,
118
+ onClick,
118
119
  // NodePath
119
120
  level,
120
121
  indexPath,
@@ -165,6 +166,10 @@ const TreeViewNode = ({
165
166
  },
166
167
  });
167
168
  }
169
+
170
+ if (onClick) {
171
+ onClick();
172
+ }
168
173
  }, [
169
174
  id,
170
175
  type,