@importcsv/react 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 (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +470 -0
  3. package/build/App.d.ts +2 -0
  4. package/build/api.d.ts +17 -0
  5. package/build/components/CSVImporter/CSVImporter.stories.d.ts +44 -0
  6. package/build/components/CSVImporter/index.d.ts +26 -0
  7. package/build/config/environments.d.ts +12 -0
  8. package/build/config/index.d.ts +5 -0
  9. package/build/config.d.ts +10 -0
  10. package/build/i18n/de.d.ts +32 -0
  11. package/build/i18n/es.d.ts +32 -0
  12. package/build/i18n/fr.d.ts +32 -0
  13. package/build/i18n/i18n.d.ts +2 -0
  14. package/build/i18n/it.d.ts +32 -0
  15. package/build/importer/components/Box/index.d.ts +2 -0
  16. package/build/importer/components/Box/types/index.d.ts +5 -0
  17. package/build/importer/components/Checkbox/index.d.ts +2 -0
  18. package/build/importer/components/Checkbox/types/index.d.ts +4 -0
  19. package/build/importer/components/Errors/index.d.ts +4 -0
  20. package/build/importer/components/Input/index.d.ts +2 -0
  21. package/build/importer/components/Input/types/index.d.ts +18 -0
  22. package/build/importer/components/Portal/index.d.ts +3 -0
  23. package/build/importer/components/Portal/types/index.d.ts +5 -0
  24. package/build/importer/components/Stepper/hooks/useStepper.d.ts +2 -0
  25. package/build/importer/components/Stepper/index.d.ts +2 -0
  26. package/build/importer/components/Stepper/types/index.d.ts +13 -0
  27. package/build/importer/components/Table/index.d.ts +9 -0
  28. package/build/importer/components/Table/storyData.d.ts +36 -0
  29. package/build/importer/components/Table/types/index.d.ts +42 -0
  30. package/build/importer/components/ToggleFilter/ToggleFilter.stories.d.ts +18 -0
  31. package/build/importer/components/ToggleFilter/index.d.ts +3 -0
  32. package/build/importer/components/ToggleFilter/types/index.d.ts +11 -0
  33. package/build/importer/components/Tooltip/index.d.ts +2 -0
  34. package/build/importer/components/Tooltip/types/index.d.ts +11 -0
  35. package/build/importer/components/UploaderWrapper/UploaderWrapper.d.ts +2 -0
  36. package/build/importer/components/UploaderWrapper/types/index.d.ts +2 -0
  37. package/build/importer/features/complete/index.d.ts +2 -0
  38. package/build/importer/features/complete/types/index.d.ts +5 -0
  39. package/build/importer/features/main/hooks/useMutableLocalStorage.d.ts +1 -0
  40. package/build/importer/features/main/hooks/useStepNavigation.d.ts +17 -0
  41. package/build/importer/features/main/index.d.ts +2 -0
  42. package/build/importer/features/main/types/index.d.ts +16 -0
  43. package/build/importer/features/map-columns/components/DropDownFields.d.ts +19 -0
  44. package/build/importer/features/map-columns/hooks/useMapColumnsTable.d.ts +15 -0
  45. package/build/importer/features/map-columns/hooks/useNameChange.d.ts +5 -0
  46. package/build/importer/features/map-columns/index.d.ts +2 -0
  47. package/build/importer/features/map-columns/types/index.d.ts +23 -0
  48. package/build/importer/features/row-selection/index.d.ts +2 -0
  49. package/build/importer/features/row-selection/types/index.d.ts +8 -0
  50. package/build/importer/features/uploader/hooks/useTemplateTable.d.ts +10 -0
  51. package/build/importer/features/uploader/index.d.ts +2 -0
  52. package/build/importer/features/uploader/types/index.d.ts +9 -0
  53. package/build/importer/features/validate/index.d.ts +24 -0
  54. package/build/importer/features/validation/AIFixModal.d.ts +23 -0
  55. package/build/importer/features/validation/SimpleValidation.d.ts +2 -0
  56. package/build/importer/features/validation/Validation.d.ts +2 -0
  57. package/build/importer/features/validation/ValidationFixed.d.ts +2 -0
  58. package/build/importer/features/validation/components/AISuggestionsPanel.d.ts +15 -0
  59. package/build/importer/features/validation/components/InlineFixSuggestion.d.ts +8 -0
  60. package/build/importer/features/validation/index.d.ts +1 -0
  61. package/build/importer/features/validation/types.d.ts +31 -0
  62. package/build/importer/hooks/useClickOutside.d.ts +1 -0
  63. package/build/importer/hooks/useCustomStyles.d.ts +1 -0
  64. package/build/importer/hooks/useDelayLoader.d.ts +2 -0
  65. package/build/importer/hooks/useEventListener.d.ts +4 -0
  66. package/build/importer/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  67. package/build/importer/hooks/useRect.d.ts +12 -0
  68. package/build/importer/hooks/useWindowSize.d.ts +1 -0
  69. package/build/importer/providers/Theme.d.ts +4 -0
  70. package/build/importer/providers/index.d.ts +2 -0
  71. package/build/importer/providers/types/index.d.ts +4 -0
  72. package/build/importer/services/api.d.ts +0 -0
  73. package/build/importer/services/validation-api.d.ts +14 -0
  74. package/build/importer/settings/chakra/components/alert.d.ts +31 -0
  75. package/build/importer/settings/chakra/components/button.d.ts +37 -0
  76. package/build/importer/settings/chakra/components/index.d.ts +2 -0
  77. package/build/importer/settings/chakra/foundations/blur.d.ts +11 -0
  78. package/build/importer/settings/chakra/foundations/borders.d.ts +8 -0
  79. package/build/importer/settings/chakra/foundations/breakpoints.d.ts +9 -0
  80. package/build/importer/settings/chakra/foundations/colors.d.ts +247 -0
  81. package/build/importer/settings/chakra/foundations/index.d.ts +487 -0
  82. package/build/importer/settings/chakra/foundations/radius.d.ts +12 -0
  83. package/build/importer/settings/chakra/foundations/shadows.d.ts +14 -0
  84. package/build/importer/settings/chakra/foundations/sizes.d.ts +60 -0
  85. package/build/importer/settings/chakra/foundations/spacing.d.ts +35 -0
  86. package/build/importer/settings/chakra/foundations/transition.d.ts +24 -0
  87. package/build/importer/settings/chakra/foundations/typography.d.ts +61 -0
  88. package/build/importer/settings/chakra/foundations/z-index.d.ts +16 -0
  89. package/build/importer/settings/chakra/index.d.ts +592 -0
  90. package/build/importer/settings/chakra/semantic-tokens.d.ts +32 -0
  91. package/build/importer/settings/chakra/styles.d.ts +2 -0
  92. package/build/importer/settings/chakra/theme.types.d.ts +93 -0
  93. package/build/importer/settings/chakra/utils/is-chakra-theme.d.ts +3 -0
  94. package/build/importer/settings/chakra/utils/run-if-fn.d.ts +1 -0
  95. package/build/importer/settings/theme/colors.d.ts +4 -0
  96. package/build/importer/settings/theme/index.d.ts +2 -0
  97. package/build/importer/settings/theme/sizes.d.ts +7 -0
  98. package/build/importer/stores/theme.d.ts +17 -0
  99. package/build/importer/types/index.d.ts +17 -0
  100. package/build/importer/utils/classes.d.ts +2 -0
  101. package/build/importer/utils/debounce.d.ts +2 -0
  102. package/build/importer/utils/getStringLengthOfChildren.d.ts +2 -0
  103. package/build/importer/utils/stringSimilarity.d.ts +1 -0
  104. package/build/importer/utils/template.d.ts +2 -0
  105. package/build/importer/utils/utils.d.ts +11 -0
  106. package/build/index.d.ts +2 -0
  107. package/build/index.esm.js +54893 -0
  108. package/build/index.esm.js.map +1 -0
  109. package/build/index.js +54919 -0
  110. package/build/index.js.map +1 -0
  111. package/build/js.d.ts +31 -0
  112. package/build/services/api.d.ts +18 -0
  113. package/build/services/apiClient.d.ts +21 -0
  114. package/build/settings/defaults.d.ts +3 -0
  115. package/build/types/index.d.ts +24 -0
  116. package/build/types.d.ts +91 -0
  117. package/package.json +122 -0
@@ -0,0 +1,592 @@
1
+ import type { ThemeConfig } from "./theme.types";
2
+ declare const theme: {
3
+ styles: import("@chakra-ui/theme-tools/dist/component").Styles;
4
+ config: ThemeConfig;
5
+ components: {
6
+ Button: {
7
+ baseStyle?: {
8
+ fontWeight: string;
9
+ borderRadius: string;
10
+ height: string;
11
+ lineHeight: string;
12
+ fontSize: string;
13
+ border: string;
14
+ cursor: string;
15
+ } | undefined;
16
+ sizes?: {
17
+ sm: {
18
+ fontSize: string;
19
+ px: number;
20
+ py: number;
21
+ };
22
+ md: {
23
+ fontSize: string;
24
+ px: number;
25
+ py: number;
26
+ };
27
+ } | undefined;
28
+ variants?: {
29
+ solid: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
30
+ _hover: {
31
+ backgroundColor: string;
32
+ };
33
+ color: string;
34
+ };
35
+ } | undefined;
36
+ defaultProps?: {
37
+ size?: "sm" | "md" | undefined;
38
+ variant?: "solid" | undefined;
39
+ colorScheme?: string | undefined;
40
+ } | undefined;
41
+ };
42
+ Alert: {
43
+ baseStyle?: ((props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
44
+ container: {
45
+ backgroundColor: string;
46
+ border: string;
47
+ borderRadius: string;
48
+ fontWeight: string;
49
+ };
50
+ title: {
51
+ color: string;
52
+ };
53
+ description: {
54
+ color: string;
55
+ };
56
+ icon: {
57
+ color: string;
58
+ };
59
+ }) | undefined;
60
+ sizes?: {
61
+ [key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
62
+ } | undefined;
63
+ variants?: {
64
+ [key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
65
+ } | undefined;
66
+ defaultProps?: {
67
+ size?: string | number | undefined;
68
+ variant?: string | number | undefined;
69
+ colorScheme?: string | undefined;
70
+ } | undefined;
71
+ };
72
+ };
73
+ sizes: {
74
+ container: {
75
+ sm: string;
76
+ md: string;
77
+ lg: string;
78
+ xl: string;
79
+ };
80
+ max: string;
81
+ min: string;
82
+ full: string;
83
+ "3xs": string;
84
+ "2xs": string;
85
+ xs: string;
86
+ sm: string;
87
+ md: string;
88
+ lg: string;
89
+ xl: string;
90
+ "2xl": string;
91
+ "3xl": string;
92
+ "4xl": string;
93
+ "5xl": string;
94
+ "6xl": string;
95
+ "7xl": string;
96
+ "8xl": string;
97
+ prose: string;
98
+ px: string;
99
+ 0.5: string;
100
+ 1: string;
101
+ 1.5: string;
102
+ 2: string;
103
+ 2.5: string;
104
+ 3: string;
105
+ 3.5: string;
106
+ 4: string;
107
+ 5: string;
108
+ 6: string;
109
+ 7: string;
110
+ 8: string;
111
+ 9: string;
112
+ 10: string;
113
+ 12: string;
114
+ 14: string;
115
+ 16: string;
116
+ 20: string;
117
+ 24: string;
118
+ 28: string;
119
+ 32: string;
120
+ 36: string;
121
+ 40: string;
122
+ 44: string;
123
+ 48: string;
124
+ 52: string;
125
+ 56: string;
126
+ 60: string;
127
+ 64: string;
128
+ 72: string;
129
+ 80: string;
130
+ 96: string;
131
+ };
132
+ shadows: {
133
+ xs: string;
134
+ sm: string;
135
+ base: string;
136
+ md: string;
137
+ lg: string;
138
+ xl: string;
139
+ "2xl": string;
140
+ outline: string;
141
+ inner: string;
142
+ none: string;
143
+ "dark-lg": string;
144
+ };
145
+ space: {
146
+ px: string;
147
+ 0.5: string;
148
+ 1: string;
149
+ 1.5: string;
150
+ 2: string;
151
+ 2.5: string;
152
+ 3: string;
153
+ 3.5: string;
154
+ 4: string;
155
+ 5: string;
156
+ 6: string;
157
+ 7: string;
158
+ 8: string;
159
+ 9: string;
160
+ 10: string;
161
+ 12: string;
162
+ 14: string;
163
+ 16: string;
164
+ 20: string;
165
+ 24: string;
166
+ 28: string;
167
+ 32: string;
168
+ 36: string;
169
+ 40: string;
170
+ 44: string;
171
+ 48: string;
172
+ 52: string;
173
+ 56: string;
174
+ 60: string;
175
+ 64: string;
176
+ 72: string;
177
+ 80: string;
178
+ 96: string;
179
+ };
180
+ borders: {
181
+ none: number;
182
+ "1px": string;
183
+ "2px": string;
184
+ "4px": string;
185
+ "8px": string;
186
+ };
187
+ transition: {
188
+ property: {
189
+ common: string;
190
+ colors: string;
191
+ dimensions: string;
192
+ position: string;
193
+ background: string;
194
+ };
195
+ easing: {
196
+ "ease-in": string;
197
+ "ease-out": string;
198
+ "ease-in-out": string;
199
+ };
200
+ duration: {
201
+ "ultra-fast": string;
202
+ faster: string;
203
+ fast: string;
204
+ normal: string;
205
+ slow: string;
206
+ slower: string;
207
+ "ultra-slow": string;
208
+ };
209
+ };
210
+ letterSpacings: {
211
+ tighter: string;
212
+ tight: string;
213
+ normal: string;
214
+ wide: string;
215
+ wider: string;
216
+ widest: string;
217
+ };
218
+ lineHeights: {
219
+ normal: string;
220
+ none: number;
221
+ shorter: number;
222
+ short: number;
223
+ base: number;
224
+ tall: number;
225
+ taller: string;
226
+ "3": string;
227
+ "4": string;
228
+ "5": string;
229
+ "6": string;
230
+ "7": string;
231
+ "8": string;
232
+ "9": string;
233
+ "10": string;
234
+ };
235
+ fontWeights: {
236
+ hairline: number;
237
+ thin: number;
238
+ light: number;
239
+ normal: number;
240
+ medium: number;
241
+ semibold: number;
242
+ bold: number;
243
+ extrabold: number;
244
+ black: number;
245
+ };
246
+ fonts: {
247
+ heading: string;
248
+ body: string;
249
+ mono: string;
250
+ };
251
+ fontSizes: {
252
+ "3xs": string;
253
+ "2xs": string;
254
+ xs: string;
255
+ sm: string;
256
+ md: string;
257
+ lg: string;
258
+ xl: string;
259
+ "2xl": string;
260
+ "3xl": string;
261
+ "4xl": string;
262
+ "5xl": string;
263
+ "6xl": string;
264
+ "7xl": string;
265
+ "8xl": string;
266
+ "9xl": string;
267
+ };
268
+ breakpoints: {
269
+ base: string;
270
+ sm: string;
271
+ md: string;
272
+ lg: string;
273
+ xl: string;
274
+ "2xl": string;
275
+ };
276
+ zIndices: {
277
+ hide: number;
278
+ auto: string;
279
+ base: number;
280
+ docked: number;
281
+ dropdown: number;
282
+ sticky: number;
283
+ banner: number;
284
+ overlay: number;
285
+ modal: number;
286
+ popover: number;
287
+ skipLink: number;
288
+ toast: number;
289
+ tooltip: number;
290
+ };
291
+ radii: {
292
+ none: string;
293
+ sm: string;
294
+ base: string;
295
+ md: string;
296
+ lg: string;
297
+ xl: string;
298
+ "2xl": string;
299
+ "3xl": string;
300
+ full: string;
301
+ };
302
+ blur: {
303
+ none: number;
304
+ sm: string;
305
+ base: string;
306
+ md: string;
307
+ lg: string;
308
+ xl: string;
309
+ "2xl": string;
310
+ "3xl": string;
311
+ };
312
+ colors: {
313
+ transparent: string;
314
+ current: string;
315
+ black: string;
316
+ white: string;
317
+ primary: {
318
+ 50: string;
319
+ 100: string;
320
+ 200: string;
321
+ 300: string;
322
+ 400: string;
323
+ 500: string;
324
+ 600: string;
325
+ 700: string;
326
+ 800: string;
327
+ 900: string;
328
+ };
329
+ secondary: {
330
+ 50: string;
331
+ 100: string;
332
+ 200: string;
333
+ 300: string;
334
+ 400: string;
335
+ 500: string;
336
+ 600: string;
337
+ 700: string;
338
+ 800: string;
339
+ 900: string;
340
+ };
341
+ whiteAlpha: {
342
+ 50: string;
343
+ 100: string;
344
+ 200: string;
345
+ 300: string;
346
+ 400: string;
347
+ 500: string;
348
+ 600: string;
349
+ 700: string;
350
+ 800: string;
351
+ 900: string;
352
+ };
353
+ blackAlpha: {
354
+ 50: string;
355
+ 100: string;
356
+ 200: string;
357
+ 300: string;
358
+ 400: string;
359
+ 500: string;
360
+ 600: string;
361
+ 700: string;
362
+ 800: string;
363
+ 900: string;
364
+ };
365
+ gray: {
366
+ 50: string;
367
+ 100: string;
368
+ 200: string;
369
+ 300: string;
370
+ 400: string;
371
+ 500: string;
372
+ 600: string;
373
+ 700: string;
374
+ 800: string;
375
+ 900: string;
376
+ };
377
+ red: {
378
+ 50: string;
379
+ 100: string;
380
+ 200: string;
381
+ 300: string;
382
+ 400: string;
383
+ 500: string;
384
+ 600: string;
385
+ 700: string;
386
+ 800: string;
387
+ 900: string;
388
+ };
389
+ orange: {
390
+ 50: string;
391
+ 100: string;
392
+ 200: string;
393
+ 300: string;
394
+ 400: string;
395
+ 500: string;
396
+ 600: string;
397
+ 700: string;
398
+ 800: string;
399
+ 900: string;
400
+ };
401
+ yellow: {
402
+ 50: string;
403
+ 100: string;
404
+ 200: string;
405
+ 300: string;
406
+ 400: string;
407
+ 500: string;
408
+ 600: string;
409
+ 700: string;
410
+ 800: string;
411
+ 900: string;
412
+ };
413
+ green: {
414
+ 50: string;
415
+ 100: string;
416
+ 200: string;
417
+ 300: string;
418
+ 400: string;
419
+ 500: string;
420
+ 600: string;
421
+ 700: string;
422
+ 800: string;
423
+ 900: string;
424
+ };
425
+ teal: {
426
+ 50: string;
427
+ 100: string;
428
+ 200: string;
429
+ 300: string;
430
+ 400: string;
431
+ 500: string;
432
+ 600: string;
433
+ 700: string;
434
+ 800: string;
435
+ 900: string;
436
+ };
437
+ blue: {
438
+ 50: string;
439
+ 100: string;
440
+ 200: string;
441
+ 300: string;
442
+ 400: string;
443
+ 500: string;
444
+ 600: string;
445
+ 700: string;
446
+ 800: string;
447
+ 900: string;
448
+ };
449
+ cyan: {
450
+ 50: string;
451
+ 100: string;
452
+ 200: string;
453
+ 300: string;
454
+ 400: string;
455
+ 500: string;
456
+ 600: string;
457
+ 700: string;
458
+ 800: string;
459
+ 900: string;
460
+ };
461
+ purple: {
462
+ 50: string;
463
+ 100: string;
464
+ 200: string;
465
+ 300: string;
466
+ 400: string;
467
+ 500: string;
468
+ 600: string;
469
+ 700: string;
470
+ 800: string;
471
+ 900: string;
472
+ };
473
+ pink: {
474
+ 50: string;
475
+ 100: string;
476
+ 200: string;
477
+ 300: string;
478
+ 400: string;
479
+ 500: string;
480
+ 600: string;
481
+ 700: string;
482
+ 800: string;
483
+ 900: string;
484
+ };
485
+ linkedin: {
486
+ 50: string;
487
+ 100: string;
488
+ 200: string;
489
+ 300: string;
490
+ 400: string;
491
+ 500: string;
492
+ 600: string;
493
+ 700: string;
494
+ 800: string;
495
+ 900: string;
496
+ };
497
+ facebook: {
498
+ 50: string;
499
+ 100: string;
500
+ 200: string;
501
+ 300: string;
502
+ 400: string;
503
+ 500: string;
504
+ 600: string;
505
+ 700: string;
506
+ 800: string;
507
+ 900: string;
508
+ };
509
+ messenger: {
510
+ 50: string;
511
+ 100: string;
512
+ 200: string;
513
+ 300: string;
514
+ 400: string;
515
+ 500: string;
516
+ 600: string;
517
+ 700: string;
518
+ 800: string;
519
+ 900: string;
520
+ };
521
+ whatsapp: {
522
+ 50: string;
523
+ 100: string;
524
+ 200: string;
525
+ 300: string;
526
+ 400: string;
527
+ 500: string;
528
+ 600: string;
529
+ 700: string;
530
+ 800: string;
531
+ 900: string;
532
+ };
533
+ twitter: {
534
+ 50: string;
535
+ 100: string;
536
+ 200: string;
537
+ 300: string;
538
+ 400: string;
539
+ 500: string;
540
+ 600: string;
541
+ 700: string;
542
+ 800: string;
543
+ 900: string;
544
+ };
545
+ telegram: {
546
+ 50: string;
547
+ 100: string;
548
+ 200: string;
549
+ 300: string;
550
+ 400: string;
551
+ 500: string;
552
+ 600: string;
553
+ 700: string;
554
+ 800: string;
555
+ 900: string;
556
+ };
557
+ };
558
+ semanticTokens: {
559
+ colors: {
560
+ "chakra-body-text": {
561
+ _light: string;
562
+ _dark: string;
563
+ };
564
+ "chakra-body-bg": {
565
+ _light: string;
566
+ _dark: string;
567
+ };
568
+ "chakra-border-color": {
569
+ _light: string;
570
+ _dark: string;
571
+ };
572
+ "chakra-inverse-text": {
573
+ _light: string;
574
+ _dark: string;
575
+ };
576
+ "chakra-subtle-bg": {
577
+ _light: string;
578
+ _dark: string;
579
+ };
580
+ "chakra-subtle-text": {
581
+ _light: string;
582
+ _dark: string;
583
+ };
584
+ "chakra-placeholder-color": {
585
+ _light: string;
586
+ _dark: string;
587
+ };
588
+ };
589
+ };
590
+ direction: "ltr";
591
+ };
592
+ export default theme;
@@ -0,0 +1,32 @@
1
+ export declare const semanticTokens: {
2
+ colors: {
3
+ "chakra-body-text": {
4
+ _light: string;
5
+ _dark: string;
6
+ };
7
+ "chakra-body-bg": {
8
+ _light: string;
9
+ _dark: string;
10
+ };
11
+ "chakra-border-color": {
12
+ _light: string;
13
+ _dark: string;
14
+ };
15
+ "chakra-inverse-text": {
16
+ _light: string;
17
+ _dark: string;
18
+ };
19
+ "chakra-subtle-bg": {
20
+ _light: string;
21
+ _dark: string;
22
+ };
23
+ "chakra-subtle-text": {
24
+ _light: string;
25
+ _dark: string;
26
+ };
27
+ "chakra-placeholder-color": {
28
+ _light: string;
29
+ _dark: string;
30
+ };
31
+ };
32
+ };
@@ -0,0 +1,2 @@
1
+ import { Styles } from "@chakra-ui/theme-tools";
2
+ export declare const styles: Styles;
@@ -0,0 +1,93 @@
1
+ import type { PartsStyleInterpolation, Pseudos, SemanticValue, StyleObjectOrFn, SystemStyleInterpolation, ThemingProps } from "@chakra-ui/styled-system";
2
+ import { Styles } from "@chakra-ui/theme-tools";
3
+ type ColorMode = "light" | "dark";
4
+ type Dict = Record<string, any>;
5
+ type ColorModeOptions = {
6
+ initialColorMode?: "light" | "dark" | "system";
7
+ useSystemColorMode?: boolean;
8
+ disableTransitionOnChange?: boolean;
9
+ };
10
+ export type RecursiveProperty<T = string | number> = RecursiveObject<T> | T;
11
+ export interface RecursiveObject<T = string | number> {
12
+ [property: string]: RecursiveProperty<T>;
13
+ }
14
+ export interface ThemeConfig extends ColorModeOptions {
15
+ cssVarPrefix?: string;
16
+ }
17
+ export type ThemeTransitions = RecursiveObject & {
18
+ property: RecursiveObject;
19
+ easing: RecursiveObject;
20
+ duration: RecursiveObject;
21
+ };
22
+ export interface ColorHues {
23
+ 50: string;
24
+ 100: string;
25
+ 200: string;
26
+ 300: string;
27
+ 400: string;
28
+ 500: string;
29
+ 600: string;
30
+ 700: string;
31
+ 800: string;
32
+ 900: string;
33
+ }
34
+ export type Colors = RecursiveObject<Record<string, Partial<ColorHues>> | string>;
35
+ export type ThemeDirection = "ltr" | "rtl";
36
+ export interface ComponentDefaultProps extends Omit<ThemingProps, "styleConfig">, Dict {
37
+ }
38
+ export interface ThemeComponentProps<T extends ChakraTheme = ChakraTheme> extends Omit<ThemingProps, "styleConfig"> {
39
+ colorMode: ColorMode;
40
+ theme: T;
41
+ [x: string]: any;
42
+ }
43
+ export type ThemeComponentFunction<S, T extends ChakraTheme = ChakraTheme> = (props: ThemeComponentProps<T>) => S;
44
+ export type ThemingPropsThunk<S, T extends ChakraTheme = ChakraTheme> = S | ThemeComponentFunction<S, T>;
45
+ export interface SystemStyleObjectRecord {
46
+ [key: string]: StyleObjectOrFn;
47
+ }
48
+ export interface ComponentSingleStyleConfig {
49
+ parts?: never;
50
+ baseStyle?: SystemStyleInterpolation;
51
+ sizes?: Record<string, SystemStyleInterpolation>;
52
+ variants?: Record<string, SystemStyleInterpolation>;
53
+ defaultProps?: any;
54
+ }
55
+ export interface ComponentMultiStyleConfig {
56
+ parts: string[];
57
+ baseStyle?: PartsStyleInterpolation;
58
+ sizes?: Record<string, PartsStyleInterpolation>;
59
+ variants?: Record<string, PartsStyleInterpolation>;
60
+ defaultProps?: any;
61
+ }
62
+ export type ComponentStyleConfig = ComponentSingleStyleConfig | ComponentMultiStyleConfig;
63
+ export interface ThemeComponents {
64
+ [componentName: string]: ComponentStyleConfig;
65
+ }
66
+ interface Typography {
67
+ fonts: RecursiveObject<string>;
68
+ fontSizes: RecursiveObject;
69
+ fontWeights: RecursiveObject;
70
+ letterSpacings: RecursiveObject;
71
+ lineHeights: RecursiveObject;
72
+ }
73
+ interface Foundations extends Typography {
74
+ borders: RecursiveObject;
75
+ breakpoints: Dict;
76
+ colors: Colors;
77
+ radii: RecursiveObject;
78
+ shadows: RecursiveObject<string>;
79
+ sizes: RecursiveObject;
80
+ space: RecursiveObject;
81
+ transition: ThemeTransitions;
82
+ zIndices: RecursiveObject;
83
+ }
84
+ export interface ChakraTheme extends Foundations {
85
+ semanticTokens?: Partial<Record<keyof Foundations, Record<string, SemanticValue<keyof Pseudos>>>>;
86
+ components: ThemeComponents;
87
+ config: ThemeConfig;
88
+ direction: ThemeDirection;
89
+ styles: Styles;
90
+ layerStyles?: SystemStyleObjectRecord;
91
+ textStyles?: SystemStyleObjectRecord;
92
+ }
93
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ChakraTheme } from "../theme.types";
2
+ export declare const requiredChakraThemeKeys: (keyof ChakraTheme)[];
3
+ export declare function isChakraTheme(unit: unknown): unit is ChakraTheme;