@matteoaliano/forest-ui 0.2.0 → 0.2.2

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.
@@ -0,0 +1,525 @@
1
+ import * as _mui_material from '@mui/material';
2
+ import { PaletteOptions, TypographyVariantsOptions, Components, Theme, Shadows, ThemeOptions } from '@mui/material/styles';
3
+
4
+ /**
5
+ * Design tokens extracted from Figma.
6
+ * These are the primitive values that the semantic theme references.
7
+ */
8
+ declare const colors: {
9
+ readonly base: {
10
+ readonly white: "#ffffff";
11
+ readonly black: "#000000";
12
+ readonly transparent: "#ffffff00";
13
+ };
14
+ readonly brand: {
15
+ readonly 25: "#fcfaff";
16
+ readonly 50: "#f9f5ff";
17
+ readonly 100: "#f4ebff";
18
+ readonly 200: "#e9d7fe";
19
+ readonly 300: "#d6bbfb";
20
+ readonly 400: "#b692f6";
21
+ readonly 500: "#9e77ed";
22
+ readonly 600: "#7f56d9";
23
+ readonly 700: "#6941c6";
24
+ readonly 800: "#53389e";
25
+ readonly 900: "#42307d";
26
+ readonly 950: "#2c1c5f";
27
+ };
28
+ readonly gray: {
29
+ readonly 25: "#fcfcfd";
30
+ readonly 50: "#f9fafb";
31
+ readonly 100: "#f2f4f7";
32
+ readonly 200: "#eaecf0";
33
+ readonly 300: "#d0d5dd";
34
+ readonly 400: "#98a2b3";
35
+ readonly 500: "#667085";
36
+ readonly 600: "#475467";
37
+ readonly 700: "#344054";
38
+ readonly 800: "#182230";
39
+ readonly 900: "#101828";
40
+ readonly 950: "#0c111d";
41
+ };
42
+ readonly error: {
43
+ readonly 25: "#fffbfa";
44
+ readonly 50: "#fef3f2";
45
+ readonly 100: "#fee4e2";
46
+ readonly 200: "#fecdca";
47
+ readonly 300: "#fda29b";
48
+ readonly 400: "#f97066";
49
+ readonly 500: "#f04438";
50
+ readonly 600: "#d92d20";
51
+ readonly 700: "#b42318";
52
+ readonly 800: "#912018";
53
+ readonly 900: "#7a271a";
54
+ readonly 950: "#55160c";
55
+ };
56
+ readonly warning: {
57
+ readonly 25: "#fffcf5";
58
+ readonly 50: "#fffaeb";
59
+ readonly 100: "#fef0c7";
60
+ readonly 200: "#fedf89";
61
+ readonly 300: "#fec84b";
62
+ readonly 400: "#fdb022";
63
+ readonly 500: "#f79009";
64
+ readonly 600: "#dc6803";
65
+ readonly 700: "#b54708";
66
+ readonly 800: "#93370d";
67
+ readonly 900: "#7a2e0e";
68
+ readonly 950: "#4e1d09";
69
+ };
70
+ readonly success: {
71
+ readonly 25: "#f6fef9";
72
+ readonly 50: "#ecfdf3";
73
+ readonly 100: "#dcfae6";
74
+ readonly 200: "#abefc6";
75
+ readonly 300: "#75e0a7";
76
+ readonly 400: "#47cd89";
77
+ readonly 500: "#17b26a";
78
+ readonly 600: "#079455";
79
+ readonly 700: "#067647";
80
+ readonly 800: "#085d3a";
81
+ readonly 900: "#074d31";
82
+ readonly 950: "#053321";
83
+ };
84
+ readonly blue: {
85
+ readonly 25: "#f5faff";
86
+ readonly 50: "#eff8ff";
87
+ readonly 100: "#d1e9ff";
88
+ readonly 200: "#b2ddff";
89
+ readonly 300: "#84caff";
90
+ readonly 400: "#53b1fd";
91
+ readonly 500: "#2e90fa";
92
+ readonly 600: "#1570ef";
93
+ readonly 700: "#175cd3";
94
+ readonly 800: "#1849a9";
95
+ readonly 900: "#194185";
96
+ readonly 950: "#102a56";
97
+ };
98
+ };
99
+ declare const spacing: {
100
+ readonly none: 0;
101
+ readonly xxs: 2;
102
+ readonly xs: 4;
103
+ readonly sm: 6;
104
+ readonly md: 8;
105
+ readonly lg: 12;
106
+ readonly xl: 16;
107
+ readonly "2xl": 20;
108
+ readonly "3xl": 24;
109
+ readonly "4xl": 32;
110
+ readonly "5xl": 40;
111
+ readonly "6xl": 48;
112
+ readonly "7xl": 64;
113
+ readonly "8xl": 80;
114
+ readonly "9xl": 96;
115
+ readonly "10xl": 128;
116
+ readonly "11xl": 160;
117
+ };
118
+ declare const radius: {
119
+ readonly none: 0;
120
+ readonly xxs: 2;
121
+ readonly xs: 4;
122
+ readonly sm: 6;
123
+ readonly md: 8;
124
+ readonly lg: 10;
125
+ readonly xl: 12;
126
+ readonly "2xl": 16;
127
+ readonly "3xl": 20;
128
+ readonly "4xl": 24;
129
+ readonly full: 9999;
130
+ };
131
+ declare const shadows$1: {
132
+ readonly xs: "0px 1px 2px 0px #1018280d";
133
+ readonly sm: "0px 1px 3px 0px #1018281a, 0px 1px 2px 0px #1018280f";
134
+ readonly md: "0px 4px 8px -2px #1018281a, 0px 2px 4px -2px #1018280f";
135
+ readonly lg: "0px 12px 16px -4px #10182814, 0px 4px 6px -2px #10182808";
136
+ readonly xl: "0px 20px 24px -4px #10182814, 0px 8px 8px -4px #10182808";
137
+ readonly "2xl": "0px 24px 48px -12px #1018282e";
138
+ readonly "3xl": "0px 32px 64px -12px #10182824";
139
+ };
140
+ declare const focusRings: {
141
+ readonly brand: "0px 0px 0px 4px #9e77ed3d";
142
+ readonly brandShadowXs: "0px 1px 2px 0px #1018280d, 0px 0px 0px 4px #9e77ed3d";
143
+ readonly brandShadowSm: "0px 1px 3px 0px #1018281a, 0px 1px 2px 0px #1018280f, 0px 0px 0px 4px #9e77ed3d";
144
+ readonly gray: "0px 0px 0px 4px #98a2b324";
145
+ readonly grayShadowXs: "0px 1px 2px 0px #1018280d, 0px 0px 0px 4px #98a2b324";
146
+ readonly grayShadowSm: "0px 1px 3px 0px #1018281a, 0px 1px 2px 0px #1018280f, 0px 0px 0px 4px #98a2b324";
147
+ readonly error: "0px 0px 0px 4px #f044383d";
148
+ readonly errorShadowXs: "0px 1px 2px 0px #1018280d, 0px 0px 0px 4px #f044383d";
149
+ };
150
+ declare const fontFamily = "\"Poppins\", sans-serif";
151
+ declare const fontSize: {
152
+ readonly xxs: 11;
153
+ readonly xs: 12;
154
+ readonly sm: 14;
155
+ readonly md: 16;
156
+ readonly lg: 18;
157
+ readonly xl: 20;
158
+ };
159
+ declare const lineHeight: {
160
+ readonly xxs: "16px";
161
+ readonly xs: "18px";
162
+ readonly sm: "20px";
163
+ readonly md: "24px";
164
+ readonly lg: "28px";
165
+ readonly xl: "30px";
166
+ };
167
+ declare const fontWeight: {
168
+ readonly regular: 400;
169
+ readonly medium: 500;
170
+ readonly semibold: 600;
171
+ readonly bold: 700;
172
+ };
173
+ declare const display: {
174
+ readonly "2xl": {
175
+ readonly fontSize: 72;
176
+ readonly lineHeight: "90px";
177
+ readonly letterSpacing: "-0.02em";
178
+ };
179
+ readonly xl: {
180
+ readonly fontSize: 60;
181
+ readonly lineHeight: "72px";
182
+ readonly letterSpacing: "-0.02em";
183
+ };
184
+ readonly lg: {
185
+ readonly fontSize: 48;
186
+ readonly lineHeight: "60px";
187
+ readonly letterSpacing: "-0.02em";
188
+ };
189
+ readonly md: {
190
+ readonly fontSize: 36;
191
+ readonly lineHeight: "44px";
192
+ readonly letterSpacing: "-0.02em";
193
+ };
194
+ readonly sm: {
195
+ readonly fontSize: 30;
196
+ readonly lineHeight: "38px";
197
+ };
198
+ readonly xs: {
199
+ readonly fontSize: 24;
200
+ readonly lineHeight: "32px";
201
+ };
202
+ };
203
+ declare const container: {
204
+ readonly maxWidthDesktop: 1280;
205
+ readonly paddingDesktop: 32;
206
+ readonly paddingMobile: 16;
207
+ };
208
+ declare const widths: {
209
+ readonly xxs: 320;
210
+ readonly xs: 384;
211
+ readonly sm: 480;
212
+ readonly md: 560;
213
+ readonly lg: 640;
214
+ readonly xl: 768;
215
+ readonly "2xl": 1024;
216
+ readonly "3xl": 1280;
217
+ readonly "4xl": 1440;
218
+ readonly "5xl": 1600;
219
+ readonly "6xl": 1920;
220
+ };
221
+ declare const text: {
222
+ readonly primary: "#101828";
223
+ readonly secondary: "#344054";
224
+ readonly secondaryHover: "#182230";
225
+ readonly tertiary: "#475467";
226
+ readonly tertiaryHover: "#344054";
227
+ readonly quaternary: "#667085";
228
+ readonly disabled: "#667085";
229
+ readonly placeholder: "#667085";
230
+ readonly placeholderSubtle: "#d0d5dd";
231
+ readonly white: "#ffffff";
232
+ readonly brandPrimary: "#42307d";
233
+ readonly brandSecondary: "#6941c6";
234
+ readonly brandTertiary: "#7f56d9";
235
+ readonly brandTertiaryAlt: "#7f56d9";
236
+ readonly primaryOnBrand: "#ffffff";
237
+ readonly secondaryOnBrand: "#e9d7fe";
238
+ readonly tertiaryOnBrand: "#e9d7fe";
239
+ readonly quaternaryOnBrand: "#d6bbfb";
240
+ readonly errorPrimary: "#d92d20";
241
+ readonly warningPrimary: "#dc6803";
242
+ readonly successPrimary: "#079455";
243
+ };
244
+ declare const bg: {
245
+ readonly primary: "#ffffff";
246
+ readonly primaryAlt: "#ffffff";
247
+ readonly primaryHover: "#f9fafb";
248
+ readonly primarySolid: "#0c111d";
249
+ readonly secondary: "#f9fafb";
250
+ readonly secondaryAlt: "#f9fafb";
251
+ readonly secondarySubtle: "#fcfcfd";
252
+ readonly secondaryHover: "#f2f4f7";
253
+ readonly secondarySolid: "#475467";
254
+ readonly tertiary: "#f2f4f7";
255
+ readonly quaternary: "#eaecf0";
256
+ readonly active: "#f9fafb";
257
+ readonly disabled: "#f2f4f7";
258
+ readonly disabledSubtle: "#f9fafb";
259
+ readonly overlay: "#0c111d";
260
+ readonly brandPrimary: "#f9f5ff";
261
+ readonly brandPrimaryAlt: "#f9f5ff";
262
+ readonly brandSecondary: "#f4ebff";
263
+ readonly brandSolid: "#7f56d9";
264
+ readonly brandSolidHover: "#6941c6";
265
+ readonly brandSection: "#53389e";
266
+ readonly brandSectionSubtle: "#6941c6";
267
+ readonly errorPrimary: "#fef3f2";
268
+ readonly errorSecondary: "#fee4e2";
269
+ readonly errorSolid: "#d92d20";
270
+ readonly warningPrimary: "#fffaeb";
271
+ readonly warningSecondary: "#fef0c7";
272
+ readonly warningSolid: "#dc6803";
273
+ readonly successPrimary: "#ecfdf3";
274
+ readonly successSecondary: "#dcfae6";
275
+ readonly successSolid: "#079455";
276
+ };
277
+ declare const fg: {
278
+ readonly primary: "#101828";
279
+ readonly secondary: "#344054";
280
+ readonly secondaryHover: "#182230";
281
+ readonly tertiary: "#475467";
282
+ readonly tertiaryHover: "#344054";
283
+ readonly quaternary: "#667085";
284
+ readonly quaternaryHover: "#475467";
285
+ readonly quinary: "#98a2b3";
286
+ readonly quinaryHover: "#667085";
287
+ readonly senary: "#d0d5dd";
288
+ readonly white: "#ffffff";
289
+ readonly disabled: "#98a2b3";
290
+ readonly disabledSubtle: "#d0d5dd";
291
+ readonly brandPrimary: "#7f56d9";
292
+ readonly brandPrimaryAlt: "#7f56d9";
293
+ readonly brandSecondary: "#9e77ed";
294
+ readonly errorPrimary: "#d92d20";
295
+ readonly errorSecondary: "#f04438";
296
+ readonly warningPrimary: "#dc6803";
297
+ readonly warningSecondary: "#f79009";
298
+ readonly successPrimary: "#079455";
299
+ readonly successSecondary: "#17b26a";
300
+ };
301
+ declare const border: {
302
+ readonly primary: "#d0d5dd";
303
+ readonly secondary: "#eaecf0";
304
+ readonly tertiary: "#f2f4f7";
305
+ readonly disabled: "#d0d5dd";
306
+ readonly disabledSubtle: "#eaecf0";
307
+ readonly brand: "#d6bbfb";
308
+ readonly brandSolid: "#7f56d9";
309
+ readonly brandSolidAlt: "#7f56d9";
310
+ readonly error: "#fda29b";
311
+ readonly errorSolid: "#d92d20";
312
+ };
313
+ declare const buttonColors: {
314
+ readonly primary: {
315
+ readonly bg: "#7f56d9";
316
+ readonly bgHover: "#6941c6";
317
+ readonly fg: "#ffffff";
318
+ readonly fgHover: "#ffffff";
319
+ readonly border: "#7f56d9";
320
+ readonly borderHover: "#6941c6";
321
+ };
322
+ readonly secondary: {
323
+ readonly bg: "#ffffff";
324
+ readonly bgHover: "#f9fafb";
325
+ readonly fg: "#344054";
326
+ readonly fgHover: "#182230";
327
+ readonly border: "#d0d5dd";
328
+ readonly borderHover: "#d0d5dd";
329
+ };
330
+ readonly secondaryColor: {
331
+ readonly bg: "#ffffff";
332
+ readonly bgHover: "#f9f5ff";
333
+ readonly fg: "#6941c6";
334
+ readonly fgHover: "#53389e";
335
+ readonly border: "#d6bbfb";
336
+ readonly borderHover: "#d6bbfb";
337
+ };
338
+ readonly tertiary: {
339
+ readonly fg: "#475467";
340
+ readonly fgHover: "#344054";
341
+ readonly bgHover: "#f9fafb";
342
+ };
343
+ readonly tertiaryColor: {
344
+ readonly fg: "#6941c6";
345
+ readonly fgHover: "#53389e";
346
+ readonly bgHover: "#f9f5ff";
347
+ };
348
+ readonly primaryError: {
349
+ readonly bg: "#d92d20";
350
+ readonly bgHover: "#b42318";
351
+ readonly fg: "#ffffff";
352
+ readonly fgHover: "#ffffff";
353
+ readonly border: "#d92d20";
354
+ readonly borderHover: "#b42318";
355
+ };
356
+ readonly secondaryError: {
357
+ readonly bg: "#ffffff";
358
+ readonly bgHover: "#fef3f2";
359
+ readonly fg: "#b42318";
360
+ readonly fgHover: "#912018";
361
+ readonly border: "#fda29b";
362
+ readonly borderHover: "#fda29b";
363
+ };
364
+ readonly tertiaryError: {
365
+ readonly fg: "#b42318";
366
+ readonly fgHover: "#912018";
367
+ readonly bgHover: "#fef3f2";
368
+ };
369
+ };
370
+ declare const avatarColors: {
371
+ readonly bg: "#f2f4f7";
372
+ readonly contrastBorder: "#00000014";
373
+ readonly profilePhotoBorder: "#ffffff";
374
+ readonly focusBorder: "#98a2b324";
375
+ };
376
+ declare const breadcrumbColors: {
377
+ readonly fg: "#475467";
378
+ readonly fgHover: "#344054";
379
+ readonly bgHover: "#f9fafb";
380
+ readonly brandBgHover: "#f9f5ff";
381
+ readonly brandFgHover: "#6941c6";
382
+ readonly iconFg: "#667085";
383
+ readonly iconFgHover: "#344054";
384
+ readonly brandIconFgHover: "#6941c6";
385
+ };
386
+ declare const iconColors: {
387
+ readonly fgBrand: "#7f56d9";
388
+ readonly fgBrandOnBrand: "#e9d7fe";
389
+ readonly featuredModernBorder: "#eaecf0";
390
+ readonly featuredLightFgBrand: "#7f56d9";
391
+ readonly featuredLightFgGray: "#667085";
392
+ readonly featuredLightFgError: "#d92d20";
393
+ readonly featuredLightFgWarning: "#dc6803";
394
+ readonly featuredLightFgSuccess: "#079455";
395
+ readonly featuredDarkFgBrand: "#ffffff";
396
+ readonly featuredDarkFgGray: "#ffffff";
397
+ readonly featuredDarkFgError: "#ffffff";
398
+ readonly featuredDarkFgWarning: "#ffffff";
399
+ readonly featuredDarkFgSuccess: "#ffffff";
400
+ };
401
+ declare const navColors: {
402
+ readonly itemIconFg: "#667085";
403
+ readonly itemIconFgActive: "#667085";
404
+ readonly itemButtonIconFg: "#667085";
405
+ readonly itemButtonIconFgActive: "#344054";
406
+ };
407
+ declare const sliderColors: {
408
+ readonly handleBorder: "#7f56d9";
409
+ readonly handleBg: "#ffffff";
410
+ };
411
+ declare const toggleColors: {
412
+ readonly buttonFgDisabled: "#f9fafb";
413
+ };
414
+ declare const chartColors: {
415
+ readonly axisFg: "#eaecf0";
416
+ readonly gridlineFg: "#f2f4f7";
417
+ readonly labelFg: "#475467";
418
+ readonly labelFgEmphasis: "#344054";
419
+ readonly bg: "#ffffff";
420
+ readonly bgAlt: "#f9fafb";
421
+ readonly tooltipBg: "#0c111d";
422
+ readonly tooltipFg: "#ffffff";
423
+ readonly crosshairFg: "#667085";
424
+ readonly legendFg: "#344054";
425
+ readonly series1Fg: "#1570ef";
426
+ readonly series1FgHover: "#175cd3";
427
+ readonly series1Bg: "#d1e9ff";
428
+ readonly series1BgHover: "#b2ddff";
429
+ readonly series2Fg: "#7f56d9";
430
+ readonly series2FgHover: "#6941c6";
431
+ readonly series2Bg: "#f4ebff";
432
+ readonly series2BgHover: "#e9d7fe";
433
+ };
434
+ declare const alpha: {
435
+ readonly white: {
436
+ readonly 10: "#ffffff1a";
437
+ readonly 20: "#ffffff33";
438
+ readonly 30: "#ffffff4d";
439
+ readonly 40: "#ffffff66";
440
+ readonly 50: "#ffffff80";
441
+ readonly 60: "#ffffff99";
442
+ readonly 70: "#ffffffb3";
443
+ readonly 80: "#ffffffcc";
444
+ readonly 90: "#ffffffe6";
445
+ readonly 100: "#ffffff";
446
+ };
447
+ readonly black: {
448
+ readonly 10: "#0000001a";
449
+ readonly 20: "#00000033";
450
+ readonly 30: "#0000004d";
451
+ readonly 40: "#00000066";
452
+ readonly 50: "#00000080";
453
+ readonly 60: "#00000099";
454
+ readonly 70: "#000000b3";
455
+ readonly 80: "#000000cc";
456
+ readonly 90: "#000000e6";
457
+ readonly 100: "#000000";
458
+ };
459
+ };
460
+
461
+ /** Full set of design tokens that a preset variant must provide. */
462
+ interface DesignTokens {
463
+ colors: typeof colors;
464
+ spacing: typeof spacing;
465
+ radius: typeof radius;
466
+ shadows: typeof shadows$1;
467
+ focusRings: typeof focusRings;
468
+ fontFamily: string;
469
+ fontSize: typeof fontSize;
470
+ lineHeight: typeof lineHeight;
471
+ fontWeight: typeof fontWeight;
472
+ display: typeof display;
473
+ container: typeof container;
474
+ widths: typeof widths;
475
+ text: typeof text;
476
+ bg: typeof bg;
477
+ fg: typeof fg;
478
+ border: typeof border;
479
+ buttonColors: typeof buttonColors;
480
+ avatarColors: typeof avatarColors;
481
+ breadcrumbColors: typeof breadcrumbColors;
482
+ iconColors: typeof iconColors;
483
+ navColors: typeof navColors;
484
+ sliderColors: typeof sliderColors;
485
+ toggleColors: typeof toggleColors;
486
+ chartColors: typeof chartColors;
487
+ alpha: typeof alpha;
488
+ }
489
+ /** Configuration for a single variant within a preset. */
490
+ interface PresetVariantConfig {
491
+ tokens: DesignTokens;
492
+ }
493
+ /** A named theme preset with one or more variants. */
494
+ interface ThemePreset {
495
+ name: string;
496
+ defaultVariant: string;
497
+ variants: Record<string, PresetVariantConfig>;
498
+ }
499
+
500
+ declare const palette: PaletteOptions;
501
+
502
+ declare const typography: TypographyVariantsOptions;
503
+
504
+ declare const components: Components<Theme>;
505
+
506
+ declare const shadows: Shadows;
507
+
508
+ /** Assemble a MUI ThemeOptions object from a full set of design tokens. */
509
+ declare function buildThemeOptions(tokens: DesignTokens): ThemeOptions;
510
+ /** Create a fully resolved MUI Theme from a full set of design tokens. */
511
+ declare function buildTheme(tokens: DesignTokens): Theme;
512
+
513
+ declare const forestPreset: ThemePreset;
514
+
515
+ /** Get a preset by name. Returns `undefined` if not found. */
516
+ declare function getPreset(name: string): ThemePreset | undefined;
517
+ /** Register a custom preset (or override a built-in one). */
518
+ declare function registerPreset(preset: ThemePreset): void;
519
+ /** List all registered preset names. */
520
+ declare function getAvailablePresets(): string[];
521
+
522
+ declare const forestThemeOptions: ThemeOptions;
523
+ declare const forestTheme: _mui_material.Theme;
524
+
525
+ export { registerPreset as A, sliderColors as B, spacing as C, type DesignTokens as D, text as E, toggleColors as F, shadows$1 as G, widths as H, components as I, palette as J, shadows as K, typography as L, type PresetVariantConfig as P, type ThemePreset as T, alpha as a, avatarColors as b, bg as c, border as d, breadcrumbColors as e, buildTheme as f, buildThemeOptions as g, buttonColors as h, chartColors as i, colors as j, container as k, display as l, fg as m, focusRings as n, fontFamily as o, fontSize as p, fontWeight as q, forestPreset as r, forestTheme as s, forestThemeOptions as t, getAvailablePresets as u, getPreset as v, iconColors as w, lineHeight as x, navColors as y, radius as z };