@bitrise/bitkit 12.52.4 → 12.52.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.
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system';
|
|
2
2
|
import { rem } from '../../utils/utils';
|
|
3
|
+
import { TagProps } from './Tag';
|
|
3
4
|
|
|
4
5
|
const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers([
|
|
5
6
|
'container',
|
|
@@ -10,35 +11,46 @@ const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpe
|
|
|
10
11
|
]);
|
|
11
12
|
|
|
12
13
|
const sizes = {
|
|
13
|
-
sm: definePartsStyle({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
sm: definePartsStyle((props) => {
|
|
15
|
+
const { onClose, iconName, withIcon } = props as TagProps;
|
|
16
|
+
const leftIcon = iconName || withIcon;
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
container: {
|
|
20
|
+
paddingLeft: leftIcon ? rem(4) : rem(8),
|
|
21
|
+
paddingRight: onClose ? rem(2) : rem(8),
|
|
22
|
+
paddingY: onClose ? rem(2) : rem(4),
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
fontSize: rem(12),
|
|
26
|
+
lineHeight: rem(16),
|
|
27
|
+
},
|
|
28
|
+
closeButton: {
|
|
29
|
+
height: '20',
|
|
30
|
+
width: '20',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
27
33
|
}),
|
|
28
|
-
md: definePartsStyle({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
md: definePartsStyle((props) => {
|
|
35
|
+
const { onClose, iconName, withIcon } = props as TagProps;
|
|
36
|
+
const leftIcon = iconName || withIcon;
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
container: {
|
|
40
|
+
paddingLeft: leftIcon ? rem(6) : rem(12),
|
|
41
|
+
paddingRight: onClose ? rem(4) : rem(12),
|
|
42
|
+
paddingY: leftIcon || onClose ? rem(4) : rem(6),
|
|
43
|
+
},
|
|
44
|
+
label: {
|
|
45
|
+
fontSize: '2',
|
|
46
|
+
lineHeight: rem(20),
|
|
47
|
+
},
|
|
48
|
+
closeButton: {
|
|
49
|
+
height: '24',
|
|
50
|
+
width: '24',
|
|
51
|
+
marginLeft: '8',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
42
54
|
}),
|
|
43
55
|
};
|
|
44
56
|
|
|
@@ -48,9 +60,7 @@ const baseStyle = definePartsStyle(({ colorScheme }) => {
|
|
|
48
60
|
backgroundColor: `${colorScheme}.93`,
|
|
49
61
|
borderColor: `${colorScheme}.80`,
|
|
50
62
|
};
|
|
51
|
-
|
|
52
|
-
scheme.color = 'purple.10';
|
|
53
|
-
}
|
|
63
|
+
|
|
54
64
|
return {
|
|
55
65
|
container: {
|
|
56
66
|
border: '1px solid',
|
|
@@ -21,7 +21,7 @@ export interface TagProps extends Omit<ChakraTagProps, 'colorScheme' | 'size' |
|
|
|
21
21
|
const Tag = (props: TagProps) => {
|
|
22
22
|
const { children, closeButtonTooltip, iconColor, iconName, isDisabled, isLoading, onClose, withIcon, ...tagProps } =
|
|
23
23
|
props;
|
|
24
|
-
const style = useMultiStyleConfig('Tag',
|
|
24
|
+
const style = useMultiStyleConfig('Tag', props);
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
27
|
<ChakraTag
|
|
@@ -29,6 +29,7 @@ const Tag = (props: TagProps) => {
|
|
|
29
29
|
data-disabled={isDisabled || undefined}
|
|
30
30
|
aria-busy={isLoading}
|
|
31
31
|
data-loading={isLoading || undefined}
|
|
32
|
+
sx={style.container}
|
|
32
33
|
{...tagProps}
|
|
33
34
|
>
|
|
34
35
|
{(withIcon || !!iconName) && (
|