@nuvoui/core 1.2.7 → 1.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvoui/core",
3
- "version": "1.2.7",
3
+ "version": "1.3.0",
4
4
  "description": "NuvoUI is a human-friendly SCSS framework designed for simplicity, and modern responsive designs.",
5
5
  "author": {
6
6
  "name": "AALA IT Solutions",
@@ -41,7 +41,7 @@
41
41
  "prebuild": "npm run clean",
42
42
  "build": "npm run build:scss && npm run build:minify",
43
43
  "dev": "sass src/styles/index.scss:dist/nuvoui.css --watch",
44
- "prepublishOnly": "npm run build"
44
+ "prepublishOnly": "npm run lint && npm run format && npm run build"
45
45
  },
46
46
  "repository": {
47
47
  "type": "git",
@@ -5,10 +5,8 @@
5
5
  // Framework Configuration Options
6
6
  $generate-utility-classes: true !default;
7
7
  $enable-dark-mode: true !default;
8
- $enable-rtl: true !default;
8
+
9
9
  $enable-debugger: false !default;
10
- $enable-reduced-motion: true !default; // todo: pending
11
- $enable-container-queries: false !default; // todo: pending
12
10
 
13
11
  // if just a number passed, it will be assumed as px
14
12
  $default-unit: px !default;
@@ -100,9 +98,16 @@ $basic-colors: (
100
98
  }
101
99
 
102
100
  // Validate both themes
103
- @debug validate-theme-tokens($light-theme, $theme-tokens);
101
+ @mixin validate-tokens {
102
+ @if not validate-theme-tokens($light-theme, $theme-tokens) {
103
+ @error "Light theme is missing required tokens.";
104
+ }
105
+ @if not validate-theme-tokens($dark-theme, $theme-tokens) {
106
+ @error "Dark theme is missing required tokens.";
107
+ }
108
+ }
104
109
 
105
- @debug validate-theme-tokens($dark-theme, $theme-tokens);
110
+ @include validate-tokens;
106
111
 
107
112
  $shadow-colors: (
108
113
  "default": rgb(0 0 0 / 10%),
@@ -187,7 +192,7 @@ $spacings: (
187
192
  64: 16rem, // 256px
188
193
  ) !default;
189
194
 
190
- $percentages: (0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100) !default;
195
+ $percentages: (0, 5, 10, 20, 25, 30, 33, 40, 50, 60, 66, 70, 75, 80, 90, 100) !default;
191
196
 
192
197
  // Common border width values that are most useful
193
198
  $border-widths: (0, 1, 2, 4, 8) !default;
@@ -200,7 +205,7 @@ $border-radii: (
200
205
  "lg": 0.75rem,
201
206
  "xl": 1rem,
202
207
  "2xl": 1.25rem,
203
- "full": 9999px,
208
+ "circle": 50%,
204
209
  "none": 0,
205
210
  ) !default;
206
211
 
@@ -394,118 +394,131 @@
394
394
  }
395
395
 
396
396
  @if VAR.$generate-utility-classes {
397
- // Base flex container
398
- #{VAR.$parent-selector} .flex {
399
- display: flex;
397
+ // Build flat selector list for all flex containers
398
+ $flex-selectors: "#{VAR.$parent-selector} .flex";
399
+
400
+ @each $breakpoint, $width in VAR.$breakpoints {
401
+ $flex-selectors: "#{$flex-selectors}, #{VAR.$parent-selector} .flex\\@#{$breakpoint}";
402
+ }
403
+
404
+ // Apply base flex styles to all flex variants at once
405
+ #{$flex-selectors} {
406
+ @include flex;
407
+
408
+ &.inline {
409
+ @include flex-inline;
410
+ }
400
411
 
401
412
  // Direction modifiers
402
413
  &.row {
403
- flex-direction: row;
414
+ @include row;
404
415
  }
405
416
 
406
417
  &.row-reverse {
407
- flex-direction: row-reverse;
418
+ @include row-reverse;
408
419
  }
409
420
 
410
421
  &.col {
411
- flex-direction: column;
422
+ @include col;
412
423
  }
413
424
 
414
425
  &.col-reverse {
415
- flex-direction: column-reverse;
426
+ @include col-reverse;
416
427
  }
417
428
 
418
429
  // Wrap modifiers
419
430
  &.wrap {
420
- flex-wrap: wrap;
431
+ @include wrap;
421
432
  }
422
433
 
423
434
  &.nowrap {
424
- flex-wrap: nowrap;
435
+ @include nowrap;
425
436
  }
426
437
 
427
438
  &.wrap-reverse {
428
- flex-wrap: wrap-reverse;
439
+ @include wrap-reverse;
429
440
  }
430
441
 
431
442
  // Justify modifiers
432
443
  &.start {
433
- justify-content: flex-start;
444
+ @include start;
434
445
  }
435
446
 
436
447
  &.end {
437
- justify-content: flex-end;
448
+ @include end;
438
449
  }
439
450
 
440
451
  &.center {
441
- justify-content: center;
452
+ @include center;
442
453
  }
443
454
 
444
455
  &.stretch {
445
- justify-content: stretch;
446
- } // todo: document
456
+ @include stretch;
457
+ }
458
+
447
459
  &.between {
448
- justify-content: space-between;
460
+ @include between;
449
461
  }
450
462
 
451
463
  &.around {
452
- justify-content: space-around;
464
+ @include around;
453
465
  }
454
466
 
455
467
  &.evenly {
456
- justify-content: space-evenly;
468
+ @include evenly;
457
469
  }
458
470
 
459
471
  // Align modifiers
460
472
  &.x-start {
461
- align-items: flex-start;
473
+ @include x-start;
462
474
  }
463
475
 
464
476
  &.x-end {
465
- align-items: flex-end;
477
+ @include x-end;
466
478
  }
467
479
 
468
480
  &.x-center {
469
- align-items: center;
481
+ @include x-center;
470
482
  }
471
483
 
472
484
  &.x-baseline {
473
- align-items: baseline;
485
+ @include x-baseline;
474
486
  }
475
487
 
476
488
  &.x-stretch {
477
- align-items: stretch;
489
+ @include x-stretch;
478
490
  }
479
491
 
492
+ // Content alignment
480
493
  &.x-content-start {
481
- align-content: flex-start;
494
+ @include x-content-start;
482
495
  }
483
496
 
484
497
  &.x-content-end {
485
- align-content: flex-end;
498
+ @include x-content-end;
486
499
  }
487
500
 
488
501
  &.x-content-center {
489
- align-content: center;
502
+ @include x-content-center;
490
503
  }
491
504
 
492
505
  &.x-content-between {
493
- align-content: space-between;
506
+ @include x-content-between;
494
507
  }
495
508
 
496
509
  &.x-content-around {
497
- align-content: space-around;
510
+ @include x-content-around;
498
511
  }
499
512
 
500
513
  &.x-content-evenly {
501
- align-content: space-evenly;
514
+ @include x-content-evenly;
502
515
  }
503
516
 
504
517
  &.x-content-stretch {
505
- align-content: stretch;
518
+ @include x-content-stretch;
506
519
  }
507
520
 
508
- // Child flex items (using column count)
521
+ // Child flex items
509
522
  > .fill-auto {
510
523
  @include fill-auto;
511
524
  }
@@ -574,164 +587,171 @@
574
587
  > .fill-#{$i} {
575
588
  @include fill($i);
576
589
  }
