@nuvoui/core 1.2.3 → 1.2.5
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.
- package/dist/nuvoui.css +32961 -27613
- package/dist/nuvoui.css.map +1 -1
- package/dist/nuvoui.min.css +1 -1
- package/dist/nuvoui.min.css.map +1 -1
- package/package.json +6 -7
- package/src/styles/abstracts/_config.scss +54 -54
- package/src/styles/abstracts/_functions.scss +73 -0
- package/src/styles/abstracts/_index.scss +0 -1
- package/src/styles/base/_base.scss +25 -17
- package/src/styles/base/_index.scss +1 -1
- package/src/styles/base/_reset.scss +66 -31
- package/src/styles/index.scss +2 -5
- package/src/styles/mixins-map.scss +1 -1
- package/src/styles/themes/_theme.scss +87 -132
- package/src/styles/utilities/_alignment.scss +4 -4
- package/src/styles/utilities/_animations.scss +294 -85
- package/src/styles/utilities/_backdrop-filters.scss +269 -0
- package/src/styles/utilities/_borders.scss +46 -31
- package/src/styles/utilities/_colors.scss +0 -9
- package/src/styles/utilities/_helpers.scss +1 -1
- package/src/styles/utilities/_index.scss +3 -0
- package/src/styles/utilities/_media-queries.scss +24 -15
- package/src/styles/utilities/_sizing.scss +59 -22
- package/src/styles/utilities/_spacing.scss +108 -62
- package/src/styles/utilities/_tooltips.scss +3 -0
- package/src/styles/utilities/_transforms.scss +192 -126
- package/src/styles/utilities/_transitions.scss +4 -16
- package/src/styles/utilities/_z-index.scss +114 -0
|
@@ -6,31 +6,26 @@
|
|
|
6
6
|
|
|
7
7
|
$generated-keyframes: ();
|
|
8
8
|
|
|
9
|
-
@mixin
|
|
10
|
-
@if not list.index($generated-keyframes, $
|
|
11
|
-
$generated-keyframes: list.append($generated-keyframes, $
|
|
12
|
-
|
|
13
|
-
@keyframes #{$
|
|
14
|
-
|
|
15
|
-
transform: translateX(-#{$x}) translateY(-#{$y});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
50% {
|
|
19
|
-
transform: translateX(#{$x}) translateY(#{$y});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
100% {
|
|
23
|
-
transform: translateX(-#{$x}) translateY(-#{$y});
|
|
24
|
-
}
|
|
9
|
+
@mixin ensure-keyframes($name) {
|
|
10
|
+
@if not list.index($generated-keyframes, $name) {
|
|
11
|
+
$generated-keyframes: list.append($generated-keyframes, $name) !global;
|
|
12
|
+
|
|
13
|
+
@keyframes #{$name} {
|
|
14
|
+
@content;
|
|
25
15
|
}
|
|
26
16
|
}
|
|
27
17
|
}
|
|
28
18
|
|
|
29
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @mixin animate-bounce
|
|
21
|
+
* @description Creates a bouncing animation
|
|
22
|
+
* @param {Map} $props - Animation properties
|
|
23
|
+
*/
|
|
24
|
+
@mixin animate-bounce($props: ()) {
|
|
30
25
|
$defaults: (
|
|
31
|
-
vertical: 0
|
|
32
|
-
horizontal: 0
|
|
33
|
-
duration:
|
|
26
|
+
vertical: 0.5rem,
|
|
27
|
+
horizontal: 0,
|
|
28
|
+
duration: 1s,
|
|
34
29
|
timing: ease-in-out,
|
|
35
30
|
iteration: infinite,
|
|
36
31
|
);
|
|
@@ -50,28 +45,26 @@ $generated-keyframes: ();
|
|
|
50
45
|
// Clean values (remove units)
|
|
51
46
|
$clean-x: if($x, strip-unit($x), 0);
|
|
52
47
|
$clean-y: if($y, strip-unit($y), 0);
|
|
48
|
+
|
|
53
49
|
$animation-name: anim-bounce-#{$clean-x}#{$x-unit}-#{$clean-y}#{$y-unit};
|
|
54
50
|
|
|
55
|
-
animation: #{$animation-name} $duration $easing $iteration;
|
|
56
|
-
@include generate-bounce-keyframes($animation-name, $x, $y);
|
|
57
|
-
}
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
scale: 1;
|
|
62
|
-
opacity: 1;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
52
|
+
// Apply the animation
|
|
53
|
+
animation: #{$animation-name} $duration $easing $iteration;
|
|
65
54
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
55
|
+
// Generate keyframes with ensure-keyframes pattern
|
|
56
|
+
@include ensure-keyframes($animation-name) {
|
|
57
|
+
0%, 100% {
|
|
58
|
+
transform: translate(0, 0);
|
|
59
|
+
animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
50% {
|
|
63
|
+
transform: translate($x, $y);
|
|
64
|
+
animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
65
|
+
}
|
|
74
66
|
}
|
|
67
|
+
|
|
75
68
|
}
|
|
76
69
|
|
|
77
70
|
@mixin hover-ready {
|
|
@@ -80,55 +73,271 @@ $generated-keyframes: ();
|
|
|
80
73
|
transition-timing-function: ease-in-out;
|
|
81
74
|
}
|
|
82
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%, 100% { opacity: $max-opacity; }
|
|
104
|
+
50% { opacity: $min-opacity; }
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @mixin animate-spin
|
|
112
|
+
* @description Creates a spinning animation
|
|
113
|
+
* @param {Map} $props - Animation properties
|
|
114
|
+
*/
|
|
115
|
+
@mixin animate-spin($props: ()) {
|
|
116
|
+
$defaults: (
|
|
117
|
+
direction: normal,
|
|
118
|
+
duration: 1s,
|
|
119
|
+
timing: linear,
|
|
120
|
+
iteration: infinite,
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
// Merge with defaults
|
|
124
|
+
$props: map.merge($defaults, $props);
|
|
125
|
+
$direction: map.get($props, "direction");
|
|
126
|
+
$duration: map.get($props, "duration");
|
|
127
|
+
$timing: map.get($props, "timing");
|
|
128
|
+
$iteration: map.get($props, "iteration");
|
|
129
|
+
|
|
130
|
+
$animation-name: anim-spin-#{$direction};
|
|
131
|
+
|
|
132
|
+
animation: #{$animation-name} $duration $timing $iteration;
|
|
133
|
+
|
|
134
|
+
@include ensure-keyframes($animation-name) {
|
|
135
|
+
from { transform: rotate(0deg); }
|
|
136
|
+
|
|
137
|
+
to {
|
|
138
|
+
@if $direction == 'normal' {
|
|
139
|
+
transform: rotate(360deg);
|
|
140
|
+
} @else {
|
|
141
|
+
transform: rotate(-360deg);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @mixin animate-ping
|
|
150
|
+
* @description Creates a ping animation (scale + fade)
|
|
151
|
+
* @param {Map} $props - Animation properties
|
|
152
|
+
*/
|
|
153
|
+
@mixin animate-ping($props: ()) {
|
|
154
|
+
$defaults: (
|
|
155
|
+
scale: 2,
|
|
156
|
+
duration: 1s,
|
|
157
|
+
timing: cubic-bezier(0, 0, 0.2, 1),
|
|
158
|
+
iteration: infinite,
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
// Merge with defaults
|
|
162
|
+
$props: map.merge($defaults, $props);
|
|
163
|
+
$scale: map.get($props, "scale");
|
|
164
|
+
$duration: map.get($props, "duration");
|
|
165
|
+
$timing: map.get($props, "timing");
|
|
166
|
+
$iteration: map.get($props, "iteration");
|
|
167
|
+
|
|
168
|
+
$animation-name: anim-ping-#{$scale * 10};
|
|
169
|
+
|
|
170
|
+
animation: #{$animation-name} $duration $timing $iteration;
|
|
171
|
+
|
|
172
|
+
@include ensure-keyframes($animation-name) {
|
|
173
|
+
75%, 100% {
|
|
174
|
+
transform: scale($scale);
|
|
175
|
+
opacity: 0;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @mixin animate-fade
|
|
183
|
+
* @description Creates fade in/out animation
|
|
184
|
+
* @param {Map} $props - Animation properties
|
|
185
|
+
*/
|
|
186
|
+
@mixin animate-fade($props: ()) {
|
|
187
|
+
$defaults: (
|
|
188
|
+
type: in,
|
|
189
|
+
duration: 0.5s,
|
|
190
|
+
timing: ease-in-out,
|
|
191
|
+
iteration: 1 forwards,
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
// Merge with defaults
|
|
195
|
+
$props: map.merge($defaults, $props);
|
|
196
|
+
$type: map.get($props, "type");
|
|
197
|
+
$duration: map.get($props, "duration");
|
|
198
|
+
$timing: map.get($props, "timing");
|
|
199
|
+
$iteration: map.get($props, "iteration");
|
|
200
|
+
|
|
201
|
+
$animation-name: anim-fade-#{$type};
|
|
202
|
+
|
|
203
|
+
animation: #{$animation-name} $duration $timing $iteration;
|
|
204
|
+
|
|
205
|
+
@include ensure-keyframes($animation-name) {
|
|
206
|
+
@if $type == 'in' {
|
|
207
|
+
from { opacity: 0; }
|
|
208
|
+
to { opacity: 1; }
|
|
209
|
+
} @else if $type == 'out' {
|
|
210
|
+
from { opacity: 1; }
|
|
211
|
+
to { opacity: 0; }
|
|
212
|
+
} @else if $type == 'in-up' {
|
|
213
|
+
from {
|
|
214
|
+
opacity: 0;
|
|
215
|
+
transform: translateY(20px);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
to {
|
|
219
|
+
opacity: 1;
|
|
220
|
+
transform: translateY(0);
|
|
221
|
+
}
|
|
222
|
+
} @else if $type == 'in-down' {
|
|
223
|
+
from {
|
|
224
|
+
opacity: 0;
|
|
225
|
+
transform: translateY(-20px);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
to {
|
|
229
|
+
opacity: 1;
|
|
230
|
+
transform: translateY(0);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @mixin animate-shake
|
|
239
|
+
* @description Creates a shake animation
|
|
240
|
+
* @param {Map} $props - Animation properties
|
|
241
|
+
*/
|
|
242
|
+
@mixin animate-shake($props: ()) {
|
|
243
|
+
$defaults: (
|
|
244
|
+
intensity: 5px,
|
|
245
|
+
duration: 0.5s,
|
|
246
|
+
timing: ease-in-out,
|
|
247
|
+
iteration: 1,
|
|
248
|
+
);
|
|
249
|
+
|
|
250
|
+
// Merge with defaults
|
|
251
|
+
$props: map.merge($defaults, $props);
|
|
252
|
+
$intensity: map.get($props, "intensity");
|
|
253
|
+
$duration: map.get($props, "duration");
|
|
254
|
+
$timing: map.get($props, "timing");
|
|
255
|
+
$iteration: map.get($props, "iteration");
|
|
256
|
+
|
|
257
|
+
$intensity-val: strip-unit($intensity);
|
|
258
|
+
$animation-name: anim-shake-#{$intensity-val};
|
|
259
|
+
|
|
260
|
+
animation: #{$animation-name} $duration $timing $iteration;
|
|
261
|
+
|
|
262
|
+
@include ensure-keyframes($animation-name) {
|
|
263
|
+
0%, 100% { transform: translateX(0); }
|
|
264
|
+
10%, 30%, 50%, 70%, 90% { transform: translateX(-$intensity); }
|
|
265
|
+
20%, 40%, 60%, 80% { transform: translateX($intensity); }
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
}
|
|
269
|
+
|
|
83
270
|
@if VAR.$generate-utility-classes {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.
|
|
95
|
-
@include animate-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.
|
|
115
|
-
@include animate-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
271
|
+
// Add to your existing animation utilities
|
|
272
|
+
|
|
273
|
+
.animate-pulse {
|
|
274
|
+
@include animate-pulse;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.animate-spin {
|
|
278
|
+
@include animate-spin;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.animate-ping {
|
|
282
|
+
@include animate-ping;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.animate-fade-in {
|
|
286
|
+
@include animate-fade((type: in));
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.animate-fade-out {
|
|
290
|
+
@include animate-fade((type: out));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.animate-fade-in-up {
|
|
294
|
+
@include animate-fade((type: in-up));
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.animate-fade-in-down {
|
|
298
|
+
@include animate-fade((type: in-down));
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.animate-shake {
|
|
302
|
+
@include animate-shake;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// Add responsive variants if needed
|
|
306
|
+
@each $breakpoint, $width in VAR.$breakpoints {
|
|
307
|
+
@media (min-width: #{$width}) {
|
|
308
|
+
|
|
309
|
+
.animate-pulse\@#{$breakpoint} {
|
|
310
|
+
@include animate-pulse;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.animate-spin\@#{$breakpoint} {
|
|
314
|
+
@include animate-spin;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.animate-ping\@#{$breakpoint} {
|
|
318
|
+
@include animate-ping;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.animate-fade-in\@#{$breakpoint} {
|
|
322
|
+
@include animate-fade((type: in));
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.animate-fade-out\@#{$breakpoint} {
|
|
326
|
+
@include animate-fade((type: out));
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.animate-fade-in-up\@#{$breakpoint} {
|
|
330
|
+
@include animate-fade((type: in-up));
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.animate-fade-in-down\@#{$breakpoint} {
|
|
334
|
+
@include animate-fade((type: in-down));
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.animate-shake\@#{$breakpoint} {
|
|
338
|
+
@include animate-shake;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
132
341
|
}
|
|
133
342
|
|
|
134
343
|
.hover-ready{
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:meta";
|
|
3
|
+
@use "../abstracts" as *;
|
|
4
|
+
@use "../abstracts/functions" as FN;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Backdrop Filter Utilities
|
|
8
|
+
*
|
|
9
|
+
* Provides utility classes and mixins for backdrop-filter effects.
|
|
10
|
+
* All utilities come with responsive variants.
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* <div class="backdrop-blur-md">Blurred backdrop</div>
|
|
14
|
+
* <div class="backdrop-blur-lg@md">Blurred backdrop on medium screens and up</div>
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// Blur values
|
|
18
|
+
$backdrop-blur-values: (
|
|
19
|
+
'none': 0,
|
|
20
|
+
'sm': 4px,
|
|
21
|
+
'md': 8px,
|
|
22
|
+
'lg': 12px,
|
|
23
|
+
'xl': 24px,
|
|
24
|
+
'2xl': 40px,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
// Brightness values
|
|
28
|
+
$backdrop-brightness-values: (
|
|
29
|
+
'none': 100%,
|
|
30
|
+
'75': 75%,
|
|
31
|
+
'90': 90%,
|
|
32
|
+
'110': 110%,
|
|
33
|
+
'125': 125%,
|
|
34
|
+
'150': 150%,
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
// Contrast values
|
|
38
|
+
$backdrop-contrast-values: (
|
|
39
|
+
'none': 100%,
|
|
40
|
+
'75': 75%,
|
|
41
|
+
'90': 90%,
|
|
42
|
+
'110': 110%,
|
|
43
|
+
'125': 125%,
|
|
44
|
+
'150': 150%,
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// Grayscale values
|
|
48
|
+
$backdrop-grayscale-values: (
|
|
49
|
+
'none': 0,
|
|
50
|
+
'25': 25%,
|
|
51
|
+
'50': 50%,
|
|
52
|
+
'75': 75%,
|
|
53
|
+
'100': 100%,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
// Saturate values
|
|
57
|
+
$backdrop-saturate-values: (
|
|
58
|
+
'none': 100%,
|
|
59
|
+
'50': 50%,
|
|
60
|
+
'75': 75%,
|
|
61
|
+
'125': 125%,
|
|
62
|
+
'150': 150%,
|
|
63
|
+
'200': 200%,
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
// Sepia values
|
|
67
|
+
$backdrop-sepia-values: (
|
|
68
|
+
'none': 0,
|
|
69
|
+
'25': 25%,
|
|
70
|
+
'50': 50%,
|
|
71
|
+
'75': 75%,
|
|
72
|
+
'100': 100%,
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
// Hue-rotate values
|
|
76
|
+
$backdrop-hue-rotate-values: (
|
|
77
|
+
'0': 0deg,
|
|
78
|
+
'90': 90deg,
|
|
79
|
+
'180': 180deg,
|
|
80
|
+
'270': 270deg,
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
// Invert values
|
|
84
|
+
$backdrop-invert-values: (
|
|
85
|
+
'none': 0,
|
|
86
|
+
'25': 25%,
|
|
87
|
+
'50': 50%,
|
|
88
|
+
'75': 75%,
|
|
89
|
+
'100': 100%,
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
// Common backdrop-filter presets
|
|
93
|
+
$backdrop-filter-presets: (
|
|
94
|
+
'frosted': blur(8px) saturate(90%) brightness(120%),
|
|
95
|
+
'glass': blur(8px) saturate(120%) contrast(90%),
|
|
96
|
+
'dark-glass': blur(8px) saturate(180%) brightness(70%) contrast(90%),
|
|
97
|
+
'crystal': blur(8px) saturate(150%),
|
|
98
|
+
'matte': blur(20px) saturate(90%) brightness(90%),
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
// Base backdrop-filter
|
|
102
|
+
@mixin backdrop-filter($value) {
|
|
103
|
+
backdrop-filter: $value;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Specific filter mixins
|
|
107
|
+
@mixin backdrop-blur($value) {
|
|
108
|
+
@if map.has-key($backdrop-blur-values, $value) {
|
|
109
|
+
@include backdrop-filter(blur(map.get($backdrop-blur-values, $value)));
|
|
110
|
+
} @else {
|
|
111
|
+
@include backdrop-filter(blur($value));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@mixin backdrop-brightness($value) {
|
|
116
|
+
@if map.has-key($backdrop-brightness-values, $value) {
|
|
117
|
+
@include backdrop-filter(brightness(map.get($backdrop-brightness-values, $value)));
|
|
118
|
+
} @else {
|
|
119
|
+
@include backdrop-filter(brightness($value));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@mixin backdrop-contrast($value) {
|
|
124
|
+
@if map.has-key($backdrop-contrast-values, $value) {
|
|
125
|
+
@include backdrop-filter(contrast(map.get($backdrop-contrast-values, $value)));
|
|
126
|
+
} @else {
|
|
127
|
+
@include backdrop-filter(contrast($value));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@mixin backdrop-grayscale($value) {
|
|
132
|
+
@if map.has-key($backdrop-grayscale-values, $value) {
|
|
133
|
+
@include backdrop-filter(grayscale(map.get($backdrop-grayscale-values, $value)));
|
|
134
|
+
} @else {
|
|
135
|
+
@include backdrop-filter(grayscale($value));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@mixin backdrop-hue-rotate($value) {
|
|
140
|
+
@if map.has-key($backdrop-hue-rotate-values, $value) {
|
|
141
|
+
@include backdrop-filter(hue-rotate(map.get($backdrop-hue-rotate-values, $value)));
|
|
142
|
+
} @else {
|
|
143
|
+
@include backdrop-filter(hue-rotate($value));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@mixin backdrop-invert($value) {
|
|
148
|
+
@if map.has-key($backdrop-invert-values, $value) {
|
|
149
|
+
@include backdrop-filter(invert(map.get($backdrop-invert-values, $value)));
|
|
150
|
+
} @else {
|
|
151
|
+
@include backdrop-filter(invert($value));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@mixin backdrop-saturate($value) {
|
|
156
|
+
@if map.has-key($backdrop-saturate-values, $value) {
|
|
157
|
+
@include backdrop-filter(saturate(map.get($backdrop-saturate-values, $value)));
|
|
158
|
+
} @else {
|
|
159
|
+
@include backdrop-filter(saturate($value));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@mixin backdrop-sepia($value) {
|
|
164
|
+
@if map.has-key($backdrop-sepia-values, $value) {
|
|
165
|
+
@include backdrop-filter(sepia(map.get($backdrop-sepia-values, $value)));
|
|
166
|
+
} @else {
|
|
167
|
+
@include backdrop-filter(sepia($value));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Preset backdrop effects
|
|
172
|
+
@mixin backdrop-frosted {
|
|
173
|
+
@include backdrop-filter(map.get($backdrop-filter-presets, 'frosted'));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@mixin backdrop-glass {
|
|
177
|
+
@include backdrop-filter(map.get($backdrop-filter-presets, 'glass'));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@mixin backdrop-dark-glass {
|
|
181
|
+
@include backdrop-filter(map.get($backdrop-filter-presets, 'dark-glass'));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@mixin backdrop-crystal {
|
|
185
|
+
@include backdrop-filter(map.get($backdrop-filter-presets, 'crystal'));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@mixin backdrop-matte {
|
|
189
|
+
@include backdrop-filter(map.get($backdrop-filter-presets, 'matte'));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Reset filter
|
|
193
|
+
@mixin backdrop-none {
|
|
194
|
+
backdrop-filter: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Generate utility classes
|
|
198
|
+
@mixin generate-backdrop-filter-utilities($breakpoint: null) {
|
|
199
|
+
$suffix: if($breakpoint, "\\@#{$breakpoint}", "");
|
|
200
|
+
|
|
201
|
+
// Basic backdrop utilities
|
|
202
|
+
.backdrop-none#{$suffix} { @include backdrop-none; }
|
|
203
|
+
|
|
204
|
+
// Blur utilities
|
|
205
|
+
@each $key, $value in $backdrop-blur-values {
|
|
206
|
+
.backdrop-blur-#{$key}#{$suffix} { @include backdrop-blur($key); }
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Brightness utilities
|
|
210
|
+
@each $key, $value in $backdrop-brightness-values {
|
|
211
|
+
.backdrop-brightness-#{$key}#{$suffix} { @include backdrop-brightness($key); }
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Contrast utilities
|
|
215
|
+
@each $key, $value in $backdrop-contrast-values {
|
|
216
|
+
.backdrop-contrast-#{$key}#{$suffix} { @include backdrop-contrast($key); }
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Grayscale utilities
|
|
220
|
+
@each $key, $value in $backdrop-grayscale-values {
|
|
221
|
+
.backdrop-grayscale-#{$key}#{$suffix} { @include backdrop-grayscale($key); }
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// Saturate utilities
|
|
225
|
+
@each $key, $value in $backdrop-saturate-values {
|
|
226
|
+
.backdrop-saturate-#{$key}#{$suffix} { @include backdrop-saturate($key); }
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Sepia utilities
|
|
230
|
+
@each $key, $value in $backdrop-sepia-values {
|
|
231
|
+
.backdrop-sepia-#{$key}#{$suffix} { @include backdrop-sepia($key); }
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Hue-rotate utilities
|
|
235
|
+
@each $key, $value in $backdrop-hue-rotate-values {
|
|
236
|
+
.backdrop-hue-#{$key}#{$suffix} { @include backdrop-hue-rotate($key); }
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Invert utilities
|
|
240
|
+
@each $key, $value in $backdrop-invert-values {
|
|
241
|
+
.backdrop-invert-#{$key}#{$suffix} { @include backdrop-invert($key); }
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Preset utilities
|
|
245
|
+
.backdrop-frosted#{$suffix} { @include backdrop-frosted; }
|
|
246
|
+
.backdrop-glass#{$suffix} { @include backdrop-glass; }
|
|
247
|
+
.backdrop-dark-glass#{$suffix} { @include backdrop-dark-glass; }
|
|
248
|
+
.backdrop-crystal#{$suffix} { @include backdrop-crystal; }
|
|
249
|
+
.backdrop-matte#{$suffix} { @include backdrop-matte; }
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@if $generate-utility-classes {
|
|
253
|
+
// Generate base utilities
|
|
254
|
+
@include generate-backdrop-filter-utilities;
|
|
255
|
+
|
|
256
|
+
// Generate responsive variants
|
|
257
|
+
@each $breakpoint, $width in $breakpoints {
|
|
258
|
+
@media (min-width: #{$width}) {
|
|
259
|
+
@include generate-backdrop-filter-utilities($breakpoint);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Update your mixins-map.scss to include these mixins:
|
|
265
|
+
// @else if str.index($ms, 'backdrop-blur(') == 1 {
|
|
266
|
+
// $param1: list.nth($params, 1);
|
|
267
|
+
// @include backdrop-blur($param1);
|
|
268
|
+
// }
|
|
269
|
+
// Add similar entries for all other backdrop filter mixins
|