@atlaskit/ds-explorations 0.1.4 → 1.0.0
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.
- package/CHANGELOG.md +33 -0
- package/box/package.json +15 -0
- package/dist/cjs/components/box.partial.js +184 -201
- package/dist/cjs/components/inline.partial.js +49 -30
- package/dist/cjs/components/interaction-surface.partial.js +35 -3
- package/dist/cjs/components/stack.partial.js +49 -30
- package/dist/cjs/components/text.partial.js +116 -85
- package/dist/cjs/index.js +1 -9
- package/dist/cjs/internal/color-map.js +6 -5
- package/dist/cjs/internal/spacing-scale.js +17 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/box.partial.js +182 -184
- package/dist/es2019/components/inline.partial.js +49 -29
- package/dist/es2019/components/interaction-surface.partial.js +35 -3
- package/dist/es2019/components/stack.partial.js +49 -29
- package/dist/es2019/components/text.partial.js +73 -35
- package/dist/es2019/index.js +1 -2
- package/dist/es2019/internal/color-map.js +4 -3
- package/dist/es2019/internal/spacing-scale.js +9 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/box.partial.js +183 -197
- package/dist/esm/components/inline.partial.js +49 -29
- package/dist/esm/components/interaction-surface.partial.js +35 -3
- package/dist/esm/components/stack.partial.js +49 -29
- package/dist/esm/components/text.partial.js +78 -46
- package/dist/esm/index.js +1 -2
- package/dist/esm/internal/color-map.js +4 -3
- package/dist/esm/internal/spacing-scale.js +9 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/box.partial.d.ts +114 -18
- package/dist/types/components/inline.partial.d.ts +38 -4
- package/dist/types/components/interaction-surface.partial.d.ts +7 -3
- package/dist/types/components/stack.partial.d.ts +39 -6
- package/dist/types/components/text.partial.d.ts +5 -3
- package/dist/types/components/types.d.ts +1 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/internal/color-map.d.ts +11 -9
- package/dist/types/internal/spacing-scale.d.ts +9 -0
- package/dist/types-ts4.0/components/box.partial.d.ts +114 -24
- package/dist/types-ts4.0/components/inline.partial.d.ts +38 -4
- package/dist/types-ts4.0/components/interaction-surface.partial.d.ts +7 -3
- package/dist/types-ts4.0/components/stack.partial.d.ts +39 -6
- package/dist/types-ts4.0/components/text.partial.d.ts +5 -6
- package/dist/types-ts4.0/components/types.d.ts +1 -0
- package/dist/types-ts4.0/index.d.ts +0 -1
- package/dist/types-ts4.0/internal/color-map.d.ts +11 -9
- package/dist/types-ts4.0/internal/spacing-scale.d.ts +22 -0
- package/examples/00-basic.tsx +4 -4
- package/examples/01-box.tsx +29 -46
- package/examples/02-text-advanced.tsx +38 -0
- package/examples/02-text.tsx +72 -62
- package/examples/03-stack.tsx +48 -74
- package/examples/04-inline.tsx +46 -75
- package/examples/05-badge.tsx +2 -2
- package/examples/06-section-message.tsx +7 -7
- package/examples/07-comment.tsx +4 -6
- package/examples/08-lozenge.tsx +9 -5
- package/examples/99-interactions.tsx +53 -46
- package/examples/config.jsonc +11 -0
- package/package.json +5 -2
- package/report.api.md +240 -54
- package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +52 -64
- package/scripts/codegen-styles.tsx +34 -6
- package/scripts/color-codegen-template.tsx +10 -15
- package/scripts/color-map-template.tsx +1 -1
- package/scripts/spacing-codegen-template.tsx +48 -12
- package/scripts/spacing-scale-template.tsx +40 -0
- package/scripts/utils.tsx +1 -3
- package/src/components/__tests__/unit/box.test.tsx +18 -13
- package/src/components/__tests__/unit/inline.test.tsx +10 -10
- package/src/components/__tests__/unit/interaction-suface.test.tsx +14 -8
- package/src/components/__tests__/unit/stack.test.tsx +7 -7
- package/src/components/__tests__/unit/text.test.tsx +23 -0
- 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 +2 -2
- 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 +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-color-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-color-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-line-heights-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-testing-should-match-snapshot-1-snap.png +2 -2
- package/src/components/box.partial.tsx +296 -159
- package/src/components/inline.partial.tsx +75 -21
- package/src/components/interaction-surface.partial.tsx +6 -4
- package/src/components/stack.partial.tsx +75 -22
- package/src/components/text.partial.tsx +78 -41
- package/src/components/types.tsx +2 -0
- package/src/index.tsx +0 -1
- package/src/internal/color-map.tsx +4 -3
- package/src/internal/spacing-scale.tsx +22 -0
- package/text/package.json +15 -0
- package/tmp/api-report-tmp.d.ts +583 -0
- package/dist/cjs/constants.js +0 -21
- package/dist/es2019/constants.js +0 -14
- package/dist/esm/constants.js +0 -14
- package/dist/types/constants.d.ts +0 -15
- package/dist/types-ts4.0/constants.d.ts +0 -15
- package/src/constants.tsx +0 -16
package/examples/01-box.tsx
CHANGED
|
@@ -8,27 +8,24 @@ import {
|
|
|
8
8
|
UNSAFE_Stack as Stack,
|
|
9
9
|
UNSAFE_Text as Text,
|
|
10
10
|
} from '../src';
|
|
11
|
-
import {
|
|
11
|
+
import { spacingScale } from '../src/internal/spacing-scale';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Box permutations
|
|
15
15
|
*/
|
|
16
16
|
export default () => {
|
|
17
17
|
return (
|
|
18
|
-
<Stack gap="
|
|
19
|
-
<Stack gap="
|
|
18
|
+
<Stack gap="scale.400" alignItems="flexStart">
|
|
19
|
+
<Stack gap="scale.200" testId="box-with-background-and-paddingBlock">
|
|
20
20
|
<Heading level="h600">paddingBlock</Heading>
|
|
21
|
-
<Inline gap="
|
|
22
|
-
{
|
|
21
|
+
<Inline gap="scale.200" alignItems="center">
|
|
22
|
+
{spacingScale.map((space) => (
|
|
23
23
|
<Box
|
|
24
24
|
key={space}
|
|
25
|
-
backgroundColor=
|
|
26
|
-
paddingBlock={space
|
|
25
|
+
backgroundColor="discovery.bold"
|
|
26
|
+
paddingBlock={space}
|
|
27
27
|
>
|
|
28
|
-
<Box
|
|
29
|
-
backgroundColor={['elevation.surface', 'white']}
|
|
30
|
-
justifyContent="center"
|
|
31
|
-
>
|
|
28
|
+
<Box backgroundColor="elevation.surface" justifyContent="center">
|
|
32
29
|
<Text>{space}</Text>
|
|
33
30
|
</Box>
|
|
34
31
|
</Box>
|
|
@@ -36,19 +33,16 @@ export default () => {
|
|
|
36
33
|
</Inline>
|
|
37
34
|
</Stack>
|
|
38
35
|
|
|
39
|
-
<Stack gap="
|
|
36
|
+
<Stack gap="scale.200" testId="box-with-background-and-paddingInline">
|
|
40
37
|
<Heading level="h600">paddingInline</Heading>
|
|
41
|
-
<Stack gap="
|
|
42
|
-
{
|
|
38
|
+
<Stack gap="scale.200" alignItems="center">
|
|
39
|
+
{spacingScale.map((space) => (
|
|
43
40
|
<Box
|
|
44
41
|
key={space}
|
|
45
|
-
backgroundColor=
|
|
46
|
-
paddingInline={space
|
|
42
|
+
backgroundColor="discovery.bold"
|
|
43
|
+
paddingInline={space}
|
|
47
44
|
>
|
|
48
|
-
<Box
|
|
49
|
-
backgroundColor={['elevation.surface', 'white']}
|
|
50
|
-
justifyContent="center"
|
|
51
|
-
>
|
|
45
|
+
<Box backgroundColor="elevation.surface" justifyContent="center">
|
|
52
46
|
<Text>{space}</Text>
|
|
53
47
|
</Box>
|
|
54
48
|
</Box>
|
|
@@ -56,19 +50,12 @@ export default () => {
|
|
|
56
50
|
</Stack>
|
|
57
51
|
</Stack>
|
|
58
52
|
|
|
59
|
-
<Stack gap="
|
|
53
|
+
<Stack gap="scale.200" testId="box-with-background-and-padding">
|
|
60
54
|
<Heading level="h600">padding</Heading>
|
|
61
|
-
<Inline gap="
|
|
62
|
-
{
|
|
63
|
-
<Box
|
|
64
|
-
|
|
65
|
-
backgroundColor={['discovery.bold', 'purple']}
|
|
66
|
-
padding={space as GlobalSpacingToken}
|
|
67
|
-
>
|
|
68
|
-
<Box
|
|
69
|
-
backgroundColor={['elevation.surface', 'white']}
|
|
70
|
-
justifyContent="center"
|
|
71
|
-
>
|
|
55
|
+
<Inline gap="scale.200" alignItems="center">
|
|
56
|
+
{spacingScale.map((space) => (
|
|
57
|
+
<Box key={space} backgroundColor="discovery.bold" padding={space}>
|
|
58
|
+
<Box backgroundColor="elevation.surface" justifyContent="center">
|
|
72
59
|
<Text>{space}</Text>
|
|
73
60
|
</Box>
|
|
74
61
|
</Box>
|
|
@@ -76,9 +63,9 @@ export default () => {
|
|
|
76
63
|
</Inline>
|
|
77
64
|
</Stack>
|
|
78
65
|
|
|
79
|
-
<Stack gap="
|
|
66
|
+
<Stack gap="scale.200" testId="box-with-backgroundColor">
|
|
80
67
|
<Heading level="h600">backgroundColor</Heading>
|
|
81
|
-
<Inline gap="
|
|
68
|
+
<Inline gap="scale.200" alignItems="center">
|
|
82
69
|
{([
|
|
83
70
|
'discovery.bold',
|
|
84
71
|
'success.bold',
|
|
@@ -87,22 +74,18 @@ export default () => {
|
|
|
87
74
|
'information.bold',
|
|
88
75
|
'brand.bold',
|
|
89
76
|
] as const).map((bgColor) => (
|
|
90
|
-
<Box
|
|
91
|
-
key={bgColor}
|
|
92
|
-
backgroundColor={[bgColor, 'purple']}
|
|
93
|
-
padding={'sp-400'}
|
|
94
|
-
>
|
|
77
|
+
<Box key={bgColor} backgroundColor={bgColor} padding="scale.400">
|
|
95
78
|
<Box justifyContent="center">
|
|
96
|
-
<Text
|
|
79
|
+
<Text>{bgColor}</Text>
|
|
97
80
|
</Box>
|
|
98
81
|
</Box>
|
|
99
82
|
))}
|
|
100
83
|
</Inline>
|
|
101
84
|
</Stack>
|
|
102
85
|
|
|
103
|
-
<Stack gap="
|
|
86
|
+
<Stack gap="scale.200" testId="box-with-borderColor">
|
|
104
87
|
<Heading level="h600">borderColor</Heading>
|
|
105
|
-
<Inline gap="
|
|
88
|
+
<Inline gap="scale.200" alignItems="center">
|
|
106
89
|
{([
|
|
107
90
|
'discovery',
|
|
108
91
|
'success',
|
|
@@ -113,14 +96,14 @@ export default () => {
|
|
|
113
96
|
] as const).map((borderColor) => (
|
|
114
97
|
<Box
|
|
115
98
|
key={borderColor}
|
|
116
|
-
backgroundColor=
|
|
117
|
-
borderColor={
|
|
99
|
+
backgroundColor="neutral"
|
|
100
|
+
borderColor={borderColor}
|
|
118
101
|
borderStyle="solid"
|
|
119
102
|
borderWidth="2px"
|
|
120
|
-
padding=
|
|
103
|
+
padding="scale.400"
|
|
121
104
|
>
|
|
122
105
|
<Box justifyContent="center">
|
|
123
|
-
<Text color=
|
|
106
|
+
<Text color="color.text">{borderColor}</Text>
|
|
124
107
|
</Box>
|
|
125
108
|
</Box>
|
|
126
109
|
))}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import Box from '../src/components/box.partial';
|
|
4
|
+
import Inline from '../src/components/inline.partial';
|
|
5
|
+
import Text from '../src/components/text.partial';
|
|
6
|
+
|
|
7
|
+
export default () => {
|
|
8
|
+
return (
|
|
9
|
+
<Inline gap="scale.100">
|
|
10
|
+
<Box
|
|
11
|
+
paddingBlock="scale.400"
|
|
12
|
+
paddingInline="scale.400"
|
|
13
|
+
alignItems="center"
|
|
14
|
+
backgroundColor="information"
|
|
15
|
+
>
|
|
16
|
+
<Text>
|
|
17
|
+
<Text>Text that deletes its redundant wrapping</Text>
|
|
18
|
+
</Text>
|
|
19
|
+
</Box>
|
|
20
|
+
<Box
|
|
21
|
+
paddingBlock="scale.400"
|
|
22
|
+
paddingInline="scale.400"
|
|
23
|
+
alignItems="center"
|
|
24
|
+
backgroundColor="information"
|
|
25
|
+
>
|
|
26
|
+
<Text fontWeight="600">Text on information</Text>
|
|
27
|
+
</Box>
|
|
28
|
+
<Box
|
|
29
|
+
paddingBlock="scale.400"
|
|
30
|
+
paddingInline="scale.400"
|
|
31
|
+
alignItems="center"
|
|
32
|
+
backgroundColor="brand.bold"
|
|
33
|
+
>
|
|
34
|
+
<Text fontWeight="600">Text on brand bold</Text>
|
|
35
|
+
</Box>
|
|
36
|
+
</Inline>
|
|
37
|
+
);
|
|
38
|
+
};
|
package/examples/02-text.tsx
CHANGED
|
@@ -11,69 +11,79 @@ import {
|
|
|
11
11
|
|
|
12
12
|
export default () => {
|
|
13
13
|
return (
|
|
14
|
-
<Stack gap="
|
|
15
|
-
<Heading
|
|
16
|
-
|
|
14
|
+
<Stack gap="scale.300">
|
|
15
|
+
<Heading level="h400" as="h3">
|
|
16
|
+
Text examples
|
|
17
17
|
</Heading>
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
18
|
+
<Stack gap="scale.200">
|
|
19
|
+
<Box display="block">
|
|
20
|
+
<Heading level="h300">Font size</Heading>
|
|
21
|
+
<Inline gap="scale.200" testId="font-sizes">
|
|
22
|
+
{(['11px', '12px', '14px'] as const).map((fontSize) => (
|
|
23
|
+
<Text key={fontSize} fontSize={fontSize}>
|
|
24
|
+
fontSize {fontSize}
|
|
25
|
+
</Text>
|
|
26
|
+
))}
|
|
27
|
+
</Inline>
|
|
28
|
+
</Box>
|
|
29
|
+
<Box display="block">
|
|
30
|
+
<Heading level="h300" as="h4">
|
|
31
|
+
Font weight
|
|
32
|
+
</Heading>
|
|
33
|
+
<Inline gap="scale.200" testId="font-weights">
|
|
34
|
+
{(['400', '500'] as const).map((fontWeight) => (
|
|
35
|
+
<Text key={fontWeight} fontWeight={fontWeight}>
|
|
36
|
+
fontWeight {fontWeight}
|
|
37
|
+
</Text>
|
|
38
|
+
))}
|
|
39
|
+
</Inline>
|
|
40
|
+
</Box>
|
|
41
|
+
<Box display="block">
|
|
42
|
+
<Heading level="h300" as="h4">
|
|
43
|
+
Line height
|
|
44
|
+
</Heading>
|
|
45
|
+
<Inline gap="scale.200" testId="line-heights" alignItems="center">
|
|
46
|
+
{([
|
|
47
|
+
'12px',
|
|
48
|
+
'16px',
|
|
49
|
+
'20px',
|
|
50
|
+
'24px',
|
|
51
|
+
'28px',
|
|
52
|
+
'32px',
|
|
53
|
+
'40px',
|
|
54
|
+
] as const).map((lineHeight) => (
|
|
55
|
+
<Box
|
|
56
|
+
key={lineHeight}
|
|
57
|
+
display="inlineFlex"
|
|
58
|
+
backgroundColor="neutral"
|
|
59
|
+
>
|
|
60
|
+
<Text lineHeight={lineHeight}>lineHeight {lineHeight}</Text>
|
|
61
|
+
</Box>
|
|
62
|
+
))}
|
|
63
|
+
</Inline>
|
|
64
|
+
</Box>
|
|
65
|
+
<Box display="block">
|
|
66
|
+
<Heading level="h300" as="h4">
|
|
67
|
+
Testing
|
|
68
|
+
</Heading>
|
|
69
|
+
<Stack gap="scale.050" testId="testing">
|
|
70
|
+
<Text as="p">Paragraph</Text>
|
|
71
|
+
<Text as="div">A div</Text>
|
|
72
|
+
<Text>
|
|
73
|
+
<Text>This text tag will have its dom element stripped</Text>
|
|
74
|
+
</Text>
|
|
75
|
+
<Text
|
|
76
|
+
color="brand"
|
|
77
|
+
fontSize="14px"
|
|
78
|
+
lineHeight="16px"
|
|
79
|
+
fontWeight="500"
|
|
80
|
+
>
|
|
81
|
+
Text with various props
|
|
82
|
+
</Text>
|
|
83
|
+
<Box UNSAFE_style={{ width: '200px' }}>
|
|
84
|
+
<Text shouldTruncate>Long truncated text that is cut off.</Text>
|
|
85
|
+
</Box>
|
|
86
|
+
</Stack>
|
|
77
87
|
</Box>
|
|
78
88
|
</Stack>
|
|
79
89
|
</Stack>
|
package/examples/03-stack.tsx
CHANGED
|
@@ -7,78 +7,49 @@ import {
|
|
|
7
7
|
UNSAFE_Inline as Inline,
|
|
8
8
|
UNSAFE_Stack as Stack,
|
|
9
9
|
} from '../src';
|
|
10
|
-
import {
|
|
10
|
+
import { spacingScale } from '../src/internal/spacing-scale';
|
|
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
|
|
17
18
|
*/
|
|
18
19
|
export default () => {
|
|
19
20
|
return (
|
|
20
|
-
<Stack gap="
|
|
21
|
-
<Stack gap="
|
|
21
|
+
<Stack gap="scale.300">
|
|
22
|
+
<Stack gap="scale.300" testId="stack-spacing">
|
|
22
23
|
<Heading level="h700">Spacing</Heading>
|
|
23
|
-
<Inline gap="
|
|
24
|
-
{
|
|
25
|
-
<Stack gap="
|
|
24
|
+
<Inline gap="scale.400">
|
|
25
|
+
{spacingScale.map((space) => (
|
|
26
|
+
<Stack key={space} gap="scale.300">
|
|
26
27
|
<Heading level="h500">{space}</Heading>
|
|
27
28
|
|
|
28
|
-
<Box backgroundColor=
|
|
29
|
-
<Stack gap={space
|
|
30
|
-
<Box
|
|
31
|
-
|
|
32
|
-
|
|
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>
|
|
29
|
+
<Box backgroundColor="neutral">
|
|
30
|
+
<Stack gap={space} alignItems="center">
|
|
31
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
32
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
33
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
48
34
|
</Stack>
|
|
49
35
|
</Box>
|
|
50
36
|
</Stack>
|
|
51
37
|
))}
|
|
52
38
|
</Inline>
|
|
53
39
|
</Stack>
|
|
54
|
-
<Stack gap="
|
|
40
|
+
<Stack gap="scale.300" testId="stack-alignment">
|
|
55
41
|
<Heading level="h700">Alignment</Heading>
|
|
56
42
|
<Heading level="h600">alignItems</Heading>
|
|
57
|
-
<Inline gap="
|
|
43
|
+
<Inline gap="scale.400">
|
|
58
44
|
{flexAlignItems.map((alignItemsValue) => (
|
|
59
|
-
<Stack gap="
|
|
45
|
+
<Stack key={alignItemsValue} gap="scale.300">
|
|
60
46
|
<Heading level="h500">{alignItemsValue}</Heading>
|
|
61
47
|
|
|
62
|
-
<Box backgroundColor=
|
|
63
|
-
<Stack gap="
|
|
64
|
-
<Box
|
|
65
|
-
|
|
66
|
-
|
|
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>
|
|
48
|
+
<Box backgroundColor="neutral" display="block">
|
|
49
|
+
<Stack gap="scale.200" alignItems={alignItemsValue as any}>
|
|
50
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
51
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
52
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
82
53
|
</Stack>
|
|
83
54
|
</Box>
|
|
84
55
|
</Stack>
|
|
@@ -86,34 +57,37 @@ export default () => {
|
|
|
86
57
|
</Inline>
|
|
87
58
|
|
|
88
59
|
<Heading level="h600">justifyContent</Heading>
|
|
89
|
-
<Inline gap="
|
|
60
|
+
<Inline gap="scale.400">
|
|
90
61
|
{flexJustifyContent.map((justifyContentValue) => (
|
|
91
|
-
<Stack gap="
|
|
62
|
+
<Stack key={justifyContentValue} gap="scale.300">
|
|
92
63
|
<Heading level="h500">{justifyContentValue}</Heading>
|
|
93
64
|
|
|
94
|
-
<Box
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<Box
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
65
|
+
<Box backgroundColor="neutral" UNSAFE_style={{ height: '200px' }}>
|
|
66
|
+
<Stack
|
|
67
|
+
gap="scale.200"
|
|
68
|
+
justifyContent={justifyContentValue as any}
|
|
69
|
+
>
|
|
70
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
71
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
72
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
73
|
+
</Stack>
|
|
74
|
+
</Box>
|
|
75
|
+
</Stack>
|
|
76
|
+
))}
|
|
77
|
+
</Inline>
|
|
78
|
+
|
|
79
|
+
<Heading level="h700">Overflow</Heading>
|
|
80
|
+
<Heading level="h600">flexWrap</Heading>
|
|
81
|
+
<Inline gap="scale.400">
|
|
82
|
+
{flexWrap.map((flexWrapValue) => (
|
|
83
|
+
<Stack key={flexWrapValue} gap="scale.300">
|
|
84
|
+
<Heading level="h500">{flexWrapValue}</Heading>
|
|
85
|
+
|
|
86
|
+
<Box backgroundColor="neutral" UNSAFE_style={{ height: '50px' }}>
|
|
87
|
+
<Stack gap="scale.200" flexWrap={flexWrapValue as any}>
|
|
88
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
89
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
90
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
117
91
|
</Stack>
|
|
118
92
|
</Box>
|
|
119
93
|
</Stack>
|