@trafilea/afrodita-components 5.0.0-beta.42 → 5.0.0-beta.45
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 +26 -8
- package/build/index.esm.js.map +1 -1
- package/build/index.js +26 -8
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -356,7 +356,7 @@ interface IconWrapperProps {
|
|
|
356
356
|
fill?: string;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
declare const Mail: ({ height, width }: IconWrapperProps) => JSX.Element;
|
|
359
|
+
declare const Mail: ({ height, width, }: Pick<IconWrapperProps, 'width' | 'height'>) => JSX.Element;
|
|
360
360
|
|
|
361
361
|
declare const Messaging_QuestionCircle: typeof QuestionCircle;
|
|
362
362
|
declare const Messaging_Messenger: typeof Messenger;
|
|
@@ -1634,6 +1634,8 @@ declare const RadioInput: ({ name, value, id, label, checked, disabled, onChange
|
|
|
1634
1634
|
declare type PortalProps = {
|
|
1635
1635
|
id: string;
|
|
1636
1636
|
className?: string;
|
|
1637
|
+
overflow?: boolean;
|
|
1638
|
+
style?: CSSProperties;
|
|
1637
1639
|
};
|
|
1638
1640
|
declare const Portal: FC<PortalProps>;
|
|
1639
1641
|
|
package/build/index.esm.js
CHANGED
|
@@ -10607,13 +10607,22 @@ var CustomLabel = newStyled.div(function (_a) {
|
|
|
10607
10607
|
var starsNumber = 5;
|
|
10608
10608
|
var Rating = function (_a) {
|
|
10609
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
|
+
}
|
|
10610
10619
|
var theme = useTheme();
|
|
10611
10620
|
var containerAttributes = reviewsContainerId
|
|
10612
10621
|
? {
|
|
10613
10622
|
href: reviewsContainerId,
|
|
10614
10623
|
}
|
|
10615
10624
|
: {};
|
|
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));
|
|
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));
|
|
10617
10626
|
};
|
|
10618
10627
|
|
|
10619
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"])));
|
|
@@ -11830,13 +11839,13 @@ var ImageContainer = newStyled.div(function (_a) {
|
|
|
11830
11839
|
});
|
|
11831
11840
|
});
|
|
11832
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"])));
|
|
11833
|
-
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; });
|
|
11834
11843
|
var getStylesBySize = function (size) {
|
|
11835
11844
|
switch (size) {
|
|
11836
11845
|
case ComponentSize.Medium:
|
|
11837
11846
|
return {
|
|
11838
|
-
width: '
|
|
11839
|
-
height: '
|
|
11847
|
+
width: '205px',
|
|
11848
|
+
height: '274px',
|
|
11840
11849
|
};
|
|
11841
11850
|
case ComponentSize.Small:
|
|
11842
11851
|
return {
|
|
@@ -11851,8 +11860,8 @@ var getStylesBySize = function (size) {
|
|
|
11851
11860
|
/* istanbul ignore next */
|
|
11852
11861
|
default:
|
|
11853
11862
|
return {
|
|
11854
|
-
width: '
|
|
11855
|
-
height: '
|
|
11863
|
+
width: '205px',
|
|
11864
|
+
height: '274px',
|
|
11856
11865
|
};
|
|
11857
11866
|
}
|
|
11858
11867
|
};
|
|
@@ -12599,7 +12608,7 @@ var ProductGalleryMobile = function (_a) {
|
|
|
12599
12608
|
var templateObject_1$a;
|
|
12600
12609
|
|
|
12601
12610
|
var Portal = function (_a) {
|
|
12602
|
-
var id = _a.id, className = _a.className, children = _a.children;
|
|
12611
|
+
var id = _a.id, className = _a.className, children = _a.children, overflow = _a.overflow, style = _a.style;
|
|
12603
12612
|
var _b = useState(false), mounted = _b[0], setMounted = _b[1];
|
|
12604
12613
|
var container = useRef(null);
|
|
12605
12614
|
useEffect(function () {
|
|
@@ -12613,10 +12622,19 @@ var Portal = function (_a) {
|
|
|
12613
12622
|
throw new Error("Unable to find/create container (".concat(id, ")"));
|
|
12614
12623
|
}
|
|
12615
12624
|
element.dataset.testId = id;
|
|
12616
|
-
element.style.overflow = 'hidden';
|
|
12617
12625
|
setMounted(true);
|
|
12618
12626
|
container.current = element;
|
|
12619
12627
|
}, [id]);
|
|
12628
|
+
useEffect(function () {
|
|
12629
|
+
if (!mounted) {
|
|
12630
|
+
return;
|
|
12631
|
+
}
|
|
12632
|
+
container.current.style.overflow = overflow ? 'visible' : 'hidden';
|
|
12633
|
+
for (var key in style) {
|
|
12634
|
+
// @ts-ignore
|
|
12635
|
+
container.current.style[key] = style[key];
|
|
12636
|
+
}
|
|
12637
|
+
}, [style, overflow, mounted]);
|
|
12620
12638
|
useEffect(function () {
|
|
12621
12639
|
if (mounted) {
|
|
12622
12640
|
container.current.className = className !== null && className !== void 0 ? className : '';
|