@nuvoui/core 1.3.0 → 1.3.2

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 (34) hide show
  1. package/dist/nuvoui.css +775 -1406
  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 +30 -2
  7. package/src/styles/abstracts/_functions.scss +16 -5
  8. package/src/styles/base/_base.scss +6 -6
  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 +124 -228
  13. package/src/styles/layouts/_grid.scss +14 -43
  14. package/src/styles/themes/_theme.scss +10 -10
  15. package/src/styles/themes/refactored_borders.ipynb +37 -0
  16. package/src/styles/utilities/_alignment.scss +2 -1
  17. package/src/styles/utilities/_animations.scss +20 -32
  18. package/src/styles/utilities/_backdrop-filters.scss +7 -11
  19. package/src/styles/utilities/_borders.scss +80 -270
  20. package/src/styles/utilities/_container-queries.scss +17 -21
  21. package/src/styles/utilities/_cursor.scss +2 -1
  22. package/src/styles/utilities/_display.scss +73 -44
  23. package/src/styles/utilities/_helpers.scss +1 -0
  24. package/src/styles/utilities/_media-queries.scss +3 -5
  25. package/src/styles/utilities/_opacity.scss +52 -67
  26. package/src/styles/utilities/_position.scss +104 -132
  27. package/src/styles/utilities/_shadows.scss +9 -14
  28. package/src/styles/utilities/_sizing.scss +1 -1
  29. package/src/styles/utilities/_spacing.scss +143 -205
  30. package/src/styles/utilities/_tooltips.scss +203 -200
  31. package/src/styles/utilities/_transforms.scss +9 -11
  32. package/src/styles/utilities/_transitions.scss +8 -10
  33. package/src/styles/utilities/_typography.scss +17 -22
  34. package/src/styles/utilities/_z-index.scss +12 -19
@@ -4,73 +4,73 @@
4
4
  @use "../abstracts/config" as VAR;
5
5
  @use "../abstracts/functions" as FN;
6
6
 
7
- /**
8
- * Display Utilities
9
- *
10
- * Classes:
11
- * - .hide, .show: Control element visibility
12
- * - .block, .inline, .inline-block: Basic display modes
13
- * - .d-tbl, .d-tbl-row, .d-tbl-cell: Table display modes
14
- * - .overflow-hidden: Control overflow behavior
15
- *
16
- * All utilities support responsive variants with @breakpoint suffix:
17
- * - .hide@md, .block@lg, etc.
18
- */
7
+ // Display Utilities
8
+ // Classes:
9
+ // - .hide, .show: Control element visibility
10
+ // - .block, .inline, .inline-block: Basic display modes
11
+ // - .d-tbl, .d-tbl-row, .d-tbl-cell: Table display modes
12
+ // - .overflow-hidden: Control overflow behavior
13
+ // All utilities support responsive variants with @breakpoint suffix:
14
+ // - .hide@md, .block@lg, etc.
19
15
 
20
16
  // Display Mixins
21
17
 
22
- /**
23
- * @description Set display to none.
24
- */
18
+ // @description Set display to none.
25
19
  @mixin hide {
26
20
  display: none;
27
21
  }
28
22
 
29
- /**
30
- * @description Set display to block.
31
- */
23
+ // @description Set display to block.
32
24
  @mixin block {
33
25
  display: block;
34
26
  }
35
27
 
36
- /**
37
- * @description Set display to inline.
38
- */
28
+ // @description Set display to inline.
39
29
  @mixin inline {
40
30
  display: inline;
41
31
  }
42
32
 
43
- /**
44
- * @description Set display to inline-block.
45
- */
33
+ // @description Set display to inline-block.
46
34
  @mixin inline-block {
47
35
  display: inline-block;
48
36
  }
49
37
 
50
- /**
51
- * @description Set display to initial original state.
52
- */
38
+ // @description Set display to initial original state.
53
39
  @mixin show {
54
40
  display: initial;
55
41
  }
56
42
 
57
- /**
58
- * @description Set display to table.
59
- */
43
+ // @description Establishes a grid container.
44
+ @mixin grid {
45
+ display: grid;
46
+ }
47
+
48
+ // @description Establishes a inline-grid container.
49
+ @mixin grid-inline {
50
+ display: inline-grid;
51
+ }
52
+
53
+ // @description Establishes a flex container.
54
+ @mixin flex {
55
+ display: flex;
56
+ }
57
+
58
+ // @description Establishes a flex-inline container.
59
+ @mixin flex-inline {
60
+ display: inline-flex;
61
+ }
62
+
63
+ // @description Set display to table.
60
64
  @mixin d-tbl {
61
65
  display: table;
62
66
  }
