@nuvoui/core 1.1.8 → 1.2.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.
- package/README.md +90 -35
- package/dist/nuvoui.css +28531 -0
- package/dist/nuvoui.css.map +1 -0
- package/dist/nuvoui.min.css +2 -1
- package/dist/nuvoui.min.css.map +1 -0
- package/package.json +48 -27
- package/src/styles/abstracts/_config.scss +157 -0
- package/src/styles/abstracts/_functions.scss +81 -0
- package/src/styles/abstracts/_index.scss +2 -0
- package/src/styles/base/_base.scss +2 -2
- package/src/styles/base/_index.scss +2 -0
- package/src/styles/base/_reset.scss +8 -6
- package/src/styles/index.scss +11 -30
- package/src/styles/layouts/_container.scss +7 -23
- package/src/styles/layouts/_flex.scss +116 -113
- package/src/styles/layouts/_grid.scss +70 -100
- package/src/styles/layouts/_index.scss +3 -0
- package/src/styles/mixins-map.scss +1 -1515
- package/src/styles/themes/_index.scss +1 -0
- package/src/styles/themes/_theme.scss +175 -55
- package/src/styles/utilities/_alignment.scss +9 -7
- package/src/styles/utilities/_animations.scss +65 -61
- package/src/styles/utilities/_borders.scss +283 -18
- package/src/styles/utilities/_colors.scss +68 -49
- package/src/styles/utilities/_container-queries.scss +19 -18
- package/src/styles/utilities/_display.scss +59 -57
- package/src/styles/utilities/_helpers.scss +110 -108
- package/src/styles/utilities/_index.scss +19 -0
- package/src/styles/utilities/_media-queries.scss +68 -15
- package/src/styles/utilities/_opacity.scss +51 -27
- package/src/styles/utilities/_position.scss +38 -37
- package/src/styles/utilities/_shadows.scss +195 -137
- package/src/styles/utilities/_sizing.scss +74 -71
- package/src/styles/utilities/_spacing.scss +117 -99
- package/src/styles/utilities/_tooltips.scss +153 -105
- package/src/styles/utilities/_transitions.scss +77 -73
- package/src/styles/utilities/_typography.scss +23 -26
- package/src/styles/utilities/_functions.scss +0 -84
- package/src/styles/utilities/_variables.scss +0 -126
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward "theme";
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
// _theme.scss
|
|
2
|
-
@use
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// Generate scales for primitives
|
|
9
|
-
$colors-primitives: ();
|
|
10
|
-
|
|
11
|
-
@each $name, $color in $color-primitives {
|
|
12
|
-
$colors-primitives: map.set($colors-primitives, $name, create-color-scale($color));
|
|
13
|
-
}
|
|
1
|
+
// _theme.scss - CSS variables and utility classes
|
|
2
|
+
@use "sass:color";
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "../utilities/colors" as COL;
|
|
5
|
+
@use "../abstracts" as *;
|
|
14
6
|
|
|
7
|
+
@if $generate-utility-classes {
|
|
15
8
|
:root {
|
|
16
|
-
|
|
9
|
+
// Theme color CSS variables
|
|
10
|
+
@each $color-name, $scale in COL.$colors {
|
|
17
11
|
--#{$color-name}: #{color.adjust(map.get($scale, 500), $alpha: 1)};
|
|
18
12
|
@each $shade, $value in $scale {
|
|
19
13
|
--#{$color-name}-#{$shade}: #{color.adjust($value, $alpha: 1)};
|
|
20
14
|
}
|
|
21
15
|
}
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
// Primitive color CSS variables
|
|
18
|
+
@each $color-name, $scale in COL.$colors-primitives {
|
|
24
19
|
--#{$color-name}: #{color.adjust(map.get($scale, 500), $alpha: 1)};
|
|
25
20
|
@each $shade, $value in $scale {
|
|
26
21
|
--#{$color-name}-#{$shade}: #{color.adjust($value, $alpha: 1)};
|
|
27
22
|
}
|
|
28
23
|
}
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
--
|
|
25
|
+
// Light theme variables
|
|
26
|
+
--background: #{map.get($light-theme, "background")};
|
|
27
|
+
--foreground: #{map.get($light-theme, "foreground")};
|
|
28
|
+
--surface: #{map.get($light-theme, "surface")};
|
|
29
|
+
--border: var(--gray-600);
|
|
34
30
|
--text-primary: var(--gray-900);
|
|
35
31
|
--text-secondary: var(--gray-600);
|
|
36
32
|
--button-bg-color: var(--primary);
|
|
@@ -38,31 +34,33 @@ $colors-primitives: ();
|
|
|
38
34
|
--button-text-color: var(--gray-100);
|
|
39
35
|
--link-color: var(--primary);
|
|
40
36
|
--link-hover-color: var(--primary-600);
|
|
37
|
+
--inverted-text-color: var(--gray-100);
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
// Scrollbar styling
|
|
43
40
|
&::-webkit-scrollbar {
|
|
44
41
|
width: 12px;
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
&::-webkit-scrollbar-track {
|
|
48
|
-
background: var(--background);
|
|
45
|
+
background: var(--background);
|
|
49
46
|
}
|
|
50
47
|
|
|
51
48
|
&::-webkit-scrollbar-thumb {
|
|
52
|
-
background-color: #888;
|
|
49
|
+
background-color: #888;
|
|
53
50
|
border-radius: 6px;
|
|
54
|
-
border: 3px solid var(--background);
|
|
51
|
+
border: 3px solid var(--background);
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
scrollbar-width: thin;
|
|
58
|
-
scrollbar-color: #888 var(--background);
|
|
55
|
+
scrollbar-color: #888 var(--background);
|
|
59
56
|
}
|
|
60
57
|
|
|
58
|
+
// Dark theme settings
|
|
61
59
|
[data-theme="dark"] {
|
|
62
|
-
--background: #{map.get($dark-theme,
|
|
63
|
-
--foreground: #{map.get($dark-theme,
|
|
64
|
-
--surface: #{map.get($dark-theme,
|
|
65
|
-
--border: var(--
|
|
60
|
+
--background: #{map.get($dark-theme, "background")};
|
|
61
|
+
--foreground: #{map.get($dark-theme, "foreground")};
|
|
62
|
+
--surface: #{map.get($dark-theme, "surface")};
|
|
63
|
+
--border: var(--gray-400);
|
|
66
64
|
--text-primary: var(--gray-100);
|
|
67
65
|
--text-secondary: var(--gray-400);
|
|
68
66
|
--button-bg-color: var(--primary);
|
|
@@ -70,6 +68,7 @@ $colors-primitives: ();
|
|
|
70
68
|
--button-text-color: var(--gray-200);
|
|
71
69
|
--link-color: var(--primary);
|
|
72
70
|
--link-hover-color: var(--primary-400);
|
|
71
|
+
--inverted-text-color: var(--gray-900);
|
|
73
72
|
|
|
74
73
|
&::-webkit-scrollbar-track {
|
|
75
74
|
background: var(--background);
|
|
@@ -80,32 +79,153 @@ $colors-primitives: ();
|
|
|
80
79
|
border: 3px solid var(--background);
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
scrollbar-color: #555 var(--background);
|
|
82
|
+
scrollbar-color: #555 var(--background);
|
|
84
83
|
}
|
|
85
84
|
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
85
|
+
// -----------------------------------------------
|
|
86
|
+
// COLOR UTILITY CLASSES
|
|
87
|
+
// -----------------------------------------------
|
|
88
|
+
|
|
89
|
+
// Theme color background utilities
|
|
90
|
+
@each $color-name, $scale in COL.$colors {
|
|
91
|
+
@each $shade, $value in $scale {
|
|
92
|
+
.bg-#{$color-name}-#{$shade} {
|
|
93
|
+
background-color: var(--#{$color-name}-#{$shade});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Automatic text contrast for backgrounds
|
|
97
|
+
.text-on-#{$color-name}-#{$shade} {
|
|
98
|
+
color: COL.find-text-color($value);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.text-#{$color-name}-#{$shade} {
|
|
102
|
+
color: var(--#{$color-name}-#{$shade});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Base color classes
|
|
107
|
+
.bg-#{$color-name} {
|
|
108
|
+
background-color: var(--#{$color-name});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.text-#{$color-name} {
|
|
112
|
+
color: var(--#{$color-name});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Primitive color utilities
|
|
117
|
+
@each $color-name, $scale in COL.$colors-primitives {
|
|
118
|
+
@each $shade, $value in $scale {
|
|
119
|
+
.bg-#{$color-name}-#{$shade} {
|
|
120
|
+
background-color: var(--#{$color-name}-#{$shade});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.text-on-#{$color-name}-#{$shade} {
|
|
124
|
+
color: COL.find-text-color($value);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.text-#{$color-name}-#{$shade} {
|
|
128
|
+
color: var(--#{$color-name}-#{$shade});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Base color classes
|
|
133
|
+
.bg-#{$color-name} {
|
|
134
|
+
background-color: var(--#{$color-name});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.text-#{$color-name} {
|
|
138
|
+
color: var(--#{$color-name});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Semantic color utilities
|
|
143
|
+
.bg-page {
|
|
144
|
+
background-color: var(--background);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.bg-card {
|
|
148
|
+
background-color: var(--surface);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.bg-active {
|
|
152
|
+
background-color: var(--button-bg-color);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.bg-hover {
|
|
156
|
+
background-color: var(--button-bg-color-hover);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.text-default {
|
|
160
|
+
color: var(--text-primary);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.text-muted {
|
|
164
|
+
color: var(--text-secondary);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.text-subtle {
|
|
168
|
+
color: var(--text-secondary);
|
|
169
|
+
opacity: 0.7;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.text-inverted {
|
|
173
|
+
color: var(--inverted-text-color);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.bg-white {
|
|
177
|
+
background-color: white;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.bg-black {
|
|
181
|
+
background-color: black;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.text-white {
|
|
185
|
+
color: white;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.text-black {
|
|
189
|
+
color: black;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Hover utilities
|
|
193
|
+
@each $color-name, $scale in COL.$colors {
|
|
194
|
+
@each $shade, $value in $scale {
|
|
195
|
+
.hover\:bg-#{$color-name}-#{$shade}:hover {
|
|
196
|
+
background-color: var(--#{$color-name}-#{$shade});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.hover\:text-#{$color-name}-#{$shade}:hover {
|
|
200
|
+
color: var(--#{$color-name}-#{$shade});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@each $color-name, $scale in COL.$colors-primitives {
|
|
206
|
+
@each $shade, $value in $scale {
|
|
207
|
+
.hover\:bg-#{$color-name}-#{$shade}:hover {
|
|
208
|
+
background-color: var(--#{$color-name}-#{$shade});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.hover\:text-#{$color-name}-#{$shade}:hover {
|
|
212
|
+
color: var(--#{$color-name}-#{$shade});
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Glass effects
|
|
219
|
+
.glass-effect {
|
|
220
|
+
@include COL.backdrop-filter(blur(8px));
|
|
221
|
+
|
|
222
|
+
background-color: rgb(255 255 255 / 10%);
|
|
223
|
+
border: 1px solid rgb(255 255 255 / 20%);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.frosted-glass {
|
|
227
|
+
@include COL.backdrop-filter(blur(15px));
|
|
228
|
+
|
|
229
|
+
background-color: rgb(255 255 255 / 70%);
|
|
230
|
+
border: 1px solid rgb(255 255 255 / 80%);
|
|
231
|
+
}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
@use '../
|
|
1
|
+
@use '../abstracts' as VAR;
|
|
2
2
|
|
|
3
3
|
@mixin align-baseline { vertical-align: baseline; }
|
|
4
4
|
@mixin align-top { vertical-align: top; }
|
|
5
5
|
@mixin align-middle { vertical-align: middle; }
|
|
6
6
|
@mixin align-bottom { vertical-align: bottom; }
|
|
7
7
|
|
|
8
|
+
@if VAR.$generate-utility-classes {
|
|
8
9
|
.align-baseline { @include align-baseline; }
|
|
9
10
|
.align-top { @include align-top; }
|
|
10
11
|
.align-middle { @include align-middle; }
|
|
11
12
|
.align-bottom { @include align-bottom; }
|
|
12
13
|
|
|
13
|
-
@each $breakpoint, $width in VAR.$breakpoints {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
@each $breakpoint, $width in VAR.$breakpoints {
|
|
15
|
+
@media (min-width: #{$width}) {
|
|
16
|
+
.align-baseline\@#{$breakpoint} { @include align-baseline; }
|
|
17
|
+
.align-top\@#{$breakpoint} { @include align-top; }
|
|
18
|
+
.align-middle\@#{$breakpoint} { @include align-middle; }
|
|
19
|
+
.align-bottom\@#{$breakpoint} { @include align-bottom; }
|
|
20
|
+
}
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -1,80 +1,84 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "sass:list";
|
|
2
2
|
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "../abstracts/functions" as *;
|
|
5
5
|
|
|
6
6
|
$generated-keyframes: ();
|
|
7
7
|
|
|
8
|
-
|
|
9
8
|
@mixin generate-bounce-keyframes($keyframeName, $x, $y) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
@if not list.index($generated-keyframes, $keyframeName) {
|
|
10
|
+
$generated-keyframes: list.append($generated-keyframes, $keyframeName) !global;
|
|
11
|
+
|
|
12
|
+
@keyframes #{$keyframeName} {
|
|
13
|
+
0% {
|
|
14
|
+
transform: translateX(-#{$x}) translateY(-#{$y});
|
|
15
|
+
}
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
50% {
|
|
18
|
+
transform: translateX(#{$x}) translateY(#{$y});
|
|
19
|
+
}
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
21
|
+
100% {
|
|
22
|
+
transform: translateX(-#{$x}) translateY(-#{$y});
|
|
23
|
+
}
|
|
26
24
|
}
|
|
25
|
+
}
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
@mixin animate-bounce($props) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// Merge with defaults
|
|
39
|
-
$props: map.merge($defaults, $props);
|
|
40
|
-
$x: map.get($props, 'horizontal');
|
|
41
|
-
$y: map.get($props, 'vertical');
|
|
42
|
-
$duration: map.get($props, 'duration');
|
|
43
|
-
$easing: map.get($props, 'timing');
|
|
44
|
-
$iteration: map.get($props, 'iteration');
|
|
45
|
-
|
|
46
|
-
// 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
|
-
|
|
50
|
-
// Clean values (remove units)
|
|
51
|
-
$clean-x: if($x, strip-unit($x), 0);
|
|
52
|
-
$clean-y: if($y, strip-unit($y), 0);
|
|
53
|
-
$animation-name: anim-bounce-#{$clean-x}#{$x-unit}-#{$clean-y}#{$y-unit};
|
|
29
|
+
$defaults: (
|
|
30
|
+
vertical: 0%,
|
|
31
|
+
horizontal: 0%,
|
|
32
|
+
duration: 5s,
|
|
33
|
+
timing: ease-in-out,
|
|
34
|
+
iteration: infinite,
|
|
35
|
+
);
|
|
54
36
|
|
|
37
|
+
// Merge with defaults
|
|
38
|
+
$props: map.merge($defaults, $props);
|
|
39
|
+
$x: map.get($props, "horizontal");
|
|
40
|
+
$y: map.get($props, "vertical");
|
|
41
|
+
$duration: map.get($props, "duration");
|
|
42
|
+
$easing: map.get($props, "timing");
|
|
43
|
+
$iteration: map.get($props, "iteration");
|
|
55
44
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
@include generate-bounce-keyframes($animation-name, $x, $y);
|
|
60
|
-
}
|
|
45
|
+
// Handle units
|
|
46
|
+
$x-unit: if($x, safe-unit-name(get-unit($x)), "-");
|
|
47
|
+
$y-unit: if($y, safe-unit-name(get-unit($y)), "-");
|
|
61
48
|
|
|
49
|
+
// Clean values (remove units)
|
|
50
|
+
$clean-x: if($x, strip-unit($x), 0);
|
|
51
|
+
$clean-y: if($y, strip-unit($y), 0);
|
|
52
|
+
$animation-name: anim-bounce-#{$clean-x}#{$x-unit}-#{$clean-y}#{$y-unit};
|
|
62
53
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
54
|
+
& {
|
|
55
|
+
animation: #{$animation-name} $duration $easing $iteration;
|
|
56
|
+
}
|
|
57
|
+
@include generate-bounce-keyframes($animation-name, $x, $y);
|
|
68
58
|
}
|
|
69
59
|
|
|
60
|
+
@keyframes fade-in-reveal {
|
|
61
|
+
to {
|
|
62
|
+
scale: 1;
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
70
66
|
|
|
71
67
|
@media (prefers-reduced-motion: no-preference) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
68
|
+
.anim__fade-in-reveal {
|
|
69
|
+
scale: 0.2;
|
|
70
|
+
opacity: 0.7;
|
|
71
|
+
animation: fade-in-reveal linear forwards;
|
|
72
|
+
animation-timeline: view();
|
|
73
|
+
animation-range-start: cover;
|
|
74
|
+
animation-range-end: 550px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@mixin hover-ready {
|
|
79
|
+
& {
|
|
80
|
+
transition-property: color, background-color, border-color, box-shadow, opacity, border-radius;
|
|
81
|
+
transition-duration: 0.2s;
|
|
82
|
+
transition-timing-function: ease-in-out;
|
|
83
|
+
}
|
|
84
|
+
}
|