@veeqo/ui 0.0.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/.nvmrc +1 -0
- package/.prettierrc +6 -0
- package/.storybook/main.ts +21 -0
- package/.storybook/preview.ts +9 -0
- package/.vscode/settings.json +11 -0
- package/lib/components/Loader/Grid.d.ts +10 -0
- package/lib/components/Loader/Loader.d.ts +3 -0
- package/lib/components/Loader/TailSpin.d.ts +10 -0
- package/lib/components/Loader/ThreeDots.d.ts +10 -0
- package/lib/components/Loader/index.d.ts +1 -0
- package/lib/components/Loader/loaderTypes.d.ts +8 -0
- package/lib/components/Stack/Alignments.d.ts +9 -0
- package/lib/components/Stack/Stack.d.ts +6 -0
- package/lib/components/Stack/index.d.ts +1 -0
- package/lib/components/Stack/types.d.ts +38 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/index.d.ts +520 -0
- package/lib/index.esm.js +2 -0
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/theme/index.d.ts +454 -0
- package/lib/theme/modules/breakpoints.d.ts +7 -0
- package/lib/theme/modules/colors.d.ts +116 -0
- package/lib/theme/modules/layers.d.ts +6 -0
- package/lib/theme/modules/radius.d.ts +7 -0
- package/lib/theme/modules/shadows.d.ts +6 -0
- package/lib/theme/modules/sizes.d.ts +20 -0
- package/lib/theme/modules/text.d.ts +315 -0
- package/lib/theme/storybook/components.d.ts +2 -0
- package/package.json +52 -0
- package/rollup.config.mjs +49 -0
- package/src/components/Loader/Docs.mdx +26 -0
- package/src/components/Loader/Grid.tsx +113 -0
- package/src/components/Loader/Loader.stories.tsx +62 -0
- package/src/components/Loader/Loader.tsx +28 -0
- package/src/components/Loader/TailSpin.tsx +54 -0
- package/src/components/Loader/ThreeDots.tsx +90 -0
- package/src/components/Loader/__snapshots__/Loader.test.tsx.snap +73 -0
- package/src/components/Loader/index.ts +1 -0
- package/src/components/Loader/loaderTypes.ts +9 -0
- package/src/components/Stack/Alignments.ts +10 -0
- package/src/components/Stack/Docs.mdx +28 -0
- package/src/components/Stack/Stack.stories.tsx +112 -0
- package/src/components/Stack/Stack.tsx +61 -0
- package/src/components/Stack/__snapshots__/Stack.test.tsx.snap +45 -0
- package/src/components/Stack/index.ts +1 -0
- package/src/components/Stack/types.ts +73 -0
- package/src/components/index.ts +2 -0
- package/src/index.ts +2 -0
- package/src/theme/index.ts +18 -0
- package/src/theme/modules/breakpoints.ts +7 -0
- package/src/theme/modules/colors.ts +116 -0
- package/src/theme/modules/layers.ts +6 -0
- package/src/theme/modules/radius.ts +7 -0
- package/src/theme/modules/shadows.ts +6 -0
- package/src/theme/modules/sizes.ts +52 -0
- package/src/theme/modules/text.ts +319 -0
- package/src/theme/storybook/ColorDocs.mdx +130 -0
- package/src/theme/storybook/RadiusDocs.mdx +39 -0
- package/src/theme/storybook/ShadowDocs.mdx +37 -0
- package/src/theme/storybook/SizesDocs.mdx +104 -0
- package/src/theme/storybook/components.tsx +19 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
enum SizeAlias {
|
|
2
|
+
none = 'none',
|
|
3
|
+
line = 'line',
|
|
4
|
+
xs = 'xs',
|
|
5
|
+
sm = 'sm',
|
|
6
|
+
base = 'base',
|
|
7
|
+
md = 'md',
|
|
8
|
+
lg = 'lg',
|
|
9
|
+
xl = 'xl',
|
|
10
|
+
xxl = 'xxl',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type SizeScaleIndex = number | keyof typeof SizeAlias;
|
|
14
|
+
export type SizeScale = {
|
|
15
|
+
[index: number]: string;
|
|
16
|
+
[index: string]: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type SizeScaleBuilderConfig = {
|
|
20
|
+
increment: number;
|
|
21
|
+
unit: string;
|
|
22
|
+
count: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function buildSizeScale({ increment, unit, count }: SizeScaleBuilderConfig): SizeScale {
|
|
26
|
+
const sizes: SizeScale = {};
|
|
27
|
+
/* eslint-disable-next-line no-plusplus */
|
|
28
|
+
for (let i = 0; i <= count; i++) {
|
|
29
|
+
const value = i * increment;
|
|
30
|
+
sizes[i] = `${value}${unit}`;
|
|
31
|
+
}
|
|
32
|
+
return sizes;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const sizeScale = buildSizeScale({ increment: 0.25, unit: 'rem', count: 20 });
|
|
36
|
+
|
|
37
|
+
export const sizeAliases: SizeScale = {
|
|
38
|
+
[SizeAlias.none]: '0',
|
|
39
|
+
[SizeAlias.line]: '1px',
|
|
40
|
+
[SizeAlias.xs]: sizeScale[1],
|
|
41
|
+
[SizeAlias.sm]: sizeScale[2],
|
|
42
|
+
[SizeAlias.base]: sizeScale[4],
|
|
43
|
+
[SizeAlias.md]: sizeScale[6],
|
|
44
|
+
[SizeAlias.lg]: sizeScale[8],
|
|
45
|
+
[SizeAlias.xl]: sizeScale[12],
|
|
46
|
+
[SizeAlias.xxl]: sizeScale[16],
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const sizes: SizeScale = {
|
|
50
|
+
...sizeAliases,
|
|
51
|
+
...sizeScale,
|
|
52
|
+
};
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { colors } from './colors';
|
|
2
|
+
|
|
3
|
+
export const common = {
|
|
4
|
+
fontFamily:
|
|
5
|
+
'Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol',
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const text = {
|
|
9
|
+
headingXXL: {
|
|
10
|
+
fontFamily: common.fontFamily,
|
|
11
|
+
fontStyle: 'normal',
|
|
12
|
+
fontWeight: 600,
|
|
13
|
+
fontSize: '40px',
|
|
14
|
+
lineHeight: '56px',
|
|
15
|
+
color: colors.neutral.ink.base,
|
|
16
|
+
textDecoration: 'none',
|
|
17
|
+
letterSpacing: '-0.022rem',
|
|
18
|
+
},
|
|
19
|
+
headingXL: {
|
|
20
|
+
fontFamily: common.fontFamily,
|
|
21
|
+
fontStyle: 'normal',
|
|
22
|
+
fontWeight: 600,
|
|
23
|
+
fontSize: '28px',
|
|
24
|
+
lineHeight: '40px',
|
|
25
|
+
color: colors.neutral.ink.base,
|
|
26
|
+
textDecoration: 'none',
|
|
27
|
+
letterSpacing: '-0.02rem',
|
|
28
|
+
},
|
|
29
|
+
headingLarge: {
|
|
30
|
+
fontFamily: common.fontFamily,
|
|
31
|
+
fontStyle: 'normal',
|
|
32
|
+
fontWeight: 600,
|
|
33
|
+
fontSize: '24px',
|
|
34
|
+
lineHeight: '32px',
|
|
35
|
+
color: colors.neutral.ink.base,
|
|
36
|
+
textDecoration: 'none',
|
|
37
|
+
letterSpacing: '-0.019rem',
|
|
38
|
+
},
|
|
39
|
+
headingMedium: {
|
|
40
|
+
fontFamily: common.fontFamily,
|
|
41
|
+
fontStyle: 'normal',
|
|
42
|
+
fontWeight: 600,
|
|
43
|
+
fontSize: '20px',
|
|
44
|
+
lineHeight: '28px',
|
|
45
|
+
color: colors.neutral.ink.base,
|
|
46
|
+
textDecoration: 'none',
|
|
47
|
+
letterSpacing: '-0.017rem',
|
|
48
|
+
},
|
|
49
|
+
headingSmall: {
|
|
50
|
+
fontFamily: common.fontFamily,
|
|
51
|
+
fontStyle: 'normal',
|
|
52
|
+
fontWeight: 600,
|
|
53
|
+
fontSize: '16px',
|
|
54
|
+
lineHeight: '20px',
|
|
55
|
+
color: colors.neutral.ink.base,
|
|
56
|
+
textDecoration: 'none',
|
|
57
|
+
letterSpacing: '-0.011rem',
|
|
58
|
+
},
|
|
59
|
+
headingTable: {
|
|
60
|
+
fontFamily: common.fontFamily,
|
|
61
|
+
fontStyle: 'normal',
|
|
62
|
+
fontWeight: 600,
|
|
63
|
+
fontSize: '12px',
|
|
64
|
+
lineHeight: '16px',
|
|
65
|
+
color: colors.neutral.ink.base,
|
|
66
|
+
textDecoration: 'none',
|
|
67
|
+
letterSpacing: '0',
|
|
68
|
+
},
|
|
69
|
+
subheadingLarge: {
|
|
70
|
+
fontFamily: common.fontFamily,
|
|
71
|
+
fontStyle: 'normal',
|
|
72
|
+
fontWeight: 'normal',
|
|
73
|
+
fontSize: '20px',
|
|
74
|
+
lineHeight: '28px',
|
|
75
|
+
color: colors.neutral.ink.light,
|
|
76
|
+
textDecoration: 'none',
|
|
77
|
+
letterSpacing: '-0.017rem',
|
|
78
|
+
},
|
|
79
|
+
subheadingMedium: {
|
|
80
|
+
fontFamily: common.fontFamily,
|
|
81
|
+
fontStyle: 'normal',
|
|
82
|
+
fontWeight: 'normal',
|
|
83
|
+
fontSize: '16px',
|
|
84
|
+
lineHeight: '24px',
|
|
85
|
+
color: colors.neutral.ink.light,
|
|
86
|
+
textDecoration: 'none',
|
|
87
|
+
letterSpacing: '-0.011rem',
|
|
88
|
+
},
|
|
89
|
+
subheadingSmall: {
|
|
90
|
+
fontFamily: common.fontFamily,
|
|
91
|
+
fontStyle: 'normal',
|
|
92
|
+
fontWeight: 'normal',
|
|
93
|
+
fontSize: '12px',
|
|
94
|
+
lineHeight: '16px',
|
|
95
|
+
color: colors.neutral.ink.light,
|
|
96
|
+
textDecoration: 'none',
|
|
97
|
+
letterSpacing: '0',
|
|
98
|
+
},
|
|
99
|
+
subheadingSmallBold: {
|
|
100
|
+
fontFamily: common.fontFamily,
|
|
101
|
+
fontStyle: 'normal',
|
|
102
|
+
fontWeight: 600,
|
|
103
|
+
fontSize: '12px',
|
|
104
|
+
lineHeight: '16px',
|
|
105
|
+
color: colors.neutral.ink.base,
|
|
106
|
+
textDecoration: 'none',
|
|
107
|
+
letterSpacing: '0',
|
|
108
|
+
},
|
|
109
|
+
body: {
|
|
110
|
+
fontFamily: common.fontFamily,
|
|
111
|
+
fontStyle: 'normal',
|
|
112
|
+
fontWeight: 'normal',
|
|
113
|
+
fontSize: '14px',
|
|
114
|
+
lineHeight: '20px',
|
|
115
|
+
color: colors.neutral.ink.base,
|
|
116
|
+
textDecoration: 'none',
|
|
117
|
+
letterSpacing: '-0.006rem',
|
|
118
|
+
},
|
|
119
|
+
bodySmall: {
|
|
120
|
+
fontFamily: common.fontFamily,
|
|
121
|
+
fontStyle: 'normal',
|
|
122
|
+
fontWeight: 'normal',
|
|
123
|
+
fontSize: '12px',
|
|
124
|
+
lineHeight: '16px',
|
|
125
|
+
color: colors.neutral.ink.base,
|
|
126
|
+
textDecoration: 'none',
|
|
127
|
+
letterSpacing: '0',
|
|
128
|
+
},
|
|
129
|
+
bodyBold: {
|
|
130
|
+
fontFamily: common.fontFamily,
|
|
131
|
+
fontStyle: 'normal',
|
|
132
|
+
fontWeight: 600,
|
|
133
|
+
fontSize: '14px',
|
|
134
|
+
lineHeight: '20px',
|
|
135
|
+
color: colors.neutral.ink.base,
|
|
136
|
+
textDecoration: 'none',
|
|
137
|
+
letterSpacing: '-0.006rem',
|
|
138
|
+
},
|
|
139
|
+
bodyBoldDark: {
|
|
140
|
+
fontFamily: common.fontFamily,
|
|
141
|
+
fontStyle: 'normal',
|
|
142
|
+
fontWeight: 600,
|
|
143
|
+
fontSize: '14px',
|
|
144
|
+
lineHeight: '20px',
|
|
145
|
+
color: colors.neutral.ink.dark,
|
|
146
|
+
textDecoration: 'none',
|
|
147
|
+
letterSpacing: '0',
|
|
148
|
+
},
|
|
149
|
+
bodySmallBold: {
|
|
150
|
+
fontFamily: common.fontFamily,
|
|
151
|
+
fontStyle: 'normal',
|
|
152
|
+
fontWeight: 600,
|
|
153
|
+
fontSize: '12px',
|
|
154
|
+
lineHeight: '16px',
|
|
155
|
+
color: colors.neutral.ink.base,
|
|
156
|
+
textDecoration: 'none',
|
|
157
|
+
letterSpacing: '0',
|
|
158
|
+
},
|
|
159
|
+
button: {
|
|
160
|
+
fontFamily: common.fontFamily,
|
|
161
|
+
fontStyle: 'normal',
|
|
162
|
+
fontWeight: 600,
|
|
163
|
+
fontSize: '16px',
|
|
164
|
+
lineHeight: '24px',
|
|
165
|
+
color: colors.secondary.blue.base,
|
|
166
|
+
textDecoration: 'none',
|
|
167
|
+
letterSpacing: '-0.011rem',
|
|
168
|
+
},
|
|
169
|
+
buttonSmall: {
|
|
170
|
+
fontFamily: common.fontFamily,
|
|
171
|
+
fontStyle: 'normal',
|
|
172
|
+
fontWeight: 600,
|
|
173
|
+
fontSize: '14px',
|
|
174
|
+
lineHeight: '20px',
|
|
175
|
+
color: colors.secondary.blue.base,
|
|
176
|
+
textDecoration: 'none',
|
|
177
|
+
letterSpacing: '-0.006rem',
|
|
178
|
+
},
|
|
179
|
+
linkLarge: {
|
|
180
|
+
fontFamily: common.fontFamily,
|
|
181
|
+
fontStyle: 'normal',
|
|
182
|
+
fontWeight: 'normal',
|
|
183
|
+
fontSize: '20px',
|
|
184
|
+
lineHeight: '28px',
|
|
185
|
+
color: colors.secondary.blue.base,
|
|
186
|
+
textDecoration: 'underline',
|
|
187
|
+
letterSpacing: '-0.017rem',
|
|
188
|
+
},
|
|
189
|
+
linkMedium: {
|
|
190
|
+
fontFamily: common.fontFamily,
|
|
191
|
+
fontStyle: 'normal',
|
|
192
|
+
fontWeight: 'normal',
|
|
193
|
+
fontSize: '16px',
|
|
194
|
+
lineHeight: '24px',
|
|
195
|
+
color: colors.secondary.blue.base,
|
|
196
|
+
textDecoration: 'underline',
|
|
197
|
+
letterSpacing: '-0.011rem',
|
|
198
|
+
},
|
|
199
|
+
link: {
|
|
200
|
+
fontFamily: common.fontFamily,
|
|
201
|
+
fontStyle: 'normal',
|
|
202
|
+
fontWeight: 'normal',
|
|
203
|
+
fontSize: '14px',
|
|
204
|
+
lineHeight: '20px',
|
|
205
|
+
color: colors.secondary.blue.base,
|
|
206
|
+
textDecoration: 'underline',
|
|
207
|
+
letterSpacing: '-0.006rem',
|
|
208
|
+
},
|
|
209
|
+
linkSmall: {
|
|
210
|
+
fontFamily: common.fontFamily,
|
|
211
|
+
fontStyle: 'normal',
|
|
212
|
+
fontWeight: 'normal',
|
|
213
|
+
fontSize: '12px',
|
|
214
|
+
lineHeight: '16px',
|
|
215
|
+
color: colors.secondary.blue.base,
|
|
216
|
+
textDecoration: 'underline',
|
|
217
|
+
letterSpacing: '0',
|
|
218
|
+
},
|
|
219
|
+
inputLabel: {
|
|
220
|
+
fontFamily: common.fontFamily,
|
|
221
|
+
fontStyle: 'normal',
|
|
222
|
+
fontWeight: 600,
|
|
223
|
+
fontSize: '14px',
|
|
224
|
+
lineHeight: '20px',
|
|
225
|
+
color: colors.neutral.ink.base,
|
|
226
|
+
textDecoration: 'none',
|
|
227
|
+
letterSpacing: '-0.006rem',
|
|
228
|
+
},
|
|
229
|
+
inputLabelSmall: {
|
|
230
|
+
fontFamily: common.fontFamily,
|
|
231
|
+
fontStyle: 'normal',
|
|
232
|
+
fontWeight: 600,
|
|
233
|
+
fontSize: '12px',
|
|
234
|
+
lineHeight: '16px',
|
|
235
|
+
color: colors.neutral.ink.base,
|
|
236
|
+
textDecoration: 'none',
|
|
237
|
+
letterSpacing: '0',
|
|
238
|
+
},
|
|
239
|
+
hintText: {
|
|
240
|
+
fontFamily: common.fontFamily,
|
|
241
|
+
fontStyle: 'normal',
|
|
242
|
+
fontWeight: 'normal',
|
|
243
|
+
fontSize: '12px',
|
|
244
|
+
lineHeight: '16px',
|
|
245
|
+
color: colors.neutral.ink.light,
|
|
246
|
+
textDecoration: 'none',
|
|
247
|
+
letterSpacing: '0',
|
|
248
|
+
},
|
|
249
|
+
placeholder: {
|
|
250
|
+
fontFamily: common.fontFamily,
|
|
251
|
+
fontStyle: 'normal',
|
|
252
|
+
fontWeight: 'normal',
|
|
253
|
+
fontSize: '14px',
|
|
254
|
+
lineHeight: '20px',
|
|
255
|
+
color: colors.neutral.ink.lightest,
|
|
256
|
+
textDecoration: 'none',
|
|
257
|
+
letterSpacing: '-0.006rem',
|
|
258
|
+
},
|
|
259
|
+
placeholderSmall: {
|
|
260
|
+
fontFamily: common.fontFamily,
|
|
261
|
+
fontStyle: 'normal',
|
|
262
|
+
fontWeight: 'normal',
|
|
263
|
+
fontSize: '12px',
|
|
264
|
+
lineHeight: '16px',
|
|
265
|
+
color: colors.neutral.ink.lightest,
|
|
266
|
+
textDecoration: 'none',
|
|
267
|
+
letterSpacing: '0',
|
|
268
|
+
},
|
|
269
|
+
placeholderCode: {
|
|
270
|
+
fontFamily: common.fontFamily,
|
|
271
|
+
fontStyle: 'normal',
|
|
272
|
+
fontWeight: 'normal',
|
|
273
|
+
fontSize: '14px',
|
|
274
|
+
lineHeight: '20px',
|
|
275
|
+
color: colors.neutral.ink.lightest,
|
|
276
|
+
textDecoration: 'none',
|
|
277
|
+
letterSpacing: '0.5rem',
|
|
278
|
+
},
|
|
279
|
+
placeholderCodeSmall: {
|
|
280
|
+
fontFamily: common.fontFamily,
|
|
281
|
+
fontStyle: 'normal',
|
|
282
|
+
fontWeight: 'normal',
|
|
283
|
+
fontSize: '12px',
|
|
284
|
+
lineHeight: '16px',
|
|
285
|
+
color: colors.neutral.ink.lightest,
|
|
286
|
+
textDecoration: 'none',
|
|
287
|
+
letterSpacing: '0.375rem',
|
|
288
|
+
},
|
|
289
|
+
error: {
|
|
290
|
+
fontFamily: common.fontFamily,
|
|
291
|
+
fontStyle: 'normal',
|
|
292
|
+
fontWeight: 600,
|
|
293
|
+
fontSize: '14px',
|
|
294
|
+
lineHeight: '20px',
|
|
295
|
+
color: colors.secondary.red.base,
|
|
296
|
+
textDecoration: 'none',
|
|
297
|
+
letterSpacing: '-0.006rem',
|
|
298
|
+
},
|
|
299
|
+
errorSmall: {
|
|
300
|
+
fontFamily: common.fontFamily,
|
|
301
|
+
fontStyle: 'normal',
|
|
302
|
+
fontWeight: 600,
|
|
303
|
+
fontSize: '12px',
|
|
304
|
+
lineHeight: '16px',
|
|
305
|
+
color: colors.secondary.red.base,
|
|
306
|
+
textDecoration: 'none',
|
|
307
|
+
letterSpacing: '0',
|
|
308
|
+
},
|
|
309
|
+
successSmall: {
|
|
310
|
+
fontFamily: common.fontFamily,
|
|
311
|
+
fontStyle: 'normal',
|
|
312
|
+
fontWeight: 600,
|
|
313
|
+
fontSize: '12px',
|
|
314
|
+
lineHeight: '16px',
|
|
315
|
+
color: colors.secondary.green.base,
|
|
316
|
+
textDecoration: 'none',
|
|
317
|
+
letterSpacing: '0',
|
|
318
|
+
},
|
|
319
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
import { Stack } from '../../components';
|
|
4
|
+
import { colors } from '../modules/colors';
|
|
5
|
+
import { Swatch } from './components';
|
|
6
|
+
|
|
7
|
+
<Meta title="Theme/Colors" />
|
|
8
|
+
|
|
9
|
+
# Colors
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
import { theme } from '@veeqo/components';
|
|
15
|
+
|
|
16
|
+
theme.colors.secondary.blue.base;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Color palettes
|
|
20
|
+
|
|
21
|
+
### Neutral
|
|
22
|
+
|
|
23
|
+
<table>
|
|
24
|
+
<thead>
|
|
25
|
+
<tr>
|
|
26
|
+
<th>Color</th>
|
|
27
|
+
<th>Lightest</th>
|
|
28
|
+
<th>Light</th>
|
|
29
|
+
<th>Base</th>
|
|
30
|
+
<th>Dark</th>
|
|
31
|
+
<th>Darkest</th>
|
|
32
|
+
</tr>
|
|
33
|
+
</thead>
|
|
34
|
+
<tbody>
|
|
35
|
+
{Object.keys(colors.neutral).map((color) => (
|
|
36
|
+
<tr key={color}>
|
|
37
|
+
<td>{color}</td>
|
|
38
|
+
<td>
|
|
39
|
+
<Swatch color={colors.neutral[color].lightest} />
|
|
40
|
+
</td>
|
|
41
|
+
<td>
|
|
42
|
+
<Swatch color={colors.neutral[color].light} />
|
|
43
|
+
</td>
|
|
44
|
+
<td>
|
|
45
|
+
<Swatch color={colors.neutral[color].base} />
|
|
46
|
+
</td>
|
|
47
|
+
<td>
|
|
48
|
+
<Swatch color={colors.neutral[color].dark} />
|
|
49
|
+
</td>
|
|
50
|
+
<td>
|
|
51
|
+
<Swatch color={colors.neutral[color].darkest} />
|
|
52
|
+
</td>
|
|
53
|
+
</tr>
|
|
54
|
+
))}
|
|
55
|
+
</tbody>
|
|
56
|
+
</table>
|
|
57
|
+
|
|
58
|
+
### Secondary
|
|
59
|
+
|
|
60
|
+
<table>
|
|
61
|
+
<thead>
|
|
62
|
+
<tr>
|
|
63
|
+
<th>Color</th>
|
|
64
|
+
<th>Lightest</th>
|
|
65
|
+
<th>Light</th>
|
|
66
|
+
<th>Base</th>
|
|
67
|
+
<th>Dark</th>
|
|
68
|
+
<th>Darkest</th>
|
|
69
|
+
</tr>
|
|
70
|
+
</thead>
|
|
71
|
+
<tbody>
|
|
72
|
+
{Object.keys(colors.secondary).map((color) => (
|
|
73
|
+
<tr key={color}>
|
|
74
|
+
<td>{color}</td>
|
|
75
|
+
<td>
|
|
76
|
+
<Swatch color={colors.secondary[color].lightest} />
|
|
77
|
+
</td>
|
|
78
|
+
<td>
|
|
79
|
+
<Swatch color={colors.secondary[color].light} />
|
|
80
|
+
</td>
|
|
81
|
+
<td>
|
|
82
|
+
<Swatch color={colors.secondary[color].base} />
|
|
83
|
+
</td>
|
|
84
|
+
<td>
|
|
85
|
+
<Swatch color={colors.secondary[color].dark} />
|
|
86
|
+
</td>
|
|
87
|
+
<td>
|
|
88
|
+
<Swatch color={colors.secondary[color].darkest} />
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
))}
|
|
92
|
+
</tbody>
|
|
93
|
+
</table>
|
|
94
|
+
|
|
95
|
+
### Brand
|
|
96
|
+
|
|
97
|
+
<table>
|
|
98
|
+
<thead>
|
|
99
|
+
<tr>
|
|
100
|
+
<th>Color</th>
|
|
101
|
+
<th>Lightest</th>
|
|
102
|
+
<th>Light</th>
|
|
103
|
+
<th>Base</th>
|
|
104
|
+
<th>Dark</th>
|
|
105
|
+
<th>Darkest</th>
|
|
106
|
+
</tr>
|
|
107
|
+
</thead>
|
|
108
|
+
<tbody>
|
|
109
|
+
{Object.keys(colors.brand).map((color) => (
|
|
110
|
+
<tr key={color}>
|
|
111
|
+
<td>{color}</td>
|
|
112
|
+
<td>
|
|
113
|
+
<Swatch color={colors.brand[color].lightest} />
|
|
114
|
+
</td>
|
|
115
|
+
<td>
|
|
116
|
+
<Swatch color={colors.brand[color].light} />
|
|
117
|
+
</td>
|
|
118
|
+
<td>
|
|
119
|
+
<Swatch color={colors.brand[color].base} />
|
|
120
|
+
</td>
|
|
121
|
+
<td>
|
|
122
|
+
<Swatch color={colors.brand[color].dark} />
|
|
123
|
+
</td>
|
|
124
|
+
<td>
|
|
125
|
+
<Swatch color={colors.brand[color].darkest} />
|
|
126
|
+
</td>
|
|
127
|
+
</tr>
|
|
128
|
+
))}
|
|
129
|
+
</tbody>
|
|
130
|
+
</table>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
import { Stack } from '../../components';
|
|
4
|
+
import { radius } from '../modules/radius';
|
|
5
|
+
import { colors } from '../modules/colors';
|
|
6
|
+
import { sizes } from '../modules/sizes';
|
|
7
|
+
|
|
8
|
+
<Meta title="Theme/Radius" parameters={{ previewTabs: { canvas: { hidden: true } } }} />
|
|
9
|
+
|
|
10
|
+
# Corner Radius
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```jsx
|
|
15
|
+
import { theme } from '@veeqo/components';
|
|
16
|
+
|
|
17
|
+
theme.radius.base;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Values
|
|
21
|
+
|
|
22
|
+
<Stack direction="horizontal" spacing="xxl">
|
|
23
|
+
{Object.keys(radius).map((value) => (
|
|
24
|
+
<Stack spacing="base" key={value}>
|
|
25
|
+
<Stack direction="horizontal" alignY="center">
|
|
26
|
+
<span style={{ fontWeight: 'bold' }}>{value}</span>
|
|
27
|
+
<div
|
|
28
|
+
style={{
|
|
29
|
+
backgroundColor: colors.neutral.ink.lightest,
|
|
30
|
+
width: '32px',
|
|
31
|
+
height: '32px',
|
|
32
|
+
borderRadius: radius[value],
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
</Stack>
|
|
36
|
+
<span>{radius[value]}</span>
|
|
37
|
+
</Stack>
|
|
38
|
+
))}
|
|
39
|
+
</Stack>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
import { Stack } from '../../components';
|
|
4
|
+
import { theme } from '../';
|
|
5
|
+
|
|
6
|
+
<Meta title="Theme/Shadows" parameters={{ previewTabs: { canvas: { hidden: true } } }} />
|
|
7
|
+
|
|
8
|
+
# Shadows
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```jsx
|
|
13
|
+
import { theme } from '@veeqo/components';
|
|
14
|
+
|
|
15
|
+
...
|
|
16
|
+
boxShadow: theme.shadows.base;
|
|
17
|
+
...
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Values
|
|
21
|
+
|
|
22
|
+
<Stack direction="horizontal" spacing="xxl">
|
|
23
|
+
{Object.keys(theme.shadows).map((value) => (
|
|
24
|
+
<Stack key={value}>
|
|
25
|
+
<span style={{ fontWeight: 'bold' }}>{value}</span>
|
|
26
|
+
<div
|
|
27
|
+
style={{
|
|
28
|
+
boxShadow: theme.shadows[value],
|
|
29
|
+
borderRadius: theme.radius.base,
|
|
30
|
+
backgroundColor: theme.colors.neutral.grey.light,
|
|
31
|
+
width: '32px',
|
|
32
|
+
height: '32px',
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
</Stack>
|
|
36
|
+
))}
|
|
37
|
+
</Stack>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
import { colors } from '../modules/colors';
|
|
4
|
+
import { sizes, sizeScale, sizeAliases } from '../modules/sizes';
|
|
5
|
+
|
|
6
|
+
import { Stack } from '../../components';
|
|
7
|
+
import { theme } from '../';
|
|
8
|
+
|
|
9
|
+
<Meta title="Theme/Sizes" parameters={{ previewTabs: { canvas: { hidden: true } } }} />
|
|
10
|
+
|
|
11
|
+
# Sizes
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
import { theme } from '@veeqo/components';
|
|
17
|
+
|
|
18
|
+
theme.sizes.base; // alias
|
|
19
|
+
theme.sizes[4]; // scale value
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Aliases
|
|
23
|
+
|
|
24
|
+
<Stack direction="horizontal" alignY="end">
|
|
25
|
+
<Stack alignX="center" spacing="sm">
|
|
26
|
+
<span style={{ fontWeight: 'bold' }}>Scale</span>
|
|
27
|
+
<span>Value</span>
|
|
28
|
+
<span>Alias</span>
|
|
29
|
+
</Stack>
|
|
30
|
+
{Object.keys(sizeAliases).map((size) => {
|
|
31
|
+
return (
|
|
32
|
+
<Stack alignX="center" spacing="sm" key={size}>
|
|
33
|
+
<div
|
|
34
|
+
style={{
|
|
35
|
+
width: sizes[size],
|
|
36
|
+
height: sizes[size],
|
|
37
|
+
backgroundColor: colors.neutral.ink.lightest,
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
<span style={{ fontWeight: 'bold' }}>{size}</span>
|
|
41
|
+
<span>{sizes[size]}</span>
|
|
42
|
+
</Stack>
|
|
43
|
+
);
|
|
44
|
+
})}
|
|
45
|
+
</Stack>
|
|
46
|
+
|
|
47
|
+
## Scale values
|
|
48
|
+
|
|
49
|
+
<Stack direction="horizontal" alignY="start">
|
|
50
|
+
<Stack direction="vertical">
|
|
51
|
+
<Stack direction="horizontal" alignY="end">
|
|
52
|
+
<Stack alignX="center" spacing="sm">
|
|
53
|
+
<span style={{ fontWeight: 'bold' }}>Scale</span>
|
|
54
|
+
<span>Value</span>
|
|
55
|
+
<span>Alias</span>
|
|
56
|
+
</Stack>
|
|
57
|
+
|
|
58
|
+
{Object.keys(sizeScale)
|
|
59
|
+
.slice(0, 10)
|
|
60
|
+
.map((size, index) => (
|
|
61
|
+
<>
|
|
62
|
+
<Stack alignX="center" spacing="sm" key={size}>
|
|
63
|
+
<div
|
|
64
|
+
style={{
|
|
65
|
+
width: sizes[size],
|
|
66
|
+
height: sizes[size],
|
|
67
|
+
backgroundColor: colors.neutral.ink.lightest,
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
<span style={{ fontWeight: 'bold' }}>{size}</span>
|
|
71
|
+
<span>{sizes[size]}</span>
|
|
72
|
+
</Stack>
|
|
73
|
+
</>
|
|
74
|
+
))}
|
|
75
|
+
</Stack>
|
|
76
|
+
|
|
77
|
+
<Stack direction="horizontal" alignY="end">
|
|
78
|
+
<Stack alignX="center" spacing="sm">
|
|
79
|
+
<span style={{ fontWeight: 'bold' }}>Scale</span>
|
|
80
|
+
<span>Value</span>
|
|
81
|
+
<span>Alias</span>
|
|
82
|
+
</Stack>
|
|
83
|
+
|
|
84
|
+
{Object.keys(sizeScale)
|
|
85
|
+
.slice(10)
|
|
86
|
+
.map((size, index) => (
|
|
87
|
+
<>
|
|
88
|
+
<Stack alignX="center" spacing="sm" key={size}>
|
|
89
|
+
<div
|
|
90
|
+
style={{
|
|
91
|
+
width: sizes[size],
|
|
92
|
+
height: sizes[size],
|
|
93
|
+
backgroundColor: colors.neutral.ink.lightest,
|
|
94
|
+
}}
|
|
95
|
+
/>
|
|
96
|
+
<span style={{ fontWeight: 'bold' }}>{size}</span>
|
|
97
|
+
<span>{sizes[size]}</span>
|
|
98
|
+
</Stack>
|
|
99
|
+
</>
|
|
100
|
+
))}
|
|
101
|
+
</Stack>
|
|
102
|
+
|
|
103
|
+
</Stack>
|
|
104
|
+
</Stack>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { theme } from '..';
|
|
3
|
+
|
|
4
|
+
export const Swatch = ({ color }: any) => (
|
|
5
|
+
<div
|
|
6
|
+
style={{ backgroundColor: color, padding: theme.sizes.base, borderRadius: theme.radius.base }}
|
|
7
|
+
>
|
|
8
|
+
<span
|
|
9
|
+
style={{
|
|
10
|
+
fontWeight: 'bold',
|
|
11
|
+
backgroundColor: 'rgba(255,255,255,0.5)',
|
|
12
|
+
padding: theme.sizes.line,
|
|
13
|
+
borderRadius: theme.radius.base,
|
|
14
|
+
}}
|
|
15
|
+
>
|
|
16
|
+
{color}
|
|
17
|
+
</span>
|
|
18
|
+
</div>
|
|
19
|
+
);
|