577
-
578
590
  > .order-#{$i} {
579
591
  order: $i;
580
592
  }
581
593
  }
582
594
  }
583
595
 
596
+ // Handle responsive variants
584
597
  @each $breakpoint, $width in VAR.$breakpoints {
585
- // Get breakpoint value using FN function
586
598
  $bp-val: FN.get-breakpoint-value($breakpoint);
587
599
 
588
600
  @media (min-width: #{$bp-val}) {
589
- #{VAR.$parent-selector} .flex {
590
- // Direction
601
+ #{$flex-selectors} {
602
+ // Direction modifiers
591
603
  &.row\@#{$breakpoint} {
592
- flex-direction: row;
604
+ @include row;
593
605
  }
594
606
  &.row-reverse\@#{$breakpoint} {
595
- flex-direction: row-reverse;
607
+ @include row-reverse;
596
608
  }
597
609
  &.col\@#{$breakpoint} {
598
- flex-direction: column;
610
+ @include col;
599
611
  }
600
612
  &.col-reverse\@#{$breakpoint} {
601
- flex-direction: column-reverse;
613
+ @include col-reverse;
602
614
  }
603
615
 
604
- // Wrap
616
+ // Wrap modifiers
605
617
  &.wrap\@#{$breakpoint} {
606
- flex-wrap: wrap;
618
+ @include wrap;
607
619
  }
