@atlaskit/ds-explorations 0.0.2 → 0.1.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 (88) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cjs/components/box.partial.js +217 -82
  3. package/dist/cjs/components/inline.partial.js +120 -0
  4. package/dist/cjs/components/stack.partial.js +112 -0
  5. package/dist/cjs/components/text.partial.js +92 -34
  6. package/dist/cjs/components/types.js +5 -0
  7. package/dist/cjs/constants.js +2 -0
  8. package/dist/cjs/index.js +34 -3
  9. package/dist/cjs/version.json +1 -1
  10. package/dist/es2019/components/box.partial.js +200 -82
  11. package/dist/es2019/components/inline.partial.js +107 -0
  12. package/dist/es2019/components/stack.partial.js +102 -0
  13. package/dist/es2019/components/text.partial.js +80 -34
  14. package/dist/es2019/components/types.js +1 -0
  15. package/dist/es2019/constants.js +2 -0
  16. package/dist/es2019/index.js +4 -1
  17. package/dist/es2019/version.json +1 -1
  18. package/dist/esm/components/box.partial.js +212 -82
  19. package/dist/esm/components/inline.partial.js +106 -0
  20. package/dist/esm/components/stack.partial.js +101 -0
  21. package/dist/esm/components/text.partial.js +89 -33
  22. package/dist/esm/components/types.js +1 -0
  23. package/dist/esm/constants.js +2 -0
  24. package/dist/esm/index.js +4 -1
  25. package/dist/esm/version.json +1 -1
  26. package/dist/types/components/box.partial.d.ts +87 -26
  27. package/dist/types/components/inline.partial.d.ts +52 -0
  28. package/dist/types/components/stack.partial.d.ts +47 -0
  29. package/dist/types/components/text.partial.d.ts +63 -15
  30. package/dist/types/components/types.d.ts +13 -0
  31. package/dist/types/constants.d.ts +2 -0
  32. package/dist/types/index.d.ts +4 -2
  33. package/examples/00-basic.tsx +18 -1
  34. package/examples/01-box.tsx +126 -2
  35. package/examples/02-text.tsx +55 -2
  36. package/examples/03-stack.tsx +125 -0
  37. package/examples/04-inline.tsx +134 -0
  38. package/examples/{03-badge.tsx → 05-badge.tsx} +4 -4
  39. package/examples/{04-section-message.tsx → 06-section-message.tsx} +5 -5
  40. package/examples/{05-comment.tsx → 07-comment.tsx} +10 -8
  41. package/examples/08-lozenge.tsx +29 -0
  42. package/package.json +2 -2
  43. package/report.api.md +457 -4
  44. package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +80 -47
  45. package/scripts/codegen-styles.tsx +5 -1
  46. package/scripts/color-codegen-template.tsx +33 -11
  47. package/scripts/spacing-codegen-template.tsx +9 -1
  48. package/src/components/__tests__/unit/box.test.tsx +20 -0
  49. package/src/components/__tests__/unit/inline.test.tsx +43 -0
  50. package/src/components/__tests__/unit/stack.test.tsx +31 -0
  51. package/src/components/__tests__/unit/text.test.tsx +17 -0
  52. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-basic-example-should-match-production-example-1-snap.png +3 -0
  53. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-alignment-should-match-snapshot-1-snap.png +3 -0
  54. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-block-should-match-snapshot-1-snap.png +3 -0
  55. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-inline-should-match-snapshot-1-snap.png +3 -0
  56. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-should-match-snapshot-1-snap.png +3 -0
  57. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-color-should-match-snapshot-1-snap.png +3 -0
  58. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-color-should-match-snapshot-1-snap.png +3 -0
  59. package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-should-match-snapshot-1-snap.png +3 -0
  60. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +3 -0
  61. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +3 -0
  62. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +3 -0
  63. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +3 -0
  64. package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-sizes-should-match-snapshot-1-snap.png +3 -0
  65. package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-weights-should-match-snapshot-1-snap.png +3 -0
  66. package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-line-heights-should-match-snapshot-1-snap.png +3 -0
  67. package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-testing-should-match-snapshot-1-snap.png +3 -0
  68. package/src/components/__tests__/visual-regression/box-snapshot-test.tsx +33 -0
  69. package/src/components/__tests__/visual-regression/inline-snapshot-test.tsx +28 -0
  70. package/src/components/__tests__/visual-regression/stack-snapshot-test.tsx +28 -0
  71. package/src/components/__tests__/visual-regression/text-snapshot-test.tsx +31 -0
  72. package/src/components/box.partial.tsx +253 -116
  73. package/src/components/inline.partial.tsx +117 -0
  74. package/src/components/stack.partial.tsx +101 -0
  75. package/src/components/text.partial.tsx +109 -35
  76. package/src/components/types.tsx +15 -0
  77. package/src/constants.tsx +2 -0
  78. package/src/index.tsx +4 -1
  79. package/dist/cjs/components/inline.js +0 -45
  80. package/dist/cjs/components/stack.js +0 -33
  81. package/dist/es2019/components/inline.js +0 -31
  82. package/dist/es2019/components/stack.js +0 -22
  83. package/dist/esm/components/inline.js +0 -30
  84. package/dist/esm/components/stack.js +0 -21
  85. package/dist/types/components/inline.d.ts +0 -19
  86. package/dist/types/components/stack.d.ts +0 -16
  87. package/src/components/inline.tsx +0 -49
  88. package/src/components/stack.tsx +0 -30
