@nuvoui/core 1.3.0 → 1.3.1
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 +230 -922
- 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 +2 -2
- package/src/styles/abstracts/_config.scss +25 -2
- package/src/styles/abstracts/_functions.scss +16 -5
- package/src/styles/base/_base.scss +2 -2
- package/src/styles/base/_reset.scss +0 -2
- package/src/styles/build.scss +3 -0
- package/src/styles/layouts/_container.scss +8 -1
- package/src/styles/layouts/_flex.scss +125 -207
- package/src/styles/layouts/_grid.scss +16 -29
- package/src/styles/themes/_theme.scss +10 -10
- package/src/styles/utilities/_alignment.scss +2 -1
- package/src/styles/utilities/_animations.scss +20 -32
- package/src/styles/utilities/_backdrop-filters.scss +7 -11
- package/src/styles/utilities/_borders.scss +3 -5
- package/src/styles/utilities/_container-queries.scss +17 -21
- package/src/styles/utilities/_cursor.scss +2 -1
- package/src/styles/utilities/_display.scss +17 -37
- package/src/styles/utilities/_helpers.scss +1 -0
- package/src/styles/utilities/_media-queries.scss +3 -5
- package/src/styles/utilities/_opacity.scss +52 -67
- package/src/styles/utilities/_position.scss +104 -132
- package/src/styles/utilities/_shadows.scss +9 -14
- package/src/styles/utilities/_sizing.scss +1 -1
- package/src/styles/utilities/_spacing.scss +143 -205
- package/src/styles/utilities/_tooltips.scss +203 -200
- package/src/styles/utilities/_transforms.scss +9 -11
- package/src/styles/utilities/_transitions.scss +8 -10
- package/src/styles/utilities/_typography.scss +17 -22
- package/src/styles/utilities/_z-index.scss +12 -19
|
@@ -4,79 +4,64 @@
|
|
|
4
4
|
@use "sass:math";
|
|
5
5
|
@use "sass:meta";
|
|
6
6
|
@use "../abstracts/config" as VAR;
|
|
7
|
+
@use "../abstracts/functions" as FN;
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
* Animation:
|
|
59
|
-
* - transition-opacity: Adds smooth transition when opacity changes
|
|
60
|
-
*
|
|
61
|
-
* @responsive
|
|
62
|
-
* All opacity classes support responsive variants using @breakpoint suffix:
|
|
63
|
-
* - opacity-50@sm: 50% opacity on small screens and up
|
|
64
|
-
* - hover:opacity-100@md: Full opacity on hover for medium screens and up
|
|
65
|
-
*
|
|
66
|
-
* Available breakpoints: xs, sm, md, lg, xl, xxl
|
|
67
|
-
*
|
|
68
|
-
* @customization
|
|
69
|
-
* Opacity values are defined in the $percentages variable
|
|
70
|
-
* Transition timing can be customized via CSS variables
|
|
71
|
-
*
|
|
72
|
-
* @see transitions
|
|
73
|
-
*/
|
|
9
|
+
// @component Opacity
|
|
10
|
+
// @description Controls element transparency with customizable opacity values and interactive states
|
|
11
|
+
// @example
|
|
12
|
+
// <!-- Basic opacity -->
|
|
13
|
+
// <div class="opacity-50">This element has 50% opacity</div>
|
|
14
|
+
// <!-- Responsive opacity -->
|
|
15
|
+
// <div class="opacity-100 opacity-50@md">
|
|
16
|
+
// 100% opacity by default, 50% on medium screens and up
|
|
17
|
+
// </div>
|
|
18
|
+
// <!-- Interactive states -->
|
|
19
|
+
// <div class="opacity-50 hover:opacity-100">
|
|
20
|
+
// 50% opacity, becomes fully visible on hover
|
|
21
|
+
// </div>
|
|
22
|
+
// <button class="opacity-70 focus:opacity-100">
|
|
23
|
+
// 70% opacity, fully visible when focused
|
|
24
|
+
// </button>
|
|
25
|
+
// <div class="opacity-75 active:opacity-100">
|
|
26
|
+
// 75% opacity, fully visible when clicked/active
|
|
27
|
+
// </div>
|
|
28
|
+
// <!-- Group hover effect -->
|
|
29
|
+
// <div class="group">
|
|
30
|
+
// <h3>Parent element with "group" class</h3>
|
|
31
|
+
// <div class="opacity-0 group-hover:opacity-100">
|
|
32
|
+
// Hidden by default, visible when parent is hovered
|
|
33
|
+
// </div>
|
|
34
|
+
// </div>
|
|
35
|
+
// <!-- With transition -->
|
|
36
|
+
// <div class="opacity-50 hover:opacity-100 transition-opacity">
|
|
37
|
+
// Smooth opacity transition on hover
|
|
38
|
+
// </div>
|
|
39
|
+
// @classes
|
|
40
|
+
// Base:
|
|
41
|
+
// - opacity-{value}: Sets element opacity (0-100%)
|
|
42
|
+
// Values: 0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100
|
|
43
|
+
// Interactive States:
|
|
44
|
+
// - hover:opacity-{value}: Changes opacity on mouse hover
|
|
45
|
+
// - focus:opacity-{value}: Changes opacity when element receives focus
|
|
46
|
+
// - active:opacity-{value}: Changes opacity when element is active/pressed
|
|
47
|
+
// - group-hover:opacity-{value}: Changes opacity when parent with .group class is hovered
|
|
48
|
+
// Animation:
|
|
49
|
+
// - transition-opacity: Adds smooth transition when opacity changes
|
|
50
|
+
// @responsive
|
|
51
|
+
// All opacity classes support responsive variants using @breakpoint suffix:
|
|
52
|
+
// - opacity-50@sm: 50% opacity on small screens and up
|
|
53
|
+
// - hover:opacity-100@md: Full opacity on hover for medium screens and up
|
|
54
|
+
// Available breakpoints: xs, sm, md, lg, xl, xxl
|
|
55
|
+
// @customization
|
|
56
|
+
// Opacity values are defined in the $percentages variable
|
|
57
|
+
// Transition timing can be customized via CSS variables
|
|
58
|
+
// @see transitions
|
|
74
59
|
|
|
75
60
|
@mixin opacity($value) {
|
|
76
61
|
opacity: calc(#{$value} / 100);
|
|
77
62
|
}
|
|
78
63
|
|
|
79
|
-
@if
|
|
64
|
+
@if FN.feature-enabled("opacity") {
|
|
80
65
|
// Opacity Utilities
|
|
81
66
|
@each $i in VAR.$percentages {
|
|
82
67
|
#{VAR.$parent-selector} .opacity-#{$i},
|
|
@@ -1,176 +1,148 @@
|
|
|
1
1
|
@use "../abstracts/config" as VAR;
|
|
2
2
|
@use "../abstracts/functions" as FN;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*
|
|
42
|
-
* Common values: 0, 1, 2, 3, 4, 5, 10, etc. (based on spacing scale)
|
|
43
|
-
*
|
|
44
|
-
* @responsive
|
|
45
|
-
* All position classes support responsive variants using @breakpoint suffix:
|
|
46
|
-
* - relative@md: Relative positioning on medium screens and up
|
|
47
|
-
* - top-0@lg: Zero top position on large screens
|
|
48
|
-
*
|
|
49
|
-
* @see z-index, transform
|
|
50
|
-
*/
|
|
4
|
+
// @component Position
|
|
5
|
+
// @description Controls element positioning and placement within the document flow
|
|
6
|
+
// @example
|
|
7
|
+
// <!-- Basic positioning -->
|
|
8
|
+
// <div class="relative">
|
|
9
|
+
// <div class="absolute top-0 right-0">
|
|
10
|
+
// Positioned in top-right corner
|
|
11
|
+
// </div>
|
|
12
|
+
// </div>
|
|
13
|
+
// <!-- Sticky header -->
|
|
14
|
+
// <header class="sticky top-0">
|
|
15
|
+
// This header sticks to the top when scrolling
|
|
16
|
+
// </header>
|
|
17
|
+
// <!-- Responsive positioning -->
|
|
18
|
+
// <div class="relative@md">
|
|
19
|
+
// <div class="absolute@md top-2 left-2">
|
|
20
|
+
// Only positioned on medium screens and up
|
|
21
|
+
// </div>
|
|
22
|
+
// </div>
|
|
23
|
+
// @classes
|
|
24
|
+
// Position Types:
|
|
25
|
+
// - static: Default position, follows document flow
|
|
26
|
+
// - relative: Positioned relative to normal position
|
|
27
|
+
// - absolute: Positioned relative to nearest positioned ancestor
|
|
28
|
+
// - fixed: Positioned relative to viewport
|
|
29
|
+
// - sticky: Positioned based on scroll position
|
|
30
|
+
// Placement:
|
|
31
|
+
// - top-{value}: Sets top position
|
|
32
|
+
// - right-{value}: Sets right position
|
|
33
|
+
// - bottom-{value}: Sets bottom position
|
|
34
|
+
// - left-{value}: Sets left position
|
|
35
|
+
// Common values: 0, 1, 2, 3, 4, 5, 10, etc. (based on spacing scale)
|
|
36
|
+
// @responsive
|
|
37
|
+
// All position classes support responsive variants using @breakpoint suffix:
|
|
38
|
+
// - relative@md: Relative positioning on medium screens and up
|
|
39
|
+
// - top-0@lg: Zero top position on large screens
|
|
40
|
+
// @see z-index, transform
|
|
51
41
|
|
|
52
42
|
// -----------------------------------------------
|
|
53
43
|
// MIXINS
|
|
54
44
|
// -----------------------------------------------
|
|
55
45
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
* }
|
|
63
|
-
*/
|
|
46
|
+
// @mixin static
|
|
47
|
+
// @description Sets position to static (default document flow)
|
|
48
|
+
// @example
|
|
49
|
+
// .element {
|
|
50
|
+
// @include static;
|
|
51
|
+
// }
|
|
64
52
|
@mixin static {
|
|
65
53
|
position: static;
|
|
66
54
|
}
|
|
67
55
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
* }
|
|
75
|
-
*/
|
|
56
|
+
// @mixin relative
|
|
57
|
+
// @description Sets position to relative, creating a positioning context
|
|
58
|
+
// @example
|
|
59
|
+
// .container {
|
|
60
|
+
// @include relative;
|
|
61
|
+
// }
|
|
76
62
|
@mixin relative {
|
|
77
63
|
position: relative;
|
|
78
64
|
}
|
|
79
65
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
* }
|
|
89
|
-
*/
|
|
66
|
+
// @mixin absolute
|
|
67
|
+
// @description Sets position to absolute, removing from normal document flow
|
|
68
|
+
// @example
|
|
69
|
+
// .popup {
|
|
70
|
+
// @include absolute;
|
|
71
|
+
// top: 0;
|
|
72
|
+
// left: 0;
|
|
73
|
+
// }
|
|
90
74
|
@mixin absolute {
|
|
91
75
|
position: absolute;
|
|
92
76
|
}
|
|
93
77
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
* }
|
|
103
|
-
*/
|
|
78
|
+
// @mixin absolute
|
|
79
|
+
// @description Sets position to absolute, removing from normal document flow
|
|
80
|
+
// @example
|
|
81
|
+
// .popup {
|
|
82
|
+
// @include absolute;
|
|
83
|
+
// top: 0;
|
|
84
|
+
// left: 0;
|
|
85
|
+
// }
|
|
104
86
|
@mixin fixed {
|
|
105
87
|
position: fixed;
|
|
106
88
|
}
|
|
107
89
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
* }
|
|
115
|
-
*/
|
|
90
|
+
// @mixin sticky
|
|
91
|
+
// @description Creates a sticky element that remains in view during scrolling
|
|
92
|
+
// @example
|
|
93
|
+
// .nav {
|
|
94
|
+
// @include sticky;
|
|
95
|
+
// }
|
|
116
96
|
@mixin sticky {
|
|
117
97
|
position: sticky;
|
|
118
98
|
z-index: 999;
|
|
119
99
|
top: 0;
|
|
120
100
|
}
|
|
121
101
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
* }
|
|
131
|
-
*/
|
|
102
|
+
// @mixin top
|
|
103
|
+
// @description Sets the top position of an element
|
|
104
|
+
// @param {Number|Length} $value - Position value (in px, rem, etc.)
|
|
105
|
+
// @example
|
|
106
|
+
// .toast {
|
|
107
|
+
// @include absolute;
|
|
108
|
+
// @include top(1rem);
|
|
109
|
+
// }
|
|
132
110
|
@mixin top($value) {
|
|
133
111
|
top: FN.fix-units($value);
|
|
134
112
|
}
|
|
135
113
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
* }
|
|
145
|
-
*/
|
|
114
|
+
// @mixin right
|
|
115
|
+
// @description Sets the right position of an element
|
|
116
|
+
// @param {Number|Length} $value - Position value (in px, rem, etc.)
|
|
117
|
+
// @example
|
|
118
|
+
// .badge {
|
|
119
|
+
// @include absolute;
|
|
120
|
+
// @include right(0);
|
|
121
|
+
// }
|
|
146
122
|
@mixin right($value) {
|
|
147
123
|
right: FN.fix-units($value);
|
|
148
124
|
}
|
|
149
125
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
* }
|
|
159
|
-
*/
|
|
126
|
+
// @mixin bottom
|
|
127
|
+
// @description Sets the bottom position of an element
|
|
128
|
+
// @param {Number|Length} $value - Position value (in px, rem, etc.)
|
|
129
|
+
// @example
|
|
130
|
+
// .footer {
|
|
131
|
+
// @include fixed;
|
|
132
|
+
// @include bottom(0);
|
|
133
|
+
// }
|
|
160
134
|
@mixin bottom($value) {
|
|
161
135
|
bottom: FN.fix-units($value);
|
|
162
136
|
}
|
|
163
137
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
* }
|
|
173
|
-
*/
|
|
138
|
+
// @mixin left
|
|
139
|
+
// @description Sets the left position of an element
|
|
140
|
+
// @param {Number|Length} $value - Position value (in px, rem, etc.)
|
|
141
|
+
// @example
|
|
142
|
+
// .sidebar {
|
|
143
|
+
// @include fixed;
|
|
144
|
+
// @include left(0);
|
|
145
|
+
// }
|
|
174
146
|
@mixin left($value) {
|
|
175
147
|
left: $value;
|
|
176
148
|
}
|
|
@@ -201,7 +173,7 @@ $position-fractions: (
|
|
|
201
173
|
// -----------------------------------------------
|
|
202
174
|
// UTILITY CLASSES
|
|
203
175
|
// -----------------------------------------------
|
|
204
|
-
@if
|
|
176
|
+
@if FN.feature-enabled("position") {
|
|
205
177
|
// Position Classes
|
|
206
178
|
#{VAR.$parent-selector} .static {
|
|
207
179
|
@include static;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use "sass:math";
|
|
4
4
|
@use "sass:string";
|
|
5
5
|
@use "../abstracts/config" as VAR;
|
|
6
|
+
@use "../abstracts/functions" as FN;
|
|
6
7
|
|
|
7
8
|
// TODO: SHADOWS WITH COLOR VARIANTS WITH RESPONSIVE
|
|
8
9
|
$shadow-sizes: (
|
|
@@ -44,24 +45,18 @@ $shadow-sizes: (
|
|
|
44
45
|
),
|
|
45
46
|
);
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @param {String} $color - The shadow color.
|
|
52
|
-
* @return {String} - The CSS shadow string.
|
|
53
|
-
*/
|
|
48
|
+
// Generates a CSS shadow string from a given size.
|
|
49
|
+
// @param {String} $size - The shadow size.
|
|
50
|
+
// @param {String} $color - The shadow color.
|
|
51
|
+
// @return {String} - The CSS shadow string.
|
|
54
52
|
|
|
55
53
|
@mixin shadow-base($x, $y, $blur, $spread, $color) {
|
|
56
54
|
box-shadow: $x $y $blur $spread $color;
|
|
57
55
|
}
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
* @param {String} $size - The shadow size.
|
|
63
|
-
* @param {String} $color - The shadow color.
|
|
64
|
-
*/
|
|
57
|
+
// Generates a CSS shadow string from a given size.
|
|
58
|
+
// @param {String} $size - The shadow size.
|
|
59
|
+
// @param {String} $color - The shadow color.
|
|
65
60
|
@mixin shadow($size: "md", $color: "default") {
|
|
66
61
|
@if not map.has-key($shadow-sizes, $size) {
|
|
67
62
|
@error "Shadow size '#{$size}' not found in $shadow-sizes map";
|
|
@@ -101,7 +96,7 @@ $shadow-sizes: (
|
|
|
101
96
|
}
|
|
102
97
|
|
|
103
98
|
// Utility Classes
|
|
104
|
-
@if
|
|
99
|
+
@if FN.feature-enabled("shadows") {
|
|
105
100
|
#{VAR.$parent-selector} .shadow-none {
|
|
106
101
|
box-shadow: none !important;
|
|
107
102
|
}
|