@nuvoui/core 1.3.5 → 1.4.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 (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/nuvoui.css +878 -646
  4. package/dist/nuvoui.css.map +1 -1
  5. package/dist/nuvoui.min.css +23 -1
  6. package/dist/nuvoui.min.css.map +1 -1
  7. package/package.json +1 -1
  8. package/src/styles/base/_base.scss +148 -147
  9. package/src/styles/base/_reset.scss +41 -49
  10. package/src/styles/build.scss +25 -1
  11. package/src/styles/components/_tooltips.scss +271 -0
  12. package/src/styles/config/_borders.scss +15 -0
  13. package/src/styles/config/_breakpoints.scss +11 -0
  14. package/src/styles/config/_colors.scss +192 -0
  15. package/src/styles/config/_constants.scss +1 -0
  16. package/src/styles/config/_container-queries.scss +1 -0
  17. package/src/styles/config/_feature-flags.scss +33 -0
  18. package/src/styles/config/_layouts.scss +13 -0
  19. package/src/styles/config/_shadows.scss +9 -0
  20. package/src/styles/config/_spacing.scss +41 -0
  21. package/src/styles/config/_theme-validation.scss +59 -0
  22. package/src/styles/config/_typography.scss +45 -0
  23. package/src/styles/functions/_breakpoints.scss +15 -0
  24. package/src/styles/functions/_colors.scss +280 -0
  25. package/src/styles/functions/_css-vars.scss +33 -0
  26. package/src/styles/functions/_feature-flags.scss +20 -0
  27. package/src/styles/functions/_math.scss +72 -0
  28. package/src/styles/functions/_strings.scss +68 -0
  29. package/src/styles/functions/_types.scss +104 -0
  30. package/src/styles/functions/_units.scss +83 -0
  31. package/src/styles/index.scss +26 -5
  32. package/src/styles/layouts/_container.scss +28 -27
  33. package/src/styles/layouts/_flex.scss +343 -337
  34. package/src/styles/layouts/_grid.scss +131 -128
  35. package/src/styles/mixins-map.json +486 -479
  36. package/src/styles/mixins-map.scss +1 -1
  37. package/src/styles/themes/_theme.scss +230 -211
  38. package/src/styles/tools/_accessibility.scss +50 -0
  39. package/src/styles/tools/_container-queries.scss +98 -0
  40. package/src/styles/tools/_feature-support.scss +46 -0
  41. package/src/styles/tools/_media-queries.scss +70 -0
  42. package/src/styles/tools/_modern-layout.scss +49 -0
  43. package/src/styles/utilities/_alignment.scss +35 -34
  44. package/src/styles/utilities/_animations.scss +312 -311
  45. package/src/styles/utilities/_backdrop-filters.scss +194 -193
  46. package/src/styles/utilities/_borders.scss +243 -237
  47. package/src/styles/utilities/_colors.scss +16 -136
  48. package/src/styles/utilities/_cursor.scss +10 -10
  49. package/src/styles/utilities/_display.scss +192 -191
  50. package/src/styles/utilities/_helpers.scss +106 -106
  51. package/src/styles/utilities/_opacity.scss +27 -25
  52. package/src/styles/utilities/_position.scss +124 -121
  53. package/src/styles/utilities/_shadows.scss +171 -169
  54. package/src/styles/utilities/_sizing.scss +197 -194
  55. package/src/styles/utilities/_spacing.scss +230 -227
  56. package/src/styles/utilities/_transforms.scss +235 -234
  57. package/src/styles/utilities/_transitions.scss +136 -135
  58. package/src/styles/utilities/_typography.scss +254 -239
  59. package/src/styles/utilities/_z-index.scss +69 -68
  60. package/src/styles/abstracts/_config.scss +0 -254
  61. package/src/styles/abstracts/_functions.scss +0 -626
  62. package/src/styles/themes/refactored_borders.ipynb +0 -37
  63. package/src/styles/utilities/_container-queries.scss +0 -95
  64. package/src/styles/utilities/_media-queries.scss +0 -189
  65. package/src/styles/utilities/_tooltips.scss +0 -258
@@ -0,0 +1,271 @@
1
+ @use "../config/feature-flags" as config-flags;
2
+ @use "../functions/feature-flags" as fn-flags;
3
+ @mixin tooltip-variables {
4
+ // Tooltip core variables
5
+ --tooltip-bg: rgba(17 17 17 / 90%);
6
+ --tooltip-shadow-color: rgb(0 0 0 / 20%);
7
+ --tooltip-text-color: #fff;
8
+
9
+ // Animation variables
10
+ --microtip-transition-duration: 0.18s;
11
+ --microtip-transition-easing: ease-in-out;
12
+ --microtip-transition-delay: 0s;
13
+
14
+ // config-typo variables
15
+ --microtip-font-size: 13px;
16
+ --microtip-font-weight: normal;
17
+ --microtip-text-transform: none;
18
+
19
+ // Sizing variables
20
+ --tooltip-small-width: 80px;
21
+ --tooltip-medium-width: 150px;
22
+ --tooltip-large-width: 260px;
23
+ --tooltip-border-radius: 4px;
24
+ }
25
+
26
+ @if fn-flags.feature-enabled("tooltips") {
27
+ // Apply variables based on parent selector
28
+ @if config-flags.$parent-selector == "" {
29
+ :root {
30
+ @include tooltip-variables;
31
+ }
32
+ } @else {
33
+ #{config-flags.$parent-selector} {
34
+ @include tooltip-variables;
35
+ }
36
+ }
37
+
38
+ #{config-flags.$parent-selector} [data-tooltip][role~="tooltip"] {
39
+ position: relative;
40
+
41
+ &::before,
42
+ &::after {
43
+ transform: translate3d(0, 0, 0);
44
+ backface-visibility: hidden;
45
+ will-change: transform;
46
+ opacity: 0;
47
+ pointer-events: none;
48
+ transition:
49
+ opacity var(--microtip-transition-duration) var(--microtip-transition-easing) var(--microtip-transition-delay),
50
+ transform var(--microtip-transition-duration) var(--microtip-transition-easing) var(--microtip-transition-delay);
51
+ position: absolute;
52
+ box-sizing: border-box;
53
+ z-index: 10;
54
+ transform-origin: top;
55
+ }
56
+
57
+ &::before {
58
+ background-size: 100% auto !important;
59
+ content: "";
60
+ }
61
+
62
+ &::after {
63
+ background: var(--tooltip-bg);
64
+ box-shadow: 0 3px 7px var(--tooltip-shadow-color);
65
+ border-radius: var(--tooltip-border-radius);
66
+ color: var(--tooltip-text-color);
67
+ content: attr(data-tooltip);
68
+ font-size: var(--microtip-font-size);
69
+ font-weight: var(--microtip-font-weight);
70
+ text-transform: var(--microtip-text-transform);
71
+ padding: 0.5em 1em;
72
+ white-space: nowrap;
73
+ box-sizing: content-box;
74
+ }
75
+
76
+ &:hover::before,
77
+ &:hover::after,
78
+ &:focus::before,
79
+ &:focus::after {
80
+ opacity: 1;
81
+ pointer-events: auto;
82
+ }
83
+ }
84
+
85
+ // Top position tooltips
86
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-position|="top"] {
87
+ &::before {
88
+ border-left: 9px solid transparent;
89
+ border-right: 9px solid transparent;
90
+ border-top: 6px solid var(--tooltip-bg);
91
+ height: 0;
92
+ width: 0;
93
+ margin-bottom: 6px;
94
+ transform: translate3d(-50%, 0, 0);
95
+ bottom: 100%;
96
+ left: 50%;
97
+ z-index: 999;
98
+ }
99
+
100
+ &::after {
101
+ margin-bottom: 11px;
102
+ transform: translate3d(-50%, 0, 0);
103
+ bottom: 100%;
104
+ left: 50%;
105
+ }
106
+
107
+ &:hover::before {
108
+ transform: translate3d(-50%, -5px, 0);
109
+ }
110
+
111
+ &:hover::after {
112
+ transform: translate3d(-50%, -5px, 0);
113
+ }
114
+ }
115
+
116
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-position="top-left"] {
117
+ &::after {
118
+ transform: translate3d(calc(-100% + 16px), 0, 0);
119
+ bottom: 100%;
120
+ }
121
+
122
+ &:hover::after {
123
+ transform: translate3d(calc(-100% + 16px), -5px, 0);
124
+ }
125
+ }
126
+
127
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-position="top-right"] {
128
+ &::after {
129
+ transform: translate3d(calc(0% + -16px), 0, 0);
130
+ bottom: 100%;
131
+ }
132
+
133
+ &:hover::after {
134
+ transform: translate3d(calc(0% + -16px), -5px, 0);
135
+ }
136
+ }
137
+
138
+ // Bottom position tooltips
139
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-position|="bottom"] {
140
+ &::before {
141
+ border-left: 9px solid transparent;
142
+ border-right: 9px solid transparent;
143
+ border-bottom: 6px solid var(--tooltip-bg);
144
+ height: 0;
145
+ width: 0;
146
+ margin-top: 5px;
147
+ margin-bottom: 0;
148
+ transform: translate3d(-50%, -10px, 0);
149
+ bottom: auto;
150
+ left: 50%;
151
+ top: 100%;
152
+ z-index: 999;
153
+ }
154
+
155
+ &::after {
156
+ margin-top: 11px;
157
+ transform: translate3d(-50%, -10px, 0);
158
+ top: 100%;
159
+ left: 50%;
160
+ }
161
+
162
+ &:hover::before {
163
+ transform: translate3d(-50%, 0, 0);
164
+ }
165
+
166
+ &:hover::after {
167
+ transform: translate3d(-50%, 0, 0);
168
+ }
169
+ }
170
+
171
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-position="bottom-left"] {
172
+ &::after {
173
+ transform: translate3d(calc(-100% + 16px), -10px, 0);
174
+ top: 100%;
175
+ }
176
+
177
+ &:hover::after {
178
+ transform: translate3d(calc(-100% + 16px), 0, 0);
179
+ }
180
+ }
181
+
182
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-position="bottom-right"] {
183
+ &::after {
184
+ transform: translate3d(calc(0% + -16px), -10px, 0);
185
+ top: 100%;
186
+ }
187
+
188
+ &:hover::after {
189
+ transform: translate3d(calc(0% + -16px), 0, 0);
190
+ }
191
+ }
192
+
193
+ // Left position tooltips
194
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-position="left"] {
195
+ &::before,
196
+ &::after {
197
+ inset: auto auto auto 100%;
198
+ left: auto; // Remove any left positioning
199
+ right: 100%; // Position to the left of the element
200
+ top: 50%;
201
+ transform: translate3d(10px, -50%, 0);
202
+ }
203
+
204
+ &::before {
205
+ border-top: 9px solid transparent;
206
+ border-bottom: 9px solid transparent;
207
+ border-left: 6px solid var(--tooltip-bg);
208
+ height: 0;
209
+ width: 0;
210
+ margin-right: 5px;
211
+ margin-bottom: 0;
212
+ z-index: 999;
213
+ }
214
+
215
+ &::after {
216
+ margin-right: 11px;
217
+ }
218
+
219
+ &:hover::before,
220
+ &:hover::after {
221
+ transform: translate3d(0, -50%, 0);
222
+ }
223
+ }
224
+
225
+ // Right position tooltips
226
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-position="right"] {
227
+ &::before,
228
+ &::after {
229
+ bottom: auto;
230
+ left: 100%;
231
+ top: 50%;
232
+ transform: translate3d(-10px, -50%, 0);
233
+ }
234
+
235
+ &::before {
236
+ border-top: 9px solid transparent;
237
+ border-bottom: 9px solid transparent;
238
+ border-right: 6px solid var(--tooltip-bg);
239
+ height: 0;
240
+ width: 0;
241
+ margin-bottom: 0;
242
+ margin-left: 5px;
243
+ z-index: 999;
244
+ }
245
+
246
+ &::after {
247
+ margin-left: 11px;
248
+ }
249
+
250
+ &:hover::before,
251
+ &:hover::after {
252
+ transform: translate3d(0, -50%, 0);
253
+ }
254
+ }
255
+
256
+ // Tooltip sizes
257
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-size="small"]::after {
258
+ white-space: initial;
259
+ width: var(--tooltip-small-width);
260
+ }
261
+
262
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-size="medium"]::after {
263
+ white-space: initial;
264
+ width: var(--tooltip-medium-width);
265
+ }
266
+
267
+ #{config-flags.$parent-selector} [role~="tooltip"][data-microtip-size="large"]::after {
268
+ white-space: initial;
269
+ width: var(--tooltip-large-width);
270
+ }
271
+ }
@@ -0,0 +1,15 @@
1
+ // Configuration: Borders
2
+ // Border widths and radii
3
+
4
+ $border-widths: (0, 1, 2, 4, 8) !default;
5
+
6
+ $border-radii: (
7
+ "xs": 0.25rem,
8
+ "sm": 0.375rem,
9
+ "md": 0.5rem,
10
+ "lg": 0.75rem,
11
+ "xl": 1rem,
12
+ "2xl": 1.25rem,
13
+ "full": 99in,
14
+ "none": 0,
15
+ ) !default;
@@ -0,0 +1,11 @@
1
+ // Configuration: Breakpoints
2
+ // Media query breakpoints for responsive design
3
+
4
+ $breakpoints: (
5
+ "xs": 480px,
6
+ "sm": 640px,
7
+ "md": 768px,
8
+ "lg": 1024px,
9
+ "xl": 1280px,
10
+ "2xl": 1536px,
11
+ ) !default;
@@ -0,0 +1,192 @@
1
+ // Configuration: Color system
2
+ // Core color definitions and semantic mappings
3
+
4
+ @use "sass:map";
5
+ @use "sass:list";
6
+
7
+ // Accessible color palette - semantic colors
8
+ $primary: #007bff !default;
9
+ $secondary: #6c757d !default;
10
+ $success: #28a745 !default;
11
+ $danger: #dc3545 !default;
12
+ $warning: #ffc107 !default;
13
+ $info: #17a2b8 !default;
14
+
15
+ // Color primitives
16
+ $color-primitives: (
17
+ "gray": #6b7280,
18
+ "red": #ef4444,
19
+ "blue": #3b82f6,
20
+ "green": #22c55e,
21
+ "yellow": #eab308,
22
+ "purple": #a855f7,
23
+ "pink": #ec4899,
24
+ ) !default;
25
+
26
+ // Basic colors
27
+ $basic-colors: (
28
+ "black": #000,
29
+ "white": #fff,
30
+ "transparent": transparent,
31
+ ) !default;
32
+
33
+ // Generate required lists
34
+ $semantic-colors: ("primary", "secondary", "success", "danger", "warning", "info");
35
+ $primitive-color-names: map.keys($color-primitives);
36
+ $color-names: list.join($semantic-colors, $primitive-color-names);
37
+ $color-names-with-basic: list.join($color-names, map.keys($basic-colors));
38
+
39
+ // A default color for color generation function `get-color` to return a a default value on using wrong value
40
+ $default-color: currentcolor !default;
41
+
42
+ $colors-constants: (
43
+ "aliceblue": aliceblue,
44
+ "antiquewhite": antiquewhite,
45
+ "aqua": aqua,
46
+ "aquamarine": aquamarine,
47
+ "azure": azure,
48
+ "beige": beige,
49
+ "bisque": bisque,
50
+ "black": black,
51
+ "blanchedalmond": blanchedalmond,
52
+ "blue": blue,
53
+ "blueviolet": blueviolet,
54
+ "brown": brown,
55
+ "burlywood": burlywood,
56
+ "cadetblue": cadetblue,
57
+ "chartreuse": chartreuse,
58
+ "chocolate": chocolate,
59
+ "coral": coral,
60
+ "cornflowerblue": cornflowerblue,
61
+ "cornsilk": cornsilk,
62
+ "crimson": crimson,
63
+ "cyan": cyan,
64
+ "darkblue": darkblue,
65
+ "darkcyan": darkcyan,
66
+ "darkgoldenrod": darkgoldenrod,
67
+ "darkgray": darkgray,
68
+ "darkgreen": darkgreen,
69
+ "darkgrey": darkgrey,
70
+ "darkkhaki": darkkhaki,
71
+ "darkmagenta": darkmagenta,
72
+ "darkolivegreen": darkolivegreen,
73
+ "darkorange": darkorange,
74
+ "darkorchid": darkorchid,
75
+ "darkred": darkred,
76
+ "darksalmon": darksalmon,
77
+ "darkseagreen": darkseagreen,
78
+ "darkslateblue": darkslateblue,
79
+ "darkslategray": darkslategray,
80
+ "darkslategrey": darkslategrey,
81
+ "darkturquoise": darkturquoise,
82
+ "darkviolet": darkviolet,
83
+ "deeppink": deeppink,
84
+ "deepskyblue": deepskyblue,
85
+ "dimgray": dimgray,
86
+ "dimgrey": dimgrey,
87
+ "dodgerblue": dodgerblue,
88
+ "firebrick": firebrick,
89
+ "floralwhite": floralwhite,
90
+ "forestgreen": forestgreen,
91
+ "fuchsia": fuchsia,
92
+ "gainsboro": gainsboro,
93
+ "ghostwhite": ghostwhite,
94
+ "gold": gold,
95
+ "goldenrod": goldenrod,
96
+ "gray": gray,
97
+ "green": green,
98
+ "greenyellow": greenyellow,
99
+ "grey": grey,
100
+ "honeydew": honeydew,
101
+ "hotpink": hotpink,
102
+ "indianred": indianred,
103
+ "indigo": indigo,
104
+ "ivory": ivory,
105
+ "khaki": khaki,
106
+ "lavender": lavender,
107
+ "lavenderblush": lavenderblush,
108
+ "lawngreen": lawngreen,
109
+ "lemonchiffon": lemonchiffon,
110
+ "lightblue": lightblue,
111
+ "lightcoral": lightcoral,
112
+ "lightcyan": lightcyan,
113
+ "lightgoldenrodyellow": lightgoldenrodyellow,
114
+ "lightgray": lightgray,
115
+ "lightgreen": lightgreen,
116
+ "lightgrey": lightgrey,
117
+ "lightpink": lightpink,
118
+ "lightsalmon": lightsalmon,
119
+ "lightseagreen": lightseagreen,
120
+ "lightskyblue": lightskyblue,
121
+ "lightslategray": lightslategray,
122
+ "lightslategrey": lightslategrey,
123
+ "lightsteelblue": lightsteelblue,
124
+ "lightyellow": lightyellow,
125
+ "lime": lime,
126
+ "limegreen": limegreen,
127
+ "linen": linen,
128
+ "magenta": magenta,
129
+ "maroon": maroon,
130
+ "mediumaquamarine": mediumaquamarine,
131
+ "mediumblue": mediumblue,
132
+ "mediumorchid": mediumorchid,
133
+ "mediumpurple": mediumpurple,
134
+ "mediumseagreen": mediumseagreen,
135
+ "mediumslateblue": mediumslateblue,
136
+ "mediumspringgreen": mediumspringgreen,
137
+ "mediumturquoise": mediumturquoise,
138
+ "mediumvioletred": mediumvioletred,
139
+ "midnightblue": midnightblue,
140
+ "mintcream": mintcream,
141
+ "mistyrose": mistyrose,
142
+ "moccasin": moccasin,
143
+ "navajowhite": navajowhite,
144
+ "navy": navy,
145
+ "oldlace": oldlace,
146
+ "olive": olive,
147
+ "olivedrab": olivedrab,
148
+ "orange": orange,
149
+ "orangered": orangered,
150
+ "orchid": orchid,
151
+ "palegoldenrod": palegoldenrod,
152
+ "palegreen": palegreen,
153
+ "paleturquoise": paleturquoise,
154
+ "palevioletred": palevioletred,
155
+ "papayawhip": papayawhip,
156
+ "peachpuff": peachpuff,
157
+ "peru": peru,
158
+ "pink": pink,
159
+ "plum": plum,
160
+ "powderblue": powderblue,
161
+ "purple": purple,
162
+ "red": red,
163
+ "rebeccapurple": rebeccapurple,
164
+ "rosybrown": rosybrown,
165
+ "royalblue": royalblue,
166
+ "saddlebrown": saddlebrown,
167
+ "salmon": salmon,
168
+ "sandybrown": sandybrown,
169
+ "seagreen": seagreen,
170
+ "seashell": seashell,
171
+ "sienna": sienna,
172
+ "silver": silver,
173
+ "skyblue": skyblue,
174
+ "slateblue": slateblue,
175
+ "slategray": slategray,
176
+ "slategrey": slategrey,
177
+ "snow": snow,
178
+ "springgreen": springgreen,
179
+ "steelblue": steelblue,
180
+ "tan": tan,
181
+ "teal": teal,
182
+ "thistle": thistle,
183
+ "tomato": tomato,
184
+ "transparent": transparent,
185
+ "turquoise": turquoise,
186
+ "violet": violet,
187
+ "wheat": wheat,
188
+ "white": white,
189
+ "whitesmoke": whitesmoke,
190
+ "yellow": yellow,
191
+ "yellowgreen": yellowgreen,
192
+ );
@@ -0,0 +1 @@
1
+ $units: ("px", "rem", "%", "em", "vh", "vw", "vmin", "vmax", "ch", "ex", "cm", "mm", "in", "pt", "pc");
@@ -0,0 +1 @@
1
+ $container-names: ("main", "sidebar", "card", "section") !default;
@@ -0,0 +1,33 @@
1
+ // Configuration: Feature flags
2
+ // Control which features are enabled in the framework
3
+
4
+ $feature-flags: (
5
+ "alignments": true,
6
+ "animations": true,
7
+ "backdrops": true,
8
+ "borders": true,
9
+ "container": true,
10
+ "container-queries": true,
11
+ "cursors": true,
12
+ "displays": true,
13
+ "flex": true,
14
+ "grid": true,
15
+ "opacity": true,
16
+ "position": true,
17
+ "shadows": true,
18
+ "sizing": true,
19
+ "spacing": true,
20
+ "tooltips": true,
21
+ "theme": true,
22
+ "transforms": true,
23
+ "transitions": true,
24
+ "config-typo": true,
25
+ "z-index": true,
26
+ ) !default;
27
+
28
+ // Framework global settings
29
+ $generate-utility-classes: false !default;
30
+ $enable-dark-mode: true !default;
31
+ $enable-debugger: false !default;
32
+ $default-unit: rem !default;
33
+ $parent-selector: "" !default;
@@ -0,0 +1,13 @@
1
+ // Configuration: Layout
2
+ // Layout constants and grid configurations
3
+
4
+ $column-count: 12 !default;
5
+ $default-container-name: nuvoui-container !default;
6
+
7
+ $grid-item-sizes: (
8
+ "xs": 200px,
9
+ "sm": 250px,
10
+ "md": 300px,
11
+ "lg": 350px,
12
+ "xl": 400px,
13
+ ) !default;
@@ -0,0 +1,9 @@
1
+ // Configuration: Shadows
2
+ // Shadow color definitions
3
+
4
+ $shadow-colors: (
5
+ "default": rgb(0 0 0 / 10%),
6
+ "dark": rgb(0 0 0 / 20%),
7
+ "darker": rgb(0 0 0 / 35%),
8
+ "darkest": rgb(0 0 0 / 50%),
9
+ ) !default;
@@ -0,0 +1,41 @@
1
+ // Configuration: Spacing
2
+ // Spacing scale and percentage values
3
+
4
+ $spacings: (
5
+ 0: 0,
6
+ 1: 0.25rem,
7
+ // 4px
8
+ 2: 0.5rem,
9
+ // 8px
10
+ 3: 0.75rem,
11
+ // 12px
12
+ 4: 1rem,
13
+ // 16px
14
+ 5: 1.25rem,
15
+ // 20px
16
+ 6: 1.5rem,
17
+ // 24px
18
+ 8: 2rem,
19
+ // 32px
20
+ 10: 2.5rem,
21
+ // 40px
22
+ 12: 3rem,
23
+ // 48px
24
+ 16: 4rem,
25
+ // 64px
26
+ 20: 5rem,
27
+ // 80px
28
+ 24: 6rem,
29
+ // 96px
30
+ 32: 8rem,
31
+ // 128px
32
+ 40: 10rem,
33
+ // 160px
34
+ 48: 12rem,
35
+ // 192px
36
+ 56: 14rem,
37
+ // 224px
38
+ 64: 16rem, // 256px
39
+ ) !default;
40
+
41
+ $percentages: (0, 5, 10, 20, 25, 30, 33, 40, 50, 60, 66, 70, 75, 80, 90, 100) !default;
@@ -0,0 +1,59 @@
1
+ // Configuration: Theme validation
2
+ // Theme token validation and theme definitions
3
+
4
+ @use "sass:map";
5
+ @use "sass:list";
6
+
7
+ // Default theme config (can be overridden)
8
+ $light-theme: (
9
+ "bg-base": #fbfafc,
10
+ "bg-alternate": #1a1a1a,
11
+ "bg-surface": #fff,
12
+ "border-base": #d3d5d9,
13
+ "text-color": #1a1a1a,
14
+ "text-muted": #1a1a1a8a,
15
+ "text-subtle": #1a1a1a50,
16
+ "text-inverted": #f1f1f1,
17
+ ) !default;
18
+
19
+ // Extract theme tokens from light theme keys
20
+ $theme-tokens: map.keys($light-theme) !default;
21
+
22
+ $dark-theme: (
23
+ "bg-base": #1a1a1a,
24
+ "bg-alternate": #f1f1f1,
25
+ "bg-surface": #2e2e2e,
26
+ "border-base": #2e2e2e,
27
+ "text-color": #f1f1f1,
28
+ "text-muted": #f1f1f18a,
29
+ "text-subtle": #f1f1f150,
30
+ "text-inverted": #1a1a1a,
31
+ ) !default;
32
+
33
+ @function validate-theme-tokens($theme-map, $required-tokens) {
34
+ $missing-tokens: ();
35
+
36
+ @each $token in $required-tokens {
37
+ @if not map.has-key($theme-map, $token) {
38
+ $missing-tokens: list.append($missing-tokens, $token, comma);
39
+ }
40
+ }
41
+
42
+ @if list.length($missing-tokens) > 0 {
43
+ @error "Theme is missing required tokens: #{$missing-tokens}";
44
+ }
45
+
46
+ @return list.length($missing-tokens) == 0;
47
+ }
48
+
49
+ // Validate both themes
50
+ @mixin validate-tokens {
51
+ @if not validate-theme-tokens($light-theme, $theme-tokens) {
52
+ @error "Light theme is missing required tokens.";
53
+ }
54
+ @if not validate-theme-tokens($dark-theme, $theme-tokens) {
55
+ @error "Dark theme is missing required tokens.";
56
+ }
57
+ }
58
+
59
+ @include validate-tokens;
@@ -0,0 +1,45 @@
1
+ // Configuration: config-typo
2
+ // Font families, sizes, and weights
3
+
4
+ $base-size: 1rem !default;
5
+ $font-family:
6
+ system-ui,
7
+ -apple-system,
8
+ "BlinkMacSystemFont",
9
+ "Segoe UI",
10
+ "Roboto",
11
+ "Oxygen",
12
+ "Ubuntu",
13
+ "Cantarell",
14
+ sans-serif !default;
15
+
16
+ $font-sizes: (
17
+ "xs": 0.75rem,
18
+ // 12px
19
+ "sm": 0.875rem,
20
+ // 14px
21
+ "md": 1rem,
22
+ "base": 1rem,
23
+ // 16px
24
+ "lg": 1.25rem,
25
+ // 20px
26
+ "xl": 1.5rem,
27
+ // 24px
28
+ "2xl": 1.75rem,
29
+ // 28px
30
+ "3xl": 2rem,
31
+ // 32px
32
+ "4xl": 2.5rem, // 40px
33
+ ) !default;
34
+
35
+ $font-weights: (
36
+ "thin": 100,
37
+ "extralight": 200,
38
+ "light": 300,
39
+ "normal": 400,
40
+ "medium": 500,
41
+ "semibold": 600,
42
+ "bold": 700,
43
+ "extrabold": 800,
44
+ "black": 900,
45
+ ) !default;