@@ -1,7 +1,131 @@
1
1
  import React from 'react';
2
2
 
3
- import Box from '../src/components/box.partial';
3
+ import Heading from '@atlaskit/heading';
4
4
 
5
+ import {
6
+ UNSAFE_Box as Box,
7
+ UNSAFE_Inline as Inline,
8
+ UNSAFE_Stack as Stack,
9
+ UNSAFE_Text as Text,
10
+ } from '../src';
11
+ import { GlobalSpacingToken, SPACING_SCALE } from '../src/constants';
12
+
13
+ /**
14
+ * Box permutations
15
+ */
5
16
  export default () => {
6
- return <Box>Box</Box>;
17
+ return (
18
+ <Stack gap="sp-400" alignItems="flexStart">
19
+ <Stack gap="sp-200" testId="box-with-background-and-paddingBlock">
20
+ <Heading level="h600">paddingBlock</Heading>
21
+ <Inline gap="sp-200" alignItems="center">
22
+ {Object.keys(SPACING_SCALE).map((space) => (
23
+ <Box
24
+ key={space}
25
+ backgroundColor={['discovery.bold', 'purple']}
26
+ paddingBlock={space as GlobalSpacingToken}
27
+ >
28
+ <Box
29
+ backgroundColor={['elevation.surface', 'white']}
30
+ justifyContent="center"
31
+ >
32
+ <Text>{space}</Text>
33
+ </Box>
34
+ </Box>
35
+ ))}
36
+ </Inline>
37
+ </Stack>
38
+
39
+ <Stack gap="sp-200" testId="box-with-background-and-paddingInline">
40
+ <Heading level="h600">paddingInline</Heading>
41
+ <Stack gap="sp-200" alignItems="center">
42
+ {Object.keys(SPACING_SCALE).map((space) => (
43
+ <Box
44
+ key={space}
45
+ backgroundColor={['discovery.bold', 'purple']}
46
+ paddingInline={space as GlobalSpacingToken}
47
+ >
48
+ <Box
49
+ backgroundColor={['elevation.surface', 'white']}
50
+ justifyContent="center"
51
+ >
52
+ <Text>{space}</Text>
53
+ </Box>
54
+ </Box>
55
+ ))}
56
+ </Stack>
57
+ </Stack>
58
+
59
+ <Stack gap="sp-200" testId="box-with-background-and-padding">
60
+ <Heading level="h600">padding</Heading>
61
+ <Inline gap="sp-200" alignItems="center">
62
+ {Object.keys(SPACING_SCALE).map((space) => (
63
+ <Box
64
+ key={space}
65
+ backgroundColor={['discovery.bold', 'purple']}
66
+ padding={space as GlobalSpacingToken}
67
+ >
68
+ <Box
69
+ backgroundColor={['elevation.surface', 'white']}
70
+ justifyContent="center"
71
+ >
72
+ <Text>{space}</Text>
73
+ </Box>
74
+ </Box>
75
+ ))}
76
+ </Inline>
77
+ </Stack>
78
+
79
+ <Stack gap="sp-200" testId="box-with-backgroundColor">
80
+ <Heading level="h600">backgroundColor</Heading>
81
+ <Inline gap="sp-200" alignItems="center">
82
+ {([
83
+ 'discovery.bold',
84
+ 'success.bold',
85
+ 'warning.bold',
86
+ 'danger.bold',
87
+ 'information.bold',
88
+ 'brand.bold',
89
+ ] as const).map((bgColor) => (
90
+ <Box
91
+ key={bgColor}
92
+ backgroundColor={[bgColor, 'purple']}
93
+ padding={'sp-400'}
94
+ >
95
+ <Box justifyContent="center">
96
+ <Text color={['inverse', 'white']}>{bgColor}</Text>
97
+ </Box>
98
+ </Box>
99
+ ))}
100
+ </Inline>
101
+ </Stack>
102
+
103
+ <Stack gap="sp-200" testId="box-with-borderColor">
104
+ <Heading level="h600">borderColor</Heading>
105
+ <Inline gap="sp-200" alignItems="center">
106
+ {([
107
+ 'discovery',
108
+ 'success',
109
+ 'warning',
110
+ 'danger',
111
+ 'information',
112
+ 'brand',
113
+ ] as const).map((borderColor) => (
114
+ <Box
115
+ key={borderColor}
116
+ backgroundColor={['neutral', 'grey']}
117
+ borderColor={[borderColor, 'purple']}
118
+ borderStyle="solid"
119
+ borderWidth="2px"
120
+ padding={'sp-400'}
121
+ >
122
+ <Box justifyContent="center">
123
+ <Text color={['color.text', 'black']}>{borderColor}</Text>
124
+ </Box>
125
+ </Box>
126
+ ))}
127
+ </Inline>
128
+ </Stack>
129
+ </Stack>
130
+ );
7
131
  };
