@bitrise/bitkit 7.13.0 → 7.15.0-alpha.1

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.
Files changed (148) hide show
  1. package/.nvmrc +1 -1
  2. package/.tool-versions +1 -0
  3. package/CHANGELOG.md +16 -0
  4. package/README.md +2 -0
  5. package/bitrise.yml +11 -0
  6. package/lib/cjs/AddonBeam/AddonBeam.js +1 -1
  7. package/lib/cjs/AddonBeam/AddonBeam.js.map +1 -1
  8. package/lib/cjs/AddonFooter/AddonFooter.js +2 -2
  9. package/lib/cjs/AddonFooter/AddonFooter.js.map +1 -1
  10. package/lib/cjs/Avatar/Avatar.js +1 -1
  11. package/lib/cjs/Avatar/Avatar.js.map +1 -1
  12. package/lib/cjs/Badge/Badge.css +1 -0
  13. package/lib/cjs/Badge/Badge.d.ts.map +1 -1
  14. package/lib/cjs/Badge/Badge.js +1 -1
  15. package/lib/cjs/Badge/Badge.js.map +1 -1
  16. package/lib/cjs/Button/Button.css +3 -3
  17. package/lib/cjs/Button/ColorButton.css +3 -3
  18. package/lib/cjs/DatePicker/DatePickerMonth.js +1 -1
  19. package/lib/cjs/DatePicker/DatePickerMonth.js.map +1 -1
  20. package/lib/cjs/Input/InputInlineHelp.js +1 -1
  21. package/lib/cjs/Input/InputInlineHelp.js.map +1 -1
  22. package/lib/cjs/Input/InputLabel.js +1 -1
  23. package/lib/cjs/Input/InputLabel.js.map +1 -1
  24. package/lib/cjs/Modal/ModalTitle.js +1 -1
  25. package/lib/cjs/Modal/ModalTitle.js.map +1 -1
  26. package/lib/cjs/Progress/ProgressBitbot.js +1 -1
  27. package/lib/cjs/Progress/ProgressBitbot.js.map +1 -1
  28. package/lib/cjs/Status/Status404.js +2 -2
  29. package/lib/cjs/Status/Status404.js.map +1 -1
  30. package/lib/cjs/Status/Status500.js +3 -3
  31. package/lib/cjs/Status/Status500.js.map +1 -1
  32. package/lib/cjs/Text/Text.css +0 -19
  33. package/lib/cjs/Text/Text.d.ts +2 -8
  34. package/lib/cjs/Text/Text.d.ts.map +1 -1
  35. package/lib/cjs/Text/Text.js +3 -17
  36. package/lib/cjs/Text/Text.js.map +1 -1
  37. package/lib/cjs/Text/TextSizes.css +39 -0
  38. package/lib/cjs/Tooltip/Tooltip.d.ts +1 -1
  39. package/lib/cjs/Tooltip/Tooltip.d.ts.map +1 -1
  40. package/lib/cjs/Tooltip/Tooltip.js +1 -1
  41. package/lib/cjs/Tooltip/Tooltip.js.map +1 -1
  42. package/lib/cjs/index.d.ts +1 -1
  43. package/lib/cjs/index.d.ts.map +1 -1
  44. package/lib/cjs/index.js.map +1 -1
  45. package/lib/cjs/root.css +2 -2
  46. package/lib/cjs/tsconfig.tsbuildinfo +20 -20
  47. package/lib/cjs/variables.css +16 -16
  48. package/lib/cjs/variables.d.ts +16 -16
  49. package/lib/cjs/variables.d.ts.map +1 -1
  50. package/lib/cjs/variables.js +16 -16
  51. package/lib/cjs/variables.js.map +1 -1
  52. package/lib/esn/AddonBeam/AddonBeam.js +1 -1
  53. package/lib/esn/AddonBeam/AddonBeam.js.map +1 -1
  54. package/lib/esn/AddonFooter/AddonFooter.js +2 -2
  55. package/lib/esn/AddonFooter/AddonFooter.js.map +1 -1
  56. package/lib/esn/Avatar/Avatar.js +1 -1
  57. package/lib/esn/Avatar/Avatar.js.map +1 -1
  58. package/lib/esn/Badge/Badge.css +1 -0
  59. package/lib/esn/Badge/Badge.d.ts.map +1 -1
  60. package/lib/esn/Badge/Badge.js +1 -1
  61. package/lib/esn/Badge/Badge.js.map +1 -1
  62. package/lib/esn/Button/Button.css +3 -3
  63. package/lib/esn/Button/ColorButton.css +3 -3
  64. package/lib/esn/DatePicker/DatePickerMonth.js +1 -1
  65. package/lib/esn/DatePicker/DatePickerMonth.js.map +1 -1
  66. package/lib/esn/Input/InputInlineHelp.js +1 -1
  67. package/lib/esn/Input/InputInlineHelp.js.map +1 -1
  68. package/lib/esn/Input/InputLabel.js +1 -1
  69. package/lib/esn/Input/InputLabel.js.map +1 -1
  70. package/lib/esn/Modal/ModalTitle.js +1 -1
  71. package/lib/esn/Modal/ModalTitle.js.map +1 -1
  72. package/lib/esn/Progress/ProgressBitbot.js +1 -1
  73. package/lib/esn/Progress/ProgressBitbot.js.map +1 -1
  74. package/lib/esn/Status/Status404.js +2 -2
  75. package/lib/esn/Status/Status404.js.map +1 -1
  76. package/lib/esn/Status/Status500.js +3 -3
  77. package/lib/esn/Status/Status500.js.map +1 -1
  78. package/lib/esn/Text/Text.css +0 -19
  79. package/lib/esn/Text/Text.d.ts +2 -8
  80. package/lib/esn/Text/Text.d.ts.map +1 -1
  81. package/lib/esn/Text/Text.js +3 -17
  82. package/lib/esn/Text/Text.js.map +1 -1
  83. package/lib/esn/Text/TextSizes.css +39 -0
  84. package/lib/esn/Tooltip/Tooltip.d.ts +1 -1
  85. package/lib/esn/Tooltip/Tooltip.d.ts.map +1 -1
  86. package/lib/esn/Tooltip/Tooltip.js +1 -1
  87. package/lib/esn/Tooltip/Tooltip.js.map +1 -1
  88. package/lib/esn/index.d.ts +1 -1
  89. package/lib/esn/index.d.ts.map +1 -1
  90. package/lib/esn/index.js.map +1 -1
  91. package/lib/esn/root.css +2 -2
  92. package/lib/esn/tsconfig.tsbuildinfo +20 -20
  93. package/lib/esn/variables.css +16 -16
  94. package/lib/esn/variables.d.ts +16 -16
  95. package/lib/esn/variables.d.ts.map +1 -1
  96. package/lib/esn/variables.js +16 -16
  97. package/lib/esn/variables.js.map +1 -1
  98. package/package.json +5 -5
  99. package/release.config.js +32 -0
  100. package/site/components/CodeBlock/CodeBlock.css +2 -2
  101. package/site/components/Documentation/ComponentDocumentationPage.tsx +7 -7
  102. package/site/components/Documentation/Components/SectionCards.tsx +10 -10
  103. package/site/components/Documentation/Components/SectionDropdowns.tsx +1 -1
  104. package/site/components/Documentation/Components/SectionExpand.tsx +6 -6
  105. package/site/components/Documentation/Components/SectionFlex.tsx +1 -1
  106. package/site/components/Documentation/Components/SectionGrid.tsx +1 -1
  107. package/site/components/Documentation/Components/SectionIcons.tsx +1 -1
  108. package/site/components/Documentation/Components/SectionModals.tsx +3 -3
  109. package/site/components/Documentation/Components/SectionSidebar.tsx +1 -1
  110. package/site/components/Documentation/Components/SectionStatusSandbox404.tsx +1 -1
  111. package/site/components/Documentation/Components/SectionText.tsx +6 -6
  112. package/site/components/Documentation/Materials/SectionColors.tsx +6 -6
  113. package/site/components/Documentation/Materials/SectionIcons.tsx +2 -2
  114. package/site/components/Documentation/Materials/SectionTypography.tsx +39 -83
  115. package/site/components/Page/PageTitle.tsx +1 -1
  116. package/site/components/PropsTable/PropsTable.tsx +1 -1
  117. package/site/components/PropsTable/PropsTableCellUnion.tsx +1 -1
  118. package/site/components/PropsTable/PropsTableRow.tsx +3 -3
  119. package/site/components/Root/Root.tsx +5 -4
  120. package/site/components/Section/SectionSubTitle.tsx +1 -1
  121. package/site/components/Section/SectionTitle.tsx +1 -1
  122. package/site/components/Window/Window.tsx +1 -1
  123. package/src/AddonBeam/AddonBeam.tsx +1 -1
  124. package/src/AddonFooter/AddonFooter.tsx +2 -2
  125. package/src/Avatar/Avatar.tsx +1 -1
  126. package/src/Badge/Badge.css +1 -0
  127. package/src/Badge/Badge.tsx +2 -1
  128. package/src/Button/Button.css +3 -3
  129. package/src/Button/ColorButton.css +3 -3
  130. package/src/DatePicker/DatePickerMonth.tsx +1 -1
  131. package/src/Input/InputInlineHelp.tsx +1 -1
  132. package/src/Input/InputLabel.tsx +1 -1
  133. package/src/Modal/ModalTitle.tsx +1 -1
  134. package/src/Progress/ProgressBitbot.tsx +1 -1
  135. package/src/Status/Status404.tsx +2 -2
  136. package/src/Status/Status500.tsx +3 -3
  137. package/src/Text/Text.css +0 -19
  138. package/src/Text/Text.tsx +4 -27
  139. package/src/Text/TextSizes.css +39 -0
  140. package/src/Tooltip/Tooltip.tsx +2 -2
  141. package/src/index.ts +1 -1
  142. package/src/root.css +2 -2
  143. package/src/variables.css +16 -16
  144. package/src/variables.ts +17 -17
  145. package/.releaserc +0 -30
  146. package/lib/cjs/Text/TextConfigurations.css +0 -56
  147. package/lib/esn/Text/TextConfigurations.css +0 -56
  148. package/src/Text/TextConfigurations.css +0 -56
