@nuvoui/core 1.3.4 → 1.4.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/LICENSE +21 -0
- package/dist/nuvoui.css +424 -342
- package/dist/nuvoui.css.map +1 -1
- package/dist/nuvoui.min.css +23 -1
- package/dist/nuvoui.min.css.map +1 -1
- package/package.json +1 -1
- package/src/styles/base/_base.scss +148 -147
- package/src/styles/base/_reset.scss +41 -49
- package/src/styles/build.scss +25 -1
- package/src/styles/components/_tooltips.scss +271 -0
- package/src/styles/config/_borders.scss +15 -0
- package/src/styles/config/_breakpoints.scss +11 -0
- package/src/styles/config/_colors.scss +192 -0
- package/src/styles/config/_constants.scss +1 -0
- package/src/styles/config/_container-queries.scss +1 -0
- package/src/styles/config/_feature-flags.scss +33 -0
- package/src/styles/config/_layouts.scss +13 -0
- package/src/styles/config/_shadows.scss +9 -0
- package/src/styles/config/_spacing.scss +41 -0
- package/src/styles/config/_theme-validation.scss +59 -0
- package/src/styles/config/_typography.scss +45 -0
- package/src/styles/functions/_breakpoints.scss +15 -0
- package/src/styles/functions/_colors.scss +280 -0
- package/src/styles/functions/_css-vars.scss +33 -0
- package/src/styles/functions/_feature-flags.scss +20 -0
- package/src/styles/functions/_math.scss +72 -0
- package/src/styles/functions/_strings.scss +68 -0
- package/src/styles/functions/_types.scss +104 -0
- package/src/styles/functions/_units.scss +83 -0
- package/src/styles/index.scss +26 -5
- package/src/styles/layouts/_container.scss +28 -27
- package/src/styles/layouts/_flex.scss +340 -341
- package/src/styles/layouts/_grid.scss +131 -128
- package/src/styles/mixins-map.json +484 -479
- package/src/styles/mixins-map.scss +1 -1
- package/src/styles/themes/_theme.scss +230 -211
- package/src/styles/tools/_accessibility.scss +50 -0
- package/src/styles/tools/_container-queries.scss +98 -0
- package/src/styles/tools/_feature-support.scss +46 -0
- package/src/styles/tools/_media-queries.scss +70 -0
- package/src/styles/tools/_modern-layout.scss +49 -0
- package/src/styles/utilities/_alignment.scss +35 -34
- package/src/styles/utilities/_animations.scss +312 -311
- package/src/styles/utilities/_backdrop-filters.scss +194 -193
- package/src/styles/utilities/_borders.scss +243 -237
- package/src/styles/utilities/_colors.scss +16 -136
- package/src/styles/utilities/_cursor.scss +10 -10
- package/src/styles/utilities/_display.scss +192 -191
- package/src/styles/utilities/_helpers.scss +106 -106
- package/src/styles/utilities/_opacity.scss +27 -25
- package/src/styles/utilities/_position.scss +124 -121
- package/src/styles/utilities/_shadows.scss +171 -169
- package/src/styles/utilities/_sizing.scss +197 -194
- package/src/styles/utilities/_spacing.scss +231 -224
- package/src/styles/utilities/_transforms.scss +235 -234
- package/src/styles/utilities/_transitions.scss +136 -135
- package/src/styles/utilities/_typography.scss +242 -239
- package/src/styles/utilities/_z-index.scss +69 -68
- package/src/styles/abstracts/_config.scss +0 -253
- package/src/styles/abstracts/_functions.scss +0 -626
- package/src/styles/themes/refactored_borders.ipynb +0 -37
- package/src/styles/utilities/_container-queries.scss +0 -95
- package/src/styles/utilities/_media-queries.scss +0 -189
- package/src/styles/utilities/_tooltips.scss +0 -258
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
@use "sass:meta";
|
|
6
6
|
|
|
7
7
|
// Import variables
|
|
8
|
-
@use "../
|
|
9
|
-
@use "../
|
|
8
|
+
@use "../config/feature-flags" as config-flags;
|
|
9
|
+
@use "../config/breakpoints" as config-breakpoint;
|
|
10
|
+
@use "../functions/feature-flags" as fn-flags;
|
|
10
11
|
|
|
11
12
|
// Z-Index Utilities
|
|
12
13
|
// Classes:
|
|
@@ -17,121 +18,121 @@
|
|
|
17
18
|
|
|
18
19
|
// Z-index values map (can be moved to variables)
|
|
19
20
|
$z-indexes: (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
"auto": auto,
|
|
22
|
+
"0": 0,
|
|
23
|
+
"10": 10,
|
|
24
|
+
"20": 20,
|
|
25
|
+
"30": 30,
|
|
26
|
+
"40": 40,
|
|
27
|
+
"50": 50,
|
|
28
|
+
"60": 60,
|
|
29
|
+
"70": 70,
|
|
30
|
+
"80": 80,
|
|
31
|
+
"90": 90,
|
|
32
|
+
"100": 100,
|
|
33
|
+
"200": 200,
|
|
34
|
+
"500": 500,
|
|
35
|
+
"1000": 1000,
|
|
35
36
|
);
|
|
36
37
|
|
|
37
38
|
// Named z-index levels (can be moved to variables)
|
|
38
39
|
$z-index-levels: (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
"base": 0,
|
|
41
|
+
"hover": 10,
|
|
42
|
+
"dropdown": 100,
|
|
43
|
+
"sticky": 200,
|
|
44
|
+
"fixed": 300,
|
|
45
|
+
"overlay": 400,
|
|
46
|
+
"drawer": 500,
|
|
47
|
+
"modal": 600,
|
|
48
|
+
"popover": 700,
|
|
49
|
+
"tooltip": 800,
|
|
50
|
+
"toast": 900,
|
|
51
|
+
"max": 9999,
|
|
51
52
|
);
|
|
52
53
|
|
|
53
54
|
// Apply a z-index value
|
|
54
55
|
// @param {Number|String} $value - Z-index value or key
|
|
55
56
|
@mixin z-index($value) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
@if map.has-key($z-indexes, $value) {
|
|
58
|
+
z-index: map.get($z-indexes, $value);
|
|
59
|
+
} @else if map.has-key($z-index-levels, $value) {
|
|
60
|
+
z-index: map.get($z-index-levels, $value);
|
|
61
|
+
} @else {
|
|
62
|
+
z-index: $value;
|
|
63
|
+
}
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
// Generate z-index utility classes
|
|
66
67
|
// @param {String} $breakpoint - Optional breakpoint name for responsive variants
|
|
67
68
|
@mixin z-index-utilities($breakpoint: null) {
|
|
68
|
-
|
|
69
|
+
$suffix: if($breakpoint, "\\@#{$breakpoint}", "");
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
// Standard numbered z-index utilities
|
|
72
|
+
@each $key, $value in $z-indexes {
|
|
73
|
+
#{config-flags.$parent-selector} .z-#{$key}#{$suffix} {
|
|
74
|
+
@include z-index($key);
|
|
75
|
+
}
|
|
74
76
|
}
|
|
75
|
-
}
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
// Named semantic z-index utilities
|
|
79
|
+
@each $key, $value in $z-index-levels {
|
|
80
|
+
#{config-flags.$parent-selector} .z-#{$key}#{$suffix} {
|
|
81
|
+
@include z-index($value);
|
|
82
|
+
}
|
|
81
83
|
}
|
|
82
|
-
}
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
// Create specific named utilities as mixins for use in other files
|
|
86
87
|
@mixin z-base {
|
|
87
|
-
|
|
88
|
+
@include z-index("base");
|
|
88
89
|
}
|
|
89
90
|
@mixin z-hover {
|
|
90
|
-
|
|
91
|
+
@include z-index("hover");
|
|
91
92
|
}
|
|
92
93
|
@mixin z-dropdown {
|
|
93
|
-
|
|
94
|
+
@include z-index("dropdown");
|
|
94
95
|
}
|
|
95
96
|
@mixin z-sticky {
|
|
96
|
-
|
|
97
|
+
@include z-index("sticky");
|
|
97
98
|
}
|
|
98
99
|
@mixin z-fixed {
|
|
99
|
-
|
|
100
|
+
@include z-index("fixed");
|
|
100
101
|
}
|
|
101
102
|
@mixin z-drawer {
|
|
102
|
-
|
|
103
|
+
@include z-index("drawer");
|
|
103
104
|
}
|
|
104
105
|
@mixin z-modal {
|
|
105
|
-
|
|
106
|
+
@include z-index("modal");
|
|
106
107
|
}
|
|
107
108
|
@mixin z-popover {
|
|
108
|
-
|
|
109
|
+
@include z-index("popover");
|
|
109
110
|
}
|
|
110
111
|
@mixin z-tooltip {
|
|
111
|
-
|
|
112
|
+
@include z-index("tooltip");
|
|
112
113
|
}
|
|
113
114
|
@mixin z-overlay {
|
|
114
|
-
|
|
115
|
+
@include z-index("overlay");
|
|
115
116
|
}
|
|
116
117
|
@mixin z-toast {
|
|
117
|
-
|
|
118
|
+
@include z-index("toast");
|
|
118
119
|
}
|
|
119
120
|
@mixin z-max {
|
|
120
|
-
|
|
121
|
+
@include z-index("max");
|
|
121
122
|
}
|
|
122
123
|
@mixin z-auto {
|
|
123
|
-
|
|
124
|
+
@include z-index("auto");
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
// Generate utility classes
|
|
127
|
-
@if
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
@if fn-flags.feature-enabled("z-index") {
|
|
129
|
+
// Generate base utilities
|
|
130
|
+
@include z-index-utilities;
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
// Generate responsive variants
|
|
133
|
+
@each $breakpoint, $width in config-breakpoint.$breakpoints {
|
|
134
|
+
@media (min-width: #{$width}) {
|
|
135
|
+
@include z-index-utilities($breakpoint);
|
|
136
|
+
}
|
|
135
137
|
}
|
|
136
|
-
}
|
|
137
138
|
}
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
@use "sass:math";
|
|
3
|
-
@use "sass:list";
|
|
4
|
-
|
|
5
|
-
$feature-flags: (
|
|
6
|
-
"alignments": true,
|
|
7
|
-
"animations": true,
|
|
8
|
-
"backdrops": true,
|
|
9
|
-
"borders": true,
|
|
10
|
-
"container-queries": true,
|
|
11
|
-
"cursors": true,
|
|
12
|
-
"displays": true,
|
|
13
|
-
"flex": true,
|
|
14
|
-
"grid": true,
|
|
15
|
-
"opacity": true,
|
|
16
|
-
"position": true,
|
|
17
|
-
"shadows": true,
|
|
18
|
-
"sizing": true,
|
|
19
|
-
"spacing": true,
|
|
20
|
-
"tooltips": true,
|
|
21
|
-
"theme": true,
|
|
22
|
-
"transforms": true,
|
|
23
|
-
"transitions": true,
|
|
24
|
-
"typography": true,
|
|
25
|
-
"z-index": true,
|
|
26
|
-
) !default;
|
|
27
|
-
|
|
28
|
-
// Framework Configuration Options
|
|
29
|
-
$generate-utility-classes: false !default;
|
|
30
|
-
$enable-dark-mode: true !default;
|
|
31
|
-
|
|
32
|
-
$enable-debugger: false !default;
|
|
33
|
-
|
|
34
|
-
// if just a number passed, it will be assumed as px
|
|
35
|
-
$default-unit: px !default;
|
|
36
|
-
|
|
37
|
-
// Text
|
|
38
|
-
$base-size: 16px !default;
|
|
39
|
-
$font-family:
|
|
40
|
-
system-ui,
|
|
41
|
-
-apple-system,
|
|
42
|
-
"BlinkMacSystemFont",
|
|
43
|
-
"Segoe UI",
|
|
44
|
-
"Roboto",
|
|
45
|
-
"Oxygen",
|
|
46
|
-
"Ubuntu",
|
|
47
|
-
"Cantarell",
|
|
48
|
-
sans-serif !default;
|
|
49
|
-
|
|
50
|
-
// Global variables that might be used across different modules
|
|
51
|
-
$column-count: 12 !default; // todo: pending
|
|
52
|
-
|
|
53
|
-
$default-container-name: nuvoui-container !default; // todo: pending
|
|
54
|
-
|
|
55
|
-
// Accessible color palette
|
|
56
|
-
$primary: #007bff !default;
|
|
57
|
-
$secondary: #6c757d !default;
|
|
58
|
-
$success: #28a745 !default;
|
|
59
|
-
$danger: #dc3545 !default;
|
|
60
|
-
$warning: #ffc107 !default;
|
|
61
|
-
$info: #17a2b8 !default;
|
|
62
|
-
|
|
63
|
-
// Color palette
|
|
64
|
-
$color-primitives: (
|
|
65
|
-
"gray": #6b7280,
|
|
66
|
-
"red": #ef4444,
|
|
67
|
-
"blue": #3b82f6,
|
|
68
|
-
"green": #22c55e,
|
|
69
|
-
"yellow": #eab308,
|
|
70
|
-
"purple": #a855f7,
|
|
71
|
-
"pink": #ec4899,
|
|
72
|
-
) !default;
|
|
73
|
-
|
|
74
|
-
// Default theme config (can be overridden)
|
|
75
|
-
$light-theme: (
|
|
76
|
-
"bg-base": #fbfafc,
|
|
77
|
-
"bg-alternate": #1a1a1a,
|
|
78
|
-
"bg-surface": #fff,
|
|
79
|
-
"border-base": #d3d5d9,
|
|
80
|
-
"text-color": #1a1a1a,
|
|
81
|
-
"text-muted": #1a1a1a8a,
|
|
82
|
-
"text-subtle": #1a1a1a50,
|
|
83
|
-
"text-inverted": #f1f1f1,
|
|
84
|
-
) !default;
|
|
85
|
-
|
|
86
|
-
// Extract theme tokens from light theme keys
|
|
87
|
-
// Users can still override this if they want to use only a subset
|
|
88
|
-
$theme-tokens: map.keys($light-theme) !default;
|
|
89
|
-
|
|
90
|
-
$dark-theme: (
|
|
91
|
-
"bg-base": #1a1a1a,
|
|
92
|
-
"bg-alternate": #f1f1f1,
|
|
93
|
-
"bg-surface": #2e2e2e,
|
|
94
|
-
"border-base": #2e2e2e,
|
|
95
|
-
"text-color": #f1f1f1,
|
|
96
|
-
"text-muted": #f1f1f18a,
|
|
97
|
-
"text-subtle": #f1f1f150,
|
|
98
|
-
"text-inverted": #1a1a1a,
|
|
99
|
-
) !default;
|
|
100
|
-
|
|
101
|
-
$basic-colors: (
|
|
102
|
-
"black": #000,
|
|
103
|
-
"white": #fff,
|
|
104
|
-
"transparent": transparent,
|
|
105
|
-
) !default;
|
|
106
|
-
|
|
107
|
-
$semantic-colors: ("primary", "secondary", "success", "danger", "warning", "info");
|
|
108
|
-
$primitive-color-names: map.keys($color-primitives);
|
|
109
|
-
$color-names: list.join($semantic-colors, $primitive-color-names);
|
|
110
|
-
$color-names-with-basic: list.join($color-names, map.keys($basic-colors));
|
|
111
|
-
|
|
112
|
-
@function validate-theme-tokens($theme-map, $required-tokens) {
|
|
113
|
-
$missing-tokens: ();
|
|
114
|
-
|
|
115
|
-
@each $token in $required-tokens {
|
|
116
|
-
@if not map.has-key($theme-map, $token) {
|
|
117
|
-
$missing-tokens: list.append($missing-tokens, $token, comma);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
@if list.length($missing-tokens) > 0 {
|
|
122
|
-
@error "Theme is missing required tokens: #{$missing-tokens}";
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
@return list.length($missing-tokens) == 0;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// Validate both themes
|
|
129
|
-
@mixin validate-tokens {
|
|
130
|
-
@if not validate-theme-tokens($light-theme, $theme-tokens) {
|
|
131
|
-
@error "Light theme is missing required tokens.";
|
|
132
|
-
}
|
|
133
|
-
@if not validate-theme-tokens($dark-theme, $theme-tokens) {
|
|
134
|
-
@error "Dark theme is missing required tokens.";
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@include validate-tokens;
|
|
139
|
-
|
|
140
|
-
$shadow-colors: (
|
|
141
|
-
"default": rgb(0 0 0 / 10%),
|
|
142
|
-
"dark": rgb(0 0 0 / 20%),
|
|
143
|
-
"darker": rgb(0 0 0 / 35%),
|
|
144
|
-
"darkest": rgb(0 0 0 / 50%),
|
|
145
|
-
) !default;
|
|
146
|
-
|
|
147
|
-
// Breakpoints
|
|
148
|
-
$breakpoints: (
|
|
149
|
-
"xs": 480px,
|
|
150
|
-
"sm": 640px,
|
|
151
|
-
"md": 768px,
|
|
152
|
-
"lg": 1024px,
|
|
153
|
-
"xl": 1280px,
|
|
154
|
-
"2xl": 1536px,
|
|
155
|
-
) !default;
|
|
156
|
-
|
|
157
|
-
$grid-item-sizes: (
|
|
158
|
-
"xs": 200px,
|
|
159
|
-
"sm": 250px,
|
|
160
|
-
"md": 300px,
|
|
161
|
-
"lg": 350px,
|
|
162
|
-
"xl": 400px,
|
|
163
|
-
) !default;
|
|
164
|
-
|
|
165
|
-
// _variables.scss
|
|
166
|
-
$font-sizes: (
|
|
167
|
-
"xs": 0.75rem,
|
|
168
|
-
// 12px
|
|
169
|
-
"sm": 0.875rem,
|
|
170
|
-
// 14px
|
|
171
|
-
"md": 1rem,
|
|
172
|
-
"base": 1rem,
|
|
173
|
-
// 16px
|
|
174
|
-
"lg": 1.25rem,
|
|
175
|
-
// 20px
|
|
176
|
-
"xl": 1.5rem,
|
|
177
|
-
// 24px
|
|
178
|
-
"2xl": 1.75rem,
|
|
179
|
-
// 28px
|
|
180
|
-
"3xl": 2rem,
|
|
181
|
-
// 32px
|
|
182
|
-
"4xl": 2.5rem, // 40px
|
|
183
|
-
) !default;
|
|
184
|
-
|
|
185
|
-
// Updated spacing map
|
|
186
|
-
$spacings: (
|
|
187
|
-
0: 0,
|
|
188
|
-
1: 0.25rem,
|
|
189
|
-
// 4px
|
|
190
|
-
2: 0.5rem,
|
|
191
|
-
// 8px
|
|
192
|
-
3: 0.75rem,
|
|
193
|
-
// 12px
|
|
194
|
-
4: 1rem,
|
|
195
|
-
// 16px
|
|
196
|
-
5: 1.25rem,
|
|
197
|
-
// 20px
|
|
198
|
-
6: 1.5rem,
|
|
199
|
-
// 24px
|
|
200
|
-
8: 2rem,
|
|
201
|
-
// 32px
|
|
202
|
-
10: 2.5rem,
|
|
203
|
-
// 40px
|
|
204
|
-
12: 3rem,
|
|
205
|
-
// 48px
|
|
206
|
-
16: 4rem,
|
|
207
|
-
// 64px
|
|
208
|
-
20: 5rem,
|
|
209
|
-
// 80px
|
|
210
|
-
24: 6rem,
|
|
211
|
-
// 96px
|
|
212
|
-
32: 8rem,
|
|
213
|
-
// 128px
|
|
214
|
-
40: 10rem,
|
|
215
|
-
// 160px
|
|
216
|
-
48: 12rem,
|
|
217
|
-
// 192px
|
|
218
|
-
56: 14rem,
|
|
219
|
-
// 224px
|
|
220
|
-
64: 16rem, // 256px
|
|
221
|
-
) !default;
|
|
222
|
-
|
|
223
|
-
$percentages: (0, 5, 10, 20, 25, 30, 33, 40, 50, 60, 66, 70, 75, 80, 90, 100) !default;
|
|
224
|
-
|
|
225
|
-
// Common border width values that are most useful
|
|
226
|
-
$border-widths: (0, 1, 2, 4, 8) !default;
|
|
227
|
-
|
|
228
|
-
// Common border radius values that are most useful
|
|
229
|
-
$border-radii: (
|
|
230
|
-
"xs": 0.25rem,
|
|
231
|
-
"sm": 0.375rem,
|
|
232
|
-
"md": 0.5rem,
|
|
233
|
-
"lg": 0.75rem,
|
|
234
|
-
"xl": 1rem,
|
|
235
|
-
"2xl": 1.25rem,
|
|
236
|
-
"full": 50%,
|
|
237
|
-
"none": 0,
|
|
238
|
-
) !default;
|
|
239
|
-
|
|
240
|
-
// Font weight map
|
|
241
|
-
$font-weights: (
|
|
242
|
-
"thin": 100,
|
|
243
|
-
"extralight": 200,
|
|
244
|
-
"light": 300,
|
|
245
|
-
"normal": 400,
|
|
246
|
-
"medium": 500,
|
|
247
|
-
"semibold": 600,
|
|
248
|
-
"bold": 700,
|
|
249
|
-
"extrabold": 800,
|
|
250
|
-
"black": 900,
|
|
251
|
-
) !default;
|
|
252
|
-
|
|
253
|
-
$parent-selector: "" !default;
|