@trafilea/afrodita-components 5.0.0-beta.40 → 5.0.0-beta.43
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 +32 -15
- package/build/index.esm.js.map +1 -1
- package/build/index.js +32 -15
- 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,30 @@ 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;
|
|
10610
|
+
function handleAnchorClick(e) {
|
|
10611
|
+
var _a;
|
|
10612
|
+
e.preventDefault();
|
|
10613
|
+
if (reviewsContainerId) {
|
|
10614
|
+
(_a = document.querySelector(reviewsContainerId)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
10615
|
+
behavior: 'smooth',
|
|
10616
|
+
});
|
|
10617
|
+
}
|
|
10618
|
+
}
|
|
10607
10619
|
var theme = useTheme();
|
|
10608
|
-
|
|
10620
|
+
var containerAttributes = reviewsContainerId
|
|
10621
|
+
? {
|
|
10622
|
+
href: reviewsContainerId,
|
|
10623
|
+
}
|
|
10624
|
+
: {};
|
|
10625
|
+
return (jsxs$1(Container$x, __assign$1({ as: reviewsContainerId ? 'a' : 'div' }, containerAttributes, { "data-testid": "Container", onClick: handleAnchorClick }, { 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
10626
|
};
|
|
10610
10627
|
|
|
10611
10628
|
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"])));
|
|
@@ -11822,13 +11839,13 @@ var ImageContainer = newStyled.div(function (_a) {
|
|
|
11822
11839
|
});
|
|
11823
11840
|
});
|
|
11824
11841
|
var Container$f = newStyled.a(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: min-content;\n text-decoration: none;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: min-content;\n text-decoration: none;\n"])));
|
|
11825
|
-
var H1 = newStyled.h1(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n font-size: 0.
|
|
11842
|
+
var H1 = newStyled.h1(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n font-size: 0.83rem;\n font-weight: normal;\n line-height: 1.375rem;\n min-height: 2.75rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"], ["\n font-size: 0.83rem;\n font-weight: normal;\n line-height: 1.375rem;\n min-height: 2.75rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"])), function (props) { return props.theme.colors.pallete.secondary.color; }, function (props) { return props.align; });
|
|
11826
11843
|
var getStylesBySize = function (size) {
|
|
11827
11844
|
switch (size) {
|
|
11828
11845
|
case ComponentSize.Medium:
|
|
11829
11846
|
return {
|
|
11830
|
-
width: '
|
|
11831
|
-
height: '
|
|
11847
|
+
width: '205px',
|
|
11848
|
+
height: '274px',
|
|
11832
11849
|
};
|
|
11833
11850
|
case ComponentSize.Small:
|
|
11834
11851
|
return {
|
|
@@ -11843,8 +11860,8 @@ var getStylesBySize = function (size) {
|
|
|
11843
11860
|
/* istanbul ignore next */
|
|
11844
11861
|
default:
|
|
11845
11862
|
return {
|
|
11846
|
-
width: '
|
|
11847
|
-
height: '
|
|
11863
|
+
width: '205px',
|
|
11864
|
+
height: '274px',
|
|
11848
11865
|
};
|
|
11849
11866
|
}
|
|
11850
11867
|
};
|
|
@@ -12117,8 +12134,8 @@ var Input = newStyled.input(function (props) { return ({
|
|
|
12117
12134
|
}); });
|
|
12118
12135
|
|
|
12119
12136
|
var Button$1 = newStyled.button(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n position: absolute;\n right: 1rem;\n background: white;\n border: none;\n align-self: center;\n padding: 0;\n ", ",\n"], ["\n position: absolute;\n right: 1rem;\n background: white;\n border: none;\n align-self: center;\n padding: 0;\n ", ",\n"])), mediaQueries({
|
|
12120
|
-
right: ['1rem', '
|
|
12121
|
-
top: ['0.75rem', '0'],
|
|
12137
|
+
right: ['1rem', '7.75rem'],
|
|
12138
|
+
top: ['0.75rem', '0.75rem'],
|
|
12122
12139
|
}));
|
|
12123
12140
|
var ClearButton = function (_a) {
|
|
12124
12141
|
var onClick = _a.onClick;
|
|
@@ -12193,7 +12210,7 @@ var SearchControl = function (_a) {
|
|
|
12193
12210
|
borderTopLeftRadius: 0,
|
|
12194
12211
|
borderBottomLeftRadius: 0,
|
|
12195
12212
|
padding: '0.875rem 1.5rem',
|
|
12196
|
-
}, text: "SEARCH", onClick: onSearch }, void 0), jsx(ClearButton, { onClick: onClose }, void 0)] }, void 0));
|
|
12213
|
+
}, text: "SEARCH", onClick: onSearch }, void 0), open && jsx(ClearButton, { onClick: onClose }, void 0)] }, void 0));
|
|
12197
12214
|
}
|
|
12198
12215
|
};
|
|
12199
12216
|
|