@nuvoui/core 1.3.1 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvoui/core",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
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",
@@ -104,6 +104,11 @@ $basic-colors: (
104
104
  "transparent": transparent,
105
105
  ) !default;
106
106
 
107
+ $semantic-colors: ("primary", "secondary", "success", "danger", "warning", "info");
108
+ $primitive-color-names: map.keys($color-primitives);
109
+ $color-names: list.join($semantic-colors, $primitive-color-names);
110
+ $color-names: list.join($color-names, map.keys($basic-colors));
111
+
107
112
  @function validate-theme-tokens($theme-map, $required-tokens) {
108
113
  $missing-tokens: ();
109
114
 
@@ -107,7 +107,7 @@ body#{$parent-selector} {
107
107
  #{$parent-selector} input[type="search"],
108
108
  #{$parent-selector} textarea {
109
109
  padding: 0.5rem;
110
- border: 1px solid var(--border);
110
+ border: var(--border-size, 1px) var(--border-style, solid) var(--border-color, var(--secondary));
111
111
  border-radius: 0.25rem;
112
112
  width: 100%; // Full width
113
113
  font-family: var(--font-family-base);
@@ -128,7 +128,7 @@ body#{$parent-selector} {
128
128
  // Selects
129
129
  #{$parent-selector} select {
130
130
  padding: 0.5rem;
131
- border: 1px solid var(--border);
131
+ border: var(--border-size, 1px) var(--border-style, solid) var(--border-color, var(--secondary));
132
132
  border-radius: 0.25rem;
133
133
  width: 100%; // Full width
134
134
  font-family: var(--font-family-base);
@@ -144,14 +144,14 @@ body#{$parent-selector} {
144
144
  #{$parent-selector} blockquote {
145
145
  margin: 1rem 0;
146
146
  padding: 0.5rem 1rem;
147
- border-left: 4px solid var(--border);
147
+ border-left: var(--border-size, 4px) var(--border-style, solid) var(--border-color, var(--secondary));
148
148
  font-style: italic;
149
149
  }
150
150
 
151
151
  // Horizontal Rule
152
152
  #{$parent-selector} hr {
153
153
  border: none;
154
- border-top: 1px solid var(--border);
154
+ border-top: var(--border-size, 1px) var(--border-style, solid) var(--border-color, var(--secondary));
155
155
  margin: 1rem 0;
156
156
  }
157
157
 
@@ -46,16 +46,6 @@
46
46
  @use "../abstracts/config" as VAR;
47
47
  @use "../abstracts/functions" as FN;
48
48
 
49
- // @description Establishes a flex container.
50
- @mixin flex {
51
- display: flex;
52
- }
53
-
54
- // @description Establishes a flex-inline container.
55
- @mixin flex-inline {
56
- display: inline-flex;
57
- }
58
-
59
49
  // @description Sets flex-direction to row.
60
50
  // @dependencies flex | flex-inline
61
51
  @mixin row {
@@ -321,12 +311,6 @@
321
311
 
322
312
  // Apply base flex styles to all flex variants at once
323
313
  #{$flex-selectors} {
324
- @include flex;
325
-
326
- &.inline {
327
- @include flex-inline;
328
- }
329
-
330
314
  // Direction modifiers
331
315
  &.row {
332
316
  @include row;
@@ -513,7 +497,7 @@
513
497
 
514
498
  // Handle responsive variants
515
499
  @each $breakpoint, $width in VAR.$breakpoints {
516
- $bp-val: FN.get-breakpoint-value($breakpoint);
500
+ $bp-val: FN.get-breakpoint-value($breakpoint); // todo: why get-breakpoint-value?
517
501
 
518
502
  @media (min-width: #{$bp-val}) {
519
503
  #{$flex-selectors} {
@@ -664,12 +648,6 @@
664
648
  }
665
649
  }
666
650
  }
667
-
668
- // Special case for inline@breakpoint
669
- #{VAR.$parent-selector} .flex.inline\@#{$breakpoint},
670
- #{VAR.$parent-selector} .flex\@#{$breakpoint}.inline\@#{$breakpoint} {
671
- @include flex-inline;
672
- }
673
651
  }
674
652
  }
675
653
  }
@@ -6,16 +6,6 @@
6
6
  @use "../abstracts/functions" as FN;
7
7
  @use "../abstracts/config" as VAR;
8
8
 
9
- // @description Establishes a grid container.
10
- @mixin grid {
11
- display: grid;
12
- }
13
-
14
- // @description Establishes a inline-grid container.
15
- @mixin grid-inline {
16
- display: inline-grid;
17
- }
18
-
19
9
  // Grid Template Mixins
