@atlaskit/ds-explorations 0.1.5 → 1.1.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 +28 -0
- package/box/package.json +15 -0
- package/dist/cjs/components/box.partial.js +182 -205
- package/dist/cjs/components/inline.partial.js +28 -34
- package/dist/cjs/components/interaction-surface.partial.js +32 -1
- package/dist/cjs/components/stack.partial.js +28 -36
- package/dist/cjs/components/text.partial.js +117 -86
- 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 +181 -189
- package/dist/es2019/components/inline.partial.js +27 -28
- package/dist/es2019/components/interaction-surface.partial.js +32 -1
- package/dist/es2019/components/stack.partial.js +27 -28
- package/dist/es2019/components/text.partial.js +74 -36
- 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 +181 -201
- package/dist/esm/components/inline.partial.js +27 -33
- package/dist/esm/components/interaction-surface.partial.js +32 -1
- package/dist/esm/components/stack.partial.js +27 -33
- package/dist/esm/components/text.partial.js +79 -47
- 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 +109 -21
- package/dist/types/components/inline.partial.d.ts +25 -3
- package/dist/types/components/interaction-surface.partial.d.ts +3 -0
- package/dist/types/components/stack.partial.d.ts +24 -2
- package/dist/types/components/text.partial.d.ts +9 -3
- 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 +109 -27
- package/dist/types-ts4.0/components/inline.partial.d.ts +25 -3
- package/dist/types-ts4.0/components/interaction-surface.partial.d.ts +3 -0
- package/dist/types-ts4.0/components/stack.partial.d.ts +24 -2
- package/dist/types-ts4.0/components/text.partial.d.ts +9 -6
- 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 +73 -62
- package/examples/03-stack.tsx +36 -75
- package/examples/04-inline.tsx +34 -76
- 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 +20 -20
- package/examples/config.jsonc +11 -0
- package/package.json +5 -2
- package/report.api.md +188 -48
- 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 +42 -12
- package/scripts/spacing-scale-template.tsx +40 -0
- package/scripts/utils.tsx +1 -3
- package/src/components/__tests__/unit/box.test.tsx +8 -11
- package/src/components/__tests__/unit/inline.test.tsx +3 -3
- package/src/components/__tests__/unit/interaction-suface.test.tsx +1 -1
- package/src/components/__tests__/unit/stack.test.tsx +2 -2
- package/src/components/__tests__/unit/text.test.tsx +32 -1
- 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 +293 -160
- package/src/components/inline.partial.tsx +44 -17
- package/src/components/interaction-surface.partial.tsx +2 -1
- package/src/components/stack.partial.tsx +43 -16
- package/src/components/text.partial.tsx +82 -41
- 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 +177 -43
- 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/03-stack.tsx
CHANGED
|
@@ -7,7 +7,7 @@ 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'];
|
|
@@ -18,56 +18,38 @@ const flexWrap = ['wrap'];
|
|
|
18
18
|
*/
|
|
19
19
|
export default () => {
|
|
20
20
|
return (
|
|
21
|
-
<Stack gap="
|
|
22
|
-
<Stack gap="
|
|
21
|
+
<Stack gap="scale.300">
|
|
22
|
+
<Stack gap="scale.300" testId="stack-spacing">
|
|
23
23
|
<Heading level="h700">Spacing</Heading>
|
|
24
|
-
<Inline gap="
|
|
25
|
-
{
|
|
26
|
-
<Stack key={space} gap="
|
|
24
|
+
<Inline gap="scale.400">
|
|
25
|
+
{spacingScale.map((space) => (
|
|
26
|
+
<Stack key={space} gap="scale.300">
|
|
27
27
|
<Heading level="h500">{space}</Heading>
|
|
28
28
|
|
|
29
|
-
<Box backgroundColor=
|
|
30
|
-
<Stack gap={space
|
|
31
|
-
<Box
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/>
|
|
35
|
-
<Box
|
|
36
|
-
padding="sp-100"
|
|
37
|
-
backgroundColor={['success.bold', 'green']}
|
|
38
|
-
/>
|
|
39
|
-
<Box
|
|
40
|
-
padding="sp-100"
|
|
41
|
-
backgroundColor={['success.bold', 'green']}
|
|
42
|
-
/>
|
|
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" />
|
|
43
34
|
</Stack>
|
|
44
35
|
</Box>
|
|
45
36
|
</Stack>
|
|
46
37
|
))}
|
|
47
38
|
</Inline>
|
|
48
39
|
</Stack>
|
|
49
|
-
<Stack gap="
|
|
40
|
+
<Stack gap="scale.300" testId="stack-alignment">
|
|
50
41
|
<Heading level="h700">Alignment</Heading>
|
|
51
42
|
<Heading level="h600">alignItems</Heading>
|
|
52
|
-
<Inline gap="
|
|
43
|
+
<Inline gap="scale.400">
|
|
53
44
|
{flexAlignItems.map((alignItemsValue) => (
|
|
54
|
-
<Stack key={alignItemsValue} gap="
|
|
45
|
+
<Stack key={alignItemsValue} gap="scale.300">
|
|
55
46
|
<Heading level="h500">{alignItemsValue}</Heading>
|
|
56
47
|
|
|
57
|
-
<Box backgroundColor=
|
|
58
|
-
<Stack gap="
|
|
59
|
-
<Box
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/>
|
|
63
|
-
<Box
|
|
64
|
-
padding="sp-100"
|
|
65
|
-
backgroundColor={['success.bold', 'green']}
|
|
66
|
-
/>
|
|
67
|
-
<Box
|
|
68
|
-
padding="sp-100"
|
|
69
|
-
backgroundColor={['success.bold', 'green']}
|
|
70
|
-
/>
|
|
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" />
|
|
71
53
|
</Stack>
|
|
72
54
|
</Box>
|
|
73
55
|
</Stack>
|
|
@@ -75,28 +57,19 @@ export default () => {
|
|
|
75
57
|
</Inline>
|
|
76
58
|
|
|
77
59
|
<Heading level="h600">justifyContent</Heading>
|
|
78
|
-
<Inline gap="
|
|
60
|
+
<Inline gap="scale.400">
|
|
79
61
|
{flexJustifyContent.map((justifyContentValue) => (
|
|
80
|
-
<Stack key={justifyContentValue} gap="
|
|
62
|
+
<Stack key={justifyContentValue} gap="scale.300">
|
|
81
63
|
<Heading level="h500">{justifyContentValue}</Heading>
|
|
82
64
|
|
|
83
|
-
<Box
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<Box
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/>
|
|
92
|
-
<Box
|
|
93
|
-
padding="sp-100"
|
|
94
|
-
backgroundColor={['success.bold', 'green']}
|
|
95
|
-
/>
|
|
96
|
-
<Box
|
|
97
|
-
padding="sp-100"
|
|
98
|
-
backgroundColor={['success.bold', 'green']}
|
|
99
|
-
/>
|
|
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" />
|
|
100
73
|
</Stack>
|
|
101
74
|
</Box>
|
|
102
75
|
</Stack>
|
|
@@ -105,28 +78,16 @@ export default () => {
|
|
|
105
78
|
|
|
106
79
|
<Heading level="h700">Overflow</Heading>
|
|
107
80
|
<Heading level="h600">flexWrap</Heading>
|
|
108
|
-
<Inline gap="
|
|
81
|
+
<Inline gap="scale.400">
|
|
109
82
|
{flexWrap.map((flexWrapValue) => (
|
|
110
|
-
<Stack key={flexWrapValue} gap="
|
|
83
|
+
<Stack key={flexWrapValue} gap="scale.300">
|
|
111
84
|
<Heading level="h500">{flexWrapValue}</Heading>
|
|
112
85
|
|
|
113
|
-
<Box
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
/>
|
|
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" />
|
|
130
91
|
</Stack>
|
|
131
92
|
</Box>
|
|
132
93
|
</Stack>
|
package/examples/04-inline.tsx
CHANGED
|
@@ -7,7 +7,7 @@ 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'];
|
|
@@ -18,61 +18,40 @@ const flexWrap = ['wrap'];
|
|
|
18
18
|
*/
|
|
19
19
|
export default () => {
|
|
20
20
|
return (
|
|
21
|
-
<Stack gap="
|
|
22
|
-
<Stack gap="
|
|
21
|
+
<Stack gap="scale.300">
|
|
22
|
+
<Stack gap="scale.300" testId="inline-spacing">
|
|
23
23
|
<Heading level="h700">Spacing</Heading>
|
|
24
|
-
<Stack gap="
|
|
25
|
-
{
|
|
26
|
-
<Inline key={space} gap="
|
|
27
|
-
<Box width
|
|
24
|
+
<Stack gap="scale.400">
|
|
25
|
+
{spacingScale.map((space) => (
|
|
26
|
+
<Inline key={space} gap="scale.300">
|
|
27
|
+
<Box UNSAFE_style={{ width: 140 }}>
|
|
28
28
|
<Heading level="h500">{space}</Heading>
|
|
29
29
|
</Box>
|
|
30
30
|
|
|
31
|
-
<Box backgroundColor=
|
|
32
|
-
<Inline gap={space
|
|
33
|
-
<Box
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/>
|
|
37
|
-
<Box
|
|
38
|
-
padding="sp-100"
|
|
39
|
-
backgroundColor={['success.bold', 'green']}
|
|
40
|
-
/>
|
|
41
|
-
<Box
|
|
42
|
-
padding="sp-100"
|
|
43
|
-
backgroundColor={['success.bold', 'green']}
|
|
44
|
-
/>
|
|
31
|
+
<Box backgroundColor="neutral">
|
|
32
|
+
<Inline gap={space} alignItems="center">
|
|
33
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
34
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
35
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
45
36
|
</Inline>
|
|
46
37
|
</Box>
|
|
47
38
|
</Inline>
|
|
48
39
|
))}
|
|
49
40
|
</Stack>
|
|
50
41
|
</Stack>
|
|
51
|
-
<Stack gap="
|
|
42
|
+
<Stack gap="scale.300" testId="inline-alignment">
|
|
52
43
|
<Heading level="h700">Alignment</Heading>
|
|
53
44
|
<Heading level="h600">alignItems</Heading>
|
|
54
|
-
<Inline gap="
|
|
45
|
+
<Inline gap="scale.400">
|
|
55
46
|
{flexAlignItems.map((alignItemsValue) => (
|
|
56
|
-
<Stack key={alignItemsValue} gap="
|
|
47
|
+
<Stack key={alignItemsValue} gap="scale.300">
|
|
57
48
|
<Heading level="h500">{alignItemsValue}</Heading>
|
|
58
49
|
|
|
59
|
-
<Box
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<Box
|
|
65
|
-
padding="sp-100"
|
|
66
|
-
backgroundColor={['success.bold', 'green']}
|
|
67
|
-
/>
|
|
68
|
-
<Box
|
|
69
|
-
padding="sp-100"
|
|
70
|
-
backgroundColor={['success.bold', 'green']}
|
|
71
|
-
/>
|
|
72
|
-
<Box
|
|
73
|
-
padding="sp-100"
|
|
74
|
-
backgroundColor={['success.bold', 'green']}
|
|
75
|
-
/>
|
|
50
|
+
<Box backgroundColor="neutral" UNSAFE_style={{ height: '100px' }}>
|
|
51
|
+
<Inline gap="scale.200" alignItems={alignItemsValue as any}>
|
|
52
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
53
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
54
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
76
55
|
</Inline>
|
|
77
56
|
</Box>
|
|
78
57
|
</Stack>
|
|
@@ -80,32 +59,23 @@ export default () => {
|
|
|
80
59
|
</Inline>
|
|
81
60
|
|
|
82
61
|
<Heading level="h600">justifyContent</Heading>
|
|
83
|
-
<Inline gap="
|
|
62
|
+
<Inline gap="scale.400">
|
|
84
63
|
{flexJustifyContent.map((justifyContentValue) => (
|
|
85
|
-
<Stack key={justifyContentValue} gap="
|
|
64
|
+
<Stack key={justifyContentValue} gap="scale.300">
|
|
86
65
|
<Heading level="h500">{justifyContentValue}</Heading>
|
|
87
66
|
|
|
88
67
|
<Box
|
|
89
68
|
display="block"
|
|
90
|
-
backgroundColor=
|
|
69
|
+
backgroundColor="neutral"
|
|
91
70
|
UNSAFE_style={{ width: '140px' }}
|
|
92
71
|
>
|
|
93
72
|
<Inline
|
|
94
|
-
gap="
|
|
73
|
+
gap="scale.200"
|
|
95
74
|
justifyContent={justifyContentValue as any}
|
|
96
75
|
>
|
|
97
|
-
<Box
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/>
|
|
101
|
-
<Box
|
|
102
|
-
padding="sp-100"
|
|
103
|
-
backgroundColor={['success.bold', 'green']}
|
|
104
|
-
/>
|
|
105
|
-
<Box
|
|
106
|
-
padding="sp-100"
|
|
107
|
-
backgroundColor={['success.bold', 'green']}
|
|
108
|
-
/>
|
|
76
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
77
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
78
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
109
79
|
</Inline>
|
|
110
80
|
</Box>
|
|
111
81
|
</Stack>
|
|
@@ -114,28 +84,16 @@ export default () => {
|
|
|
114
84
|
|
|
115
85
|
<Heading level="h700">Overflow</Heading>
|
|
116
86
|
<Heading level="h600">flexWrap</Heading>
|
|
117
|
-
<Inline gap="
|
|
87
|
+
<Inline gap="scale.400">
|
|
118
88
|
{flexWrap.map((flexWrapValue) => (
|
|
119
|
-
<Stack key={flexWrapValue} gap="
|
|
89
|
+
<Stack key={flexWrapValue} gap="scale.300">
|
|
120
90
|
<Heading level="h500">{flexWrapValue}</Heading>
|
|
121
91
|
|
|
122
|
-
<Box
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
/>
|
|
92
|
+
<Box backgroundColor="neutral" UNSAFE_style={{ width: '50px' }}>
|
|
93
|
+
<Inline gap="scale.200" flexWrap={flexWrapValue as any}>
|
|
94
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
95
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
96
|
+
<Box padding="scale.100" backgroundColor="success.bold" />
|
|
139
97
|
</Inline>
|
|
140
98
|
</Box>
|
|
141
99
|
</Stack>
|
package/examples/05-badge.tsx
CHANGED
|
@@ -11,9 +11,9 @@ export default () => {
|
|
|
11
11
|
<Badge>{8}</Badge>
|
|
12
12
|
<Box
|
|
13
13
|
borderRadius="badge"
|
|
14
|
-
backgroundColor=
|
|
14
|
+
backgroundColor="neutral"
|
|
15
15
|
display="inlineFlex"
|
|
16
|
-
paddingInline="
|
|
16
|
+
paddingInline="scale.075"
|
|
17
17
|
UNSAFE_style={{ lineHeight: '16px' }}
|
|
18
18
|
>
|
|
19
19
|
<Text fontSize="12px">8</Text>
|
|
@@ -18,18 +18,18 @@ import Text from '../src/components/text.partial';
|
|
|
18
18
|
|
|
19
19
|
export default () => {
|
|
20
20
|
return (
|
|
21
|
-
<Stack gap="
|
|
21
|
+
<Stack gap="scale.100">
|
|
22
22
|
<Box
|
|
23
|
-
paddingBlock="
|
|
24
|
-
paddingInline="
|
|
25
|
-
backgroundColor=
|
|
23
|
+
paddingBlock="scale.200"
|
|
24
|
+
paddingInline="scale.200"
|
|
25
|
+
backgroundColor="information"
|
|
26
26
|
>
|
|
27
|
-
<Inline gap="
|
|
27
|
+
<Inline gap="scale.200">
|
|
28
28
|
<InfoIcon
|
|
29
29
|
primaryColor={token('color.icon.information')}
|
|
30
30
|
label="info"
|
|
31
31
|
/>
|
|
32
|
-
<Stack gap="
|
|
32
|
+
<Stack gap="scale.100">
|
|
33
33
|
<Heading as="h1" level="h500">
|
|
34
34
|
The Modern Prometheus
|
|
35
35
|
</Heading>
|
|
@@ -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="
|
|
43
|
+
<Inline divider="·" gap="scale.075">
|
|
44
44
|
<Button
|
|
45
45
|
appearance="link"
|
|
46
46
|
spacing="none"
|
package/examples/07-comment.tsx
CHANGED
|
@@ -17,9 +17,7 @@ const Date = ({ children }: any) => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const EditIndicator = ({ hasBeenEdited }: any) => {
|
|
20
|
-
return hasBeenEdited ?
|
|
21
|
-
<Text color={['subtlest', '#555']}>Edited</Text>
|
|
22
|
-
) : null;
|
|
20
|
+
return hasBeenEdited ? <Text color="subtlest">Edited</Text> : null;
|
|
23
21
|
};
|
|
24
22
|
|
|
25
23
|
const CommentAction = ({ children }: any) => {
|
|
@@ -29,8 +27,8 @@ const CommentAction = ({ children }: any) => {
|
|
|
29
27
|
export default () => {
|
|
30
28
|
return (
|
|
31
29
|
<Box>
|
|
32
|
-
<Stack gap="
|
|
33
|
-
<Inline gap="
|
|
30
|
+
<Stack gap="scale.050">
|
|
31
|
+
<Inline gap="scale.100" alignItems="center">
|
|
34
32
|
<Author>Jane Citizen</Author>
|
|
35
33
|
<Lozenge>Author</Lozenge>
|
|
36
34
|
<Date>Jun 15, 2022</Date>
|
|
@@ -43,7 +41,7 @@ export default () => {
|
|
|
43
41
|
aliquip ex ea commodo consequat.
|
|
44
42
|
</Text>
|
|
45
43
|
<Box color="subtle">
|
|
46
|
-
<Inline gap="
|
|
44
|
+
<Inline gap="scale.100" divider="·">
|
|
47
45
|
<CommentAction>Reply</CommentAction>
|
|
48
46
|
<CommentAction>Edit</CommentAction>
|
|
49
47
|
<CommentAction>Like</CommentAction>
|
package/examples/08-lozenge.tsx
CHANGED
|
@@ -11,16 +11,20 @@ import {
|
|
|
11
11
|
|
|
12
12
|
export default () => {
|
|
13
13
|
return (
|
|
14
|
-
<Inline gap="
|
|
14
|
+
<Inline gap="scale.200">
|
|
15
15
|
<Lozenge>Default</Lozenge>
|
|
16
16
|
<Box
|
|
17
|
-
backgroundColor=
|
|
17
|
+
backgroundColor="neutral"
|
|
18
18
|
borderRadius="normal"
|
|
19
19
|
as="span"
|
|
20
|
-
paddingInline="
|
|
20
|
+
paddingInline="scale.050"
|
|
21
21
|
>
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
<Text
|
|
23
|
+
color="color.text"
|
|
24
|
+
fontSize="11px"
|
|
25
|
+
fontWeight="700"
|
|
26
|
+
textTransform="uppercase"
|
|
27
|
+
>
|
|
24
28
|
Default
|
|
25
29
|
</Text>
|
|
26
30
|
</Box>
|
|
@@ -35,10 +35,10 @@ const fieldsetStyles = css({
|
|
|
35
35
|
|
|
36
36
|
export default () => {
|
|
37
37
|
return (
|
|
38
|
-
<Box width="
|
|
39
|
-
<Stack gap="
|
|
38
|
+
<Box width="scale.600" padding="scale.100" testId="all">
|
|
39
|
+
<Stack gap="scale.200">
|
|
40
40
|
<Heading level="h400">Current ADS Buttons</Heading>
|
|
41
|
-
<Inline gap="
|
|
41
|
+
<Inline gap="scale.200">
|
|
42
42
|
<Button appearance="primary">brand.bold</Button>
|
|
43
43
|
<Button appearance="default">neutral</Button>
|
|
44
44
|
<Button appearance="warning">warning.bold</Button>
|
|
@@ -46,7 +46,7 @@ export default () => {
|
|
|
46
46
|
<Heading level="h400">
|
|
47
47
|
Buttons with <Code>InteractionSurface</Code>
|
|
48
48
|
</Heading>
|
|
49
|
-
<Inline gap="
|
|
49
|
+
<Inline gap="scale.200" testId="buttons">
|
|
50
50
|
{(['brand.bold', 'neutral', 'warning.bold'] as const).map((app) => (
|
|
51
51
|
<FocusRing key={app}>
|
|
52
52
|
<Box
|
|
@@ -54,8 +54,8 @@ export default () => {
|
|
|
54
54
|
onClick={() => console.log('hello')}
|
|
55
55
|
borderRadius="normal"
|
|
56
56
|
position="relative"
|
|
57
|
-
paddingInline="
|
|
58
|
-
backgroundColor={
|
|
57
|
+
paddingInline="scale.150"
|
|
58
|
+
backgroundColor={app}
|
|
59
59
|
>
|
|
60
60
|
<InteractionSurface>
|
|
61
61
|
<Text
|
|
@@ -74,15 +74,15 @@ export default () => {
|
|
|
74
74
|
<Heading level="h400">
|
|
75
75
|
Icon Buttons with <Code>InteractionSurface</Code>
|
|
76
76
|
</Heading>
|
|
77
|
-
<Inline gap="
|
|
77
|
+
<Inline gap="scale.200" testId="icon-buttons">
|
|
78
78
|
<FocusRing>
|
|
79
79
|
<Box
|
|
80
80
|
as="button"
|
|
81
|
-
backgroundColor=
|
|
81
|
+
backgroundColor="brand.bold"
|
|
82
82
|
onClick={() => console.log('hello')}
|
|
83
83
|
borderRadius="normal"
|
|
84
84
|
position="relative"
|
|
85
|
-
padding="
|
|
85
|
+
padding="scale.050"
|
|
86
86
|
>
|
|
87
87
|
<InteractionSurface>
|
|
88
88
|
<WarningIcon
|
|
@@ -96,11 +96,11 @@ export default () => {
|
|
|
96
96
|
<FocusRing>
|
|
97
97
|
<Box
|
|
98
98
|
as="button"
|
|
99
|
-
backgroundColor=
|
|
99
|
+
backgroundColor="neutral"
|
|
100
100
|
onClick={() => console.log('hello')}
|
|
101
101
|
borderRadius="normal"
|
|
102
102
|
position="relative"
|
|
103
|
-
padding="
|
|
103
|
+
padding="scale.050"
|
|
104
104
|
>
|
|
105
105
|
<InteractionSurface>
|
|
106
106
|
<WarningIcon label="icon button" />
|
|
@@ -110,11 +110,11 @@ export default () => {
|
|
|
110
110
|
<FocusRing>
|
|
111
111
|
<Box
|
|
112
112
|
as="button"
|
|
113
|
-
backgroundColor=
|
|
113
|
+
backgroundColor="warning.bold"
|
|
114
114
|
onClick={() => console.log('hello')}
|
|
115
115
|
borderRadius="normal"
|
|
116
116
|
position="relative"
|
|
117
|
-
padding="
|
|
117
|
+
padding="scale.050"
|
|
118
118
|
>
|
|
119
119
|
<InteractionSurface>
|
|
120
120
|
<WarningIcon
|
|
@@ -129,17 +129,17 @@ export default () => {
|
|
|
129
129
|
<Heading level="h400">
|
|
130
130
|
Progress Indicator with <Code>InteractionSurface</Code>
|
|
131
131
|
</Heading>
|
|
132
|
-
<Inline gap="
|
|
132
|
+
<Inline gap="scale.200" testId="progress-indicators">
|
|
133
133
|
{(['brand.bold', 'neutral', 'warning.bold'] as const).map((app) => (
|
|
134
134
|
<FocusRing>
|
|
135
135
|
<Box
|
|
136
136
|
key={app}
|
|
137
137
|
as="button"
|
|
138
|
-
backgroundColor={
|
|
138
|
+
backgroundColor={app}
|
|
139
139
|
onClick={() => console.log('hello')}
|
|
140
140
|
borderRadius="rounded"
|
|
141
141
|
position="relative"
|
|
142
|
-
padding="
|
|
142
|
+
padding="scale.050"
|
|
143
143
|
>
|
|
144
144
|
<InteractionSurface>
|
|
145
145
|
<Fragment />
|
|
@@ -149,17 +149,17 @@ export default () => {
|
|
|
149
149
|
))}
|
|
150
150
|
</Inline>
|
|
151
151
|
<Heading level="h400">Textfield / input spikes</Heading>
|
|
152
|
-
<Inline gap="
|
|
152
|
+
<Inline gap="scale.200">
|
|
153
153
|
<Textfield />
|
|
154
154
|
<Box
|
|
155
155
|
as="fieldset"
|
|
156
156
|
borderRadius="normal"
|
|
157
157
|
borderStyle="solid"
|
|
158
158
|
borderWidth="2px"
|
|
159
|
-
padding="
|
|
159
|
+
padding="scale.100"
|
|
160
160
|
tabIndex={-1}
|
|
161
|
-
borderColor=
|
|
162
|
-
backgroundColor=
|
|
161
|
+
borderColor="color.border"
|
|
162
|
+
backgroundColor="input"
|
|
163
163
|
css={fieldsetStyles}
|
|
164
164
|
>
|
|
165
165
|
<input
|
package/examples/config.jsonc
CHANGED
|
@@ -6,5 +6,16 @@
|
|
|
6
6
|
{
|
|
7
7
|
"testExamples": [
|
|
8
8
|
"00-basic.tsx"
|
|
9
|
+
],
|
|
10
|
+
"exampleDependencies": [
|
|
11
|
+
"@atlaskit/badge",
|
|
12
|
+
"@atlaskit/button",
|
|
13
|
+
"@atlaskit/code",
|
|
14
|
+
"@atlaskit/focus-ring",
|
|
15
|
+
"@atlaskit/heading",
|
|
16
|
+
"@atlaskit/icon",
|
|
17
|
+
"@atlaskit/lozenge",
|
|
18
|
+
"@atlaskit/section-message",
|
|
19
|
+
"@atlaskit/textfield"
|
|
9
20
|
]
|
|
10
21
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/ds-explorations",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "An experimental package for exploration and validation of spacing / typography foundations.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"atlassian": {
|
|
7
|
+
"disableProductCI": true,
|
|
7
8
|
"team": "Design System Team",
|
|
8
9
|
"inPublicMirror": false,
|
|
9
10
|
"releaseModel": "continuous"
|
|
@@ -31,7 +32,9 @@
|
|
|
31
32
|
"sideEffects": false,
|
|
32
33
|
"atlaskit:src": "src/index.tsx",
|
|
33
34
|
"af:exports": {
|
|
34
|
-
".": "./src/index.tsx"
|
|
35
|
+
".": "./src/index.tsx",
|
|
36
|
+
"./box": "./src/components/box.partial.tsx",
|
|
37
|
+
"./text": "./src/components/text.partial.tsx"
|
|
35
38
|
},
|
|
36
39
|
"dependencies": {
|
|
37
40
|
"@atlaskit/tokens": "^0.10.3",
|