@@ -1,7 +1,60 @@
1
1
  import React from 'react';
2
2
 
3
- import Text from '../src/components/text.partial';
3
+ import {
4
+ UNSAFE_Box as Box,
5
+ UNSAFE_Inline as Inline,
6
+ UNSAFE_Stack as Stack,
7
+ UNSAFE_Text as Text,
8
+ } from '../src';
4
9
 
5
10
  export default () => {
6
- return <Text>Text</Text>;
11
+ return (
12
+ <Stack gap="sp-200">
13
+ <Text as="h1">Font size</Text>
14
+ <Inline gap="sp-200" testId="font-sizes">
15
+ {(['11', '12', '14'] as const).map((fontSize) => (
16
+ <Text fontSize={fontSize}>fontSize {fontSize}</Text>
17
+ ))}
18
+ </Inline>
19
+
20
+ <Text as="h1">Font weight</Text>
21
+ <Inline gap="sp-200" testId="font-weights">
22
+ {(['400', '500'] as const).map((fontWeight) => (
23
+ <Text fontWeight={fontWeight}>fontWeight {fontWeight}</Text>
24
+ ))}
25
+ </Inline>
26
+
27
+ <Text as="h1">Line height</Text>
28
+ <Inline gap="sp-200" testId="line-heights" alignItems="center">
29
+ {([
30
+ '12px',
31
+ '16px',
32
+ '20px',
33
+ '24px',
34
+ '28px',
35
+ '32px',
36
+ '40px',
37
+ ] as const).map((lineHeight) => (
38
+ <Box display="inlineFlex" backgroundColor={['neutral', 'lightgrey']}>
39
+ <Text lineHeight={lineHeight}>lineHeight {lineHeight}</Text>
40
+ </Box>
41
+ ))}
42
+ </Inline>
43
+
44
+ <Text as="h1">Testing</Text>
45
+ <Inline gap="sp-200" testId="testing">
46
+ <Text>Basic</Text>
47
+ <Text as="h1">Heading 1</Text>
48
+ <Text as="a">Link</Text>
49
+ <Text
50
+ color={['brand', 'blue']}
51
+ fontSize="14"
52
+ lineHeight="16px"
53
+ fontWeight="500"
54
+ >
55
+ Text with various props
56
+ </Text>
57
+ </Inline>
58
+ </Stack>
59
+ );
7
60
  };
