@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.
Files changed (64) hide show
  1. package/.nvmrc +1 -0
  2. package/.prettierrc +6 -0
  3. package/.storybook/main.ts +21 -0
  4. package/.storybook/preview.ts +9 -0
  5. package/.vscode/settings.json +11 -0
  6. package/lib/components/Loader/Grid.d.ts +10 -0
  7. package/lib/components/Loader/Loader.d.ts +3 -0
  8. package/lib/components/Loader/TailSpin.d.ts +10 -0
  9. package/lib/components/Loader/ThreeDots.d.ts +10 -0
  10. package/lib/components/Loader/index.d.ts +1 -0
  11. package/lib/components/Loader/loaderTypes.d.ts +8 -0
  12. package/lib/components/Stack/Alignments.d.ts +9 -0
  13. package/lib/components/Stack/Stack.d.ts +6 -0
  14. package/lib/components/Stack/index.d.ts +1 -0
  15. package/lib/components/Stack/types.d.ts +38 -0
  16. package/lib/components/index.d.ts +2 -0
  17. package/lib/index.d.ts +520 -0
  18. package/lib/index.esm.js +2 -0
  19. package/lib/index.esm.js.map +1 -0
  20. package/lib/index.js +2 -0
  21. package/lib/index.js.map +1 -0
  22. package/lib/theme/index.d.ts +454 -0
  23. package/lib/theme/modules/breakpoints.d.ts +7 -0
  24. package/lib/theme/modules/colors.d.ts +116 -0
  25. package/lib/theme/modules/layers.d.ts +6 -0
  26. package/lib/theme/modules/radius.d.ts +7 -0
  27. package/lib/theme/modules/shadows.d.ts +6 -0
  28. package/lib/theme/modules/sizes.d.ts +20 -0
  29. package/lib/theme/modules/text.d.ts +315 -0
  30. package/lib/theme/storybook/components.d.ts +2 -0
  31. package/package.json +52 -0
  32. package/rollup.config.mjs +49 -0
  33. package/src/components/Loader/Docs.mdx +26 -0
  34. package/src/components/Loader/Grid.tsx +113 -0
  35. package/src/components/Loader/Loader.stories.tsx +62 -0
  36. package/src/components/Loader/Loader.tsx +28 -0
  37. package/src/components/Loader/TailSpin.tsx +54 -0
  38. package/src/components/Loader/ThreeDots.tsx +90 -0
  39. package/src/components/Loader/__snapshots__/Loader.test.tsx.snap +73 -0
  40. package/src/components/Loader/index.ts +1 -0
  41. package/src/components/Loader/loaderTypes.ts +9 -0
  42. package/src/components/Stack/Alignments.ts +10 -0
  43. package/src/components/Stack/Docs.mdx +28 -0
  44. package/src/components/Stack/Stack.stories.tsx +112 -0
  45. package/src/components/Stack/Stack.tsx +61 -0
  46. package/src/components/Stack/__snapshots__/Stack.test.tsx.snap +45 -0
  47. package/src/components/Stack/index.ts +1 -0
  48. package/src/components/Stack/types.ts +73 -0
  49. package/src/components/index.ts +2 -0
  50. package/src/index.ts +2 -0
  51. package/src/theme/index.ts +18 -0
  52. package/src/theme/modules/breakpoints.ts +7 -0
  53. package/src/theme/modules/colors.ts +116 -0
  54. package/src/theme/modules/layers.ts +6 -0
  55. package/src/theme/modules/radius.ts +7 -0
  56. package/src/theme/modules/shadows.ts +6 -0
  57. package/src/theme/modules/sizes.ts +52 -0
  58. package/src/theme/modules/text.ts +319 -0
  59. package/src/theme/storybook/ColorDocs.mdx +130 -0
  60. package/src/theme/storybook/RadiusDocs.mdx +39 -0
  61. package/src/theme/storybook/ShadowDocs.mdx +37 -0
  62. package/src/theme/storybook/SizesDocs.mdx +104 -0
  63. package/src/theme/storybook/components.tsx +19 -0
  64. package/tsconfig.json +23 -0
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v18.17.1
package/.prettierrc ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "printWidth": 100,
3
+ "singleQuote": true,
4
+ "tabWidth": 2,
5
+ "trailingComma": "all"
6
+ }
@@ -0,0 +1,21 @@
1
+ import type { StorybookConfig } from '@storybook/react-vite';
2
+
3
+ const config: StorybookConfig = {
4
+ stories: ['../src/**/*Docs.mdx', '../src/**/*stories.tsx'],
5
+ addons: [
6
+ '@storybook/addon-links',
7
+ '@storybook/addon-essentials',
8
+ '@storybook/addon-onboarding',
9
+ '@storybook/addon-interactions',
10
+ ],
11
+ framework: {
12
+ name: '@storybook/react-vite',
13
+ options: {},
14
+ },
15
+ typescript: {
16
+ reactDocgen: 'react-docgen',
17
+ skipBabel: true,
18
+ check: false,
19
+ },
20
+ };
21
+ export default config;
@@ -0,0 +1,9 @@
1
+ import type { Preview } from '@storybook/react';
2
+
3
+ const preview: Preview = {
4
+ parameters: {
5
+ actions: { argTypesRegex: '^on[A-Z].*' },
6
+ },
7
+ };
8
+
9
+ export default preview;
@@ -0,0 +1,11 @@
1
+ {
2
+ "editor.formatOnSave": true,
3
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
4
+ "prettier.enable": true,
5
+ "[typescriptreact]": {
6
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
7
+ },
8
+ "[typescript]": {
9
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
10
+ }
11
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface GridProps {
3
+ width?: number;
4
+ height?: number;
5
+ className?: string;
6
+ color?: string;
7
+ label?: string;
8
+ }
9
+ declare const Grid: ({ width, height, className, color, label }: GridProps) => React.JSX.Element;
10
+ export default Grid;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { LoaderProps } from './loaderTypes';
3
+ export declare const Loader: ({ className, height, width, color, type, }: LoaderProps) => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface TailSpinProps {
3
+ width?: number;
4
+ height?: number;
5
+ className?: string;
6
+ color?: string;
7
+ label?: string;
8
+ }
9
+ declare const TailSpin: ({ width, height, className, color, label }: TailSpinProps) => React.JSX.Element;
10
+ export default TailSpin;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface ThreeDotsProps {
3
+ width?: number;
4
+ height?: number;
5
+ className?: string;
6
+ color?: string;
7
+ label?: string;
8
+ }
9
+ declare const ThreeDots: ({ width, height, className, color, label }: ThreeDotsProps) => React.JSX.Element;
10
+ export default ThreeDots;
@@ -0,0 +1 @@
1
+ export { Loader } from './Loader';
@@ -0,0 +1,8 @@
1
+ export type LoaderType = 'Grid' | 'TailSpin' | 'ThreeDots';
2
+ export interface LoaderProps {
3
+ className?: string;
4
+ height?: number;
5
+ width?: number;
6
+ color?: string;
7
+ type?: LoaderType;
8
+ }
@@ -0,0 +1,9 @@
1
+ declare enum Alignments {
2
+ start = "flex-start",
3
+ center = "center",
4
+ end = "flex-end",
5
+ stretch = "stretch",
6
+ between = "space-between",
7
+ around = "space-around"
8
+ }
9
+ export default Alignments;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { StackProps } from './types';
3
+ /**
4
+ * Layout component.
5
+ */
6
+ export declare const Stack: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StackProps>>;
@@ -0,0 +1 @@
1
+ export { Stack } from './Stack';
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ import Alignments from './Alignments';
3
+ type Alignment = keyof typeof Alignments;
4
+ declare enum SizeAlias {
5
+ none = "none",
6
+ line = "line",
7
+ xs = "xs",
8
+ sm = "sm",
9
+ base = "base",
10
+ md = "md",
11
+ lg = "lg",
12
+ xl = "xl",
13
+ xxl = "xxl"
14
+ }
15
+ export type SizeScaleIndex = number | keyof typeof SizeAlias;
16
+ export type SizeScale = {
17
+ [index: number]: string;
18
+ [index: string]: string;
19
+ };
20
+ export declare const sizeScale: SizeScale;
21
+ export declare const sizeAliases: SizeScale;
22
+ declare const sizes: SizeScale;
23
+ export type Size = keyof typeof sizes;
24
+ export type StackProps = {
25
+ children: ReactNode;
26
+ /**
27
+ * Classname for description
28
+ */
29
+ className?: string;
30
+ /**
31
+ * Direction of component
32
+ */
33
+ direction?: 'vertical' | 'horizontal';
34
+ alignX?: Alignment;
35
+ alignY?: Alignment;
36
+ spacing?: Size;
37
+ };
38
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Loader } from './Loader';
2
+ export { Stack } from './Stack';
package/lib/index.d.ts ADDED
@@ -0,0 +1,520 @@
1
+ /// <reference types="react" />
2
+ import * as react from 'react';
3
+ import react__default, { ReactNode } from 'react';
4
+ import * as styled_components from 'styled-components';
5
+ import * as styled_components_dist_types from 'styled-components/dist/types';
6
+
7
+ type LoaderType = 'Grid' | 'TailSpin' | 'ThreeDots';
8
+ interface LoaderProps {
9
+ className?: string;
10
+ height?: number;
11
+ width?: number;
12
+ color?: string;
13
+ type?: LoaderType;
14
+ }
15
+
16
+ declare const Loader: ({ className, height, width, color, type, }: LoaderProps) => react__default.JSX.Element;
17
+
18
+ declare enum Alignments {
19
+ start = "flex-start",
20
+ center = "center",
21
+ end = "flex-end",
22
+ stretch = "stretch",
23
+ between = "space-between",
24
+ around = "space-around"
25
+ }
26
+
27
+ type Alignment = keyof typeof Alignments;
28
+ type SizeScale$1 = {
29
+ [index: number]: string;
30
+ [index: string]: string;
31
+ };
32
+ declare const sizes: SizeScale$1;
33
+ type Size = keyof typeof sizes;
34
+ type StackProps = {
35
+ children: ReactNode;
36
+ /**
37
+ * Classname for description
38
+ */
39
+ className?: string;
40
+ /**
41
+ * Direction of component
42
+ */
43
+ direction?: 'vertical' | 'horizontal';
44
+ alignX?: Alignment;
45
+ alignY?: Alignment;
46
+ spacing?: Size;
47
+ };
48
+
49
+ /**
50
+ * Layout component.
51
+ */
52
+ declare const Stack: styled_components.IStyledComponent<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StackProps>>;
53
+
54
+ type SizeScale = {
55
+ [index: number]: string;
56
+ [index: string]: string;
57
+ };
58
+
59
+ declare enum shadows {
60
+ sm = "0px 1px 3px rgba(55, 66, 77, 0.15)",
61
+ base = "0px 4px 6px rgba(27, 33, 38, 0.2)",
62
+ md = "0px 10px 15px rgba(27, 33, 38, 0.2)",
63
+ lg = "0px 20px 25px rgba(27, 33, 38, 0.2)"
64
+ }
65
+
66
+ declare const theme: {
67
+ breakpoints: {
68
+ readonly mobile: "640px";
69
+ readonly tablet: "720px";
70
+ readonly lgTablet: "960px";
71
+ readonly desktop: "1280px";
72
+ readonly lgDesktop: "1440px";
73
+ };
74
+ colors: {
75
+ brand: {
76
+ blue: {
77
+ lightest: string;
78
+ light: string;
79
+ base: string;
80
+ dark: string;
81
+ darkest: string;
82
+ };
83
+ peach: {
84
+ lightest: string;
85
+ light: string;
86
+ base: string;
87
+ dark: string;
88
+ darkest: string;
89
+ };
90
+ };
91
+ neutral: {
92
+ ink: {
93
+ lightest: string;
94
+ light: string;
95
+ base: string;
96
+ dark: string;
97
+ };
98
+ grey: {
99
+ lightest: string;
100
+ light: string;
101
+ base: string;
102
+ dark: string;
103
+ };
104
+ greyBlue: {
105
+ lightest: string;
106
+ light: string;
107
+ base: string;
108
+ dark: string;
109
+ };
110
+ };
111
+ secondary: {
112
+ red: {
113
+ lightest: string;
114
+ light: string;
115
+ base: string;
116
+ dark: string;
117
+ darkest: string;
118
+ };
119
+ yellow: {
120
+ lightest: string;
121
+ light: string;
122
+ base: string;
123
+ dark: string;
124
+ darkest: string;
125
+ };
126
+ green: {
127
+ lightest: string;
128
+ light: string;
129
+ base: string;
130
+ dark: string;
131
+ darkest: string;
132
+ };
133
+ lime: {
134
+ lightest: string;
135
+ light: string;
136
+ base: string;
137
+ dark: string;
138
+ darkest: string;
139
+ };
140
+ teal: {
141
+ lightest: string;
142
+ light: string;
143
+ base: string;
144
+ dark: string;
145
+ darkest: string;
146
+ };
147
+ aqua: {
148
+ lightest: string;
149
+ light: string;
150
+ base: string;
151
+ dark: string;
152
+ darkest: string;
153
+ };
154
+ purple: {
155
+ lightest: string;
156
+ light: string;
157
+ base: string;
158
+ dark: string;
159
+ darkest: string;
160
+ };
161
+ blue: {
162
+ lightest: string;
163
+ light: string;
164
+ base: string;
165
+ dark: string;
166
+ darkest: string;
167
+ };
168
+ pink: {
169
+ lightest: string;
170
+ light: string;
171
+ base: string;
172
+ dark: string;
173
+ darkest: string;
174
+ };
175
+ orange: {
176
+ lightest: string;
177
+ light: string;
178
+ base: string;
179
+ dark: string;
180
+ darkest: string;
181
+ };
182
+ };
183
+ system: {
184
+ scrollbar: {
185
+ thumb: string;
186
+ background: string;
187
+ };
188
+ };
189
+ };
190
+ layers: {
191
+ base: number;
192
+ popup: number;
193
+ modal: number;
194
+ tooltip: number;
195
+ };
196
+ radius: {
197
+ sm: string;
198
+ base: string;
199
+ md: string;
200
+ lg: string;
201
+ full: string;
202
+ };
203
+ shadows: typeof shadows;
204
+ sizes: SizeScale;
205
+ text: {
206
+ headingXXL: {
207
+ fontFamily: string;
208
+ fontStyle: string;
209
+ fontWeight: number;
210
+ fontSize: string;
211
+ lineHeight: string;
212
+ color: string;
213
+ textDecoration: string;
214
+ letterSpacing: string;
215
+ };
216
+ headingXL: {
217
+ fontFamily: string;
218
+ fontStyle: string;
219
+ fontWeight: number;
220
+ fontSize: string;
221
+ lineHeight: string;
222
+ color: string;
223
+ textDecoration: string;
224
+ letterSpacing: string;
225
+ };
226
+ headingLarge: {
227
+ fontFamily: string;
228
+ fontStyle: string;
229
+ fontWeight: number;
230
+ fontSize: string;
231
+ lineHeight: string;
232
+ color: string;
233
+ textDecoration: string;
234
+ letterSpacing: string;
235
+ };
236
+ headingMedium: {
237
+ fontFamily: string;
238
+ fontStyle: string;
239
+ fontWeight: number;
240
+ fontSize: string;
241
+ lineHeight: string;
242
+ color: string;
243
+ textDecoration: string;
244
+ letterSpacing: string;
245
+ };
246
+ headingSmall: {
247
+ fontFamily: string;
248
+ fontStyle: string;
249
+ fontWeight: number;
250
+ fontSize: string;
251
+ lineHeight: string;
252
+ color: string;
253
+ textDecoration: string;
254
+ letterSpacing: string;
255
+ };
256
+ headingTable: {
257
+ fontFamily: string;
258
+ fontStyle: string;
259
+ fontWeight: number;
260
+ fontSize: string;
261
+ lineHeight: string;
262
+ color: string;
263
+ textDecoration: string;
264
+ letterSpacing: string;
265
+ };
266
+ subheadingLarge: {
267
+ fontFamily: string;
268
+ fontStyle: string;
269
+ fontWeight: string;
270
+ fontSize: string;
271
+ lineHeight: string;
272
+ color: string;
273
+ textDecoration: string;
274
+ letterSpacing: string;
275
+ };
276
+ subheadingMedium: {
277
+ fontFamily: string;
278
+ fontStyle: string;
279
+ fontWeight: string;
280
+ fontSize: string;
281
+ lineHeight: string;
282
+ color: string;
283
+ textDecoration: string;
284
+ letterSpacing: string;
285
+ };
286
+ subheadingSmall: {
287
+ fontFamily: string;
288
+ fontStyle: string;
289
+ fontWeight: string;
290
+ fontSize: string;
291
+ lineHeight: string;
292
+ color: string;
293
+ textDecoration: string;
294
+ letterSpacing: string;
295
+ };
296
+ subheadingSmallBold: {
297
+ fontFamily: string;
298
+ fontStyle: string;
299
+ fontWeight: number;
300
+ fontSize: string;
301
+ lineHeight: string;
302
+ color: string;
303
+ textDecoration: string;
304
+ letterSpacing: string;
305
+ };
306
+ body: {
307
+ fontFamily: string;
308
+ fontStyle: string;
309
+ fontWeight: string;
310
+ fontSize: string;
311
+ lineHeight: string;
312
+ color: string;
313
+ textDecoration: string;
314
+ letterSpacing: string;
315
+ };
316
+ bodySmall: {
317
+ fontFamily: string;
318
+ fontStyle: string;
319
+ fontWeight: string;
320
+ fontSize: string;
321
+ lineHeight: string;
322
+ color: string;
323
+ textDecoration: string;
324
+ letterSpacing: string;
325
+ };
326
+ bodyBold: {
327
+ fontFamily: string;
328
+ fontStyle: string;
329
+ fontWeight: number;
330
+ fontSize: string;
331
+ lineHeight: string;
332
+ color: string;
333
+ textDecoration: string;
334
+ letterSpacing: string;
335
+ };
336
+ bodyBoldDark: {
337
+ fontFamily: string;
338
+ fontStyle: string;
339
+ fontWeight: number;
340
+ fontSize: string;
341
+ lineHeight: string;
342
+ color: string;
343
+ textDecoration: string;
344
+ letterSpacing: string;
345
+ };
346
+ bodySmallBold: {
347
+ fontFamily: string;
348
+ fontStyle: string;
349
+ fontWeight: number;
350
+ fontSize: string;
351
+ lineHeight: string;
352
+ color: string;
353
+ textDecoration: string;
354
+ letterSpacing: string;
355
+ };
356
+ button: {
357
+ fontFamily: string;
358
+ fontStyle: string;
359
+ fontWeight: number;
360
+ fontSize: string;
361
+ lineHeight: string;
362
+ color: string;
363
+ textDecoration: string;
364
+ letterSpacing: string;
365
+ };
366
+ buttonSmall: {
367
+ fontFamily: string;
368
+ fontStyle: string;
369
+ fontWeight: number;
370
+ fontSize: string;
371
+ lineHeight: string;
372
+ color: string;
373
+ textDecoration: string;
374
+ letterSpacing: string;
375
+ };
376
+ linkLarge: {
377
+ fontFamily: string;
378
+ fontStyle: string;
379
+ fontWeight: string;
380
+ fontSize: string;
381
+ lineHeight: string;
382
+ color: string;
383
+ textDecoration: string;
384
+ letterSpacing: string;
385
+ };
386
+ linkMedium: {
387
+ fontFamily: string;
388
+ fontStyle: string;
389
+ fontWeight: string;
390
+ fontSize: string;
391
+ lineHeight: string;
392
+ color: string;
393
+ textDecoration: string;
394
+ letterSpacing: string;
395
+ };
396
+ link: {
397
+ fontFamily: string;
398
+ fontStyle: string;
399
+ fontWeight: string;
400
+ fontSize: string;
401
+ lineHeight: string;
402
+ color: string;
403
+ textDecoration: string;
404
+ letterSpacing: string;
405
+ };
406
+ linkSmall: {
407
+ fontFamily: string;
408
+ fontStyle: string;
409
+ fontWeight: string;
410
+ fontSize: string;
411
+ lineHeight: string;
412
+ color: string;
413
+ textDecoration: string;
414
+ letterSpacing: string;
415
+ };
416
+ inputLabel: {
417
+ fontFamily: string;
418
+ fontStyle: string;
419
+ fontWeight: number;
420
+ fontSize: string;
421
+ lineHeight: string;
422
+ color: string;
423
+ textDecoration: string;
424
+ letterSpacing: string;
425
+ };
426
+ inputLabelSmall: {
427
+ fontFamily: string;
428
+ fontStyle: string;
429
+ fontWeight: number;
430
+ fontSize: string;
431
+ lineHeight: string;
432
+ color: string;
433
+ textDecoration: string;
434
+ letterSpacing: string;
435
+ };
436
+ hintText: {
437
+ fontFamily: string;
438
+ fontStyle: string;
439
+ fontWeight: string;
440
+ fontSize: string;
441
+ lineHeight: string;
442
+ color: string;
443
+ textDecoration: string;
444
+ letterSpacing: string;
445
+ };
446
+ placeholder: {
447
+ fontFamily: string;
448
+ fontStyle: string;
449
+ fontWeight: string;
450
+ fontSize: string;
451
+ lineHeight: string;
452
+ color: string;
453
+ textDecoration: string;
454
+ letterSpacing: string;
455
+ };
456
+ placeholderSmall: {
457
+ fontFamily: string;
458
+ fontStyle: string;
459
+ fontWeight: string;
460
+ fontSize: string;
461
+ lineHeight: string;
462
+ color: string;
463
+ textDecoration: string;
464
+ letterSpacing: string;
465
+ };
466
+ placeholderCode: {
467
+ fontFamily: string;
468
+ fontStyle: string;
469
+ fontWeight: string;
470
+ fontSize: string;
471
+ lineHeight: string;
472
+ color: string;
473
+ textDecoration: string;
474
+ letterSpacing: string;
475
+ };
476
+ placeholderCodeSmall: {
477
+ fontFamily: string;
478
+ fontStyle: string;
479
+ fontWeight: string;
480
+ fontSize: string;
481
+ lineHeight: string;
482
+ color: string;
483
+ textDecoration: string;
484
+ letterSpacing: string;
485
+ };
486
+ error: {
487
+ fontFamily: string;
488
+ fontStyle: string;
489
+ fontWeight: number;
490
+ fontSize: string;
491
+ lineHeight: string;
492
+ color: string;
493
+ textDecoration: string;
494
+ letterSpacing: string;
495
+ };
496
+ errorSmall: {
497
+ fontFamily: string;
498
+ fontStyle: string;
499
+ fontWeight: number;
500
+ fontSize: string;
501
+ lineHeight: string;
502
+ color: string;
503
+ textDecoration: string;
504
+ letterSpacing: string;
505
+ };
506
+ successSmall: {
507
+ fontFamily: string;
508
+ fontStyle: string;
509
+ fontWeight: number;
510
+ fontSize: string;
511
+ lineHeight: string;
512
+ color: string;
513
+ textDecoration: string;
514
+ letterSpacing: string;
515
+ };
516
+ };
517
+ fontFamily: string;
518
+ };
519
+
520
+ export { Loader, Stack, theme };