@shohojdhara/atomix 0.2.9 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/atomix.css +309 -105
  3. package/dist/atomix.min.css +3 -5
  4. package/dist/index.d.ts +807 -51
  5. package/dist/index.esm.js +16367 -16405
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +16277 -16330
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.min.js +1 -1
  10. package/dist/index.min.js.map +1 -1
  11. package/dist/themes/applemix.css +309 -105
  12. package/dist/themes/applemix.min.css +5 -7
  13. package/dist/themes/boomdevs.css +202 -10
  14. package/dist/themes/boomdevs.min.css +3 -5
  15. package/dist/themes/esrar.css +309 -105
  16. package/dist/themes/esrar.min.css +4 -6
  17. package/dist/themes/flashtrade.css +310 -105
  18. package/dist/themes/flashtrade.min.css +5 -7
  19. package/dist/themes/mashroom.css +300 -96
  20. package/dist/themes/mashroom.min.css +4 -6
  21. package/dist/themes/shaj-default.css +300 -96
  22. package/dist/themes/shaj-default.min.css +4 -6
  23. package/package.json +1 -1
  24. package/src/components/AtomixGlass/AtomixGlass.test.tsx +21 -32
  25. package/src/components/AtomixGlass/AtomixGlass.tsx +55 -42
  26. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +205 -57
  27. package/src/components/AtomixGlass/GlassFilter.tsx +22 -8
  28. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +221 -0
  29. package/src/components/AtomixGlass/atomixGLass.old.tsx +0 -3
  30. package/src/components/AtomixGlass/shader-utils.ts +8 -0
  31. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +319 -100
  32. package/src/components/AtomixGlass/stories/Examples.stories.tsx +601 -105
  33. package/src/components/AtomixGlass/stories/Modes.stories.tsx +30 -12
  34. package/src/components/AtomixGlass/stories/Playground.stories.tsx +173 -38
  35. package/src/components/AtomixGlass/stories/ShaderVariants.stories.tsx +18 -18
  36. package/src/components/AtomixGlass/stories/shared-components.tsx +27 -5
  37. package/src/components/Breadcrumb/Breadcrumb.tsx +8 -3
  38. package/src/components/Button/Button.tsx +62 -17
  39. package/src/components/Callout/Callout.test.tsx +8 -14
  40. package/src/components/Card/Card.tsx +103 -1
  41. package/src/components/Card/index.ts +3 -2
  42. package/src/components/Footer/Footer.stories.tsx +1 -2
  43. package/src/components/Footer/Footer.tsx +0 -5
  44. package/src/components/Footer/FooterLink.tsx +3 -2
  45. package/src/components/Footer/FooterSection.tsx +0 -7
  46. package/src/components/Icon/index.ts +1 -1
  47. package/src/components/Modal/Modal.stories.tsx +29 -38
  48. package/src/components/Modal/Modal.tsx +4 -4
  49. package/src/components/Navigation/Nav/NavItem.tsx +8 -3
  50. package/src/components/Navigation/SideMenu/SideMenu.tsx +49 -41
  51. package/src/components/Navigation/SideMenu/SideMenuItem.tsx +63 -19
  52. package/src/components/Popover/Popover.tsx +1 -1
  53. package/src/components/VideoPlayer/VideoPlayer.stories.tsx +977 -400
  54. package/src/components/VideoPlayer/VideoPlayer.tsx +1 -6
  55. package/src/lib/composables/shared-mouse-tracker.ts +133 -0
  56. package/src/lib/composables/useAtomixGlass.ts +303 -115
  57. package/src/lib/theme/ThemeManager.integration.test.ts +124 -0
  58. package/src/lib/theme/ThemeManager.stories.tsx +13 -13
  59. package/src/lib/theme/ThemeManager.test.ts +4 -0
  60. package/src/lib/theme/ThemeManager.ts +203 -59
  61. package/src/lib/theme/ThemeProvider.tsx +183 -33
  62. package/src/lib/theme/composeTheme.ts +375 -0
  63. package/src/lib/theme/createTheme.test.ts +475 -0
  64. package/src/lib/theme/createTheme.ts +510 -0
  65. package/src/lib/theme/generateCSSVariables.ts +713 -0
  66. package/src/lib/theme/index.ts +67 -0
  67. package/src/lib/theme/themeUtils.ts +333 -0
  68. package/src/lib/theme/types.ts +337 -8
  69. package/src/lib/theme/useTheme.test.tsx +2 -1
  70. package/src/lib/theme/useTheme.ts +6 -22
  71. package/src/lib/types/components.ts +152 -57
  72. package/src/styles/01-settings/_index.scss +2 -2
  73. package/src/styles/01-settings/_settings.badge.scss +2 -2
  74. package/src/styles/01-settings/_settings.border-radius.scss +1 -1
  75. package/src/styles/01-settings/{_settings.maps.scss → _settings.design-tokens.scss} +163 -49
  76. package/src/styles/01-settings/_settings.modal.scss +1 -1
  77. package/src/styles/01-settings/_settings.spacing.scss +14 -13
  78. package/src/styles/03-generic/_generic.root.scss +131 -50
  79. package/src/styles/05-objects/_objects.block.scss +1 -1
  80. package/src/styles/06-components/_components.atomix-glass.scss +20 -22
  81. package/src/styles/06-components/_components.badge.scss +2 -2
  82. package/src/styles/06-components/_components.button.scss +1 -1
  83. package/src/styles/06-components/_components.callout.scss +1 -1
  84. package/src/styles/06-components/_components.card.scss +74 -2
  85. package/src/styles/06-components/_components.chart.scss +1 -1
  86. package/src/styles/06-components/_components.dropdown.scss +6 -0
  87. package/src/styles/06-components/_components.footer.scss +1 -1
  88. package/src/styles/06-components/_components.list-group.scss +1 -1
  89. package/src/styles/06-components/_components.list.scss +1 -1
  90. package/src/styles/06-components/_components.menu.scss +1 -1
  91. package/src/styles/06-components/_components.messages.scss +1 -1
  92. package/src/styles/06-components/_components.modal.scss +7 -2
  93. package/src/styles/06-components/_components.navbar.scss +1 -1
  94. package/src/styles/06-components/_components.popover.scss +10 -0
  95. package/src/styles/06-components/_components.product-review.scss +1 -1
  96. package/src/styles/06-components/_components.progress.scss +1 -1
  97. package/src/styles/06-components/_components.rating.scss +1 -1
  98. package/src/styles/06-components/_components.spinner.scss +1 -1
  99. package/src/styles/99-utilities/_utilities.background.scss +1 -1
  100. package/src/styles/99-utilities/_utilities.border.scss +1 -1
  101. package/src/styles/99-utilities/_utilities.link.scss +1 -1
  102. package/src/styles/99-utilities/_utilities.text.scss +1 -1