@@ -0,0 +1,125 @@
1
+ import React from 'react';
2
+
3
+ import Heading from '@atlaskit/heading';
4
+
5
+ import {
6
+ UNSAFE_Box as Box,
7
+ UNSAFE_Inline as Inline,
8
+ UNSAFE_Stack as Stack,
9
+ } from '../src';
10
+ import { GlobalSpacingToken, SPACING_SCALE } from '../src/constants';
11
+
12
+ const flexAlignItems = ['center', 'baseline', 'flexStart', 'flexEnd'];
13
+ const flexJustifyContent = ['center', 'flexStart', 'flexEnd'];
14
+
15
+ /**
16
+ * Stack permutations
17
+ */
18
+ export default () => {
19
+ return (
20
+ <Stack gap="sp-300">
21
+ <Stack gap="sp-300" testId="stack-spacing">
22
+ <Heading level="h700">Spacing</Heading>
23
+ <Inline gap="sp-400">
24
+ {Object.keys(SPACING_SCALE).map((space) => (
25
+ <Stack gap="sp-300">
26
+ <Heading level="h500">{space}</Heading>
27
+
28
+ <Box backgroundColor={['neutral', 'grey']}>
29
+ <Stack gap={space as GlobalSpacingToken} alignItems="center">
30
+ <Box
31
+ padding="sp-100"
32
+ backgroundColor={['success.bold', 'green']}
33
+ >
34
+ {' '}
35
+ </Box>
36
+ <Box
37
+ padding="sp-100"
38
+ backgroundColor={['success.bold', 'green']}
39
+ >
40
+ {' '}
41
+ </Box>
42
+ <Box
43
+ padding="sp-100"
44
+ backgroundColor={['success.bold', 'green']}
45
+ >
46
+ {' '}
47
+ </Box>
48
+ </Stack>
49
+ </Box>
50
+ </Stack>
51
+ ))}
52
+ </Inline>
53
+ </Stack>
54
+ <Stack gap="sp-300" testId="stack-alignment">
55
+ <Heading level="h700">Alignment</Heading>
56
+ <Heading level="h600">alignItems</Heading>
57
+ <Inline gap="sp-400">
58
+ {flexAlignItems.map((alignItemsValue) => (
59
+ <Stack gap="sp-300">
60
+ <Heading level="h500">{alignItemsValue}</Heading>
61
+
62
+ <Box backgroundColor={['neutral', 'grey']} display="block">
63
+ <Stack gap="sp-200" alignItems={alignItemsValue as any}>
64
+ <Box
65
+ padding="sp-100"
66
+ backgroundColor={['success.bold', 'green']}
67
+ >
68
+ {' '}
69
+ </Box>
70
+ <Box
71
+ padding="sp-100"
72
+ backgroundColor={['success.bold', 'green']}
73
+ >
74
+ {' '}
75
+ </Box>
76
+ <Box
77
+ padding="sp-100"
78
+ backgroundColor={['success.bold', 'green']}
79
+ >
80
+ {' '}
81
+ </Box>
82
+ </Stack>
83
+ </Box>
84
+ </Stack>
85
+ ))}
86
+ </Inline>
87
+
88
+ <Heading level="h600">justifyContent</Heading>
89
+ <Inline gap="sp-400">
90
+ {flexJustifyContent.map((justifyContentValue) => (
91
+ <Stack gap="sp-300">
92
+ <Heading level="h500">{justifyContentValue}</Heading>
93
+
94
+ <Box
95
+ backgroundColor={['neutral', 'grey']}
96
+ UNSAFE_style={{ height: '200px' }}
97
+ >
98
+ <Stack gap="sp-200" justifyContent={justifyContentValue as any}>
99
+ <Box
100
+ padding="sp-100"
101
+ backgroundColor={['success.bold', 'green']}
102
+ >
103
+ {' '}
104
+ </Box>
105
+ <Box
106
+ padding="sp-100"
107
+ backgroundColor={['success.bold', 'green']}
108
+ >
109
+ {' '}
110
+ </Box>
111
+ <Box
112
+ padding="sp-100"
113
+ backgroundColor={['success.bold', 'green']}
114
+ >
115
+ {' '}
116
+ </Box>
117
+ </Stack>
118
+ </Box>
119
+ </Stack>
120
+ ))}
121
+ </Inline>
122
+ </Stack>
123
+ </Stack>
124
+ );
125
+ };
@@ -0,0 +1,134 @@
1
+ import React from 'react';
2
+
3
+ import Heading from '@atlaskit/heading';
4
+
5
+ import {
6
+ UNSAFE_Box as Box,
7
+ UNSAFE_Inline as Inline,
8
+ UNSAFE_Stack as Stack,
9
+ } from '../src';
10
+ import { GlobalSpacingToken, SPACING_SCALE } from '../src/constants';
11
+
12
+ const flexAlignItems = ['center', 'baseline', 'flexStart', 'flexEnd'];
13
+ const flexJustifyContent = ['center', 'flexStart', 'flexEnd'];
14
+
15
+ /**
16
+ * Inline permutations
17
+ */
18
+ export default () => {
19
+ return (
20
+ <Stack gap="sp-300">
21
+ <Stack gap="sp-300" testId="inline-spacing">
22
+ <Heading level="h700">Spacing</Heading>
23
+ <Stack gap="sp-400">
24
+ {Object.keys(SPACING_SCALE).map((space) => (
25
+ <Inline gap="sp-300">
26
+ <Box width="sp-800">
27
+ <Heading level="h500">{space}</Heading>
28
+ </Box>
29
+
30
+ <Box backgroundColor={['neutral', 'grey']}>
31
+ <Inline gap={space as GlobalSpacingToken} alignItems="center">
32
+ <Box
33
+ padding="sp-100"
34
+ backgroundColor={['success.bold', 'green']}
35
+ >
36
+ {' '}
37
+ </Box>
38
+ <Box
39
+ padding="sp-100"
40
+ backgroundColor={['success.bold', 'green']}
41
+ >
42
+ {' '}
43
+ </Box>
44
+ <Box
45
+ padding="sp-100"
46
+ backgroundColor={['success.bold', 'green']}
47
+ >
48
+ {' '}
49
+ </Box>
50
+ </Inline>
51
+ </Box>
52
+ </Inline>
53
+ ))}
54
+ </Stack>
55
+ </Stack>
56
+ <Stack gap="sp-300" testId="inline-alignment">
57
+ <Heading level="h700">Alignment</Heading>
58
+ <Heading level="h600">alignItems</Heading>
59
+ <Inline gap="sp-400">
60
+ {flexAlignItems.map((alignItemsValue) => (
61
+ <Stack gap="sp-300">
62
+ <Heading level="h500">{alignItemsValue}</Heading>
63
+
64
+ <Box
65
+ backgroundColor={['neutral', 'grey']}
66
+ UNSAFE_style={{ height: '100px' }}
67
+ >
68
+ <Inline gap="sp-200" alignItems={alignItemsValue as any}>
69
+ <Box
70
+ padding="sp-100"
71
+ backgroundColor={['success.bold', 'green']}
72
+ >
73
+ {' '}
74
+ </Box>
75
+ <Box
76
+ padding="sp-100"
77
+ backgroundColor={['success.bold', 'green']}
78
+ >
79
+ {' '}
80
+ </Box>
81
+ <Box
82
+ padding="sp-100"
83
+ backgroundColor={['success.bold', 'green']}
84
+ >
85
+ {' '}
86
+ </Box>
87
+ </Inline>
88
+ </Box>
89
+ </Stack>
90
+ ))}
91
+ </Inline>
92
+
93
+ <Heading level="h600">justifyContent</Heading>
94
+ <Inline gap="sp-400">
95
+ {flexJustifyContent.map((justifyContentValue) => (
96
+ <Stack gap="sp-300">
97
+ <Heading level="h500">{justifyContentValue}</Heading>
98
+
99
+ <Box
100
+ display="block"
101
+ backgroundColor={['neutral', 'grey']}
102
+ UNSAFE_style={{ width: '140px' }}
103
+ >
104
+ <Inline
105
+ gap="sp-200"
106
+ justifyContent={justifyContentValue as any}
107
+ >
108
+ <Box
109
+ padding="sp-100"
110
+ backgroundColor={['success.bold', 'green']}
111
+ >
112
+ {' '}
113
+ </Box>
114
+ <Box
115
+ padding="sp-100"
116
+ backgroundColor={['success.bold', 'green']}
117
+ >
118
+ {' '}
119
+ </Box>
120
+ <Box
121
+ padding="sp-100"
122
+ backgroundColor={['success.bold', 'green']}
123
+ >
124
+ {' '}
125
+ </Box>
126
+ </Inline>
127
+ </Box>
128
+ </Stack>
129
+ ))}
130
+ </Inline>
131
+ </Stack>
132
+ </Stack>
133
+ );
134
+ };
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import Badge from '@atlaskit/badge';
4
4
 
