@nuvoui/core 1.2.5 → 1.2.6

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 (41) hide show
  1. package/README.md +2 -2
  2. package/dist/nuvoui.css +21899 -22748
  3. package/dist/nuvoui.css.map +1 -1
  4. package/dist/nuvoui.min.css +1 -1
  5. package/dist/nuvoui.min.css.map +1 -1
  6. package/package.json +2 -2
  7. package/src/styles/abstracts/_config.scss +81 -47
  8. package/src/styles/abstracts/_functions.scss +21 -61
  9. package/src/styles/base/_base.scss +67 -59
  10. package/src/styles/base/_reset.scss +11 -8
  11. package/src/styles/index.scss +28 -10
  12. package/src/styles/layouts/_container.scss +1 -2
  13. package/src/styles/layouts/_flex.scss +442 -154
  14. package/src/styles/layouts/_grid.scss +145 -75
  15. package/src/styles/mixins-map.scss +1085 -1
  16. package/src/styles/themes/_theme.scss +127 -91
  17. package/src/styles/utilities/_alignment.scss +40 -13
  18. package/src/styles/utilities/_animations.scss +165 -105
  19. package/src/styles/utilities/_backdrop-filters.scss +111 -83
  20. package/src/styles/utilities/_borders.scss +329 -143
  21. package/src/styles/utilities/_colors.scss +24 -25
  22. package/src/styles/utilities/_container-queries.scss +7 -7
  23. package/src/styles/utilities/_cursor.scss +10 -17
  24. package/src/styles/utilities/_display.scss +234 -85
  25. package/src/styles/utilities/_helpers.scss +5 -5
  26. package/src/styles/utilities/_media-queries.scss +24 -27
  27. package/src/styles/utilities/_opacity.scss +15 -31
  28. package/src/styles/utilities/_position.scss +129 -66
  29. package/src/styles/utilities/_shadows.scss +23 -29
  30. package/src/styles/utilities/_sizing.scss +269 -108
  31. package/src/styles/utilities/_spacing.scss +254 -156
  32. package/src/styles/utilities/_tooltips.scss +35 -31
  33. package/src/styles/utilities/_transforms.scss +179 -156
  34. package/src/styles/utilities/_transitions.scss +134 -68
  35. package/src/styles/utilities/_typography.scss +341 -127
  36. package/src/styles/utilities/_z-index.scss +79 -49
  37. package/src/styles/abstracts/_index.scss +0 -1
  38. package/src/styles/base/_index.scss +0 -2
  39. package/src/styles/layouts/_index.scss +0 -3
  40. package/src/styles/themes/_index.scss +0 -1
  41. package/src/styles/utilities/_index.scss +0 -23
@@ -3,7 +3,7 @@
3
3
 
4
4
  @use "sass:math";
5
5
  @use "sass:meta";
6
- @use "../abstracts" as *;
6
+ @use "../abstracts/config" as VAR;
7
7
 
