@bitrise/bitkit 12.24.0 → 12.25.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": "12.24.0",
4
+ "version": "12.25.0",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
package/src/theme.ts CHANGED
@@ -36,7 +36,6 @@ import Sidebar from './Components/Sidebar/Sidebar.theme';
36
36
  import SidebarItem from './Components/Sidebar/SidebarItem.theme';
37
37
  import SegmentedControl from './Components/SegmentedControl/SegmentedControl.theme';
38
38
  import Tag from './Components/Tag/Tag.theme';
39
- import Annotation from './Components/Annotation/Annotation.theme';
40
39
 
41
40
  import breakpoints from './Foundations/Breakpoints/Breakpoints';
42
41
  import colors from './Foundations/Colors/Colors';
@@ -82,7 +81,6 @@ const theme = {
82
81
  },
83
82
  },
84
83
  components: {
85
- Annotation,
86
84
  Accordion,
87
85
  Avatar,
88
86
  Badge,
@@ -1,58 +0,0 @@
1
- import { Status } from './Annotation';
2
-
3
- const borderColor = {
4
- info: 'separator.primary',
5
- error: 'red.80',
6
- warning: 'yellow.80',
7
- success: 'green.80',
8
- };
9
-
10
- const decorationBackground = {
11
- info: 'neutral.95',
12
- error: 'red.95',
13
- warning: 'yellow.95',
14
- success: 'green.95',
15
- };
16
-
17
- const decorationColor = {
18
- info: 'neutral.10',
19
- error: 'red.50',
20
- warning: 'yellow.50',
21
- success: 'green.50',
22
- };
23
- const AnnotationTheme = {
24
- parts: ['container', 'icon', 'body'],
25
- baseStyle({ status }: { status: Status }) {
26
- return {
27
- wrapper: {
28
- display: 'flex',
29
- boxShadow: 'large',
30
- },
31
- decoration: {
32
- color: decorationColor[status],
33
- display: 'flex',
34
- width: '32',
35
- borderTopLeftRadius: '8',
36
- borderBottomLeftRadius: '8',
37
- borderWidth: '1px',
38
- px: '4',
39
- py: '12',
40
- borderColor: borderColor[status],
41
- bg: decorationBackground[status],
42
- },
43
- container: {
44
- flexGrow: 1,
45
- paddingLeft: '24',
46
- paddingRight: '16',
47
- py: '16',
48
- borderTopRightRadius: '8',
49
- borderBottomRightRadius: '8',
50
- borderWidth: '1px',
51
- borderLeft: 'none',
52
- borderColor: borderColor[status],
53
- },
54
- };
55
- },
56
- };
57
-
58
- export default AnnotationTheme;
@@ -1,25 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { useMultiStyleConfig } from '@chakra-ui/react';
3
- import Box from '../Box/Box';
4
- import Icon from '../Icon/Icon';
5
-
6
- export type Status = 'info' | 'success' | 'error' | 'warning';
7
- const iconNames = {
8
- info: 'Info',
9
- success: 'Tick',
10
- error: 'ErrorGeneral',
11
- warning: 'Warning',
12
- } as const;
13
- const Annotation = ({ children, status }: { children: ReactNode; status: Status }) => {
14
- const { container, decoration, wrapper } = useMultiStyleConfig('Annotation', { status });
15
- return (
16
- <Box __css={wrapper}>
17
- <Box __css={decoration}>
18
- <Icon size="24" name={iconNames[status]} />
19
- </Box>
20
- <Box __css={container}>{children}</Box>
21
- </Box>
22
- );
23
- };
24
-
25
- export default Annotation;