20
10
  @mixin cols($count) {
21
11
  grid-template-columns: repeat($count, minmax(0, 1fr));
@@ -129,12 +119,6 @@ $alignments: (
129
119
 
130
120
  // Apply base grid styles to all grid variants at once
131
121
  #{$all-grid-selectors} {
132
- @include grid;
133
-
134
- &.inline {
135
- @include grid-inline;
136
- }
137
-
138
122
  // Auto-fit/fill Classes
139
123
  @each $size, $width in VAR.$grid-item-sizes {
140
124
  &.auto-fit-#{$size} {
@@ -0,0 +1,37 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "id": "initial_id",
7
+ "metadata": {
8
+ "collapsed": true
9
+ },
10
+ "outputs": [],
11
+ "source": [
12
+ ""
13
+ ]
14
+ }
15
+ ],
16
+ "metadata": {
17
+ "kernelspec": {
18
+ "display_name": "Python 3",
19
+ "language": "python",
20
+ "name": "python3"
21
+ },
22
+ "language_info": {
23
+ "codemirror_mode": {
24
+ "name": "ipython",
25
+ "version": 2
26
+ },
27
+ "file_extension": ".py",
28
+ "mimetype": "text/x-python",
29
+ "name": "python",
30
+ "nbconvert_exporter": "python",
31
+ "pygments_lexer": "ipython2",
32
+ "version": "2.7.6"
33
+ }
34
+ },
35
+ "nbformat": 4,
36
+ "nbformat_minor": 5
37
+ }
@@ -5,6 +5,8 @@
5
5
  @use "sass:map";
6
6
  @use "sass:meta";
7
7
  @use "sass:string" as str;
8
+ @use "sass:list";
9
+
8
10
  @use "../abstracts/config" as VAR;
9
11
  @use "../abstracts/functions" as FN;
10
12
 
@@ -38,13 +40,18 @@ $border-styles: (solid, dashed, dotted, double, none);
38
40
 
39
41
  // Core Border Mixins - improved to include style and color by default
40
42
  // SKIP Documentation
41
- @mixin border($val, $style: solid, $color: var(--border-base)) {
43
+ @mixin border($val, $style: solid, $color: var(--border-color)) {
42
44
  $val: FN.fix-units($val);
43
45
 
46
+ --border-size: #{$val};
47
+
44
48
  border-width: $val;
45
49
  @if $val != 0 {
46
50
  border-style: $style;
47
51
  border-color: $color;
52
+
53
+ --border-style: #{$style};
54
+ --border-color: #{$color};
48
55
  }
49
56
  }
50
57
 
@@ -53,8 +60,8 @@ $border-styles: (solid, dashed, dotted, double, none);
53
60
 
54
61
  border-top-width: $val;
55
62
  @if $val != 0 {
56
- border-top-style: solid;
57
- border-top-color: var(--border);
63
+ border-top-style: var(--border-style, solid);
64
+ border-top-color: var(--border-color);
58
65
  }
59
66
  }
60
67
 
@@ -63,8 +70,8 @@ $border-styles: (solid, dashed, dotted, double, none);
63
70
 
64
71
  border-right-width: $val;
65
72
  @if $val != 0 {
66
- border-right-style: solid;
67
- border-right-color: var(--border);
73
+ border-right-style: var(--border-style, solid);
74
+ border-right-color: var(--border-color);
68
75
  }
69
76
  }
70
77
 
@@ -73,8 +80,8 @@ $border-styles: (solid, dashed, dotted, double, none);
73
80
 
74
81
  border-bottom-width: $val;
75
82
  @if $val != 0 {
76
- border-bottom-style: solid;
77
- border-bottom-color: var(--border);
83
+ border-bottom-style: var(--border-style, solid);
84
+ border-bottom-color: var(--border-color);
78
85
  }
79
86
  }
80
87
 
@@ -83,8 +90,8 @@ $border-styles: (solid, dashed, dotted, double, none);
83
90
 
84
91
  border-left-width: $val;
85
92
  @if $val != 0 {
86
- border-left-style: solid;
87
- border-left-color: var(--border);
93
+ border-left-style: var(--border-style, solid);
94
+ border-left-color: var(--border-color);
88
95
  }
89
96
  }
90
97
 
@@ -160,319 +167,124 @@ $border-styles: (solid, dashed, dotted, double, none);
160
167
 
