@nuvoui/core 1.3.5 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/LICENSE +21 -0
  2. package/dist/nuvoui.css +322 -258
  3. package/dist/nuvoui.css.map +1 -1
  4. package/dist/nuvoui.min.css +23 -1
  5. package/dist/nuvoui.min.css.map +1 -1
  6. package/package.json +1 -1
  7. package/src/styles/base/_base.scss +148 -147
  8. package/src/styles/base/_reset.scss +41 -49
  9. package/src/styles/build.scss +25 -1
  10. package/src/styles/components/_tooltips.scss +271 -0
  11. package/src/styles/config/_borders.scss +15 -0
  12. package/src/styles/config/_breakpoints.scss +11 -0
  13. package/src/styles/config/_colors.scss +192 -0
  14. package/src/styles/config/_constants.scss +1 -0
  15. package/src/styles/config/_container-queries.scss +1 -0
  16. package/src/styles/config/_feature-flags.scss +33 -0
  17. package/src/styles/config/_layouts.scss +13 -0
  18. package/src/styles/config/_shadows.scss +9 -0
  19. package/src/styles/config/_spacing.scss +41 -0
  20. package/src/styles/config/_theme-validation.scss +59 -0
  21. package/src/styles/config/_typography.scss +45 -0
  22. package/src/styles/functions/_breakpoints.scss +15 -0
  23. package/src/styles/functions/_colors.scss +280 -0
  24. package/src/styles/functions/_css-vars.scss +33 -0
  25. package/src/styles/functions/_feature-flags.scss +20 -0
  26. package/src/styles/functions/_math.scss +72 -0
  27. package/src/styles/functions/_strings.scss +68 -0
  28. package/src/styles/functions/_types.scss +104 -0
  29. package/src/styles/functions/_units.scss +83 -0
  30. package/src/styles/index.scss +26 -5
  31. package/src/styles/layouts/_container.scss +28 -27
  32. package/src/styles/layouts/_flex.scss +340 -337
  33. package/src/styles/layouts/_grid.scss +131 -128
  34. package/src/styles/mixins-map.json +484 -479
  35. package/src/styles/mixins-map.scss +1 -1
  36. package/src/styles/themes/_theme.scss +230 -211
  37. package/src/styles/tools/_accessibility.scss +50 -0
  38. package/src/styles/tools/_container-queries.scss +98 -0
  39. package/src/styles/tools/_feature-support.scss +46 -0
  40. package/src/styles/tools/_media-queries.scss +70 -0
  41. package/src/styles/tools/_modern-layout.scss +49 -0
  42. package/src/styles/utilities/_alignment.scss +35 -34
  43. package/src/styles/utilities/_animations.scss +312 -311
  44. package/src/styles/utilities/_backdrop-filters.scss +194 -193
  45. package/src/styles/utilities/_borders.scss +243 -237
  46. package/src/styles/utilities/_colors.scss +16 -136
  47. package/src/styles/utilities/_cursor.scss +10 -10
  48. package/src/styles/utilities/_display.scss +192 -191
  49. package/src/styles/utilities/_helpers.scss +106 -106
  50. package/src/styles/utilities/_opacity.scss +27 -25
  51. package/src/styles/utilities/_position.scss +124 -121
  52. package/src/styles/utilities/_shadows.scss +171 -169
  53. package/src/styles/utilities/_sizing.scss +197 -194
  54. package/src/styles/utilities/_spacing.scss +230 -227
  55. package/src/styles/utilities/_transforms.scss +235 -234
  56. package/src/styles/utilities/_transitions.scss +136 -135
  57. package/src/styles/utilities/_typography.scss +242 -239
  58. package/src/styles/utilities/_z-index.scss +69 -68
  59. package/src/styles/abstracts/_config.scss +0 -254
  60. package/src/styles/abstracts/_functions.scss +0 -626
  61. package/src/styles/themes/refactored_borders.ipynb +0 -37
  62. package/src/styles/utilities/_container-queries.scss +0 -95
  63. package/src/styles/utilities/_media-queries.scss +0 -189
  64. package/src/styles/utilities/_tooltips.scss +0 -258
@@ -5,8 +5,9 @@
5
5
  @use "sass:meta";
6
6
 
7
7
  // Import variables
8
- @use "../abstracts/config" as VAR;
9
- @use "../abstracts/functions" as FN;
8
+ @use "../config/feature-flags" as config-flags;
9
+ @use "../config/breakpoints" as config-breakpoint;
10
+ @use "../functions/feature-flags" as fn-flags;
10
11
 
11
12
  // Z-Index Utilities
12
13
  // Classes:
@@ -17,121 +18,121 @@
17
18
 
18
19
  // Z-index values map (can be moved to variables)
