@everlywell/ui-kit 0.0.2 → 0.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.
Files changed (31) hide show
  1. package/index.d.mts +13 -2
  2. package/index.d.ts +13 -2
  3. package/index.js +104 -1
  4. package/index.mjs +2927 -181
  5. package/lib/components/Fonts/Fonts.d.ts +2 -0
  6. package/lib/components/Fonts/index.d.ts +1 -0
  7. package/lib/components/ThemeProvider/ThemeProvider.d.ts +5 -0
  8. package/lib/components/ThemeProvider/index.d.ts +1 -0
  9. package/lib/theme/{forms/Button/config.d.ts → actions/Button/Button.config.d.ts} +26 -14
  10. package/lib/theme/actions/IconButton/IconButton.d.ts +11 -0
  11. package/lib/theme/actions/Menu/Menu.config.d.ts +92 -0
  12. package/lib/theme/actions/Menu/Menu.d.ts +3 -0
  13. package/lib/theme/foundations/colors.d.ts +39 -50
  14. package/lib/theme/index.d.ts +429 -112
  15. package/lib/theme/layout/Box/Box.d.ts +3 -0
  16. package/lib/theme/layout/Grid/Grid.d.ts +48 -0
  17. package/lib/theme/layout/Grid/GridItem.d.ts +5 -0
  18. package/lib/theme/layout/Grid/index.d.ts +2 -0
  19. package/lib/theme/layout/Show-Hide/Show-Hide.d.ts +5 -0
  20. package/lib/theme/media/Icon/Icon.config.d.ts +21 -0
  21. package/lib/theme/media/Icon/Icon.d.ts +14 -0
  22. package/lib/theme/navigation/Link/Link.config.d.ts +31 -0
  23. package/lib/theme/navigation/Link/Link.d.ts +3 -0
  24. package/lib/theme/overlay/Drawer/Drawer.config.d.ts +72 -0
  25. package/lib/theme/overlay/Drawer/Drawer.d.ts +3 -0
  26. package/lib/theme/typography/Heading/Heading.config.d.ts +48 -0
  27. package/lib/theme/typography/Heading/Heading.d.ts +3 -0
  28. package/lib/theme/typography/Text/Text.config.d.ts +37 -0
  29. package/lib/theme/typography/Text/Text.d.ts +3 -0
  30. package/package.json +12 -1
  31. /package/lib/theme/{forms → actions}/Button/Button.d.ts +0 -0
