@atlaskit/ds-explorations 0.1.4 → 0.1.5

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 (49) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/components/box.partial.js +7 -1
  3. package/dist/cjs/components/inline.partial.js +42 -17
  4. package/dist/cjs/components/interaction-surface.partial.js +3 -2
  5. package/dist/cjs/components/stack.partial.js +44 -17
  6. package/dist/cjs/components/text.partial.js +2 -0
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/es2019/components/box.partial.js +6 -0
  9. package/dist/es2019/components/inline.partial.js +37 -16
  10. package/dist/es2019/components/interaction-surface.partial.js +3 -2
  11. package/dist/es2019/components/stack.partial.js +37 -16
  12. package/dist/es2019/components/text.partial.js +2 -0
  13. package/dist/es2019/version.json +1 -1
  14. package/dist/esm/components/box.partial.js +7 -1
  15. package/dist/esm/components/inline.partial.js +42 -16
  16. package/dist/esm/components/interaction-surface.partial.js +3 -2
  17. package/dist/esm/components/stack.partial.js +42 -16
  18. package/dist/esm/components/text.partial.js +2 -0
  19. package/dist/esm/version.json +1 -1
  20. package/dist/types/components/box.partial.d.ts +11 -3
  21. package/dist/types/components/inline.partial.d.ts +14 -2
  22. package/dist/types/components/interaction-surface.partial.d.ts +4 -3
  23. package/dist/types/components/stack.partial.d.ts +15 -4
  24. package/dist/types/components/types.d.ts +1 -0
  25. package/dist/types-ts4.0/components/box.partial.d.ts +11 -3
  26. package/dist/types-ts4.0/components/inline.partial.d.ts +14 -2
  27. package/dist/types-ts4.0/components/interaction-surface.partial.d.ts +4 -3
  28. package/dist/types-ts4.0/components/stack.partial.d.ts +15 -4
  29. package/dist/types-ts4.0/components/types.d.ts +1 -0
  30. package/examples/03-stack.tsx +43 -30
  31. package/examples/04-inline.tsx +43 -30
  32. package/examples/06-section-message.tsx +1 -1
  33. package/examples/99-interactions.tsx +33 -26
  34. package/package.json +1 -1
  35. package/report.api.md +57 -10
  36. package/scripts/spacing-codegen-template.tsx +6 -0
  37. package/src/components/__tests__/unit/box.test.tsx +10 -2
  38. package/src/components/__tests__/unit/inline.test.tsx +7 -7
  39. package/src/components/__tests__/unit/interaction-suface.test.tsx +13 -7
  40. package/src/components/__tests__/unit/stack.test.tsx +5 -5
  41. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +2 -2
  42. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +2 -2
  43. package/src/components/box.partial.tsx +13 -9
  44. package/src/components/inline.partial.tsx +46 -19
  45. package/src/components/interaction-surface.partial.tsx +4 -3
  46. package/src/components/stack.partial.tsx +46 -20
  47. package/src/components/text.partial.tsx +2 -0
  48. package/src/components/types.tsx +2 -0
  49. package/tmp/api-report-tmp.d.ts +450 -0
@@ -11,6 +11,7 @@ import { GlobalSpacingToken, SPACING_SCALE } from '../src/constants';
11
11
 
12
12
  const flexAlignItems = ['center', 'baseline', 'flexStart', 'flexEnd'];
13
13
  const flexJustifyContent = ['center', 'flexStart', 'flexEnd'];
14
+ const flexWrap = ['wrap'];
14
15
 