608
620
  &.nowrap\@#{$breakpoint} {
609
- flex-wrap: nowrap;
621
+ @include nowrap;
610
622
  }
611
623
  &.wrap-reverse\@#{$breakpoint} {
612
- flex-wrap: wrap-reverse;
624
+ @include wrap-reverse;
613
625
  }
614
626
 
615
- // Justify
627
+ // Justify modifiers
616
628
  &.start\@#{$breakpoint} {
617
- justify-content: flex-start;
629
+ @include start;
618
630
  }
619
631
  &.end\@#{$breakpoint} {
620
- justify-content: flex-end;
632
+ @include end;
621
633
  }
622
634
  &.center\@#{$breakpoint} {
623
- justify-content: center;
635
+ @include center;
636
+ }
637
+ &.stretch\@#{$breakpoint} {
638
+ @include stretch;
624
639
  }
625
640
  &.between\@#{$breakpoint} {
626
- justify-content: space-between;
641
+ @include between;
627
642
  }
628
- &.stretch\@#{$breakpoint} {
629
- justify-content: stretch;
630
- } // todo: document
631
643
  &.around\@#{$breakpoint} {
632
- justify-content: space-around;
644
+ @include around;
633
645
  }
634
646
  &.evenly\@#{$breakpoint} {
635
- justify-content: space-evenly;
647
+ @include evenly;
636
648
  }
637
649
 
638
- // Align
650
+ // Align modifiers
639
651
  &.x-start\@#{$breakpoint} {
640
- align-items: flex-start;
652
+ @include x-start;
641
653
  }
642
654
  &.x-end\@#{$breakpoint} {
643
- align-items: flex-end;
655
+ @include x-end;
644
656
  }
645
657
  &.x-center\@#{$breakpoint} {
646
- align-items: center;
658
+ @include x-center;
647
659
  }
648
660
  &.x-baseline\@#{$breakpoint} {
649
- align-items: baseline;
661
+ @include x-baseline;
650
662
  }
651
663
  &.x-stretch\@#{$breakpoint} {
652
- align-items: stretch;
664
+ @include x-stretch;
653
665
  }
654
666
 
667
+ // Content alignment
655
668
  &.x-content-start\@#{$breakpoint} {
656
- align-content: flex-start;
669
+ @include x-content-start;
657
670
  }
658
671
  &.x-content-end\@#{$breakpoint} {
659
- align-content: flex-end;
672
+ @include x-content-end;
660
673
  }
661
674
  &.x-content-center\@#{$breakpoint} {
662
- align-content: center;
675
+ @include x-content-center;
663
676
  }
664
677
  &.x-content-between\@#{$breakpoint} {
665
- align-content: space-between;
678
+ @include x-content-between;
666
679
  }
667
680
  &.x-content-around\@#{$breakpoint} {
668
- align-content: space-around;
681
+ @include x-content-around;
669
682
  }
670
683
  &.x-content-evenly\@#{$breakpoint} {
671
- align-content: space-evenly;
684
+ @include x-content-evenly;
672
685
  }
673
686
  &.x-content-stretch\@#{$breakpoint} {
674
- align-content: stretch;
687
+ @include x-content-stretch;
675
688
  }
676
689
 
677
- // Width (using column count)
678
- & > .fill-auto\@#{$breakpoint} {
690
+ // Child elements
691
+ > .fill-auto\@#{$breakpoint} {
679
692
  @include fill-auto;
680
693
  }
681
- & > .fill-full\@#{$breakpoint} {
694
+ > .fill-full\@#{$breakpoint} {
682
695
  @include fill-full;
