@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
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:math";
|
|
3
|
+
|
|
4
|
+
// Framework Configuration Options
|
|
5
|
+
$generate-utility-classes: true !default;
|
|
6
|
+
$enable-dark-mode: true !default;
|
|
7
|
+
$enable-rtl: true !default;
|
|
8
|
+
$enable-reduced-motion: true !default;
|
|
9
|
+
$enable-container-queries: false !default;
|
|
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)));
|
|
20
|
+
|
|
21
|
+
@return math.div($value, $base-size) * 1rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Global variables that might be used across different modules
|
|
25
|
+
$enable-debuger: false !default;
|
|
26
|
+
$enable-dark-mode: true !default;
|
|
27
|
+
$enable-rtl: true !default;
|
|
28
|
+
$enable-reduced-motion: true !default;
|
|
29
|
+
$column-count: 12 !default;
|
|
30
|
+
|
|
31
|
+
$default-container-name: nuvoui-container !default;
|
|
32
|
+
$nuvoui-container-queries: false !default;
|
|
33
|
+
|
|
34
|
+
$primary: #007bff !default;
|
|
35
|
+
$secondary: #6c757d !default;
|
|
36
|
+
$success: #28a745 !default;
|
|
37
|
+
$danger: #dc3545 !default;
|
|
38
|
+
$warning: #ffc107 !default;
|
|
39
|
+
$info: #17a2b8 !default;
|
|
40
|
+
|
|
41
|
+
$color-primitives: (
|
|
42
|
+
"gray": #6b7280,
|
|
43
|
+
"red": #ef4444,
|
|
44
|
+
"blue": #3b82f6,
|
|
45
|
+
"green": #22c55e,
|
|
46
|
+
"yellow": #eab308,
|
|
47
|
+
"purple": #a855f7,
|
|
48
|
+
"pink": #ec4899,
|
|
49
|
+
) !default;
|
|
50
|
+
|
|
51
|
+
$theme-tokens: ("background", "foreground", "surface", "border", "text-primary", "text-secondary") !default;
|
|
52
|
+
|
|
53
|
+
// Default theme config (can be overridden)
|
|
54
|
+
$light-theme: (
|
|
55
|
+
"background": #fafafa,
|
|
56
|
+
"foreground": #1a1a1a,
|
|
57
|
+
"surface": #fff,
|
|
58
|
+
"border": #e5e7eb,
|
|
59
|
+
"text-primary": #1a1a1a,
|
|
60
|
+
"text-secondary": #4b5563,
|
|
61
|
+
) !default;
|
|
62
|
+
|
|
63
|
+
$dark-theme: (
|
|
64
|
+
"background": #1a1a1a,
|
|
65
|
+
"foreground": #f1f1f1,
|
|
66
|
+
"surface": #2e2e2e,
|
|
67
|
+
"border": #2e2e2e,
|
|
68
|
+
"text-primary": #f1f1f1,
|
|
69
|
+
"text-secondary": #a3a3a3,
|
|
70
|
+
) !default;
|
|
71
|
+
|
|
72
|
+
$shadow-colors: (
|
|
73
|
+
"default": rgb(0 0 0 / 10%),
|
|
74
|
+
"dark": rgb(0 0 0 / 20%),
|
|
75
|
+
"darker": rgb(0 0 0 / 35%),
|
|
76
|
+
"darkest": rgb(0 0 0 / 50%),
|
|
77
|
+
) !default;
|
|
78
|
+
|
|
79
|
+
// Breakpoints
|
|
80
|
+
$breakpoints: (
|
|
81
|
+
"xs": 480px,
|
|
82
|
+
"sm": 640px,
|
|
83
|
+
"md": 768px,
|
|
84
|
+
"lg": 1024px,
|
|
85
|
+
"xl": 1280px,
|
|
86
|
+
"2xl": 1536px,
|
|
87
|
+
) !default;
|
|
88
|
+
|
|
89
|
+
$grid-item-sizes: (
|
|
90
|
+
"xs": 200px,
|
|
91
|
+
"sm": 250px,
|
|
92
|
+
"md": 300px,
|
|
93
|
+
"lg": 350px,
|
|
94
|
+
"xl": 400px,
|
|
95
|
+
) !default;
|
|
96
|
+
|
|
97
|
+
// _variables.scss
|
|
98
|
+
$font-sizes: (
|
|
99
|
+
// 12px
|
|
100
|
+
"xs": 0.75rem,
|
|
101
|
+
// 14px
|
|
102
|
+
"sm": 0.875rem,
|
|
103
|
+
// 16px
|
|
104
|
+
"md": 1rem,
|
|
105
|
+
// 20px
|
|
106
|
+
"lg": 1.25rem,
|
|
107
|
+
// 24px
|
|
108
|
+
"xl": 1.5rem,
|
|
109
|
+
// 28px
|
|
110
|
+
"2xl": 1.75rem,
|
|
111
|
+
// 32px
|
|
112
|
+
"3xl": 2rem,
|
|
113
|
+
// 40px
|
|
114
|
+
"4xl": 2.5rem
|
|
115
|
+
) !default;
|
|
116
|
+
|
|
117
|
+
// Updated spacing map
|
|
118
|
+
$spacings: (
|
|
119
|
+
// 0rem
|
|
120
|
+
0: 0,
|
|
121
|
+
// 0.25rem
|
|
122
|
+
1: rem(4),
|
|
123
|
+
// 0.5rem
|
|
124
|
+
2: rem(8),
|
|
125
|
+
// 0.75rem
|
|
126
|
+
3: rem(12),
|
|
127
|
+
// 1rem
|
|
128
|
+
4: rem(16),
|
|
129
|
+
// 1.25rem
|
|
130
|
+
5: rem(20),
|
|
131
|
+
// 1.5rem
|
|
132
|
+
6: rem(24),
|
|
133
|
+
// 2rem
|
|
134
|
+
8: rem(32),
|
|
135
|
+
// 2.5rem
|
|
136
|
+
10: rem(40),
|
|
137
|
+
// 3rem
|
|
138
|
+
12: rem(48),
|
|
139
|
+
// 4rem
|
|
140
|
+
16: rem(64),
|
|
141
|
+
// 5rem
|
|
142
|
+
20: rem(80),
|
|
143
|
+
// 6rem
|
|
144
|
+
24: rem(96),
|
|
145
|
+
// 8rem
|
|
146
|
+
32: rem(128),
|
|
147
|
+
// 10rem
|
|
148
|
+
40: rem(160),
|
|
149
|
+
// 12rem
|
|
150
|
+
48: rem(192),
|
|
151
|
+
// 14rem
|
|
152
|
+
56: rem(224),
|
|
153
|
+
// 16rem
|
|
154
|
+
64: rem(256)
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
$percentages: (0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100) !default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@use "sass:string";
|
|
2
|
+
@use "sass:math";
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "sass:list";
|
|
5
|
+
@use "sass:meta";
|
|
6
|
+
@use "config" as *;
|
|
7
|
+
|
|
8
|
+
@function str-replace($string, $search, $replace: " ") {
|
|
9
|
+
$index: string.index($string, $search);
|
|
10
|
+
@if $index {
|
|
11
|
+
@return string.slice($string, 1, $index - 1) + $replace + str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
|
|
12
|
+
}
|
|
13
|
+
@return $string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@function get-breakpoint-value($bp) {
|
|
17
|
+
@if map.has-key($breakpoints, $bp) {
|
|
18
|
+
@return map.get($breakpoints, $bp);
|
|
19
|
+
} @else if meta.type-of($bp) == number {
|
|
20
|
+
@return $bp;
|
|
21
|
+
} @else {
|
|
22
|
+
@warn 'Invalid breakpoint: #{$bp}';
|
|
23
|
+
@return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@function strip-unit($value) {
|
|
28
|
+
@return math.div($value, ($value * 0 + 1));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@function safe-unit-name($unit) {
|
|
32
|
+
@if $unit == "%" {
|
|
33
|
+
@return "per";
|
|
34
|
+
} @else if $unit == "." {
|
|
35
|
+
@return "dot";
|
|
36
|
+
} @else {
|
|
37
|
+
@return $unit;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@function get-unit($value) {
|
|
42
|
+
$value-str: #{$value};
|
|
43
|
+
|
|
44
|
+
// Relative length units
|
|
45
|
+
@if string.index($value-str, "em") {
|
|
46
|
+
@return "em";
|
|
47
|
+
} @else if string.index($value-str, "rem") {
|
|
48
|
+
@return "rem";
|
|
49
|
+
} @else if string.index($value-str, "%") {
|
|
50
|
+
@return "%";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Viewport units
|
|
54
|
+
@else if string.index($value-str, "vw") {
|
|
55
|
+
@return "vw";
|
|
56
|
+
} @else if string.index($value-str, "vh") {
|
|
57
|
+
@return "vh";
|
|
58
|
+
} @else if string.index($value-str, "vmin") {
|
|
59
|
+
@return "vmin";
|
|
60
|
+
} @else if string.index($value-str, "vmax") {
|
|
61
|
+
@return "vmax";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Absolute length units
|
|
65
|
+
@else if string.index($value-str, "px") {
|
|
66
|
+
@return "px";
|
|
67
|
+
} @else if string.index($value-str, "cm") {
|
|
68
|
+
@return "cm";
|
|
69
|
+
} @else if string.index($value-str, "mm") {
|
|
70
|
+
@return "mm";
|
|
71
|
+
} @else if string.index($value-str, "in") {
|
|
72
|
+
@return "in";
|
|
73
|
+
} @else if string.index($value-str, "pt") {
|
|
74
|
+
@return "pt";
|
|
75
|
+
} @else if string.index($value-str, "pc") {
|
|
76
|
+
@return "pc";
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Return empty string if no unit found
|
|
80
|
+
@return "";
|
|
81
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
|
|
3
3
|
/* Import variables */
|
|
4
|
-
@use '../
|
|
4
|
+
@use '../abstracts' as *;
|
|
5
5
|
@use '../utilities/media-queries' as media;
|
|
6
6
|
|
|
7
7
|
:root {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
// Base typography styles
|
|
12
12
|
html {
|
|
13
|
-
font-size: 16px;
|
|
13
|
+
font-size: 16px;
|
|
14
14
|
font-family: var(--font-family-base);
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// Modern CSS Reset
|
|
2
2
|
|
|
3
3
|
// Box sizing rules
|
|
4
|
-
*,
|
|
4
|
+
*,
|
|
5
|
+
*::before,
|
|
6
|
+
*::after {
|
|
5
7
|
box-sizing: border-box;
|
|
6
8
|
margin: 0;
|
|
7
9
|
padding: 0;
|
|
@@ -32,7 +34,7 @@ body {
|
|
|
32
34
|
line-height: 1.5;
|
|
33
35
|
-webkit-font-smoothing: antialiased;
|
|
34
36
|
-moz-osx-font-smoothing: grayscale;
|
|
35
|
-
font-family:
|
|
37
|
+
font-family: var(--font-family-base);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
// Make images easier to work with
|
|
@@ -72,10 +74,10 @@ ol {
|
|
|
72
74
|
list-style: none;
|
|
73
75
|
margin: 0;
|
|
74
76
|
padding: 0;
|
|
75
|
-
|
|
77
|
+
|
|
76
78
|
// Modern properties
|
|
77
|
-
padding-inline-start: 0;
|
|
78
|
-
margin-block: 0;
|
|
79
|
+
padding-inline-start: 0; // Replaces padding-left
|
|
80
|
+
margin-block: 0; // Replaces margin-top/bottom
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
li {
|
|
@@ -99,4 +101,4 @@ a {
|
|
|
99
101
|
// Make sure textareas without a rows attribute are not tiny
|
|
100
102
|
textarea:not([rows]) {
|
|
101
103
|
min-height: 10em;
|
|
102
|
-
}
|
|
104
|
+
}
|
package/src/styles/index.scss
CHANGED
|
@@ -1,35 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
@forward
|
|
1
|
+
// Import abstracts first (configuration)
|
|
2
|
+
@forward "abstracts";
|
|
3
3
|
|
|
4
|
-
//
|
|
5
|
-
@forward
|
|
6
|
-
@forward 'base/base';
|
|
4
|
+
// Import base styles
|
|
5
|
+
@forward "base";
|
|
7
6
|
|
|
8
|
-
//
|
|
9
|
-
@forward
|
|
10
|
-
@forward 'layouts/flex';
|
|
11
|
-
@forward 'layouts/grid';
|
|
7
|
+
// Import themes
|
|
8
|
+
@forward "themes";
|
|
12
9
|
|
|
13
|
-
//
|
|
14
|
-
@forward
|
|
15
|
-
@forward 'utilities/animations';
|
|
16
|
-
@forward 'utilities/borders';
|
|
17
|
-
@forward 'utilities/colors';
|
|
18
|
-
@forward 'utilities/opacity';
|
|
19
|
-
@forward 'utilities/position';
|
|
20
|
-
@forward 'utilities/media-queries';
|
|
21
|
-
@forward 'utilities/shadows';
|
|
22
|
-
@forward 'utilities/sizing';
|
|
23
|
-
@forward 'utilities/spacing';
|
|
24
|
-
@forward 'utilities/transitions';
|
|
25
|
-
@forward 'utilities/typography';
|
|
26
|
-
@forward 'utilities/tooltips';
|
|
27
|
-
@forward 'utilities/display';
|
|
10
|
+
// Import layout components
|
|
11
|
+
@forward "layouts";
|
|
28
12
|
|
|
29
|
-
|
|
13
|
+
// Import utilities based on configuration
|
|
14
|
+
@forward "utilities";
|
|
30
15
|
|
|
31
|
-
|
|
32
|
-
// Theme
|
|
33
|
-
@forward 'themes/theme';
|
|
34
|
-
|
|
35
|
-
@forward './mixins-map';
|
|
16
|
+
@forward "./mixins-map";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../abstracts/config" as VAR;
|
|
3
3
|
|
|
4
4
|
// Base container styles
|
|
5
5
|
@mixin container-base {
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
// Responsive container mixin
|
|
20
19
|
@mixin container($display: block) {
|
|
21
20
|
display: $display;
|
|
@@ -32,21 +31,3 @@
|
|
|
32
31
|
.container {
|
|
33
32
|
@include container;
|
|
34
33
|
}
|
|
35
|
-
|
|
36
|
-
.container-flex {
|
|
37
|
-
@include container(flex);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.container-grid {
|
|
41
|
-
@include container(grid);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.container-fluid {
|
|
45
|
-
@include container-base;
|
|
46
|
-
@include container-padding(1rem);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.container-no-padding {
|
|
50
|
-
@include container;
|
|
51
|
-
@include container-padding(0);
|
|
52
|
-
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Section: Layout
|
|
2
2
|
// Module: Flex | Flex Inline
|
|
3
|
+
// Note: Gap utilities are defined in _spacing.scss
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @component Flex
|
|
@@ -44,8 +45,8 @@
|
|
|
44
45
|
|
|
45
46
|
@use 'sass:math';
|
|
46
47
|
@use '../utilities/media-queries' as MC;
|
|
47
|
-
@use '../
|
|
48
|
-
@use '../
|
|
48
|
+
@use '../abstracts' as VAR;
|
|
49
|
+
@use '../abstracts/functions' as FN;
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* @description Establishes a flex container.
|
|
@@ -312,7 +313,7 @@
|
|
|
312
313
|
&.wrap { flex-wrap: wrap; }
|
|
313
314
|
&.nowrap { flex-wrap: nowrap; }
|
|
314
315
|
&.wrap-reverse { flex-wrap: wrap-reverse; }
|
|
315
|
-
|
|
316
|
+
|
|
316
317
|
// Justify modifiers
|
|
317
318
|
&.start { justify-content: flex-start; }
|
|
318
319
|
&.end { justify-content: flex-end; }
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Section: Layout
|
|
2
2
|
// Module: Grid | Grid Inline
|
|
3
|
+
// Note: Gap utilities are defined in _spacing.scss
|
|
3
4
|
|
|
4
5
|
@use 'sass:math';
|
|
5
|
-
@use '../
|
|
6
|
-
@use '../
|
|
6
|
+
@use '../abstracts/functions' as FN;
|
|
7
|
+
@use '../abstracts' as VAR;
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @description Establishes a grid container.
|
|
@@ -87,10 +88,6 @@
|
|
|
87
88
|
grid-row: $row;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
@mixin grid-gap($value) { gap: $value; }
|
|
91
|
-
@mixin col-gap($value) { column-gap: $value; }
|
|
92
|
-
@mixin row-gap($value) { row-gap: $value; }
|
|
93
|
-
|
|
94
91
|
// Classes
|
|
95
92
|
.grid { @include grid; }
|
|
96
93
|
.grid.inline { @include grid-inline; }
|
|
@@ -113,35 +110,6 @@
|
|
|
113
110
|
}
|
|
114
111
|
|
|
115
112
|
|
|
116
|
-
// Add corresponding classes
|
|
117
|
-
.grid-gap-1 { @include grid-gap(0.25rem); }
|
|
118
|
-
.grid-gap-2 { @include grid-gap(0.5rem); }
|
|
119
|
-
.grid-gap-4 { @include grid-gap(1rem); }
|
|
120
|
-
.col-gap-1 { @include col-gap(0.25rem); }
|
|
121
|
-
.col-gap-2 { @include col-gap(0.5rem); }
|
|
122
|
-
.col-gap-4 { @include col-gap(1rem); }
|
|
123
|
-
.row-gap-1 { @include row-gap(0.25rem); }
|
|
124
|
-
.row-gap-2 { @include row-gap(0.5rem); }
|
|
125
|
-
.row-gap-4 { @include row-gap(1rem); }
|
|
126
|
-
|
|
127
|
-
// Responsive grid gaps
|
|
128
|
-
@each $breakpoint, $width in VAR.$breakpoints {
|
|
129
|
-
@media (min-width: #{$width}) {
|
|
130
|
-
.grid-gap-1\@#{$breakpoint} { @include grid-gap(0.25rem); }
|
|
131
|
-
.grid-gap-2\@#{$breakpoint} { @include grid-gap(0.5rem); }
|
|
132
|
-
.grid-gap-4\@#{$breakpoint} { @include grid-gap(1rem); }
|
|
133
|
-
|
|
134
|
-
.col-gap-1\@#{$breakpoint} { @include col-gap(0.25rem); }
|
|
135
|
-
.col-gap-2\@#{$breakpoint} { @include col-gap(0.5rem); }
|
|
136
|
-
.col-gap-4\@#{$breakpoint} { @include col-gap(1rem); }
|
|
137
|
-
|
|
138
|
-
.row-gap-1\@#{$breakpoint} { @include row-gap(0.25rem); }
|
|
139
|
-
.row-gap-2\@#{$breakpoint} { @include row-gap(0.5rem); }
|
|
140
|
-
.row-gap-4\@#{$breakpoint} { @include row-gap(1rem); }
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
113
|
// Generate Column Span Classes with Responsive Variants
|
|
146
114
|
@for $i from 1 through VAR.$column-count {
|
|
147
115
|
.span-col-#{$i} {
|