15
16
  /**
16
17
  * Stack permutations
@@ -22,7 +23,7 @@ export default () => {
22
23
  <Heading level="h700">Spacing</Heading>
23
24
  <Inline gap="sp-400">
24
25
  {Object.keys(SPACING_SCALE).map((space) => (
25
- <Stack gap="sp-300">
26
+ <Stack key={space} gap="sp-300">
26
27
  <Heading level="h500">{space}</Heading>
27
28
 
28
29
  <Box backgroundColor={['neutral', 'grey']}>
@@ -30,21 +31,15 @@ export default () => {
30
31
  <Box
31
32
  padding="sp-100"
32
33
  backgroundColor={['success.bold', 'green']}
33
- >
34
- {' '}
35
- </Box>
34
+ />
36
35
  <Box
37
36
  padding="sp-100"
38
37
  backgroundColor={['success.bold', 'green']}
39
- >
40
- {' '}
41
- </Box>
38
+ />
42
39
  <Box
43
40
  padding="sp-100"
44
41
  backgroundColor={['success.bold', 'green']}
45
- >
46
- {' '}
47
- </Box>
42
+ />
48
43
  </Stack>
49
44
  </Box>
50
45
  </Stack>
@@ -56,7 +51,7 @@ export default () => {
56
51
  <Heading level="h600">alignItems</Heading>
57
52
  <Inline gap="sp-400">
58
53
  {flexAlignItems.map((alignItemsValue) => (
59
- <Stack gap="sp-300">
54
+ <Stack key={alignItemsValue} gap="sp-300">
60
55
  <Heading level="h500">{alignItemsValue}</Heading>
61
56
 
62
57
  <Box backgroundColor={['neutral', 'grey']} display="block">
@@ -64,21 +59,15 @@ export default () => {
64
59
  <Box
65
60
  padding="sp-100"
66
61
  backgroundColor={['success.bold', 'green']}
67
- >
68
- {' '}
69
- </Box>
62
+ />
70
63
  <Box
71
64
  padding="sp-100"
72
65
  backgroundColor={['success.bold', 'green']}
73
- >
74
- {' '}
75
- </Box>
66
+ />
76
67
  <Box
77
68
  padding="sp-100"
78
69
  backgroundColor={['success.bold', 'green']}
79
- >
80
- {' '}
81
- </Box>
70
+ />
82
71
  </Stack>
83
72
  </Box>
84
73
  </Stack>
@@ -88,7 +77,7 @@ export default () => {
88
77
  <Heading level="h600">justifyContent</Heading>
89
78
  <Inline gap="sp-400">
90
79
  {flexJustifyContent.map((justifyContentValue) => (
91
- <Stack gap="sp-300">
80
+ <Stack key={justifyContentValue} gap="sp-300">
92
81
  <Heading level="h500">{justifyContentValue}</Heading>
93
82
 
94
83
  <Box
@@ -99,21 +88,45 @@ export default () => {
99
88
  <Box
100
89
  padding="sp-100"
101
90
  backgroundColor={['success.bold', 'green']}
102
- >
103
- {' '}
104
- </Box>
91
+ />
105
92
  <Box
106
93
  padding="sp-100"
107
94
  backgroundColor={['success.bold', 'green']}
108
- >
109
- {' '}
110
- </Box>
95
+ />
111
96
  <Box
112
97
  padding="sp-100"
113
98
  backgroundColor={['success.bold', 'green']}
114
- >
115
- {' '}
116
- </Box>
99
+ />
100
+ </Stack>
101
+ </Box>
102
+ </Stack>
103
+ ))}
104
+ </Inline>
105
+
106
+ <Heading level="h700">Overflow</Heading>
107
+ <Heading level="h600">flexWrap</Heading>
108
+ <Inline gap="sp-400">
109
+ {flexWrap.map((flexWrapValue) => (
110
+ <Stack key={flexWrapValue} gap="sp-300">
111
+ <Heading level="h500">{flexWrapValue}</Heading>
112
+
113
+ <Box
114
+ backgroundColor={['neutral', 'grey']}
115
+ UNSAFE_style={{ height: '50px' }}
116
+ >
117
+ <Stack gap="sp-200" flexWrap={flexWrapValue as any}>
118
+ <Box
119
+ padding="sp-100"
120
+ backgroundColor={['success.bold', 'green']}
121
+ />
122
+ <Box
123
+ padding="sp-100"
124
+ backgroundColor={['success.bold', 'green']}
125
+ />
126
+ <Box
127
+ padding="sp-100"
128
+ backgroundColor={['success.bold', 'green']}
129
+ />
117
130
  </Stack>
118
131
  </Box>
119
132
  </Stack>
@@ -11,6 +11,7 @@ import { GlobalSpacingToken, SPACING_SCALE } from '../src/constants';
11
11
 
12
12
  const flexAlignItems = ['center', 'baseline', 'flexStart', 'flexEnd'];
13
13
  const flexJustifyContent = ['center', 'flexStart', 'flexEnd'];
14
+ const flexWrap = ['wrap'];
14
15
 
15
16
  /**
16
17
  * Inline permutations
@@ -22,7 +23,7 @@ export default () => {
22
23
  <Heading level="h700">Spacing</Heading>
23
24
  <Stack gap="sp-400">
24
25
  {Object.keys(SPACING_SCALE).map((space) => (
25
- <Inline gap="sp-300">
26
+ <Inline key={space} gap="sp-300">
26
27
  <Box width="sp-800">
27
28
  <Heading level="h500">{space}</Heading>
28
29
  </Box>
@@ -32,21 +33,15 @@ export default () => {
32
33
  <Box
33
34
  padding="sp-100"
34
35
  backgroundColor={['success.bold', 'green']}
35
- >
36
- {' '}
37
- </Box>
36
+ />
38
37
  <Box
39
38
  padding="sp-100"
40
39
  backgroundColor={['success.bold', 'green']}
41
- >
42
- {' '}
43
- </Box>
40
+ />
44
41
  <Box
45
42
  padding="sp-100"
46
43
  backgroundColor={['success.bold', 'green']}
47
- >
48
- {' '}
49
- </Box>
44
+ />
50
45
  </Inline>
51
46
  </Box>
52
47
  </Inline>
@@ -58,7 +53,7 @@ export default () => {
58
53
  <Heading level="h600">alignItems</Heading>
59
54
  <Inline gap="sp-400">
60
55
  {flexAlignItems.map((alignItemsValue) => (
61
- <Stack gap="sp-300">
56
+ <Stack key={alignItemsValue} gap="sp-300">
62
57
  <Heading level="h500">{alignItemsValue}</Heading>
63
58
 
64
59
  <Box
@@ -69,21 +64,15 @@ export default () => {
69
64
  <Box
70
65
  padding="sp-100"
71
66
  backgroundColor={['success.bold', 'green']}
72
- >
73
- {' '}
74
- </Box>
67
+ />
75
68
  <Box
76
69
  padding="sp-100"
77
70
  backgroundColor={['success.bold', 'green']}
78
- >
79
- {' '}
80
- </Box>
71
+ />
81
72
  <Box
82
73
  padding="sp-100"
83
74
  backgroundColor={['success.bold', 'green']}
84
- >
85
- {' '}
86
- </Box>
75
+ />
87
76
  </Inline>
88
77
  </Box>
89
78
  </Stack>
@@ -93,7 +82,7 @@ export default () => {
93
82
  <Heading level="h600">justifyContent</Heading>
94
83
  <Inline gap="sp-400">
95
84
  {flexJustifyContent.map((justifyContentValue) => (
96
- <Stack gap="sp-300">
85
+ <Stack key={justifyContentValue} gap="sp-300">
97
86
  <Heading level="h500">{justifyContentValue}</Heading>
98
87
 
99
88
  <Box
@@ -108,21 +97,45 @@ export default () => {
108
97
  <Box
109
98
  padding="sp-100"
110
99
  backgroundColor={['success.bold', 'green']}
111
- >
112
- {' '}
113
- </Box>
100
+ />
114
101
  <Box
115
102
  padding="sp-100"
116
103
  backgroundColor={['success.bold', 'green']}
117
- >
118
- {' '}
119
- </Box>
104
+ />
120
105
  <Box
121
106
  padding="sp-100"
122
107
  backgroundColor={['success.bold', 'green']}
123
- >
124
- {' '}
125
- </Box>
108
+ />
109
+ </Inline>
110
+ </Box>
111
+ </Stack>
112
+ ))}
113
+ </Inline>
114
+
115
+ <Heading level="h700">Overflow</Heading>
116
+ <Heading level="h600">flexWrap</Heading>
117
+ <Inline gap="sp-400">
118
+ {flexWrap.map((flexWrapValue) => (
119
+ <Stack key={flexWrapValue} gap="sp-300">
120
+ <Heading level="h500">{flexWrapValue}</Heading>
121
+
122
+ <Box
123
+ backgroundColor={['neutral', 'grey']}
124
+ UNSAFE_style={{ width: '50px' }}
125
+ >
126
+ <Inline gap="sp-200" flexWrap={flexWrapValue as any}>
127
+ <Box
128
+ padding="sp-100"
129
+ backgroundColor={['success.bold', 'green']}
130
+ />
131
+ <Box
132
+ padding="sp-100"
133
+ backgroundColor={['success.bold', 'green']}
134
+ />
135
+ <Box
136
+ padding="sp-100"
137
+ backgroundColor={['success.bold', 'green']}
138
+ />
126
139
  </Inline>
127
140
  </Box>
128
141
  </Stack>
@@ -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 divider="·" gap="sp-100">
43
+ <Inline divider="·" gap="sp-75">
44
44
  <Button
45
45
  appearance="link"
46
46
  spacing="none"
@@ -1,4 +1,6 @@
1
1
  /** @jsx jsx */