683
696
  }
684
- & > .grow\@#{$breakpoint} {
697
+ > .grow\@#{$breakpoint} {
685
698
  @include grow;
686
699
  }
687
- & > .no-grow\@#{$breakpoint} {
700
+ > .no-grow\@#{$breakpoint} {
688
701
  @include no-grow;
689
702
  }
690
- & > .order-first\@#{$breakpoint} {
703
+ > .order-first\@#{$breakpoint} {
691
704
  order: -1;
692
705
  }
693
- & > .order-last\@#{$breakpoint} {
706
+ > .order-last\@#{$breakpoint} {
694
707
  order: 9999;
695
708
  }
696
- & > .order-none\@#{$breakpoint} {
709
+ > .order-none\@#{$breakpoint} {
697
710
  order: 0;
698
711
  }
699
- & > .shrink\@#{$breakpoint} {
712
+ > .shrink\@#{$breakpoint} {
700
713
  @include shrink;
701
714
  }
702
- & > .no-shrink\@#{$breakpoint} {
715
+ > .no-shrink\@#{$breakpoint} {
703
716
  @include no-shrink;
704
717
  }
705
- & > .shrink-twice\@#{$breakpoint} {
718
+ > .shrink-twice\@#{$breakpoint} {
706
719
  @include shrink-twice;
707
720
  }
708
- & > .self-end\@#{$breakpoint} {
721
+ > .self-end\@#{$breakpoint} {
709
722
  @include self-end;
710
723
  }
711
- & > .self-start\@#{$breakpoint} {
724
+ > .self-start\@#{$breakpoint} {
712
725
  @include self-start;
713
726
  }
714
- & > .self-center\@#{$breakpoint} {
727
+ > .self-center\@#{$breakpoint} {
715
728
  @include self-center;
716
729
  }
717
- & > .self-stretch\@#{$breakpoint} {
730
+ > .self-stretch\@#{$breakpoint} {
718
731
  @include self-stretch;
719
732
  }
720
- & > .self-baseline\@#{$breakpoint} {
733
+ > .self-baseline\@#{$breakpoint} {
721
734
  @include self-baseline;
722
735
  }
723
- & > .self-auto\@#{$breakpoint} {
736
+ > .self-auto\@#{$breakpoint} {
724
737
  @include self-auto;
725
738
  }
739
+
726
740
  @for $i from 1 through VAR.$column-count {
727
- & > .fill-#{$i}\@#{$breakpoint} {
741
+ > .fill-#{$i}\@#{$breakpoint} {
728
742
  @include fill($i);
729
743
  }
730
- & > .order-#{$i}\@#{$breakpoint} {
744
+ > .order-#{$i}\@#{$breakpoint} {
731
745
  order: $i;
732
746
  }
733
747
  }
734
748
  }
749
+
750
+ // Special case for inline@breakpoint
751
+ #{VAR.$parent-selector} .flex.inline\@#{$breakpoint},
752
+ #{VAR.$parent-selector} .flex\@#{$breakpoint}.inline\@#{$breakpoint} {
753
+ @include flex-inline;
754
+ }
735
755
  }
736
756
  }
737
757
  }
@@ -132,16 +132,22 @@ $alignments: (
132
132
  }
133
133
 
134
134
  @if VAR.$generate-utility-classes {
135
- // Classes
136
- #{VAR.$parent-selector} .grid {
137
- @include grid;
138
- }
135
+ // Build the flat selector list manually with proper escaping
136
+ $base-grid-selector: #{VAR.$parent-selector} + " .grid";
137
+ $all-grid-selectors: $base-grid-selector;
139
138
 
140
- #{VAR.$parent-selector} .grid.inline {
141
- @include grid-inline;
139
+ @each $breakpoint, $width in VAR.$breakpoints {
140
+ $all-grid-selectors: "#{$all-grid-selectors}, #{VAR.$parent-selector} .grid\\@#{$breakpoint}";
142
141
  }
143
142
 
