@vritti/quantum-ui 0.1.1 → 0.1.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.
Files changed (104) hide show
  1. package/dist/Button-CCQVCZBc.js +97 -0
  2. package/dist/Button-CCQVCZBc.js.map +1 -0
  3. package/dist/Card-C5V_kLq7.js +41 -0
  4. package/dist/Card-C5V_kLq7.js.map +1 -0
  5. package/dist/TextField-bmiQJ7hv.js +119 -0
  6. package/dist/TextField-bmiQJ7hv.js.map +1 -0
  7. package/dist/ThemeToggle-HP4cegI7.js +78 -0
  8. package/dist/ThemeToggle-HP4cegI7.js.map +1 -0
  9. package/dist/Typography-BCxuB5sP.js +100 -0
  10. package/dist/Typography-BCxuB5sP.js.map +1 -0
  11. package/dist/components/Button.js +1 -19
  12. package/dist/components/Button.js.map +1 -1
  13. package/dist/components/Card.js +2 -0
  14. package/dist/components/Card.js.map +1 -0
  15. package/dist/components/TextField.js +1 -28
  16. package/dist/components/TextField.js.map +1 -1
  17. package/dist/components/ThemeToggle.js +2 -0
  18. package/dist/components/ThemeToggle.js.map +1 -0
  19. package/dist/components/Typography.js +1 -41
  20. package/dist/components/Typography.js.map +1 -1
  21. package/dist/index-B_dX4wQk.js +123 -0
  22. package/dist/index-B_dX4wQk.js.map +1 -0
  23. package/dist/index.js +6 -92
  24. package/dist/index.js.map +1 -1
  25. package/dist/lib/components/Button/Button.d.ts +10 -0
  26. package/dist/lib/components/Button/Button.d.ts.map +1 -0
  27. package/dist/lib/components/Button/index.d.ts +2 -0
  28. package/dist/lib/components/Button/index.d.ts.map +1 -0
  29. package/dist/lib/components/Card/Card.d.ts +2 -0
  30. package/dist/lib/components/Card/Card.d.ts.map +1 -0
  31. package/dist/lib/components/Card/index.d.ts +2 -0
  32. package/dist/lib/components/Card/index.d.ts.map +1 -0
  33. package/dist/lib/components/TextField/TextField.d.ts +8 -0
  34. package/dist/lib/components/TextField/TextField.d.ts.map +1 -0
  35. package/dist/lib/components/TextField/index.d.ts +2 -0
  36. package/dist/lib/components/TextField/index.d.ts.map +1 -0
  37. package/dist/lib/components/ThemeToggle/ThemeToggle.d.ts +7 -0
  38. package/dist/lib/components/ThemeToggle/ThemeToggle.d.ts.map +1 -0
  39. package/dist/lib/components/ThemeToggle/index.d.ts +2 -0
  40. package/dist/lib/components/ThemeToggle/index.d.ts.map +1 -0
  41. package/dist/lib/components/Typography/Typography.d.ts +10 -0
  42. package/dist/lib/components/Typography/Typography.d.ts.map +1 -0
  43. package/dist/lib/components/Typography/index.d.ts +2 -0
  44. package/dist/lib/components/Typography/index.d.ts.map +1 -0
  45. package/dist/lib/components/index.d.ts +6 -0
  46. package/dist/lib/components/index.d.ts.map +1 -0
  47. package/dist/lib/index.d.ts +3 -0
  48. package/dist/lib/index.d.ts.map +1 -0
  49. package/dist/utils-BLJyPY44.js +2963 -0
  50. package/dist/utils-BLJyPY44.js.map +1 -0
  51. package/package.json +23 -13
  52. package/readme.md +72 -60
  53. package/dist/ThemeScript-BcAiGxU5.js +0 -1586
  54. package/dist/ThemeScript-BcAiGxU5.js.map +0 -1
  55. package/dist/components/Button/Button.d.ts +0 -11
  56. package/dist/components/Button/Button.d.ts.map +0 -1
  57. package/dist/components/Button/index.d.ts +0 -3
  58. package/dist/components/Button/index.d.ts.map +0 -1
  59. package/dist/components/Paper/Paper.d.ts +0 -14
  60. package/dist/components/Paper/Paper.d.ts.map +0 -1
  61. package/dist/components/Paper/index.d.ts +0 -3
  62. package/dist/components/Paper/index.d.ts.map +0 -1
  63. package/dist/components/Paper.js +0 -27
  64. package/dist/components/Paper.js.map +0 -1
  65. package/dist/components/TextField/TextField.d.ts +0 -13
  66. package/dist/components/TextField/TextField.d.ts.map +0 -1
  67. package/dist/components/TextField/index.d.ts +0 -3
  68. package/dist/components/TextField/index.d.ts.map +0 -1
  69. package/dist/components/Typography/Typography.d.ts +0 -8
  70. package/dist/components/Typography/Typography.d.ts.map +0 -1
  71. package/dist/components/Typography/index.d.ts +0 -3
  72. package/dist/components/Typography/index.d.ts.map +0 -1
  73. package/dist/components/index.d.ts +0 -9
  74. package/dist/components/index.d.ts.map +0 -1
  75. package/dist/index.d.ts +0 -8
  76. package/dist/index.d.ts.map +0 -1
  77. package/dist/next.d.ts +0 -4
  78. package/dist/next.d.ts.map +0 -1
  79. package/dist/next.js +0 -2
  80. package/dist/next.js.map +0 -1
  81. package/dist/theme/ThemeProvider.d.ts +0 -9
  82. package/dist/theme/ThemeProvider.d.ts.map +0 -1
  83. package/dist/theme/ThemeScript.d.ts +0 -11
  84. package/dist/theme/ThemeScript.d.ts.map +0 -1
  85. package/dist/theme/components/Button.d.ts +0 -3
  86. package/dist/theme/components/Button.d.ts.map +0 -1
  87. package/dist/theme/components/Paper.d.ts +0 -3
  88. package/dist/theme/components/Paper.d.ts.map +0 -1
  89. package/dist/theme/components/TextField.d.ts +0 -3
  90. package/dist/theme/components/TextField.d.ts.map +0 -1
  91. package/dist/theme/components/index.d.ts +0 -4
  92. package/dist/theme/components/index.d.ts.map +0 -1
  93. package/dist/theme/createTheme.d.ts +0 -2
  94. package/dist/theme/createTheme.d.ts.map +0 -1
  95. package/dist/theme/cssVariableGenerator.d.ts +0 -4
  96. package/dist/theme/cssVariableGenerator.d.ts.map +0 -1
  97. package/dist/theme/index.d.ts +0 -8
  98. package/dist/theme/index.d.ts.map +0 -1
  99. package/dist/theme/palette.d.ts +0 -88
  100. package/dist/theme/palette.d.ts.map +0 -1
  101. package/dist/theme/semanticTokens.d.ts +0 -142
  102. package/dist/theme/semanticTokens.d.ts.map +0 -1
  103. package/dist/theme/useTheme.d.ts +0 -12
  104. package/dist/theme/useTheme.d.ts.map +0 -1
