@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.
Files changed (33) hide show
  1. package/dist/nuvoui.css +230 -922
  2. package/dist/nuvoui.css.map +1 -1
  3. package/dist/nuvoui.min.css +1 -1
  4. package/dist/nuvoui.min.css.map +1 -1
  5. package/package.json +2 -2
  6. package/src/styles/abstracts/_config.scss +25 -2
  7. package/src/styles/abstracts/_functions.scss +16 -5
  8. package/src/styles/base/_base.scss +2 -2
  9. package/src/styles/base/_reset.scss +0 -2
  10. package/src/styles/build.scss +3 -0
  11. package/src/styles/layouts/_container.scss +8 -1
  12. package/src/styles/layouts/_flex.scss +125 -207
  13. package/src/styles/layouts/_grid.scss +16 -29
  14. package/src/styles/themes/_theme.scss +10 -10
  15. package/src/styles/utilities/_alignment.scss +2 -1
  16. package/src/styles/utilities/_animations.scss +20 -32
  17. package/src/styles/utilities/_backdrop-filters.scss +7 -11
  18. package/src/styles/utilities/_borders.scss +3 -5
  19. package/src/styles/utilities/_container-queries.scss +17 -21
  20. package/src/styles/utilities/_cursor.scss +2 -1
  21. package/src/styles/utilities/_display.scss +17 -37
  22. package/src/styles/utilities/_helpers.scss +1 -0
  23. package/src/styles/utilities/_media-queries.scss +3 -5
  24. package/src/styles/utilities/_opacity.scss +52 -67
  25. package/src/styles/utilities/_position.scss +104 -132
  26. package/src/styles/utilities/_shadows.scss +9 -14
  27. package/src/styles/utilities/_sizing.scss +1 -1
  28. package/src/styles/utilities/_spacing.scss +143 -205
  29. package/src/styles/utilities/_tooltips.scss +203 -200
  30. package/src/styles/utilities/_transforms.scss +9 -11
  31. package/src/styles/utilities/_transitions.scss +8 -10
  32. package/src/styles/utilities/_typography.scss +17 -22
  33. 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
