@nuvoui/core 1.2.4 → 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 +27685 -22739
  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 +7 -8
  7. package/src/styles/abstracts/_config.scss +87 -34
  8. package/src/styles/abstracts/_functions.scss +70 -37
  9. package/src/styles/base/_base.scss +79 -59
  10. package/src/styles/base/_reset.scss +11 -8
  11. package/src/styles/index.scss +32 -17
  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 +95 -106
  17. package/src/styles/utilities/_alignment.scss +40 -13
  18. package/src/styles/utilities/_animations.scss +361 -92
  19. package/src/styles/utilities/_backdrop-filters.scss +297 -0
  20. package/src/styles/utilities/_borders.scss +360 -159
  21. package/src/styles/utilities/_colors.scss +24 -34
  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 +270 -92
  31. package/src/styles/utilities/_spacing.scss +317 -169
  32. package/src/styles/utilities/_tooltips.scss +36 -29
  33. package/src/styles/utilities/_transforms.scss +243 -154
  34. package/src/styles/utilities/_transitions.scss +129 -75
  35. package/src/styles/utilities/_typography.scss +341 -127
  36. package/src/styles/utilities/_z-index.scss +144 -0
  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 -20
@@ -1,36 +1,32 @@
1
1
  @use "sass:list";
2
-
2
+ @use "sass:math";
3
3
  @use "sass:map";
4
+
4
5
  @use "../abstracts/functions" as *;
5
- @use "../abstracts" as VAR;
6
+ @use "../abstracts/config" as VAR;
6
7
 
7
8
  $generated-keyframes: ();
8
9
 
