@nuvoui/core 1.2.2 → 1.2.4
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 +10759 -10520
- 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 +1 -1
- package/src/styles/abstracts/_config.scss +35 -54
- package/src/styles/abstracts/_index.scss +0 -1
- package/src/styles/base/_base.scss +4 -8
- package/src/styles/base/_index.scss +1 -1
- package/src/styles/base/_reset.scss +66 -31
- package/src/styles/index.scss +5 -2
- package/src/styles/layouts/_flex.scss +61 -46
- package/src/styles/layouts/_grid.scss +13 -13
- package/src/styles/mixins-map.scss +1 -1
- package/src/styles/themes/_theme.scss +144 -124
- package/src/styles/utilities/_alignment.scss +12 -12
- package/src/styles/utilities/_animations.scss +5 -9
- package/src/styles/utilities/_borders.scss +77 -80
- package/src/styles/utilities/_colors.scss +61 -65
- package/src/styles/utilities/_cursor.scss +23 -0
- package/src/styles/utilities/_index.scss +1 -0
- package/src/styles/utilities/_media-queries.scss +24 -15
- package/src/styles/utilities/_opacity.scss +14 -21
- package/src/styles/utilities/_position.scss +1 -3
- package/src/styles/utilities/_sizing.scss +92 -73
- package/src/styles/utilities/_spacing.scss +71 -101
- package/src/styles/utilities/_transitions.scss +4 -6
- package/src/styles/utilities/_typography.scss +92 -95
package/package.json
CHANGED
|
@@ -5,32 +5,20 @@
|
|
|
5
5
|
$generate-utility-classes: true !default;
|
|
6
6
|
$enable-dark-mode: true !default;
|
|
7
7
|
$enable-rtl: true !default;
|
|
8
|
-
$enable-
|
|
9
|
-
$enable-
|
|
10
|
-
|
|
11
|
-
$base-size: 16;
|
|
12
|
-
|
|
13
|
-
@function rem($px) {
|
|
14
|
-
@if $px == 0 {
|
|
15
|
-
@return 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Strip units if $px has any
|
|
19
|
-
$value: if(math.unit($px) == "", $px, math.div($px, math.unit($px)));
|
|
8
|
+
$enable-debuger: false !default;
|
|
9
|
+
$enable-reduced-motion: true !default; // todo: pending
|
|
10
|
+
$enable-container-queries: false !default; // todo: pending
|
|
20
11
|
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
// Text
|
|
13
|
+
$base-size: 16 !default;
|
|
14
|
+
$font-family: system-ui, -apple-system, "BlinkMacSystemFont", 'Segoe UI', "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
|
|
23
15
|
|
|
24
16
|
// Global variables that might be used across different modules
|
|
25
|
-
$
|
|
26
|
-
$enable-dark-mode: true !default;
|
|
27
|
-
$enable-rtl: true !default;
|
|
28
|
-
$enable-reduced-motion: true !default;
|
|
29
|
-
$column-count: 12 !default;
|
|
17
|
+
$column-count: 12 !default; // todo: pending
|
|
30
18
|
|
|
31
|
-
$default-container-name: nuvoui-container !default;
|
|
32
|
-
$nuvoui-container-queries: false !default;
|
|
19
|
+
$default-container-name: nuvoui-container !default; // todo: pending
|
|
33
20
|
|
|
21
|
+
// Accessible color palette
|
|
34
22
|
$primary: #007bff !default;
|
|
35
23
|
$secondary: #6c757d !default;
|
|
36
24
|
$success: #28a745 !default;
|
|
@@ -38,6 +26,7 @@ $danger: #dc3545 !default;
|
|
|
38
26
|
$warning: #ffc107 !default;
|
|
39
27
|
$info: #17a2b8 !default;
|
|
40
28
|
|
|
29
|
+
// Color palette
|
|
41
30
|
$color-primitives: (
|
|
42
31
|
"gray": #6b7280,
|
|
43
32
|
"red": #ef4444,
|
|
@@ -96,44 +85,36 @@ $grid-item-sizes: (
|
|
|
96
85
|
|
|
97
86
|
// _variables.scss
|
|
98
87
|
$font-sizes: (
|
|
99
|
-
// 12px
|
|
100
|
-
"
|
|
101
|
-
//
|
|
102
|
-
"
|
|
103
|
-
//
|
|
104
|
-
"
|
|
105
|
-
//
|
|
106
|
-
"
|
|
107
|
-
// 24px
|
|
108
|
-
"xl": 1.5rem,
|
|
109
|
-
// 28px
|
|
110
|
-
"2xl": 1.75rem,
|
|
111
|
-
// 32px
|
|
112
|
-
"3xl": 2rem,
|
|
113
|
-
// 40px
|
|
114
|
-
"4xl": 2.5rem
|
|
88
|
+
"xs": 0.75rem, // 12px
|
|
89
|
+
"sm": 0.875rem, // 14px
|
|
90
|
+
"md": 1rem, // 16px
|
|
91
|
+
"lg": 1.25rem, // 20px
|
|
92
|
+
"xl": 1.5rem, // 24px
|
|
93
|
+
"2xl": 1.75rem, // 28px
|
|
94
|
+
"3xl": 2rem, // 32px
|
|
95
|
+
"4xl": 2.5rem // 40px
|
|
115
96
|
) !default;
|
|
116
97
|
|
|
117
98
|
// Updated spacing map
|
|
118
99
|
$spacings: (
|
|
119
100
|
0: 0,
|
|
120
|
-
1: 0.25rem,
|
|
121
|
-
2: 0.5rem,
|
|
122
|
-
3: 0.75rem,
|
|
123
|
-
4: 1rem,
|
|
124
|
-
5: 1.25rem,
|
|
125
|
-
6: 1.5rem,
|
|
126
|
-
8: 2rem,
|
|
127
|
-
10: 2.5rem,
|
|
128
|
-
12: 3rem,
|
|
129
|
-
16: 4rem,
|
|
130
|
-
20: 5rem,
|
|
131
|
-
24: 6rem,
|
|
132
|
-
32: 8rem,
|
|
133
|
-
40: 10rem,
|
|
134
|
-
48: 12rem,
|
|
135
|
-
56: 14rem,
|
|
136
|
-
64: 16rem,
|
|
101
|
+
1: 0.25rem, // 4px
|
|
102
|
+
2: 0.5rem, // 8px
|
|
103
|
+
3: 0.75rem, // 12px
|
|
104
|
+
4: 1rem, // 16px
|
|
105
|
+
5: 1.25rem, // 20px
|
|
106
|
+
6: 1.5rem, // 24px
|
|
107
|
+
8: 2rem, // 32px
|
|
108
|
+
10: 2.5rem, // 40px
|
|
109
|
+
12: 3rem, // 48px
|
|
110
|
+
16: 4rem, // 64px
|
|
111
|
+
20: 5rem, // 80px
|
|
112
|
+
24: 6rem, // 96px
|
|
113
|
+
32: 8rem, // 128px
|
|
114
|
+
40: 10rem, // 160px
|
|
115
|
+
48: 12rem, // 192px
|
|
116
|
+
56: 14rem, // 224px
|
|
117
|
+
64: 16rem, // 256px
|
|
137
118
|
) !default;
|
|
138
119
|
|
|
139
120
|
$percentages: (0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100) !default;
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
@use '../utilities/media-queries' as media;
|
|
6
6
|
|
|
7
7
|
:root {
|
|
8
|
-
--font-family-base:
|
|
8
|
+
--font-family-base: #{$font-family};
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
// Base typography styles
|
|
12
12
|
html {
|
|
13
|
-
font-size:
|
|
14
|
-
font-family: var(--font-family-base);
|
|
13
|
+
font-size: $base-size;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
body {
|
|
@@ -19,7 +18,6 @@ body {
|
|
|
19
18
|
font-weight: 400;
|
|
20
19
|
line-height: 1.5;
|
|
21
20
|
color: var(--text-primary);
|
|
22
|
-
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
// Headings
|
|
@@ -172,6 +170,7 @@ a {
|
|
|
172
170
|
}
|
|
173
171
|
}
|
|
174
172
|
|
|
173
|
+
// todo: add to doc
|
|
175
174
|
.sr-only {
|
|
176
175
|
position: absolute !important;
|
|
177
176
|
width: 1px !important;
|
|
@@ -184,19 +183,16 @@ a {
|
|
|
184
183
|
border: 0 !important;
|
|
185
184
|
}
|
|
186
185
|
|
|
187
|
-
|
|
188
|
-
|
|
189
186
|
code {
|
|
190
187
|
font-family: 'Courier New', Courier, monospace;
|
|
191
188
|
background-color: #f8f8f8;
|
|
192
189
|
color: #d63384;
|
|
193
190
|
padding: 2px 6px;
|
|
194
191
|
border-radius: 3px;
|
|
195
|
-
box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
|
|
196
192
|
white-space: nowrap;
|
|
197
193
|
|
|
198
194
|
@include media.dark-mode {
|
|
199
195
|
background-color: #333;
|
|
200
196
|
color: #f8f8f2;
|
|
201
197
|
}
|
|
202
|
-
}
|
|
198
|
+
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
// Modern CSS Reset
|
|
2
|
-
|
|
3
1
|
// Box sizing rules
|
|
4
2
|
*,
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
::before,
|
|
4
|
+
::after,
|
|
5
|
+
::backdrop,
|
|
6
|
+
::file-selector-button {
|
|
7
7
|
box-sizing: border-box;
|
|
8
8
|
margin: 0;
|
|
9
9
|
padding: 0;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
|
|
12
13
|
// Remove default margin and padding
|
|
13
14
|
body,
|
|
14
15
|
h1,
|
|
@@ -26,6 +27,18 @@ dd {
|
|
|
26
27
|
padding: 0;
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
// Prevent font size inflation
|
|
31
|
+
html {
|
|
32
|
+
-moz-text-size-adjust: none; /* stylelint-disable-line */
|
|
33
|
+
-webkit-text-size-adjust: none; /* stylelint-disable-line */
|
|
34
|
+
text-size-adjust: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Set core root defaults
|
|
38
|
+
html:focus-within {
|
|
39
|
+
scroll-behavior: smooth;
|
|
40
|
+
}
|
|
41
|
+
|
|
29
42
|
// Set core body defaults
|
|
30
43
|
body {
|
|
31
44
|
min-height: 100vh;
|
|
@@ -34,7 +47,12 @@ body {
|
|
|
34
47
|
line-height: 1.5;
|
|
35
48
|
-webkit-font-smoothing: antialiased;
|
|
36
49
|
-moz-osx-font-smoothing: grayscale;
|
|
37
|
-
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Set shorter line heights on headings and interactive elements
|
|
53
|
+
h1, h2, h3, h4,
|
|
54
|
+
button, input, label {
|
|
55
|
+
line-height: 1.1;
|
|
38
56
|
}
|
|
39
57
|
|
|
40
58
|
// Make images easier to work with
|
|
@@ -42,9 +60,21 @@ img,
|
|
|
42
60
|
picture,
|
|
43
61
|
video,
|
|
44
62
|
canvas,
|
|
45
|
-
svg
|
|
63
|
+
svg,
|
|
64
|
+
audio,
|
|
65
|
+
iframe,
|
|
66
|
+
embed,
|
|
67
|
+
object {
|
|
46
68
|
display: block;
|
|
69
|
+
vertical-align: middle;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
img,
|
|
73
|
+
picture,
|
|
74
|
+
video,
|
|
75
|
+
svg {
|
|
47
76
|
max-width: 100%;
|
|
77
|
+
height: auto;
|
|
48
78
|
}
|
|
49
79
|
|
|
50
80
|
// Inherit fonts for inputs and buttons
|
|
@@ -53,24 +83,16 @@ button,
|
|
|
53
83
|
textarea,
|
|
54
84
|
select {
|
|
55
85
|
font: inherit;
|
|
56
|
-
|
|
57
|
-
}
|
|
86
|
+
cursor: pointer;
|
|
58
87
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*,
|
|
62
|
-
*::before,
|
|
63
|
-
*::after {
|
|
64
|
-
animation-duration: 0.01ms !important;
|
|
65
|
-
animation-iteration-count: 1 !important;
|
|
66
|
-
transition-duration: 0.01ms !important;
|
|
67
|
-
scroll-behavior: auto !important;
|
|
88
|
+
&:disabled {
|
|
89
|
+
cursor: not-allowed;
|
|
68
90
|
}
|
|
69
91
|
}
|
|
70
92
|
|
|
71
|
-
// Remove list styles
|
|
72
|
-
ul,
|
|
73
|
-
ol {
|
|
93
|
+
// Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed
|
|
94
|
+
ul[role='list'],
|
|
95
|
+
ol[role='list'] {
|
|
74
96
|
list-style: none;
|
|
75
97
|
margin: 0;
|
|
76
98
|
padding: 0;
|
|
@@ -78,17 +100,12 @@ ol {
|
|
|
78
100
|
// Modern properties
|
|
79
101
|
padding-inline-start: 0; // Replaces padding-left
|
|
80
102
|
margin-block: 0; // Replaces margin-top/bottom
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Set core root defaults
|
|
90
|
-
html:focus-within {
|
|
91
|
-
scroll-behavior: smooth;
|
|
103
|
+
|
|
104
|
+
& > li {
|
|
105
|
+
margin: 0;
|
|
106
|
+
padding: 0;
|
|
107
|
+
margin-block: 0;
|
|
108
|
+
}
|
|
92
109
|
}
|
|
93
110
|
|
|
94
111
|
// Remove underline from links
|
|
@@ -102,3 +119,21 @@ a {
|
|
|
102
119
|
textarea:not([rows]) {
|
|
103
120
|
min-height: 10em;
|
|
104
121
|
}
|
|
122
|
+
|
|
123
|
+
// Anything that has been anchored to should have extra scroll margin
|
|
124
|
+
:target {
|
|
125
|
+
scroll-margin-block: 5ex;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
// Remove all animations and transitions for people that prefer not to see them
|
|
130
|
+
@media (prefers-reduced-motion: reduce) {
|
|
131
|
+
*,
|
|
132
|
+
*::before,
|
|
133
|
+
*::after {
|
|
134
|
+
animation-duration: 0.01ms !important;
|
|
135
|
+
animation-iteration-count: 1 !important;
|
|
136
|
+
transition-duration: 0.01ms !important;
|
|
137
|
+
scroll-behavior: auto !important;
|
|
138
|
+
}
|
|
139
|
+
}
|
package/src/styles/index.scss
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
// Import base styles
|
|
5
5
|
@forward "base";
|
|
6
6
|
|
|
7
|
-
// Import themes
|
|
8
|
-
@forward "themes";
|
|
9
7
|
|
|
10
8
|
// Import layout components
|
|
11
9
|
@forward "layouts";
|
|
@@ -13,4 +11,9 @@
|
|
|
13
11
|
// Import utilities based on configuration
|
|
14
12
|
@forward "utilities";
|
|
15
13
|
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// Import themes near bottom for overrides
|
|
17
|
+
@forward "themes";
|
|
18
|
+
|
|
16
19
|
@forward "./mixins-map";
|