@@ -1,4 +1,11 @@
1
1
  export declare const theme: {
2
+ breakpoints: {
3
+ mobile: string;
4
+ tablet: string;
5
+ largeTablet: string;
6
+ desktop: string;
7
+ largeDesktop: string;
8
+ };
2
9
  fonts: {
3
10
  body: string;
4
11
  heading: string;
@@ -8,12 +15,16 @@ export declare const theme: {
8
15
  thin: string;
9
16
  xlight: string;
10
17
  light: string;
11
- book: string;
12
- regular: string;
18
+ normal: string;
19
+ medium: string;
20
+ semiBold: string;
13
21
  bold: string;
14
22
  xbold: string;
23
+ black: string;
15
24
  };
16
25
  fontSizes: {
26
+ '3xs': string;
27
+ '2xs': string;
17
28
  xs: string;
18
29
  sm: string;
19
30
  md: string;
@@ -22,17 +33,29 @@ export declare const theme: {
22
33
  '2xl': string;
23
34
  '3xl': string;
24
35
  '4xl': string;
36
+ '5xl': string;
37
+ '6xl': string;
38
+ '7xl': string;
39
+ '9xl': string;
40
+ '10xl': string;
41
+ '11xl': string;
25
42
  };
26
43
  letterSpacings: {
27
- tightest: string;
44
+ tighter: string;
28
45
  tight: string;
29
46
  normal: string;
30
47
  wide: string;
48
+ wider: string;
31
49
  widest: string;
32
50
  };
33
51
  lineHeights: {
34
- body: string;
35
- button: string;
52
+ body: number;
53
+ normal: string;
54
+ none: number;
55
+ shorter: number;
56
+ short: number;
57
+ base: number;
58
+ tall: number;
36
59
  };
37
60
  sizes: {
38
61
  max: string;
@@ -41,23 +64,57 @@ export declare const theme: {
41
64
  };
42
65
  space: {
43
66
  /**
44
- * TODO: figure out best way to define spacing
45
- * maybe do something like this?
46
- * 0, 0.125, 0.25, 0.5, 0.75, 1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10
47
- * 0, 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 80, 96, 128, 160
67
+ * Base unit: 4px
68
+ * 1 rem = 16px
69
+ *
70
+ * Mental model:
71
+ *
72
+ * If you need a spacing of 40px, divide it by 4.
73
+ * That'll give you 10. Then use it in your component.
48
74
  */
49
75
  0: number;
76
+ 0.5: string;
50
77
  1: string;
78
+ 1.5: string;
51
79
  2: string;
52
80
  3: string;
53
81
  4: string;
54
82
  5: string;
55
83
  6: string;
56
- 7: string;
57
84
  8: string;
58
- 9: string;
59
85
  10: string;
60
- 11: string;
86
+ 12: string;
87
+ 16: string;
88
+ 20: string;
89
+ };
90
+ shadows: {
91
+ xs: string;
92
+ sm: string;
93
+ base: string;
94
+ md: string;
95
+ lg: string;
96
+ xl: string;
97
+ '2xl': string;
98
+ outline: string;
99
+ inner: string;
100
+ none: string;
101
+ 'dark-lg': string;
102
+ dialog: string;
103
+ };
104
+ zIndices: {
105
+ hide: number;
106
+ auto: string;
107
+ base: number;
108
+ docked: number;
109
+ dropdown: number;
110
+ sticky: number;
111
+ banner: number;
112
+ overlay: number;
113
+ modal: number;
114
+ popover: number;
115
+ skipLink: number;
116
+ toast: number;
117
+ tooltip: number;
61
118
  };
62
119
  colors: {
63
120
  white: {
@@ -73,29 +130,18 @@ export declare const theme: {
73
130
  800: string;
74
131
  900: string;
75
132
  };
76
- black: {
77
- base: string;
78
- 50: string;
79
- 100: string;
80
- 200: string;
81
- 300: string;
82
- 400: string;
83
- 500: string;
84
- 600: string;
85
- 700: string;
86
- 800: string;
87
- 900: string;
88
- };
89
- grayscale: {
133
+ tints: {
134
+ black: string;
90
135
  darkGrey: string;
91
- grey: string;
92
- mediumGrey: string;
136
+ uiGrey: string;
137
+ medGrey: string;
93
138
  lightGrey: string;
94
139
  darkCream: string;
95
140
  cream: string;
96
141
  lightCream: string;
142
+ white: string;
97
143
  };
98
- red: {
144
+ viridian: {
99
145
  50: string;
100
146
  100: string;
101
147
  200: string;
@@ -106,20 +152,20 @@ export declare const theme: {
106
152
  700: string;
107
153
  800: string;
108
154
  900: string;
109
- wash: string;
110
- lighter: string;
111
- light: string;
112
- base: string;
113
155
  dark: string;
114
- };
115
- yellow: {
116
- wash: string;
117
- lighter: string;
118
- light: string;
119
156
  base: string;
157
+ light: string;
158
+ lighter: string;
159
+ wash: string;
160
+ };
161
+ sunshine: {
120
162
  dark: string;
163
+ base: string;
164
+ light: string;
165
+ lighter: string;
166
+ wash: string;
121
167
  };
122
- green: {
168
+ terracotta: {
123
169
  50: string;
124
170
  100: string;
125
171
  200: string;
@@ -130,39 +176,39 @@ export declare const theme: {
130
176
  700: string;
131
177
  800: string;
132
178
  900: string;
133
- wash: string;
134
- lighter: string;
135
- light: string;
136
- base: string;
137
179
  dark: string;
138
- };
139
- lightBlue: {
140
- wash: string;
141
- lighter: string;
142
- light: string;
143
180
  base: string;
144
- dark: string;
145
- };
146
- blue: {
147
- wash: string;
148
- lighter: string;
149
181
  light: string;
150
- base: string;
151
- dark: string;
152
- };
153
- indigo: {
154
- wash: string;
155
182
  lighter: string;
156
- light: string;
157
- base: string;
158
- dark: string;
183
+ wash: string;
159
184
  };
160
185
  violet: {
161
- wash: string;
186
+ dark: string;
187
+ base: string;
188
+ light: string;
162
189
  lighter: string;
190
+ wash: string;
191
+ };
192
+ eggplant: {
193
+ dark: string;
194
+ base: string;
163
195
  light: string;
196
+ lighter: string;
197
+ wash: string;
198
+ };
199
+ moonlight: {
200
+ dark: string;
164
201
  base: string;
202
+ light: string;
203
+ lighter: string;
204
+ wash: string;
205
+ };
206
+ sky: {
165
207
  dark: string;
208
+ base: string;
209
+ light: string;
210
+ lighter: string;
211
+ wash: string;
166
212
  };
167
213
  };
168
214
  components: {
@@ -180,21 +226,30 @@ export declare const theme: {
180
226
  } | undefined;
181
227
  sizes?: {
182
228
  sm: {
183
- fontSize: string;
229
+ fontSize: ("md" | "lg")[];
184
230
  px: number[];
185
231
  py: number[];
186
- '.chakra-button__icon > svg': {
187
- width: string;
188
- height: string;
232
+ '&:has(> svg:only-child)': {
233
+ px: number;
234
+ py: number;
235
+ svg: {
236
+ fontSize: string;
237
+ };
238
+ };
239
+ svg: {
240
+ fontSize: string;
189
241
  };
190
242
  };
191
243
  md: {
192
- fontSize: string;
244
+ fontSize: ("lg" | "xl")[];
193
245
  px: number[];
194
246
  py: number[];
247
+ '&:has(> svg:only-child)': {
248
+ px: number[];
249
+ py: number[];
250
+ };
195
251
  svg: {
196
- width: ("1.25rem" | "1.5rem")[];
197
- height: ("1.25rem" | "1.5rem")[];
252
+ fontSize: ("1.5rem" | "1.25rem")[];
198
253
  };
199
254
  };
200
255
  wide: {
@@ -202,14 +257,17 @@ export declare const theme: {
202
257
  px: number;
203
258
  py: number;
204
259
  width: string;
205
- '.chakra-button__icon > svg': {
206
- width: string;
207
- height: string;
260
+ '&:has(> svg:only-child)': {
261
+ px: number;
262
+ py: number;
263
+ };
264
+ svg: {
265
+ fontSize: string;
208
266
  };
209
267
  };
210
268
  } | undefined;
211
269
  variants?: {
212
- solid: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
270
+ primary: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
213
271
  bg: string;
214
272
  color: string;
215
273
  ':hover, &.hover': {
@@ -223,7 +281,7 @@ export declare const theme: {
223
281
  color: string;
224
282
  };
225
283
  };
226
- outline: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
284
+ secondary: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
227
285
  color: string;
228
286
  boxShadow: (theme: Record<string, any>) => string;
229
287
  ':hover, &.hover': {
@@ -242,27 +300,309 @@ export declare const theme: {
242
300
  };
243
301
  } | undefined;
244
302
  defaultProps?: {
245
- size?: "sm" | "md" | "wide" | undefined;
246
- variant?: "outline" | "solid" | undefined;
303
+ size?: "wide" | "sm" | "md" | undefined;
304
+ variant?: "primary" | "secondary" | undefined;
247
305
  colorScheme?: string | undefined;
248
306
  } | undefined;
249
307
  };
308
+ Drawer: {
309
+ baseStyle?: {
310
+ overlay: {
311
+ zIndex: string;
312
+ bg: (theme: Record<string, any>) => string;
313
+ };
314
+ dialogContainer: {
315
+ zIndex: string;
316
+ };
317
+ dialog: {
318
+ bg: string;
319
+ pt: number[];
320
+ display: string;
321
+ flexDirection: string;
322
+ alignItems: string;
323
+ gap: number;
324
+ boxShadow: string;
325
+ };
326
+ header: {
327
+ px: number;
328
+ display: string;
329
+ flexDirection: string;
330
+ justifyContent: string;
331
+ alignItems: string;
332
+ };
333
+ closeButton: {
334
+ bg: string;
335
+ borderRadius: string;
336
+ p: number;
337
+ _hover: {
338
+ bg: string;
339
+ };
340
+ '& .chakra-icon': {
341
+ p: number;
342
+ };
343
+ };
344
+ body: {
345
+ px: number;
346
+ flexGrow: number;
347
+ };
348
+ footer: {
349
+ py: number;
350
+ px: number;
351
+ };
352
+ } | undefined;
353
+ sizes?: {
354
+ partial: {
355
+ dialog: {
356
+ maxW: number;
357
+ };
358
+ };
359
+ full: {
360
+ dialog: {
361
+ maxW: string;
362
+ minH: string;
363
+ borderRadius: number;
364
+ };
365
+ };
366
+ } | undefined;
367
+ variants?: {
368
+ [key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
369
+ keys: ("body" | "dialog" | "footer" | "header" | "overlay" | "dialogContainer" | "closeButton")[];
370
+ }>;
371
+ } | undefined;
372
+ defaultProps?: {
373
+ size?: "full" | "partial" | undefined;
374
+ variant?: string | number | undefined;
375
+ colorScheme?: string | undefined;
376
+ } | undefined;
377
+ parts: ("body" | "dialog" | "footer" | "header" | "overlay" | "dialogContainer" | "closeButton")[];
378
+ };
379
+ Heading: {
380
+ baseStyle?: {
381
+ fontFamily: string;
382
+ fontWeight: string;
383
+ color: string;
384
+ } | undefined;
385
+ sizes?: {
386
+ '3xl': {
387
+ fontSize: ("6xl" | "11xl")[];
388
+ lineHeight: string;
389
+ };
390
+ '2xl': {
391
+ fontSize: ("6xl" | "9xl")[];
392
+ lineHeight: string;
393
+ };
394
+ xl: {
395
+ fontSize: ("4xl" | "7xl")[];
396
+ lineHeight: string;
397
+ };
398
+ lg: {
399
+ fontFamily: string;
400
+ fontWeight: string;
401
+ fontSize: ("3xl" | "6xl")[];
402
+ lineHeight: string;
403
+ };
404
+ md: {
405
+ fontFamily: string;
406
+ fontWeight: string;
407
+ fontSize: ("2xl" | "4xl")[];
408
+ lineHeight: string;
409
+ };
410
+ sm: {
411
+ fontFamily: string;
412
+ fontWeight: string;
413
+ fontSize: ("lg" | "3xl")[];
414
+ lineHeight: string;
415
+ };
416
+ } | undefined;
417
+ variants?: {
418
+ [key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
419
+ } | undefined;
420
+ defaultProps?: {
421
+ size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined;
422
+ variant?: string | number | undefined;
423
+ colorScheme?: string | undefined;
424
+ } | undefined;
425
+ };
426
+ Icon: {
427
+ baseStyle?: {} | undefined;
428
+ sizes?: {
429
+ sm: {
430
+ fontSize: string;
431
+ };
432
+ md: {
433
+ fontSize: string;
434
+ };
435
+ lg: {
436
+ fontSize: string;
437
+ };
438
+ } | undefined;
439
+ variants?: {} | undefined;
440
+ defaultProps?: {
441
+ size?: "sm" | "md" | "lg" | undefined;
442
+ variant?: undefined;
443
+ colorScheme?: string | undefined;
444
+ } | undefined;
445
+ };
446
+ Link: {
447
+ baseStyle?: {
448
+ color: string;
449
+ fontWeight: string;
450
+ _hover: {
451
+ textDecoration: string;
452
+ cursor: string;
453
+ };
454
+ } | undefined;
455
+ sizes?: {
456
+ sm: {
457
+ fontSize: ("xs" | "sm")[];
458
+ lineHeight: string;
459
+ };
460
+ md: {
461
+ fontSize: ("sm" | "md")[];
462
+ lineHeight: string;
463
+ };
464
+ lg: {
465
+ fontSize: ("md" | "lg")[];
466
+ lineHeight: string;
467
+ };
468
+ } | undefined;
469
+ variants?: {} | undefined;
470
+ defaultProps?: {
471
+ size?: "sm" | "md" | "lg" | undefined;
472
+ variant?: undefined;
473
+ colorScheme?: string | undefined;
474
+ } | undefined;
475
+ };
476
+ Text: {
477
+ baseStyle?: {
478
+ fontFamily: string;
479
+ fontWeight: string;
480
+ lineHeight: string;
481
+ letterSpacing: string;
482
+ fontSize: string;
483
+ p: number;
484
+ } | undefined;
485
+ sizes?: {
486
+ xs: {
487
+ fontSize: ("2xs" | "xs")[];
488
+ };
489
+ sm: {
490
+ fontSize: ("xs" | "sm")[];
491
+ };
492
+ md: {
493
+ fontSize: ("sm" | "md")[];
494
+ };
495
+ lg: {
496
+ fontSize: ("md" | "lg")[];
497
+ };
498
+ xl: {
499
+ fontSize: ("lg" | "2xl")[];
500
+ lineHeight: ("shorter" | "short")[];
501
+ };
502
+ } | undefined;
503
+ variants?: {
504
+ [key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
505
+ } | undefined;
506
+ defaultProps?: {
507
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
508
+ variant?: string | number | undefined;
509
+ colorScheme?: string | undefined;
510
+ } | undefined;
511
+ };
512
+ Menu: {
513
+ baseStyle?: {
514
+ button: {};
515
+ list: {
516
+ boxShadow: string;
517
+ backgroundColor: string;
518
+ border: string;
519
+ borderColor: string;
520
+ borderRadius: string;
521
+ };
522
+ item: {
523
+ fontWeight: string;
524
+ lineHeight: string;
525
+ color: string;
526
+ _hover: {
527
+ backgroundColor: string;
528
+ };
529
+ _disabled: {
530
+ backgroundColor: string;
531
+ color: string;
532
+ cursor: string;
533
+ };
534
+ _first: {
535
+ borderTopRadius: string;
536
+ };
537
+ _last: {
538
+ borderBottomRadius: string;
539
+ };
540
+ };
541
+ groupTitle: {
542
+ color: string;
543
+ letterSpacing: string;
544
+ };
545
+ command: {
546
+ color: string;
547
+ };
548
+ divider: {
549
+ borderColor: string;
550
+ borderBottom: string;
551
+ };
552
+ } | undefined;
553
+ sizes?: {
554
+ sm: {
555
+ button: {};
556
+ item: {
557
+ fontSize: ("2xs" | "sm")[];
558
+ paddingY: string;
559
+ paddingX: string;
560
+ };
561
+ groupTitle: {
562
+ fontSize: ("md" | "lg")[];
563
+ paddingY: string;
564
+ paddingX: string;
565
+ };
566
+ divider: {
567
+ marginY: string;
568
+ };
569
+ };
570
+ md: {
571
+ item: {
572
+ fontSize: ("3xs" | "lg")[];
573
+ paddingY: string;
574
+ paddingX: string;
575
+ };
576
+ groupTitle: {
577
+ fontSize: ("lg" | "xl")[];
578
+ paddingY: string;
579
+ paddingX: string;
580
+ };
581
+ };
582
+ lg: {
583
+ item: {
584
+ fontSize: ("xl" | "2xl")[];
585
+ paddingX: string;
586
+ paddingY: string;
587
+ };
588
+ groupTitle: {
589
+ fontSize: ("3xl" | "4xl")[];
590
+ paddingX: string;
591
+ paddingY: string;
592
+ };
593
+ };
594
+ } | undefined;
595
+ variants?: {} | undefined;
596
+ defaultProps?: {
597
+ size?: "sm" | "md" | "lg" | undefined;
598
+ variant?: undefined;
599
+ colorScheme?: string | undefined;
600
+ } | undefined;
601
+ parts: ("button" | "list" | "item" | "groupTitle" | "command" | "divider")[];
602
+ };
250
603
  };
251
604
  styles: import("@chakra-ui/theme-tools/dist/component").Styles;
252
605
  config: import("@chakra-ui/theme/dist/theme.types").ThemeConfig;
253
- shadows: {
254
- xs: string;
255
- sm: string;
256
- base: string;
257
- md: string;
258
- lg: string;
259
- xl: string;
260
- "2xl": string;
261
- outline: string;
262
- inner: string;
263
- none: string;
264
- "dark-lg": string;
265
- };
266
606
  borders: {
267
607
  none: number;
268
608
  "1px": string;
@@ -293,29 +633,6 @@ export declare const theme: {
293
633
  "ultra-slow": string;
294
634
  };
295
635
  };
296
- breakpoints: {
297
- base: string;
298
- sm: string;
299
- md: string;
300
- lg: string;
301
- xl: string;
302
- "2xl": string;
303
- };
304
- zIndices: {
305
- hide: number;
306
- auto: string;
307
- base: number;
308
- docked: number;
309
- dropdown: number;
310
- sticky: number;
311
- banner: number;
312
- overlay: number;
313
- modal: number;
314
- popover: number;
315
- skipLink: number;
316
- toast: number;
317
- tooltip: number;
318
- };
319
636
  radii: {
320
637
  none: string;
321
638
  sm: string;
@@ -0,0 +1,3 @@
1
+ import { Box, BoxProps as ChakraButtonProps } from '@chakra-ui/react';
2
+ export type BoxProps = ChakraButtonProps;
3
+ export default Box;