@trafilea/afrodita-components 5.0.0-beta.41 → 5.0.0-beta.42
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/build/index.d.ts +3 -1
- package/build/index.esm.js +15 -7
- package/build/index.esm.js.map +1 -1
- package/build/index.js +15 -7
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -602,8 +602,10 @@ interface RatingProps {
|
|
|
602
602
|
reviews: number;
|
|
603
603
|
reviewsText: string;
|
|
604
604
|
wrapWithParenthesis?: boolean;
|
|
605
|
+
underline?: boolean;
|
|
606
|
+
reviewsContainerId?: string;
|
|
605
607
|
}
|
|
606
|
-
declare const Rating: ({ size, reviews, reviewsText, rating, wrapWithParenthesis, }: RatingProps) => JSX.Element;
|
|
608
|
+
declare const Rating: ({ size, reviews, reviewsText, rating, wrapWithParenthesis, underline, reviewsContainerId, }: RatingProps) => JSX.Element;
|
|
607
609
|
|
|
608
610
|
interface FitPredictorProps {
|
|
609
611
|
onClick: () => void;
|
package/build/index.esm.js
CHANGED
|
@@ -3637,6 +3637,7 @@ var ButtonSecondary = function (props) {
|
|
|
3637
3637
|
backgroundColor: theme.component.button.secondary.active.backgroundColor,
|
|
3638
3638
|
color: theme.component.button.secondary.active.color,
|
|
3639
3639
|
border: theme.component.button.border,
|
|
3640
|
+
fontFamily: 'inherit',
|
|
3640
3641
|
'&:hover': {
|
|
3641
3642
|
backgroundColor: theme.component.button.secondary.hover.backgroundColor,
|
|
3642
3643
|
},
|
|
@@ -3653,6 +3654,7 @@ var ButtonSecondaryOutline = function (props) {
|
|
|
3653
3654
|
backgroundColor: theme.component.button.secondary.active.color,
|
|
3654
3655
|
color: theme.component.button.secondary.active.backgroundColor,
|
|
3655
3656
|
border: "1px solid ".concat(theme.component.button.secondary.active.backgroundColor),
|
|
3657
|
+
fontFamily: 'inherit',
|
|
3656
3658
|
'&:hover': {
|
|
3657
3659
|
backgroundColor: theme.component.button.secondary.active.backgroundColor,
|
|
3658
3660
|
color: theme.component.button.secondary.active.color,
|
|
@@ -4233,9 +4235,7 @@ var getStylesBySize$7 = function (size) {
|
|
|
4233
4235
|
};
|
|
4234
4236
|
var textButtonStyles$1 = function (theme, size) {
|
|
4235
4237
|
var stylesBySize = getStylesBySize$7(size);
|
|
4236
|
-
return __assign$1(__assign$1({ border: 'none', background: 'transparent', padding: 0, color: theme.colors.shades['550'].color, alignItems: 'center', fontWeight:
|
|
4237
|
-
textDecorationLine: 'underline',
|
|
4238
|
-
}, '&:disabled': {
|
|
4238
|
+
return __assign$1(__assign$1({ border: 'none', background: 'transparent', padding: 0, color: theme.colors.shades['550'].color, alignItems: 'center', fontWeight: 500, textDecorationLine: 'underline' }, stylesBySize), { '&:disabled': {
|
|
4239
4239
|
color: theme.colors.shades['250'].color,
|
|
4240
4240
|
textDecorationLine: 'none',
|
|
4241
4241
|
} });
|
|
@@ -10583,11 +10583,11 @@ var LabelStyles = {
|
|
|
10583
10583
|
});
|
|
10584
10584
|
},
|
|
10585
10585
|
};
|
|
10586
|
-
var Container$x = newStyled.
|
|
10586
|
+
var Container$x = newStyled.a(templateObject_1$S || (templateObject_1$S = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
10587
10587
|
var templateObject_1$S;
|
|
10588
10588
|
|
|
10589
10589
|
var CustomLabel = newStyled.div(function (_a) {
|
|
10590
|
-
var theme = _a.theme, size = _a.size, wrapWithParenthesis = _a.wrapWithParenthesis;
|
|
10590
|
+
var theme = _a.theme, size = _a.size, wrapWithParenthesis = _a.wrapWithParenthesis, underline = _a.underline;
|
|
10591
10591
|
return [
|
|
10592
10592
|
LabelStyles.baseStyles(theme),
|
|
10593
10593
|
LabelStyles[size](theme),
|
|
@@ -10599,13 +10599,21 @@ var CustomLabel = newStyled.div(function (_a) {
|
|
|
10599
10599
|
content: wrapWithParenthesis ? '")"' : '""',
|
|
10600
10600
|
},
|
|
10601
10601
|
},
|
|
10602
|
+
css({
|
|
10603
|
+
textDecoration: underline ? 'underline' : 'none',
|
|
10604
|
+
}),
|
|
10602
10605
|
];
|
|
10603
10606
|
});
|
|
10604
10607
|
var starsNumber = 5;
|
|
10605
10608
|
var Rating = function (_a) {
|
|
10606
|
-
var _b = _a.size, size = _b === void 0 ? ComponentSize.Medium : _b, reviews = _a.reviews, reviewsText = _a.reviewsText, rating = _a.rating, _c = _a.wrapWithParenthesis, wrapWithParenthesis = _c === void 0 ? false : _c;
|
|
10609
|
+
var _b = _a.size, size = _b === void 0 ? ComponentSize.Medium : _b, reviews = _a.reviews, reviewsText = _a.reviewsText, rating = _a.rating, _c = _a.wrapWithParenthesis, wrapWithParenthesis = _c === void 0 ? false : _c, _d = _a.underline, underline = _d === void 0 ? false : _d, reviewsContainerId = _a.reviewsContainerId;
|
|
10607
10610
|
var theme = useTheme();
|
|
10608
|
-
|
|
10611
|
+
var containerAttributes = reviewsContainerId
|
|
10612
|
+
? {
|
|
10613
|
+
href: reviewsContainerId,
|
|
10614
|
+
}
|
|
10615
|
+
: {};
|
|
10616
|
+
return (jsxs$1(Container$x, __assign$1({ as: reviewsContainerId ? 'a' : 'div' }, containerAttributes, { "data-testid": "Container" }, { children: [jsx$1(StarList, { rating: rating, size: size, starsNumber: starsNumber, fill: theme.component.stars.element.color }, void 0), jsxs$1(CustomLabel, __assign$1({ theme: theme, size: size, wrapWithParenthesis: wrapWithParenthesis, underline: underline, "data-testid": "CustomLabel" }, { children: [reviews, " ", reviewsText] }), void 0)] }), void 0));
|
|
10609
10617
|
};
|
|
10610
10618
|
|
|
10611
10619
|
var Container$w = newStyled.div(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n display: flex;\n align-items: center;\n font-size: 0.88rem;\n"], ["\n display: flex;\n align-items: center;\n font-size: 0.88rem;\n"])));
|