@bitrise/bitkit 13.264.0 → 13.266.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.264.0",
4
+ "version": "13.266.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -25,6 +25,7 @@ export interface TagsInputProps extends UsedFormControlProps {
25
25
  separator?: RegExp;
26
26
  maxCount?: number;
27
27
  invalidValues?: string[];
28
+ isInvalidItem?: (item: string) => boolean;
28
29
  errorText?: ReactNode;
29
30
  helperText?: ReactNode;
30
31
  isReadOnly?: boolean;
@@ -39,6 +40,7 @@ const TagsInput = ({
39
40
  infoTooltipLabel,
40
41
  infoTooltipProps,
41
42
  invalidValues = [],
43
+ isInvalidItem = (item: string) => invalidValues.includes(item),
42
44
  isReadOnly,
43
45
  label,
44
46
  maxCount,
@@ -114,7 +116,7 @@ const TagsInput = ({
114
116
  {value.map((item, idx) => (
115
117
  <Tag
116
118
  key={item}
117
- colorScheme={invalidValues.includes(item) || (maxCount && idx > maxCount - 1) ? 'red' : undefined}
119
+ colorScheme={isInvalidItem(item) || (maxCount && idx > maxCount - 1) ? 'red' : undefined}
118
120
  onClose={isReadOnly ? undefined : () => removeItem(item)}
119
121
  size="sm"
120
122
  >
@@ -39,12 +39,16 @@ const baseStyle = definePartsStyle({
39
39
  },
40
40
  },
41
41
  buttonContent: {
42
+ gap: '8',
43
+ display: 'flex',
44
+ },
45
+ borderBox: {
42
46
  w: '100%',
43
47
  gap: '8',
44
48
  display: 'flex',
45
49
  alignItems: 'flex-start',
46
50
  textAlign: 'start',
47
- borderTop: '1px solid',
51
+ borderBottom: '1px solid',
48
52
  borderColor: 'border/minimal',
49
53
  },
50
54
  textBlock: {
@@ -60,31 +60,33 @@ const TreeViewNodeContent = memo(
60
60
  >
61
61
  <Box sx={{ ...styles.buttonContent }}>
62
62
  {isBranch && <Icon size="16" name={isExpanded ? 'ChevronDown' : 'ChevronRight'} sx={styles.icon} />}
63
- {iconName && (
64
- <Icon
65
- size="16"
66
- name={iconName}
67
- sx={{ ...styles.icon, ...{ color: iconColor || (isSelected ? 'icon/primary' : 'icon/secondary') } }}
68
- />
69
- )}
70
- <Box sx={styles.textBlock}>
71
- <Text fontWeight={isExpanded ? 'semibold' : 'normal'}>{title}</Text>
72
- {description && (
73
- <Text textStyle="body/sm/regular" color="text/secondary">
74
- {description}
75
- </Text>
63
+ <Box sx={styles.borderBox}>
64
+ {iconName && (
65
+ <Icon
66
+ size="16"
67
+ name={iconName}
68
+ sx={{ ...styles.icon, ...{ color: iconColor || (isSelected ? 'icon/primary' : 'icon/secondary') } }}
69
+ />
76
70
  )}
77
- </Box>
78
- {(label || labelIconName) && (
79
- <Box sx={styles.suffixBlock} color={isSelected || isExpanded ? 'text/primary' : 'text/secondary'}>
80
- {labelIconName && <Icon name={labelIconName} size="16" color={labelIconColor} />}
81
- {label && (
82
- <Text textStyle="body/md/regular" textAlign="right">
83
- {label}
71
+ <Box sx={styles.textBlock}>
72
+ <Text fontWeight={isExpanded ? 'semibold' : 'normal'}>{title}</Text>
73
+ {description && (
74
+ <Text textStyle="body/sm/regular" color="text/secondary">
75
+ {description}
84
76
  </Text>
85
77
  )}
86
78
  </Box>
87
- )}
79
+ {(label || labelIconName) && (
80
+ <Box sx={styles.suffixBlock} color={isSelected || isExpanded ? 'text/primary' : 'text/secondary'}>
81
+ {labelIconName && <Icon name={labelIconName} size="16" color={labelIconColor} />}
82
+ {label && (
83
+ <Text textStyle="body/md/regular" textAlign="right">
84
+ {label}
85
+ </Text>
86
+ )}
87
+ </Box>
88
+ )}
89
+ </Box>
88
90
  {isSelected && <Box sx={styles.selectionIndicator} />}
89
91
  </Box>
90
92
  </Box>