@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
@@ -2,47 +2,49 @@
2
2
  @use "sass:map";
3
3
  @use "sass:math";
4
4
  @use "sass:string";
5
- @use "../abstracts/config" as VAR;
6
- @use "../abstracts/functions" as FN;
5
+ @use "../config/feature-flags" as config-flags;
6
+ @use "../config/breakpoints" as config-breakpoint;
7
+ @use "../config/shadows" as config-shadow;
8
+ @use "../functions/feature-flags" as fn-flags;
7
9
 
8
10
  // TODO: SHADOWS WITH COLOR VARIANTS WITH RESPONSIVE
9
11
  $shadow-sizes: (
10
- "sm": (
11
- "x": 0,
12
- "y": 1px,
13
- "blur": 2px,
14
- "spread": 0,
15
- ),
16
- "md": (
17
- "x": 0,
18
- "y": 4px,
19
- "blur": 6px,
20
- "spread": -1px,
21
- ),
22
- "lg": (
23
- "x": 0,
24
- "y": 10px,
25
- "blur": 15px,
26
- "spread": -3px,
27
- ),
28
- "xl": (
29
- "x": 0,
30
- "y": 20px,
31
- "blur": 25px,
32
- "spread": -5px,
33
- ),
34
- "hero": (
35
- "x": 0,
36
- "y": 20px,
37
- "blur": 25px,
38
- "spread": 5px,
39
- ),
40
- "monster": (
41
- "x": 0,
42
- "y": 20px,
43
- "blur": 55px,
44
- "spread": 20px,
45
- ),
12
+ "sm": (
13
+ "x": 0,
14
+ "y": 1px,
15
+ "blur": 2px,
16
+ "spread": 0,
17
+ ),
18
+ "md": (
19
+ "x": 0,
20
+ "y": 4px,
21
+ "blur": 6px,
22
+ "spread": -1px,
23
+ ),
24
+ "lg": (
25
+ "x": 0,
26
+ "y": 10px,
27
+ "blur": 15px,
28
+ "spread": -3px,
29
+ ),
30
+ "xl": (
31
+ "x": 0,
32
+ "y": 20px,
33
+ "blur": 25px,
34
+ "spread": -5px,
35
+ ),
36
+ "hero": (
37
+ "x": 0,
38
+ "y": 20px,
39
+ "blur": 25px,
40
+ "spread": 5px,
41
+ ),
42
+ "monster": (
43
+ "x": 0,
44
+ "y": 20px,
45
+ "blur": 55px,
46
+ "spread": 20px,
47
+ ),
46
48
  );
47
49
 
48
50
  // Generates a CSS shadow string from a given size.