2
+ import { Fragment } from 'react';
3
+
2
4
  import { css, jsx } from '@emotion/react';
3
5
 
4
6
  import Button from '@atlaskit/button';
@@ -55,15 +57,16 @@ export default () => {
55
57
  paddingInline="sp-150"
56
58
  backgroundColor={[app, '']}
57
59
  >
58
- <InteractionSurface />
59
- <Text
60
- textAlign="center"
61
- fontSize="14px"
62
- lineHeight="32px"
63
- fontWeight="500"
64
- >
65
- {app}
66
- </Text>
60
+ <InteractionSurface>
61
+ <Text
62
+ textAlign="center"
63
+ fontSize="14px"
64
+ lineHeight="32px"
65
+ fontWeight="500"
66
+ >
67
+ {app}
68
+ </Text>
69
+ </InteractionSurface>
67
70
  </Box>
68
71
  </FocusRing>
69
72
  ))}
@@ -81,12 +84,13 @@ export default () => {
81
84
  position="relative"
82
85
  padding="sp-50"
83
86
  >
84
- <InteractionSurface />
85
- <WarningIcon
86
- label="icon button"
87
- primaryColor={token('color.icon.inverse')}
88
- secondaryColor={token('color.background.brand.bold')}
89
- />
87
+ <InteractionSurface>
88
+ <WarningIcon
89
+ label="icon button"
90
+ primaryColor={token('color.icon.inverse')}
91
+ secondaryColor={token('color.background.brand.bold')}
92
+ />
93
+ </InteractionSurface>
90
94
  </Box>
91
95
  </FocusRing>
92
96
  <FocusRing>
@@ -98,9 +102,9 @@ export default () => {
98
102
  position="relative"
99
103
  padding="sp-50"
100
104
  >
101
- <InteractionSurface />
102
-
103
- <WarningIcon label="icon button" />
105
+ <InteractionSurface>
106
+ <WarningIcon label="icon button" />
107
+ </InteractionSurface>
104
108
  </Box>
105
109
  </FocusRing>
106
110
  <FocusRing>
@@ -112,12 +116,13 @@ export default () => {
112
116
  position="relative"
113
117
  padding="sp-50"
114
118
  >
115
- <InteractionSurface />
116
- <WarningIcon
117
- label="icon button"
118
- primaryColor={token('color.icon.warning.inverse')}
119
- secondaryColor={token('color.background.warning.bold')}
120
- />
119
+ <InteractionSurface>
120
+ <WarningIcon
121
+ label="icon button"
122
+ primaryColor={token('color.icon.warning.inverse')}
123
+ secondaryColor={token('color.background.warning.bold')}
124
+ />
125
+ </InteractionSurface>
121
126
  </Box>
122
127
  </FocusRing>
123
128
  </Inline>
@@ -136,7 +141,9 @@ export default () => {
136
141
  position="relative"
137
142
  padding="sp-50"
138
143
  >
139
- <InteractionSurface />
144
+ <InteractionSurface>
145
+ <Fragment />
146
+ </InteractionSurface>
140
147
  </Box>
141
148
  </FocusRing>
142
149
  ))}
@@ -157,7 +164,7 @@ export default () => {
157
164
  >
158
165
  <input
159
166
  id="textfield"
160
- pattern="[\d+]"
167
+ pattern="\d+"
161
168
  style={{
162
169
  padding: 0,
163
170
  border: 'none',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ds-explorations",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "An experimental package for exploration and validation of spacing / typography foundations.",
5
5
  "license": "Apache-2.0",
6
6
  "atlassian": {
package/report.api.md CHANGED
@@ -1,14 +1,21 @@
1
+ <!-- API Report Version: 2.2 -->
2
+
1
3
  ## API Report File for "@atlaskit/ds-explorations"
2
4
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
4
11
 
5
- <!--
6
- Generated API Report version: 2.0
7
- -->
12
+ ### Main Entry Types
8
13
 
9
- [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
14
+ <!--SECTION START: Main Entry Types-->
10
15
 
11
16
  ```ts
17
+ /// <reference types="react" />
18
+
12
19
  import type { CSSProperties } from 'react';
13
20
  import { ElementType } from 'react';
14
21
  import { FC } from 'react';
@@ -172,6 +179,8 @@ const flexAlignItemsMap_2: {
172
179
  baseline: SerializedStyles;
173
180
  flexStart: SerializedStyles;
174
181
  flexEnd: SerializedStyles;
182
+ start: SerializedStyles;
183
+ end: SerializedStyles;
175
184
  };
176
185
 
177
186
  // @public (undocumented)
@@ -180,6 +189,8 @@ const flexAlignItemsMap_3: {
180
189
  baseline: SerializedStyles;
181
190
  flexStart: SerializedStyles;
182
191
  flexEnd: SerializedStyles;
192
+ start: SerializedStyles;
193
+ end: SerializedStyles;
183
194
  };
184
195
 
185
196
  // @public (undocumented)
@@ -212,6 +223,8 @@ const flexJustifyContentMap_2: {
212
223
  center: SerializedStyles;
213
224
  flexStart: SerializedStyles;
214
225
  flexEnd: SerializedStyles;
226
+ start: SerializedStyles;
227
+ end: SerializedStyles;
215
228
  };
216
229
 
217
230
  // @public (undocumented)
@@ -219,6 +232,24 @@ const flexJustifyContentMap_3: {
219
232
  center: SerializedStyles;
220
233
  flexStart: SerializedStyles;
221
234
  flexEnd: SerializedStyles;
235
+ start: SerializedStyles;
236
+ end: SerializedStyles;
237
+ };
238
+
239
+ // @public (undocumented)
240
+ type FlexWrap = keyof typeof flexWrapMap;
241
+
242
+ // @public (undocumented)
243
+ type FlexWrap_2 = keyof typeof flexWrapMap_2;
244
+
245
+ // @public (undocumented)
246
+ const flexWrapMap: {
247
+ wrap: SerializedStyles;
248
+ };
249
+
250
+ // @public (undocumented)
251
+ const flexWrapMap_2: {
252
+ wrap: SerializedStyles;
222
253
  };
223
254
 
224
255
  // @public (undocumented)
@@ -247,8 +278,9 @@ type GlobalSpacingToken = keyof typeof UNSAFE_SPACING_SCALE;
247
278
  // @public (undocumented)
248
279
  interface InlineProps extends BasePrimitiveProps {
249
280
  alignItems?: FlexAlignItems_2;
250
- children: ReactNode;
281
+ children: NonTextChildren;
251
282
  divider?: ReactNode;
283
+ flexWrap?: FlexWrap;
252
284
  gap: GlobalSpacingToken;
253
285
  justifyContent?: FlexJustifyContent_2;
254
286
  }
@@ -261,7 +293,7 @@ interface InteractionSurfaceProps extends BasePrimitiveProps {
261
293
  // (undocumented)
262
294
  appearance?: InteractionBackgroundColor;
263
295
  // (undocumented)
264
- children?: ReactNode;
296
+ children: ReactNode;
265
297
  }
266
298
 
267
299
  // @public (undocumented)
@@ -278,6 +310,17 @@ const lineHeightMap: {
278
310
  '40px': SerializedStyles;
279
311
  };
280
312
 
313
+ // @public (undocumented)
314
+ type NonTextChildren = (JSX.Element | false | null)[] | JSX.Element;
315
+
316
+ // @public (undocumented)
317
+ type Overflow = keyof typeof overflowMap;
318
+
319
+ // @public (undocumented)
320
+ const overflowMap: {
321
+ auto: SerializedStyles;
322
+ };
323
+
281
324
  // @public (undocumented)
282
325
  const positionMap: {
283
326
  absolute: SerializedStyles;
@@ -288,7 +331,8 @@ const positionMap: {
288
331
  // @public (undocumented)
289
332
  interface StackProps extends BasePrimitiveProps {
290
333
  alignItems?: FlexAlignItems_3;
291
- children: ReactNode;
334
+ children: NonTextChildren;
335
+ flexWrap?: FlexWrap_2;
292
336
  gap: GlobalSpacingToken;
293
337
  justifyContent?: FlexJustifyContent_3;
294
338
  }
@@ -340,7 +384,7 @@ export const UNSAFE_Box: ForwardRefExoticComponent<
340
384
 
341
385
  // @public (undocumented)
342
386
  export interface UNSAFE_BoxProps<T extends HTMLElement = HTMLElement>
343
- extends Omit<HTMLAttributes<T>, 'style' | 'as' | 'className'>,
387
+ extends Omit<HTMLAttributes<T>, 'as' | 'className' | 'style'>,
344
388
  BasePrimitiveProps {
345
389
  alignItems?: FlexAlignItems;
346
390
  as?: ElementType;
@@ -349,12 +393,13 @@ export interface UNSAFE_BoxProps<T extends HTMLElement = HTMLElement>
349
393
  borderRadius?: BorderRadius;
350
394
  borderStyle?: BorderStyle;
351
395
  borderWidth?: BorderWidth;
352
- children?: ReactNode;
396
+ children?: NonTextChildren | boolean | null | undefined;
353
397
  className?: string;
354
398
  display?: Display;
355
399
  flexDirection?: FlexDirection;
356
400
  height?: GlobalSpacingToken;
357
401
  justifyContent?: FlexJustifyContent;
402
+ overflow?: Overflow;
358
403
  padding?: GlobalSpacingToken;
359
404
  paddingBlock?: GlobalSpacingToken;
360
405
  paddingInline?: GlobalSpacingToken;
@@ -424,3 +469,5 @@ const verticalAlignMap: {
424
469
 
425
470
  // (No @packageDocumentation comment for this package)
426
471
  ```
472
+
473
+ <!--SECTION END: Main Entry Types-->
@@ -22,6 +22,12 @@ const spacingProperties = {
22
22
  gap: {
23
23
  cssProperty: 'gap',
24
24
  },
25
+ columnGap: {
26
+ cssProperty: 'columnGap',
27
+ },
28
+ rowGap: {
29
+ cssProperty: 'rowGap',
30
+ },
25
31
  } as const;
26
32
 
27
33
  export const createSpacingStylesFromTemplate = (
@@ -10,7 +10,11 @@ describe('Box component', () => {
10
10
  const testId = 'test';
11
11
 
12
12
  it('should render box', () => {
13
- const { getByText } = render(<Box>Box</Box>);
13
+ const { getByText } = render(
14
+ <Box>
15
+ <Text>Box</Text>
16
+ </Box>,
17
+ );
14
18
  expect(getByText('Box')).toBeInTheDocument();
15
19
  });
16
20
 
@@ -43,7 +47,11 @@ describe('Box component', () => {
43
47
  });
44
48
 
45
49
  it('should render with a given test id', () => {
46
- const { getByTestId } = render(<Box testId={testId}>Box with testid</Box>);
50
+ const { getByTestId } = render(
51
+ <Box testId={testId}>
52
+ <Text>Box with testid</Text>
53
+ </Box>,
54
+ );
47
55
  const element = getByTestId(testId);
48
56
  expect(element).toBeInTheDocument();
49
57
  });
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import { render } from '@testing-library/react';
4
4
 
5
- import { UNSAFE_Box as Box, UNSAFE_Inline as Inline } from '../../../index';
5
+ import { UNSAFE_Inline as Inline, UNSAFE_Text as Text } from '../../../index';
6
6
 
7
7
  describe('Inline component', () => {
8
8
  const testId = 'test';
@@ -10,8 +10,8 @@ describe('Inline component', () => {
10
10
  it('should render inline', () => {
11
11
  const { getByText } = render(
12
12
  <Inline gap="sp-50">
13
- <Box>1</Box>
14
- <Box>2</Box>
13
+ <Text>1</Text>
14
+ <Text>2</Text>
15
15
  </Inline>,
16
16
  );
17
17
  expect(getByText('1')).toBeInTheDocument();
@@ -21,8 +21,8 @@ describe('Inline component', () => {
21
21
  it('should render inline with dividers', () => {
22
22
  const { getByText } = render(
23
23
  <Inline gap="sp-50" divider="/">
24
- <Box>1</Box>
25
- <Box>2</Box>
24
+ <Text>1</Text>
25
+ <Text>2</Text>
26
26
  </Inline>,
27
27
  );
28
28
  expect(getByText('1')).toBeInTheDocument();
@@ -33,8 +33,8 @@ describe('Inline component', () => {
33
33
  it('should render with a given test id', () => {
34
34
  const { getByTestId } = render(
35
35
  <Inline gap="sp-50" testId={testId}>
36
- <Box>1</Box>
37
- <Box>2</Box>
36
+ <Text>1</Text>
37
+ <Text>2</Text>
38
38
  </Inline>,
39
39
  );
40
40
  const element = getByTestId(testId);