9
- @mixin generate-bounce-keyframes($keyframeName, $x, $y) {
10
- @if not list.index($generated-keyframes, $keyframeName) {
11
- $generated-keyframes: list.append($generated-keyframes, $keyframeName) !global;
12
-
13
- @keyframes #{$keyframeName} {
14
- 0% {
15
- transform: translateX(-#{$x}) translateY(-#{$y});
16
- }
17
-
18
- 50% {
19
- transform: translateX(#{$x}) translateY(#{$y});
20
- }
10
+ @mixin ensure-keyframes($name) {
11
+ @if not list.index($generated-keyframes, $name) {
12
+ $generated-keyframes: list.append($generated-keyframes, $name) !global;
21
13
 
22
- 100% {
23
- transform: translateX(-#{$x}) translateY(-#{$y});
24
- }
14
+ @keyframes #{$name} {
15
+ @content;
25
16
  }
26
17
  }
27
18
  }
28
19
 
29
- @mixin animate-bounce($props) {
20
+ /**
21
+ * @mixin animate-bounce
22
+ * @description Creates a bouncing animation
23
+ * @param {Map} $props - Animation properties
24
+ */
25
+ @mixin animate-bounce($props: ()) {
30
26
  $defaults: (
31
- vertical: 0%,
32
- horizontal: 0%,
33
- duration: 5s,
27
+ vertical: 0.5rem,
28
+ horizontal: 0,
29
+ duration: 1s,
34
30
  timing: ease-in-out,
35
31
  iteration: infinite,
36
32
  );
@@ -44,94 +40,367 @@ $generated-keyframes: ();
44
40
  $iteration: map.get($props, "iteration");
45
41
 
46
42
  // Handle units
47
- $x-unit: if($x, safe-unit-name(get-unit($x)), "-");
48
- $y-unit: if($y, safe-unit-name(get-unit($y)), "-");
49
-
43
+ $x-unit: if($x, safe-unit-name(math.unit($x)), "-");
44
+ $y-unit: if($y, safe-unit-name(math.unit($y)), "-");
45
+
50
46
  // Clean values (remove units)
51
47
  $clean-x: if($x, strip-unit($x), 0);
52
48
  $clean-y: if($y, strip-unit($y), 0);
49
+
53
50
  $animation-name: anim-bounce-#{$clean-x}#{$x-unit}-#{$clean-y}#{$y-unit};
54
51
 
52
+ // Apply the animation
55
53
  animation: #{$animation-name} $duration $easing $iteration;
56
- @include generate-bounce-keyframes($animation-name, $x, $y);
57
- }
58
54
 
59
- @keyframes fade-in-reveal {
60
- to {
61
- scale: 1;
62
- opacity: 1;
63
- }
64
- }
55
+ // Generate keyframes with ensure-keyframes pattern
56
+ @include ensure-keyframes($animation-name) {
57
+ 0%,
58
+ 100% {
59
+ transform: translate(0, 0);
60
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
61
+ }
65
62
 
66
- @media (prefers-reduced-motion: no-preference) {
67
- .anim__fade-in-reveal {
68
- scale: 0.2;
69
- opacity: 0.7;
70
- animation: fade-in-reveal linear forwards;
71
- animation-timeline: view();
72
- animation-range-start: cover;
73
- animation-range-end: 550px;
63
+ 50% {
64
+ transform: translate($x, $y);
65
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
66
+ }
74
67
  }
75
68
  }
76
69
 
77
70
  @mixin hover-ready {
78
71
  transition-property: all;
79
72
  transition-duration: 0.2s;
80
- transition-timing-function: ease-in-out;
73
+ transition-timing-function: ease-in-out;
74
+ }
75
+
76
+ /**
77
+ * @mixin animate-pulse
78
+ * @description Creates a pulsing opacity animation
79
+ * @param {Map} $props - Animation properties
80
+ */
81
+ @mixin animate-pulse($props: ()) {
82
+ $defaults: (
83
+ min-opacity: 0.5,
84
+ max-opacity: 1,
85
+ duration: 1s,
86
+ timing: ease-in-out,
87
+ iteration: infinite,
88
+ );
89
+
90
+ // Merge with defaults
91
+ $props: map.merge($defaults, $props);
92
+ $min-opacity: map.get($props, "min-opacity");
93
+ $max-opacity: map.get($props, "max-opacity");
94
+ $duration: map.get($props, "duration");
95
+ $timing: map.get($props, "timing");
96
+ $iteration: map.get($props, "iteration");
97
+
98
+ $animation-name: anim-pulse-#{$min-opacity * 100}-#{$max-opacity * 100};
99
+
100
+ animation: #{$animation-name} $duration $timing $iteration;
101
+
102
+ @include ensure-keyframes($animation-name) {
103
+ 0%,
104
+ 100% {
105
+ opacity: $max-opacity;
106
+ }
107
+
108
+ 50% {
109
+ opacity: $min-opacity;
110
+ }
111
+ }
112
+ }
113
+
114
+ /**
115
+ * @mixin animate-spin
116
+ * @description Creates a spinning animation
117
+ * @param {Map} $props - Animation properties
118
+ */
119
+ @mixin animate-spin($props: ()) {
120
+ $defaults: (
121
+ direction: normal,
122
+ duration: 1s,
123
+ timing: linear,
124
+ iteration: infinite,
125
+ );
126
+
127
+ // Merge with defaults
128
+ $props: map.merge($defaults, $props);
129
+ $direction: map.get($props, "direction");
130
+ $duration: map.get($props, "duration");
131
+ $timing: map.get($props, "timing");
132
+ $iteration: map.get($props, "iteration");
133
+
134
+ $animation-name: anim-spin-#{$direction};
135
+
136
+ animation: #{$animation-name} $duration $timing $iteration;
137
+
138
+ @include ensure-keyframes($animation-name) {
139
+ from {
140
+ transform: rotate(0deg);
141
+ }
142
+
143
+ to {
144
+ @if $direction == "normal" {
145
+ transform: rotate(360deg);
146
+ } @else {
147
+ transform: rotate(-360deg);
148
+ }
149
+ }
150
+ }
151
+ }
152
+
153
+ /**
154
+ * @mixin animate-ping
155
+ * @description Creates a ping animation (scale + fade)
156
+ * @param {Map} $props - Animation properties
157
+ */
158
+ @mixin animate-ping($props: ()) {
159
+ $defaults: (
160
+ scale: 2,
161
+ duration: 1s,
162
+ timing: cubic-bezier(0, 0, 0.2, 1),
163
+ iteration: infinite,
164
+ );
165
+
166
+ // Merge with defaults
167
+ $props: map.merge($defaults, $props);
168
+ $scale: map.get($props, "scale");
169
+ $duration: map.get($props, "duration");
170
+ $timing: map.get($props, "timing");
171
+ $iteration: map.get($props, "iteration");
172
+
173
+ $animation-name: anim-ping-#{$scale * 10};
174
+
175
+ animation: #{$animation-name} $duration $timing $iteration;
176
+
177
+ @include ensure-keyframes($animation-name) {
178
+ 75%,
179
+ 100% {
180
+ transform: scale($scale);
181
+ opacity: 0;
182
+ }
183
+ }
184
+ }
185
+
186
+ /**
187
+ * @mixin animate-fade
188
+ * @description Creates fade in/out animation
189
+ * @param {Map} $props - Animation properties
190
+ */
191
+ @mixin animate-fade($props: ()) {
192
+ $defaults: (
193
+ type: in,
194
+ duration: 0.5s,
195
+ timing: ease-in-out,
196
+ iteration: 1 forwards,
197
+ );
198
+
199
+ // Merge with defaults
200
+ $props: map.merge($defaults, $props);
201
+ $type: map.get($props, "type");
202
+ $duration: map.get($props, "duration");
203
+ $timing: map.get($props, "timing");
204
+ $iteration: map.get($props, "iteration");
205
+
206
+ $animation-name: anim-fade-#{$type};
207
+
208
+ animation: #{$animation-name} $duration $timing $iteration;
209
+
210
+ @include ensure-keyframes($animation-name) {
211
+ @if $type == "in" {
212
+ from {
213
+ opacity: 0;
214
+ }
215
+
216
+ to {
217
+ opacity: 1;
218
+ }
219
+ } @else if $type == "out" {
220
+ from {
221
+ opacity: 1;
222
+ }
223
+
224
+ to {
225
+ opacity: 0;
226
+ }
227
+ } @else if $type == "in-up" {
228
+ from {
229
+ opacity: 0;
230
+ transform: translateY(20px);
231
+ }
232
+
233
+ to {
234
+ opacity: 1;
235
+ transform: translateY(0);
236
+ }
237
+ } @else if $type == "in-down" {
238
+ from {
239
+ opacity: 0;
240
+ transform: translateY(-20px);
241
+ }
242
+
243
+ to {
244
+ opacity: 1;
245
+ transform: translateY(0);
246
+ }
247
+ }
248
+ }
249
+ }
250
+
251
+ /**
252
+ * @mixin animate-shake
253
+ * @description Creates a shake animation
254
+ * @param {Map} $props - Animation properties
255
+ */
256
+ @mixin animate-shake($props: ()) {
257
+ $defaults: (
258
+ intensity: 5px,
259
+ duration: 0.5s,
260
+ timing: ease-in-out,
261
+ iteration: 1,
262
+ );
263
+
264
+ // Merge with defaults
265
+ $props: map.merge($defaults, $props);
266
+ $intensity: map.get($props, "intensity");
267
+ $duration: map.get($props, "duration");
268
+ $timing: map.get($props, "timing");
269
+ $iteration: map.get($props, "iteration");
270
+
271
+ $intensity-val: strip-unit($intensity);
272
+ $animation-name: anim-shake-#{$intensity-val};
273
+
274
+ animation: #{$animation-name} $duration $timing $iteration;
275
+
276
+ @include ensure-keyframes($animation-name) {
277
+ 0%,
278
+ 100% {
279
+ transform: translateX(0);
280
+ }
281
+
282
+ 10%,
283
+ 30%,
284
+ 50%,
285
+ 70%,
286
+ 90% {
287
+ transform: translateX(-$intensity);
288
+ }
289
+
290
+ 20%,
291
+ 40%,
292
+ 60%,
293
+ 80% {
294
+ transform: translateX($intensity);
295
+ }
296
+ }
81
297
  }
82
298
 
83
299
  @if VAR.$generate-utility-classes {
84
- .anim__bounce {
85
- @include animate-bounce((
86
- vertical: 50%,
87
- horizontal: 50%,
88
- duration: 1s,
89
- timing: ease-in-out,
90
- iteration: infinite,
91
- ));
92
- }
93
-
94
- .anim__bounce-sm {
95
- @include animate-bounce((
96
- vertical: 25%,
97
- horizontal: 25%,
98
- duration: 1s,
99
- timing: ease-in-out,
100
- iteration: infinite,
101
- ));
102
- }
103
-
104
- .anim__bounce-md {
105
- @include animate-bounce((
106
- vertical: 50%,
107
- horizontal: 50%,
108
- duration: 1s,
109
- timing: ease-in-out,
110
- iteration: infinite,
111
- ));
112
- }
113
-
114
- .anim__bounce-lg {
115
- @include animate-bounce((
116
- vertical: 75%,
117
- horizontal: 75%,
118
- duration: 1s,
119
- timing: ease-in-out,
120
- iteration: infinite,
121
- ));
122
- }
123
-
124
- .anim__bounce-xl {
125
- @include animate-bounce((
126
- vertical: 100%,
127
- horizontal: 100%,
128
- duration: 1s,
129
- timing: ease-in-out,
130
- iteration: infinite,
131
- ));
132
- }
133
-
134
- .hover-ready{
300
+ // Add to your existing animation utilities
301
+
302
+ #{VAR.$parent-selector} .animate-pulse {
303
+ @include animate-pulse;
304
+ }
305
+
306
+ #{VAR.$parent-selector} .animate-spin {
307
+ @include animate-spin;
308
+ }
309
+
310
+ #{VAR.$parent-selector} .animate-ping {
311
+ @include animate-ping;
312
+ }
313
+
314
+ #{VAR.$parent-selector} .animate-fade-in {
315
+ @include animate-fade(
316
+ (
317
+ type: in,
318
+ )
319
+ );
320
+ }
321
+
322
+ #{VAR.$parent-selector} .animate-fade-out {
323
+ @include animate-fade(
324
+ (
325
+ type: out,
326
+ )
327
+ );
328
+ }
329
+
330
+ #{VAR.$parent-selector} .animate-fade-in-up {
331
+ @include animate-fade(
332
+ (
333
+ type: in-up,
334
+ )
335
+ );
336
+ }
337
+
338
+ #{VAR.$parent-selector} .animate-fade-in-down {
339
+ @include animate-fade(
340
+ (
341
+ type: in-down,
342
+ )
343
+ );
344
+ }
345
+
346
+ #{VAR.$parent-selector} .animate-shake {
347
+ @include animate-shake;
348
+ }
349
+
350
+ // Add responsive variants if needed
351
+ @each $breakpoint, $width in VAR.$breakpoints {
352
+ @media (min-width: #{$width}) {
353
+ #{VAR.$parent-selector} .animate-pulse\@#{$breakpoint} {
354
+ @include animate-pulse;
355
+ }
356
+
357
+ #{VAR.$parent-selector} .animate-spin\@#{$breakpoint} {
358
+ @include animate-spin;
359
+ }
360
+
361
+ #{VAR.$parent-selector} .animate-ping\@#{$breakpoint} {
362
+ @include animate-ping;
363
+ }
364
+
365
+ #{VAR.$parent-selector} .animate-fade-in\@#{$breakpoint} {
366
+ @include animate-fade(
367
+ (
368
+ type: in,
369
+ )
370
+ );
371
+ }
372
+
373
+ #{VAR.$parent-selector} .animate-fade-out\@#{$breakpoint} {
374
+ @include animate-fade(
375
+ (
376
+ type: out,
377
+ )
378
+ );
379
+ }
380
+
381
+ #{VAR.$parent-selector} .animate-fade-in-up\@#{$breakpoint} {
382
+ @include animate-fade(
383
+ (
384
+ type: in-up,
385
+ )
386
+ );
387
+ }
388
+
389
+ #{VAR.$parent-selector} .animate-fade-in-down\@#{$breakpoint} {
390
+ @include animate-fade(
391
+ (
392
+ type: in-down,
393
+ )
394
+ );
395
+ }
396
+
397
+ #{VAR.$parent-selector} .animate-shake\@#{$breakpoint} {
398
+ @include animate-shake;
399
+ }
400
+ }
401
+ }
402
+
403
+ #{VAR.$parent-selector} .hover-ready {
135
404
  @include hover-ready;
136
405
  }
137
406
  }