@bitrise/bitkit 12.123.0 → 12.125.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 +18 -26
- package/src/Components/Tag/Tag.theme.ts +27 -19
- package/src/Components/Tag/Tag.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit",
|
|
3
3
|
"description": "Bitrise React component library",
|
|
4
|
-
"version": "12.
|
|
4
|
+
"version": "12.125.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"@floating-ui/react-dom-interactions": "^0.8.1",
|
|
39
39
|
"@fontsource/figtree": "^5.0.18",
|
|
40
40
|
"@fontsource/source-code-pro": "^5.0.16",
|
|
41
|
-
"framer-motion": "^11.0.
|
|
41
|
+
"framer-motion": "^11.0.6",
|
|
42
42
|
"luxon": "^3.4.4",
|
|
43
43
|
"react": "^18.2.0",
|
|
44
44
|
"react-dom": "^18.2.0",
|
|
45
|
-
"react-focus-lock": "^2.
|
|
45
|
+
"react-focus-lock": "^2.11.1",
|
|
46
46
|
"react-imask": "^7.4.0",
|
|
47
47
|
"react-markdown": "^9.0.1"
|
|
48
48
|
},
|
|
@@ -55,46 +55,38 @@
|
|
|
55
55
|
"@babel/preset-env": "^7.23.9",
|
|
56
56
|
"@babel/preset-react": "^7.23.3",
|
|
57
57
|
"@babel/preset-typescript": "^7.23.3",
|
|
58
|
-
"@bitrise/eslint-plugin": "^2.
|
|
58
|
+
"@bitrise/eslint-plugin": "^2.7.0",
|
|
59
59
|
"@chakra-ui/cli": "^2.4.1",
|
|
60
60
|
"@google-cloud/storage": "^7.7.0",
|
|
61
|
-
"@storybook/addon-actions": "^7.6.
|
|
62
|
-
"@storybook/addon-essentials": "^7.6.
|
|
63
|
-
"@storybook/addon-interactions": "^7.6.
|
|
64
|
-
"@storybook/addon-links": "^7.6.
|
|
65
|
-
"@storybook/addons": "^7.6.
|
|
66
|
-
"@storybook/blocks": "^7.6.
|
|
67
|
-
"@storybook/react": "^7.6.
|
|
68
|
-
"@storybook/react-webpack5": "^7.6.
|
|
69
|
-
"@storybook/theming": "^7.6.
|
|
61
|
+
"@storybook/addon-actions": "^7.6.17",
|
|
62
|
+
"@storybook/addon-essentials": "^7.6.17",
|
|
63
|
+
"@storybook/addon-interactions": "^7.6.17",
|
|
64
|
+
"@storybook/addon-links": "^7.6.17",
|
|
65
|
+
"@storybook/addons": "^7.6.17",
|
|
66
|
+
"@storybook/blocks": "^7.6.17",
|
|
67
|
+
"@storybook/react": "^7.6.17",
|
|
68
|
+
"@storybook/react-webpack5": "^7.6.17",
|
|
69
|
+
"@storybook/theming": "^7.6.17",
|
|
70
70
|
"@testing-library/dom": "^9.3.4",
|
|
71
71
|
"@testing-library/jest-dom": "^6.4.2",
|
|
72
72
|
"@testing-library/react": "^14.2.1",
|
|
73
73
|
"@testing-library/user-event": "^14.5.2",
|
|
74
74
|
"@types/jest": "^29.5.12",
|
|
75
75
|
"@types/luxon": "^3.4.2",
|
|
76
|
-
"@types/react": "^18.2.
|
|
76
|
+
"@types/react": "^18.2.58",
|
|
77
77
|
"@types/react-dom": "^18.2.19",
|
|
78
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
79
|
-
"@typescript-eslint/parser": "^
|
|
78
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
79
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
80
80
|
"axios": "^1.6.7",
|
|
81
81
|
"eslint": "^8.56.0",
|
|
82
|
-
"eslint-plugin-import": "^2.29.1",
|
|
83
|
-
"eslint-plugin-jest": "^27.8.0",
|
|
84
|
-
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
85
|
-
"eslint-plugin-prettier": "^5.1.3",
|
|
86
|
-
"eslint-plugin-react": "^7.33.2",
|
|
87
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
88
|
-
"eslint-plugin-storybook": "^0.6.15",
|
|
89
|
-
"eslint-plugin-testing-library": "^6.2.0",
|
|
90
82
|
"glob": "^10.3.10",
|
|
91
83
|
"jest": "^29.7.0",
|
|
92
84
|
"jest-environment-jsdom": "^29.7.0",
|
|
93
85
|
"jsdom": "^24.0.0",
|
|
94
86
|
"prettier": "^3.2.5",
|
|
95
87
|
"react-hook-form": "^7.50.1",
|
|
96
|
-
"release-it": "^17.
|
|
97
|
-
"storybook": "^7.6.
|
|
88
|
+
"release-it": "^17.1.1",
|
|
89
|
+
"storybook": "^7.6.17",
|
|
98
90
|
"ts-jest": "^29.1.2",
|
|
99
91
|
"typescript": "^5.3.3"
|
|
100
92
|
},
|
|
@@ -50,21 +50,29 @@ const sizes = {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
type TagColors = NonNullable<TagProps['colorScheme']>;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
type MappedColor = {
|
|
54
|
+
color: 'interactive' | 'warning' | 'critical' | 'success' | 'info' | 'neutral';
|
|
55
|
+
isFilled: boolean;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const schemeMap: Record<TagColors, MappedColor> = {
|
|
59
|
+
blue: { color: 'info', isFilled: false },
|
|
60
|
+
green: { color: 'success', isFilled: false },
|
|
61
|
+
neutral: { color: 'neutral', isFilled: false },
|
|
62
|
+
purple: { color: 'interactive', isFilled: false },
|
|
63
|
+
purpleFilled: { color: 'interactive', isFilled: true },
|
|
64
|
+
red: { color: 'critical', isFilled: false },
|
|
65
|
+
yellow: { color: 'warning', isFilled: false },
|
|
60
66
|
};
|
|
61
67
|
|
|
62
68
|
const baseStyle = definePartsStyle(({ colorScheme }) => {
|
|
63
|
-
const color = schemeMap[colorScheme as TagColors];
|
|
69
|
+
const { color, isFilled } = schemeMap[colorScheme as TagColors];
|
|
70
|
+
const normalTextColor = color === 'neutral' ? 'text.primary' : `sys.${color}.strong`;
|
|
64
71
|
const scheme = {
|
|
65
|
-
backgroundColor: `sys.${color}
|
|
66
|
-
borderColor: `sys.${color}
|
|
67
|
-
color:
|
|
72
|
+
backgroundColor: `sys.${color}.${isFilled ? 'bold' : 'subtle'}`,
|
|
73
|
+
borderColor: `sys.${color}.${isFilled ? 'bold' : 'muted'}`,
|
|
74
|
+
color: isFilled ? 'text.on-color' : normalTextColor,
|
|
75
|
+
fontWeight: isFilled ? 'semibold' : 'normal',
|
|
68
76
|
};
|
|
69
77
|
|
|
70
78
|
return {
|
|
@@ -76,7 +84,7 @@ const baseStyle = definePartsStyle(({ colorScheme }) => {
|
|
|
76
84
|
boxShadow: '0 0 0 1px var(--colors-purple-70) inset',
|
|
77
85
|
},
|
|
78
86
|
_hover: {
|
|
79
|
-
backgroundColor: `sys.${color}
|
|
87
|
+
backgroundColor: `sys.${color}.${isFilled ? 'highlight' : 'moderate'}`,
|
|
80
88
|
},
|
|
81
89
|
borderRadius: rem(2),
|
|
82
90
|
marginInlineStart: '4',
|
|
@@ -86,15 +94,15 @@ const baseStyle = definePartsStyle(({ colorScheme }) => {
|
|
|
86
94
|
borderRadius: '4',
|
|
87
95
|
...scheme,
|
|
88
96
|
_disabled: {
|
|
89
|
-
backgroundColor:
|
|
90
|
-
borderColor:
|
|
91
|
-
color: '
|
|
97
|
+
backgroundColor: `sys.neutral.${isFilled ? 'muted' : 'minimal'}`,
|
|
98
|
+
borderColor: `sys.neutral.${isFilled ? 'muted' : 'moderate'}`,
|
|
99
|
+
color: isFilled ? 'text.on-color' : 'text.disabled',
|
|
92
100
|
cursor: 'not-allowed',
|
|
93
101
|
},
|
|
94
102
|
_loading: {
|
|
95
|
-
backgroundColor:
|
|
96
|
-
borderColor:
|
|
97
|
-
color: '
|
|
103
|
+
backgroundColor: `sys.neutral.${isFilled ? 'muted' : 'subtle'}`,
|
|
104
|
+
borderColor: `sys.neutral.${isFilled ? 'muted' : 'subtle'}`,
|
|
105
|
+
color: isFilled ? 'text.on-color' : 'text.disabled',
|
|
98
106
|
cursor: 'wait',
|
|
99
107
|
},
|
|
100
108
|
},
|
|
@@ -105,7 +113,7 @@ const baseStyle = definePartsStyle(({ colorScheme }) => {
|
|
|
105
113
|
display: 'inline',
|
|
106
114
|
},
|
|
107
115
|
skeleton: {
|
|
108
|
-
backgroundColor: 'neutral.
|
|
116
|
+
backgroundColor: 'sys.neutral.muted',
|
|
109
117
|
height: '8',
|
|
110
118
|
minWidth: '32',
|
|
111
119
|
},
|
|
@@ -8,7 +8,7 @@ import { TypeColors } from '../../types/bitkit';
|
|
|
8
8
|
|
|
9
9
|
export interface TagProps extends Omit<ChakraTagProps, 'colorScheme' | 'size' | 'variant'> {
|
|
10
10
|
closeButtonTooltip?: string;
|
|
11
|
-
colorScheme?: 'neutral' | 'blue' | 'green' | 'red' | 'yellow' | 'purple';
|
|
11
|
+
colorScheme?: 'neutral' | 'blue' | 'green' | 'red' | 'yellow' | 'purple' | 'purpleFilled';
|
|
12
12
|
iconColor?: TypeColors;
|
|
13
13
|
iconName?: TypeIconName;
|
|
14
14
|
isDisabled?: boolean;
|