144
- #{VAR.$parent-selector} .grid {
143
+ // Apply base grid styles to all grid variants at once
144
+ #{$all-grid-selectors} {
145
+ @include grid;
146
+
147
+ &.inline {
148
+ @include grid-inline;
149
+ }
150
+
145
151
  // Auto-fit/fill Classes
146
152
  @each $size, $width in VAR.$grid-item-sizes {
147
153
  &.auto-fit-#{$size} {
@@ -166,70 +172,70 @@ $alignments: (
166
172
  @include flow-dense-items;
167
173
  }
168
174
 
175
+ // Basic column and row count
169
176
  @for $i from 1 through VAR.$column-count {
170
177
  &.cols-#{$i} {
171
178
  @include cols($i);
172
179
  }
173
-
174
180
  &.rows-#{$i} {
175
181
  @include rows($i);
176
182
  }
177
183
  }
178
184
 
179
- // Grid Template Classes
180
- @each $breakpoint, $width in VAR.$breakpoints {
181
- // Responsive grid columns
182
- @media (min-width: #{$width}) {
183
- @for $i from 1 through VAR.$column-count {
184
- &.cols-#{$i}\@#{$breakpoint} {
185
- @include cols($i);
186
- }
187
-
188
- &.rows-#{$i}\@#{$breakpoint} {
189
- @include rows($i);
190
- }
191
- }
192
- }
193
- }
194
-
195
- // Generate Column Span Classes with Responsive Variants
185
+ // Basic span classes (non-responsive)
196
186
  @for $i from 1 through VAR.$column-count {
197
- & .col-span-#{$i} {
187
+ .col-span-#{$i} {
198
188
  @include col-span($i);
199
189
  }
200
-
201
- & .row-span-#{$i} {
190
+ .row-span-#{$i} {
202
191
  @include row-span($i);
203
192
  }
204
-
205
- @each $breakpoint, $width in VAR.$breakpoints {
206
- @media (min-width: #{$width}) {
207
- & .col-span-#{$i}\@#{$breakpoint} {
208
- @include col-span($i);
209
- }
210
-
211
- & .row-span-#{$i}\@#{$breakpoint} {
212
- @include row-span($i);
213
- }
214
- }
215
- }
216
193
  }
217
194
 
195
+ // Alignment classes
218
196
  @each $name, $value in $alignments {
219
197
  &.justify-#{$name} {
220
198
  @include justify($value);
221
199
  }
222
-
223
200
  &.align-#{$name} {
224
201
  @include align($value);
225
202
  }
226
-
227
203
  &.place-#{$name} {
228
204
  @include place($value);
229
205
  }
206
+ }
207
+ }
208
+
209
+ // Handle responsive variants
210
+ @each $breakpoint, $width in VAR.$breakpoints {
211
+ @media (min-width: #{$width}) {
212
+ // Responsive grid columns/rows
213
+ #{$all-grid-selectors} {
214
+ @for $i from 1 through VAR.$column-count {
215
+ &.cols-#{$i}\@#{$breakpoint} {
216
+ @include cols($i);
217
+ }
218
+ &.rows-#{$i}\@#{$breakpoint} {
219
+ @include rows($i);
220
+ }
221
+ }
222
+ }
223
+
224
+ // Responsive spans
225
+ #{$all-grid-selectors} {
226
+ @for $i from 1 through VAR.$column-count {
227
+ .col-span-#{$i}\@#{$breakpoint} {
228
+ @include col-span($i);
229
+ }
230
+ .row-span-#{$i}\@#{$breakpoint} {
231
+ @include row-span($i);
232
+ }
233
+ }
234
+ }
230
235
 
231
- @each $breakpoint, $width in VAR.$breakpoints {
232
- @media (min-width: #{$width}) {
236
+ // Responsive alignments
237
+ #{$all-grid-selectors} {
238
+ @each $name, $value in $alignments {
233
239
  &.justify-#{$name}\@#{$breakpoint} {
234
240
  @include justify($value);
235
241
  }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "^validate-tokens$": "() => mixin.name",
2
3
  "^container-base$": "() => mixin.name",
3
4
  "^container-padding-(\\w+)$": "(match) => `${mixin.name}(${match[1]})`",
4
5
  "^container-padding-full$": "() => `${mixin.name}(full)`",