@nuvoui/core 1.1.7 → 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 -28
- package/src/styles/layouts/_container.scss +14 -22
- package/src/styles/layouts/_flex.scss +60 -18
- package/src/styles/layouts/_grid.scss +36 -28
- package/src/styles/layouts/_index.scss +3 -0
- package/src/styles/mixins-map.scss +877 -1225
- package/src/styles/themes/_index.scss +1 -0
- package/src/styles/themes/_theme.scss +175 -57
- package/src/styles/utilities/_alignment.scss +20 -0
- 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 +46 -7
- package/src/styles/utilities/_display.scss +57 -3
- package/src/styles/utilities/_helpers.scss +110 -108
- package/src/styles/utilities/_index.scss +19 -0
- package/src/styles/utilities/_media-queries.scss +54 -19
- package/src/styles/utilities/_opacity.scss +110 -8
- package/src/styles/utilities/_position.scss +177 -71
- package/src/styles/utilities/_shadows.scss +194 -67
- package/src/styles/utilities/_sizing.scss +62 -57
- package/src/styles/utilities/_spacing.scss +331 -64
- package/src/styles/utilities/_tooltips.scss +153 -105
- package/src/styles/utilities/_transitions.scss +152 -0
- package/src/styles/utilities/_typography.scss +113 -89
- package/src/styles/utilities/_functions.scss +0 -84
- package/src/styles/utilities/_variables.scss +0 -98
|
@@ -4,16 +4,39 @@
|
|
|
4
4
|
@use 'sass:map';
|
|
5
5
|
|
|
6
6
|
// Import variables
|
|
7
|
-
@use '../
|
|
7
|
+
@use '../abstracts' as VAR;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Typography Utilities
|
|
12
|
+
*
|
|
13
|
+
* Classes:
|
|
14
|
+
* - Font Size: .text-xs, .text-sm, .text-base, etc.
|
|
15
|
+
* - Font Weight: .font-thin, .font-normal, .font-bold, etc.
|
|
16
|
+
* - Line Height: .leading-none, .leading-tight, .leading-normal, etc.
|
|
17
|
+
* - Text Align: .text-left, .text-center, .text-right, .text-justify
|
|
18
|
+
* - Text Transform: .uppercase, .lowercase, .capitalize, .normal-case
|
|
19
|
+
* - Text Style: .italic, .not-italic
|
|
20
|
+
* - Text Decoration: .underline, .line-through, .no-underline
|
|
21
|
+
* - Text Overflow: .truncate
|
|
22
|
+
*
|
|
23
|
+
* All utilities support responsive variants with @breakpoint suffix:
|
|
24
|
+
* - .text-lg@md, .font-bold@lg, etc.
|
|
25
|
+
*/
|
|
8
26
|
|
|
9
27
|
// Utilities for text sizes
|
|
10
28
|
|
|
11
29
|
/**
|
|
12
30
|
* Text size utility
|
|
13
31
|
* @param {string} $size - The size of the text.
|
|
14
|
-
*/
|
|
32
|
+
*/
|
|
15
33
|
@mixin text-size($size) {
|
|
16
|
-
|
|
34
|
+
@if map.has-key(VAR.$font-sizes, $size) {
|
|
35
|
+
font-size: map.get(VAR.$font-sizes, $size);
|
|
36
|
+
} @else {
|
|
37
|
+
font-size: $size;
|
|
38
|
+
}
|
|
39
|
+
|
|
17
40
|
}
|
|
18
41
|
|
|
19
42
|
// Font weights
|
|
@@ -60,98 +83,99 @@
|
|
|
60
83
|
// Text overflow mixin
|
|
61
84
|
@mixin truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
62
85
|
|
|
86
|
+
@mixin truncate-lines($lines: 2) {
|
|
87
|
+
display: -webkit-box;
|
|
88
|
+
-webkit-line-clamp: $lines;
|
|
89
|
+
-webkit-box-orient: vertical;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
text-overflow: ellipsis;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
@mixin break-normal { overflow-wrap: normal; word-break: normal; }
|
|
96
|
+
@mixin break-words { overflow-wrap: break-word; }
|
|
97
|
+
@mixin break-all { word-break: break-all; }
|
|
98
|
+
@mixin whitespace-normal { white-space: normal; }
|
|
99
|
+
@mixin whitespace-nowrap { white-space: nowrap; }
|
|
100
|
+
@mixin whitespace-pre { white-space: pre; }
|
|
101
|
+
@mixin whitespace-pre-line { white-space: pre-line; }
|
|
102
|
+
@mixin whitespace-pre-wrap { white-space: pre-wrap; }
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@mixin responsive-typography($breakpoint: null) {
|
|
110
|
+
$suffix: if($breakpoint, "\\@#{$breakpoint}", "");
|
|
111
|
+
|
|
112
|
+
@each $size, $val in VAR.$font-sizes {
|
|
113
|
+
.text-#{$size}#{$suffix} { @include text-size($size); }
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Generate font weight utilities
|
|
117
|
+
.font-thin#{$suffix} { @include font-thin; }
|
|
118
|
+
.font-extralight#{$suffix} { @include font-extralight; }
|
|
119
|
+
.font-light#{$suffix} { @include font-light; }
|
|
120
|
+
.font-normal#{$suffix} { @include font-normal; }
|
|
121
|
+
.font-medium#{$suffix} { @include font-medium; }
|
|
122
|
+
.font-semibold#{$suffix} { @include font-semibold; }
|
|
123
|
+
.font-bold#{$suffix} { @include font-bold; }
|
|
124
|
+
.font-extrabold#{$suffix} { @include font-extrabold; }
|
|
125
|
+
.font-black#{$suffix} { @include font-black; }
|
|
126
|
+
|
|
127
|
+
// Generate line height utilities
|
|
128
|
+
.leading-none#{$suffix} { @include leading-none; }
|
|
129
|
+
.leading-tight#{$suffix} { @include leading-tight; }
|
|
130
|
+
.leading-snug#{$suffix} { @include leading-snug; }
|
|
131
|
+
.leading-normal#{$suffix} { @include leading-normal; }
|
|
132
|
+
.leading-relaxed#{$suffix} { @include leading-relaxed; }
|
|
133
|
+
.leading-loose#{$suffix} { @include leading-loose; }
|
|
134
|
+
|
|
135
|
+
// Generate text alignment utilities
|
|
136
|
+
.text-left#{$suffix} { @include text-left; }
|
|
137
|
+
.text-center#{$suffix} { @include text-center; }
|
|
138
|
+
.text-right#{$suffix} { @include text-right; }
|
|
139
|
+
.text-justify#{$suffix} { @include text-justify; }
|
|
140
|
+
|
|
141
|
+
// Classes using mixins
|
|
142
|
+
.uppercase#{$suffix} { @include uppercase; }
|
|
143
|
+
.lowercase#{$suffix} { @include lowercase; }
|
|
144
|
+
.capitalize#{$suffix} { @include capitalize; }
|
|
145
|
+
.normal-case#{$suffix} { @include normal-case; }
|
|
146
|
+
|
|
147
|
+
.italic#{$suffix} { @include italic; }
|
|
148
|
+
.not-italic#{$suffix} { @include not-italic; }
|
|
149
|
+
|
|
150
|
+
.underline#{$suffix} { @include underline; }
|
|
151
|
+
.line-through#{$suffix} { @include line-through; }
|
|
152
|
+
.no-underline#{$suffix} { @include no-underline; }
|
|
153
|
+
|
|
154
|
+
.truncate#{$suffix} { @include truncate; }
|
|
155
|
+
|
|
156
|
+
.truncate-2#{$suffix} { @include truncate-lines(2); }
|
|
157
|
+
.truncate-3#{$suffix} { @include truncate-lines(3); }
|
|
158
|
+
.truncate-4#{$suffix} { @include truncate-lines(4); }
|
|
159
|
+
.truncate-5#{$suffix} { @include truncate-lines(5); }
|
|
63
160
|
|
|
64
|
-
@each $size, $val in $font-sizes {
|
|
65
|
-
.text-#{$size} { @include text-size($size); }
|
|
66
161
|
}
|
|
67
162
|
|
|
68
|
-
|
|
69
|
-
.
|
|
70
|
-
.
|
|
71
|
-
.
|
|
72
|
-
.
|
|
73
|
-
.
|
|
74
|
-
.
|
|
75
|
-
.
|
|
76
|
-
.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
// Generate line height utilities
|
|
80
|
-
.leading-none { @include leading-none; }
|
|
81
|
-
.leading-tight { @include leading-tight; }
|
|
82
|
-
.leading-snug { @include leading-snug; }
|
|
83
|
-
.leading-normal { @include leading-normal; }
|
|
84
|
-
.leading-relaxed { @include leading-relaxed; }
|
|
85
|
-
.leading-loose { @include leading-loose; }
|
|
86
|
-
|
|
87
|
-
// Generate text alignment utilities
|
|
88
|
-
.text-left { @include text-left; }
|
|
89
|
-
.text-center { @include text-center; }
|
|
90
|
-
.text-right { @include text-right; }
|
|
91
|
-
.text-justify { @include text-justify; }
|
|
92
|
-
|
|
93
|
-
// Classes using mixins
|
|
94
|
-
.uppercase { @include uppercase; }
|
|
95
|
-
.lowercase { @include lowercase; }
|
|
96
|
-
.capitalize { @include capitalize; }
|
|
97
|
-
.normal-case { @include normal-case; }
|
|
98
|
-
|
|
99
|
-
.italic { @include italic; }
|
|
100
|
-
.not-italic { @include not-italic; }
|
|
101
|
-
|
|
102
|
-
.underline { @include underline; }
|
|
103
|
-
.line-through { @include line-through; }
|
|
104
|
-
.no-underline { @include no-underline; }
|
|
105
|
-
|
|
106
|
-
.truncate { @include truncate; }
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
@each $breakpoint, $width in $breakpoints {
|
|
163
|
+
@include responsive-typography;
|
|
164
|
+
.break-normal { @include break-normal; }
|
|
165
|
+
.break-words { @include break-words; }
|
|
166
|
+
.break-all { @include break-all; }
|
|
167
|
+
.whitespace-normal { @include whitespace-normal; }
|
|
168
|
+
.whitespace-nowrap { @include whitespace-nowrap; }
|
|
169
|
+
.whitespace-pre { @include whitespace-pre; }
|
|
170
|
+
.whitespace-pre-line { @include whitespace-pre-line; }
|
|
171
|
+
.whitespace-pre-wrap { @include whitespace-pre-wrap; }
|
|
172
|
+
|
|
173
|
+
@each $breakpoint, $width in VAR.$breakpoints {
|
|
110
174
|
@media (min-width: #{$width}) {
|
|
111
|
-
@each $size, $val in
|
|
112
|
-
// .text-#{$size}\@#{$breakpoint} { @include text-size($size); }
|
|
175
|
+
@each $size, $val in VAR.$font-sizes {
|
|
113
176
|
.text-#{$size}\@#{$breakpoint} { @include text-size($size); }
|
|
114
177
|
}
|
|
115
|
-
|
|
116
|
-
// Generate font weight utilities
|
|
117
|
-
.font-thin\@#{$breakpoint} { @include font-thin; }
|
|
118
|
-
.font-extralight\@#{$breakpoint} { @include font-extralight; }
|
|
119
|
-
.font-light\@#{$breakpoint} { @include font-light; }
|
|
120
|
-
.font-normal\@#{$breakpoint} { @include font-normal; }
|
|
121
|
-
.font-medium\@#{$breakpoint} { @include font-medium; }
|
|
122
|
-
.font-semibold\@#{$breakpoint} { @include font-semibold; }
|
|
123
|
-
.font-bold\@#{$breakpoint} { @include font-bold; }
|
|
124
|
-
.font-extrabold\@#{$breakpoint} { @include font-extrabold; }
|
|
125
|
-
.font-black\@#{$breakpoint} { @include font-black; }
|
|
126
|
-
|
|
127
|
-
// Generate line height utilities
|
|
128
|
-
.leading-none\@#{$breakpoint} { @include leading-none; }
|
|
129
|
-
.leading-tight\@#{$breakpoint} { @include leading-tight; }
|
|
130
|
-
.leading-snug\@#{$breakpoint} { @include leading-snug; }
|
|
131
|
-
.leading-normal\@#{$breakpoint} { @include leading-normal; }
|
|
132
|
-
.leading-relaxed\@#{$breakpoint} { @include leading-relaxed; }
|
|
133
|
-
.leading-loose\@#{$breakpoint} { @include leading-loose; }
|
|
134
|
-
|
|
135
|
-
// Generate text alignment utilities
|
|
136
|
-
.text-left\@#{$breakpoint} { @include text-left; }
|
|
137
|
-
.text-center\@#{$breakpoint} { @include text-center; }
|
|
138
|
-
.text-right\@#{$breakpoint} { @include text-right; }
|
|
139
|
-
.text-justify\@#{$breakpoint} { @include text-justify; }
|
|
140
|
-
|
|
141
|
-
// Classes using mixins
|
|
142
|
-
.uppercase\@#{$breakpoint} { @include uppercase; }
|
|
143
|
-
.lowercase\@#{$breakpoint} { @include lowercase; }
|
|
144
|
-
.capitalize\@#{$breakpoint} { @include capitalize; }
|
|
145
|
-
.normal-case\@#{$breakpoint} { @include normal-case; }
|
|
146
|
-
|
|
147
|
-
.italic\@#{$breakpoint} { @include italic; }
|
|
148
|
-
.not-italic\@#{$breakpoint} { @include not-italic; }
|
|
149
|
-
|
|
150
|
-
.underline\@#{$breakpoint} { @include underline; }
|
|
151
|
-
.line-through\@#{$breakpoint} { @include line-through; }
|
|
152
|
-
.no-underline\@#{$breakpoint} { @include no-underline; }
|
|
153
|
-
|
|
154
|
-
.truncate\@#{$breakpoint} { @include truncate; }
|
|
178
|
+
@include responsive-typography($breakpoint);
|
|
155
179
|
}
|
|
156
180
|
}
|
|
157
181
|
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
@use 'sass:string';
|
|
2
|
-
@use 'sass:math';
|
|
3
|
-
@use 'sass:map';
|
|
4
|
-
@use 'sass:list';
|
|
5
|
-
@use 'sass:meta';
|
|
6
|
-
@use 'variables' 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)
|
|
12
|
-
+ $replace
|
|
13
|
-
+ str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
|
|
14
|
-
}
|
|
15
|
-
@return $string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@function get-breakpoint-value($bp) {
|
|
19
|
-
@if map.has-key($breakpoints, $bp) {
|
|
20
|
-
@return map.get($breakpoints, $bp);
|
|
21
|
-
} @else if meta.type-of($bp) == number {
|
|
22
|
-
@return $bp;
|
|
23
|
-
} @else {
|
|
24
|
-
@warn 'Invalid breakpoint: #{$bp}';
|
|
25
|
-
@return null;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@function strip-unit($value) {
|
|
30
|
-
@return math.div($value, ($value * 0 + 1));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@function safe-unit-name($unit) {
|
|
34
|
-
|
|
35
|
-
@if $unit == '%' {
|
|
36
|
-
@return 'per';
|
|
37
|
-
} @else if $unit == '.' {
|
|
38
|
-
@return 'dot';
|
|
39
|
-
} @else {
|
|
40
|
-
@return $unit;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@function get-unit($value) {
|
|
45
|
-
$value-str: #{$value};
|
|
46
|
-
|
|
47
|
-
// Relative length units
|
|
48
|
-
@if string.index($value-str, 'em') {
|
|
49
|
-
@return 'em';
|
|
50
|
-
} @else if string.index($value-str, 'rem') {
|
|
51
|
-
@return 'rem';
|
|
52
|
-
} @else if string.index($value-str, '%') {
|
|
53
|
-
@return '%';
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Viewport units
|
|
57
|
-
@else if string.index($value-str, 'vw') {
|
|
58
|
-
@return 'vw';
|
|
59
|
-
} @else if string.index($value-str, 'vh') {
|
|
60
|
-
@return 'vh';
|
|
61
|
-
} @else if string.index($value-str, 'vmin') {
|
|
62
|
-
@return 'vmin';
|
|
63
|
-
} @else if string.index($value-str, 'vmax') {
|
|
64
|
-
@return 'vmax';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Absolute length units
|
|
68
|
-
@else if string.index($value-str, 'px') {
|
|
69
|
-
@return 'px';
|
|
70
|
-
} @else if string.index($value-str, 'cm') {
|
|
71
|
-
@return 'cm';
|
|
72
|
-
} @else if string.index($value-str, 'mm') {
|
|
73
|
-
@return 'mm';
|
|
74
|
-
} @else if string.index($value-str, 'in') {
|
|
75
|
-
@return 'in';
|
|
76
|
-
} @else if string.index($value-str, 'pt') {
|
|
77
|
-
@return 'pt';
|
|
78
|
-
} @else if string.index($value-str, 'pc') {
|
|
79
|
-
@return 'pc';
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Return empty string if no unit found
|
|
83
|
-
@return '';
|
|
84
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
// Global variables that might be used across different modules
|
|
4
|
-
$enable-debuger: false !default;
|
|
5
|
-
$enable-dark-mode: true !default;
|
|
6
|
-
$enable-rtl: true !default;;
|
|
7
|
-
$enable-reduced-motion: true !default;
|
|
8
|
-
$column-count: 12 !default;
|
|
9
|
-
|
|
10
|
-
$default-container-name: nuvoui-container !default;
|
|
11
|
-
$nuvoui-container-queries: false !default;
|
|
12
|
-
|
|
13
|
-
$primary: #007bff !default;
|
|
14
|
-
$secondary: #6c757d !default;
|
|
15
|
-
$success: #28a745 !default;
|
|
16
|
-
$danger: #dc3545 !default;
|
|
17
|
-
$warning: #ffc107 !default;
|
|
18
|
-
$info: #17a2b8 !default;
|
|
19
|
-
|
|
20
|
-
$color-primitives: (
|
|
21
|
-
'gray': #6b7280,
|
|
22
|
-
'red': #ef4444,
|
|
23
|
-
'blue': #3b82f6,
|
|
24
|
-
'green': #22c55e,
|
|
25
|
-
'yellow': #eab308,
|
|
26
|
-
'purple': #a855f7,
|
|
27
|
-
'pink': #ec4899
|
|
28
|
-
) !default;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
$theme-tokens: (
|
|
32
|
-
'background',
|
|
33
|
-
'foreground',
|
|
34
|
-
'surface',
|
|
35
|
-
'border',
|
|
36
|
-
'text-primary',
|
|
37
|
-
'text-secondary'
|
|
38
|
-
) !default;
|
|
39
|
-
|
|
40
|
-
// Default theme config (can be overridden)
|
|
41
|
-
$light-theme: (
|
|
42
|
-
'background': #fff,
|
|
43
|
-
'foreground': #000,
|
|
44
|
-
'surface': #fff,
|
|
45
|
-
'border': #e5e7eb,
|
|
46
|
-
'text-primary': #000,
|
|
47
|
-
'text-secondary': #4b5563
|
|
48
|
-
) !default;
|
|
49
|
-
|
|
50
|
-
$dark-theme: (
|
|
51
|
-
'background': #000,
|
|
52
|
-
'foreground': #fff,
|
|
53
|
-
'surface': #1a1a1a,
|
|
54
|
-
'border': #2e2e2e,
|
|
55
|
-
'text-primary': #fff,
|
|
56
|
-
'text-secondary': #a3a3a3
|
|
57
|
-
) !default;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// Breakpoints
|
|
61
|
-
$breakpoints: (
|
|
62
|
-
'xs': 480px,
|
|
63
|
-
'sm': 640px,
|
|
64
|
-
'md': 768px,
|
|
65
|
-
'lg': 1024px,
|
|
66
|
-
'xl': 1280px,
|
|
67
|
-
'2xl': 1536px,
|
|
68
|
-
) !default;
|
|
69
|
-
|
|
70
|
-
// Container max-widths
|
|
71
|
-
$container-max-widths: (
|
|
72
|
-
'xs': 450px,
|
|
73
|
-
'sm': 540px,
|
|
74
|
-
'md': 720px,
|
|
75
|
-
'lg': 960px,
|
|
76
|
-
'xl': 1140px,
|
|
77
|
-
'2xl': 1320px,
|
|
78
|
-
) !default;
|
|
79
|
-
|
|
80
|
-
// _variables.scss
|
|
81
|
-
$font-sizes: (
|
|
82
|
-
'xs': 0.75rem, // 12px
|
|
83
|
-
'sm': 0.875rem, // 14px
|
|
84
|
-
'md': 1rem, // 16px
|
|
85
|
-
'lg': 1.25rem, // 20px
|
|
86
|
-
'xl': 1.5rem, // 24px
|
|
87
|
-
'2xl': 1.75rem, // 28px
|
|
88
|
-
'3xl': 2rem, // 32px
|
|
89
|
-
'4xl': 2.5rem // 40px
|
|
90
|
-
) !default;
|
|
91
|
-
|
|
92
|
-
$spacings: (
|
|
93
|
-
0,1,2,3,4,5,10,15,20,25,30,35,40,45,50,60,70,80,90,100,150,200,250,300,350,400,450,500
|
|
94
|
-
) !default;
|
|
95
|
-
|
|
96
|
-
$percentages: (
|
|
97
|
-
0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100
|
|
98
|
-
) !default;
|