19
20
  $z-indexes: (
20
- "auto": auto,
21
- "0": 0,
22
- "10": 10,
23
- "20": 20,
24
- "30": 30,
25
- "40": 40,
26
- "50": 50,
27
- "60": 60,
28
- "70": 70,
29
- "80": 80,
30
- "90": 90,
31
- "100": 100,
32
- "200": 200,
33
- "500": 500,
34
- "1000": 1000,
21
+ "auto": auto,
22
+ "0": 0,
23
+ "10": 10,
24
+ "20": 20,
25
+ "30": 30,
26
+ "40": 40,
27
+ "50": 50,
28
+ "60": 60,
29
+ "70": 70,
30
+ "80": 80,
31
+ "90": 90,
32
+ "100": 100,
33
+ "200": 200,
34
+ "500": 500,
35
+ "1000": 1000,
35
36
  );
36
37
 
37
38
  // Named z-index levels (can be moved to variables)
38
39
  $z-index-levels: (
39
- "base": 0,
40
- "hover": 10,
41
- "dropdown": 100,
42
- "sticky": 200,
43
- "fixed": 300,
44
- "overlay": 400,
45
- "drawer": 500,
46
- "modal": 600,
47
- "popover": 700,
48
- "tooltip": 800,
49
- "toast": 900,
50
- "max": 9999,
40
+ "base": 0,
41
+ "hover": 10,
42
+ "dropdown": 100,
43
+ "sticky": 200,
44
+ "fixed": 300,
45
+ "overlay": 400,
46
+ "drawer": 500,
47
+ "modal": 600,
48
+ "popover": 700,
49
+ "tooltip": 800,
50
+ "toast": 900,
51
+ "max": 9999,
51
52
  );
52
53
 
53
54
  // Apply a z-index value
54
55
  // @param {Number|String} $value - Z-index value or key
55
56
  @mixin z-index($value) {
56
- @if map.has-key($z-indexes, $value) {
57
- z-index: map.get($z-indexes, $value);
58
- } @else if map.has-key($z-index-levels, $value) {
59
- z-index: map.get($z-index-levels, $value);
60
- } @else {
61
- z-index: $value;
62
- }
57
+ @if map.has-key($z-indexes, $value) {
58
+ z-index: map.get($z-indexes, $value);
59
+ } @else if map.has-key($z-index-levels, $value) {
60
+ z-index: map.get($z-index-levels, $value);
61
+ } @else {
62
+ z-index: $value;
63
+ }
63
64
  }
64
65
 
65
66
  // Generate z-index utility classes
66
67
  // @param {String} $breakpoint - Optional breakpoint name for responsive variants
67
68
  @mixin z-index-utilities($breakpoint: null) {
68
- $suffix: if($breakpoint, "\\@#{$breakpoint}", "");
69
+ $suffix: if($breakpoint, "\\@#{$breakpoint}", "");
69
70
 
70
- // Standard numbered z-index utilities
71
- @each $key, $value in $z-indexes {
72
- #{VAR.$parent-selector} .z-#{$key}#{$suffix} {
73
- @include z-index($key);
71
+ // Standard numbered z-index utilities
72
+ @each $key, $value in $z-indexes {
73
+ #{config-flags.$parent-selector} .z-#{$key}#{$suffix} {
74
+ @include z-index($key);
75
+ }
74
76
  }
75
- }
76
77
 
77
- // Named semantic z-index utilities
78
- @each $key, $value in $z-index-levels {
79
- #{VAR.$parent-selector} .z-#{$key}#{$suffix} {
80
- @include z-index($value);
78
+ // Named semantic z-index utilities
79
+ @each $key, $value in $z-index-levels {
80
+ #{config-flags.$parent-selector} .z-#{$key}#{$suffix} {
81
+ @include z-index($value);
82
+ }
81
83
  }
82
- }
83
84
  }
84
85
 
85
86
  // Create specific named utilities as mixins for use in other files
86
87
  @mixin z-base {
87
- @include z-index("base");
88
+ @include z-index("base");
88
89
  }
89
90
  @mixin z-hover {
90
- @include z-index("hover");
91
+ @include z-index("hover");
91
92
  }
92
93
  @mixin z-dropdown {
93
- @include z-index("dropdown");
94
+ @include z-index("dropdown");
94
95
  }
95
96
  @mixin z-sticky {
96
- @include z-index("sticky");
97
+ @include z-index("sticky");
97
98
  }
98
99
  @mixin z-fixed {
99
- @include z-index("fixed");
100
+ @include z-index("fixed");
100
101
  }
101
102
  @mixin z-drawer {
102
- @include z-index("drawer");
103
+ @include z-index("drawer");
103
104
  }
104
105
  @mixin z-modal {
105
- @include z-index("modal");
106
+ @include z-index("modal");
106
107
  }