@@ -51,178 +53,178 @@ $shadow-sizes: (
51
53
  // @return {String} - The CSS shadow string.
52
54
 
53
55
  @mixin shadow-base($x, $y, $blur, $spread, $color) {
54
- box-shadow: $x $y $blur $spread $color;
56
+ box-shadow: $x $y $blur $spread $color;
55
57
  }
56
58
 
57
59
  // Generates a CSS shadow string from a given size.
58
60
  // @param {String} $size - The shadow size.
59
61
  // @param {String} $color - The shadow color.
60
62
  @mixin shadow($size: "md", $color: "default") {
61
- @if not map.has-key($shadow-sizes, $size) {
62
- @error "Shadow size '#{$size}' not found in $shadow-sizes map";
63
- $size: "md"; // Fallback to default
64
- }
65
- @if not map.has-key(VAR.$shadow-colors, $color) {
66
- @error "Shadow color '#{$color}' not found in VAR.$shadow-colors map";
67
- $color: "default"; // Fallback to default
68
- }
69
-
70
- $shadow: map.get($shadow-sizes, $size);
71
- $shadow-color: map.get(VAR.$shadow-colors, $color);
72
- @include shadow-base(map.get($shadow, "x"), map.get($shadow, "y"), map.get($shadow, "blur"), map.get($shadow, "spread"), $shadow-color);
63
+ @if not map.has-key($shadow-sizes, $size) {
64
+ @error "Shadow size '#{$size}' not found in $shadow-sizes map";
65
+ $size: "md"; // Fallback to default
66
+ }
67
+ @if not map.has-key(config-shadow.$shadow-colors, $color) {
68
+ @error "Shadow color '#{$color}' not found in config-shadow.$shadow-colors map";
69
+ $color: "default"; // Fallback to default
70
+ }
71
+
72
+ $shadow: map.get($shadow-sizes, $size);
73
+ $shadow-color: map.get(config-shadow.$shadow-colors, $color);
74
+ @include shadow-base(map.get($shadow, "x"), map.get($shadow, "y"), map.get($shadow, "blur"), map.get($shadow, "spread"), $shadow-color);
73
75
  }
74
76
 
75
77
  @mixin shadow-inset($size: "md", $color: "default") {
76
- $shadow: map.get($shadow-sizes, $size);
77
- $shadow-color: map.get(VAR.$shadow-colors, $color);
78
+ $shadow: map.get($shadow-sizes, $size);
79
+ $shadow-color: map.get(config-shadow.$shadow-colors, $color);
78
80
 
79
- box-shadow: inset map.get($shadow, "x") map.get($shadow, "y") map.get($shadow, "blur") map.get($shadow, "spread") $shadow-color;
81
+ box-shadow: inset map.get($shadow, "x") map.get($shadow, "y") map.get($shadow, "blur") map.get($shadow, "spread") $shadow-color;
80
82
  }
81
83
 
82
84
  @mixin elevation($i) {
83
- @if $i == 1 {
84
- @include shadow("sm");
85
- } @else if $i == 2 {
86
- @include shadow("md");
87
- } @else if $i == 3 {
88
- @include shadow("lg");
89
- } @else if $i == 4 {
90
- @include shadow("xl");
91
- } @else if $i == 5 {
92
- @include shadow("monster");
93
- }
94
-
95
- z-index: $i;
85
+ @if $i == 1 {
86
+ @include shadow("sm");
87
+ } @else if $i == 2 {
88
+ @include shadow("md");
89
+ } @else if $i == 3 {
90
+ @include shadow("lg");
91
+ } @else if $i == 4 {
92
+ @include shadow("xl");
93
+ } @else if $i == 5 {
94
+ @include shadow("monster");
95
+ }
96
+
97
+ z-index: $i;
96
98
  }
97
99
 
98
100
  // Utility Classes
99
- @if FN.feature-enabled("shadows") {
100
- #{VAR.$parent-selector} .shadow-none {
101
- box-shadow: none !important;
102
- }
103
-
104
- @each $size, $values in $shadow-sizes {
105
- #{VAR.$parent-selector} .shadow-#{$size} {
106
- @include shadow($size);
101
+ @if fn-flags.feature-enabled("shadows") {
102
+ #{config-flags.$parent-selector} .shadow-none {
103
+ box-shadow: none !important;
107
104
  }
108
105
 
109
- // Shadow with color variants
110
- @each $color-name, $color-value in VAR.$shadow-colors {
111
- @if $color-name != "default" {
112
- #{VAR.$parent-selector} .shadow-#{$size}-#{$color-name} {
113
- @include shadow($size, $color-name);
106
+ @each $size, $values in $shadow-sizes {
107
+ #{config-flags.$parent-selector} .shadow-#{$size} {
108
+ @include shadow($size);
114
109
  }
115
- }
116
- }
117
110
 
118
- #{VAR.$parent-selector} .shadow-inset-#{$size} {
119
- @include shadow-inset($size);
120
- }
121
-
122
- // Inset shadows with color variants
123
- @each $color-name, $color-value in VAR.$shadow-colors {
124
- @if $color-name != "default" {
125
- #{VAR.$parent-selector} .shadow-inset-#{$size}-#{$color-name} {
126
- @include shadow-inset($size, $color-name);
111
+ // Shadow with color variants
112
+ @each $color-name, $color-value in config-shadow.$shadow-colors {
113
+ @if $color-name != "default" {
114
+ #{config-flags.$parent-selector} .shadow-#{$size}-#{$color-name} {
115
+ @include shadow($size, $color-name);
116
+ }
117
+ }
127
118
  }
128
- }
129
- }
130
119
 
