minolith 1.0.1 → 1.0.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.
@@ -3,13 +3,27 @@
3
3
  @use "../mixins/index.scss" as mixins;
4
4
 
5
5
  .progress {
6
+ --#{variables.$prefix}color-progress-fore: var(
7
+ --#{variables.$prefix}color-default-progress-fore,
8
+ --#{variables.$prefix}color-default-fore
9
+ );
10
+ --#{variables.$prefix}color-progress-back: var(
11
+ --#{variables.$prefix}color-default-progress-back,
12
+ --#{variables.$prefix}color-default-back
13
+ );
14
+ --#{variables.$prefix}color-progress-border: var(
15
+ --#{variables.$prefix}color-default-progress-border,
16
+ --#{variables.$prefix}color-default-border
17
+ );
18
+ --#{variables.$prefix}progress-percent: 0;
19
+
6
20
  @include mixins.element();
7
21
  @include mixins.animation() {
8
22
  border-radius: var(--#{variables.$prefix}border-radius-pill);
9
23
  border-style: solid;
10
24
  border-width: var(--#{variables.$prefix}border-width-thick);
11
- background-color: var(--#{variables.$prefix}color-default-progress-back);
12
- color: var(--#{variables.$prefix}color-default-progress-fore);
25
+ background-color: var(--#{variables.$prefix}color-progress-back);
26
+ color: var(--#{variables.$prefix}color-progress-fore);
13
27
  height: 1rem;
14
28
  position: relative;
15
29
  &::before {
@@ -19,23 +33,32 @@
19
33
  inset: 0 100% 0 0;
20
34
  border-radius: inherit;
21
35
  background: currentColor;
36
+ inset: 0 calc((100 - var(--#{variables.$prefix}progress-percent)) * 1%) 0
37
+ 0;
22
38
  }
23
39
 
24
40
  @for $p from 0 through 100 {
25
41
  &.is-#{$p}percent {
26
- $val: ((100 - $p) * 1%);
27
- &::before {
28
- inset: 0 $val 0 0;
29
- }
42
+ --#{variables.$prefix}progress-percent: #{$p};
30
43
  }
31
44
  }
32
45
 
33
46
  @if (not variables.$is-skelton) {
34
47
  @each $color in variables.$colors {
35
- $colorName: map.get($color, "name");
48
+ $colorName: map.get($color, "name");
36
49
  &.is-#{$colorName} {
37
- background-color: var(--#{variables.$prefix}color-#{$colorName}-progress-back);
38
- color: var(--#{variables.$prefix}color-#{$colorName}-progress-fore);
50
+ --#{variables.$prefix}color-progress-fore: var(
51
+ --#{variables.$prefix}color-#{$colorName}-progress-fore,
52
+ --#{variables.$prefix}color-#{$colorName}-fore
53
+ );
54
+ --#{variables.$prefix}color-progress-back: var(
55
+ --#{variables.$prefix}color-#{$colorName}-progress-back,
56
+ --#{variables.$prefix}color-#{$colorName}-back
57
+ );
58
+ --#{variables.$prefix}color-progress-border: var(
59
+ --#{variables.$prefix}color-#{$colorName}-progress-border,
60
+ --#{variables.$prefix}color-#{$colorName}-border
61
+ );
39
62
  }
40
63
  }
41
64
  }
@@ -294,6 +294,21 @@
294
294
  }
295
295
  //#endregion message
296
296
 
297
+ //#region nav
298
+ $nav: map.get($colorShade, "nav");
299
+ @if ($nav != null) {
300
+ @include setColor($nav, "default", $name, "nav");
301
+ $navMenu: map.get($nav, "navMenu");
302
+ @if ($navMenu != null) {
303
+ @include setColor($navMenu, "default", $name, "nav-menu");
304
+ $navMenuItem: map.get($navMenu, "navMenuItem");
305
+ @if ($navMenuItem != null) {
306
+ @include setColor($navMenuItem, "default", $name, "nav-menu-item");
307
+ }
308
+ }
309
+ }
310
+ //#endregion nav
311
+
297
312
  //#region progress
298
313
  $progress: map.get($colorShade, "progress");
299
314
  @if ($progress != null) {
@@ -528,10 +543,25 @@
528
543
  }
529
544
  //#endregion message
530
545
 
546
+ //#region nav
547
+ $nav: map.get($colorShade, "nav");
548
+ @if ($nav != null) {
549
+ @include setColor($nav, $colorName, $name, "nav");
550
+ $navMenu: map.get($nav, "navMenu");
551
+ @if ($navMenu != null) {
552
+ @include setColor($navMenu, $colorName, $name, "nav-menu");
553
+ $navMenuItem: map.get($navMenu, "navMenuItem");
554
+ @if ($navMenuItem != null) {
555
+ @include setColor($navMenuItem, $colorName, $name, "nav-menu-item");
556
+ }
557
+ }
558
+ }
559
+ //#endregion nav
560
+
531
561
  //#region progress
532
562
  $progress: map.get($colorShade, "progress");
533
563
  @if ($progress != null) {
534
- @include setColor($link, $colorName, $name, "progress");
564
+ @include setColor($progress, $colorName, $name, "progress");
535
565
  }
536
566
  //#endregion progress
537
567
 
@@ -29,3 +29,15 @@
29
29
  }
30
30
  @return $str;
31
31
  }
32
+
33
+ @function colorLightnessNumberToString($num) {
34
+ @if ($num <= 5) {
35
+ @return "05";
36
+ }
37
+
38
+ @if ($num >= 95) {
39
+ @return "95";
40
+ }
41
+
42
+ @return zeroPadding($num, 2);
43
+ }
@@ -1,5 +1,5 @@
1
1
  @mixin element() {
2
2
  box-sizing: border-box;
3
- margin: 0;
4
- padding: 0;
3
+ margin: unset;
4
+ padding: unset;
5
5
  }