@@ -10,111 +10,70 @@ import {
10
10
  Icon,
11
11
  Link,
12
12
  Text,
13
- TypeTextConfig,
14
- TypeTextLetterSpacing,
15
13
  TypeTextSize,
16
- TypeTextWeight,
17
14
  } from '@bitrise/bitkit';
18
15
  import CodeBlock from '../../CodeBlock/CodeBlock';
19
16
 
20
17
  const { useState } = React;
21
18
 
22
19
  const configurations: {
23
- config: TypeTextConfig;
24
20
  fontSizePx: number;
25
- letterSpacing?: TypeTextLetterSpacing;
26
- letterSpacingPx?: number;
27
21
  lineHeightPx: number;
28
22
  size: TypeTextSize;
29
23
  uppercase?: boolean;
30
- weight: TypeTextWeight;
31
24
  }[] = [{
32
- config: '1',
33
- fontSizePx: variables.fontSizeX8Px,
34
- letterSpacing: 'x3',
35
- letterSpacingPx: variables.letterSpacingX3Px,
36
- lineHeightPx: variables.lineHeightX8Px,
37
- size: 'x8',
38
- weight: 'bold',
25
+ fontSizePx: variables.fontSize1Px,
26
+ lineHeightPx: variables.lineHeight1Px,
27
+ size: '1',
39
28
  }, {
40
- config: '2',
41
- fontSizePx: variables.fontSizeX7Px,
42
- lineHeightPx: variables.lineHeightX7Px,
43
- size: 'x7',
44
- weight: 'bold',
29
+ fontSizePx: variables.fontSize2Px,
30
+ lineHeightPx: variables.lineHeight2Px,
31
+ size: '2',
45
32
  }, {
46
- config: '3',
47
- fontSizePx: variables.fontSizeX6Px,
48
- letterSpacing: 'x2',
49
- letterSpacingPx: variables.letterSpacingX2Px,
50
- lineHeightPx: variables.lineHeightX6Px,
51
- size: 'x6',
52
- weight: 'bold',
33
+ fontSizePx: variables.fontSize3Px,
34
+ lineHeightPx: variables.lineHeight3Px,
35
+ size: '3',
53
36
  }, {
54
- config: '4',
55
- fontSizePx: variables.fontSizeX5Px,
56
- letterSpacing: 'x1',
57
- letterSpacingPx: variables.letterSpacingX1Px,
58
- lineHeightPx: variables.lineHeightX5Px,
59
- size: 'x5',
60
- weight: 'bold',
37
+ fontSizePx: variables.fontSize4Px,
38
+ lineHeightPx: variables.lineHeight4Px,
39
+ size: '4',
61
40
  }, {
62
- config: '5',
63
- fontSizePx: variables.fontSizeX4Px,
64
- lineHeightPx: variables.lineHeightX4Px,
65
- size: 'x4',
66
- weight: 'bold',
41
+ fontSizePx: variables.fontSize5Px,
42
+ lineHeightPx: variables.lineHeight5Px,
43
+ size: '5',
67
44
  }, {
68
- config: '6',
69
- fontSizePx: variables.fontSizeX2Px,
70
- letterSpacing: 'x4',
71
- letterSpacingPx: variables.letterSpacingX4Px,
72
- lineHeightPx: variables.lineHeightX2Px,
73
- size: 'x2',
74
- uppercase: true,
75
- weight: 'medium',
45
+ fontSizePx: variables.fontSize6Px,
46
+ lineHeightPx: variables.lineHeight6Px,
47
+ size: '6',
76
48
  }, {
77
- config: '7',
78
- fontSizePx: variables.fontSizeX3Px,
79
- lineHeightPx: variables.lineHeightX3Px,
80
- size: 'x3',
81
- weight: 'medium',
49
+ fontSizePx: variables.fontSize7Px,
50
+ lineHeightPx: variables.lineHeight7Px,
51
+ size: '7',
82
52
  }, {
83
- config: '8',
84
- fontSizePx: variables.fontSizeX2Px,
85
- lineHeightPx: variables.lineHeightX2Px,
86
- size: 'x2',
87
- weight: 'medium',
88
- }, {
89
- config: '9',
90
- fontSizePx: variables.fontSizeX1Px,
91
- letterSpacing: 'x5',
92
- letterSpacingPx: variables.letterSpacingX5Px,
93
- lineHeightPx: variables.lineHeightX1Px,
94
- size: 'x1',
95
- uppercase: true,
96
- weight: 'medium',
53
+ fontSizePx: variables.fontSize8Px,
54
+ lineHeightPx: variables.lineHeight8Px,
55
+ size: '8',
97
56
  }];