@@ -1,8 +1,13 @@
1
1
  @use 'sass:map';
2
2
  @use 'settings.colors' as *;
3
3
  @use 'settings.typography' as *;
4
+ @use 'settings.spacing' as spacing;
5
+ @use 'settings.animations' as animations;
6
+ @use 'settings.z-layers' as z-layers;
7
+ @use 'settings.breakpoints' as breakpoints;
4
8
  @use 'settings.config' as config;
5
9
 
10
+
6
11
  // Color maps
7
12
 
8
13
  $theme-colors-text: (
@@ -18,7 +23,7 @@ $theme-colors-text: (
18
23
  'info': $info-text,
19
24
  'light': $light-text,
20
25
  'dark': $dark-text,
21
- ) !default;
26
+ ) !default;
22
27
 
23
28
  $theme-colors-text-dark: (
24
29
  'primary': $primary-text-dark,
@@ -33,7 +38,7 @@ $theme-colors-text-dark: (
33
38
  'info': $info-text-dark,
34
39
  'light': $light-text-dark,
35
40
  'dark': $dark-text-dark,
36
- ) !default;
41
+ ) !default;
37
42
 
38
43
  $theme-colors-bg-subtle: (
39
44
  'primary': $primary-bg,
@@ -47,7 +52,7 @@ $theme-colors-bg-subtle: (
47
52
  'info': $info-bg,
48
53
  'light': $light-bg,
49
54
  'dark': $dark-bg,
50
- ) !default;
55
+ ) !default;
51
56
 
52
57
  $theme-colors-bg-subtle-dark: (
53
58
  'primary': $primary-bg-dark,
@@ -61,7 +66,7 @@ $theme-colors-bg-subtle-dark: (
61
66
  'info': $info-bg-dark,
62
67
  'light': $light-bg-dark,
63
68
  'dark': $dark-bg-dark,
64
- ) !default;
69
+ ) !default;
65
70
 
66
71
  $theme-colors-border-subtle: (
67
72
  'primary': $primary-border,
@@ -73,7 +78,7 @@ $theme-colors-border-subtle: (
73
78
  'brand': $brand-border,
74
79
  'light': $light-border,
75
80
  'dark': $dark-border,
76
- ) !default;
81
+ ) !default;
77
82
 
78
83
  $theme-colors-border-subtle-dark: (
79
84
  'primary': $primary-border-dark,
@@ -85,7 +90,7 @@ $theme-colors-border-subtle-dark: (
85
90
  'brand': $brand-border-dark,
86
91
  'light': $light-border-dark,
87
92
  'dark': $dark-border-dark,
88
- ) !default;
93
+ ) !default;
89
94
 
90
95
  // Main theme colors map