63
67
 
64
- /**
65
- * @description Set display to table-row.
66
- */
68
+ // @description Set display to table-row.
67
69
  @mixin d-tbl-row {
68
70
  display: table-row;
69
71
  }
70
72
 
71
- /**
72
- * @description Set display to table-cell.
73
- */
73
+ // @description Set display to table-cell.
74
74
  @mixin d-tbl-cell {
75
75
  display: table-cell;
76
76
  }
@@ -119,7 +119,7 @@
119
119
  overflow-y: auto;
120
120
  }
121
121
 
122
- @if VAR.$generate-utility-classes {
122
+ @if FN.feature-enabled("displays") {
123
123
  #{VAR.$parent-selector} .hide {
124
124
  @include hide;
125
125
  }
@@ -140,6 +140,24 @@
140
140
  @include inline-block;
141
141
  }
142
142
 
143
+ #{VAR.$parent-selector} .contents {
144
+ @include contents;
145
+ }
146
+
147
+ #{VAR.$parent-selector} .grid {
148
+ @include grid;
149
+
150
+ &.inline {
151
+ @include grid-inline;
152
+ }
153
+ }
154
+ #{VAR.$parent-selector} .flex {
155
+ @include flex;
156
+
157
+ &.inline {
158
+ @include flex-inline;
159
+ }
160
+ }
143
161
  #{VAR.$parent-selector} .visible {
144
162
  @include visible;
145
163
  }
@@ -152,10 +170,6 @@
152
170
  @include collapse;
153
171
  }
154
172
 
155
- #{VAR.$parent-selector} .contents {
156
- @include contents;
157
- }
158
-
159
173
  #{VAR.$parent-selector} .overflow-hidden {
160
174
  @include overflow-hidden;
161
175
  }
@@ -228,6 +242,24 @@
228
242
  #{VAR.$parent-selector} .inline-block\@#{$breakpoint} {
229
243
  @include inline-block;
230
244
  }
245
+
246
+ #{VAR.$parent-selector} .contents\@#{$breakpoint} {
247
+ @include contents;
248
+ }
249
+ #{VAR.$parent-selector} .grid\@#{$breakpoint} {
250
+ @include grid;
251
+
252
+ &.inline {
253
+ @include grid-inline;
254
+ }
255
+ }
256
+ #{VAR.$parent-selector} .flex\@#{$breakpoint} {
257
+ @include flex;
258
+
259
+ &.inline {
260
+ @include flex-inline;
261
+ }
262
+ }
231
263
  #{VAR.$parent-selector} .visible\@#{$breakpoint} {
232
264
  @include visible;
233
265
  }
@@ -237,9 +269,6 @@
237
269
  #{VAR.$parent-selector} .collapse\@#{$breakpoint} {
238
270
  @include collapse;
239
271
  }
240
- #{VAR.$parent-selector} .contents\@#{$breakpoint} {
241
- @include contents;
242
- }
243
272
  #{VAR.$parent-selector} .overflow-hidden\@#{$breakpoint} {
244
273
  @include overflow-hidden;
245
274
  }
@@ -5,6 +5,7 @@
5
5
  @use "sass:meta";
6
6
 
7
7
  @use "../abstracts/config" as VAR;
8
+ @use "../abstracts/functions" as FN;
8
9
 
9
10
  @if VAR.$enable-debugger {
10
11
  .NuvoUI-Debugger-Wrapper {
@@ -8,11 +8,9 @@
8
8
  @use "../abstracts/config" as VAR;
9
9
  @use "../abstracts/functions" as FN;
10
10
 
11
- /**
12
- * @description Media query mixins.
13
- * @param {string|number} $breakpoint - The breakpoint value.
14
- * @param {string} $type - The media query type (e.g. 'lg', 'md').
15
- */
11
+ // @description Media query mixins.
12
+ // @param {string|number} $breakpoint - The breakpoint value.
13
+ // @param {string} $type - The media query type (e.g. 'lg', 'md').
16
14
  @mixin media-up($breakpoint, $debug: null) {
17
15
  $blueprint-value: FN.fix-units(FN.get-breakpoint-value($breakpoint, $debug));
18
16
  $val: $blueprint-value - 0.01;
@@ -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;