8
8
  /**
9
9
  * @component Opacity
@@ -76,43 +76,27 @@
76
76
  opacity: calc(#{$value} / 100);
77
77
  }
78
78
 
79
- @if $generate-utility-classes {
79
+ @if VAR.$generate-utility-classes {
80
80
  // Opacity Utilities
81
- @each $i in $percentages {
82
- .opacity-#{$i} {
83
- @include opacity($i);
84
- }
85
- .hover\:opacity-#{$i}:hover {
86
- @include opacity($i);
87
- }
88
- .focus\:opacity-#{$i}:focus {
89
- @include opacity($i);
90
- }
91
- .active\:opacity-#{$i}:active {
92
- @include opacity($i);
93
- }
94
- .group:hover .group-hover\:opacity-#{$i} {
81
+ @each $i in VAR.$percentages {
82
+ #{VAR.$parent-selector} .opacity-#{$i},
83
+ #{VAR.$parent-selector} .hover\:opacity-#{$i}:hover,
84
+ #{VAR.$parent-selector} .focus\:opacity-#{$i}:focus,
85
+ #{VAR.$parent-selector} .active\:opacity-#{$i}:active,
86
+ #{VAR.$parent-selector} .group:hover .group-hover\:opacity-#{$i} {
95
87
  @include opacity($i);
96
88
  }
97
89
  }
98
90
 
99
91
  // Responsive Variants for Opacity
100
- @each $breakpoint, $width in $breakpoints {
92
+ @each $breakpoint, $width in VAR.$breakpoints {
101
93
  @media (min-width: #{$width}) {
102
- @each $i in $percentages {
103
- .opacity-#{$i}\@#{$breakpoint} {
104
- @include opacity($i);
105
- }
106
- .hover\:opacity-#{$i}\@#{$breakpoint}:hover {
107
- @include opacity($i);
108
- }
109
- .focus\:opacity-#{$i}\@#{$breakpoint}:focus {
110
- @include opacity($i);
111
- }
112
- .active\:opacity-#{$i}\@#{$breakpoint}:active {
113
- @include opacity($i);
114
- }
115
- .group:hover .group-hover\:opacity-#{$i}\@#{$breakpoint} {
94
+ @each $i in VAR.$percentages {
95
+ #{VAR.$parent-selector} .opacity-#{$i}\@#{$breakpoint},
96
+ #{VAR.$parent-selector} .hover\:opacity-#{$i}\@#{$breakpoint}:hover,
97
+ #{VAR.$parent-selector} .focus\:opacity-#{$i}\@#{$breakpoint}:focus,
98
+ #{VAR.$parent-selector} .active\:opacity-#{$i}\@#{$breakpoint}:active,
99
+ #{VAR.$parent-selector} .group:hover .group-hover\:opacity-#{$i}\@#{$breakpoint} {
116
100
  @include opacity($i);
117
101
  }
118
102
  }
@@ -1,4 +1,5 @@
1
- @use '../abstracts' as *;
1
+ @use "../abstracts/config" as VAR;
2
+ @use "../abstracts/functions" as FN;
2
3
 
3
4
  /**
4
5
  * @component Position
@@ -48,12 +49,10 @@
48
49
  * @see z-index, transform
49
50
  */
50
51
 
51
-
52
52
  // -----------------------------------------------
53
53
  // MIXINS
54
54
  // -----------------------------------------------
55
55
 
56
-
57
56
  /**
58
57
  * @mixin static
59
58
  * @description Sets position to static (default document flow)
@@ -104,8 +103,8 @@
104
103
  */
105
104
  @mixin fixed {
106
105
  position: fixed;
107
- }
108
-
106
+ }
107
+
109
108
  /**
110
109
  * @mixin sticky
111
110
  * @description Creates a sticky element that remains in view during scrolling
@@ -118,8 +117,7 @@
118
117
  position: sticky;
119
118
  z-index: 999;
120
119
  top: 0;
121
- }
122
-
120
+ }
123
121
 
124
122
  /**
125
123
  * @mixin top
@@ -131,9 +129,11 @@
131
129
  * @include top(1rem);
132
130
  * }
133
131
  */
134
- @mixin top($value) {top: $value; }
132
+ @mixin top($value) {
133
+ top: FN.fix-units($value);
134
+ }
135
135
 
136
- /**
136
+ /**
137
137
  * @mixin right
138
138
  * @description Sets the right position of an element
139
139
  * @param {Number|Length} $value - Position value (in px, rem, etc.)
@@ -143,9 +143,11 @@
143
143
  * @include right(0);
144
144
  * }
145
145
  */
146
- @mixin right($value) {right: $value; }
147
-
148
- /**
146
+ @mixin right($value) {
147
+ right: FN.fix-units($value);
148
+ }
149
+
150
+ /**
149
151
  * @mixin bottom
150
152
  * @description Sets the bottom position of an element
151
153
  * @param {Number|Length} $value - Position value (in px, rem, etc.)
@@ -155,9 +157,11 @@
155
157
  * @include bottom(0);
156
158
  * }
157
159
  */
158
- @mixin bottom($value) {bottom: $value; }
159
-
160
- /**
160
+ @mixin bottom($value) {
161
+ bottom: FN.fix-units($value);
162
+ }
163
+
164
+ /**
161
165
  * @mixin left
162
166
  * @description Sets the left position of an element
163
167
  * @param {Number|Length} $value - Position value (in px, rem, etc.)
@@ -167,60 +171,91 @@
167
171
  * @include left(0);
168
172
  * }
169
173
  */