131
- // Hover shadows
132
- #{VAR.$parent-selector} .hover\:shadow-#{$size}:hover {
133
- @include shadow($size);
134
- }
135
-
136
- // Hover shadows with color variants
137
- @each $color-name, $color-value in VAR.$shadow-colors {
138
- @if $color-name != "default" {
139
- #{VAR.$parent-selector} .hover\:shadow-#{$size}-#{$color-name}:hover {
140
- @include shadow($size, $color-name);
120
+ #{config-flags.$parent-selector} .shadow-inset-#{$size} {
121
+ @include shadow-inset($size);
141
122
  }
142
- }
143
- }
144
123
 
145
- // Focus shadows
146
- #{VAR.$parent-selector} .focus\:shadow-#{$size}:focus {
147
- @include shadow($size);
148
- }
149
-
150
- // Focus shadows with color variants
151
- @each $color-name, $color-value in VAR.$shadow-colors {
152
- @if $color-name != "default" {
153
- #{VAR.$parent-selector} .focus\:shadow-#{$size}-#{$color-name}:focus {
154
- @include shadow($size, $color-name);
124
+ // Inset shadows with color variants
125
+ @each $color-name, $color-value in config-shadow.$shadow-colors {
126
+ @if $color-name != "default" {
127
+ #{config-flags.$parent-selector} .shadow-inset-#{$size}-#{$color-name} {
128
+ @include shadow-inset($size, $color-name);
129
+ }
130
+ }
155
131
  }
156
- }
157
- }
158
132
 
159
- // Active shadows
160
- #{VAR.$parent-selector} .active\:shadow-#{$size}:active {
161
- @include shadow($size);
162
- }
163
-
164
- // Active shadows with color variants
165
- @each $color-name, $color-value in VAR.$shadow-colors {
166
- @if $color-name != "default" {
167
- #{VAR.$parent-selector} .active\:shadow-#{$size}-#{$color-name}:active {
168
- @include shadow($size, $color-name);
169
- }
170
- }
171
- }
172
- }
173
-
174
- // Responsive variants
175
- @each $breakpoint, $width in VAR.$breakpoints {
176
- @media (min-width: #{$width}) {
177
- @each $size, $values in $shadow-sizes {
178
- // Regular shadows with breakpoints
179
- #{VAR.$parent-selector} .shadow-#{$size}\@#{$breakpoint} {
180
- @include shadow($size);
133
+ // Hover shadows
134
+ #{config-flags.$parent-selector} .hover\:shadow-#{$size}:hover {
135
+ @include shadow($size);
181
136
  }
182
137
 
183
- // Shadows with color variants at breakpoints
184
- @each $color-name, $color-value in VAR.$shadow-colors {
185
- @if $color-name != "default" {
186
- #{VAR.$parent-selector} .shadow-#{$size}-#{$color-name}\@#{$breakpoint} {
187
- @include shadow($size, $color-name);
138
+ // Hover shadows with color variants
139
+ @each $color-name, $color-value in config-shadow.$shadow-colors {
140
+ @if $color-name != "default" {
141
+ #{config-flags.$parent-selector} .hover\:shadow-#{$size}-#{$color-name}:hover {
142
+ @include shadow($size, $color-name);
143
+ }
188
144
  }
189
- }
190
145
  }
191
146
 
192
- // Hover shadows with breakpoints
193
- #{VAR.$parent-selector} .hover\:shadow-#{$size}\@#{$breakpoint}:hover {
194
- @include shadow($size);
147
+ // Focus shadows
148
+ #{config-flags.$parent-selector} .focus\:shadow-#{$size}:focus {
149
+ @include shadow($size);
195
150
  }
196
151
 
197
- // Hover shadows with color variants at breakpoints
198
- @each $color-name, $color-value in VAR.$shadow-colors {
199
- @if $color-name != "default" {
200
- #{VAR.$parent-selector} .hover\:shadow-#{$size}-#{$color-name}\@#{$breakpoint}:hover {
201
- @include shadow($size, $color-name);
152
+ // Focus shadows with color variants
153
+ @each $color-name, $color-value in config-shadow.$shadow-colors {
154
+ @if $color-name != "default" {
155
+ #{config-flags.$parent-selector} .focus\:shadow-#{$size}-#{$color-name}:focus {
156
+ @include shadow($size, $color-name);
157
+ }
202
158
  }
203
- }
204
159
  }
205
160
 
206
- // Focus shadows with breakpoints
207
- #{VAR.$parent-selector} .focus\:shadow-#{$size}\@#{$breakpoint}:focus {
208
- @include shadow($size);
161
+ // Active shadows
162
+ #{config-flags.$parent-selector} .active\:shadow-#{$size}:active {
163
+ @include shadow($size);
164
+ }
165
+
166
+ // Active shadows with color variants
167
+ @each $color-name, $color-value in config-shadow.$shadow-colors {
168
+ @if $color-name != "default" {
169
+ #{config-flags.$parent-selector} .active\:shadow-#{$size}-#{$color-name}:active {
170
+ @include shadow($size, $color-name);
171
+ }
172
+ }
209
173
  }
