@bitrise/bitkit 9.7.3 → 9.7.4

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.
@@ -1,4 +1,5 @@
1
- import { Text as ChakraText, TextProps } from '@chakra-ui/react';
1
+ import { Text as ChakraText, TextProps as ChakraTextProps } from '@chakra-ui/react';
2
+ import { TextSizes } from '../../Foundations/Typography/Typography';
2
3
 
3
4
  type TextTags =
4
5
  | 'a'
@@ -34,36 +35,31 @@ type TextTags =
34
35
  | 'time'
35
36
  | 'var';
36
37
 
37
- export type TextSizes = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8';
38
-
39
- export interface Props {
38
+ export interface TextProps extends ChakraTextProps {
40
39
  align?: 'center' | 'justify' | 'left' | 'right';
41
40
  /**
42
41
  * Any valid HTML text tag
43
42
  */
44
43
  as?: TextTags;
45
- children?: TextProps['children'];
46
44
  className?: string;
47
- color?: 'body' | 'secondary';
45
+ color?: 'body' | 'secondary' | string;
48
46
  /**
49
47
  * Font weight
50
48
  */
51
49
  fontWeight?: 'bold' | 'normal';
52
- letterSpacing?: TextProps['letterSpacing'];
53
50
  /**
54
51
  * Size config (https://www.figma.com/file/grik9mTaJ5DfhydhWhXdP5/Bitkit-Foundations?node-id=211%3A12)
55
52
  */
56
53
  size?: TextSizes;
57
- sx?: TextProps['sx'];
58
54
  textTransform?: 'capitalize' | 'lowercase' | 'none' | 'uppercase';
59
55
  }
60
56
 
61
57
  /**
62
58
  * `Text` component is the used to render text and paragraphs within an interface. It renders a `<p>` tag by default.
63
59
  */
64
- const Text = (props: Props) => {
60
+ const Text = (props: TextProps) => {
65
61
  const { color, fontWeight, size, textTransform } = props;
66
- const properties: TextProps = { ...props };
62
+ const properties: ChakraTextProps = { ...props };
67
63
  if (size === '1' && (!textTransform || textTransform === 'none')) {
68
64
  properties.textTransform = 'uppercase';
69
65
  }
@@ -79,6 +75,6 @@ const Text = (props: Props) => {
79
75
  Text.defaultProps = {
80
76
  as: 'p',
81
77
  size: '3',
82
- } as Props;
78
+ } as TextProps;
83
79
 
84
80
  export default Text;
@@ -1,115 +1,115 @@
1
1
  const colors = {
2
2
  neutral: {
3
- 10: '#201B22',
4
- 20: '#362D39',
5
- 30: '#49404F',
6
- 40: '#6B6071',
7
- 50: '#7D7184',
8
- 60: '#94879B',
9
- 70: '#AFA4B4',
10
- 80: '#C9C1CD',
11
- 90: '#DFDAE1',
12
- 93: '#EFEBEF',
13
- 95: '#F6F4F6',
14
3
  100: '#FFFFFF',
4
+ 95: '#F6F4F6',
5
+ 93: '#EFEBEF',
6
+ 90: '#DFDAE1',
7
+ 80: '#C9C1CD',
8
+ 70: '#AFA4B4',
9
+ 60: '#94879B',
10
+ 50: '#7D7184',
11
+ 40: '#6B6071',
12
+ 30: '#49404F',
13
+ 20: '#362D39',
14
+ 10: '#201B22',
15
15
  },
16
16
  purple: {
17
- 10: '#2B0E3F',
18
- 20: '#421560',
19
- 30: '#5C2A7E',
20
- 40: '#7B3BA5',
21
- 50: '#9247C2',
22
- 60: '#AE63DE',
23
- 70: '#C289E6',
24
- 80: '#D5ADEB',
25
- 90: '#EAD4F2',
26
- 93: '#F3E7F9',
27
- 95: '#F9F2FD',
28
17
  100: '#FFFFFF',
18
+ 95: '#F9F2FD',
19
+ 93: '#F3E7F9',
20
+ 90: '#EAD4F2',
21
+ 80: '#D5ADEB',
22
+ 70: '#C289E6',
23
+ 60: '#AE63DE',
24
+ 50: '#9247C2',
25
+ 40: '#7B3BA5',
26
+ 30: '#5C2A7E',
27
+ 20: '#421560',
28
+ 10: '#2B0E3F',
29
29
  },
30
30
  red: {
31
- 10: '#47060C',
32
- 20: '#630811',
33
- 30: '#78111C',
34
- 40: '#A91E2E',
35
- 50: '#D72D40',
36
- 60: '#F7596C',
37
- 70: '#FF8091',
38
- 80: '#FFA8B5',
39
- 90: '#FFCCD5',
40
- 93: '#FFE5EB',
41
- 95: '#FFF0F3',
42
31
  100: '#FFFFFF',
32
+ 95: '#FFF0F3',
33
+ 93: '#FFE5EB',
34
+ 90: '#FFCCD5',
35
+ 80: '#FFA8B5',
36
+ 70: '#FF8091',
37
+ 60: '#F7596C',
38
+ 50: '#D72D40',
39
+ 40: '#A91E2E',
40
+ 30: '#78111C',
41
+ 20: '#630811',
42
+ 10: '#47060C',
43
43
  },
44
44
  orange: {
45
- 10: '#421000',
46
- 20: '#661900',
47
- 30: '#7A2200',
48
- 40: '#A33500',
49
- 50: '#D45202',
50
- 60: '#ED720C',
51
- 70: '#FD9730',
52
- 80: '#FFB766',
53
- 90: '#FFD5A3',
54
- 93: '#FFE9CF',
55
- 95: '#FFF4E5',
56
45
  100: '#FFFFFF',
46
+ 95: '#FFF4E5',
47
+ 93: '#FFE9CF',
48
+ 90: '#FFD5A3',
49
+ 80: '#FFB766',
50
+ 70: '#FD9730',
51
+ 60: '#ED720C',
52
+ 50: '#D45202',
53
+ 40: '#A33500',
54
+ 30: '#7A2200',
55
+ 20: '#661900',
56
+ 10: '#421000',
57
57
  },
58
58
  yellow: {
59
- 10: '#2E1C00',
60
- 20: '#4D2F00',
61
- 30: '#613E00',
62
- 40: '#875B00',
63
- 50: '#B27E00',
64
- 60: '#D6A200',
65
- 70: '#EBBA00',
66
- 80: '#F9CC15',
67
- 90: '#FBE074',
68
- 93: '#FFEFAD',
69
- 95: '#FFF6D1',
70
59
  100: '#FFFFFF',
60
+ 95: '#FFF6D1',
61
+ 93: '#FFEFAD',
62
+ 90: '#FBE074',
63
+ 80: '#F9CC15',
64
+ 70: '#EBBA00',
65
+ 60: '#D6A200',
66
+ 50: '#B27E00',
67
+ 40: '#875B00',
68
+ 30: '#613E00',
69
+ 20: '#4D2F00',
70
+ 10: '#2E1C00',
71
71
  },
72
72
  green: {
73
- 10: '#042A0F',
74
- 20: '#064217',
75
- 30: '#0B5620',
76
- 40: '#167231',
77
- 50: '#2A9D4C',
78
- 60: '#4EB76C',
79
- 70: '#77CF8F',
80
- 80: '#A1DEB2',
81
- 90: '#C3EACE',
82
- 93: '#E1F4E7',
83
- 95: '#EEF9F1',
84
73
  100: '#FFFFFF',
74
+ 95: '#EEF9F1',
75
+ 93: '#E1F4E7',
76
+ 90: '#C3EACE',
77
+ 80: '#A1DEB2',
78
+ 70: '#77CF8F',
79
+ 60: '#4EB76C',
80
+ 50: '#2A9D4C',
81
+ 40: '#167231',
82
+ 30: '#0B5620',
83
+ 20: '#064217',
84
+ 10: '#042A0F',
85
85
  },
86
86
  turquoise: {
87
- 10: '#002924',
88
- 20: '#003D36',
89
- 30: '#005248',
90
- 40: '#007366',
91
- 50: '#009E8E',
92
- 60: '#11BBA9',
93
- 70: '#55CEC3',
94
- 80: '#8AE0D7',
95
- 90: '#AEEFE8',
96
- 93: '#D8F8F4',
97
- 95: '#E9FBF9',
98
87
  100: '#FFFFFF',
88
+ 95: '#E9FBF9',
89
+ 93: '#D8F8F4',
90
+ 90: '#AEEFE8',
91
+ 80: '#8AE0D7',
92
+ 70: '#55CEC3',
93
+ 60: '#11BBA9',
94
+ 50: '#009E8E',
95
+ 40: '#007366',
96
+ 30: '#005248',
97
+ 20: '#003D36',
98
+ 10: '#002924',
99
99
  },
100
100
  blue: {
101
- 10: '#002442',
102
- 20: '#00315C',
103
- 30: '#044781',
104
- 40: '#1066AC',
105
- 50: '#2582D0',
106
- 60: '#4F9BDE',
107
- 70: '#71B8EF',
108
- 80: '#99D1F5',
109
- 90: '#C2E7FA',
110
- 93: '#DEF2FC',
111
- 95: '#ECF8FD',
112
101
  100: '#FFFFFF',
102
+ 95: '#ECF8FD',
103
+ 93: '#DEF2FC',
104
+ 90: '#C2E7FA',
105
+ 80: '#99D1F5',
106
+ 70: '#71B8EF',
107
+ 60: '#4F9BDE',
108
+ 50: '#2582D0',
109
+ 40: '#1066AC',
110
+ 30: '#044781',
111
+ 20: '#00315C',
112
+ 10: '#002442',
113
113
  },
114
114
  brand: {
115
115
  primary: '#5C2A7E', // purple.30
@@ -37,7 +37,7 @@ const DesignTokens = () => {
37
37
  <Card sx={{ marginBottom: '96' }}>
38
38
  <VStack align="flex-start" as="ul" spacing="32">
39
39
  {Object.keys(TOKENS).map((token: string) => (
40
- <HStack as="li" spacing="32">
40
+ <HStack as="li" key={token} spacing="32">
41
41
  <Box
42
42
  sx={{
43
43
  backgroundColor: token,
@@ -4,66 +4,68 @@ const typography = {
4
4
  mono: `"Source Code Pro Bitrise", monospace`,
5
5
  },
6
6
  fontSizes: {
7
- 1: '0.6875rem',
8
- 2: '0.875rem',
9
- 3: '1rem',
10
- 4: '1.1875rem',
11
- 5: '1.5rem',
12
- 6: '1.875rem',
13
- 7: '2.25rem',
14
- 8: '3rem',
7
+ '1': '0.6875rem',
8
+ '2': '0.875rem',
9
+ '3': '1rem',
10
+ '4': '1.1875rem',
11
+ '5': '1.5rem',
12
+ '6': '1.875rem',
13
+ '7': '2.25rem',
14
+ '8': '3rem',
15
15
  },
16
16
  fontWeights: {
17
17
  normal: 400,
18
18
  bold: 700,
19
19
  },
20
20
  lineHeights: {
21
- 1: '1rem',
22
- 2: '1.25rem',
23
- 3: '1.5rem',
24
- 4: '1.75rem',
25
- 5: '2.25rem',
26
- 6: '2.5rem',
27
- 7: '3rem',
28
- 8: '3.75rem',
21
+ '1': '1rem',
22
+ '2': '1.25rem',
23
+ '3': '1.5rem',
24
+ '4': '1.75rem',
25
+ '5': '2.25rem',
26
+ '6': '2.5rem',
27
+ '7': '3rem',
28
+ '8': '3.75rem',
29
29
  },
30
30
  };
31
31
 
32
32
  export const textSizes = {
33
33
  sizes: {
34
- 1: {
34
+ '1': {
35
35
  fontSize: '1',
36
36
  lineHeight: '1',
37
37
  },
38
- 2: {
38
+ '2': {
39
39
  fontSize: '2',
40
40
  lineHeight: '2',
41
41
  },
42
- 3: {
42
+ '3': {
43
43
  fontSize: '3',
44
44
  lineHeight: '3',
45
45
  },
46
- 4: {
46
+ '4': {
47
47
  fontSize: '4',
48
48
  lineHeight: '4',
49
49
  },
50
- 5: {
50
+ '5': {
51
51
  fontSize: '5',
52
52
  lineHeight: '5',
53
53
  },
54
- 6: {
54
+ '6': {
55
55
  fontSize: '6',
56
56
  lineHeight: '6',
57
57
  },
58
- 7: {
58
+ '7': {
59
59
  fontSize: '7',
60
60
  lineHeight: '7',
61
61
  },
62
- 8: {
62
+ '8': {
63
63
  fontSize: '8',
64
64
  lineHeight: '8',
65
65
  },
66
66
  },
67
67
  };
68
68
 
69
+ export type TextSizes = keyof typeof textSizes.sizes;
70
+
69
71
  export default typography;
package/src/index.ts CHANGED
@@ -5,8 +5,6 @@ import * as hooks from './Old/hooks';
5
5
 
6
6
  export { variables };
7
7
  export { hooks };
8
- export { default as Provider } from './Components/Provider/Provider';
9
- export { default as theme } from './theme';
10
8
 
11
9
  export type { Props as AddonBeamProps } from './Old/AddonBeam/AddonBeam';
12
10
  export { default as AddonBeam } from './Old/AddonBeam/AddonBeam';
@@ -287,3 +285,6 @@ export { default as Visibility } from './Old/Visibility/Visibility';
287
285
 
288
286
  export type { Props as VisibilityContainerProps } from './Old/Visibility/VisibilityContainer';
289
287
  export { default as VisibilityContainer } from './Old/Visibility/VisibilityContainer';
288
+
289
+ export { default as Provider } from './Components/Provider/Provider';
290
+ export { default as theme } from './theme';
package/src/theme.ts CHANGED
@@ -31,6 +31,9 @@ const theme = {
31
31
  'pre, code, kbd, samp': {
32
32
  fontFamily: 'mono',
33
33
  },
34
+ hr: {
35
+ borderTopWidth: 0,
36
+ },
34
37
  },
35
38
  },
36
39
  components: {