170
- @mixin left($value) {left: $value; }
174
+ @mixin left($value) {
175
+ left: $value;
176
+ }
171
177
 
178
+ // todo: Documentation
179
+ @mixin absolute-center {
180
+ position: absolute;
181
+ left: 50%;
182
+ top: 50%;
172
183
 
184
+ --translate-x: -50%;
185
+ --translate-y: -50%;
173
186
 
174
- // todo: Documentation
175
- @mixin absolute-center {
176
- position: absolute;
177
- left: 50%;
178
- top: 50%;
179
-
180
- --translate-x: -50%;
181
- --translate-y: -50%;
182
-
183
- transform: translateX(var(--translate-x)) translateY(var(--translate-y)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));
187
+ transform: translateX(var(--translate-x)) translateY(var(--translate-y)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));
184
188
  }
185
189
 
186
190
  // todo: Documentation
187
191
  // Fractional and percentage placements
188
192
  $position-fractions: (
189
- '25p': 25%,
190
- '33p': 33.333%,
191
- '50p': 50%,
192
- '66p': 66.667%,
193
- '75p': 75%,
194
- "100p": 100%
193
+ "25p": 25%,
194
+ "33p": 33.333%,
195
+ "50p": 50%,
196
+ "66p": 66.667%,
197
+ "75p": 75%,
198
+ "100p": 100%,
195
199
  );
196
200
 
197
-
198
-
199
201
  // -----------------------------------------------
200
202
  // UTILITY CLASSES
201
203
  // -----------------------------------------------
202
- @if $generate-utility-classes {
204
+ @if VAR.$generate-utility-classes {
203
205
  // Position Classes
204
- .static { @include static; }
205
- .relative { @include relative; }
206
- .absolute { @include absolute; }
207
- .fixed { @include fixed; }
208
- .sticky { @include sticky; }
209
- .absolute-center { @include absolute-center; }
206
+ #{VAR.$parent-selector} .static {
207
+ @include static;
208
+ }
209
+
210
+ #{VAR.$parent-selector} .relative {
211
+ @include relative;
212
+ }
213
+
214
+ #{VAR.$parent-selector} .absolute {
215
+ @include absolute;
216
+ }
217
+
218
+ #{VAR.$parent-selector} .fixed {
219
+ @include fixed;
220
+ }
221
+
222
+ #{VAR.$parent-selector} .sticky {
223
+ @include sticky;
224
+ }
225
+
226
+ #{VAR.$parent-selector} .absolute-center {
227
+ @include absolute-center;
228
+ }
210
229
 
211
230
  @each $key, $value in $position-fractions {
212
- .top-#{$key} { @include top($value); }
213
- .right-#{$key} { @include right($value); }
214
- .bottom-#{$key} { @include bottom($value); }
215
- .left-#{$key} { @include left($value); }
231
+ #{VAR.$parent-selector} .top-#{$key} {
232
+ @include top($value);
233
+ }
234
+ #{VAR.$parent-selector} .right-#{$key} {
235
+ @include right($value);
236
+ }
237
+ #{VAR.$parent-selector} .bottom-#{$key} {
238
+ @include bottom($value);
239
+ }
240
+ #{VAR.$parent-selector} .left-#{$key} {
241
+ @include left($value);
242
+ }
216
243
  }
217
244
 
218
245
  // Placement Classes
219
- @each $key, $value in $spacings {
220
- .top-#{$key} { @include top($value); }
221
- .right-#{$key} { @include right($value); }
222
- .bottom-#{$key} { @include bottom($value); }
223
- .left-#{$key} { @include left($value); }
246
+ @each $key, $value in VAR.$spacings {
247
+ #{VAR.$parent-selector} .top-#{$key} {
248
+ @include top($value);
249
+ }
250
+ #{VAR.$parent-selector} .right-#{$key} {
251
+ @include right($value);
252
+ }
253
+ #{VAR.$parent-selector} .bottom-#{$key} {
254
+ @include bottom($value);
255
+ }
256
+ #{VAR.$parent-selector} .left-#{$key} {
257
+ @include left($value);
258
+ }
224
259
  }
