@bytebrand/fe-ui-core 4.1.54 → 4.1.55
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,70 +1,45 @@
|
|
|
1
|
-
@import '../../theme/theme.styl';
|
|
2
1
|
@import '../../theme/mixins.styl';
|
|
3
2
|
@import '../../theme/priceReviewColors.styl';
|
|
4
3
|
|
|
5
4
|
.wrapper
|
|
6
5
|
text-align: center
|
|
7
|
-
white-space: nowrap
|
|
8
|
-
position: relative;
|
|
6
|
+
white-space: nowrap
|
|
9
7
|
width: 100%
|
|
10
8
|
|
|
11
9
|
.pointer
|
|
12
10
|
cursor: pointer
|
|
13
11
|
|
|
14
12
|
.label
|
|
15
|
-
|
|
13
|
+
display: block
|
|
14
|
+
font-size: 11px
|
|
15
|
+
line-height: 1;
|
|
16
16
|
text-transform: uppercase
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
color: $priceReviewColors[darkBackground]
|
|
18
|
+
margin-bottom: 4px
|
|
19
19
|
|
|
20
20
|
.segmentWrapper
|
|
21
|
-
display: flex
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
align-items: center;
|
|
24
|
-
height: 30px;
|
|
21
|
+
display: flex
|
|
25
22
|
justify-content: center;
|
|
26
|
-
|
|
27
|
-
position: relative;
|
|
28
|
-
border: 1px solid $priceReviewColors[darkBackground];
|
|
29
|
-
&:before
|
|
30
|
-
content: '';
|
|
31
|
-
height: inherit;
|
|
32
|
-
position: absolute;
|
|
33
|
-
top: -1px;
|
|
34
|
-
left: 0;
|
|
35
|
-
border-radius: 4px 0px 0px 4px;
|
|
36
|
-
width: 12px;
|
|
37
|
-
background-color: $priceReviewColors[darkBackground];
|
|
38
|
-
z-index: 2;
|
|
23
|
+
gap: 4px;
|
|
39
24
|
|
|
40
25
|
.segment
|
|
41
|
-
display: inline-
|
|
42
|
-
width:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
border
|
|
47
|
-
margin: 0 1px
|
|
48
|
-
background-color: $priceReviewColors[noRating]
|
|
49
|
-
|
|
50
|
-
+media-phone-only()
|
|
51
|
-
max-width: 25px;
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 16px
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
width: 20px
|
|
28
|
+
height: 16px
|
|
29
|
+
border-radius: 4px;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
border: 2px solid $priceReviewColors[noRating]
|
|
54
32
|
|
|
55
33
|
.darkBackground
|
|
56
34
|
color: $priceReviewColors[darkBackground]
|
|
57
|
-
|
|
35
|
+
border: 2px solid $priceReviewColors[darkBackground]
|
|
58
36
|
|
|
59
37
|
for colorName in $priceReviewColors
|
|
60
38
|
$color = $priceReviewColors[colorName]
|
|
61
|
-
$backgroundColor = $priceReviewColors[colorName]
|
|
62
39
|
if $color == $priceReviewColors.noRating
|
|
63
40
|
$color = $priceReviewColors[darkBackground]
|
|
64
41
|
$backgroundColor = $priceReviewColors[colorName]
|
|
65
42
|
.{colorName}
|
|
66
43
|
color: $color
|
|
67
44
|
.{colorName}Background
|
|
68
|
-
border
|
|
69
|
-
&:before
|
|
70
|
-
background-color: $backgroundColor
|
|
45
|
+
border: 2px solid $backgroundColor
|
|
@@ -20,6 +20,7 @@ export interface IPriceRatingProps {
|
|
|
20
20
|
const PriceRating: React.SFC<IPriceRatingProps> = ({ t, rating, className, darkBackground, i18nPrefix, classLabel, classSegmentWrapper, onClick }) => {
|
|
21
21
|
const ratingCode = (rating > 0 && rating < priceRatings.length) ? rating : 0;
|
|
22
22
|
const ratingName = priceRatings[ratingCode];
|
|
23
|
+
|
|
23
24
|
const onWrapperClick = (event: React.SyntheticEvent<HTMLDivElement>) => {
|
|
24
25
|
if (typeof onClick === 'function') {
|
|
25
26
|
onClick(event);
|
|
@@ -45,11 +46,10 @@ const PriceRating: React.SFC<IPriceRatingProps> = ({ t, rating, className, darkB
|
|
|
45
46
|
className={classnames(styles.wrapper, className, { [styles.pointer]: typeof onClick === 'function' })}
|
|
46
47
|
onClick={onWrapperClick}
|
|
47
48
|
>
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</div>
|
|
49
|
+
<span className={classnames(styles.label, styles[ratingName], classLabel)}>
|
|
50
|
+
{t(`${i18nPrefix}${ratingName}`)}
|
|
51
|
+
</span>
|
|
52
|
+
<div className={classnames(styles.segmentWrapper, classSegmentWrapper)}>{renderSegments()}</div>
|
|
53
53
|
</div>
|
|
54
54
|
);
|
|
55
55
|
};
|
|
@@ -18,11 +18,7 @@
|
|
|
18
18
|
padding: 0 10px;
|
|
19
19
|
|
|
20
20
|
& > div:last-of-type
|
|
21
|
-
|
|
22
|
-
max-width: 142px;
|
|
23
|
-
display flex
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
justify-content: center;
|
|
21
|
+
margin: auto;
|
|
26
22
|
|
|
27
23
|
&::after
|
|
28
24
|
content: '';
|
|
@@ -94,6 +90,14 @@
|
|
|
94
90
|
+media-tablet-landscape-up()
|
|
95
91
|
grid-auto-rows: 36px;
|
|
96
92
|
|
|
93
|
+
& .priceRatingSegmentWrapSRL > div
|
|
94
|
+
width: 13px;
|
|
95
|
+
height: 12px;
|
|
96
|
+
|
|
97
|
+
& .priceRatingSRL span
|
|
98
|
+
font-size: 10px;
|
|
99
|
+
margin-bottom: 2px;
|
|
100
|
+
|
|
97
101
|
&.vehiclePropertiesSearch,
|
|
98
102
|
&.vehiclePropertiesMyVehicles
|
|
99
103
|
display: grid;
|
|
@@ -140,17 +144,9 @@
|
|
|
140
144
|
height: 23px;
|
|
141
145
|
max-width: 23px;
|
|
142
146
|
|
|
143
|
-
& .priceRatingLabelSRL
|
|
144
|
-
font-size: 10px;
|
|
145
|
-
|
|
146
147
|
& .priceRatingSRL
|
|
147
148
|
margin: auto;
|
|
148
149
|
|
|
149
|
-
& .priceRatingSegmentWrapSRL > div
|
|
150
|
-
width: 24px
|
|
151
|
-
height: 16px;
|
|
152
|
-
max-width: 25%;
|
|
153
|
-
|
|
154
150
|
&.vehiclePropertiesFavorite
|
|
155
151
|
grid-template-columns: 1fr;
|
|
156
152
|
display: grid;
|
|
@@ -184,21 +180,9 @@
|
|
|
184
180
|
height: 25px;
|
|
185
181
|
max-width: 25px;
|
|
186
182
|
|
|
187
|
-
span
|
|
188
|
-
font-size: 12px;
|
|
189
|
-
color: rgba(76, 78, 100, 0.87);
|
|
190
|
-
|
|
191
|
-
& .priceRatingLabelSRL
|
|
192
|
-
font-size: 10px;
|
|
193
|
-
|
|
194
183
|
& .priceRatingSRL
|
|
195
184
|
margin: auto;
|
|
196
185
|
|
|
197
|
-
& .priceRatingSegmentWrapSRL > div
|
|
198
|
-
width: 24px
|
|
199
|
-
height: 16px;
|
|
200
|
-
max-width: 25%;
|
|
201
|
-
|
|
202
186
|
&.vehiclePropertiesMyVehicles
|
|
203
187
|
&::after
|
|
204
188
|
+media-tablet-landscape-down()
|