161
168
  @mixin pill {
162
169
  @include rounded(9999px);
163
- } // todo: doc missing
170
+ }
164
171
 
165
- // -----------------------------------------------
166
- // UTILITY CLASSES
167
- // -----------------------------------------------
168
172
  @if FN.feature-enabled("borders") {
169
173
  // Basic border classes (all sides)
170
- .border {
174
+ #{VAR.$parent-selector} .border {
171
175
  @include border(1);
172
176
  }
173
177
 
174
- .border-0 {
178
+ // Common shortcuts for single-side borders
179
+ #{VAR.$parent-selector} .border-0 {
175
180
  @include border(0);
176
181
  }
177
182
 
178
- // All sides border width
179
- @each $width in VAR.$border-widths {
180
- .border-#{$width} {
181
- @include border($width);
182
- }
183
+ #{VAR.$parent-selector} .border-t {
184
+ @include border-top(1);
185
+ }
186
+
187
+ #{VAR.$parent-selector} .border-r {
188
+ @include border-right(1);
189
+ }
190
+
191
+ #{VAR.$parent-selector} .border-b {
192
+ @include border-bottom(1);
193
+ }
194
+
195
+ #{VAR.$parent-selector} .border-l {
196
+ @include border-left(1);
183
197
  }
184
198
 
185
199
  // Directional border width
186
200
  @each $width in VAR.$border-widths {
187
- .border-t-#{$width} {
201
+ #{VAR.$parent-selector} .border-#{$width},
202
+ #{VAR.$parent-selector} .hover\:border-#{$width}:hover,
203
+ #{VAR.$parent-selector} .active\:border-#{$width}:active,
204
+ #{VAR.$parent-selector} .focus\:border-#{$width}:focus,
205
+ #{VAR.$parent-selector} .group:hover .group-hover\:border-#{$width} {
206
+ @include border($width);
207
+ }
208
+ #{VAR.$parent-selector} .border-t-#{$width} {
188
209
  @include border-top($width);
189
210
  }
190
- .border-r-#{$width} {
211
+ #{VAR.$parent-selector} .border-r-#{$width} {
191
212
  @include border-right($width);
192
213
  }
193
- .border-b-#{$width} {
214
+ #{VAR.$parent-selector} .border-b-#{$width} {
194
215
  @include border-bottom($width);
195
216
  }
196
- .border-l-#{$width} {
217
+ #{VAR.$parent-selector} .border-l-#{$width} {
197
218
  @include border-left($width);
198
219
  }
199
220
  }
200
221
 
201
- // Common shortcuts for single-side borders
202
- .border-t {
203
- @include border-top(1);
204
- }
205
-
206
- .border-r {
207
- @include border-right(1);
208
- }
209
-
210
- .border-b {
211
- @include border-bottom(1);
212
- }
213
-
214
- .border-l {
215
- @include border-left(1);
216
- }
217
-
218
222
  // Border radius classes
219
- .rounded {
223
+ #{VAR.$parent-selector} .rounded {
220
224
  @include rounded;
221
- } // Default rounded
222
- .square {
225
+ }
226
+ #{VAR.$parent-selector} .square {
223
227
  @include rounded(0);
224
228
  } // Alias for no radius
225
229
 
226
230
  @each $name, $value in VAR.$border-radii {
227
- .rounded-#{$name} {
231
+ #{VAR.$parent-selector} .rounded-#{$name} {
228
232
  @include rounded($value);
229
233
  }
230
- }
231
-
232
- // Directional border radius
233
- @each $name, $value in VAR.$border-radii {
234
- .rounded-t-#{$name} {
234
+ #{VAR.$parent-selector} .rounded-t-#{$name} {
235
235
  @include rounded-t($value);
236
236
  }
237
- .rounded-r-#{$name} {
237
+ #{VAR.$parent-selector} .rounded-r-#{$name} {
238
238
  @include rounded-r($value);
239
239
  }
240
- .rounded-b-#{$name} {
240
+ #{VAR.$parent-selector} .rounded-b-#{$name} {
241
241
  @include rounded-b($value);
242
242
  }
243
- .rounded-l-#{$name} {
243
+ #{VAR.$parent-selector} .rounded-l-#{$name} {
244
244
  @include rounded-l($value);
245
245
  }
246
246
 
247
247
  // Individual corners
248
- .rounded-tl-#{$name} {
248
+ #{VAR.$parent-selector} .rounded-tl-#{$name} {
249
249
  @include rounded-tl($value);
250
250
  }