107
108
  @mixin z-popover {
108
- @include z-index("popover");
109
+ @include z-index("popover");
109
110
  }
110
111
  @mixin z-tooltip {
111
- @include z-index("tooltip");
112
+ @include z-index("tooltip");
112
113
  }
113
114
  @mixin z-overlay {
114
- @include z-index("overlay");
115
+ @include z-index("overlay");
115
116
  }
116
117
  @mixin z-toast {
117
- @include z-index("toast");
118
+ @include z-index("toast");
118
119
  }
119
120
  @mixin z-max {
120
- @include z-index("max");
121
+ @include z-index("max");
121
122
  }
122
123
  @mixin z-auto {
123
- @include z-index("auto");
124
+ @include z-index("auto");
124
125
  }
125
126
 
126
127
  // Generate utility classes
127
- @if FN.feature-enabled("z-index") {
128
- // Generate base utilities
129
- @include z-index-utilities;
128
+ @if fn-flags.feature-enabled("z-index") {
129
+ // Generate base utilities
130
+ @include z-index-utilities;
130
131
 
131
- // Generate responsive variants
132
- @each $breakpoint, $width in VAR.$breakpoints {
133
- @media (min-width: #{$width}) {
134
- @include z-index-utilities($breakpoint);
132
+ // Generate responsive variants
133
+ @each $breakpoint, $width in config-breakpoint.$breakpoints {
134
+ @media (min-width: #{$width}) {
135
+ @include z-index-utilities($breakpoint);
136
+ }
135
137
  }
136
- }
137
138
  }
@@ -1,254 +0,0 @@
1
- @use "sass:map";
2
- @use "sass:math";
3
- @use "sass:list";
4
-
5
- $feature-flags: (
6
- "alignments": true,
7
- "animations": true,
8
- "backdrops": true,
9
- "borders": true,
10
- "container": true,
11
- "container-queries": true,
12
- "cursors": true,
13
- "displays": true,
14
- "flex": true,
15
- "grid": true,
16
- "opacity": true,
17
- "position": true,
18
- "shadows": true,
19
- "sizing": true,
20
- "spacing": true,
21
- "tooltips": true,
22
- "theme": true,
23
- "transforms": true,
24
- "transitions": true,
25
- "typography": true,
26
- "z-index": true,
27
- ) !default;
28
-
29
- // Framework Configuration Options
30
- $generate-utility-classes: false !default;
31
- $enable-dark-mode: true !default;
32
-
33
- $enable-debugger: false !default;
34
-
35
- // if just a number passed, it will be assumed as px
36
- $default-unit: px !default;
37
-
38
- // Text
39
- $base-size: 16px !default;
40
- $font-family:
41
- system-ui,
42
- -apple-system,
43
- "BlinkMacSystemFont",
44
- "Segoe UI",
45
- "Roboto",
46
- "Oxygen",
47
- "Ubuntu",
48
- "Cantarell",
49
- sans-serif !default;
50
-
51
- // Global variables that might be used across different modules
52
- $column-count: 12 !default; // todo: pending
53
-
54
- $default-container-name: nuvoui-container !default; // todo: pending
55
-
56
- // Accessible color palette
57
- $primary: #007bff !default;
58
- $secondary: #6c757d !default;
59
- $success: #28a745 !default;
60
- $danger: #dc3545 !default;
61
- $warning: #ffc107 !default;
62
- $info: #17a2b8 !default;
63
-
64
- // Color palette
65
- $color-primitives: (
66
- "gray": #6b7280,
67
- "red": #ef4444,
68
- "blue": #3b82f6,
69
- "green": #22c55e,
70
- "yellow": #eab308,
71
- "purple": #a855f7,
72
- "pink": #ec4899,
73
- ) !default;
74
-
75
- // Default theme config (can be overridden)
76
- $light-theme: (
77
- "bg-base": #fbfafc,
78
- "bg-alternate": #1a1a1a,
79
- "bg-surface": #fff,
80
- "border-base": #d3d5d9,
81
- "text-color": #1a1a1a,
82
- "text-muted": #1a1a1a8a,
83
- "text-subtle": #1a1a1a50,
84
- "text-inverted": #f1f1f1,
85
- ) !default;
86
-
87
- // Extract theme tokens from light theme keys
88
- // Users can still override this if they want to use only a subset
89
- $theme-tokens: map.keys($light-theme) !default;
90
-
91
- $dark-theme: (
92
- "bg-base": #1a1a1a,
93
- "bg-alternate": #f1f1f1,
94
- "bg-surface": #2e2e2e,
95
- "border-base": #2e2e2e,
96
- "text-color": #f1f1f1,
97
- "text-muted": #f1f1f18a,
98
- "text-subtle": #f1f1f150,
99
- "text-inverted": #1a1a1a,
100
- ) !default;
101
-
102
- $basic-colors: (
103
- "black": #000,
104
- "white": #fff,
105
- "transparent": transparent,
106
- ) !default;
107
-
108
- $semantic-colors: ("primary", "secondary", "success", "danger", "warning", "info");
109
- $primitive-color-names: map.keys($color-primitives);
110
- $color-names: list.join($semantic-colors, $primitive-color-names);
111
- $color-names-with-basic: list.join($color-names, map.keys($basic-colors));
112
-
113
- @function validate-theme-tokens($theme-map, $required-tokens) {
114
- $missing-tokens: ();
115
-
116
- @each $token in $required-tokens {
117
- @if not map.has-key($theme-map, $token) {
118
- $missing-tokens: list.append($missing-tokens, $token, comma);
119
- }
120
- }
121
-
122
- @if list.length($missing-tokens) > 0 {
123
- @error "Theme is missing required tokens: #{$missing-tokens}";
124
- }
125
-
126
- @return list.length($missing-tokens) == 0;
127
- }
128
-
129
- // Validate both themes
130
- @mixin validate-tokens {
131
- @if not validate-theme-tokens($light-theme, $theme-tokens) {
132
- @error "Light theme is missing required tokens.";
133
- }
134
- @if not validate-theme-tokens($dark-theme, $theme-tokens) {
135
- @error "Dark theme is missing required tokens.";
136
- }
137
- }
138
-
139
- @include validate-tokens;
140
-
141
- $shadow-colors: (
142
- "default": rgb(0 0 0 / 10%),
143
- "dark": rgb(0 0 0 / 20%),
144
- "darker": rgb(0 0 0 / 35%),
145
- "darkest": rgb(0 0 0 / 50%),
146
- ) !default;
147
-
148
- // Breakpoints
149
- $breakpoints: (
150
- "xs": 480px,
151
- "sm": 640px,
152
- "md": 768px,
153
- "lg": 1024px,
154
- "xl": 1280px,
155
- "2xl": 1536px,
156
- ) !default;
157
-
158
- $grid-item-sizes: (
159
- "xs": 200px,
160
- "sm": 250px,
161
- "md": 300px,
162
- "lg": 350px,
163
- "xl": 400px,
164
- ) !default;
165
-
166
- // _variables.scss
167
- $font-sizes: (
168
- "xs": 0.75rem,
169
- // 12px
170
- "sm": 0.875rem,
171
- // 14px
172
- "md": 1rem,
173
- "base": 1rem,
174
- // 16px
175
- "lg": 1.25rem,
176
- // 20px
177
- "xl": 1.5rem,
178
- // 24px
179
- "2xl": 1.75rem,
180
- // 28px
181
- "3xl": 2rem,
182
- // 32px
183
- "4xl": 2.5rem, // 40px
184
- ) !default;
185
-
186
- // Updated spacing map
187
- $spacings: (
188
- 0: 0,
189
- 1: 0.25rem,
190
- // 4px
191
- 2: 0.5rem,
192
- // 8px
193
- 3: 0.75rem,
194
- // 12px
195
- 4: 1rem,
196
- // 16px
197
- 5: 1.25rem,
198
- // 20px
199
- 6: 1.5rem,
200
- // 24px
201
- 8: 2rem,
202
- // 32px
203
- 10: 2.5rem,
204
- // 40px
205
- 12: 3rem,
206
- // 48px
207
- 16: 4rem,
208
- // 64px
209
- 20: 5rem,
210
- // 80px
211
- 24: 6rem,
212
- // 96px
213
- 32: 8rem,
214
- // 128px
215
- 40: 10rem,
216
- // 160px
217
- 48: 12rem,
218
- // 192px
219
- 56: 14rem,
220
- // 224px
221
- 64: 16rem, // 256px
222
- ) !default;
223
-
224
- $percentages: (0, 5, 10, 20, 25, 30, 33, 40, 50, 60, 66, 70, 75, 80, 90, 100) !default;
225
-
226
- // Common border width values that are most useful
227
- $border-widths: (0, 1, 2, 4, 8) !default;
228
-
229
- // Common border radius values that are most useful
230
- $border-radii: (
231
- "xs": 0.25rem,
232
- "sm": 0.375rem,
233
- "md": 0.5rem,
234
- "lg": 0.75rem,
235
- "xl": 1rem,
236
- "2xl": 1.25rem,
237
- "full": 50%,
238
- "none": 0,
239
- ) !default;
240
-
241
- // Font weight map
242
- $font-weights: (
243
- "thin": 100,
244
- "extralight": 200,
245
- "light": 300,
246
- "normal": 400,
247
- "medium": 500,
248
- "semibold": 600,
249
- "bold": 700,
250
- "extrabold": 800,
251
- "black": 900,
252
- ) !default;
253
-
254
- $parent-selector: "" !default;