@bitrise/bitkit 7.14.1 → 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 (139) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +2 -0
  3. package/lib/cjs/AddonBeam/AddonBeam.js +1 -1
  4. package/lib/cjs/AddonBeam/AddonBeam.js.map +1 -1
  5. package/lib/cjs/AddonFooter/AddonFooter.js +2 -2
  6. package/lib/cjs/AddonFooter/AddonFooter.js.map +1 -1
  7. package/lib/cjs/Avatar/Avatar.js +1 -1
  8. package/lib/cjs/Avatar/Avatar.js.map +1 -1
  9. package/lib/cjs/Badge/Badge.css +1 -0
  10. package/lib/cjs/Badge/Badge.d.ts.map +1 -1
  11. package/lib/cjs/Badge/Badge.js +1 -1
  12. package/lib/cjs/Badge/Badge.js.map +1 -1
  13. package/lib/cjs/Button/Button.css +3 -3
  14. package/lib/cjs/Button/ColorButton.css +3 -3
  15. package/lib/cjs/DatePicker/DatePickerMonth.js +1 -1
  16. package/lib/cjs/DatePicker/DatePickerMonth.js.map +1 -1
  17. package/lib/cjs/Input/InputInlineHelp.js +1 -1
  18. package/lib/cjs/Input/InputInlineHelp.js.map +1 -1
  19. package/lib/cjs/Input/InputLabel.js +1 -1
  20. package/lib/cjs/Input/InputLabel.js.map +1 -1
  21. package/lib/cjs/Modal/ModalTitle.js +1 -1
  22. package/lib/cjs/Modal/ModalTitle.js.map +1 -1
  23. package/lib/cjs/Progress/ProgressBitbot.js +1 -1
  24. package/lib/cjs/Progress/ProgressBitbot.js.map +1 -1
  25. package/lib/cjs/Status/Status404.js +2 -2
  26. package/lib/cjs/Status/Status404.js.map +1 -1
  27. package/lib/cjs/Status/Status500.js +3 -3
  28. package/lib/cjs/Status/Status500.js.map +1 -1
  29. package/lib/cjs/Text/Text.css +0 -19
  30. package/lib/cjs/Text/Text.d.ts +2 -8
  31. package/lib/cjs/Text/Text.d.ts.map +1 -1
  32. package/lib/cjs/Text/Text.js +3 -17
  33. package/lib/cjs/Text/Text.js.map +1 -1
  34. package/lib/cjs/Text/TextSizes.css +39 -0
  35. package/lib/cjs/Tooltip/Tooltip.js +1 -1
  36. package/lib/cjs/Tooltip/Tooltip.js.map +1 -1
  37. package/lib/cjs/index.d.ts +1 -1
  38. package/lib/cjs/index.d.ts.map +1 -1
  39. package/lib/cjs/index.js.map +1 -1
  40. package/lib/cjs/root.css +2 -2
  41. package/lib/cjs/tsconfig.tsbuildinfo +19 -19
  42. package/lib/cjs/variables.css +16 -16
  43. package/lib/cjs/variables.d.ts +16 -16
  44. package/lib/cjs/variables.d.ts.map +1 -1
  45. package/lib/cjs/variables.js +16 -16
  46. package/lib/cjs/variables.js.map +1 -1
  47. package/lib/esn/AddonBeam/AddonBeam.js +1 -1
  48. package/lib/esn/AddonBeam/AddonBeam.js.map +1 -1
  49. package/lib/esn/AddonFooter/AddonFooter.js +2 -2
  50. package/lib/esn/AddonFooter/AddonFooter.js.map +1 -1
  51. package/lib/esn/Avatar/Avatar.js +1 -1
  52. package/lib/esn/Avatar/Avatar.js.map +1 -1
  53. package/lib/esn/Badge/Badge.css +1 -0
  54. package/lib/esn/Badge/Badge.d.ts.map +1 -1
  55. package/lib/esn/Badge/Badge.js +1 -1
  56. package/lib/esn/Badge/Badge.js.map +1 -1
  57. package/lib/esn/Button/Button.css +3 -3
  58. package/lib/esn/Button/ColorButton.css +3 -3
  59. package/lib/esn/DatePicker/DatePickerMonth.js +1 -1
  60. package/lib/esn/DatePicker/DatePickerMonth.js.map +1 -1
  61. package/lib/esn/Input/InputInlineHelp.js +1 -1
  62. package/lib/esn/Input/InputInlineHelp.js.map +1 -1
  63. package/lib/esn/Input/InputLabel.js +1 -1
  64. package/lib/esn/Input/InputLabel.js.map +1 -1
  65. package/lib/esn/Modal/ModalTitle.js +1 -1
  66. package/lib/esn/Modal/ModalTitle.js.map +1 -1
  67. package/lib/esn/Progress/ProgressBitbot.js +1 -1
  68. package/lib/esn/Progress/ProgressBitbot.js.map +1 -1
  69. package/lib/esn/Status/Status404.js +2 -2
  70. package/lib/esn/Status/Status404.js.map +1 -1
  71. package/lib/esn/Status/Status500.js +3 -3
  72. package/lib/esn/Status/Status500.js.map +1 -1
  73. package/lib/esn/Text/Text.css +0 -19
  74. package/lib/esn/Text/Text.d.ts +2 -8
  75. package/lib/esn/Text/Text.d.ts.map +1 -1
  76. package/lib/esn/Text/Text.js +3 -17
  77. package/lib/esn/Text/Text.js.map +1 -1
  78. package/lib/esn/Text/TextSizes.css +39 -0
  79. package/lib/esn/Tooltip/Tooltip.js +1 -1
  80. package/lib/esn/Tooltip/Tooltip.js.map +1 -1
  81. package/lib/esn/index.d.ts +1 -1
  82. package/lib/esn/index.d.ts.map +1 -1
  83. package/lib/esn/index.js.map +1 -1
  84. package/lib/esn/root.css +2 -2
  85. package/lib/esn/tsconfig.tsbuildinfo +19 -19
  86. package/lib/esn/variables.css +16 -16
  87. package/lib/esn/variables.d.ts +16 -16
  88. package/lib/esn/variables.d.ts.map +1 -1
  89. package/lib/esn/variables.js +16 -16
  90. package/lib/esn/variables.js.map +1 -1
  91. package/package.json +1 -1
  92. package/site/components/CodeBlock/CodeBlock.css +2 -2
  93. package/site/components/Documentation/ComponentDocumentationPage.tsx +7 -7
  94. package/site/components/Documentation/Components/SectionCards.tsx +10 -10
  95. package/site/components/Documentation/Components/SectionDropdowns.tsx +1 -1
  96. package/site/components/Documentation/Components/SectionExpand.tsx +6 -6
  97. package/site/components/Documentation/Components/SectionFlex.tsx +1 -1
  98. package/site/components/Documentation/Components/SectionGrid.tsx +1 -1
  99. package/site/components/Documentation/Components/SectionIcons.tsx +1 -1
  100. package/site/components/Documentation/Components/SectionModals.tsx +3 -3
  101. package/site/components/Documentation/Components/SectionSidebar.tsx +1 -1
  102. package/site/components/Documentation/Components/SectionStatusSandbox404.tsx +1 -1
  103. package/site/components/Documentation/Components/SectionText.tsx +6 -6
  104. package/site/components/Documentation/Materials/SectionColors.tsx +6 -6
  105. package/site/components/Documentation/Materials/SectionIcons.tsx +2 -2
  106. package/site/components/Documentation/Materials/SectionTypography.tsx +39 -83
  107. package/site/components/Page/PageTitle.tsx +1 -1
  108. package/site/components/PropsTable/PropsTable.tsx +1 -1
  109. package/site/components/PropsTable/PropsTableCellUnion.tsx +1 -1
  110. package/site/components/PropsTable/PropsTableRow.tsx +3 -3
  111. package/site/components/Root/Root.tsx +5 -4
  112. package/site/components/Section/SectionSubTitle.tsx +1 -1
  113. package/site/components/Section/SectionTitle.tsx +1 -1
  114. package/site/components/Window/Window.tsx +1 -1
  115. package/src/AddonBeam/AddonBeam.tsx +1 -1
  116. package/src/AddonFooter/AddonFooter.tsx +2 -2
  117. package/src/Avatar/Avatar.tsx +1 -1
  118. package/src/Badge/Badge.css +1 -0
  119. package/src/Badge/Badge.tsx +2 -1
  120. package/src/Button/Button.css +3 -3
  121. package/src/Button/ColorButton.css +3 -3
  122. package/src/DatePicker/DatePickerMonth.tsx +1 -1
  123. package/src/Input/InputInlineHelp.tsx +1 -1
  124. package/src/Input/InputLabel.tsx +1 -1
  125. package/src/Modal/ModalTitle.tsx +1 -1
  126. package/src/Progress/ProgressBitbot.tsx +1 -1
  127. package/src/Status/Status404.tsx +2 -2
  128. package/src/Status/Status500.tsx +3 -3
  129. package/src/Text/Text.css +0 -19
  130. package/src/Text/Text.tsx +4 -27
  131. package/src/Text/TextSizes.css +39 -0
  132. package/src/Tooltip/Tooltip.tsx +1 -1
  133. package/src/index.ts +1 -1
  134. package/src/root.css +2 -2
  135. package/src/variables.css +16 -16
  136. package/src/variables.ts +17 -17
  137. package/lib/cjs/Text/TextConfigurations.css +0 -56
  138. package/lib/esn/Text/TextConfigurations.css +0 -56
  139. package/src/Text/TextConfigurations.css +0 -56
