@nuvoui/core 1.1.8 → 1.2.0
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 +2 -21
- package/src/styles/layouts/_flex.scss +4 -3
- package/src/styles/layouts/_grid.scss +3 -35
- package/src/styles/layouts/_index.scss +3 -0
- package/src/styles/mixins-map.scss +875 -1477
- package/src/styles/themes/_index.scss +1 -0
- package/src/styles/themes/_theme.scss +175 -57
- package/src/styles/utilities/_alignment.scss +1 -1
- package/src/styles/utilities/_animations.scss +65 -61
- package/src/styles/utilities/_borders.scss +280 -16
- package/src/styles/utilities/_colors.scss +68 -49
- package/src/styles/utilities/_container-queries.scss +9 -10
- package/src/styles/utilities/_display.scss +2 -2
- package/src/styles/utilities/_helpers.scss +110 -108
- package/src/styles/utilities/_index.scss +19 -0
- package/src/styles/utilities/_media-queries.scss +48 -14
- package/src/styles/utilities/_opacity.scss +33 -15
- package/src/styles/utilities/_position.scss +7 -7
- package/src/styles/utilities/_shadows.scss +147 -95
- package/src/styles/utilities/_sizing.scss +22 -21
- package/src/styles/utilities/_spacing.scss +38 -22
- package/src/styles/utilities/_tooltips.scss +153 -105
- package/src/styles/utilities/_transitions.scss +1 -1
- package/src/styles/utilities/_typography.scss +4 -4
- package/src/styles/utilities/_functions.scss +0 -84
- package/src/styles/utilities/_variables.scss +0 -126
|
@@ -1,128 +1,130 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
6
|
-
|
|
1
|
+
@use "sass:string";
|
|
2
|
+
@use "sass:math";
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "sass:list";
|
|
5
|
+
@use "sass:meta";
|
|
6
|
+
|
|
7
|
+
@use "../abstracts/config" as *;
|
|
7
8
|
|
|
8
9
|
@if $enable-debuger {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
.NuvoUI-Debugger-Wrapper {
|
|
11
|
+
color: #fff;
|
|
12
|
+
font-family: Arial, sans-serif;
|
|
13
|
+
position: fixed;
|
|
14
|
+
z-index: 999999;
|
|
15
|
+
inset: 10px auto auto 10px;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
|
|
18
|
+
&.top-left {
|
|
19
|
+
inset: 10px auto auto 10px;
|
|
20
|
+
text-align: left;
|
|
21
|
+
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
&.top-right {
|
|
24
|
+
inset: 10px 10px auto auto;
|
|
25
|
+
text-align: right;
|
|
26
|
+
}
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
&.bottom-left {
|
|
29
|
+
inset: auto auto 10px 10px;
|
|
30
|
+
text-align: left;
|
|
31
|
+
}
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
&.bottom-right {
|
|
34
|
+
inset: auto 10px 10px auto;
|
|
35
|
+
text-align: right;
|
|
36
|
+
}
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
.NuvoUI-Debugger-Main,
|
|
39
|
+
.NuvoUI-Debugger {
|
|
40
|
+
padding: 10px;
|
|
41
|
+
background-color: rgb(0 0 0 / 80%);
|
|
42
|
+
border-radius: 5px;
|
|
43
|
+
border: 1px solid green;
|
|
44
|
+
box-shadow: 0 0 2px 0 #fff;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
.NuvoUI-Debugger-Main {
|
|
49
|
+
$breakpoint-keys: map.keys($breakpoints);
|
|
50
|
+
$total: list.length($breakpoint-keys);
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
&::before,
|
|
53
|
+
&::after {
|
|
54
|
+
font-family: "Courier New", Courier, monospace;
|
|
55
|
+
font-size: 0.8em;
|
|
56
|
+
display: block;
|
|
57
|
+
}
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
&::before {
|
|
60
|
+
font-weight: bold;
|
|
61
|
+
}
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
} @else {
|
|
72
|
-
$prev: list.nth($breakpoint-keys, $i - 1);
|
|
73
|
-
$prev-width: map.get($breakpoints, $prev);
|
|
74
|
-
|
|
75
|
-
@media (min-width: #{$prev-width}) and (max-width: (#{$current-width} - 1)) {
|
|
76
|
-
&::before {
|
|
77
|
-
content: "Screen: #{$current}";
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
63
|
+
@for $i from 1 through $total {
|
|
64
|
+
$current: list.nth($breakpoint-keys, $i);
|
|
65
|
+
$current-width: map.get($breakpoints, $current);
|
|
66
|
+
|
|
67
|
+
@if $i == 1 {
|
|
68
|
+
@media (max-width: #{$current-width}) {
|
|
69
|
+
&::before {
|
|
70
|
+
content: "Screen: #{$current}";
|
|
81
71
|
}
|
|
72
|
+
}
|
|
73
|
+
} @else {
|
|
74
|
+
$prev: list.nth($breakpoint-keys, $i - 1);
|
|
75
|
+
$prev-width: map.get($breakpoints, $prev);
|
|
82
76
|
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
@media (min-width: #{$prev-width}) and (max-width: (#{$current-width} - 1)) {
|
|
78
|
+
&::before {
|
|
79
|
+
content: "Screen: #{$current}";
|
|
85
80
|
}
|
|
81
|
+
}
|
|
86
82
|
}
|
|
83
|
+
}
|
|
87
84
|
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
&::after {
|
|
86
|
+
content: attr(data-size);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
font-family: 'Courier New', Courier, monospace;
|
|
94
|
-
font-size: 0.8em;
|
|
95
|
-
display: block;
|
|
96
|
-
}
|
|
90
|
+
.NuvoUI-Debugger {
|
|
91
|
+
margin-top: 10px;
|
|
97
92
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
&::before,
|
|
94
|
+
&::after {
|
|
95
|
+
font-family: "Courier New", Courier, monospace;
|
|
96
|
+
font-size: 0.8em;
|
|
97
|
+
display: block;
|
|
98
|
+
}
|
|
102
99
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
&::before {
|
|
101
|
+
font-weight: bold;
|
|
102
|
+
content: attr(data-element);
|
|
103
|
+
}
|
|
107
104
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
105
|
+
&::after {
|
|
106
|
+
content: attr(data-size);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.NuvoUI-Debugger-Close {
|
|
111
|
+
color: #fff;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
pointer-events: auto;
|
|
115
|
+
position: absolute;
|
|
116
|
+
right: 0;
|
|
117
|
+
top: 0;
|
|
118
|
+
background: #00800199;
|
|
119
|
+
border-radius: 20px;
|
|
120
|
+
height: 14px;
|
|
121
|
+
width: 14px;
|
|
122
|
+
line-height: 14px;
|
|
123
|
+
text-align: center;
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
background: #008001;
|
|
127
|
+
}
|
|
127
128
|
}
|
|
128
|
-
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use "../abstracts/config" as cfg;
|
|
2
|
+
|
|
3
|
+
// Forward all utility files
|
|
4
|
+
@forward "alignment";
|
|
5
|
+
@forward "animations";
|
|
6
|
+
@forward "borders";
|
|
7
|
+
@forward "colors";
|
|
8
|
+
@forward "container-queries";
|
|
9
|
+
@forward "display";
|
|
10
|
+
@forward "helpers";
|
|
11
|
+
@forward "media-queries";
|
|
12
|
+
@forward "opacity";
|
|
13
|
+
@forward "position";
|
|
14
|
+
@forward "shadows";
|
|
15
|
+
@forward "sizing";
|
|
16
|
+
@forward "spacing";
|
|
17
|
+
@forward "tooltips";
|
|
18
|
+
@forward "transitions";
|
|
19
|
+
@forward "typography";
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// Section: Utilities
|
|
2
2
|
// Module: Media Queries
|
|
3
3
|
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
6
|
-
@use
|
|
7
|
-
@use
|
|
8
|
-
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@use "sass:meta";
|
|
6
|
+
@use "../abstracts" as *;
|
|
7
|
+
@use "../abstracts/functions" as FN;
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* @description Media query mixins.
|
|
@@ -19,7 +18,7 @@
|
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
@mixin media-down($breakpoint) {
|
|
22
|
-
$val: FN.get-breakpoint-value($breakpoint) - 0.
|
|
21
|
+
$val: FN.get-breakpoint-value($breakpoint) - 0.01rm;
|
|
23
22
|
@media screen and (max-width: #{$val}) {
|
|
24
23
|
@content;
|
|
25
24
|
}
|
|
@@ -27,7 +26,7 @@
|
|
|
27
26
|
|
|
28
27
|
@mixin media-between($lower, $upper) {
|
|
29
28
|
$lower-val: FN.get-breakpoint-value($lower);
|
|
30
|
-
$upper-val: FN.get-breakpoint-value($upper) - 0.
|
|
29
|
+
$upper-val: FN.get-breakpoint-value($upper) - 0.01rm;
|
|
31
30
|
@media screen and (min-width: #{$lower-val}) and (max-width: #{$upper-val}) {
|
|
32
31
|
@content;
|
|
33
32
|
}
|
|
@@ -37,13 +36,13 @@
|
|
|
37
36
|
@mixin media-only($breakpoint) {
|
|
38
37
|
$min: FN.get-breakpoint-value($breakpoint);
|
|
39
38
|
$next-breakpoint: null;
|
|
40
|
-
|
|
39
|
+
|
|
41
40
|
@each $name, $width in $breakpoints {
|
|
42
|
-
@if $width > $min and (meta.type-of($next-breakpoint) ==
|
|
41
|
+
@if $width > $min and (meta.type-of($next-breakpoint) == "null" or $width < $next-breakpoint) {
|
|
43
42
|
$next-breakpoint: $width;
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
|
-
|
|
45
|
+
|
|
47
46
|
@if $next-breakpoint {
|
|
48
47
|
@media (min-width: #{$min}) and (max-width: #{$next-breakpoint - 0.02px}) {
|
|
49
48
|
@content;
|
|
@@ -76,12 +75,26 @@
|
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
//
|
|
80
|
-
|
|
78
|
+
// System preference only
|
|
79
|
+
@mixin prefers-dark {
|
|
80
|
+
@media (prefers-color-scheme: dark) {
|
|
81
|
+
@content;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// User preference takes precedence
|
|
81
86
|
@mixin dark-mode {
|
|
82
|
-
|
|
87
|
+
// Apply when user explicitly chooses dark
|
|
88
|
+
[data-theme="dark"] & {
|
|
83
89
|
@content;
|
|
84
90
|
}
|
|
91
|
+
|
|
92
|
+
// Apply when system is dark AND user hasn't made a choice
|
|
93
|
+
@media (prefers-color-scheme: dark) {
|
|
94
|
+
[data-theme="system"] & {
|
|
95
|
+
@content;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
85
98
|
}
|
|
86
99
|
|
|
87
100
|
// Device orientation
|
|
@@ -124,9 +137,30 @@
|
|
|
124
137
|
}
|
|
125
138
|
}
|
|
126
139
|
|
|
140
|
+
// Data-saving mode
|
|
141
|
+
@mixin save-data {
|
|
142
|
+
@media (prefers-reduced-data: reduce) {
|
|
143
|
+
@content;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Mouse precision detection
|
|
148
|
+
@mixin fine-pointer {
|
|
149
|
+
@media (pointer: fine) {
|
|
150
|
+
@content;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Display mode for PWAs
|
|
155
|
+
@mixin display-mode($mode: "standalone") {
|
|
156
|
+
@media (display-mode: #{$mode}) {
|
|
157
|
+
@content;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
127
161
|
// High contrast mode
|
|
128
162
|
@mixin high-contrast {
|
|
129
163
|
@media (forced-colors: active) {
|
|
130
164
|
@content;
|
|
131
165
|
}
|
|
132
|
-
}
|
|
166
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// Section: Presentation
|
|
2
2
|
// Module: Opacity
|
|
3
3
|
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
@use "sass:math";
|
|
5
|
+
@use "../abstracts" as *;
|
|
8
6
|
|
|
9
7
|
/**
|
|
10
8
|
* @component Opacity
|
|
@@ -75,22 +73,42 @@
|
|
|
75
73
|
|
|
76
74
|
// Opacity Utilities
|
|
77
75
|
@each $i in $percentages {
|
|
78
|
-
.opacity-#{$i} {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
.
|
|
82
|
-
|
|
76
|
+
.opacity-#{$i} {
|
|
77
|
+
opacity: math.div($i, 100);
|
|
78
|
+
}
|
|
79
|
+
.hover\:opacity-#{$i}:hover {
|
|
80
|
+
opacity: math.div($i, 100);
|
|
81
|
+
}
|
|
82
|
+
.focus\:opacity-#{$i}:focus {
|
|
83
|
+
opacity: math.div($i, 100);
|
|
84
|
+
}
|
|
85
|
+
.active\:opacity-#{$i}:active {
|
|
86
|
+
opacity: math.div($i, 100);
|
|
87
|
+
}
|
|
88
|
+
.group:hover .group-hover\:opacity-#{$i} {
|
|
89
|
+
opacity: math.div($i, 100);
|
|
90
|
+
}
|
|
83
91
|
}
|
|
84
92
|
|
|
85
93
|
// Responsive Variants for Opacity
|
|
86
94
|
@each $breakpoint, $width in $breakpoints {
|
|
87
95
|
@media (min-width: #{$width}) {
|
|
88
96
|
@each $i in $percentages {
|
|
89
|
-
.opacity-#{$i}\@#{$breakpoint} {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
.
|
|
93
|
-
|
|
97
|
+
.opacity-#{$i}\@#{$breakpoint} {
|
|
98
|
+
opacity: math.div($i, 100);
|
|
99
|
+
}
|
|
100
|
+
.hover\:opacity-#{$i}\@#{$breakpoint}:hover {
|
|
101
|
+
opacity: math.div($i, 100);
|
|
102
|
+
}
|
|
103
|
+
.focus\:opacity-#{$i}\@#{$breakpoint}:focus {
|
|
104
|
+
opacity: math.div($i, 100);
|
|
105
|
+
}
|
|
106
|
+
.active\:opacity-#{$i}\@#{$breakpoint}:active {
|
|
107
|
+
opacity: math.div($i, 100);
|
|
108
|
+
}
|
|
109
|
+
.group:hover .group-hover\:opacity-#{$i}\@#{$breakpoint} {
|
|
110
|
+
opacity: math.div($i, 100);
|
|
111
|
+
}
|
|
94
112
|
}
|
|
95
113
|
}
|
|
96
114
|
}
|
|
@@ -101,4 +119,4 @@
|
|
|
101
119
|
transition-property: opacity;
|
|
102
120
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
103
121
|
transition-duration: 150ms;
|
|
104
|
-
}
|
|
122
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use '../abstracts' as *;
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @component Position
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
// -----------------------------------------------
|
|
53
53
|
// MIXINS
|
|
54
|
-
|
|
54
|
+
// -----------------------------------------------
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
/**
|
|
@@ -171,9 +171,9 @@
|
|
|
171
171
|
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
// -----------------------------------------------
|
|
175
175
|
// UTILITY CLASSES
|
|
176
|
-
|
|
176
|
+
// -----------------------------------------------
|
|
177
177
|
|
|
178
178
|
// Position Classes
|
|
179
179
|
.static { @include static; }
|
|
@@ -190,9 +190,9 @@
|
|
|
190
190
|
.left-#{$key} { @include left($value); }
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
// -----------------------------------------------
|
|
194
194
|
// RESPONSIVE CLASSES
|
|
195
|
-
|
|
195
|
+
// -----------------------------------------------
|
|
196
196
|
|
|
197
197
|
// Responsive Position Classes
|
|
198
198
|
@each $breakpoint, $width in $breakpoints {
|