91
96
  $theme-colors: (
@@ -97,7 +102,7 @@ $theme-colors: (
97
102
  'error': $error,
98
103
  'light': $light,
99
104
  'dark': $dark,
100
- ) !default;
105
+ ) !default;
101
106
 
102
107
  $theme-colors-dark: (
103
108
  'primary': $primary-dark,
@@ -108,7 +113,7 @@ $theme-colors-dark: (
108
113
  'success': $success-dark,
109
114
  'warning': $warning-dark,
110
115
  'info': $info-dark,
111
- ) !default;
116
+ ) !default;
112
117
 
113
118
  $theme-colors-hover: (
114
119
  'primary': $primary-hover,
@@ -119,7 +124,7 @@ $theme-colors-hover: (
119
124
  'success': $success-hover,
120
125
  'warning': $warning-hover,
121
126
  'info': $info-hover,
122
- ) !default;
127
+ ) !default;
123
128
 
124
129
  $theme-colors-hover-dark: (
125
130
  'primary': $primary-hover-dark,
@@ -130,7 +135,7 @@ $theme-colors-hover-dark: (
130
135
  'success': $success-hover-dark,
131
136
  'warning': $warning-hover-dark,
132
137
  'info': $info-hover-dark,
133
- ) !default;
138
+ ) !default;
134
139
 
135
140
  $grays: (
136
141
  '1': $gray-1,
@@ -143,7 +148,7 @@ $grays: (
143
148
  '8': $gray-8,
144
149
  '9': $gray-9,
145
150
  '10': $gray-10,
146
- ) !default;
151
+ ) !default;
147
152
 
148
153
  $primarys: (
149
154
  '1': $primary-1,
@@ -156,7 +161,7 @@ $primarys: (
156
161
  '8': $primary-8,
157
162
  '9': $primary-9,
158
163
  '10': $primary-10,
159
- ) !default;
164
+ ) !default;
160
165
 
161
166
  // Typography Maps
162
167
 
@@ -172,7 +177,7 @@ $theme-font-size: (
172
177
  'h4': $h4-font-size,
173
178
  'h5': $h5-font-size,
174
179
  'h6': $h6-font-size,
175
- ) !default;
180
+ ) !default;
176
181
 
177
182
  $theme-font-weight: (
178
183
  'light': $font-weight-light,
@@ -182,7 +187,7 @@ $theme-font-weight: (
182
187
  'bold': $font-weight-bold,
183
188
  'heavy': $font-weight-heavy,
184
189
  'black': $font-weight-black,
185
- ) !default;
190
+ ) !default;
186
191
 
187
192
  // Utilities maps
188
193
  //