5
- import Box from '../src/components/box.partial';
5
+ import { UNSAFE_Box as Box } from '../src';
6
6
  import Text from '../src/components/text.partial';
7
7
 
8
8
  export default () => {
@@ -11,12 +11,12 @@ export default () => {
11
11
  <Badge>{8}</Badge>
12
12
  <Box
13
13
  borderRadius="badge"
14
- backgroundColor="neutral"
14
+ backgroundColor={['neutral', 'white']}
15
15
  display="inlineFlex"
16
16
  paddingInline="sp-75"
17
- style={{ lineHeight: '16px' }}
17
+ UNSAFE_style={{ lineHeight: '16px' }}
18
18
  >
19
- <Text fontSize="small">8</Text>
19
+ <Text fontSize="12">8</Text>
20
20
  </Box>
21
21
  </>
22
22
  );
@@ -11,9 +11,9 @@ import SectionMessage, {
11
11
  } from '@atlaskit/section-message';
12
12
  import { token } from '@atlaskit/tokens';
13
13
 
14
- import Box from '../src/components/box.partial';
15
- import Inline from '../src/components/inline';
16
- import Stack from '../src/components/stack';
14
+ import { UNSAFE_Box as Box } from '../src';
15
+ import Inline from '../src/components/inline.partial';
16
+ import Stack from '../src/components/stack.partial';
17
17
  import Text from '../src/components/text.partial';
18
18
 
19
19
  export default () => {
@@ -22,7 +22,7 @@ export default () => {
22
22
  <Box
23
23
  paddingBlock="sp-200"
24
24
  paddingInline="sp-200"
25
- backgroundColor="information"
25
+ backgroundColor={['information', 'purple']}
26
26
  >
27
27
  <Inline gap="sp-200">
28
28
  <InfoIcon
@@ -40,7 +40,7 @@ export default () => {
40
40
  to assure my dear sister of my welfare and increasing confidence
41
41
  in the success of my undertaking.
42
42
  </Text>
43
- <Inline separator="·" gap="sp-100">
43
+ <Inline divider="·" gap="sp-100">
44
44
  <Button
45
45
  appearance="link"
46
46
  spacing="none"
@@ -3,13 +3,13 @@ import { jsx } from '@emotion/core';
3
3
 
4
4
  import Lozenge from '@atlaskit/lozenge';
5
5
 
6
- import Box from '../src/components/box.partial';
7
- import Inline from '../src/components/inline';
8
- import Stack from '../src/components/stack';
6
+ import { UNSAFE_Box as Box } from '../src';
7
+ import Inline from '../src/components/inline.partial';
8
+ import Stack from '../src/components/stack.partial';
9
9
  import Text from '../src/components/text.partial';
10
10
 
11
11
  const Author = ({ children }: any) => {
12
- return <Text fontWeight={500}>{children}</Text>;
12
+ return <Text fontWeight="500">{children}</Text>;
13
13
  };
14
14
 
15
15
  const Date = ({ children }: any) => {
@@ -17,11 +17,13 @@ const Date = ({ children }: any) => {
17
17
  };
18
18
 
19
19
  const EditIndicator = ({ hasBeenEdited }: any) => {
20
- return hasBeenEdited ? <Text color="subtlest">Edited</Text> : null;
20
+ return hasBeenEdited ? (
21
+ <Text color={['subtlest', '#555']}>Edited</Text>
22
+ ) : null;
21
23
  };
22
24
 
23
25
  const CommentAction = ({ children }: any) => {
24
- return <Text fontWeight={500}>{children}</Text>;
26
+ return <Text fontWeight="500">{children}</Text>;
25
27
  };
26
28
 
27
29
  export default () => {
@@ -29,7 +31,7 @@ export default () => {
29
31
  <Box>
30
32
  <Stack gap="sp-50">
31
33
  <Inline gap="sp-100" alignItems="center">
32
- <Author>Anthony Roberts</Author>
34
+ <Author>Jane Citizen</Author>
33
35
  <Lozenge>Author</Lozenge>
34
36
  <Date>Jun 15, 2022</Date>
35
37
  <EditIndicator hasBeenEdited />
@@ -41,7 +43,7 @@ export default () => {
41
43
  aliquip ex ea commodo consequat.
42
44
  </Text>
43
45
  <Box color="subtle">
44
- <Inline gap="sp-100" separator="·">
46
+ <Inline gap="sp-100" divider="·">
45
47
  <CommentAction>Reply</CommentAction>
46
48
  <CommentAction>Edit</CommentAction>
47
49
  <CommentAction>Like</CommentAction>
@@ -0,0 +1,29 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/core';
3
+
4
+ import Lozenge from '@atlaskit/lozenge';
5
+
6
+ import {
7
+ UNSAFE_Box as Box,
8
+ UNSAFE_Inline as Inline,
9
+ UNSAFE_Text as Text,
10
+ } from '../src';
11
+
12
+ export default () => {
13
+ return (
14
+ <Inline gap="sp-200">
15
+ <Lozenge>Default</Lozenge>
16
+ <Box
17
+ backgroundColor={['neutral', 'grey']}
18
+ borderRadius="normal"
19
+ as="span"
20
+ paddingInline="sp-50"
21
+ >
22
+ {/* textTransform: uppercase, font-weight: 700 */}
23
+ <Text fontSize="11" color={['color.text', 'grey']}>
24
+ Default
25
+ </Text>
26
+ </Box>
27
+ </Inline>
28
+ );
29
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ds-explorations",
3
- "version": "0.0.2",
3
+ "version": "0.1.1",
4
4
  "description": "An experimental package for exploration and validation of spacing / typography foundations.",
5
5
  "license": "Apache-2.0",
6
6
  "atlassian": {
@@ -53,7 +53,7 @@
53
53
  "prettier": "^2.1.1",
54
54
  "react-dom": "^16.8.0",
55
55
  "ts-node": "^10.0.0",
56
- "typescript": "4.2.4",
56
+ "typescript": "4.3.5",
57
57
  "wait-for-expect": "^1.2.0"
58
58
  },
59
59
  "techstack": {