225
260
 
226
261
  // -----------------------------------------------
@@ -228,28 +263,56 @@ $position-fractions: (
228
263
  // -----------------------------------------------
229
264
 
230
265
  // Responsive Position Classes
231
- @each $breakpoint, $width in $breakpoints {
266
+ @each $breakpoint, $width in VAR.$breakpoints {
232
267
  @media (min-width: #{$width}) {
233
- .static\@#{$breakpoint} {@include static;}
234
- .relative\@#{$breakpoint} {@include relative;}
235
- .absolute\@#{$breakpoint} {@include absolute;}
236
- .fixed\@#{$breakpoint} {@include fixed;}
237
- .sticky\@#{$breakpoint} {@include sticky;}
238
- .absolute-center\@#{$breakpoint} { @include absolute-center; }
268
+ #{VAR.$parent-selector} .static\@#{$breakpoint} {
269
+ @include static;
270
+ }
271
+ #{VAR.$parent-selector} .relative\@#{$breakpoint} {
272
+ @include relative;
273
+ }
274
+ #{VAR.$parent-selector} .absolute\@#{$breakpoint} {
275
+ @include absolute;
276
+ }
277
+ #{VAR.$parent-selector} .fixed\@#{$breakpoint} {
278
+ @include fixed;
279
+ }
280
+ #{VAR.$parent-selector} .sticky\@#{$breakpoint} {
281
+ @include sticky;
282
+ }
283
+ #{VAR.$parent-selector} .absolute-center\@#{$breakpoint} {
284
+ @include absolute-center;
285
+ }
239
286
 
240
287
  // Fractional responsive placements
241
288
  @each $key, $value in $position-fractions {
242
- .top-#{$key}\@#{$breakpoint} { @include top($value); }
243
- .right-#{$key}\@#{$breakpoint} { @include right($value); }
244
- .bottom-#{$key}\@#{$breakpoint} { @include bottom($value); }
245
- .left-#{$key}\@#{$breakpoint} { @include left($value); }
289
+ #{VAR.$parent-selector} .top-#{$key}\@#{$breakpoint} {
290
+ @include top($value);
291
+ }
292
+ #{VAR.$parent-selector} .right-#{$key}\@#{$breakpoint} {
293
+ @include right($value);
294
+ }
295
+ #{VAR.$parent-selector} .bottom-#{$key}\@#{$breakpoint} {
296
+ @include bottom($value);
297
+ }
298
+ #{VAR.$parent-selector} .left-#{$key}\@#{$breakpoint} {
299
+ @include left($value);
300
+ }
246
301
  }
247
302
 
248
- @each $key, $value in $spacings {
249
- .top-#{$key}\@#{$breakpoint} {@include top($value);}
250
- .right-#{$key}\@#{$breakpoint} {@include right($value);}
251
- .bottom-#{$key}\@#{$breakpoint} {@include bottom($value);}
252
- .left-#{$key}\@#{$breakpoint} {@include left($value);}
303
+ @each $key, $value in VAR.$spacings {
304
+ #{VAR.$parent-selector} .top-#{$key}\@#{$breakpoint} {
305
+ @include top($value);
306
+ }
307
+ #{VAR.$parent-selector} .right-#{$key}\@#{$breakpoint} {
308
+ @include right($value);
309
+ }
310
+ #{VAR.$parent-selector} .bottom-#{$key}\@#{$breakpoint} {
311
+ @include bottom($value);
312
+ }
313
+ #{VAR.$parent-selector} .left-#{$key}\@#{$breakpoint} {
314
+ @include left($value);
315
+ }
253
316
  }
254
317
  }
255
318
  }
@@ -2,8 +2,9 @@
2
2
  @use "sass:map";
3
3
  @use "sass:math";
4
4
  @use "sass:string";
5
- @use "../abstracts" as VAR;
5
+ @use "../abstracts/config" as VAR;
6
6
 