98
57
 
99
58
  const SectionTypography = () => {
100
- const [expanded, setExpanded] = useState<{ [key in TypeTextConfig]?: boolean }>({});
59
+ const [expanded, setExpanded] = useState<{ [key in TypeTextSize]?: boolean }>({});
101
60
 
102
61
  return (
103
62
  <Flex>
104
- <Text margin="x6" size="x7" weight="bold">Typography</Text>
63
+ <Text Component="h2" margin="x6" size="8" weight="bold">Typography</Text>
105
64
 
106
- <Text>
65
+ <Text Component="p">
107
66
  You can mix and match to get any text you like, but below shows the
108
67
  best combinations to use from the design guide. All of these examples can
109
68
  be achieved with the <Link Component={ RouterLink } color="grape-3" to="/documentation/components/text">Text component</Link>.
110
69
  </Text>
111
70
 
112
71
  <CodeBlock title="Text component example">{
113
- `<Text letterSpacing="x5" size="x1" uppercase weight="medium">
72
+ `<Text letterSpacing="x5" size="1" uppercase weight="medium">
114
73
  I must protest your unauthorised presence on this bridge!
115
74
  </Text>
116
75
 
117
- <Text config="9">
76
+ <Text size="8">
118
77
  I must protest your unauthorised presence on this bridge!
119
78
  </Text>`
120
79
  }</CodeBlock>
@@ -123,44 +82,41 @@ const SectionTypography = () => {
123
82
  <Card
124
83
  direction="vertical"
125
84
  elevation="x2"
126
- key={ config.config }
85
+ key={ config.size }
127
86
  margin="x6"
128
87
  onClick={ () => {} }>
129
88
  <Link
130
89
  color="grape-5"
131
- onClick={ () => setExpanded({ ...expanded, [config.config]: !expanded[config.config] }) }>
90
+ onClick={ () => setExpanded({ ...expanded, [config.size]: !expanded[config.size] }) }>
132
91
  <CardContent paddingHorizontal="x6" paddingVertical="x4">
133
92
  <Flex alignChildrenVertical="middle" direction="horizontal" gap="x6">
134
93
  <Flex grow initial="none">
135
- <Text margin="x1" weight="bold">Configuration { config.config }</Text>
136
- <Text margin="x1" size="x2">
137
- Size: { config.size } / Weight: { config.weight } { config.letterSpacing && `/ Letter Spacing: ${config.letterSpacing}` } { config.uppercase && '/ Uppercase' }
138
- </Text>
139
-
140
- <Text margin="x1" size="x2">
141
- Font size: { config.fontSizePx }px / Line height: { config.lineHeightPx }px { config.letterSpacingPx && `/ Letter Spacing: ${config.letterSpacingPx}px` }
94
+ <Text Component="h3" margin="x1" weight="bold">Size { config.size }</Text>
95
+ <Text Component="p" margin="x1" size="2">
96
+ Font size: { config.fontSizePx }px <Text emphasis inline textColor="gray-5">({ config.fontSizePx / 16 }rem)</Text><br />
97
+ Line height: { config.lineHeightPx }px <Text emphasis inline textColor="gray-5">({ config.lineHeightPx / 16 }rem)</Text>
142
98
  </Text>
143
99
  </Flex>
144
100
 
145
101
  <Flex>
146
- <Text config={ config.config } textColor="gray-3">
102
+ <Text size={ config.size } textColor="gray-3">
147
103
  Aa
148
104
  </Text>
149
105
  </Flex>
150
106
 
151
107
  <Flex>
152
108
  <Icon
153
- name={ expanded[config.config] ? 'ChevronDown' : 'ChevronRight' } />
109
+ name={ expanded[config.size] ? 'ChevronDown' : 'ChevronRight' } />
154
110
  </Flex>
155
111
  </Flex>
156
112
  </CardContent>
157
113
  </Link>
158
114
 
159
- <Expand expanded={ !!expanded[config.config] }>
115
+ <Expand expanded={ !!expanded[config.size] }>
160
116
  <CardDivider />
161
117
 
162
118
  <CardContent padding="x6">
163
- <Text config={ config.config } textColor="gray-7">
119
+ <Text size={ config.size } textColor="gray-7">
164
120
  I must protest your unauthorised presence on this bridge!
165
121
  </Text>
166
122
  </CardContent>
@@ -5,7 +5,7 @@ const PageTitle: React.SFC<TextProps> = (props: TextProps) => {
5
5
  return (
6
6
  <Text { ...props }
7
7
  margin="x6"
8
- size="x6"
8
+ size="6"
9
9
  textColor="grape-5"
10
10
  weight="bold" />
11
11
  );
@@ -15,7 +15,7 @@ const PropsTable: React.SFC<Props> = ({ composes, displayName, props = {}, ...re
15
15
 
16
16
  if (Object.keys(props).length === 0) {
17
17
  return (
18
- <Text margin="x1" size="x2" textColor="gray-5">
18
+ <Text margin="x1" size="2" textColor="gray-5">
19
19
  This component has no props to
20
20
  show { composes && composes.length && `, however it extends ${composes.join(', ')}` }.
21
21
  </Text>
@@ -30,7 +30,7 @@ const PropsTableCellUnion: React.SFC<Props> = (props: Props) => {
30
30
  }
31
31
 
32
32
  return (
33
- <Text size="x2">
33
+ <Text size="2">
34
34
  { flowType.elements.map(elementFormatter).join(' | ') }
35
35
  </Text>
36
36
  );
@@ -28,18 +28,18 @@ const PropsTableRow: React.SFC<Props> = (props: Props) => {
28
28
 
29
29
  { required && (
30
30
  <Flex>
31
- <Text config="9" textColor="red-3">[Required]</Text>
31
+ <Text size="1" textColor="red-3" uppercase>[Required]</Text>
32
32
  </Flex>
33
33
  ) }
34
34
  </Flex>
35
35
 
36
- <Text config="8">{ description }</Text>
36
+ <Text size="2">{ description }</Text>
37
37
  </TableCell>
38
38
 
39
39
  <TableCell>
40
40
  { flowType && flowType.name }
41
41
  { defaultValue && (
42
- <Text breakOn="none" size="x2" textColor="gray-5">
42
+ <Text breakOn="none" size="2" textColor="gray-5">
43
43
  Default Value: { defaultValue.value }
44
44
  </Text>
45
45
  ) }
@@ -7,6 +7,7 @@ const Root = () => {
7
7
  return (
8
8
  <Flex direction="vertical" grow maxWidth="75rem" paddingHorizontal="x6">
9
9
  <Flex
10
+ Component="header"
10
11
  alignChildrenVertical="middle"
11
12
  direction="horizontal"
12
13
  gap="x6"
@@ -45,13 +46,13 @@ const Root = () => {
45
46
  </Switch>
46
47
  </Flex>
47
48
 
48
- <Flex paddingVertical="x16">
49
+ <Flex Component="footer" paddingVertical="x16">
49
50
  <Flex alignChildren="middle" direction="vertical" margin="x4">
50
51
  <Icon margin="x2" name="Bitbot" size="3rem" />
51
52
 
52
53
  <Text
53
54
  letterSpacing="x5"
54
- size="x1"
55
+ size="1"
55
56
  uppercase>
56
57
  Bitkit
57
58
  </Text>
@@ -60,7 +61,7 @@ const Root = () => {
60
61
  <Flex>
61
62
  <Text
62
63
  letterSpacing="x5"
63
- size="x1"
64
+ size="1"
64
65
  uppercase>
65
66
  Built with
66
67
  </Text>
@@ -73,7 +74,7 @@ const Root = () => {
73
74
  <Flex>
74
75
  <Text
75
76
  letterSpacing="x5"
76
- size="x1"
77
+ size="1"
77
78
  uppercase>
78
79
  in London & Budapest
79
80
  </Text>
@@ -5,7 +5,7 @@ const SectionSubTitle: React.SFC<TextProps> = (props: TextProps) => {
5
5
  return (
6
6
  <Text { ...props }
7
7
  margin="x3"
8
- size="x2"
8
+ size="2"
9
9
  uppercase />
10
10
  );
11
11
  };
@@ -5,7 +5,7 @@ const SectionTitle: React.SFC<TextProps> = (props: TextProps) => {
5
5
  return (
6
6
  <Text { ...props }
7
7
  margin="x6"
8
- size="x5"
8
+ size="5"
9
9
  textColor="grape-4"
10
10
  weight="bold" />
11
11
  );
@@ -50,7 +50,7 @@ const Window: React.FunctionComponent<Props> = (props: Props) => {
50
50
  </Flex>
51
51
 
52
52
  <Flex grow initial="none">
53
- <Text config="8" ellipsis>{ title }</Text>
53
+ <Text ellipsis size="2">{ title }</Text>
54
54
  </Flex>
55
55
 
56
56
  <Flex>
@@ -75,7 +75,7 @@ const AddonBeam: React.FunctionComponent<Props> = (props: Props) => {
75
75
  </Flex>
76
76
 
77
77
  <Flex>
78
- <Text size="x3">
78
+ <Text size="3">
79
79
  <Text inline weight="bold">{ addonName }</Text> by Bitrise
80
80
  </Text>
81
81
  </Flex>
@@ -12,10 +12,10 @@ export interface Props extends FlexProps {
12
12
  const AddonFooter: React.FunctionComponent<Props> = ({ addonName, ...rest }: Props) => (
13
13
  <Flex { ...rest } alignChildren="middle" direction="vertical">
14
14
  <Icon margin="x2" name="Bitbot" size="1.5rem" />
15
- <Text align="middle" letterSpacing="x5" size="x1" uppercase>
15
+ <Text align="middle" letterSpacing="x5" size="1" uppercase>
16
16
  { addonName }
17
17
  </Text>
18
- <Text align="middle" letterSpacing="x5" size="x1" uppercase>
18
+ <Text align="middle" letterSpacing="x5" size="1" uppercase>
19
19
  An Official Bitrise Add-on
20
20
  </Text>
21
21
  </Flex>
@@ -51,7 +51,7 @@ const Avatar: React.FunctionComponent<Props> = (props: Props) => {
51
51
  width={ size }>
52
52
  <Flex>
53
53
  { memoizedValue.shortHand && (
54
- <Text config="7" textColor="white">
54
+ <Text size="3" textColor="white">
55
55
  { memoizedValue.shortHand }
56
56
  </Text>
57
57
  ) }
@@ -2,4 +2,5 @@
2
2
  display: inline-block;
3
3
  padding: 0.1875rem var(--size--x2);
4
4
  border-radius: var(--size--x1);
5
+ line-height: 1.125rem;
5
6
  }
@@ -12,7 +12,8 @@ const Badge: React.FunctionComponent<Props> = (props: Props) => {
12
12
  return (
13
13
  <Text { ...props }
14
14
  className="Badge"
15
- config="9" />
15
+ size="1"
16
+ uppercase />
16
17
  );
17
18
  };
18
19
 
@@ -36,21 +36,21 @@
36
36
  padding: var(--Button--padding-small-vertical) var(--Button--padding-small-horizontal);
37
37
  border-width: var(--Button--border-small);
38
38
  border-radius: var(--size--x1);
39
- font-size: var(--font-size--x2);
39
+ font-size: var(--font-size--2);
40
40
  }
41
41
 
42
42
  .Button--size-medium {
43
43
  padding: var(--Button--padding-medium-vertical) var(--Button--padding-medium-horizontal);
44
44
  border-width: var(--Button--border-medium);
45
45
  border-radius: var(--size--x1);
46
- font-size: var(--font-size--x3);
46
+ font-size: var(--font-size--3);
47
47
  }
48
48
 
49
49
  .Button--size-large {
50
50
  padding: var(--Button--padding-large-vertical) var(--Button--padding-large-horizontal);
51
51
  border-width: var(--Button--border-large);
52
52
  border-radius: 0.375rem;
53
- font-size: var(--font-size--x4);
53
+ font-size: var(--font-size--4);
54
54
  }
55
55
 
56
56
  .Button--borderless {
@@ -20,21 +20,21 @@
20
20
  padding: var(--Button--padding-small-vertical) var(--Button--padding-small-horizontal);
21
21
  border-width: var(--Button--border-small);
22
22
  border-radius: var(--size--x1);
23
- font-size: var(--font-size--x2);
23
+ font-size: var(--font-size--2);
24
24
  }
25
25
 
26
26
  .ColorButton--size-medium {
27
27
  padding: var(--Button--padding-medium-vertical) var(--Button--padding-medium-horizontal);
28
28
  border-width: var(--Button--border-medium);
29
29
  border-radius: var(--size--x1);
30
- font-size: var(--font-size--x3);
30
+ font-size: var(--font-size--3);
31
31
  }
32
32
 
33
33
  .ColorButton--size-large {
34
34
  padding: var(--Button--padding-large-vertical) var(--Button--padding-large-horizontal);
35
35
  border-width: var(--Button--border-large);
36
36
  border-radius: 0.375rem;
37
- font-size: var(--font-size--x4);
37
+ font-size: var(--font-size--4);
38
38
  }
39
39
 
40
40
  .ColorButton--color-blue {
@@ -66,7 +66,7 @@ const DatePickerMonth: React.FunctionComponent<Props> = (props: Props) => {
66
66
  align="middle"
67
67
  key={ day }
68
68
  paddingVertical="x4"
69
- size="x2"
69
+ size="2"
70
70
  textColor="gray-5"
71
71
  uppercase>
72
72
  { day }
@@ -6,7 +6,7 @@ export interface Props extends TextProps {}
6
6
  /** Provides specific styling for an inline input label */
7
7
  const InputInlineHelp: React.FunctionComponent<Props> = (props: Props) => {
8
8
  return (
9
- <Text config="8" margin="x2" textColor="gray-6" { ...props } />
9
+ <Text margin="x2" size="2" textColor="gray-6" { ...props } />
10
10
  );
11
11
  };
12
12
 
@@ -12,7 +12,7 @@ const InputLabel: React.FunctionComponent<Props> = (props: Props) => {
12
12
  <Text { ...props }
13
13
  Component="label"
14
14
  margin="x1"
15
- size="x3"
15
+ size="3"
16
16
  textColor="grape-4"
17
17
  weight="bold" />
18
18
  );
@@ -11,7 +11,7 @@ const ModalTitle: React.FunctionComponent<Props> = (props: Props) => {
11
11
  <Text { ...props }
12
12
  letterSpacing="x1"
13
13
  margin="x4"
14
- size="x5"
14
+ size="5"
15
15
  textColor="grape-5"
16
16
  weight="bold" />
17
17
  );
@@ -154,7 +154,7 @@ const ProgressBitbot: React.FunctionComponent<Props> = (props: Props) => {
154
154
  <Text
155
155
  align="middle"
156
156
  letterSpacing="x5"
157
- size="x1"
157
+ size="1"
158
158
  uppercase>{ content }</Text>
159
159
  ) }
160
160
  </Text>
@@ -20,10 +20,10 @@ const Status404: React.FunctionComponent<Props> = (props: Props) => {
20
20
  direction={ match('65rem') ? 'horizontal' : 'vertical' }
21
21
  gap={ match('65rem') ? 'x8' : 'x4' }
22
22
  paddingHorizontal="x6">
23
- <Text align="middle" config="1">
23
+ <Text align="middle" size="7" weight="bold">
24
24
  404
25
25
  </Text>
26
- <Text align="middle" config="3">
26
+ <Text align="middle" size="6" weight="bold">
27
27
  The coordinates you are looking for do not exist
28
28
  </Text>
29
29
  </Flex>
@@ -19,15 +19,15 @@ const Status500: React.FunctionComponent<Props> = (props: Props) => {
19
19
  alignChildren="middle"
20
20
  direction={ match('65rem') ? 'horizontal' : 'vertical' }
21
21
  gap={ match('65rem') ? 'x8' : 'x4' }>
22
- <Text align="middle" config="1">
22
+ <Text align="middle" size="7" weight="bold">
23
23
  500
24
24
  </Text>
25
- <Text align="middle" config="3">
25
+ <Text align="middle" size="2" uppercase weight="bold">
26
26
  Something went wrong
27
27
  </Text>
28
28
  </Flex>
29
29
 
30
- <Text align="middle" letterSpacing="x2" margin="x5" size="x4">
30
+ <Text align="middle" letterSpacing="x2" margin="x5" size="4">
31
31
  Everything is under control, we will be back soon. Until then keep refreshing your browser.
32
32
  </Text>
33
33
 
package/src/Text/Text.css CHANGED
@@ -12,25 +12,6 @@
12
12
  .Text--letter-spacing-x4 { letter-spacing: var(--letter-spacing--x4); }
13
13
  .Text--letter-spacing-x5 { letter-spacing: var(--letter-spacing--x5); }
14
14
 
15
- .Text--size-x1 { font-size: var(--font-size--x1); line-height: var(--line-height--x1); }
16
- .Text--size-x2 { font-size: var(--font-size--x2); line-height: var(--line-height--x2); }
17
- .Text--size-x3 { font-size: var(--font-size--x3); line-height: var(--line-height--x3); }
18
- .Text--size-x4 { font-size: var(--font-size--x4); line-height: var(--line-height--x4); }
19
- .Text--size-x5 { font-size: var(--font-size--x5); line-height: var(--line-height--x5); }
20
- .Text--size-x6 { font-size: var(--font-size--x6); line-height: var(--line-height--x6); }
21
- .Text--size-x7 { font-size: var(--font-size--x7); line-height: var(--line-height--x7); }
22
- .Text--size-x8 { font-size: var(--font-size--x8); line-height: var(--line-height--x8); }
23
-
24
- .Text--line-height-1 { line-height: 1; }
25
- .Text--line-height-x1 { line-height: var(--line-height--x1); }
26
- .Text--line-height-x2 { line-height: var(--line-height--x2); }
27
- .Text--line-height-x3 { line-height: var(--line-height--x3); }
28
- .Text--line-height-x4 { line-height: var(--line-height--x4); }
29
- .Text--line-height-x5 { line-height: var(--line-height--x5); }
30
- .Text--line-height-x6 { line-height: var(--line-height--x6); }
31
- .Text--line-height-x7 { line-height: var(--line-height--x7); }
32
- .Text--line-height-x8 { line-height: var(--line-height--x8); }
33
-
34
15
  .Text--weight-bold { font-weight: var(--font-weight--bold); }
35
16
  .Text--weight-medium { font-weight: var(--font-weight--medium); }
36
17
 
package/src/Text/Text.tsx CHANGED
@@ -1,13 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import classnames from 'classnames';
3
3
  import Base, { Props as BaseProps } from '../Base/Base';
4
- import './TextConfigurations.css';
4
+ import './TextSizes.css';
5
5
  import './Text.css';
6
6
 
7
- export type TypeTextConfig = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
8
7
  export type TypeTextLetterSpacing = 'x1' | 'x2' | 'x3' | 'x4' | 'x5';
9
- export type TypeLineHeight = '1' | 'x1' | 'x2' | 'x3' | 'x4' | 'x5' | 'x6' | 'x7' | 'x8';
10
- export type TypeTextSize = 'x1' | 'x2' | 'x3' | 'x4' | 'x5' | 'x6' | 'x7' | 'x8';
8
+ export type TypeTextSize = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
11
9
  export type TypeTextWeight = 'bold' | 'medium';
12
10
 
13
11
  export interface Props extends BaseProps {
@@ -23,8 +21,6 @@ export interface Props extends BaseProps {
23
21
  breakOn?: 'all' | 'none' | 'word';
24
22
  /** @ignore */
25
23
  className?: string;
26
- /* Shortcut for setting the correct combination of props for valid typeography design */
27
- config?: TypeTextConfig;
28
24
  /** Clips overflowing text with an ellipsis */
29
25
  ellipsis?: boolean;
30
26
  /** Empahsises text with an italic style */
@@ -33,11 +29,9 @@ export interface Props extends BaseProps {
33
29
  inline?: boolean;
34
30
  /** Adjusts the texts letter spacing to one of the curated values */
35
31
  letterSpacing?: TypeTextLetterSpacing;
36
- /** Adjusts the line height to one of the curated values */
37
- lineHeight?: TypeLineHeight;
38
32
  /** Sets the text to use a monospaced font family */
39
33
  monospace?: boolean;
40
- /** Adjusts the texts sizing to one of the curated values */
34
+ /* Shortcut for setting the correct combination of props for valid typeography design */
41
35
  size?: TypeTextSize;
42
36
  /** Sets the text to use title casing (first letter of each word is uppercase) */
43
37
  titlecase?: boolean;
@@ -47,17 +41,6 @@ export interface Props extends BaseProps {
47
41
  weight?: TypeTextWeight;
48
42
  }
49
43
 
50
- const ComponentMap = {
51
- x1: 'div',
52
- x2: 'div',
53
- x3: 'div',
54
- x4: 'h5',
55
- x5: 'h4',
56
- x6: 'h3',
57
- x7: 'h2',
58
- x8: 'h1',
59
- };
60
-
61
44
  const InlineComponentMap = (props: Props) =>
62
45
  (props.weight === 'bold' && 'strong') ||
63
46
  (props.emphasis && 'em') ||
@@ -73,12 +56,10 @@ const Text: React.FunctionComponent<Props> = (props: Props) => {
73
56
  align,
74
57
  breakOn,
75
58
  className,
76
- config,
77
59
  ellipsis,
78
60
  emphasis,
79
61
  inline,
80
62
  letterSpacing,
81
- lineHeight,
82
63
  monospace,
83
64
  size,
84
65
  titlecase,
@@ -95,16 +76,12 @@ const Text: React.FunctionComponent<Props> = (props: Props) => {
95
76
  'Text--uppercase': uppercase,
96
77
  [`Text--align-${align}`]: align,
97
78
  [`Text--break-${breakOn}`]: breakOn,
98
- [`Text--config-${config}`]: config,
99
79
  [`Text--letter-spacing-${letterSpacing}`]: letterSpacing,
100
- [`Text--line-height-${lineHeight}`]: lineHeight,
101
80
  [`Text--size-${size}`]: size,
102
81
  [`Text--weight-${weight}`]: weight,
103
82
  });
104
83
 
105
- const component = Component || (inline
106
- ? InlineComponentMap(props)
107
- : (size ? ComponentMap[size] : 'div'));
84
+ const component = inline ? InlineComponentMap(props) : Component;
108
85
 
109
86
  return (
110
87
  <Base { ...rest }