@@ -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 }
@@ -0,0 +1,39 @@
1
+ .Text--size-1 {
2
+ font-size: var(--font-size--1);
3
+ line-height: var(--line-height--1);
4
+ }
5
+
6
+ .Text--size-2 {
7
+ font-size: var(--font-size--2);
8
+ line-height: var(--line-height--2);
9
+ }
10
+
11
+ .Text--size-3 {
12
+ font-size: var(--font-size--3);
13
+ line-height: var(--line-height--3);
14
+ }
15
+
16
+ .Text--size-4 {
17
+ font-size: var(--font-size--4);
18
+ line-height: var(--line-heigt--4);
19
+ }
20
+
21
+ .Text--size-5 {
22
+ font-size: var(--font-size--5);
23
+ line-height: var(--line-height--5);
24
+ }
25
+
26
+ .Text--size-6 {
27
+ font-size: var(--font-size--6);
28
+ line-height: var(--line-height--6);
29
+ }
30
+
31
+ .Text--size-7 {
32
+ font-size: var(--font-size--7);
33
+ line-height: var(--line-height--7);
34
+ }
35
+
36
+ .Text--size-8 {
37
+ font-size: var(--font-size--8);
38
+ line-height: var(--line-height--8);
39
+ }
@@ -63,7 +63,7 @@ const Tooltip: React.FunctionComponent<Props> = (props: Props) => {
63
63
  visible={ isControlled ? controlledVisible : uncontrolledVisible }>
64
64
  { () => (
65
65
  <PlacementArea paddingHorizontal="x3" paddingVertical="x2" withArrow>
66
- <Text size="x2">{ title }</Text>
66
+ <Text size="2">{ title }</Text>
67
67
  </PlacementArea>
68
68
  ) }
69
69
  </Placement>
package/src/index.ts CHANGED
@@ -91,7 +91,7 @@ export { default as TableHeaderRow, Props as TableHeaderRowProps } from './Table
91
91
  export { default as TableRow, Props as TableRowProps } from './Table/TableRow';
92
92
  export { default as Tab, Props as TabProps } from './Tabs/Tab';
93
93
  export { default as Tabs, Props as TabsProps } from './Tabs/Tabs';
94
- export { default as Text, Props as TextProps, TypeTextConfig, TypeTextLetterSpacing, TypeTextSize, TypeTextWeight } from './Text/Text';
94
+ export { default as Text, Props as TextProps, TypeTextLetterSpacing, TypeTextSize, TypeTextWeight } from './Text/Text';
95
95
  export { default as Textarea, Props as TextareaProps } from './Textarea/Textarea';
96
96
  export { default as Toggle, Props as ToggleProps } from './Toggle/Toggle';
97
97
  export { default as Tooltip, Props as TooltipProps } from './Tooltip/Tooltip';
package/src/root.css CHANGED
@@ -14,11 +14,11 @@ html {
14
14
  body:not(.bitrise-legacy) {
15
15
  color: var(--color-grape--5);
16
16
  font-family: var(--font-family);
17
- font-size: var(--font-size--x3);
17
+ font-size: var(--font-size--3);
18
18
  -webkit-font-smoothing: antialiased;
19
19
  -moz-osx-font-smoothing: grayscale;
20
20
  font-weight: var(--font-weight--medium);
21
- line-height: var(--line-height--x3);
21
+ line-height: var(--line-height--3);
22
22
  }
23
23
 
24
24
  canvas {
package/src/variables.css CHANGED
@@ -152,14 +152,14 @@
152
152
  --font-family: 'TTNorms', sans-serif;
153
153
  --font-family-monospace: 'Source Code Pro', monospace;
154
154
 
155
- --font-size--x1: 0.625rem;
156
- --font-size--x2: 0.8125rem;
157
- --font-size--x3: 1rem;
158
- --font-size--x4: 1.1875rem;
159
- --font-size--x5: 1.5625rem;
160
- --font-size--x6: 2.125rem;
161
- --font-size--x7: 3rem;
162
- --font-size--x8: 4.125rem;
155
+ --font-size--1: 0.6875rem; /* 11px */
156
+ --font-size--2: 0.875rem; /* 14px */
157
+ --font-size--3: 1rem; /* 16px */
158
+ --font-size--4: 1.1875rem; /* 19px */
159
+ --font-size--5: 1.5rem; /* 24px */
160
+ --font-size--6: 1.875rem; /* 30px */
161
+ --font-size--7: 2.25rem; /* 36 px */
162
+ --font-size--8: 3rem; /* 48px */
163
163
 
164
164
  --font-weight--medium: 500;
165
165
  --font-weight--bold: 700;
@@ -167,14 +167,14 @@
167
167
  --font-weight-monospace--medium: 500;
168
168
  --font-weight-monospace--bold: 600;
169
169
 
170
- --line-height--x1: 1.8; /* 18 / 10 */
171
- --line-height--x2: 1.3846153846153846; /* 18 / 13 */
172
- --line-height--x3: 1.5; /* 24 / 16 */
173
- --line-height--x4: 1.2631578947; /* 24 / 19 */
174
- --line-height--x5: 1.28; /* 32 / 25 */
175
- --line-height--x6: 1.1764705882; /* 40 / 34 */
176
- --line-height--x7: 1.1666666667; /* 56 / 48 */
177
- --line-height--x8: 1.2121212121; /* 80 / 66 */
170
+ --line-height--1: 1.45; /* 16px / 1rem */
171
+ --line-height--2: 1.45; /* 20px / 1.25rem */
172
+ --line-height--3: 1.5; /* 24px / 1.5rem */
173
+ --line-height--4: 1.45; /* 28px / 1.75rem */
174
+ --line-height--5: 1.5; /* 36px / 2.25rem */
175
+ --line-height--6: 1.33; /* 40px / 2.5rem */
176
+ --line-height--7: 1.33; /* 48px / 3rem */
177
+ --line-height--8: 1.25; /* 60px / 3.75rem */
178
178
 
179
179
  --letter-spacing--x1: 0.00625rem;
180
180
  --letter-spacing--x2: 0.009375rem;
package/src/variables.ts CHANGED
@@ -289,23 +289,23 @@ export const sizeX16 = 64;
289
289
 
290
290
  export const icons = IconList;
291
291
 
292
- export const fontSizeX1Px = 10;
293
- export const fontSizeX2Px = 13;
294
- export const fontSizeX3Px = 16;
295
- export const fontSizeX4Px = 19;
296
- export const fontSizeX5Px = 25;
297
- export const fontSizeX6Px = 34;
298
- export const fontSizeX7Px = 48;
299
- export const fontSizeX8Px = 66;
300
-
301
- export const lineHeightX1Px = 18;
302
- export const lineHeightX2Px = 18;
303
- export const lineHeightX3Px = 24;
304
- export const lineHeightX4Px = 24;
305
- export const lineHeightX5Px = 32;
306
- export const lineHeightX6Px = 40;
307
- export const lineHeightX7Px = 56;
308
- export const lineHeightX8Px = 80;
292
+ export const fontSize1Px = 11;
293
+ export const fontSize2Px = 14;
294
+ export const fontSize3Px = 16;
295
+ export const fontSize4Px = 19;
296
+ export const fontSize5Px = 24;
297
+ export const fontSize6Px = 30;
298
+ export const fontSize7Px = 36;
299
+ export const fontSize8Px = 48;
300
+
301
+ export const lineHeight1Px = 16;
302
+ export const lineHeight2Px = 20;
303
+ export const lineHeight3Px = 24;
304
+ export const lineHeight4Px = 28;
305
+ export const lineHeight5Px = 36;
306
+ export const lineHeight6Px = 40;
307
+ export const lineHeight7Px = 48;
308
+ export const lineHeight8Px = 60;
309
309
 
310
310
  export const letterSpacingX1Px = 0.1;
311
311
  export const letterSpacingX2Px = 0.15;
@@ -1,56 +0,0 @@
1
- .Text--config-1 {
2
- font-size: var(--font-size--x8);
3
- font-weight: var(--font-weight--bold);
4
- letter-spacing: var(--letter-spacing--x1);
5
- line-height: var(--line-height--x8);
6
- }
7
-
8
- .Text--config-2 {
9
- font-size: var(--font-size--x7);
10
- font-weight: var(--font-weight--bold);
11
- line-height: var(--line-height--x7);
12
- }
13
-
14
- .Text--config-3 {
15
- font-size: var(--font-size--x6);
16
- font-weight: var(--font-weight--bold);
17
- letter-spacing: var(--letter-spacing--x2);
18
- line-height: var(--line-height--x6);
19
- }
20
-
21
- .Text--config-4 {
22
- font-size: var(--font-size--x5);
23
- font-weight: var(--font-weight--bold);
24
- letter-spacing: var(--letter-spacing--x3);
25
- line-height: var(--line-height--x5);
26
- }
27
-
28
- .Text--config-5 {
29
- font-size: var(--font-size--x4);
30
- font-weight: var(--font-weight--bold);
31
- line-height: var(--line-height--x4);
32
- }
33
-
34
- .Text--config-6 {
35
- font-size: var(--font-size--x2);
36
- letter-spacing: var(--letter-spacing--x4);
37
- text-transform: uppercase;
38
- line-height: var(--line-height--x2);
39
- }
40
-
41
- .Text--config-7 {
42
- font-size: var(--font-size--x3);
43
- line-height: var(--line-height--x3);
44
- }
45
-
46
- .Text--config-8 {
47
- font-size: var(--font-size--x2);
48
- line-height: var(--line-height--x2);
49
- }
50
-
51
- .Text--config-9 {
52
- font-size: var(--font-size--x1);
53
- letter-spacing: var(--letter-spacing--x5);
54
- text-transform: uppercase;
55
- line-height: var(--line-height--x1);
56
- }