7
+ // TODO: SHADOWS WITH COLOR VARIANTS WITH RESPONSIVE
7
8
  $shadow-sizes: (
8
9
  "sm": (
9
10
  "x": 0,
@@ -73,24 +74,17 @@ $shadow-sizes: (
73
74
 
74
75
  $shadow: map.get($shadow-sizes, $size);
75
76
  $shadow-color: map.get(VAR.$shadow-colors, $color);
76
- @include shadow-base(
77
- map.get($shadow, "x"),
78
- map.get($shadow, "y"),
79
- map.get($shadow, "blur"),
80
- map.get($shadow, "spread"),
81
- $shadow-color
82
- );
77
+ @include shadow-base(map.get($shadow, "x"), map.get($shadow, "y"), map.get($shadow, "blur"), map.get($shadow, "spread"), $shadow-color);
83
78
  }
84
79
 
85
80
  @mixin shadow-inset($size: "md", $color: "default") {
86
81
  $shadow: map.get($shadow-sizes, $size);
87
82
  $shadow-color: map.get(VAR.$shadow-colors, $color);
88
83
 
89
- box-shadow: inset map.get($shadow, "x") map.get($shadow, "y") map.get($shadow, "blur") map.get($shadow, "spread")
90
- $shadow-color;
84
+ box-shadow: inset map.get($shadow, "x") map.get($shadow, "y") map.get($shadow, "blur") map.get($shadow, "spread") $shadow-color;
91
85
  }
92
86
 
93
- @mixin elevation($i){
87
+ @mixin elevation($i) {
94
88
  @if $i == 1 {
95
89
  @include shadow("sm");
96
90
  } @else if $i == 2 {
@@ -108,74 +102,74 @@ $shadow-sizes: (
108
102
 
109
103
  // Utility Classes
110
104
  @if VAR.$generate-utility-classes {
111
- .shadow-none {
105
+ #{VAR.$parent-selector} .shadow-none {
112
106
  box-shadow: none !important;
113
107
  }
114
108
 
115
109
  @each $size, $values in $shadow-sizes {
116
- .shadow-#{$size} {
110
+ #{VAR.$parent-selector} .shadow-#{$size} {
117
111
  @include shadow($size);
118
112
  }
119
113
 
120
114
  // Shadow with color variants
121
115
  @each $color-name, $color-value in VAR.$shadow-colors {
122
116
  @if $color-name != "default" {
123
- .shadow-#{$size}-#{$color-name} {
117
+ #{VAR.$parent-selector} .shadow-#{$size}-#{$color-name} {
124
118
  @include shadow($size, $color-name);
125
119
  }
126
120
  }
127
121
  }
128
122
 
129
- .shadow-inset-#{$size} {
123
+ #{VAR.$parent-selector} .shadow-inset-#{$size} {
130
124
  @include shadow-inset($size);
131
125
  }
132
126
 
133
127
  // Inset shadows with color variants
134
128
  @each $color-name, $color-value in VAR.$shadow-colors {
135
129
  @if $color-name != "default" {
136
- .shadow-inset-#{$size}-#{$color-name} {
130
+ #{VAR.$parent-selector} .shadow-inset-#{$size}-#{$color-name} {
137
131
  @include shadow-inset($size, $color-name);
138
132
  }
139
133
  }
140
134
  }
141
135
 
142
136
  // Hover shadows
143
- .hover\:shadow-#{$size}:hover {
137
+ #{VAR.$parent-selector} .hover\:shadow-#{$size}:hover {
144
138
  @include shadow($size);
145
139
  }
146
140
 
147
141
  // Hover shadows with color variants
148
142
  @each $color-name, $color-value in VAR.$shadow-colors {
149
143
  @if $color-name != "default" {
150
- .hover\:shadow-#{$size}-#{$color-name}:hover {
144
+ #{VAR.$parent-selector} .hover\:shadow-#{$size}-#{$color-name}:hover {
151
145
  @include shadow($size, $color-name);
152
146
  }
153
147
  }
154
148
  }
155
149
 
156
150
  // Focus shadows
157
- .focus\:shadow-#{$size}:focus {
151
+ #{VAR.$parent-selector} .focus\:shadow-#{$size}:focus {
158
152
  @include shadow($size);
159
153
  }
160
154
 
161
155
  // Focus shadows with color variants
162
156
  @each $color-name, $color-value in VAR.$shadow-colors {
163
157
  @if $color-name != "default" {
164
- .focus\:shadow-#{$size}-#{$color-name}:focus {
158
+ #{VAR.$parent-selector} .focus\:shadow-#{$size}-#{$color-name}:focus {
165
159
  @include shadow($size, $color-name);
166
160
  }
167
161
  }
168
162
  }