174
+ }
210
175
 
211
- // Focus shadows with color variants at breakpoints
212
- @each $color-name, $color-value in VAR.$shadow-colors {
213
- @if $color-name != "default" {
214
- #{VAR.$parent-selector} .focus\:shadow-#{$size}-#{$color-name}\@#{$breakpoint}:focus {
215
- @include shadow($size, $color-name);
176
+ // Responsive variants
177
+ @each $breakpoint, $width in config-breakpoint.$breakpoints {
178
+ @media (min-width: #{$width}) {
179
+ @each $size, $values in $shadow-sizes {
180
+ // Regular shadows with breakpoints
181
+ #{config-flags.$parent-selector} .shadow-#{$size}\@#{$breakpoint} {
182
+ @include shadow($size);
183
+ }
184
+
185
+ // Shadows with color variants at breakpoints
186
+ @each $color-name, $color-value in config-shadow.$shadow-colors {
187
+ @if $color-name != "default" {
188
+ #{config-flags.$parent-selector} .shadow-#{$size}-#{$color-name}\@#{$breakpoint} {
189
+ @include shadow($size, $color-name);
190
+ }
191
+ }
192
+ }
193
+
194
+ // Hover shadows with breakpoints
195
+ #{config-flags.$parent-selector} .hover\:shadow-#{$size}\@#{$breakpoint}:hover {
196
+ @include shadow($size);
197
+ }
198
+
199
+ // Hover shadows with color variants at breakpoints
200
+ @each $color-name, $color-value in config-shadow.$shadow-colors {
201
+ @if $color-name != "default" {
202
+ #{config-flags.$parent-selector} .hover\:shadow-#{$size}-#{$color-name}\@#{$breakpoint}:hover {
203
+ @include shadow($size, $color-name);
204
+ }
205
+ }
206
+ }
207
+
208
+ // Focus shadows with breakpoints
209
+ #{config-flags.$parent-selector} .focus\:shadow-#{$size}\@#{$breakpoint}:focus {
210
+ @include shadow($size);
211
+ }
212
+
213
+ // Focus shadows with color variants at breakpoints
214
+ @each $color-name, $color-value in config-shadow.$shadow-colors {
215
+ @if $color-name != "default" {
216
+ #{config-flags.$parent-selector} .focus\:shadow-#{$size}-#{$color-name}\@#{$breakpoint}:focus {
217
+ @include shadow($size, $color-name);
218
+ }
219
+ }
220
+ }
216
221
  }
217
- }
218
222
  }
219
- }
220
223
  }
221
- }
222
224
 
223
- @for $i from 1 through 5 {
224
- #{VAR.$parent-selector} .elevation-#{$i} {
225
- @include elevation($i);
225
+ @for $i from 1 through 5 {
226
+ #{config-flags.$parent-selector} .elevation-#{$i} {
227
+ @include elevation($i);
228
+ }
226
229
  }
227
- }
228
230
  }