251
- .rounded-tr-#{$name} {
251
+ #{VAR.$parent-selector} .rounded-tr-#{$name} {
252
252
  @include rounded-tr($value);
253
253
  }
254
- .rounded-br-#{$name} {
254
+ #{VAR.$parent-selector} .rounded-br-#{$name} {
255
255
  @include rounded-br($value);
256
256
  }
257
- .rounded-bl-#{$name} {
257
+ #{VAR.$parent-selector} .rounded-bl-#{$name} {
258
258
  @include rounded-bl($value);
259
259
  }
260
260
  }
261
261
 
262
262
  // Pill shape (alias for full radius)
263
- .pill {
263
+ #{VAR.$parent-selector} .pill {
264
264
  @include pill;
265
265
  }
266
266
 
267
267
  // Border styles - these override the default solid style if needed
268
268
  @each $style in $border-styles {
269
- .border-#{$style} {
269
+ #{VAR.$parent-selector} .border-#{$style},
270
+ #{VAR.$parent-selector} .hover\:border-#{$style}:hover,
271
+ #{VAR.$parent-selector} .active\:border-#{$style}:active,
272
+ #{VAR.$parent-selector} .focus\:border-#{$style}:focus,
273
+ #{VAR.$parent-selector} .group:hover .group-hover\:border-#{$style} {
270
274
  @include border-style($style);
271
275
  }
272
276
  }
273
277
 
274
- // Border colors - these override the default color if needed
275
- .border-default {
276
- @include border-color(var(--border));
277
- }
278
-
279
- .border-light {
280
- @include border-color(var(--border-light-color));
281
- }
282
-
283
- .border-dark {
284
- @include border-color(var(--border-dark-color));
285
- }
286
-
287
- .border-primary {
288
- @include border-color(var(--primary));
289
- }
290
-
291
- .border-secondary {
292
- @include border-color(var(--secondary));
293
- }
294
-
295
- .border-success {
296
- @include border-color(var(--success));
297
- }
298
-
299
- .border-danger {
300
- @include border-color(var(--danger));
301
- }
302
-
303
- .border-warning {
304
- @include border-color(var(--warning));
305
- }
306
-
307
- .border-info {
308
- @include border-color(var(--info));
309
- }
310
-
311
- // Common combined border utilities (style + color)
312
- .border-primary-solid {
313
- @include border-style(solid);
314
- @include border-color(var(--primary));
315
- }
316
-
317
- .border-danger-dashed {
318
- @include border-style(dashed);
319
- @include border-color(var(--danger));
320
- }
321
-
322
- // -----------------------------------------------
323
- // HOVER, ACTIVE, AND FOCUS STATES
324
- // -----------------------------------------------
325
-
326
- // Hover state border classes
327
- @each $width in VAR.$border-widths {
328
- .hover\:border-#{$width}:hover {
329
- @include border($width);
330
- }
331
- }
332
-
333
- @each $style in $border-styles {
334
- .hover\:border-#{$style}:hover {
335
- @include border-style($style);
278
+ @each $color-name in VAR.$color-names {
279
+ #{VAR.$parent-selector} .border-#{$color-name},
280
+ #{VAR.$parent-selector} .hover\:border-#{$color-name}:hover,
281
+ #{VAR.$parent-selector} .active\:border-#{$color-name}:active,
282
+ #{VAR.$parent-selector} .focus\:border-#{$color-name}:focus,
283
+ #{VAR.$parent-selector} .group:hover .group-hover\:border-#{$color-name} {
284
+ @include border-color(var(--#{$color-name}));
336
285
  }
337
286
  }
338
287
 
339
- // Border colors on hover
340
- .hover\:border-default:hover {
341
- @include border-color(var(--border));
342
- }
343
-
344
- .hover\:border-light:hover {
345
- @include border-color(var(--border-light-color));
346
- }
347
-
348
- .hover\:border-dark:hover {
349
- @include border-color(var(--border-dark-color));
350
- }
351
-
352
- .hover\:border-primary:hover {
353
- @include border-color(var(--primary));
354
- }
355
-
356
- .hover\:border-secondary:hover {
357
- @include border-color(var(--secondary));
358
- }
359
-
360
- .hover\:border-success:hover {
361
- @include border-color(var(--success));
362
- }
363
-
364
- .hover\:border-danger:hover {
365
- @include border-color(var(--danger));
366
- }
367
-
368
- .hover\:border-warning:hover {
369
- @include border-color(var(--warning));
370
- }
371
-
372
- .hover\:border-info:hover {
373
- @include border-color(var(--info));
374
- }
375
-
376
- // Active state border classes
377
- @each $width in VAR.$border-widths {
378
- .active\:border-#{$width}:active {
379
- @include border($width);
380
- }
381
- }
382
-
383
- @each $style in $border-styles {
384
- .active\:border-#{$style}:active {
385
- @include border-style($style);
386
- }
387
- }
388
-
389
- // Border colors on active state
390
- .active\:border-default:active {
391
- @include border-color(var(--border));
392
- }
393
-
394
- .active\:border-light:active {
395
- @include border-color(var(--border-light-color));
396
- }
397
-
398
- .active\:border-dark:active {
399
- @include border-color(var(--border-dark-color));
400
- }
401
-
402
- .active\:border-primary:active {
403
- @include border-color(var(--primary));
404
- }
405
-
406
- .active\:border-secondary:active {
407
- @include border-color(var(--secondary));
408
- }
409
-
410
- .active\:border-success:active {
411
- @include border-color(var(--success));
412
- }
413
-
414
- .active\:border-danger:active {
415
- @include border-color(var(--danger));
416
- }
417
-
418
- .active\:border-warning:active {
419
- @include border-color(var(--warning));
420
- }
421
-
422
- .active\:border-info:active {
423
- @include border-color(var(--info));
424
- }
425
-
426
- // Focus state border classes
427
- @each $width in VAR.$border-widths {
428
- .focus\:border-#{$width}:focus {
429
- @include border($width);
430
- }
431
- }
432
-
433
- @each $style in $border-styles {
434
- .focus\:border-#{$style}:focus {
435
- @include border-style($style);
436
- }
437
- }
438
-
439
- // Border colors on focus
440
- .focus\:border-default:focus {
441
- @include border-color(var(--border));
442
- }
443
-
444
- .focus\:border-light:focus {
445
- @include border-color(var(--border-light-color));
446
- }
447
-
448
- .focus\:border-dark:focus {
449
- @include border-color(var(--border-dark-color));
450
- }
451
-
452
- .focus\:border-primary:focus {
453
- @include border-color(var(--primary));
454
- }
455
-
456
- .focus\:border-secondary:focus {
457
- @include border-color(var(--secondary));
458
- }
459
-
460
- .focus\:border-success:focus {
461
- @include border-color(var(--success));
462
- }
463
-
464
- .focus\:border-danger:focus {
465
- @include border-color(var(--danger));
466
- }
467
-
468
- .focus\:border-warning:focus {
469
- @include border-color(var(--warning));
470
- }
471
-
472
- .focus\:border-info:focus {
473
- @include border-color(var(--info));
474
- }
475
-
476
288
  // -----------------------------------------------