@@ -194,14 +199,11 @@ $theme-font-weight: (
194
199
 
195
200
  $utilities-colors: $theme-colors !default;
196
201
 
197
- $utilities-text-colors: map.merge(
198
- $utilities-colors,
199
- (
200
- 'black': $black,
201
- 'white': $white,
202
- 'body': $body-color,
203
- )
204
- ) !default;
202
+ $utilities-text-colors: map.merge($utilities-colors,
203
+ ('black': $black,
204
+ 'white': $white,
205
+ 'body': $body-color,
206
+ )) !default;
205
207
 
206
208
  $utilities-text-emphasis-colors: (
207
209
  'primary-emphasis': var(--#{config.$prefix}primary-text-emphasis),
@@ -216,17 +218,14 @@ $utilities-text-emphasis-colors: (
216
218
  'error-emphasis': var(--#{config.$prefix}error-text-emphasis),
217
219
  'light-emphasis': var(--#{config.$prefix}light-text-emphasis),
218
220
  'dark-emphasis': var(--#{config.$prefix}dark-text-emphasis),
219
- ) !default;
221
+ ) !default;
220
222
 
221
223
  // scss-docs-start utilities-bg-colors
222
- $utilities-bg-colors: map.merge(
223
- $utilities-colors,
224
- (
225
- 'black': $black,
226
- 'white': $white,
227
- 'body': var(--#{config.$prefix}body-bg),
228
- )
229
- ) !default;
224
+ $utilities-bg-colors: map.merge($utilities-colors,
225
+ ('black': $black,
226
+ 'white': $white,
227
+ 'body': var(--#{config.$prefix}body-bg),
228
+ )) !default;
230
229
 
231
230
  $utilities-bg-subtle: (
232
231
  'primary-subtle': var(--#{config.$prefix}primary-bg-subtle),
@@ -240,16 +239,13 @@ $utilities-bg-subtle: (
240
239
  'error-subtle': var(--#{config.$prefix}error-bg-subtle),
241
240
  'light-subtle': var(--#{config.$prefix}light-bg-subtle),
242
241
  'dark-subtle': var(--#{config.$prefix}dark-bg-subtle),
243
- ) !default;
242
+ ) !default;
244
243
 
245
244
  // scss-docs-start utilities-border-colors
246
- $utilities-border-colors: map.merge(
247
- $utilities-colors,
248
- (
249
- 'black': $black,
250
- 'white': $white,
251
- )
252
- ) !default;
245
+ $utilities-border-colors: map.merge($utilities-colors,
246
+ ('black': $black,
247
+ 'white': $white,
248
+ )) !default;
253
249
 
254
250
  $utilities-border-subtle: (
255
251
  'primary-subtle': var(--#{config.$prefix}primary-border-subtle),
@@ -261,16 +257,13 @@ $utilities-border-subtle: (
261
257
  'brand-subtle': var(--#{config.$prefix}brand-border-subtle),
262
258
  'light-subtle': var(--#{config.$prefix}light-border-subtle),
263
259
  'dark-subtle': var(--#{config.$prefix}dark-border-subtle),
264
- ) !default;
260
+ ) !default;
265
261
 
266
262
  // scss-docs-start utilities-links-underline
267
- $utilities-links-underline: map.merge(
268
- $utilities-colors,
269
- (
270
- 'black': $black,
271
- 'white': $white,
272
- )
273
- ) !default;
263
+ $utilities-links-underline: map.merge($utilities-colors,
264
+ ('black': $black,
265
+ 'white': $white,
266
+ )) !default;
274
267
 
275
268
  $shadows: (
276
269
  'shadow': var(--#{config.$prefix}box-shadow),
@@ -279,7 +272,7 @@ $shadows: (
279
272
  'shadow-lg': var(--#{config.$prefix}box-shadow-lg),
280
273
  'shadow-xl': var(--#{config.$prefix}box-shadow-xl),
281
274
  'shadow-inset': var(--#{config.$prefix}box-shadow-inset),
282
- ) !default;
275
+ ) !default;
283
276
 
284
277
  $shadows-dark: (
285
278
  'shadow': var(--#{config.$prefix}box-shadow-dark),
@@ -288,7 +281,7 @@ $shadows-dark: (
288
281
  'shadow-lg': var(--#{config.$prefix}box-shadow-lg-dark),
289
282
  'shadow-xl': var(--#{config.$prefix}box-shadow-xl-dark),
290
283
  'shadow-inset': var(--#{config.$prefix}box-shadow-inset-dark),
291
- ) !default;
284
+ ) !default;
292
285
 
293
286
  $gradient-colors: (
294
287
  'primary': $gradient-primary,
@@ -311,3 +304,124 @@ $gradient-colors-dark: (
311
304
  'warning': $gradient-warning-dark,
312
305
  'error': $gradient-error-dark,
313
306
  );
307
+
308
+ // Full Color Palette Maps
309
+ // Red scale (1-10)
310
+ $reds: (
311
+ '1': $red-1,
312
+ '2': $red-2,
313
+ '3': $red-3,
314
+ '4': $red-4,
315
+ '5': $red-5,
316
+ '6': $red-6,
317
+ '7': $red-7,
318
+ '8': $red-8,
319
+ '9': $red-9,
320
+ '10': $red-10,
321
+ ) !default;
322
+
323
+ // Green scale (1-10)
324
+ $greens: (
325
+ '1': $green-1,
326
+ '2': $green-2,
327
+ '3': $green-3,
328
+ '4': $green-4,
329
+ '5': $green-5,
330
+ '6': $green-6,
331
+ '7': $green-7,
332
+ '8': $green-8,
333
+ '9': $green-9,
334
+ '10': $green-10,
335
+ ) !default;
336
+
337
+ // Blue scale (1-10)
338
+ $blues: (
339
+ '1': $blue-1,
340
+ '2': $blue-2,
341
+ '3': $blue-3,
342
+ '4': $blue-4,
343
+ '5': $blue-5,
344
+ '6': $blue-6,
345
+ '7': $blue-7,
346
+ '8': $blue-8,
347
+ '9': $blue-9,
348
+ '10': $blue-10,
349
+ ) !default;
350
+
351
+ // Yellow scale (1-10)
352
+ $yellows: (
353
+ '1': $yellow-1,
354
+ '2': $yellow-2,
355
+ '3': $yellow-3,
356
+ '4': $yellow-4,
357
+ '5': $yellow-5,
358
+ '6': $yellow-6,
359
+ '7': $yellow-7,
360
+ '8': $yellow-8,
361
+ '9': $yellow-9,
362
+ '10': $yellow-10,
363
+ ) !default;
364
+
365
+ // Line Height Maps
366
+ $line-heights: (
367
+ 'base': $line-height-base,
368
+ 'sm': $line-height-sm,
369
+ 'lg': $line-height-lg,
370
+ ) !default;
371
+
372
+ // Extended Font Size Map
373
+ $font-sizes-extended: (
374
+ 'xs': $font-size-xs,
375
+ 'sm': $font-size-sm,
376
+ 'base': $font-size-base,
377
+ 'md': $font-size-md,
378
+ 'lg': $font-size-lg,
379
+ 'xl': $font-size-xl,
380
+ '2xl': $font-size-2xl,
381
+ 'h1': $h1-font-size,
382
+ 'h2': $h2-font-size,
383
+ 'h3': $h3-font-size,
384
+ 'h4': $h4-font-size,
385
+ 'h5': $h5-font-size,
386
+ 'h6': $h6-font-size,
387
+ 'display-1': $display-1,
388
+ ) !default;
389
+
390
+ // Letter Spacing Map
391
+ $letter-spacings: (
392
+ 'h1': $h1-letter-spaceing,
393
+ 'h2': $h2-letter-spaceing,
394
+ 'h3': $h3-letter-spaceing,
395
+ 'h4': $h4-letter-spaceing,
396
+ 'h5': $h5-letter-spaceing,
397
+ 'h6': $h6-letter-spaceing,
398
+ ) !default;
399
+
400
+ // Transition & Animation Maps
401
+ $transitions: (
402
+ 'fast': animations.$transition-fast,
403
+ 'base': animations.$transition-base,
404
+ 'slow': animations.$transition-slow,
405
+ ) !default;
406
+
407
+ $transition-durations: (
408
+ 'fast': 0.15s,
409
+ 'base': 0.3s,
410
+ 'slow': 0.5s,
411
+ 'slower': 0.7s,
412
+ ) !default;
413
+
414
+ $easings: (
415
+ 'base': animations.$easing,
416
+ 'ease-in-out': cubic-bezier(0.4, 0, 0.2, 1),
417
+ 'ease-out': cubic-bezier(0.0, 0, 0.2, 1),
418
+ 'ease-in': cubic-bezier(0.4, 0, 1, 1),
419
+ 'ease-linear': linear,
420
+ ) !default;
421
+
422
+ // Focus Ring Tokens
423
+ $focus-ring: (
424
+ 'width': 3px,
425
+ 'offset': 2px,
426
+ 'opacity': 0.25,
427
+ ) !default;
@@ -18,7 +18,7 @@ $modal-sub-margin-top: map.get($spacing-sizes, 1) !default; //4px
18
18
  $modal-sub-font-size: $font-size-sm !default;
19
19
  $modal-sub-color: var(--#{$prefix}tertiary-text-emphasis) !default;
20
20
 
21
- $modal-footer-items-gap: map.get($spacing-sizes, 8) !default; //8px
21
+ $modal-footer-items-gap: map.get($spacing-sizes, 2) !default; //8px
22
22
 
23
23
  $modal-backdrop-bg: var(--#{$prefix}invert-bg-subtle) !default;
24
24
  $modal-backdrop-opacity: 0.5 !default;
@@ -5,28 +5,28 @@ $spacing-sizes: (
5
5
  //00px
6
6
  1: 0.25rem,
7
7
  //04px
8
- 1.5: 0.375rem,
9
- //6px
8
+ px-6: 0.375rem,
9
+ //6px (formerly 1.5)
10
10
  2: 0.5rem,
11
11
  //08px
12
- 2.5: 0.625rem,
13
- //10px
12
+ px-10: 0.625rem,
13
+ //10px (formerly 2.5)
14
14
  3: 0.75rem,
15
15
  //12px
16
- 3.5: 0.875rem,
17
- //14px
16
+ px-14: 0.875rem,
17
+ //14px (formerly 3.5)
18
18
  4: 1rem,
19
19
  //16px
20
20
  5: 1.25rem,
21
21
  //20px
22
- 5.5: 1.375rem,
23
- //22px
22
+ px-22: 1.375rem,
23
+ //22px (formerly 5.5)
24
24
  6: 1.5rem,
25
25
  //24px
26
26
  7: 1.75rem,
27
27
  //28px
28
- 7.5: 1.875rem,
29
- //30px
28
+ px-30: 1.875rem,
29
+ //30px (formerly 7.5)
30
30
  8: 2rem,
31
31
  //32px
32
32
  9: 2.25rem,
@@ -71,10 +71,11 @@ $spacing-sizes: (
71
71
  //320px
72
72
  90: 22.5rem,
73
73
  //360px
74
- 200: 50rem, //800px
75
- ) !default;
74
+ 200: 50rem,
75
+ //800px
76
+ ) !default;
76
77
 
77
78
  $spacing-important: false !default;
78
79
  $enable-negative-margins: false !default;
79
80
 
80
- $negative-spacers: if($enable-negative-margins, negativify-map($spacing-sizes), null) !default;
81
+ $negative-spacers: if($enable-negative-margins, negativify-map($spacing-sizes), null) !default;
@@ -4,12 +4,17 @@
4
4
  @use '../01-settings/settings.border-radius' as border-radius;
5
5
  @use '../01-settings/settings.border' as border;
6
6
  @use '../01-settings/settings.colors' as colors;
7
- @use '../01-settings/settings.maps' as color-maps;
7
+ @use '../01-settings/settings.design-tokens' as color-maps;
8
8
  @use '../01-settings/settings.box-shadow' as box-shadow;
9
9
  @use '../01-settings/settings.typography' as typography;
10
+ @use '../01-settings/settings.spacing' as spacing;
11
+ @use '../01-settings/settings.animations' as animations;
12
+ @use '../01-settings/settings.z-layers' as z-layers;
13
+ @use '../01-settings/settings.breakpoints' as breakpoints;
10
14
  @use 'sass:meta';
11
15
  @use 'sass:map';
12
16
 
17
+ // Root custom properties
13
18
  :root,
14
19
  [data-#{config.$prefix}color-mode='light'] {
15
20
  // Note: Custom variable values only support SassScript inside `#{}`.
@@ -67,14 +72,16 @@
67
72
 
68
73
  // Root and body
69
74
  // scss-docs-start root-body-variables
70
- @if typography.$font-size-root != null {
75
+ @if typography.$font-size-root !=null {
71
76
  --#{config.$prefix}root-font-size: #{typography.$font-size-root};
72
77
  }
78
+
73
79
  --#{config.$prefix}body-font-family: #{meta.inspect(typography.$font-family-base)};
74
80
  --#{config.$prefix}body-font-size: #{typography.$font-size-base};
75
81
  --#{config.$prefix}body-font-weight: #{typography.$font-weight-base};
76
82
  --#{config.$prefix}body-line-height: #{typography.$line-height-base};
77
- @if typography.$body-text-align != null {
83
+
84
+ @if typography.$body-text-align !=null {
78
85
  --#{config.$prefix}body-text-align: #{typography.$body-text-align};
79
86
  }
80
87
 
@@ -92,11 +99,11 @@
92
99
  --#{config.$prefix}link-hover-color: #{colors.$link-hover-color};
93
100
  --#{config.$prefix}link-hover-color-rgb: #{to-rgb(colors.$link-hover-color)};
94
101
 
95
- @if colors.$link-hover-decoration != null {
102
+ @if colors.$link-hover-decoration !=null {
96
103
  --#{config.$prefix}link-hover-decoration: #{colors.$link-hover-decoration};
97
104
  }
98
105
 
99
- --#{config.$prefix}code-color: #{colors.$code-color};
106
+ // Code tokens
100
107
  --#{config.$prefix}highlight-bg: #{colors.$mark-bg};
101
108
 
102
109
  // scss-docs-start root-border-var
@@ -110,9 +117,7 @@
110
117
  --#{config.$prefix}border-radius-lg: #{border-radius.$border-radius-lg};
111
118
  --#{config.$prefix}border-radius-xl: #{border-radius.$border-radius-xl};
112
119
  --#{config.$prefix}border-radius-xxl: #{border-radius.$border-radius-xxl};
113
- --#{config.$prefix}border-radius-2xl: var(
114
- --#{config.$prefix}border-radius-xxl
115
- ); // Deprecated in v5.3.0 for consistency
120
+ --#{config.$prefix}border-radius-2xl: var(--#{config.$prefix}border-radius-xxl); // Deprecated in v5.3.0 for consistency
116
121
  --#{config.$prefix}border-radius-3xl: #{border-radius.$border-radius-3xl};
117
122
  --#{config.$prefix}border-radius-4xl: #{border-radius.$border-radius-4xl};
118
123
  --#{config.$prefix}border-radius-pill: #{border-radius.$border-radius-pill};
@@ -136,63 +141,139 @@
136
141
  --#{config.$prefix}form-invalid-color: #{colors.$form-invalid-color};
137
142
  --#{config.$prefix}form-invalid-border-color: #{colors.$form-invalid-border-color};
138
143
  // scss-docs-end root-form-validation-variables
139
- }
140
144
 
141
- @if color-mode.$enable-dark-mode {
142
- @include color-mode(dark, true) {
143
- color-scheme: dark;
145
+ // Spacing tokens
146
+ @each $size, $value in spacing.$spacing-sizes {
147
+ --#{config.$prefix}spacing-#{$size}: #{$value};
148
+ }
144
149
 
145
- --#{config.$prefix}body-color: #{colors.$body-color-dark};
146
- --#{config.$prefix}body-bg: #{colors.$body-bg-dark};
150
+ // Full color palette scales
147
151
 
148
- @each $color, $value in color-maps.$theme-colors-dark {
149
- --#{config.$prefix}#{$color}: #{$value};
150
- }
152
+ @each $color, $value in color-maps.$reds {
153
+ --#{config.$prefix}red-#{$color}: #{$value};
154
+ }
151
155
 
152
- @each $color, $value in color-maps.$theme-colors-text-dark {
153
- --#{config.$prefix}#{$color}-text-emphasis: #{$value};
154
- }
156
+ @each $color, $value in color-maps.$greens {
157
+ --#{config.$prefix}green-#{$color}: #{$value};
158
+ }
155
159
 
156
- @each $color, $value in color-maps.$theme-colors-bg-subtle-dark {
157
- --#{config.$prefix}#{$color}-bg-subtle: #{$value};
158
- }
160
+ @each $color, $value in color-maps.$blues {
161
+ --#{config.$prefix}blue-#{$color}: #{$value};
162
+ }
159
163
 
160
- @each $color, $value in color-maps.$theme-colors-border-subtle-dark {
161
- --#{config.$prefix}#{$color}-border-subtle: #{$value};
162
- }
164
+ @each $color, $value in color-maps.$yellows {
165
+ --#{config.$prefix}yellow-#{$color}: #{$value};
166
+ }
163
167
 
164
- @each $color, $value in color-maps.$theme-colors-hover-dark {
165
- --#{config.$prefix}#{$color}-hover: #{$value};
166
- }
168
+ // Typography - Font weights
169
+ @each $weight, $value in color-maps.$theme-font-weight {
170
+ --#{config.$prefix}font-weight-#{$weight}: #{$value};
171
+ }
167
172
 
168
- @each $color, $value in color-maps.$gradient-colors-dark {
169
- --#{config.$prefix}#{$color}-gradient: #{$value};
170
- }
173
+ // Typography - Line heights
174
+ @each $name, $value in color-maps.$line-heights {
175
+ --#{config.$prefix}line-height-#{$name}: #{$value};
176
+ }
171
177
 
172
- --#{config.$prefix}gradient: #{map.get(color-maps.$gradient-colors, dark)};
178
+ // Typography - Extended font sizes
179
+ --#{config.$prefix}font-size-xl: #{typography.$font-size-xl};
180
+ --#{config.$prefix}font-size-2xl: #{typography.$font-size-2xl};
181
+ --#{config.$prefix}display-1: #{typography.$display-1};
173
182
 
174
- --#{config.$prefix}box-shadow: #{box-shadow.$box-shadow-dark};
175
- --#{config.$prefix}box-shadow-xs: #{box-shadow.$box-shadow-xs-dark};
176
- --#{config.$prefix}box-shadow-sm: #{box-shadow.$box-shadow-sm-dark};
177
- --#{config.$prefix}box-shadow-lg: #{box-shadow.$box-shadow-lg-dark};
178
- --#{config.$prefix}box-shadow-xl: #{box-shadow.$box-shadow-xl-dark};
183
+ // Typography - Letter spacing
184
+ @each $heading, $value in color-maps.$letter-spacings {
185
+ --#{config.$prefix}letter-spacing-#{$heading}: #{$value};
186
+ }
179
187
 
180
- --#{config.$prefix}heading-color: #{colors.$headings-color-dark};
188
+ // Transitions & Animations
189
+ @each $name, $value in color-maps.$transition-durations {
190
+ --#{config.$prefix}transition-duration-#{$name}: #{$value};
191
+ }
181
192
 
182
- --#{config.$prefix}link-color: #{colors.$link-color-dark};
183
- --#{config.$prefix}link-color-rgb: #{to-rgb(colors.$link-color-dark)};
184
- --#{config.$prefix}link-hover-color: #{colors.$link-hover-color-dark};
193
+ @each $name, $value in color-maps.$easings {
194
+ --#{config.$prefix}easing-#{$name}: #{$value};
195
+ }
185
196
 
186
- --#{config.$prefix}code-color: #{colors.$code-color-dark};
197
+ --#{config.$prefix}transition-fast: #{animations.$transition-fast};
198
+ --#{config.$prefix}transition-base: #{animations.$transition-base};
199
+ --#{config.$prefix}transition-slow: #{animations.$transition-slow};
187
200
 
188
- --#{config.$prefix}border-color: #{border.$border-color-dark};
189
- --#{config.$prefix}border-color-translucent: #{colors.$border-color-translucent-dark};
201
+ // Z-index layers
202
+ @each $layer, $value in z-layers.$z-layers {
203
+ --#{config.$prefix}z-#{$layer}: #{$value};
204
+ }
190
205
 
191
- --#{config.$prefix}focus-border-color: #{colors.$focus-border-color-dark};
206
+ // Breakpoints
207
+ @each $breakpoint, $value in breakpoints.$grid-breakpoints {
208
+ --#{config.$prefix}breakpoint-#{$breakpoint}: #{$value};
209
+ }
192
210
 
193
- --#{config.$prefix}form-valid-color: #{colors.$form-valid-color-dark};
194
- --#{config.$prefix}form-valid-border-color: #{colors.$form-valid-border-color-dark};
195
- --#{config.$prefix}form-invalid-color: #{colors.$form-invalid-color-dark};
196
- --#{config.$prefix}form-invalid-border-color: #{colors.$form-invalid-border-color-dark};
211
+ // Focus ring tokens
212
+ @each $property, $value in color-maps.$focus-ring {
213
+ --#{config.$prefix}focus-ring-#{$property}: #{$value};
197
214
  }
215
+
198
216
  }
217
+
218
+ // Dark mode overrides
219
+ @include color-mode(dark, true) {
220
+ color-scheme: dark;
221
+
222
+ --#{config.$prefix}body-color: #{colors.$body-color-dark};
223
+ --#{config.$prefix}body-bg: #{colors.$body-bg-dark};
224
+
225
+ @each $color, $value in color-maps.$theme-colors-dark {
226
+ --#{config.$prefix}#{$color}: #{$value};
227
+ }
228
+
229
+ @each $color, $value in color-maps.$theme-colors-dark {
230
+ --#{config.$prefix}#{$color}-rgb: #{to-rgb($value)};
231
+ }
232
+
233
+ @each $color, $value in color-maps.$theme-colors-text-dark {
234
+ --#{config.$prefix}#{$color}-text-emphasis: #{$value};
235
+ }
236
+
237
+ @each $color, $value in color-maps.$theme-colors-bg-subtle-dark {
238
+ --#{config.$prefix}#{$color}-bg-subtle: #{$value};
239
+ }
240
+
241
+ @each $color, $value in color-maps.$theme-colors-border-subtle-dark {
242
+ --#{config.$prefix}#{$color}-border-subtle: #{$value};
243
+ }
244
+
245
+ @each $color, $value in color-maps.$theme-colors-hover-dark {
246
+ --#{config.$prefix}#{$color}-hover: #{$value};
247
+ }
248
+
249
+ @each $color, $value in color-maps.$gradient-colors-dark {
250
+ --#{config.$prefix}#{$color}-gradient: #{$value};
251
+ }
252
+
253
+ --#{config.$prefix}gradient: #{map.get(color-maps.$gradient-colors, dark)};
254
+
255
+ --#{config.$prefix}box-shadow: #{box-shadow.$box-shadow-dark};
256
+ --#{config.$prefix}box-shadow-xs: #{box-shadow.$box-shadow-xs-dark};
257
+ --#{config.$prefix}box-shadow-sm: #{box-shadow.$box-shadow-sm-dark};
258
+ --#{config.$prefix}box-shadow-lg: #{box-shadow.$box-shadow-lg-dark};
259
+ --#{config.$prefix}box-shadow-xl: #{box-shadow.$box-shadow-xl-dark};
260
+
261
+ --#{config.$prefix}heading-color: #{colors.$headings-color-dark};
262
+
263
+ --#{config.$prefix}link-color: #{colors.$link-color-dark};
264
+ --#{config.$prefix}link-color-rgb: #{to-rgb(colors.$link-color-dark)};
265
+ --#{config.$prefix}link-hover-color: #{colors.$link-hover-color-dark};
266
+ --#{config.$prefix}link-hover-color-rgb: #{to-rgb(colors.$link-hover-color-dark)};
267
+
268
+ --#{config.$prefix}code-color: #{colors.$code-color-dark};
269
+
270
+ --#{config.$prefix}border-color: #{border.$border-color-dark};
271
+ --#{config.$prefix}border-color-translucent: #{colors.$border-color-translucent-dark};
272
+
273
+ --#{config.$prefix}focus-border-color: #{colors.$focus-border-color-dark};
274
+
275
+ --#{config.$prefix}form-valid-color: #{colors.$form-valid-color-dark};
276
+ --#{config.$prefix}form-valid-border-color: #{colors.$form-valid-border-color-dark};
277
+ --#{config.$prefix}form-invalid-color: #{colors.$form-invalid-color-dark};
278
+ --#{config.$prefix}form-invalid-border-color: #{colors.$form-invalid-border-color-dark};
279
+ }
@@ -1,7 +1,7 @@
1
1
  @use '../01-settings/settings.block' as settings;
2
2
  @use '../01-settings/settings.config' as *;
3
3
  @use '../02-tools/tools.breakpoints' as *;
4
- @use '../01-settings/settings.maps' as *;
4
+ @use '../01-settings/settings.design-tokens' as *;
5
5
 
6
6
  // Block Objects Styles
7
7
  // Provides flexible section layout with customizable spacing and backgrounds