169
163
 
170
164
  // Active shadows
171
- .active\:shadow-#{$size}:active {
165
+ #{VAR.$parent-selector} .active\:shadow-#{$size}:active {
172
166
  @include shadow($size);
173
167
  }
174
168
 
175
169
  // Active shadows with color variants
176
170
  @each $color-name, $color-value in VAR.$shadow-colors {
177
171
  @if $color-name != "default" {
178
- .active\:shadow-#{$size}-#{$color-name}:active {
172
+ #{VAR.$parent-selector} .active\:shadow-#{$size}-#{$color-name}:active {
179
173
  @include shadow($size, $color-name);
180
174
  }
181
175
  }
@@ -187,42 +181,42 @@ $shadow-sizes: (
187
181
  @media (min-width: #{$width}) {
188
182
  @each $size, $values in $shadow-sizes {
189
183
  // Regular shadows with breakpoints
190
- .shadow-#{$size}\@#{$breakpoint} {
184
+ #{VAR.$parent-selector} .shadow-#{$size}\@#{$breakpoint} {
191
185
  @include shadow($size);
192
186
  }
193
187
 
194
188
  // Shadows with color variants at breakpoints
195
189
  @each $color-name, $color-value in VAR.$shadow-colors {
196
190
  @if $color-name != "default" {
197
- .shadow-#{$size}-#{$color-name}\@#{$breakpoint} {
191
+ #{VAR.$parent-selector} .shadow-#{$size}-#{$color-name}\@#{$breakpoint} {
198
192
  @include shadow($size, $color-name);
199
193
  }
200
194
  }
201
195
  }
202
196
 
203
197
  // Hover shadows with breakpoints
204
- .hover\:shadow-#{$size}\@#{$breakpoint}:hover {
198
+ #{VAR.$parent-selector} .hover\:shadow-#{$size}\@#{$breakpoint}:hover {
205
199
  @include shadow($size);
206
200
  }
207
201
 
208
202
  // Hover shadows with color variants at breakpoints
209
203
  @each $color-name, $color-value in VAR.$shadow-colors {
210
204
  @if $color-name != "default" {
211
- .hover\:shadow-#{$size}-#{$color-name}\@#{$breakpoint}:hover {
205
+ #{VAR.$parent-selector} .hover\:shadow-#{$size}-#{$color-name}\@#{$breakpoint}:hover {
212
206
  @include shadow($size, $color-name);
213
207
  }
214
208
  }
215
209
  }
216
210
 
217
211
  // Focus shadows with breakpoints
218
- .focus\:shadow-#{$size}\@#{$breakpoint}:focus {
212
+ #{VAR.$parent-selector} .focus\:shadow-#{$size}\@#{$breakpoint}:focus {
219
213
  @include shadow($size);
220
214
  }
221
215
 
222
216
  // Focus shadows with color variants at breakpoints
223
217
  @each $color-name, $color-value in VAR.$shadow-colors {
224
218
  @if $color-name != "default" {
225
- .focus\:shadow-#{$size}-#{$color-name}\@#{$breakpoint}:focus {
219
+ #{VAR.$parent-selector} .focus\:shadow-#{$size}-#{$color-name}\@#{$breakpoint}:focus {
226
220
  @include shadow($size, $color-name);
227
221
  }
228
222
  }
@@ -232,7 +226,7 @@ $shadow-sizes: (
232
226
  }
233
227
 
234
228
  @for $i from 1 through 5 {
235
- .elevation-#{$i} {
229
+ #{VAR.$parent-selector} .elevation-#{$i} {
236
230
  @include elevation($i);
237
231
  }
238
232
  }