477
289
  // RESPONSIVE CLASSES
478
290
  // -----------------------------------------------
@@ -481,33 +293,33 @@ $border-styles: (solid, dashed, dotted, double, none);
481
293
  @media (min-width: #{$width}) {
482
294
  // Border width responsive
483
295
  @each $val in VAR.$border-widths {
484
- .border-#{$val}\@#{$breakpoint} {
296
+ #{VAR.$parent-selector} .border-#{$val}\@#{$breakpoint} {
485
297
  @include border($val);
486
298
  }
487
299
  }
488
300
 
489
301
  // Common shortcuts for responsive
490
- .border\@#{$breakpoint} {
302
+ #{VAR.$parent-selector} .border\@#{$breakpoint} {
491
303
  @include border(1);
492
304
  }
493
- .border-0\@#{$breakpoint} {
305
+ #{VAR.$parent-selector} .border-0\@#{$breakpoint} {
494
306
  @include border(0);
495
307
  }
496
308
 
497
309
  // Border radius responsive
498
310
  @each $name, $value in VAR.$border-radii {
499
- .rounded-#{$name}\@#{$breakpoint} {
311
+ #{VAR.$parent-selector} .rounded-#{$name}\@#{$breakpoint} {
500
312
  @include rounded($value);
501
313
  }
502
314
  }
503
315
 
504
- .rounded\@#{$breakpoint} {
316
+ #{VAR.$parent-selector} .rounded\@#{$breakpoint} {
505
317
  @include rounded;
506
318
  }
507
- .square\@#{$breakpoint} {
319
+ #{VAR.$parent-selector} .square\@#{$breakpoint} {
508
320
  @include rounded(0);
509
321
  }
510
- .pill\@#{$breakpoint} {
322
+ #{VAR.$parent-selector} .pill\@#{$breakpoint} {
511
323
  @include pill;
512
324
  }
513
325
  }