@@ -1,1586 +0,0 @@
1
- import { createTheme } from '@mui/material/styles';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- const ButtonTheme = {
5
- styleOverrides: {
6
- root: {
7
- borderRadius: "var(--quantum-borderRadius-medium)",
8
- fontFamily: "var(--quantum-typography-fontFamily-display)",
9
- // Space Grotesk for buttons
10
- fontWeight: "var(--quantum-typography-fontWeight-medium)",
11
- fontSize: "var(--quantum-typography-variants-button-fontSize)",
12
- lineHeight: "var(--quantum-typography-variants-button-lineHeight)",
13
- textTransform: "none",
14
- transition: "all var(--quantum-animation-duration-normal) var(--quantum-animation-easing-standard)",
15
- cursor: "pointer",
16
- position: "relative",
17
- overflow: "hidden",
18
- "&:focus-visible": {
19
- outline: "2px solid var(--quantum-color-action-primary)",
20
- outlineOffset: "2px"
21
- },
22
- "&:disabled": {
23
- opacity: 0.5,
24
- cursor: "not-allowed",
25
- transform: "none",
26
- // Disable all effects when disabled
27
- "&::before, &::after": {
28
- display: "none"
29
- }
30
- },
31
- "&:hover:not(:disabled)": {
32
- transform: "translateY(-1px)"
33
- },
34
- "&:active": {
35
- transform: "translateY(0)"
36
- },
37
- // ======================
38
- // PRIMARY: PROMINENT CONFIDENCE
39
- // ======================
40
- "&[data-intent='primary']": {
41
- backgroundColor: "var(--quantum-color-action-primary)",
42
- color: "var(--quantum-color-text-onPrimary)",
43
- border: "none",
44
- boxShadow: "0 4px 14px 0 rgba(var(--quantum-color-action-primaryRGB), 0.3)",
45
- // Confident energy field - slower rotating radial gradient with primary color only
46
- "&::before": {
47
- content: '""',
48
- position: "absolute",
49
- inset: "-2px",
50
- background: `
51
- radial-gradient(
52
- ellipse at top left,
53
- var(--quantum-color-action-primary) 0%,
54
- transparent 50%
55
- ),
56
- radial-gradient(
57
- ellipse at bottom right,
58
- var(--quantum-color-action-primary) 0%,
59
- transparent 50%
60
- )
61
- `,
62
- borderRadius: "inherit",
63
- zIndex: -1,
64
- opacity: 0,
65
- animation: "quantumConfidenceRotate 6s linear infinite",
66
- "@media (prefers-reduced-motion: reduce)": {
67
- animation: "none"
68
- }
69
- },
70
- "&:hover:not(:disabled)": {
71
- // ✅ FIXED: Using CSS color-mix instead of hardcoded values
72
- backgroundColor: "color-mix(in srgb, var(--quantum-color-action-primary) 85%, var(--quantum-color-text-primary))",
73
- boxShadow: `
74
- 0 6px 10px 0 rgba(var(--quantum-color-action-primaryRGB), 0.4),
75
- 0 0 10px rgba(var(--quantum-color-action-primaryRGB), 0.6),
76
- inset 0 0 10px var(--quantum-effects-shimmer)
77
- `,
78
- transform: "translateY(-2px)",
79
- "&::before": {
80
- opacity: 0.6
81
- }
82
- },
83
- // ✅ UNIFIED: Click energy burst effect
84
- "&:active::after": {
85
- content: '""',
86
- position: "absolute",
87
- top: "50%",
88
- left: "50%",
89
- width: "100%",
90
- height: "100%",
91
- background: "radial-gradient(circle, rgba(var(--quantum-color-action-primaryRGB), 0.6) 0%, transparent 70%)",
92
- borderRadius: "50%",
93
- transform: "translate(-50%, -50%) scale(0)",
94
- animation: "quantumEnergyBurst 0.5s ease-out",
95
- "@media (prefers-reduced-motion: reduce)": {
96
- animation: "none",
97
- opacity: 0
98
- }
99
- }
100
- },
101
- // ======================
102
- // SECONDARY: NOTICEABLE INTELLIGENCE
103
- // ======================
104
- "&[data-intent='secondary']": {
105
- backgroundColor: "transparent",
106
- color: "var(--quantum-color-action-primary)",
107
- border: "1.5px solid var(--quantum-color-action-primary)",
108
- boxShadow: "none",
109
- "&:hover:not(:disabled)": {
110
- backgroundColor: "rgba(var(--quantum-color-action-secondaryRGB), 0.08)",
111
- borderColor: "var(--quantum-color-action-secondary)",
112
- boxShadow: "0 2px 8px rgba(var(--quantum-color-action-secondaryRGB), 0.5)",
113
- color: "var(--quantum-color-action-secondary)"
114
- }
115
- },
116
- // ======================
117
- // DESTRUCTIVE: PROMINENT WARNING (IDENTICAL TO PRIMARY)
118
- // ======================
119
- "&[data-intent='destructive']": {
120
- backgroundColor: "var(--quantum-color-feedback-error)",
121
- color: "var(--quantum-color-text-onDestructive)",
122
- border: "none",
123
- boxShadow: "0 4px 14px 0 rgba(var(--quantum-color-feedback-errorRGB), 0.3)",
124
- // ✅ UNIFIED: Identical confidence energy field effect (same as primary)
125
- "&::before": {
126
- content: '""',
127
- position: "absolute",
128
- inset: "-2px",
129
- background: `
130
- radial-gradient(
131
- ellipse at top left,
132
- var(--quantum-color-feedback-error) 0%,
133
- transparent 50%
134
- ),
135
- radial-gradient(
136
- ellipse at bottom right,
137
- var(--quantum-color-feedback-error) 0%,
138
- transparent 50%
139
- )
140
- `,
141
- borderRadius: "inherit",
142
- zIndex: -1,
143
- opacity: 0,
144
- animation: "quantumConfidenceRotate 6s linear infinite",
145
- // ✅ UNIFIED: Same timing as primary
146
- "@media (prefers-reduced-motion: reduce)": {
147
- animation: "none"
148
- }
149
- },
150
- "&:hover:not(:disabled)": {
151
- // ✅ UNIFIED: Same hover effects as primary
152
- backgroundColor: "color-mix(in srgb, var(--quantum-color-feedback-error) 85%, var(--quantum-color-text-primary))",
153
- boxShadow: `
154
- 0 6px 10px 0 rgba(var(--quantum-color-feedback-errorRGB), 0.4),
155
- 0 0 10px rgba(var(--quantum-color-feedback-errorRGB), 0.6),
156
- inset 0 0 10px var(--quantum-effects-shimmer)
157
- `,
158
- transform: "translateY(-2px)",
159
- "&::before": {
160
- opacity: 0.6
161
- }
162
- },
163
- // ✅ UNIFIED: Identical click energy burst effect
164
- "&:active::after": {
165
- content: '""',
166
- position: "absolute",
167
- top: "50%",
168
- left: "50%",
169
- width: "100%",
170
- height: "100%",
171
- background: "radial-gradient(circle, rgba(var(--quantum-color-feedback-errorRGB), 0.6) 0%, transparent 70%)",
172
- borderRadius: "50%",
173
- transform: "translate(-50%, -50%) scale(0)",
174
- animation: "quantumEnergyBurst 0.5s ease-out",
175
- "@media (prefers-reduced-motion: reduce)": {
176
- animation: "none",
177
- opacity: 0
178
- }
179
- }
180
- },
181
- // ======================
182
- // GHOST: SUBTLE PRESENCE
183
- // ======================
184
- "&[data-intent='ghost']": {
185
- backgroundColor: "transparent",
186
- color: "var(--quantum-color-text-secondary)",
187
- border: "none",
188
- boxShadow: "none",
189
- // Subtle intelligence hint
190
- "&::before": {
191
- content: '""',
192
- position: "absolute",
193
- inset: 0,
194
- background: `radial-gradient(
195
- circle at center,
196
- rgba(var(--quantum-color-action-primaryRGB), 0.05) 0%,
197
- transparent 70%
198
- )`,
199
- borderRadius: "inherit",
200
- opacity: 0,
201
- transition: "opacity 0.4s ease"
202
- },
203
- "&:hover:not(:disabled)": {
204
- backgroundColor: "var(--quantum-color-surface-secondary)",
205
- color: "var(--quantum-color-action-primary)",
206
- boxShadow: "0 2px 8px rgba(var(--quantum-color-action-primaryRGB), 0.1)",
207
- "&::before": {
208
- opacity: 1
209
- }
210
- }
211
- }
212
- },
213
- // ✅ ENHANCED: Consistent size variants with proper scaling
214
- sizeSmall: {
215
- padding: "var(--quantum-spacing-tight) var(--quantum-spacing-comfortable)",
216
- fontSize: "var(--quantum-typography-variants-caption-fontSize)",
217
- lineHeight: "var(--quantum-typography-variants-caption-lineHeight)",
218
- minHeight: "32px"
219
- },
220
- sizeMedium: {
221
- padding: "var(--quantum-spacing-normal) var(--quantum-spacing-spacious)",
222
- fontSize: "var(--quantum-typography-variants-button-fontSize)",
223
- lineHeight: "var(--quantum-typography-variants-button-lineHeight)",
224
- minHeight: "40px"
225
- },
226
- sizeLarge: {
227
- padding: "var(--quantum-spacing-comfortable) var(--quantum-spacing-loose)",
228
- fontSize: "var(--quantum-typography-variants-body2-fontSize)",
229
- lineHeight: "var(--quantum-typography-variants-body2-lineHeight)",
230
- minHeight: "48px"
231
- }
232
- }
233
- };
234
-
235
- const PaperTheme = {
236
- styleOverrides: {
237
- root: {
238
- borderRadius: "var(--quantum-borderRadius-medium)",
239
- transition: "all var(--quantum-animation-duration-normal) var(--quantum-animation-easing-standard)",
240
- // ========================================
241
- // NEW: Universal variants for landing pages, apps, and forms
242
- // ========================================
243
- "&[data-variant='section']": {
244
- backgroundColor: "var(--quantum-color-surface-secondary)",
245
- borderRadius: "var(--quantum-borderRadius-medium)",
246
- padding: "var(--quantum-spacing-comfortable)",
247
- border: "1px solid var(--quantum-color-border-subtle)",
248
- boxShadow: "var(--quantum-shadows-small)",
249
- transition: "all var(--quantum-animation-duration-normal) var(--quantum-animation-easing-standard)",
250
- // Responsive padding
251
- "@media (min-width: 768px)": {
252
- padding: "var(--quantum-spacing-spacious)",
253
- borderRadius: "var(--quantum-borderRadius-large)"
254
- },
255
- // Full-width for landing pages
256
- "&[data-fullwidth='true']": {
257
- borderRadius: "0",
258
- border: "none",
259
- padding: "var(--quantum-spacing-loose) var(--quantum-spacing-normal)"
260
- }
261
- },
262
- "&[data-variant='surface']": {
263
- backgroundColor: "var(--quantum-color-surface-primary)",
264
- borderRadius: "var(--quantum-borderRadius-large)",
265
- border: "1px solid var(--quantum-color-border-default)",
266
- boxShadow: "var(--quantum-shadows-medium)",
267
- padding: "var(--quantum-spacing-comfortable)",
268
- transition: "all var(--quantum-animation-duration-normal) var(--quantum-animation-easing-standard)",
269
- // Interactive state for forms/apps
270
- "&:hover": {
271
- borderColor: "var(--quantum-color-border-glassAccent)",
272
- boxShadow: "var(--quantum-shadows-large)"
273
- },
274
- // Focus state for form containers
275
- "&:focus-within": {
276
- borderColor: "var(--quantum-color-action-primary)",
277
- boxShadow: "0 0 0 3px rgba(var(--quantum-color-action-primaryRGB), 0.1)"
278
- }
279
- },
280
- "&[data-variant='accent']": {
281
- background: "linear-gradient(135deg, rgba(var(--quantum-color-action-primaryRGB), 0.08) 0%, rgba(var(--quantum-color-action-primaryRGB), 0.12) 100%)",
282
- borderRadius: "var(--quantum-borderRadius-large)",
283
- border: "1px solid rgba(var(--quantum-color-action-primaryRGB), 0.2)",
284
- boxShadow: "var(--quantum-shadows-glass)",
285
- backdropFilter: "var(--quantum-glassmorphism-backdropLight)",
286
- padding: "var(--quantum-spacing-comfortable)",
287
- position: "relative",
288
- transition: "all var(--quantum-animation-duration-normal) var(--quantum-animation-easing-standard)",
289
- // Subtle glow effect
290
- "&::before": {
291
- content: '""',
292
- position: "absolute",
293
- top: "0",
294
- left: "0",
295
- right: "0",
296
- height: "1px",
297
- background: "linear-gradient(90deg, transparent 0%, rgba(var(--quantum-color-action-primaryRGB), 0.3) 50%, transparent 100%)",
298
- borderRadius: "var(--quantum-borderRadius-large) var(--quantum-borderRadius-large) 0 0"
299
- },
300
- // Enhanced for landing page CTAs
301
- "&[data-emphasis='high']": {
302
- background: "linear-gradient(135deg, rgba(var(--quantum-color-action-primaryRGB), 0.15) 0%, rgba(var(--quantum-color-action-primaryRGB), 0.2) 100%)",
303
- border: "2px solid rgba(var(--quantum-color-action-primaryRGB), 0.3)",
304
- boxShadow: "var(--quantum-shadows-glass), 0 0 20px rgba(var(--quantum-color-action-primaryRGB), 0.15)"
305
- }
306
- },
307
- "&[data-variant='minimal']": {
308
- backgroundColor: "var(--quantum-color-surface-input)",
309
- borderRadius: "var(--quantum-borderRadius-medium)",
310
- border: "1px solid var(--quantum-color-border-subtle)",
311
- padding: "var(--quantum-spacing-normal)",
312
- transition: "all var(--quantum-animation-duration-fast) var(--quantum-animation-easing-standard)",
313
- // Form input styling
314
- "&[data-input='true']": {
315
- backgroundColor: "var(--quantum-color-surface-input)",
316
- padding: "var(--quantum-textField-spacing-paddingTop) var(--quantum-textField-spacing-paddingLeft)",
317
- minHeight: "var(--quantum-textField-height)",
318
- display: "flex",
319
- alignItems: "center"
320
- },
321
- // Hover state
322
- "&:hover": {
323
- backgroundColor: "var(--quantum-color-surface-secondary)",
324
- borderColor: "var(--quantum-color-border-default)"
325
- },
326
- // Navigation/sidebar styling
327
- "&[data-nav='true']": {
328
- backgroundColor: "var(--quantum-color-surface-glass)",
329
- backdropFilter: "var(--quantum-glassmorphism-backdrop)",
330
- border: "1px solid var(--quantum-color-border-glass)"
331
- }
332
- },
333
- "&[data-variant='feature']": {
334
- backgroundColor: "var(--quantum-color-surface-elevated)",
335
- borderRadius: "var(--quantum-borderRadius-large)",
336
- border: "1px solid var(--quantum-color-border-default)",
337
- boxShadow: "var(--quantum-shadows-large)",
338
- padding: "var(--quantum-spacing-spacious)",
339
- position: "relative",
340
- overflow: "hidden",
341
- transition: "all var(--quantum-animation-duration-slow) var(--quantum-animation-easing-standard)",
342
- // Premium shine effect
343
- "&::before": {
344
- content: '""',
345
- position: "absolute",
346
- top: "0",
347
- left: "-100%",
348
- width: "100%",
349
- height: "100%",
350
- background: "linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%)",
351
- transition: "left var(--quantum-animation-duration-slow) var(--quantum-animation-easing-standard)"
352
- },
353
- // Interactive hover state
354
- "&:hover": {
355
- transform: "translateY(-8px)",
356
- boxShadow: "var(--quantum-shadows-xl)",
357
- borderColor: "var(--quantum-color-border-glassAccent)",
358
- "&::before": {
359
- left: "100%"
360
- }
361
- },
362
- // Glass variant for landing pages
363
- "&[data-glass='true']": {
364
- backgroundColor: "var(--quantum-color-surface-glass)",
365
- backdropFilter: "var(--quantum-glassmorphism-backdrop)",
366
- border: "1px solid var(--quantum-color-border-glass)",
367
- boxShadow: "var(--quantum-shadows-glass)"
368
- },
369
- // Compact variant for app UI
370
- "&[data-compact='true']": {
371
- padding: "var(--quantum-spacing-comfortable)",
372
- borderRadius: "var(--quantum-borderRadius-large)"
373
- }
374
- }
375
- }
376
- }
377
- };
378
-
379
- const TextFieldTheme = {
380
- styleOverrides: {
381
- root: {
382
- fontFamily: "var(--quantum-typography-fontFamily)",
383
- minWidth: "var(--quantum-textField-minWidth)",
384
- "& .MuiInputLabel-root": {
385
- fontFamily: "var(--quantum-typography-fontFamily-display)",
386
- fontSize: "var(--quantum-textField-fontSize)",
387
- fontWeight: "var(--quantum-typography-fontWeight-normal)",
388
- color: "var(--quantum-color-text-secondary)",
389
- "&.Mui-focused": {
390
- fontWeight: "var(--quantum-typography-fontWeight-normal)",
391
- color: "var(--quantum-color-text-secondary)"
392
- },
393
- "&.MuiInputLabel-shrunk": {
394
- fontSize: "var(--quantum-typography-fontSize-caption)",
395
- fontWeight: "var(--quantum-typography-fontWeight-normal)"
396
- },
397
- "&.Mui-disabled": {
398
- color: "var(--quantum-color-text-disabled)"
399
- }
400
- },
401
- "& .MuiFilledInput-root": {
402
- borderRadius: "var(--quantum-borderRadius-large)",
403
- backgroundColor: "var(--quantum-color-surface-input)",
404
- fontSize: "var(--quantum-textField-fontSize)",
405
- transition: "none",
406
- border: "1px solid var(--quantum-color-border-subtle)",
407
- minHeight: "var(--quantum-textField-height)",
408
- backdropFilter: "blur(8px)",
409
- boxShadow: "var(--quantum-shadows-textField)",
410
- "&:before": {
411
- display: "none"
412
- },
413
- "&:hover:not(.Mui-disabled):before": {
414
- display: "none"
415
- },
416
- "&:after": {
417
- display: "none"
418
- },
419
- "&:hover:not(.Mui-focused):not(.Mui-disabled)": {
420
- borderColor: "var(--quantum-color-action-primary)",
421
- boxShadow: "var(--quantum-shadows-textField)"
422
- },
423
- "&.Mui-focused": {
424
- backgroundColor: "var(--quantum-color-surface-input)",
425
- borderColor: "var(--quantum-color-action-primary)",
426
- boxShadow: "var(--quantum-shadows-large), 0 0 20px rgba(var(--quantum-color-action-primaryRGB), 0.15)"
427
- },
428
- "&.Mui-error": {
429
- borderColor: "var(--quantum-color-feedback-error)",
430
- boxShadow: "0 0 12px rgba(var(--quantum-color-feedback-errorRGB), 0.2)"
431
- },
432
- "&.Mui-disabled": {
433
- backgroundColor: "var(--quantum-color-surface-secondary)",
434
- borderColor: "var(--quantum-color-border-subtle)",
435
- opacity: 0.6
436
- }
437
- },
438
- "& .MuiFilledInput-input": {
439
- paddingTop: "var(--quantum-textField-spacing-paddingTop)",
440
- paddingBottom: "var(--quantum-textField-spacing-paddingBottom)",
441
- paddingLeft: "var(--quantum-textField-spacing-paddingLeft)",
442
- paddingRight: "0px",
443
- height: "auto",
444
- color: "var(--quantum-color-text-primary)",
445
- fontSize: "var(--quantum-textField-fontSize)",
446
- fontWeight: "var(--quantum-typography-fontWeight-medium)",
447
- fontFamily: "var(--quantum-typography-fontFamily-primary)",
448
- letterSpacing: "-0.01em",
449
- "&::placeholder": {
450
- color: "var(--quantum-color-text-primary)",
451
- opacity: 0.6,
452
- fontWeight: "var(--quantum-typography-fontWeight-normal)"
453
- },
454
- "&:focus::placeholder": {
455
- color: "var(--quantum-color-text-primary)",
456
- opacity: 0.4,
457
- fontWeight: "var(--quantum-typography-fontWeight-light)"
458
- },
459
- "&:disabled": {
460
- color: "var(--quantum-color-text-disabled)",
461
- WebkitTextFillColor: "var(--quantum-color-text-disabled)"
462
- }
463
- },
464
- "& .MuiFormHelperText-root": {
465
- fontFamily: "var(--quantum-typography-variants-caption-fontFamily)",
466
- fontSize: "var(--quantum-typography-variants-caption-fontSize)",
467
- fontWeight: "var(--quantum-typography-variants-caption-fontWeight)",
468
- lineHeight: "var(--quantum-typography-variants-caption-lineHeight)",
469
- letterSpacing: "var(--quantum-typography-variants-caption-letterSpacing)",
470
- marginTop: "6px",
471
- marginLeft: "12px",
472
- color: "var(--quantum-color-text-secondary)",
473
- "&.Mui-error": {
474
- color: "var(--quantum-color-feedback-error)"
475
- },
476
- "&.Mui-disabled": {
477
- color: "var(--quantum-color-text-disabled)"
478
- }
479
- }
480
- }
481
- },
482
- variants: [
483
- // State variants with proper color theming
484
- {
485
- props: { color: "success" },
486
- style: {
487
- "& .MuiFilledInput-root": {
488
- borderColor: "var(--quantum-color-feedback-success)",
489
- boxShadow: "0 0 12px rgba(var(--quantum-color-feedback-successRGB), 0.2)",
490
- "&.Mui-focused": {
491
- borderColor: "var(--quantum-color-feedback-success)",
492
- boxShadow: "var(--quantum-shadows-large), 0 0 20px rgba(var(--quantum-color-feedback-successRGB), 0.15)"
493
- }
494
- },
495
- "& .MuiInputLabel-root.Mui-focused": {
496
- color: "var(--quantum-color-feedback-success)"
497
- },
498
- "& .MuiFormHelperText-root:not(.Mui-error)": {
499
- color: "var(--quantum-color-feedback-success)"
500
- }
501
- }
502
- },
503
- {
504
- props: { color: "warning" },
505
- style: {
506
- "& .MuiFilledInput-root": {
507
- borderColor: "var(--quantum-color-feedback-warning)",
508
- boxShadow: "0 0 12px rgba(var(--quantum-color-feedback-warningRGB), 0.2)",
509
- "&.Mui-focused": {
510
- borderColor: "var(--quantum-color-feedback-warning)",
511
- boxShadow: "var(--quantum-shadows-large), 0 0 20px rgba(var(--quantum-color-feedback-warningRGB), 0.15)"
512
- }
513
- },
514
- "& .MuiInputLabel-root.Mui-focused": {
515
- color: "var(--quantum-color-feedback-warning)"
516
- },
517
- "& .MuiFormHelperText-root:not(.Mui-error)": {
518
- color: "var(--quantum-color-feedback-warning)"
519
- }
520
- }
521
- },
522
- {
523
- props: { color: "error" },
524
- style: {
525
- "& .MuiInputLabel-root.Mui-focused": {
526
- color: "var(--quantum-color-feedback-error)"
527
- }
528
- }
529
- },
530
- {
531
- props: { color: "primary" },
532
- style: {
533
- "& .MuiInputLabel-root.Mui-focused": {
534
- color: "var(--quantum-color-action-primary)"
535
- }
536
- }
537
- }
538
- ]
539
- };
540
-
541
- const palette = {
542
- // Universal Primary Blue (Excellent contrast both modes)
543
- universalBlue: {
544
- 25: "#F8FAFF",
545
- // Very subtle blue tint for input backgrounds
546
- 50: "#EBF4FF",
547
- 300: "#85B8FF",
548
- 400: "#4A95FF",
549
- 500: "#0066CC",
550
- 950: "#000A14"
551
- },
552
- // High Contrast Neutrals for Light Mode
553
- lightNeutral: {
554
- 50: "#FFFFFF",
555
- // Pure white for maximum contrast
556
- 100: "#F8F9FA",
557
- // Very light gray
558
- 200: "#E9ECEF",
559
- // Light border
560
- 300: "#DEE2E6",
561
- // Subtle elements
562
- 500: "#6C757D",
563
- // Secondary text (9:1 contrast)
564
- 700: "#343A40",
565
- // Very strong text (16:1 contrast)
566
- 900: "#000000"},
567
- // High Contrast Neutrals for Dark Mode
568
- darkNeutral: {
569
- 50: "#FFFFFF",
570
- // Light text (16:1 contrast)
571
- 300: "#CED4DA",
572
- // Muted text (7:1 contrast)
573
- 500: "#495057",
574
- // Subtle elements
575
- 600: "#343A40",
576
- // Dark elements
577
- 700: "#212529",
578
- // Very dark surface
579
- 800: "#1A1D20",
580
- // Dark surface
581
- 900: "#0D1117",
582
- // Primary dark background
583
- 950: "#000000"
584
- // Maximum dark
585
- },
586
- // Secondary Accent (Complementary to blue)
587
- emeraldAccent: {
588
- 500: "#10B981"},
589
- // Status Colors (High contrast)
590
- red: {
591
- 500: "#DC2626"},
592
- amber: {
593
- 500: "#D97706"},
594
- emerald: {
595
- 500: "#059669"},
596
- blue: {
597
- 500: "#2563EB"},
598
- // Pure colors (Maximum contrast references)
599
- pure: {
600
- white: "#FFFFFF"}
601
- };
602
-
603
- const generateCSSVariablesFromTokens = (tokens, prefix = "quantum") => {
604
- const cssVariables = {};
605
- const traverse = (obj, path = []) => {
606
- if (typeof obj === "object" && obj !== null) {
607
- Object.entries(obj).forEach(([key, value]) => {
608
- const currentPath = [...path, key];
609
- if (typeof value === "string" || typeof value === "number") {
610
- const variableName = `--${prefix}-${currentPath.join("-")}`;
611
- cssVariables[variableName] = String(value);
612
- } else if (typeof value === "object" && value !== null) {
613
- traverse(value, currentPath);
614
- }
615
- });
616
- }
617
- };
618
- traverse(tokens);
619
- return cssVariables;
620
- };
621
-
622
- const SEMANTIC_TOKENS = {
623
- colors: {
624
- // Action colors
625
- action: {
626
- primary: {
627
- light: palette.universalBlue[500],
628
- dark: palette.universalBlue[500],
629
- needsRGB: true
630
- },
631
- secondary: {
632
- light: palette.emeraldAccent[500],
633
- dark: palette.emeraldAccent[500],
634
- needsRGB: true
635
- },
636
- destructive: {
637
- light: palette.red[500],
638
- dark: palette.red[500],
639
- needsRGB: true
640
- }
641
- },
642
- // Surface colors
643
- surface: {
644
- primary: {
645
- light: palette.lightNeutral[50],
646
- // Pure white
647
- dark: palette.darkNeutral[900]
648
- // Deep dark
649
- },
650
- input: {
651
- light: palette.universalBlue[25],
652
- // "#F8FAFF" - very subtle blue tint for inputs
653
- dark: palette.universalBlue[950]
654
- // "#000A14" - deep blue-black for inputs
655
- },
656
- secondary: {
657
- light: palette.lightNeutral[100],
658
- // Very light gray
659
- dark: palette.darkNeutral[900]
660
- // Dark surface
661
- },
662
- elevated: {
663
- light: palette.pure.white,
664
- dark: palette.darkNeutral[900]
665
- },
666
- glass: {
667
- light: palette.lightNeutral[200],
668
- // Light glass surface
669
- dark: palette.darkNeutral[800]
670
- // Dark glass surface
671
- },
672
- glassHover: {
673
- light: palette.lightNeutral[100],
674
- // Slightly lighter on hover
675
- dark: palette.darkNeutral[700]
676
- // Lighter dark surface on hover
677
- },
678
- interactive: {
679
- light: palette.universalBlue[50],
680
- // Very subtle blue tint
681
- dark: palette.universalBlue[950]
682
- // Deep blue tint for dark mode
683
- },
684
- overlay: {
685
- light: palette.darkNeutral[900],
686
- // Dark overlay
687
- dark: palette.darkNeutral[950],
688
- // Darker overlay for dark mode
689
- needsRGB: true
690
- }
691
- },
692
- // Text colors
693
- text: {
694
- primary: {
695
- light: palette.lightNeutral[900],
696
- // Pure black
697
- dark: palette.darkNeutral[50],
698
- // Pure white
699
- needsRGB: true
700
- },
701
- secondary: {
702
- light: palette.lightNeutral[700],
703
- // High contrast secondary
704
- dark: palette.darkNeutral[300]
705
- // High contrast secondary dark
706
- },
707
- disabled: {
708
- light: palette.lightNeutral[500],
709
- dark: palette.darkNeutral[500]
710
- }
711
- },
712
- // Feedback colors
713
- feedback: {
714
- success: {
715
- light: palette.emerald[500],
716
- dark: palette.emerald[500],
717
- needsRGB: true
718
- },
719
- warning: {
720
- light: palette.amber[500],
721
- dark: palette.amber[500],
722
- needsRGB: true
723
- },
724
- error: {
725
- light: palette.red[500],
726
- dark: palette.red[500],
727
- needsRGB: true
728
- },
729
- info: {
730
- light: palette.blue[500],
731
- dark: palette.blue[500]
732
- }
733
- },
734
- // Border colors
735
- border: {
736
- default: {
737
- light: palette.lightNeutral[300],
738
- dark: palette.darkNeutral[600]
739
- },
740
- subtle: {
741
- light: palette.lightNeutral[200],
742
- dark: palette.darkNeutral[700]
743
- },
744
- glass: {
745
- light: palette.lightNeutral[300],
746
- // Light glass border
747
- dark: palette.darkNeutral[600]
748
- // Dark glass border
749
- },
750
- glassAccent: {
751
- light: palette.universalBlue[300],
752
- // Blue accent border
753
- dark: palette.universalBlue[400]
754
- // Slightly brighter for dark mode
755
- }
756
- }
757
- },
758
- // Effects - static values
759
- effects: {
760
- shimmer: {
761
- light: "rgba(255, 255, 255, 0.1)",
762
- // White shimmer for light mode
763
- dark: "rgba(255, 255, 255, 0.05)"
764
- // Subtle white shimmer for dark mode
765
- }
766
- },
767
- // Border radius - responsive values
768
- borderRadius: {
769
- none: {
770
- mobile: "0px",
771
- tablet: "0px",
772
- desktop: "0px"
773
- },
774
- small: {
775
- mobile: "3px",
776
- tablet: "4px",
777
- desktop: "4px"
778
- },
779
- medium: {
780
- mobile: "6px",
781
- tablet: "8px",
782
- desktop: "8px"
783
- },
784
- large: {
785
- mobile: "8px",
786
- tablet: "12px",
787
- desktop: "12px"
788
- },
789
- full: {
790
- mobile: "9999px",
791
- tablet: "9999px",
792
- desktop: "9999px"
793
- }
794
- },
795
- // Shadows - theme-aware values
796
- shadows: {
797
- small: {
798
- light: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
799
- dark: "0 1px 2px 0 rgba(0, 0, 0, 0.3)"
800
- },
801
- medium: {
802
- light: "0 4px 6px -1px rgba(0, 0, 0, 0.1)",
803
- dark: "0 4px 6px -1px rgba(0, 0, 0, 0.4)"
804
- },
805
- large: {
806
- light: "0 10px 15px -3px rgba(0, 0, 0, 0.1)",
807
- dark: "0 10px 15px -3px rgba(0, 0, 0, 0.5)"
808
- },
809
- glass: {
810
- light: "0 8px 32px 0 rgba(31, 38, 135, 0.37)",
811
- dark: "0 8px 32px 0 rgba(59, 130, 246, 0.25)"
812
- },
813
- glassInset: {
814
- light: "inset 0 1px 0 0 rgba(255, 255, 255, 0.1)",
815
- dark: "inset 0 1px 0 0 rgba(255, 255, 255, 0.05)"
816
- },
817
- textField: {
818
- light: "0 4px 6px -1px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 rgba(255, 255, 255, 0.08)",
819
- dark: "0 4px 6px -1px rgba(187, 187, 187, 0.03), inset 0 1px 0 0 rgba(0, 0, 0, 0.4)"
820
- }
821
- },
822
- // Glass effects - theme-aware values
823
- glassmorphism: {
824
- backdrop: {
825
- light: "blur(16px)",
826
- dark: "blur(20px)"
827
- // Stronger blur in dark mode for better effect
828
- },
829
- backdropLight: {
830
- light: "blur(8px)",
831
- dark: "blur(12px)"
832
- },
833
- backdropHeavy: {
834
- light: "blur(24px)",
835
- dark: "blur(32px)"
836
- }
837
- },
838
- // Animation - static values
839
- animation: {
840
- duration: {
841
- fast: "150ms",
842
- normal: "200ms",
843
- slow: "300ms"
844
- },
845
- easing: {
846
- standard: "cubic-bezier(0.4, 0.0, 0.2, 1)",
847
- decelerate: "cubic-bezier(0.0, 0.0, 0.2, 1)",
848
- accelerate: "cubic-bezier(0.4, 0.0, 1, 1)"
849
- }
850
- },
851
- // ✅ UPDATED: Business-Optimized Typography System
852
- typography: {
853
- // Font families - Dual font approach: Inter + Space Grotesk
854
- fontFamily: {
855
- // Space Grotesk for display elements, headings, UI
856
- display: "'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",
857
- // Inter for body text and readable content
858
- primary: "'Quicksand','Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif"
859
- },
860
- // Font weights
861
- fontWeight: {
862
- light: 300,
863
- normal: 400,
864
- medium: 500,
865
- semibold: 600,
866
- bold: 700
867
- },
868
- // ✅ UPDATED: Business-optimized typography variants
869
- variants: {
870
- // Display - Hero sections (REDUCED from 72px max to 56px max)
871
- display: {
872
- fontSize: {
873
- mobile: "2.25rem",
874
- // 36px (was 40px)
875
- tablet: "3rem",
876
- // 48px (was 56px)
877
- desktop: "3.5rem"
878
- // 56px (was 72px) - More reasonable for dashboards
879
- },
880
- lineHeight: {
881
- mobile: 1.1,
882
- tablet: 1.1,
883
- desktop: 1
884
- },
885
- fontWeight: 700,
886
- letterSpacing: "-0.02em",
887
- fontFamily: "display"
888
- },
889
- // H1 - Page titles (INCREASED from 40px max to 48px max)
890
- h1: {
891
- fontSize: {
892
- mobile: "2rem",
893
- // 32px (was 30px)
894
- tablet: "2.5rem",
895
- // 40px (was 36px)
896
- desktop: "3rem"
897
- // 48px (was 40px) - More impact for page titles
898
- },
899
- lineHeight: {
900
- mobile: 1.2,
901
- tablet: 1.2,
902
- desktop: 1.1
903
- },
904
- fontWeight: 700,
905
- // INCREASED from 600 to 700 for more presence
906
- fontFamily: "display"
907
- },
908
- // H2 - Section titles (SLIGHTLY INCREASED)
909
- h2: {
910
- fontSize: {
911
- mobile: "1.5rem",
912
- // 24px (same)
913
- tablet: "1.875rem",
914
- // 30px (was 28px)
915
- desktop: "2.25rem"
916
- // 36px (was 32px) - Better hierarchy
917
- },
918
- lineHeight: {
919
- mobile: 1.3,
920
- tablet: 1.3,
921
- desktop: 1.2
922
- },
923
- fontWeight: 600,
924
- fontFamily: "display"
925
- },
926
- // H3 - Subsection titles (INCREASED for better hierarchy)
927
- h3: {
928
- fontSize: {
929
- mobile: "1.25rem",
930
- // 20px (same)
931
- tablet: "1.5rem",
932
- // 24px (was 22px)
933
- desktop: "1.75rem"
934
- // 28px (was 24px) - Better gap from body text
935
- },
936
- lineHeight: {
937
- mobile: 1.4,
938
- tablet: 1.4,
939
- desktop: 1.3
940
- },
941
- fontWeight: 600,
942
- fontFamily: "display"
943
- // CHANGED from "primary" to "display" for consistency
944
- },
945
- // H4 - Component headers (INCREASED for clearer hierarchy)
946
- h4: {
947
- fontSize: {
948
- mobile: "1.125rem",
949
- // 18px (same)
950
- tablet: "1.25rem",
951
- // 20px (same)
952
- desktop: "1.5rem"
953
- // 24px (was 22px) - Better distinction from body
954
- },
955
- lineHeight: {
956
- mobile: 1.4,
957
- tablet: 1.4,
958
- desktop: 1.4
959
- },
960
- fontWeight: 600,
961
- // INCREASED from 500 to 600 for more definition
962
- fontFamily: "display"
963
- // CHANGED from "primary" to "display"
964
- },
965
- // H5 - Small headers (ADDED - was missing)
966
- h5: {
967
- fontSize: {
968
- mobile: "1rem",
969
- // 16px
970
- tablet: "1.125rem",
971
- // 18px
972
- desktop: "1.25rem"
973
- // 20px
974
- },
975
- lineHeight: {
976
- mobile: 1.4,
977
- tablet: 1.4,
978
- desktop: 1.4
979
- },
980
- fontWeight: 600,
981
- fontFamily: "display"
982
- },
983
- // H6 - Smallest headers (ADDED - was missing)
984
- h6: {
985
- fontSize: {
986
- mobile: "0.875rem",
987
- // 14px
988
- tablet: "1rem",
989
- // 16px
990
- desktop: "1.125rem"
991
- // 18px
992
- },
993
- lineHeight: {
994
- mobile: 1.4,
995
- tablet: 1.4,
996
- desktop: 1.4
997
- },
998
- fontWeight: 500,
999
- fontFamily: "display"
1000
- },
1001
- // Body1 - Main content (OPTIMIZED - Inter font)
1002
- body1: {
1003
- fontSize: {
1004
- mobile: "0.875rem",
1005
- // 14px - more appropriate for web apps
1006
- tablet: "1rem",
1007
- // 16px - reduced from 18px
1008
- desktop: "1rem"
1009
- // 16px - reduced from 18px for better UI proportions
1010
- },
1011
- lineHeight: {
1012
- mobile: 1.5,
1013
- tablet: 1.6,
1014
- desktop: 1.6
1015
- },
1016
- fontWeight: 400,
1017
- fontFamily: "primary"
1018
- // Inter for readability
1019
- },
1020
- // Body2 - Secondary content (OPTIMIZED)
1021
- body2: {
1022
- fontSize: {
1023
- mobile: "0.8125rem",
1024
- // 13px - reduced for form fields
1025
- tablet: "0.875rem",
1026
- // 14px - reduced from 16px
1027
- desktop: "0.875rem"
1028
- // 14px - better for form elements
1029
- },
1030
- lineHeight: {
1031
- mobile: 1.5,
1032
- tablet: 1.5,
1033
- desktop: 1.5
1034
- },
1035
- fontWeight: 400,
1036
- fontFamily: "primary"
1037
- // Inter for readability
1038
- },
1039
- // Button - Interface elements (OPTIMIZED)
1040
- button: {
1041
- fontSize: {
1042
- mobile: "0.75rem",
1043
- // 12px - reduced for more compact buttons
1044
- tablet: "0.8125rem",
1045
- // 13px - reduced from 14px
1046
- desktop: "0.8125rem"
1047
- // 13px - more compact for business UI
1048
- },
1049
- lineHeight: {
1050
- mobile: 1.3,
1051
- // Tighter line height for buttons (was 1.4)
1052
- tablet: 1.3,
1053
- desktop: 1.3
1054
- },
1055
- fontWeight: 500,
1056
- fontFamily: "display"
1057
- },
1058
- // Caption - Small text, metadata (REFINED for small buttons)
1059
- caption: {
1060
- fontSize: {
1061
- mobile: "0.6875rem",
1062
- // 11px - reduced for metadata
1063
- tablet: "0.75rem",
1064
- // 12px - reduced from 13px
1065
- desktop: "0.75rem"
1066
- // 12px - appropriate for helper text
1067
- },
1068
- lineHeight: {
1069
- mobile: 1.3,
1070
- // Tighter for small buttons (was 1.4)
1071
- tablet: 1.3,
1072
- desktop: 1.3
1073
- },
1074
- fontWeight: 500,
1075
- // Increased from 400 for better small text legibility
1076
- fontFamily: "display"
1077
- // Changed from "primary" to "display" for button consistency
1078
- }
1079
- }
1080
- },
1081
- // TextField component tokens
1082
- textField: {
1083
- height: {
1084
- mobile: "3rem",
1085
- // 48px
1086
- tablet: "3.25rem",
1087
- // 52px
1088
- desktop: "3.25rem"
1089
- // 52px
1090
- },
1091
- minWidth: {
1092
- mobile: "280px",
1093
- // Minimum mobile width
1094
- tablet: "320px",
1095
- // Minimum tablet width
1096
- desktop: "360px"
1097
- // Minimum desktop width
1098
- },
1099
- fontSize: {
1100
- mobile: "1rem",
1101
- // 16px
1102
- tablet: "1.1rem",
1103
- // 20px
1104
- desktop: "1.1rem"
1105
- // 20px
1106
- },
1107
- spacing: {
1108
- paddingTop: {
1109
- mobile: "20px",
1110
- tablet: "24px",
1111
- desktop: "24px"
1112
- },
1113
- paddingBottom: {
1114
- mobile: "8px",
1115
- tablet: "4px",
1116
- desktop: "4px"
1117
- },
1118
- paddingLeft: {
1119
- mobile: "12px",
1120
- tablet: "12px",
1121
- desktop: "12px"
1122
- }
1123
- }
1124
- },
1125
- // Spacing system (unchanged - was already good)
1126
- spacing: {
1127
- tight: {
1128
- mobile: "4px",
1129
- tablet: "4px",
1130
- desktop: "6px"
1131
- // Slightly increased for desktop precision
1132
- },
1133
- normal: {
1134
- mobile: "6px",
1135
- // Reduced from 8px for more compact buttons
1136
- tablet: "8px",
1137
- desktop: "10px"
1138
- // More refined than 8px
1139
- },
1140
- comfortable: {
1141
- mobile: "12px",
1142
- tablet: "14px",
1143
- // Slightly increased for better button width
1144
- desktop: "16px"
1145
- // Reduced from 20px for more compact feel
1146
- },
1147
- spacious: {
1148
- mobile: "16px",
1149
- tablet: "20px",
1150
- // Reduced from 24px
1151
- desktop: "24px"
1152
- // Reduced from 32px for business interfaces
1153
- },
1154
- loose: {
1155
- mobile: "20px",
1156
- // Reduced from 24px
1157
- tablet: "28px",
1158
- // Reduced from 32px
1159
- desktop: "36px"
1160
- // Reduced from 48px - better for business apps
1161
- }
1162
- }
1163
- };
1164
- const hexToRgb = (hex) => {
1165
- const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
1166
- if (!result) return "0, 0, 0";
1167
- return [
1168
- parseInt(result[1], 16),
1169
- parseInt(result[2], 16),
1170
- parseInt(result[3], 16)
1171
- ].join(", ");
1172
- };
1173
- const getAllThemeVariables = () => {
1174
- const modes = ["light", "dark"];
1175
- const breakpoints = [
1176
- "mobile",
1177
- "tablet",
1178
- "desktop"
1179
- ];
1180
- const result = {};
1181
- modes.forEach((mode) => {
1182
- breakpoints.forEach((breakpoint) => {
1183
- const tokens = {
1184
- color: {},
1185
- borderRadius: {},
1186
- shadows: {},
1187
- glassmorphism: {},
1188
- effects: {},
1189
- animation: SEMANTIC_TOKENS.animation,
1190
- typography: {
1191
- fontFamily: SEMANTIC_TOKENS.typography.fontFamily,
1192
- fontWeight: SEMANTIC_TOKENS.typography.fontWeight,
1193
- variants: {}
1194
- },
1195
- spacing: {},
1196
- textField: {}
1197
- };
1198
- Object.entries(SEMANTIC_TOKENS.colors).forEach(([category, colors]) => {
1199
- tokens.color[category] = {};
1200
- Object.entries(colors).forEach(([name, colorDef]) => {
1201
- tokens.color[category][name] = colorDef[mode];
1202
- if (colorDef.needsRGB) {
1203
- const colorValue = colorDef[mode];
1204
- tokens.color[category][name + "RGB"] = hexToRgb(colorValue);
1205
- }
1206
- });
1207
- });
1208
- Object.entries(SEMANTIC_TOKENS.spacing).forEach(
1209
- ([name, responsiveValue]) => {
1210
- tokens.spacing[name] = responsiveValue[breakpoint];
1211
- }
1212
- );
1213
- Object.entries(SEMANTIC_TOKENS.borderRadius).forEach(
1214
- ([name, responsiveValue]) => {
1215
- tokens.borderRadius[name] = responsiveValue[breakpoint];
1216
- }
1217
- );
1218
- Object.entries(SEMANTIC_TOKENS.shadows).forEach(([name, shadowValue]) => {
1219
- if (typeof shadowValue === "object" && "light" in shadowValue && "dark" in shadowValue) {
1220
- tokens.shadows[name] = shadowValue[mode];
1221
- } else {
1222
- tokens.shadows[name] = shadowValue;
1223
- }
1224
- });
1225
- Object.entries(SEMANTIC_TOKENS.glassmorphism).forEach(
1226
- ([name, glassValue]) => {
1227
- if (typeof glassValue === "object" && "light" in glassValue && "dark" in glassValue) {
1228
- tokens.glassmorphism[name] = glassValue[mode];
1229
- } else {
1230
- tokens.glassmorphism[name] = glassValue;
1231
- }
1232
- }
1233
- );
1234
- Object.entries(SEMANTIC_TOKENS.effects).forEach(([name, effectValue]) => {
1235
- if (typeof effectValue === "object" && "light" in effectValue && "dark" in effectValue) {
1236
- tokens.effects[name] = effectValue[mode];
1237
- } else {
1238
- tokens.effects[name] = effectValue;
1239
- }
1240
- });
1241
- tokens.textField = {
1242
- height: SEMANTIC_TOKENS.textField.height[breakpoint],
1243
- minWidth: SEMANTIC_TOKENS.textField.minWidth[breakpoint],
1244
- fontSize: SEMANTIC_TOKENS.textField.fontSize[breakpoint],
1245
- spacing: {
1246
- paddingTop: SEMANTIC_TOKENS.textField.spacing.paddingTop[breakpoint],
1247
- paddingBottom: SEMANTIC_TOKENS.textField.spacing.paddingBottom[breakpoint],
1248
- paddingLeft: SEMANTIC_TOKENS.textField.spacing.paddingLeft[breakpoint]
1249
- }
1250
- };
1251
- Object.entries(SEMANTIC_TOKENS.typography.variants).forEach(
1252
- ([variantName, variant]) => {
1253
- tokens.typography.variants[variantName] = {
1254
- fontSize: variant.fontSize[breakpoint],
1255
- lineHeight: variant.lineHeight[breakpoint],
1256
- fontWeight: variant.fontWeight,
1257
- fontFamily: SEMANTIC_TOKENS.typography.fontFamily[variant.fontFamily],
1258
- ...variant.letterSpacing && {
1259
- letterSpacing: variant.letterSpacing
1260
- }
1261
- };
1262
- }
1263
- );
1264
- const key = `${mode}${breakpoint.charAt(0).toUpperCase()}${breakpoint.slice(1)}`;
1265
- result[key] = generateCSSVariablesFromTokens(tokens);
1266
- });
1267
- });
1268
- return result;
1269
- };
1270
-
1271
- const createQuantumTheme = (mode) => {
1272
- const {
1273
- lightDesktop,
1274
- lightMobile,
1275
- lightTablet,
1276
- darkDesktop,
1277
- darkMobile,
1278
- darkTablet
1279
- } = getAllThemeVariables();
1280
- const colors = SEMANTIC_TOKENS.colors;
1281
- const currentModeColors = {
1282
- actionPrimary: colors.action.primary[mode],
1283
- actionSecondary: colors.action.secondary[mode],
1284
- feedbackError: colors.feedback.error[mode],
1285
- feedbackWarning: colors.feedback.warning[mode],
1286
- feedbackInfo: colors.feedback.info[mode],
1287
- feedbackSuccess: colors.feedback.success[mode],
1288
- surfacePrimary: colors.surface.primary[mode],
1289
- surfaceSecondary: colors.surface.secondary[mode],
1290
- textPrimary: colors.text.primary[mode],
1291
- textSecondary: colors.text.secondary[mode],
1292
- textDisabled: colors.text.disabled[mode],
1293
- borderDefault: colors.border.default[mode]
1294
- };
1295
- const theme = createTheme({
1296
- // Note: Material-UI cssVariables disabled to prevent interference with our theme persistence
1297
- // Our CSS variables are injected via MuiCssBaseline styleOverrides instead
1298
- palette: {
1299
- mode,
1300
- primary: {
1301
- main: currentModeColors.actionPrimary,
1302
- contrastText: currentModeColors.textPrimary
1303
- },
1304
- secondary: {
1305
- main: currentModeColors.actionSecondary,
1306
- contrastText: currentModeColors.textPrimary
1307
- },
1308
- error: {
1309
- main: currentModeColors.feedbackError,
1310
- contrastText: currentModeColors.textPrimary
1311
- },
1312
- warning: {
1313
- main: currentModeColors.feedbackWarning,
1314
- contrastText: currentModeColors.textPrimary
1315
- },
1316
- info: {
1317
- main: currentModeColors.feedbackInfo,
1318
- contrastText: currentModeColors.textPrimary
1319
- },
1320
- success: {
1321
- main: currentModeColors.feedbackSuccess,
1322
- contrastText: currentModeColors.textPrimary
1323
- },
1324
- background: {
1325
- default: currentModeColors.surfacePrimary,
1326
- paper: currentModeColors.surfaceSecondary
1327
- },
1328
- text: {
1329
- primary: currentModeColors.textPrimary,
1330
- secondary: currentModeColors.textSecondary,
1331
- disabled: currentModeColors.textDisabled
1332
- },
1333
- divider: currentModeColors.borderDefault
1334
- },
1335
- typography: {
1336
- h1: {
1337
- fontFamily: "var(--quantum-typography-fontFamily-display)",
1338
- fontSize: "var(--quantum-typography-variants-display-fontSize)",
1339
- lineHeight: "var(--quantum-typography-variants-display-lineHeight)",
1340
- fontWeight: "var(--quantum-typography-variants-display-fontWeight)",
1341
- letterSpacing: "var(--quantum-typography-variants-display-letterSpacing)",
1342
- color: "var(--quantum-color-text-primary)"
1343
- },
1344
- h2: {
1345
- fontFamily: "var(--quantum-typography-fontFamily-display)",
1346
- fontSize: "var(--quantum-typography-variants-h1-fontSize)",
1347
- lineHeight: "var(--quantum-typography-variants-h1-lineHeight)",
1348
- fontWeight: "var(--quantum-typography-variants-h1-fontWeight)",
1349
- color: "var(--quantum-color-text-primary)"
1350
- },
1351
- h3: {
1352
- fontFamily: "var(--quantum-typography-fontFamily-display)",
1353
- fontSize: "var(--quantum-typography-variants-h2-fontSize)",
1354
- lineHeight: "var(--quantum-typography-variants-h2-lineHeight)",
1355
- fontWeight: "var(--quantum-typography-variants-h2-fontWeight)",
1356
- color: "var(--quantum-color-text-primary)"
1357
- },
1358
- h4: {
1359
- fontFamily: "var(--quantum-typography-fontFamily-primary)",
1360
- fontSize: "var(--quantum-typography-variants-h3-fontSize)",
1361
- lineHeight: "var(--quantum-typography-variants-h3-lineHeight)",
1362
- fontWeight: "var(--quantum-typography-variants-h3-fontWeight)",
1363
- color: "var(--quantum-color-text-primary)"
1364
- },
1365
- h5: {
1366
- fontFamily: "var(--quantum-typography-fontFamily-primary)",
1367
- fontSize: "var(--quantum-typography-variants-h4-fontSize)",
1368
- lineHeight: "var(--quantum-typography-variants-h4-lineHeight)",
1369
- fontWeight: "var(--quantum-typography-variants-h4-fontWeight)",
1370
- color: "var(--quantum-color-text-primary)"
1371
- },
1372
- h6: {
1373
- fontFamily: "var(--quantum-typography-fontFamily-primary)",
1374
- fontSize: "var(--quantum-typography-variants-caption-fontSize)",
1375
- lineHeight: "var(--quantum-typography-variants-caption-lineHeight)",
1376
- fontWeight: "var(--quantum-typography-fontWeight-medium)",
1377
- color: "var(--quantum-color-text-secondary)"
1378
- },
1379
- body1: {
1380
- fontFamily: "var(--quantum-typography-fontFamily-primary)",
1381
- fontSize: "var(--quantum-typography-variants-body1-fontSize)",
1382
- lineHeight: "var(--quantum-typography-variants-body1-lineHeight)",
1383
- fontWeight: "var(--quantum-typography-variants-body1-fontWeight)",
1384
- color: "var(--quantum-color-text-primary)"
1385
- },
1386
- body2: {
1387
- fontFamily: "var(--quantum-typography-fontFamily-primary)",
1388
- fontSize: "var(--quantum-typography-variants-body2-fontSize)",
1389
- lineHeight: "var(--quantum-typography-variants-body2-lineHeight)",
1390
- fontWeight: "var(--quantum-typography-variants-body2-fontWeight)",
1391
- color: "var(--quantum-color-text-secondary)"
1392
- },
1393
- button: {
1394
- fontFamily: "var(--quantum-typography-fontFamily-display)",
1395
- fontSize: "var(--quantum-typography-variants-button-fontSize)",
1396
- lineHeight: "var(--quantum-typography-variants-button-lineHeight)",
1397
- fontWeight: "var(--quantum-typography-variants-button-fontWeight)",
1398
- color: "var(--quantum-color-text-primary)",
1399
- textTransform: "none"
1400
- },
1401
- caption: {
1402
- fontFamily: "var(--quantum-typography-fontFamily-primary)",
1403
- fontSize: "var(--quantum-typography-variants-caption-fontSize)",
1404
- lineHeight: "var(--quantum-typography-variants-caption-lineHeight)",
1405
- fontWeight: "var(--quantum-typography-variants-caption-fontWeight)",
1406
- color: "var(--quantum-color-text-secondary)"
1407
- },
1408
- overline: {
1409
- fontFamily: "var(--quantum-typography-fontFamily-primary)",
1410
- fontWeight: "var(--quantum-typography-fontWeight-medium)",
1411
- color: "var(--quantum-color-text-secondary)",
1412
- textTransform: "uppercase",
1413
- letterSpacing: "0.08em"
1414
- }
1415
- },
1416
- shape: {
1417
- borderRadius: 8
1418
- },
1419
- components: {
1420
- // CSS Variables injection
1421
- MuiCssBaseline: {
1422
- styleOverrides: {
1423
- "@keyframes quantumConfidenceRotate": {
1424
- "0%": { transform: "rotate(0deg)" },
1425
- "100%": { transform: "rotate(360deg)" }
1426
- },
1427
- // Energy burst animation for button clicks
1428
- "@keyframes quantumEnergyBurst": {
1429
- "0%": {
1430
- transform: "translate(-50%, -50%) scale(0)",
1431
- opacity: 1
1432
- },
1433
- "100%": {
1434
- transform: "translate(-50%, -50%) scale(2)",
1435
- opacity: 0
1436
- }
1437
- },
1438
- // Warning rotate animation for destructive buttons (similar to primary)
1439
- "@keyframes quantumWarningRotate": {
1440
- "0%": { transform: "rotate(0deg)" },
1441
- "100%": { transform: "rotate(360deg)" }
1442
- },
1443
- // Respect reduced motion preferences
1444
- "@media (prefers-reduced-motion: reduce)": {
1445
- "*": {
1446
- animationDuration: "0.01ms !important",
1447
- animationIterationCount: "1 !important",
1448
- transitionDuration: "0.01ms !important"
1449
- }
1450
- },
1451
- // Add Space Grotesk font loading
1452
- "@font-face": {
1453
- fontFamily: "Space Grotesk",
1454
- fontDisplay: "swap"
1455
- },
1456
- // Light mode - mobile first (base styles)
1457
- ":root": {
1458
- ...lightMobile,
1459
- // Ensure font is loaded
1460
- fontFamily: SEMANTIC_TOKENS.typography.fontFamily.primary
1461
- },
1462
- // Dark mode - mobile first
1463
- '[data-theme="dark"]': darkMobile,
1464
- // Light mode - tablet and up & Dark mode - tablet and up
1465
- "@media (min-width: 768px)": {
1466
- ":root": lightTablet,
1467
- '[data-theme="dark"]': darkTablet
1468
- },
1469
- // Light mode - desktop and up & Dark mode - desktop and up
1470
- "@media (min-width: 1024px)": {
1471
- ":root": lightDesktop,
1472
- '[data-theme="dark"]': darkDesktop
1473
- },
1474
- // Ensure all text uses Space Grotesk by default
1475
- "html, body": {
1476
- fontFamily: SEMANTIC_TOKENS.typography.fontFamily.primary,
1477
- fontDisplay: "swap"
1478
- }
1479
- }
1480
- },
1481
- // Component theme overrides
1482
- MuiButton: ButtonTheme,
1483
- MuiPaper: PaperTheme,
1484
- MuiTextField: TextFieldTheme
1485
- }
1486
- });
1487
- return theme;
1488
- };
1489
-
1490
- const ThemeScript = ({
1491
- defaultColorScheme = "light",
1492
- storageKey = "quantum-color-scheme",
1493
- attribute = "data-theme",
1494
- preventFlickering = true
1495
- }) => {
1496
- const script = `
1497
- (function() {
1498
- ${preventFlickering ? `
1499
- // Add no-transition class to prevent flickering during initial load
1500
- document.documentElement.classList.add('no-transition');
1501
- ` : ""}
1502
-
1503
- try {
1504
- const savedScheme = localStorage.getItem('${storageKey}');
1505
- const validSchemes = ['light', 'dark'];
1506
- const themeToApply = savedScheme && validSchemes.includes(savedScheme)
1507
- ? savedScheme
1508
- : '${defaultColorScheme}';
1509
-
1510
- document.documentElement.setAttribute('${attribute}', themeToApply);
1511
- } catch (e) {
1512
- // Fallback if localStorage is not available (private browsing, etc.)
1513
- document.documentElement.setAttribute('${attribute}', '${defaultColorScheme}');
1514
- }
1515
-
1516
- ${preventFlickering ? `
1517
- // Remove no-transition class after DOM is ready to enable smooth transitions
1518
- function enableTransitions() {
1519
- document.documentElement.classList.remove('no-transition');
1520
- document.documentElement.classList.add('loaded');
1521
- }
1522
-
1523
- if (document.readyState === 'loading') {
1524
- window.addEventListener('DOMContentLoaded', function() {
1525
- setTimeout(enableTransitions, 100);
1526
- });
1527
- } else {
1528
- // DOM is already ready
1529
- setTimeout(enableTransitions, 100);
1530
- }
1531
- ` : ""}
1532
- })();
1533
- `;
1534
- return /* @__PURE__ */ jsx(
1535
- "script",
1536
- {
1537
- dangerouslySetInnerHTML: { __html: script },
1538
- suppressHydrationWarning: true
1539
- }
1540
- );
1541
- };
1542
- const getThemeScript = (options = {}) => {
1543
- const {
1544
- defaultColorScheme = "light",
1545
- storageKey = "quantum-color-scheme",
1546
- attribute = "data-theme",
1547
- preventFlickering = true
1548
- } = options;
1549
- return `
1550
- (function() {
1551
- ${preventFlickering ? `
1552
- document.documentElement.classList.add('no-transition');
1553
- ` : ""}
1554
-
1555
- try {
1556
- const savedScheme = localStorage.getItem('${storageKey}');
1557
- const validSchemes = ['light', 'dark'];
1558
- const themeToApply = savedScheme && validSchemes.includes(savedScheme)
1559
- ? savedScheme
1560
- : '${defaultColorScheme}';
1561
-
1562
- document.documentElement.setAttribute('${attribute}', themeToApply);
1563
- } catch (e) {
1564
- document.documentElement.setAttribute('${attribute}', '${defaultColorScheme}');
1565
- }
1566
-
1567
- ${preventFlickering ? `
1568
- function enableTransitions() {
1569
- document.documentElement.classList.remove('no-transition');
1570
- document.documentElement.classList.add('loaded');
1571
- }
1572
-
1573
- if (document.readyState === 'loading') {
1574
- window.addEventListener('DOMContentLoaded', function() {
1575
- setTimeout(enableTransitions, 100);
1576
- });
1577
- } else {
1578
- setTimeout(enableTransitions, 100);
1579
- }
1580
- ` : ""}
1581
- })();
1582
- `.trim();
1583
- };
1584
-
1585
- export { SEMANTIC_TOKENS as S, ThemeScript as T, createQuantumTheme as c, getThemeScript as g };
1586
- //# sourceMappingURL=ThemeScript-BcAiGxU5.js.map