@marigold/system 0.3.0 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -1,95 +1,57 @@
1
1
  # @marigold/system
2
2
 
3
- ## 0.3.0
4
- ### Minor Changes
5
-
6
-
7
-
8
- - [#1163](https://github.com/marigold-ui/marigold/pull/1163) [`51af6693`](https://github.com/marigold-ui/marigold/commit/51af669330fd52e4e31fe5ad71d2b202ab8d2231) Thanks [@sebald](https://github.com/sebald)! - feat(system): Expose helper to transpile style object
9
-
3
+ ## 0.3.1
10
4
 
11
5
  ### Patch Changes
12
6
 
7
+ - [#1676](https://github.com/marigold-ui/marigold/pull/1676) [`379041bc`](https://github.com/marigold-ui/marigold/commit/379041bc7d4502bca98029a95afe43ce693222cd) Thanks [@ti10le](https://github.com/ti10le)! - remove the last mdx stories
13
8
 
9
+ ## 0.3.0
14
10
 
15
- - [#1549](https://github.com/marigold-ui/marigold/pull/1549) [`c030aa85`](https://github.com/marigold-ui/marigold/commit/c030aa85156356c294bafe9831024f6b6f2ce4db) Thanks [@sebald](https://github.com/sebald)! - refa: use emotion's theme function in <Element>
16
-
11
+ ### Minor Changes
17
12
 
13
+ - [#1163](https://github.com/marigold-ui/marigold/pull/1163) [`51af6693`](https://github.com/marigold-ui/marigold/commit/51af669330fd52e4e31fe5ad71d2b202ab8d2231) Thanks [@sebald](https://github.com/sebald)! - feat(system): Expose helper to transpile style object
18
14
 
19
- - [#1515](https://github.com/marigold-ui/marigold/pull/1515) [`8eda245f`](https://github.com/marigold-ui/marigold/commit/8eda245f01a918fcdaa9f0ac211889ed869aa375) Thanks [@sebald](https://github.com/sebald)! - feat: add normalization for body and html & fix emotion leak
15
+ ### Patch Changes
20
16
 
17
+ - [#1549](https://github.com/marigold-ui/marigold/pull/1549) [`c030aa85`](https://github.com/marigold-ui/marigold/commit/c030aa85156356c294bafe9831024f6b6f2ce4db) Thanks [@sebald](https://github.com/sebald)! - refa: use emotion's theme function in <Element>
21
18
 
19
+ * [#1515](https://github.com/marigold-ui/marigold/pull/1515) [`8eda245f`](https://github.com/marigold-ui/marigold/commit/8eda245f01a918fcdaa9f0ac211889ed869aa375) Thanks [@sebald](https://github.com/sebald)! - feat: add normalization for body and html & fix emotion leak
22
20
 
23
21
  - [#1491](https://github.com/marigold-ui/marigold/pull/1491) [`5a04de11`](https://github.com/marigold-ui/marigold/commit/5a04de110637d004f5824679697ee4d6a90eaf34) Thanks [@ti10le](https://github.com/ti10le)! - remove useStyles from Element
24
22
 
25
-
26
-
27
- - [#1440](https://github.com/marigold-ui/marigold/pull/1440) [`c1da52c0`](https://github.com/marigold-ui/marigold/commit/c1da52c0f035b141608fd606e6ba3bc2b5482dc1) Thanks [@ti10le](https://github.com/ti10le)! - feature: use Element in Box + necessary fix changes
28
-
29
-
23
+ * [#1440](https://github.com/marigold-ui/marigold/pull/1440) [`c1da52c0`](https://github.com/marigold-ui/marigold/commit/c1da52c0f035b141608fd606e6ba3bc2b5482dc1) Thanks [@ti10le](https://github.com/ti10le)! - feature: use Element in Box + necessary fix changes
30
24
 
31
25
  - [#1591](https://github.com/marigold-ui/marigold/pull/1591) [`1448ddca`](https://github.com/marigold-ui/marigold/commit/1448ddcaa0f647f48b018fa74a8686af30eccc53) Thanks [@sebald](https://github.com/sebald)! - feat(jest): Improve snapshot readability
32
26
 
33
-
34
-
35
- - [#1514](https://github.com/marigold-ui/marigold/pull/1514) [`5107b943`](https://github.com/marigold-ui/marigold/commit/5107b943cb3085eb3137d84e79966acad6173a26) Thanks [@sebald](https://github.com/sebald)! - feat(system): Use emotion's context
36
-
37
-
27
+ * [#1514](https://github.com/marigold-ui/marigold/pull/1514) [`5107b943`](https://github.com/marigold-ui/marigold/commit/5107b943cb3085eb3137d84e79966acad6173a26) Thanks [@sebald](https://github.com/sebald)! - feat(system): Use emotion's context
38
28
 
39
29
  - [#1647](https://github.com/marigold-ui/marigold/pull/1647) [`cd3a0d3e`](https://github.com/marigold-ui/marigold/commit/cd3a0d3edb3f2ddc1f561e8007e1c20000f7855a) Thanks [@ti10le](https://github.com/ti10le)! - feat: conditional function to allow state props in variants
40
30
 
41
-
42
-
43
- - [#1230](https://github.com/marigold-ui/marigold/pull/1230) [`ebd6e26f`](https://github.com/marigold-ui/marigold/commit/ebd6e26f71f675b98b663bc45c6a2d5badddcd47) Thanks [@viktoria-schwarz](https://github.com/viktoria-schwarz)! - feat: add GlobalStyles via theme
44
-
45
-
31
+ * [#1230](https://github.com/marigold-ui/marigold/pull/1230) [`ebd6e26f`](https://github.com/marigold-ui/marigold/commit/ebd6e26f71f675b98b663bc45c6a2d5badddcd47) Thanks [@viktoria-schwarz](https://github.com/viktoria-schwarz)! - feat: add GlobalStyles via theme
46
32
 
47
33
  - [#1563](https://github.com/marigold-ui/marigold/pull/1563) [`6e485f5a`](https://github.com/marigold-ui/marigold/commit/6e485f5a8800094fe54c075a2b21f8abe726b3cd) Thanks [@sebald](https://github.com/sebald)! - feat: Introduce a `Theme` with all available scales
48
34
 
49
-
50
-
51
- - [#1620](https://github.com/marigold-ui/marigold/pull/1620) [`80a2abe5`](https://github.com/marigold-ui/marigold/commit/80a2abe5804ba2c5a48cc6b05211245c37baf266) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): extend Box to handle __default variants
52
-
53
-
35
+ * [#1620](https://github.com/marigold-ui/marigold/pull/1620) [`80a2abe5`](https://github.com/marigold-ui/marigold/commit/80a2abe5804ba2c5a48cc6b05211245c37baf266) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): extend Box to handle \_\_default variants
54
36
 
55
37
  - [#1579](https://github.com/marigold-ui/marigold/pull/1579) [`e13e3cc1`](https://github.com/marigold-ui/marigold/commit/e13e3cc1fc66b261209973b1fc90eb48117076e9) Thanks [@ti10le](https://github.com/ti10le)! - feat: remove Heading from marigold
56
38
 
57
-
58
-
59
- - [#1622](https://github.com/marigold-ui/marigold/pull/1622) [`1829cf17`](https://github.com/marigold-ui/marigold/commit/1829cf17e16c574e5577b3e1709c34dc7ed4faaf) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): change Card default variant
60
-
61
-
39
+ * [#1622](https://github.com/marigold-ui/marigold/pull/1622) [`1829cf17`](https://github.com/marigold-ui/marigold/commit/1829cf17e16c574e5577b3e1709c34dc7ed4faaf) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): change Card default variant
62
40
 
63
41
  - [#1501](https://github.com/marigold-ui/marigold/pull/1501) [`1c1f8648`](https://github.com/marigold-ui/marigold/commit/1c1f864820a060214406ef711f4ed873746c16c4) Thanks [@ti10le](https://github.com/ti10le)! - feat(storybook): remove use styles stories
64
42
 
65
-
66
-
67
- - [#1190](https://github.com/marigold-ui/marigold/pull/1190) [`a00b7eb9`](https://github.com/marigold-ui/marigold/commit/a00b7eb971131634414d3912d059fb505bb7a370) Thanks [@sebald](https://github.com/sebald)! - fix(system): List reset should not remove the enumeration
68
-
69
-
43
+ * [#1190](https://github.com/marigold-ui/marigold/pull/1190) [`a00b7eb9`](https://github.com/marigold-ui/marigold/commit/a00b7eb971131634414d3912d059fb505bb7a370) Thanks [@sebald](https://github.com/sebald)! - fix(system): List reset should not remove the enumeration
70
44
 
71
45
  - [#1499](https://github.com/marigold-ui/marigold/pull/1499) [`ec5baf85`](https://github.com/marigold-ui/marigold/commit/ec5baf85a9a0f82a4fca5bbd1e1680316c186593) Thanks [@sebald](https://github.com/sebald)! - feat: Update and simplify normalization
72
46
 
73
-
74
-
75
- - [#1652](https://github.com/marigold-ui/marigold/pull/1652) [`0bb8f19e`](https://github.com/marigold-ui/marigold/commit/0bb8f19ebdec0e2f9dc3f6164f4373cac5c10880) Thanks [@sebald](https://github.com/sebald)! - refa(system): Groupt variant related fns in own file
76
-
77
-
47
+ * [#1652](https://github.com/marigold-ui/marigold/pull/1652) [`0bb8f19e`](https://github.com/marigold-ui/marigold/commit/0bb8f19ebdec0e2f9dc3f6164f4373cac5c10880) Thanks [@sebald](https://github.com/sebald)! - refa(system): Groupt variant related fns in own file
78
48
 
79
49
  - [#1436](https://github.com/marigold-ui/marigold/pull/1436) [`c4ae5c5c`](https://github.com/marigold-ui/marigold/commit/c4ae5c5ca442f93034ff8f4c70adc295547951d4) Thanks [@ti10le](https://github.com/ti10le)! - create Element component + normalize file
80
50
 
81
-
82
-
83
- - [#1508](https://github.com/marigold-ui/marigold/pull/1508) [`a1ef2108`](https://github.com/marigold-ui/marigold/commit/a1ef2108dd6c8e6838b517dd58c82d38e71dae2b) Thanks [@sebald](https://github.com/sebald)! - feat: Add default styling to `<Element>`
84
-
85
-
51
+ * [#1508](https://github.com/marigold-ui/marigold/pull/1508) [`a1ef2108`](https://github.com/marigold-ui/marigold/commit/a1ef2108dd6c8e6838b517dd58c82d38e71dae2b) Thanks [@sebald](https://github.com/sebald)! - feat: Add default styling to `<Element>`
86
52
 
87
53
  - [#1621](https://github.com/marigold-ui/marigold/pull/1621) [`2f7b936f`](https://github.com/marigold-ui/marigold/commit/2f7b936f5b07eade00a51cb138c3c492f1e08c9d) Thanks [@ti10le](https://github.com/ti10le)! - feat(comp): change Badge default variant
88
54
 
89
-
90
-
91
- - [#1550](https://github.com/marigold-ui/marigold/pull/1550) [`846eb640`](https://github.com/marigold-ui/marigold/commit/846eb640ad035c7f3410b4a8a451f8de56e62339) Thanks [@sebald](https://github.com/sebald)! - feat: Merge <Box> and <Element>
92
-
93
-
55
+ * [#1550](https://github.com/marigold-ui/marigold/pull/1550) [`846eb640`](https://github.com/marigold-ui/marigold/commit/846eb640ad035c7f3410b4a8a451f8de56e62339) Thanks [@sebald](https://github.com/sebald)! - feat: Merge <Box> and <Element>
94
56
 
95
57
  - [#1614](https://github.com/marigold-ui/marigold/pull/1614) [`5d63cd9c`](https://github.com/marigold-ui/marigold/commit/5d63cd9c14578787083c82c85d93bbd2ff0efac6) Thanks [@ti10le](https://github.com/ti10le)! - remove all purple color things
@@ -0,0 +1,5 @@
1
+ import type { ComponentStory } from '@storybook/react';
2
+ import { SVG } from './SVG';
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<typeof SVG>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marigold/system",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Marigold System Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/system.esm.js",
@@ -1,9 +1,10 @@
1
- import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
1
+ import React from 'react';
2
+ import type { Meta, ComponentStory } from '@storybook/react';
2
3
  import { SVG } from './SVG';
3
4
 
4
- <Meta
5
- title="Components/SVG"
6
- argTypes={{
5
+ export default {
6
+ title: 'Components/SVG',
7
+ argTypes: {
7
8
  variant: {
8
9
  control: {
9
10
  type: 'text',
@@ -37,19 +38,11 @@ import { SVG } from './SVG';
37
38
  },
38
39
  },
39
40
  },
40
- }}
41
- />
41
+ },
42
+ } as Meta;
42
43
 
43
- # SVG
44
-
45
- export const Template = args => (
44
+ export const Basic: ComponentStory<typeof SVG> = args => (
46
45
  <SVG {...args}>
47
46
  <path d="M9.9 20.113V13.8415H14.1V20.113H19.35V11.751H22.5L12 2.34375L1.5 11.751H4.65V20.113H9.9Z" />
48
47
  </SVG>
49
48
  );
50
-
51
- <Canvas>
52
- <Story name="Default">{Template.bind({})}</Story>
53
- </Canvas>
54
-
55
- <ArgsTable story="Default" />
@@ -1,499 +0,0 @@
1
- import { Meta, Story, Canvas } from '@storybook/addon-docs';
2
- import { Box, Column, Columns, Container, Text } from '@marigold/components';
3
-
4
- <Meta title="Tokens/Marigold Colours" />
5
-
6
- # Colours
7
-
8
- ## B2B Theme
9
-
10
- <Canvas>
11
- <Story name="B2B Theme">
12
- <Columns space={16}>
13
- <Column width={6}>
14
- <Text as="h2" variant="headline2">
15
- Gray
16
- </Text>
17
- <Box
18
- as={Container}
19
- bg="#ffffff"
20
- p="8px"
21
- display="flex"
22
- justifyContent="space-between"
23
- >
24
- <Text>Gray00</Text>
25
- <Text>#ffffff</Text>
26
- </Box>
27
- <Box
28
- as={Container}
29
- bg="#fafafa"
30
- p="8px"
31
- display="flex"
32
- justifyContent="space-between"
33
- >
34
- <Text>Gray10</Text>
35
- <Text>#fafafa</Text>
36
- </Box>
37
- <Box
38
- as={Container}
39
- bg="#f3f3f3"
40
- p="8px"
41
- display="flex"
42
- justifyContent="space-between"
43
- >
44
- <Text>Gray20</Text>
45
- <Text>#f3f3f3</Text>
46
- </Box>
47
- <Box
48
- as={Container}
49
- bg="#e3e3e3"
50
- p="8px"
51
- display="flex"
52
- justifyContent="space-between"
53
- >
54
- <Text>Gray30</Text>
55
- <Text>#e3e3e3</Text>
56
- </Box>
57
- <Box
58
- as={Container}
59
- bg="#cccccc"
60
- p="8px"
61
- display="flex"
62
- justifyContent="space-between"
63
- >
64
- <Text>Gray40</Text>
65
- <Text>#cccccc</Text>
66
- </Box>
67
- <Box
68
- as={Container}
69
- bg="#8d8d8d"
70
- p="8px"
71
- display="flex"
72
- justifyContent="space-between"
73
- >
74
- <Text>Gray50</Text>
75
- <Text>#8d8d8d</Text>
76
- </Box>
77
- <Box
78
- as={Container}
79
- css={{ color: 'white' }}
80
- bg="#6d6d6d"
81
- p="8px"
82
- display="flex"
83
- justifyContent="space-between"
84
- >
85
- <Text>Gray60</Text>
86
- <Text>#6d6d6d</Text>
87
- </Box>
88
- <Box
89
- as={Container}
90
- css={{ color: 'white' }}
91
- bg="#4b4b4b"
92
- p="8px"
93
- display="flex"
94
- justifyContent="space-between"
95
- >
96
- <Text>Gray70 (Text Black)</Text>
97
- <Text>#4b4b4b</Text>
98
- </Box>
99
- <Box
100
- as={Container}
101
- css={{ color: 'white' }}
102
- bg="#2b2b2b"
103
- p="8px"
104
- display="flex"
105
- justifyContent="space-between"
106
- >
107
- <Text>Gray80</Text>
108
- <Text>#2b2b2b</Text>
109
- </Box>
110
- <Box
111
- as={Container}
112
- css={{ color: 'white' }}
113
- bg="#0f0f0f"
114
- p="8px"
115
- display="flex"
116
- justifyContent="space-between"
117
- >
118
- <Text>Gray90</Text>
119
- <Text>#0f0f0f</Text>
120
- </Box>
121
- </Column>
122
- <Column width={6}>
123
- <Text as="h2" variant="headline2">
124
- Orange
125
- </Text>
126
- <Box
127
- as={Container}
128
- bg="#fff8f1"
129
- p="8px"
130
- display="flex"
131
- justifyContent="space-between"
132
- >
133
- <Text>Orange10</Text>
134
- <Text>#fff8f1</Text>
135
- </Box>
136
- <Box
137
- as={Container}
138
- bg="#fdcca0"
139
- p="8px"
140
- display="flex"
141
- justifyContent="space-between"
142
- >
143
- <Text>Orange20</Text>
144
- <Text>#fdcca0</Text>
145
- </Box>
146
- <Box
147
- as={Container}
148
- bg="#f8ac67"
149
- p="8px"
150
- display="flex"
151
- justifyContent="space-between"
152
- >
153
- <Text>Orange40</Text>
154
- <Text>#f8ac67</Text>
155
- </Box>
156
- <Box
157
- as={Container}
158
- bg="#fa8005"
159
- p="8px"
160
- display="flex"
161
- justifyContent="space-between"
162
- >
163
- <Text>Orange60 (Primary)</Text>
164
- <Text>#fa8005</Text>
165
- </Box>
166
- <Box
167
- as={Container}
168
- bg="#ea5200"
169
- p="8px"
170
- display="flex"
171
- justifyContent="space-between"
172
- >
173
- <Text>Orange70</Text>
174
- <Text>#ea5200</Text>
175
- </Box>
176
- <Box
177
- as={Container}
178
- css={{ color: 'white' }}
179
- bg="#ae440a"
180
- p="8px"
181
- display="flex"
182
- justifyContent="space-between"
183
- >
184
- <Text>Orange80</Text>
185
- <Text>#ae440a</Text>
186
- </Box>
187
- </Column>
188
- </Columns>
189
- <Columns space={16}>
190
- <Column width={6}>
191
- <Text as="h2" variant="headline2">
192
- Blue
193
- </Text>
194
- <Box
195
- as={Container}
196
- bg="#e8f4fa"
197
- p="8px"
198
- display="flex"
199
- justifyContent="space-between"
200
- >
201
- <Text>Blue10</Text>
202
- <Text>#e8f4fa</Text>
203
- </Box>
204
- <Box
205
- as={Container}
206
- bg="#c1f0fc"
207
- p="8px"
208
- display="flex"
209
- justifyContent="space-between"
210
- >
211
- <Text>Blue20</Text>
212
- <Text>#c1f0fc</Text>
213
- </Box>
214
- <Box
215
- as={Container}
216
- bg="#67dfff"
217
- p="8px"
218
- display="flex"
219
- justifyContent="space-between"
220
- >
221
- <Text>Blue40</Text>
222
- <Text>#67dfff</Text>
223
- </Box>
224
- <Box
225
- as={Container}
226
- bg="#3ab3d5"
227
- p="8px"
228
- display="flex"
229
- justifyContent="space-between"
230
- >
231
- <Text>Blue60</Text>
232
- <Text>#3ab3d5</Text>
233
- </Box>
234
- <Box
235
- as={Container}
236
- css={{ color: 'white' }}
237
- bg="#1d67b6"
238
- p="8px"
239
- display="flex"
240
- justifyContent="space-between"
241
- >
242
- <Text>Blue70</Text>
243
- <Text>#1d67b6</Text>
244
- </Box>
245
- <Box
246
- as={Container}
247
- css={{ color: 'white' }}
248
- bg="#fafafa"
249
- p="8px"
250
- display="flex"
251
- justifyContent="space-between"
252
- >
253
- <Text>Blue80</Text>
254
- <Text>#0c3a6b</Text>
255
- </Box>
256
- </Column>
257
- <Column width={6}>
258
- <Text as="h2" variant="headline2">
259
- Green
260
- </Text>
261
- <Box
262
- as={Container}
263
- bg="#f9fed0"
264
- p="8px"
265
- display="flex"
266
- justifyContent="space-between"
267
- >
268
- <Text>Green10</Text>
269
- <Text>#f9fed0</Text>
270
- </Box>
271
- <Box
272
- as={Container}
273
- bg="#e8f57b"
274
- p="8px"
275
- display="flex"
276
- justifyContent="space-between"
277
- >
278
- <Text>Green20</Text>
279
- <Text>#e8f57b</Text>
280
- </Box>
281
- <Box
282
- as={Container}
283
- bg="#bacb2a"
284
- p="8px"
285
- display="flex"
286
- justifyContent="space-between"
287
- >
288
- <Text>Green40</Text>
289
- <Text>#bacb2a</Text>
290
- </Box>
291
- <Box
292
- as={Container}
293
- bg="#8bbd26"
294
- p="8px"
295
- display="flex"
296
- justifyContent="space-between"
297
- >
298
- <Text>Green60</Text>
299
- <Text>#8bbd26</Text>
300
- </Box>
301
- <Box
302
- as={Container}
303
- bg="#44a112"
304
- p="8px"
305
- display="flex"
306
- justifyContent="space-between"
307
- >
308
- <Text>Green70</Text>
309
- <Text>#44a112</Text>
310
- </Box>
311
- <Box
312
- as={Container}
313
- css={{ color: 'white' }}
314
- bg="#215107"
315
- p="8px"
316
- display="flex"
317
- justifyContent="space-between"
318
- >
319
- <Text>Green80</Text>
320
- <Text>#215107</Text>
321
- </Box>
322
- </Column>
323
- </Columns>
324
- <Columns space={16}>
325
- <Column width={6}>
326
- <Text as="h2" variant="headline2">
327
- Red
328
- </Text>
329
- <Box
330
- as={Container}
331
- bg="#fff8f8"
332
- p="8px"
333
- display="flex"
334
- justifyContent="space-between"
335
- >
336
- <Text>Red10</Text>
337
- <Text>#fff8f8</Text>
338
- </Box>
339
- <Box
340
- as={Container}
341
- bg="#fec8c9"
342
- p="8px"
343
- display="flex"
344
- justifyContent="space-between"
345
- >
346
- <Text>Red20</Text>
347
- <Text>#fec8c9</Text>
348
- </Box>
349
- <Box
350
- as={Container}
351
- bg="#f38a8a"
352
- p="8px"
353
- display="flex"
354
- justifyContent="space-between"
355
- >
356
- <Text>Red40</Text>
357
- <Text>#f38a8a</Text>
358
- </Box>
359
- <Box
360
- as={Container}
361
- bg="#dd4142"
362
- p="8px"
363
- display="flex"
364
- justifyContent="space-between"
365
- >
366
- <Text>Red60</Text>
367
- <Text>#dd4142</Text>
368
- </Box>
369
- <Box
370
- as={Container}
371
- css={{ color: 'white' }}
372
- bg="#8b0027"
373
- p="8px"
374
- display="flex"
375
- justifyContent="space-between"
376
- >
377
- <Text>Red70</Text>
378
- <Text>#8b0027</Text>
379
- </Box>
380
- <Box
381
- as={Container}
382
- css={{ color: 'white' }}
383
- bg="#4d0419"
384
- p="8px"
385
- display="flex"
386
- justifyContent="space-between"
387
- >
388
- <Text>Red80</Text>
389
- <Text>#4d0419</Text>
390
- </Box>
391
- </Column>
392
- </Columns>
393
- </Story>
394
- </Canvas>
395
-
396
- ## Unicorn Theme
397
-
398
- <Canvas>
399
- <Story name="Unicorn Theme">
400
- <Columns space={16}>
401
- <Column width={6}>
402
- <Text as="h2" variant="headline2">
403
- Base Colours
404
- </Text>
405
- <Box
406
- as={Container}
407
- css={{ color: 'white' }}
408
- bg="#070708"
409
- p="8px"
410
- display="flex"
411
- justifyContent="space-between"
412
- >
413
- <Text>Text</Text>
414
- <Text>#070708</Text>
415
- </Box>
416
- <Box
417
- as={Container}
418
- bg="#fdfcfd"
419
- p="8px"
420
- display="flex"
421
- justifyContent="space-between"
422
- >
423
- <Text>Background</Text>
424
- <Text>#fdfcfd</Text>
425
- </Box>
426
- <Box
427
- as={Container}
428
- bg="#c9b1ff"
429
- p="8px"
430
- display="flex"
431
- justifyContent="space-between"
432
- >
433
- <Text>Primary</Text>
434
- <Text>#c9b1ff</Text>
435
- </Box>
436
- <Box
437
- as={Container}
438
- bg="#ffcaf2"
439
- p="8px"
440
- display="flex"
441
- justifyContent="space-between"
442
- >
443
- <Text>Secondary</Text>
444
- <Text>#ffcaf2</Text>
445
- </Box>
446
- <Box
447
- as={Container}
448
- bg="#e9e7eb"
449
- p="8px"
450
- display="flex"
451
- justifyContent="space-between"
452
- >
453
- <Text>Disabled</Text>
454
- <Text>#e9e7eb</Text>
455
- </Box>
456
- <Box
457
- as={Container}
458
- bg="#ffb2b1"
459
- p="8px"
460
- display="flex"
461
- justifyContent="space-between"
462
- >
463
- <Text>Error</Text>
464
- <Text>#ffb2b1</Text>
465
- </Box>
466
- <Box
467
- as={Container}
468
- bg="#fff3ad"
469
- p="8px"
470
- display="flex"
471
- justifyContent="space-between"
472
- >
473
- <Text>Warning</Text>
474
- <Text>#fff3ad</Text>
475
- </Box>
476
- <Box
477
- as={Container}
478
- bg="#a2edff"
479
- p="8px"
480
- display="flex"
481
- justifyContent="space-between"
482
- >
483
- <Text>Info</Text>
484
- <Text>#a2edff</Text>
485
- </Box>
486
- <Box
487
- as={Container}
488
- bg="#bcffbc"
489
- p="8px"
490
- display="flex"
491
- justifyContent="space-between"
492
- >
493
- <Text>Success</Text>
494
- <Text>#bcffbc</Text>
495
- </Box>
496
- </Column>
497
- </Columns>
498
- </Story>
499
- </Canvas>
@@ -1,84 +0,0 @@
1
- import { Meta } from '@storybook/addon-docs';
2
-
3
- <Meta title="Guides/Concepts & Principles" />
4
-
5
- ## Design Tokens
6
-
7
- The term _design tokens_ originates from the [Lightning Design System](https://www.lightningdesignsystem.com/design-tokens/). They are the "visual design atoms" of a design system. Similar to variables in CSS or Sass, design tokens are used to capture low-level values and then used to create the look and feel of your product. This helps with maintaining a consistent and scalable visual system for UI development.
8
-
9
- ```css
10
- /* button.css */
11
- .button {
12
- color: #1f1235;
13
- background: #ff6e6c;
14
- height: 24px;
15
- }
16
- ```
17
-
18
- ```scss
19
- /* colors.scss */
20
- $color-primary: #ff6e6c;
21
- $color-text: #1f1235;
22
-
23
- /* sizes.scss */
24
- $size-6: 24px;
25
-
26
- /* button.scss */
27
- .button {
28
- color: $color-text;
29
- background: $color-primary;
30
- height: $size-6;
31
- }
32
- ```
33
-
34
- _Read more:_
35
-
36
- - [Lightning Design System: Design Tokens](https://www.lightningdesignsystem.com/design-tokens/)
37
- - [CSS Tricks: What are Design Tokens?](https://css-tricks.com/what-are-design-tokens/)
38
-
39
- ## Rhythm & Harmony
40
-
41
- Instead of choosing arbitrary numbers for our typography, we make use of a _modular scale_. "By using culturally relevant, historically pleasing ratios to create modular scales and basing the measurements in our compositions on values from those scales, we can achieve a visual harmony not found in layouts that use arbitrary, conventional, or easily divisible numbers." ([_More Meaningful Typography_](https://alistapart.com/article/more-meaningful-typography/))
42
-
43
- Applied to web typography, this means we choose a base font size and apply a ratio to it. The ratio is then squared to generate an ascending scale.
44
-
45
- ```scss
46
- /* perfect fifth */
47
- $ratio: 1.5;
48
-
49
- /* browser default */
50
- $base: 16px;
51
-
52
- /**
53
- * The formular is always "$base * $ratio ** $level", the level is a integer.
54
- * The resulting value is usually rounded to avoid poor sub-pixel rendering.
55
- *
56
- * Note that in the below example the number is not equal to the $level in
57
- * the formula.
58
- */
59
- $fontSize-0: 10px;
60
- $fontSize-1: 16px;
61
- $fontSize-2: 24px;
62
- $fontSize-3: 36px;
63
- /* etc. */
64
- ```
65
-
66
- A similar concept can be applied to spacing and sizing of elements. To maintain a aesthetically pleasing rhythm between elements, we adopt the _8pt grid_. This means that multiples of 8 are used to define dimensions, paddings and margins. As a result, all of our measurements follow the same rule and we automatically get a more consistent UI.
67
-
68
- ```scss
69
- /* 8pt grid */
70
- $size-0: 0px;
71
- $size-1: 8px;
72
- $size-2: 16px;
73
- $size-3: 32px;
74
- $size-4: 64px;
75
- $size-5: 128px;
76
- $size-6: 256px;
77
- $size-7: 512px;
78
- ```
79
-
80
- Read more:
81
-
82
- - [A List Apart: More Meaningful Typography](https://alistapart.com/article/more-meaningful-typography/)
83
- - [Type Scale Calculator](https://type-scale.com/)
84
- - [Bryn Jackson's 8-Point Grid](https://spec.fm/specifics/8-pt-grid)