- * @component Opacity
10
- * @description Controls element transparency with customizable opacity values and interactive states
11
- *
12
- * @example
13
- * <!-- Basic opacity -->
14
- * <div class="opacity-50">This element has 50% opacity</div>
15
- *
16
- * <!-- Responsive opacity -->
17
- * <div class="opacity-100 opacity-50@md">
18
- * 100% opacity by default, 50% on medium screens and up
19
- * </div>
20
- *
21
- * <!-- Interactive states -->
22
- * <div class="opacity-50 hover:opacity-100">
23
- * 50% opacity, becomes fully visible on hover
24
- * </div>
25
- *
26
- * <button class="opacity-70 focus:opacity-100">
27
- * 70% opacity, fully visible when focused
28
- * </button>
29
- *
30
- * <div class="opacity-75 active:opacity-100">
31
- * 75% opacity, fully visible when clicked/active
32
- * </div>
33
- *
34
- * <!-- Group hover effect -->
35
- * <div class="group">
36
- * <h3>Parent element with "group" class</h3>
37
- * <div class="opacity-0 group-hover:opacity-100">
38
- * Hidden by default, visible when parent is hovered
39
- * </div>
40
- * </div>
41
- *
42
- * <!-- With transition -->
43
- * <div class="opacity-50 hover:opacity-100 transition-opacity">
44
- * Smooth opacity transition on hover
45
- * </div>
46
- *
47
- * @classes
48
- * Base:
49
- * - opacity-{value}: Sets element opacity (0-100%)
50
- * Values: 0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100
51
- *
52
- * Interactive States:
53
- * - hover:opacity-{value}: Changes opacity on mouse hover
54
- * - focus:opacity-{value}: Changes opacity when element receives focus
55
- * - active:opacity-{value}: Changes opacity when element is active/pressed
56
- * - group-hover:opacity-{value}: Changes opacity when parent with .group class is hovered
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 VAR.$generate-utility-classes {
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
- * @component Position
6
- * @description Controls element positioning and placement within the document flow
7
- *
8
- * @example
9
- * <!-- Basic positioning -->
10
- * <div class="relative">
11
- * <div class="absolute top-0 right-0">
12
- * Positioned in top-right corner
13
- * </div>
14
- * </div>
15
- *
16
- * <!-- Sticky header -->
17
- * <header class="sticky top-0">
18
- * This header sticks to the top when scrolling
19
- * </header>
20
- *
21
- * <!-- Responsive positioning -->
22
- * <div class="relative@md">
23
- * <div class="absolute@md top-2 left-2">
24
- * Only positioned on medium screens and up
25
- * </div>
26
- * </div>
27
- *
28
- * @classes
29
- * Position Types:
30
- * - static: Default position, follows document flow
31
- * - relative: Positioned relative to normal position
32
- * - absolute: Positioned relative to nearest positioned ancestor
33
- * - fixed: Positioned relative to viewport
34
- * - sticky: Positioned based on scroll position
35
- *
36
- * Placement:
37
- * - top-{value}: Sets top position
38
- * - right-{value}: Sets right position
39
- * - bottom-{value}: Sets bottom position
40
- * - left-{value}: Sets left position
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
- * @mixin static
58
- * @description Sets position to static (default document flow)
59
- * @example
60
- * .element {
61
- * @include static;
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
- * @mixin relative
70
- * @description Sets position to relative, creating a positioning context
71
- * @example
72
- * .container {
73
- * @include relative;
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
- * @mixin absolute
82
- * @description Sets position to absolute, removing from normal document flow
83
- * @example
84
- * .popup {
85
- * @include absolute;
86
- * top: 0;
87
- * left: 0;
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
- * @mixin absolute
96
- * @description Sets position to absolute, removing from normal document flow
97
- * @example
98
- * .popup {
99
- * @include absolute;
100
- * top: 0;
101
- * left: 0;
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
- * @mixin sticky
110
- * @description Creates a sticky element that remains in view during scrolling
111
- * @example
112
- * .nav {
113
- * @include sticky;
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
- * @mixin top
124
- * @description Sets the top position of an element
125
- * @param {Number|Length} $value - Position value (in px, rem, etc.)
126
- * @example
127
- * .toast {
128
- * @include absolute;
129
- * @include top(1rem);
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
- * @mixin right
138
- * @description Sets the right position of an element
139
- * @param {Number|Length} $value - Position value (in px, rem, etc.)
140
- * @example
141
- * .badge {
142
- * @include absolute;
143
- * @include right(0);
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
- * @mixin bottom
152
- * @description Sets the bottom position of an element
153
- * @param {Number|Length} $value - Position value (in px, rem, etc.)
154
- * @example
155
- * .footer {
156
- * @include fixed;
157
- * @include bottom(0);
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
- * @mixin left
166
- * @description Sets the left position of an element
167
- * @param {Number|Length} $value - Position value (in px, rem, etc.)
168
- * @example
169
- * .sidebar {
170
- * @include fixed;
171
- * @include left(0);
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 VAR.$generate-utility-classes {
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
- * Generates a CSS shadow string from a given size.
49
- *
50
- * @param {String} $size - The shadow size.
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
- * Generates a CSS shadow string from a given size.
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 VAR.$generate-utility-classes {
99
+ @if FN.feature-enabled("shadows") {
105
100
  #{VAR.$parent-selector} .shadow-none {
106
101
  box-shadow: none !important;
107
102
  }
@@ -94,7 +94,7 @@
94
94
  height: 100dvh;
95
95
  }
96
96
 
97
- @if VAR.$generate-utility-classes {
97
+ @if FN.feature-enabled("sizing") {
98
98
  #{VAR.$parent-selector} .w-screen {
99
99
  @include w-screen;
100
100
  }