@bitrise/bitkit 13.328.0 → 13.329.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
|
@@ -15,14 +15,14 @@ const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpe
|
|
|
15
15
|
'leafBadge',
|
|
16
16
|
]);
|
|
17
17
|
|
|
18
|
-
const baseStyle = definePartsStyle({
|
|
18
|
+
const baseStyle = definePartsStyle(({ variant, isEmpty }) => ({
|
|
19
19
|
listItem: {
|
|
20
20
|
overflow: 'hidden',
|
|
21
21
|
},
|
|
22
22
|
icon: {
|
|
23
23
|
marginTop: '10px',
|
|
24
24
|
marginBottom: '2px',
|
|
25
|
-
color: 'icon/primary',
|
|
25
|
+
color: isEmpty ? 'icon/disabled' : 'icon/primary',
|
|
26
26
|
},
|
|
27
27
|
leafBadge: {
|
|
28
28
|
marginTop: '10px',
|
|
@@ -92,7 +92,7 @@ const baseStyle = definePartsStyle({
|
|
|
92
92
|
display: 'flex',
|
|
93
93
|
alignItems: 'flex-start',
|
|
94
94
|
textAlign: 'start',
|
|
95
|
-
borderBottom: '1px solid',
|
|
95
|
+
borderBottom: variant === 'files' ? 'none' : '1px solid',
|
|
96
96
|
borderColor: 'border/minimal',
|
|
97
97
|
},
|
|
98
98
|
textBlock: {
|
|
@@ -102,6 +102,13 @@ const baseStyle = definePartsStyle({
|
|
|
102
102
|
py: '8',
|
|
103
103
|
gap: '4',
|
|
104
104
|
flex: '1',
|
|
105
|
+
color: isEmpty ? 'text/tertiary' : 'text/body',
|
|
106
|
+
'& > .description-text': {
|
|
107
|
+
wordBreak: 'break-word',
|
|
108
|
+
overflowWrap: 'break-word',
|
|
109
|
+
textStyle: 'body/sm/regular',
|
|
110
|
+
color: 'text/secondary',
|
|
111
|
+
},
|
|
105
112
|
},
|
|
106
113
|
suffixBlock: {
|
|
107
114
|
display: 'flex',
|
|
@@ -144,7 +151,7 @@ const baseStyle = definePartsStyle({
|
|
|
144
151
|
display: 'none',
|
|
145
152
|
alignItems: 'center',
|
|
146
153
|
},
|
|
147
|
-
});
|
|
154
|
+
}));
|
|
148
155
|
|
|
149
156
|
const TreeViewTheme = defineMultiStyleConfig({
|
|
150
157
|
baseStyle,
|
|
@@ -49,13 +49,18 @@ const TreeViewNodeContent = memo(
|
|
|
49
49
|
onClick,
|
|
50
50
|
children,
|
|
51
51
|
}: TreeViewNodeContentProps) => {
|
|
52
|
-
const styles = useMultiStyleConfig('TreeView', {});
|
|
53
52
|
const { variant } = useTreeViewContext();
|
|
54
53
|
|
|
55
54
|
const isFilesVariant = variant === 'files';
|
|
56
55
|
const hasChildren = Boolean(children);
|
|
57
|
-
const isSelectable = !(isBranch && !hasChildren);
|
|
58
56
|
const isEmptyBranch = isBranch && !hasChildren;
|
|
57
|
+
const isSelectable = !isEmptyBranch;
|
|
58
|
+
|
|
59
|
+
const styles = useMultiStyleConfig('TreeView', {
|
|
60
|
+
variant,
|
|
61
|
+
isEmpty: isEmptyBranch,
|
|
62
|
+
});
|
|
63
|
+
|
|
59
64
|
const chevronIcon = isExpanded ? 'ChevronDown' : 'ChevronRight';
|
|
60
65
|
const primaryIconName = isFilesVariant ? 'FolderEmpty' : chevronIcon;
|
|
61
66
|
|
|
@@ -137,16 +142,7 @@ const TreeViewNodeContent = memo(
|
|
|
137
142
|
<Text fontWeight={isExpanded ? 'semibold' : 'normal'} overflowWrap="break-word" wordBreak="break-word">
|
|
138
143
|
{title}
|
|
139
144
|
</Text>
|
|
140
|
-
{description &&
|
|
141
|
-
<Text
|
|
142
|
-
color="text/secondary"
|
|
143
|
-
wordBreak="break-word"
|
|
144
|
-
overflowWrap="break-word"
|
|
145
|
-
textStyle="body/sm/regular"
|
|
146
|
-
>
|
|
147
|
-
{description}
|
|
148
|
-
</Text>
|
|
149
|
-
)}
|
|
145
|
+
{description && <Text className="description-text">{description}</Text>}
|
|
150
146
|
</Box>
|
|
151
147
|
|
|
152
148
|
{(hasLabelContent || hasHoverActions) && (
|