@nuvoui/core 1.1.6 → 1.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvoui/core",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "NuvoUI is a human-friendly SCSS framework designed for simplicity, and modern responsive designs.",
5
5
  "main": "dist/nuvoui.css",
6
6
  "module": "src/styles/index.scss",
@@ -3,7 +3,7 @@
3
3
  /* Import variables */
4
4
  @use '../utilities/variables' as *;
5
5
  @use '../utilities/media-queries' as media;
6
-
6
+
7
7
  :root {
8
8
  --font-family-base: system-ui, -apple-system, "BlinkMacSystemFont", 'Segoe UI', "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
9
9
  }
@@ -69,14 +69,14 @@ button {
69
69
  padding: 0.5rem 1rem;
70
70
  border: 0;
71
71
  border-radius: 0.25rem;
72
- background-color: var(--button-bg-color, #007bff); // Default button color
73
- color: var(--button-text-color, #ffffff);
72
+ background-color: var(--button-bg-color, #007BFF); // Default button color
73
+ color: var(--button-text-color, #FFF);
74
74
  font-family: var(--font-family-base);
75
75
  cursor: pointer;
76
76
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
77
77
 
78
78
  &:hover {
79
- background-color: var(--button-bg-color-hover, #0056b3); // Hover button color
79
+ background-color: var(--button-bg-color-hover, #0056B3); // Hover button color
80
80
  }
81
81
 
82
82
  &:focus {
@@ -84,8 +84,8 @@ button {
84
84
  }
85
85
 
86
86
  &:disabled {
87
- background-color: #e0e0e0; // Disabled button color
88
- color: #a0a0a0; // Disabled text color
87
+ background-color: #E0E0E0; // Disabled button color
88
+ color: #A0A0A0; // Disabled text color
89
89
  cursor: not-allowed;
90
90
  }
91
91
  }
@@ -103,6 +103,7 @@ textarea {
103
103
  width: 100%; // Full width
104
104
  font-family: var(--font-family-base);
105
105
  transition: border 0.2s ease-in-out;
106
+
106
107
  &:focus {
107
108
  border-color: var(--link-color);
108
109
  outline: none;
@@ -123,6 +124,7 @@ select {
123
124
  width: 100%; // Full width
124
125
  font-family: var(--font-family-base);
125
126
  transition: border 0.2s ease-in-out;
127
+
126
128
  &:focus {
127
129
  border-color: var(--link-color);
128
130
  outline: none;
@@ -11,6 +11,7 @@
11
11
  @forward 'layouts/grid';
12
12
 
13
13
  // Utilities
14
+ @forward 'utilities/alignment';
14
15
  @forward 'utilities/animations';
15
16
  @forward 'utilities/borders';
16
17
  @forward 'utilities/colors';
@@ -20,6 +21,7 @@
20
21
  @forward 'utilities/shadows';
21
22
  @forward 'utilities/sizing';
22
23
  @forward 'utilities/spacing';
24
+ @forward 'utilities/transitions';
23
25
  @forward 'utilities/typography';
24
26
  @forward 'utilities/tooltips';
25
27
  @forward 'utilities/display';
@@ -1,26 +1,31 @@
1
1
  @use 'sass:map';
2
- @use '../utilities/variables' as *;
2
+ @use '../utilities/variables' as VAR;
3
3
 
4
4
  // Base container styles
5
5
  @mixin container-base {
6
6
  width: 100%;
7
7
  margin-left: auto;
8
8
  margin-right: auto;
9
- padding-left: 1rem;
10
- padding-right: 1rem;
11
9
  }
12
10
 
11
+ @mixin container-padding($padding) {
12
+ & {
13
+ padding-top: $padding;
14
+ padding-bottom: $padding;
15
+ }
16
+ }
17
+
18
+
13
19
  // Responsive container mixin
14
20
  @mixin container($display: block) {
15
- @include container-base;
16
-
17
21
  display: $display;
18
-
19
- @each $breakpoint, $width in $container-max-widths {
20
- @media (min-width: map.get($breakpoints, $breakpoint)) {
21
- max-width: $width;
22
+ @include container-base;
23
+ @each $breakpoint, $width in VAR.$breakpoints {
24
+ @media (min-width: $width) {
25
+ max-width: $width - 100px;
22
26
  }
23
27
  }
28
+ @include container-padding(1rem);
24
29
  }
25
30
 
26
31
  // Container classes
@@ -38,4 +43,10 @@
38
43
 
39
44
  .container-fluid {
40
45
  @include container-base;
46
+ @include container-padding(1rem);
47
+ }
48
+
49
+ .container-no-padding {
50
+ @include container;
51
+ @include container-padding(0);
41
52
  }
@@ -1,9 +1,50 @@
1
1
  // Section: Layout
2
2
  // Module: Flex | Flex Inline
3
3
 
4
+ /**
5
+ * @component Flex
6
+ * @description Flexbox layout system for creating flexible page layouts
7
+ *
8
+ * @example
9
+ * <div class="flex row between x-center">
10
+ * <div class="w-6">Left column (6 units)</div>
11
+ * <div class="w-6">Right column (6 units)</div>
12
+ * </div>
13
+ *
14
+ * <div class="flex col@md row@lg">
15
+ * <!-- Changes direction based on breakpoint -->
16
+ * </div>
17
+ *
18
+ * @classes
19
+ * Base:
20
+ * - flex: Creates a flex container
21
+ *
22
+ * Direction:
23
+ * - row: Sets flex-direction to row
24
+ * - col: Sets flex-direction to column
25
+ * - row-reverse: Reverses row direction
26
+ * - col-reverse: Reverses column direction
27
+ *
28
+ * Alignment:
29
+ * - start/end/center: Controls justify-content
30
+ * - x-start/x-end/x-center: Controls align-items
31
+ *
32
+ * Child elements:
33
+ * - w-{1-12}: Sets width based on column count
34
+ * - grow: Allows item to grow
35
+ * - shrink/shrink-0: Controls shrink behavior
36
+ *
37
+ * @responsive
38
+ * All classes support responsive variants using @breakpoint suffix:
39
+ * - row@md: Row direction on medium screens and up
40
+ * - between@lg: Space-between on large screens
41
+ *
42
+ * @see grid
43
+ */
44
+
4
45
  @use 'sass:math';
5
46
  @use '../utilities/media-queries' as MC;
6
- @use '../utilities/variables' as *;
47
+ @use '../utilities/variables' as VAR;
7
48
  @use '../utilities/functions' as FN;
8
49
 
9
50
  /**
@@ -250,11 +291,11 @@
250
291
  @mixin no-grow { flex: none; }
251
292
 
252
293
  /**
253
- * @description Sets how many columns this would take using percentage of $column-count.
294
+ * @description Sets how many columns this would take using percentage of VAR.$column-count.
254
295
  * @param {Number} $size - The number of columns to span.
255
296
  */
256
297
  @mixin w-col($size) {
257
- flex: 0 0 math.percentage(math.div($size, $column-count));
298
+ flex: 0 0 math.percentage(math.div($size, VAR.$column-count));
258
299
  }
259
300
 
260
301
  // Base flex container
@@ -296,8 +337,8 @@
296
337
  &.x-content-stretch { align-content: stretch; }
297
338
 
298
339
  // Child flex items (using column count)
299
- > .w-auto { @include f-w-auto }
300
- > .w-full { @include f-w-full }
340
+ > .w-auto { @include f-w-auto; }
341
+ > .w-full { @include f-w-full; }
301
342
  > .grow { @include grow; }
302
343
  > .no-grow { @include no-grow; }
303
344
 
@@ -308,20 +349,18 @@
308
349
  > .shrink { @include shrink; }
309
350
  > .shrink-0 { @include shrink-0; }
310
351
  > .shrink-2 { @include shrink-2; }
311
- @for $i from 1 through $column-count {
312
- > .w-#{$i} { @include w-col($i) }
352
+ @for $i from 1 through VAR.$column-count {
353
+ > .w-#{$i} { @include w-col($i); }
313
354
  > .order-#{$i} { order: $i; }
314
355
  }
315
356
  }
316
357
 
317
- @each $breakpoint, $width in $breakpoints {
358
+ @each $breakpoint, $width in VAR.$breakpoints {
318
359
  // Get breakpoint value using FN function
319
360
  $bp-val: FN.get-breakpoint-value($breakpoint);
320
361
 
321
362
  @media (min-width: #{$bp-val}) {
322
- .flex\@#{$breakpoint} {
323
- display: flex;
324
-
363
+ .flex {
325
364
  // Direction
326
365
  &.row\@#{$breakpoint} { flex-direction: row; }
327
366
  &.row-reverse\@#{$breakpoint} { flex-direction: row-reverse; }
@@ -364,12 +403,14 @@
364
403
  & > .order-first\@#{$breakpoint} { order: -1; }
365
404
  & > .order-last\@#{$breakpoint} { order: 9999; }
366
405
  & > .order-none\@#{$breakpoint} { order: 0; }
367
- @for $i from 1 through $column-count {
368
- & > .w-#{$i}\@#{$breakpoint} { @include w-col($i) }
406
+ & > .shrink\@#{$breakpoint} { @include shrink; }
407
+ & > .shrink-0\@#{$breakpoint} { @include shrink-0; }
408
+ & > .shrink-2\@#{$breakpoint} { @include shrink-2; }
409
+
410
+ @for $i from 1 through VAR.$column-count {
411
+ & > .w-#{$i}\@#{$breakpoint} { @include w-col($i); }
412
+ & > .col-#{$i}\@#{$breakpoint} { @include w-col($i); }
369
413
  & > .order-#{$i}\@#{$breakpoint} { order: $i; }
370
- & > .shrink\@#{$breakpoint} { @include shrink; }
371
- & > .shrink-0\@#{$breakpoint} { @include shrink-0; }
372
- & > .shrink-2\@#{$breakpoint} { @include shrink-2; }
373
414
  }
374
415
  }
375
416
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  @use 'sass:math';
5
5
  @use '../utilities/functions' as FN;
6
- @use '../utilities/variables' as *;
6
+ @use '../utilities/variables' as VAR;
7
7
 
8
8
  /**
9
9
  * @description Establishes a grid container.
@@ -19,9 +19,23 @@
19
19
  @mixin cols($count) {grid-template-columns: repeat($count, minmax(0, 1fr));}
20
20
  @mixin rows($count) {grid-template-rows: repeat($count, minmax(0, 1fr));}
21
21
 
22
- @mixin grid-cols-custom($template) {
22
+
23
+ /**
24
+ * @description Establishes a grid container with a specified number of columns.
25
+ * @param {number} $count - The number of columns.
26
+
27
+ /// EXAMPLE USAGE
28
+ .custom-grid {
29
+ display: grid;
30
+ @include cols-custom("1fr_auto_1fr");
31
+ }
32
+
33
+ */
34
+
35
+ @mixin cols-custom($template) {
23
36
  // Convert underscores to spaces so "1fr_auto" becomes "1fr auto"
24
37
  $converted: FN.str-replace($template, "_", " ");
38
+
25
39
  grid-template-columns: $converted;
26
40
  }
27
41
 
@@ -67,42 +81,69 @@
67
81
  grid-row: $row;
68
82
  }
69
83
  @mixin position-col($col) {
70
- grid-column: $start;
84
+ grid-column: $col;
71
85
  }
72
86
  @mixin position-row($row) {
73
87
  grid-row: $row;
74
88
  }
75
89
 
76
-
77
- /// EXAMPLE USAGE
78
- .custom-grid {
79
- display: grid;
80
- @include grid-cols-custom("1fr_auto_1fr");
81
- }
90
+ @mixin grid-gap($value) { gap: $value; }
91
+ @mixin col-gap($value) { column-gap: $value; }
92
+ @mixin row-gap($value) { row-gap: $value; }
82
93
 
83
94
  // Classes
84
95
  .grid { @include grid; }
85
96
  .grid.inline { @include grid-inline; }
86
97
 
98
+
99
+ @for $i from 1 through VAR.$column-count {
100
+ .grid.cols-#{$i} { @include cols($i); }
101
+ .grid.rows-#{$i} { @include rows($i); }
102
+ }
103
+
87
104
  // Grid Template Classes
88
- @each $breakpoint, $width in $breakpoints {
89
- // Responsive grid columns
90
- @media (min-width: #{$width}) {
91
- .grid { @include grid; }
105
+ @each $breakpoint, $width in VAR.$breakpoints {
106
+ // Responsive grid columns
107
+ @media (min-width: #{$width}) {
108
+ @for $i from 1 through VAR.$column-count {
109
+ .grid.cols-#{$i}\@#{$breakpoint} { @include cols($i); }
110
+ .grid.rows-#{$i}\@#{$breakpoint} { @include rows($i); }
111
+ }
112
+ }
113
+ }
114
+
92
115
 
93
- @for $i from 1 through $column-count {
94
- .grid.cols-#{$i} { @include cols($i); }
95
- .grid.rows-#{$i} { @include rows($i); }
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); }
96
137
 
97
- .grid.cols-#{$i}\@#{$breakpoint} {
98
- @include cols($i);
99
- }
100
- }
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); }
101
141
  }
102
142
  }
103
143
 
144
+
104
145
  // Generate Column Span Classes with Responsive Variants
105
- @for $i from 1 through $column-count {
146
+ @for $i from 1 through VAR.$column-count {
106
147
  .span-col-#{$i} {
107
148
  @include span-col($i);
108
149
  }
@@ -111,7 +152,7 @@
111
152
  @include span-row($i);
112
153
  }
113
154
 
114
- @each $breakpoint, $width in $breakpoints {
155
+ @each $breakpoint, $width in VAR.$breakpoints {
115
156
  @media (min-width: #{$width}) {
116
157
  .span-col-#{$i}\@#{$breakpoint} {
117
158
  @include span-col($i);
@@ -126,9 +167,9 @@
126
167
 
127
168
 
128
169
  // Auto-fit/fill Classes
129
- @each $breakpoint, $width in $breakpoints {
130
- .grid.auto-fit-#{$breakpoint} { @include auto-fit($width); }
131
- .grid.auto-fill-#{$breakpoint} { @include auto-fill($width); }
170
+ @each $size, $width in VAR.$grid-item-sizes {
171
+ .grid.auto-fit-#{$size} { @include auto-fit($width); }
172
+ .grid.auto-fill-#{$size} { @include auto-fill($width); }
132
173
  }
133
174
 
134
175
  // Flow Classes
@@ -149,7 +190,7 @@ $alignments: (
149
190
  .align-items-#{$name} { align-items: $value; }
150
191
  .place-items-#{$name} { place-items: $value; }
151
192
 
152
- @each $breakpoint, $width in $breakpoints {
193
+ @each $breakpoint, $width in VAR.$breakpoints {
153
194
  @media (min-width: #{$width}) {
154
195
  .justify-items-#{$name}\@#{$breakpoint} {
155
196
  justify-items: $value;