@nuvoui/core 1.2.6 → 1.2.7
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 +821 -526
- 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 +2 -2
- package/src/styles/abstracts/_config.scss +50 -16
- package/src/styles/layouts/_grid.scss +6 -6
- package/src/styles/mixins-map.json +482 -0
- package/src/styles/mixins-map.scss +1 -1085
- package/src/styles/themes/_theme.scss +53 -69
- package/src/styles/utilities/_backdrop-filters.scss +51 -30
- package/src/styles/utilities/_borders.scss +1 -1
- package/src/styles/utilities/_shadows.scss +2 -2
- package/src/styles/utilities/_z-index.scss +5 -5
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// _theme.scss - CSS variables and utility classes
|
|
2
2
|
@use "sass:color";
|
|
3
3
|
@use "sass:map";
|
|
4
|
+
@use "sass:string";
|
|
5
|
+
@use "sass:list";
|
|
4
6
|
@use "../utilities/colors" as COL;
|
|
5
7
|
@use "../abstracts/config" as VAR;
|
|
6
8
|
|
|
@@ -25,36 +27,20 @@
|
|
|
25
27
|
|
|
26
28
|
@each $token in VAR.$theme-tokens {
|
|
27
29
|
--#{$token}: #{map.get(VAR.$light-theme, $token)};
|
|
30
|
+
--inverted-#{$token}: #{map.get(VAR.$dark-theme, $token)};
|
|
31
|
+
}
|
|
32
|
+
@each $color-name, $color-val in VAR.$basic-colors {
|
|
33
|
+
--#{$color-name}: #{$color-val};
|
|
28
34
|
}
|
|
29
35
|
|
|
30
|
-
--button-text-color: #{map.get(VAR.$dark-theme, "text-default")};
|
|
31
|
-
--inverted-text-color: #{map.get(VAR.$dark-theme, "text-default")};
|
|
36
|
+
// --button-text-color: #{map.get(VAR.$dark-theme, "text-default")};
|
|
37
|
+
// --inverted-text-color: #{map.get(VAR.$dark-theme, "text-default")};
|
|
32
38
|
|
|
33
39
|
// Light theme variables
|
|
34
40
|
--button-bg-color: var(--primary);
|
|
35
41
|
--button-bg-color-hover: var(--primary-600);
|
|
36
42
|
--link-color: var(--primary);
|
|
37
43
|
--link-hover-color: var(--primary-600);
|
|
38
|
-
|
|
39
|
-
// #{VAR.$parent-selector} {
|
|
40
|
-
// // Scrollbar styling
|
|
41
|
-
// &::-webkit-scrollbar {
|
|
42
|
-
// width: 12px;
|
|
43
|
-
// }
|
|
44
|
-
|
|
45
|
-
// &::-webkit-scrollbar-track {
|
|
46
|
-
// background: var(--background);
|
|
47
|
-
// }
|
|
48
|
-
|
|
49
|
-
// &::-webkit-scrollbar-thumb {
|
|
50
|
-
// background-color: #888;
|
|
51
|
-
// border-radius: 6px;
|
|
52
|
-
// border: 3px solid var(--background);
|
|
53
|
-
// }
|
|
54
|
-
|
|
55
|
-
// scrollbar-width: thin;
|
|
56
|
-
// scrollbar-color: #888 var(--background);
|
|
57
|
-
// }
|
|
58
44
|
}
|
|
59
45
|
|
|
60
46
|
@if VAR.$enable-dark-mode {
|
|
@@ -62,10 +48,10 @@
|
|
|
62
48
|
[data-theme="dark"] {
|
|
63
49
|
@each $token in VAR.$theme-tokens {
|
|
64
50
|
--#{$token}: #{map.get(VAR.$dark-theme, $token)};
|
|
51
|
+
--inverted-#{$token}: #{map.get(VAR.$light-theme, $token)};
|
|
65
52
|
}
|
|
66
53
|
|
|
67
54
|
--button-text-color: #{map.get(VAR.$light-theme, "text-default")};
|
|
68
|
-
--inverted-text-color: #{map.get(VAR.$light-theme, "text-default")};
|
|
69
55
|
--button-bg-color: var(--primary);
|
|
70
56
|
--button-bg-color-hover: var(--primary-400);
|
|
71
57
|
--link-color: var(--primary);
|
|
@@ -184,57 +170,55 @@
|
|
|
184
170
|
}
|
|
185
171
|
}
|
|
186
172
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
#{VAR.$parent-selector} .bg-active {
|
|
197
|
-
background-color: var(--button-bg-color);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
#{VAR.$parent-selector} .bg-hover {
|
|
201
|
-
background-color: var(--button-bg-color-hover);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
#{VAR.$parent-selector} .bg-white,
|
|
205
|
-
.hover\:bg-white:hover {
|
|
206
|
-
background-color: white;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
#{VAR.$parent-selector} .bg-black,
|
|
210
|
-
.hover\:bg-black:hover {
|
|
211
|
-
background-color: black;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
#{VAR.$parent-selector} .text-default {
|
|
215
|
-
color: var(--text-default);
|
|
216
|
-
}
|
|
173
|
+
@each $color-name, $color-val in VAR.$basic-colors {
|
|
174
|
+
// Base color classes
|
|
175
|
+
#{VAR.$parent-selector} .text-#{$color-name},
|
|
176
|
+
#{VAR.$parent-selector} .hover\:text-#{$color-name}:hover,
|
|
177
|
+
#{VAR.$parent-selector} .group:hover .group-hover\:text-#{$color-name} {
|
|
178
|
+
color: var(--#{$color-name});
|
|
179
|
+
}
|
|
217
180
|
|
|
218
|
-
|
|
219
|
-
color:
|
|
220
|
-
|
|
181
|
+
#{VAR.$parent-selector} .bg-#{$color-name},
|
|
182
|
+
#{VAR.$parent-selector} .hover\:bg-#{$color-name}:hover,
|
|
183
|
+
#{VAR.$parent-selector} .group:hover .group-hover\:bg-#{$color-name} {
|
|
184
|
+
background-color: var(--#{$color-name});
|
|
185
|
+
}
|
|
221
186
|
|
|
222
|
-
|
|
223
|
-
color:
|
|
187
|
+
#{VAR.$parent-selector} .border-#{$color-name},
|
|
188
|
+
#{VAR.$parent-selector} .hover\:border-#{$color-name}:hover,
|
|
189
|
+
#{VAR.$parent-selector} .group:hover .group-hover\:border-#{$color-name} {
|
|
190
|
+
border-color: var(--#{$color-name});
|
|
191
|
+
}
|
|
224
192
|
}
|
|
225
193
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
194
|
+
@each $token in VAR.$theme-tokens {
|
|
195
|
+
$parts: string.split($token, "-");
|
|
196
|
+
$prefix: list.nth($parts, 1);
|
|
230
197
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
198
|
+
#{VAR.$parent-selector} .#{$token},
|
|
199
|
+
#{VAR.$parent-selector} .hover\:#{$token}:hover,
|
|
200
|
+
#{VAR.$parent-selector} .group:hover .group-hover\:#{$token} {
|
|
201
|
+
@if $prefix == "bg" {
|
|
202
|
+
background-color: var(--#{$token});
|
|
203
|
+
} @else if $prefix == "text" {
|
|
204
|
+
color: var(--#{$token});
|
|
205
|
+
} @else if $prefix == "border" {
|
|
206
|
+
border-color: var(--#{$token});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
235
209
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
210
|
+
#{VAR.$parent-selector} .inverted-#{$token},
|
|
211
|
+
#{VAR.$parent-selector} .hover\:inverted-#{$token}:hover,
|
|
212
|
+
#{VAR.$parent-selector} .group:hover .group-hover\:inverted-#{$token} {
|
|
213
|
+
@if $prefix == "bg" {
|
|
214
|
+
background-color: var(--inverted-#{$token});
|
|
215
|
+
} @else if $prefix == "text" {
|
|
216
|
+
color: var(--inverted-#{$token});
|
|
217
|
+
} @else if $prefix == "border" {
|
|
218
|
+
border-color: var(--inverted-#{$token});
|
|
219
|
+
} @else if $prefix == "fg" {
|
|
220
|
+
color: var(--inverted-#{$token});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
239
223
|
}
|
|
240
224
|
}
|
|
@@ -103,101 +103,129 @@ $backdrop-filter-presets: (
|
|
|
103
103
|
backdrop-filter: $value;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
//
|
|
106
|
+
// Base layer mixin that initializes the CSS variables
|
|
107
|
+
@mixin backdrop-layer {
|
|
108
|
+
--backdrop-blur: blur(0);
|
|
109
|
+
--backdrop-brightness: brightness(100%);
|
|
110
|
+
--backdrop-contrast: contrast(100%);
|
|
111
|
+
--backdrop-grayscale: grayscale(0);
|
|
112
|
+
--backdrop-hue-rotate: hue-rotate(0deg);
|
|
113
|
+
--backdrop-invert: invert(0);
|
|
114
|
+
--backdrop-saturate: saturate(100%);
|
|
115
|
+
--backdrop-sepia: sepia(0);
|
|
116
|
+
|
|
117
|
+
backdrop-filter: var(--backdrop-blur) var(--backdrop-brightness) var(--backdrop-contrast) var(--backdrop-grayscale) var(--backdrop-hue-rotate) var(--backdrop-invert) var(--backdrop-saturate) var(--backdrop-sepia);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Specific filter mixins - now they set CSS variables instead of the backdrop-filter property
|
|
107
121
|
@mixin backdrop-blur($value) {
|
|
108
122
|
@if map.has-key($backdrop-blur-values, $value) {
|
|
109
|
-
|
|
123
|
+
--backdrop-blur: blur(#{map.get($backdrop-blur-values, $value)});
|
|
110
124
|
} @else {
|
|
111
|
-
|
|
125
|
+
--backdrop-blur: blur(#{$value});
|
|
112
126
|
}
|
|
113
127
|
}
|
|
114
128
|
|
|
115
129
|
@mixin backdrop-brightness($value) {
|
|
116
130
|
@if map.has-key($backdrop-brightness-values, $value) {
|
|
117
|
-
|
|
131
|
+
--backdrop-brightness: brightness(#{map.get($backdrop-brightness-values, $value)});
|
|
118
132
|
} @else {
|
|
119
|
-
|
|
133
|
+
--backdrop-brightness: brightness(#{$value});
|
|
120
134
|
}
|
|
121
135
|
}
|
|
122
136
|
|
|
123
137
|
@mixin backdrop-contrast($value) {
|
|
124
138
|
@if map.has-key($backdrop-contrast-values, $value) {
|
|
125
|
-
|
|
139
|
+
--backdrop-contrast: contrast(#{map.get($backdrop-contrast-values, $value)});
|
|
126
140
|
} @else {
|
|
127
|
-
|
|
141
|
+
--backdrop-contrast: contrast(#{$value});
|
|
128
142
|
}
|
|
129
143
|
}
|
|
130
144
|
|
|
131
145
|
@mixin backdrop-grayscale($value) {
|
|
132
146
|
@if map.has-key($backdrop-grayscale-values, $value) {
|
|
133
|
-
|
|
147
|
+
--backdrop-grayscale: grayscale(#{map.get($backdrop-grayscale-values, $value)});
|
|
134
148
|
} @else {
|
|
135
|
-
|
|
149
|
+
--backdrop-grayscale: grayscale(#{$value});
|
|
136
150
|
}
|
|
137
151
|
}
|
|
138
152
|
|
|
139
153
|
@mixin backdrop-hue-rotate($value) {
|
|
140
154
|
@if map.has-key($backdrop-hue-rotate-values, $value) {
|
|
141
|
-
|
|
155
|
+
--backdrop-hue-rotate: hue-rotate(#{map.get($backdrop-hue-rotate-values, $value)});
|
|
142
156
|
} @else {
|
|
143
|
-
|
|
157
|
+
--backdrop-hue-rotate: hue-rotate(#{$value});
|
|
144
158
|
}
|
|
145
159
|
}
|
|
146
160
|
|
|
147
161
|
@mixin backdrop-invert($value) {
|
|
148
162
|
@if map.has-key($backdrop-invert-values, $value) {
|
|
149
|
-
|
|
163
|
+
--backdrop-invert: invert(#{map.get($backdrop-invert-values, $value)});
|
|
150
164
|
} @else {
|
|
151
|
-
|
|
165
|
+
--backdrop-invert: invert(#{$value});
|
|
152
166
|
}
|
|
153
167
|
}
|
|
154
168
|
|
|
155
169
|
@mixin backdrop-saturate($value) {
|
|
156
170
|
@if map.has-key($backdrop-saturate-values, $value) {
|
|
157
|
-
|
|
171
|
+
--backdrop-saturate: saturate(#{map.get($backdrop-saturate-values, $value)});
|
|
158
172
|
} @else {
|
|
159
|
-
|
|
173
|
+
--backdrop-saturate: saturate(#{$value});
|
|
160
174
|
}
|
|
161
175
|
}
|
|
162
176
|
|
|
163
177
|
@mixin backdrop-sepia($value) {
|
|
164
178
|
@if map.has-key($backdrop-sepia-values, $value) {
|
|
165
|
-
|
|
179
|
+
--backdrop-sepia: sepia(#{map.get($backdrop-sepia-values, $value)});
|
|
166
180
|
} @else {
|
|
167
|
-
|
|
181
|
+
--backdrop-sepia: sepia(#{$value});
|
|
168
182
|
}
|
|
169
183
|
}
|
|
170
184
|
|
|
171
185
|
// Preset backdrop effects
|
|
172
186
|
@mixin backdrop-frosted {
|
|
173
|
-
|
|
187
|
+
backdrop-filter: #{map.get($backdrop-filter-presets, "frosted")};
|
|
174
188
|
}
|
|
175
189
|
|
|
176
190
|
@mixin backdrop-glass {
|
|
177
|
-
|
|
191
|
+
backdrop-filter: #{map.get($backdrop-filter-presets, "glass")};
|
|
178
192
|
}
|
|
179
193
|
|
|
180
194
|
@mixin backdrop-dark-glass {
|
|
181
|
-
|
|
195
|
+
backdrop-filter: #{map.get($backdrop-filter-presets, "dark-glass")};
|
|
182
196
|
}
|
|
183
197
|
|
|
184
198
|
@mixin backdrop-crystal {
|
|
185
|
-
|
|
199
|
+
backdrop-filter: #{map.get($backdrop-filter-presets, "crystal")};
|
|
186
200
|
}
|
|
187
201
|
|
|
188
202
|
@mixin backdrop-matte {
|
|
189
|
-
|
|
203
|
+
backdrop-filter: #{map.get($backdrop-filter-presets, "matte")};
|
|
190
204
|
}
|
|
191
205
|
|
|
192
206
|
// Reset filter
|
|
193
207
|
@mixin backdrop-none {
|
|
194
208
|
backdrop-filter: none;
|
|
209
|
+
|
|
210
|
+
--backdrop-blur: none;
|
|
211
|
+
--backdrop-brightness: none;
|
|
212
|
+
--backdrop-contrast: none;
|
|
213
|
+
--backdrop-grayscale: none;
|
|
214
|
+
--backdrop-hue-rotate: none;
|
|
215
|
+
--backdrop-invert: none;
|
|
216
|
+
--backdrop-saturate: none;
|
|
217
|
+
--backdrop-sepia: none;
|
|
195
218
|
}
|
|
196
219
|
|
|
197
220
|
// Generate utility classes
|
|
198
221
|
@mixin generate-backdrop-filter-utilities($breakpoint: null) {
|
|
199
222
|
$suffix: if($breakpoint, "\\@#{$breakpoint}", "");
|
|
200
223
|
|
|
224
|
+
// Base layer class
|
|
225
|
+
#{VAR.$parent-selector} .backdrop-layer#{$suffix} {
|
|
226
|
+
@include backdrop-layer;
|
|
227
|
+
}
|
|
228
|
+
|
|
201
229
|
// Basic backdrop utilities
|
|
202
230
|
#{VAR.$parent-selector} .backdrop-none#{$suffix} {
|
|
203
231
|
@include backdrop-none;
|
|
@@ -259,7 +287,7 @@ $backdrop-filter-presets: (
|
|
|
259
287
|
}
|
|
260
288
|
}
|
|
261
289
|
|
|
262
|
-
// Preset utilities
|
|
290
|
+
// Preset utilities (these override the CSS variables approach)
|
|
263
291
|
#{VAR.$parent-selector} .backdrop-frosted#{$suffix} {
|
|
264
292
|
@include backdrop-frosted;
|
|
265
293
|
}
|
|
@@ -288,10 +316,3 @@ $backdrop-filter-presets: (
|
|
|
288
316
|
}
|
|
289
317
|
}
|
|
290
318
|
}
|
|
291
|
-
|
|
292
|
-
// Update your mixins-map.scss to include these mixins:
|
|
293
|
-
// @else if str.index($ms, 'backdrop-blur(') == 1 {
|
|
294
|
-
// $param1: list.nth($params, 1);
|
|
295
|
-
// @include backdrop-blur($param1);
|
|
296
|
-
// }
|
|
297
|
-
// Add similar entries for all other backdrop filter mixins
|
|
@@ -38,7 +38,7 @@ $border-styles: (solid, dashed, dotted, double, none);
|
|
|
38
38
|
|
|
39
39
|
// Core Border Mixins - improved to include style and color by default
|
|
40
40
|
// SKIP Documentation
|
|
41
|
-
@mixin border($val, $style: solid, $color: var(--border)) {
|
|
41
|
+
@mixin border($val, $style: solid, $color: var(--border-base)) {
|
|
42
42
|
$val: FN.fix-units($val);
|
|
43
43
|
|
|
44
44
|
border-width: $val;
|
|
@@ -64,11 +64,11 @@ $shadow-sizes: (
|
|
|
64
64
|
*/
|
|
65
65
|
@mixin shadow($size: "md", $color: "default") {
|
|
66
66
|
@if not map.has-key($shadow-sizes, $size) {
|
|
67
|
-
@
|
|
67
|
+
@error "Shadow size '#{$size}' not found in $shadow-sizes map";
|
|
68
68
|
$size: "md"; // Fallback to default
|
|
69
69
|
}
|
|
70
70
|
@if not map.has-key(VAR.$shadow-colors, $color) {
|
|
71
|
-
@
|
|
71
|
+
@error "Shadow color '#{$color}' not found in VAR.$shadow-colors map";
|
|
72
72
|
$color: "default"; // Fallback to default
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -44,11 +44,11 @@ $z-index-levels: (
|
|
|
44
44
|
"dropdown": 100,
|
|
45
45
|
"sticky": 200,
|
|
46
46
|
"fixed": 300,
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
47
|
+
"overlay": 400,
|
|
48
|
+
"drawer": 500,
|
|
49
|
+
"modal": 600,
|
|
50
|
+
"popover": 700,
|
|
51
|
+
"tooltip": 800,
|
|
52
52
|
"toast": 900,
|
|
53
53
|
"max": 9999,
|
|
54
54
|
);
|