@kizmann/nano-ui 0.7.24 → 0.7.26

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,98 @@
1
+ @import "../../../root/vars";
2
+
3
+ .n-rating {
4
+ overflow: hidden;
5
+ max-width: 100%;
6
+ display: inline-flex;
7
+ flex-direction: row;
8
+ align-items: center;
9
+ justify-content: flex-start;
10
+ }
11
+
12
+ .n-rating__stars {
13
+ flex: 0 0 auto;
14
+ display: inline-flex;
15
+ flex-direction: row;
16
+ align-items: center;
17
+ justify-content: flex-start;
18
+ }
19
+
20
+ .n-rating__stars span {
21
+ flex: 0 0 auto;
22
+ position: relative;
23
+ display: block;
24
+ }
25
+
26
+ .n-rating__stars span:before,
27
+ .n-rating__stars span:after {
28
+ content: '\00a0';
29
+ position: absolute;
30
+ top: 0;
31
+ width: 100%;
32
+ height: 100%;
33
+ background-repeat: no-repeat;
34
+ }
35
+
36
+ .n-rating__stars span:before {
37
+ z-index: 2;
38
+ left: 0;
39
+ background-position: left center;
40
+ }
41
+
42
+ .n-rating__stars span:after {
43
+ z-index: 1;
44
+ right: 0;
45
+ background-position: right center;
46
+ }
47
+
48
+ .n-rating__stars span.is-null:before {
49
+ width: 0;
50
+ }
51
+
52
+ .n-rating__stars span.is-half:before {
53
+ width: 50%;
54
+ }
55
+
56
+ .n-rating__stars span.is-full:before {
57
+ width: 100%;
58
+ }
59
+
60
+ .n-rating__value {
61
+ overflow: hidden;
62
+ flex: 1 1 auto;
63
+ white-space: nowrap;
64
+ text-overflow: ellipsis;
65
+ }
66
+
67
+ @each $suffix, $values in $form {
68
+
69
+ $-rating-font: map-get($values, 'font');
70
+ $-rating-size: map-get($values, 'size');
71
+ $-rating-radius: map-get($values, 'radius');
72
+ $-rating-ratio: map-get($values, 'ratio');
73
+
74
+ $-rating-star: $-rating-size * $-rating-ratio * 1.2;
75
+
76
+ .n-rating--#{$suffix} {
77
+ font-size: $-rating-font;
78
+ }
79
+
80
+ .n-rating--#{$suffix} .n-rating__stars span {
81
+ width: $-rating-star;
82
+ height: $-rating-star;
83
+ }
84
+
85
+ .n-rating--#{$suffix} .n-rating__stars span:not(:last-child) {
86
+ margin-right: $-rating-star / 4;
87
+ }
88
+
89
+ .n-rating--#{$suffix} .n-rating__stars span:before,
90
+ .n-rating--#{$suffix} .n-rating__stars span:after {
91
+ background-size: $-rating-star $-rating-star;
92
+ }
93
+
94
+ .n-rating--#{$suffix} .n-rating__value {
95
+ margin-left: $-rating-star;
96
+ }
97
+
98
+ }
@@ -48,6 +48,7 @@
48
48
  width: $-switch-frame;
49
49
  height: $-switch-size - 14;
50
50
  }
51
+
51
52
  $-switch-circle: $-switch-size - 20;
52
53
 
53
54
  .n-switch--#{$suffix} .n-switch__switch span {
@@ -28,6 +28,7 @@
28
28
  @import "./collapse/index";
29
29
  @import "./info/index";
30
30
  @import "./map/index";
31
+ @import "./rating/index";
31
32
 
32
33
  @import "./demo/index";
33
34
 
@@ -0,0 +1 @@
1
+ @import "./src/rating/rating";
@@ -0,0 +1,18 @@
1
+ @import "../../../root/vars";
2
+
3
+ .n-rating__stars span:before,
4
+ .n-rating__stars span:after {
5
+ background-image: svg-load('star-default.svg', fill=$color-gray-10);
6
+ }
7
+
8
+ @each $color, $values in $colors {
9
+
10
+ $-color-base: map_get($values, 'base');
11
+ $-color-light: map_get($values, 'light');
12
+ $-color-dark: map_get($values, 'dark');
13
+
14
+ .n-rating--#{$color} .n-rating__stars span:before {
15
+ background-image: svg-load('star-default.svg', fill=$-color-base);
16
+ }
17
+
18
+ }
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 26.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
5
+ <g>
6
+ <path d="M15.891,0.561l4.097,8.408l9.16,1.348c0.815,0.12,1.14,1.135,0.551,1.717l-6.629,6.545l1.565,9.242
7
+ c0.139,0.822-0.713,1.449-1.442,1.061L15,24.519l-8.193,4.363c-0.729,0.388-1.581-0.239-1.442-1.061l1.565-9.242l-6.629-6.545
8
+ c-0.59-0.582-0.264-1.597,0.551-1.717l9.16-1.348l4.097-8.408C14.473-0.187,15.527-0.187,15.891,0.561z"/>
9
+ </g>
10
+ </svg>