@trafilea/afrodita-components 6.28.4 → 6.28.6
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 +31 -14
- package/build/index.esm.js +80 -80
- package/build/index.js +80 -79
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -3718,10 +3718,10 @@ function ClubPriceMemberLabel(_a) {
|
|
|
3718
3718
|
|
|
3719
3719
|
var Container$1g = newStyled.div(templateObject_1$23 || (templateObject_1$23 = __makeTemplateObject(["\n @keyframes shimmer {\n 100% {\n transform: translateX(100%);\n }\n }\n\n display: inline-block;\n height: ", ";\n width: ", ";\n position: relative;\n overflow: hidden;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n\n ::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(\n 90deg,\n ", ",\n ", ",\n ", "\n );\n animation: shimmer 2s infinite;\n content: '';\n box-sizing: border-box;\n }\n"], ["\n @keyframes shimmer {\n 100% {\n transform: translateX(100%);\n }\n }\n\n display: inline-block;\n height: ", ";\n width: ", ";\n position: relative;\n overflow: hidden;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n\n ::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(\n 90deg,\n ", ",\n ", ",\n ", "\n );\n animation: shimmer 2s infinite;\n content: '';\n box-sizing: border-box;\n }\n"])), function (_a) {
|
|
3720
3720
|
var height = _a.height;
|
|
3721
|
-
return
|
|
3721
|
+
return height !== null && height !== void 0 ? height : '1.5em';
|
|
3722
3722
|
}, function (_a) {
|
|
3723
3723
|
var width = _a.width;
|
|
3724
|
-
return
|
|
3724
|
+
return width !== null && width !== void 0 ? width : '100%';
|
|
3725
3725
|
}, function (_a) {
|
|
3726
3726
|
var theme = _a.theme;
|
|
3727
3727
|
return theme.colors.background.disabled;
|
|
@@ -20093,9 +20093,56 @@ var Timer = function (_a) {
|
|
|
20093
20093
|
return (jsxRuntime.jsxs(TimerContainer$1, __assign$1({ "data-testid": "Time", timerColor: timerColor }, { children: [showHours && (hours || displayZeroValues) && "".concat(hours, "h "), (minutes || displayZeroValues) && "".concat(minutes, "m "), showSeconds && "".concat(seconds, "s")] }), void 0));
|
|
20094
20094
|
};
|
|
20095
20095
|
|
|
20096
|
-
var
|
|
20097
|
-
|
|
20098
|
-
|
|
20096
|
+
var slideInAnimation = function (distanceFromTop) {
|
|
20097
|
+
if (distanceFromTop === void 0) { distanceFromTop = '124px'; }
|
|
20098
|
+
return keyframes(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n from {\n top: 0;\n }\n to {\n top: ", ";\n }\n"], ["\n from {\n top: 0;\n }\n to {\n top: ", ";\n }\n"])), distanceFromTop);
|
|
20099
|
+
};
|
|
20100
|
+
var mobileSlideInAnimation = function (distanceFromTop) {
|
|
20101
|
+
if (distanceFromTop === void 0) { distanceFromTop = '85px'; }
|
|
20102
|
+
return keyframes(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n from {\n top: 0;\n }\n to {\n top: ", ";\n }\n"], ["\n from {\n top: 0;\n }\n to {\n top: ", ";\n }\n"])), distanceFromTop);
|
|
20103
|
+
};
|
|
20104
|
+
var ToastContainer = newStyled.div(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n"], ["\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n"])));
|
|
20105
|
+
var ToastContent = newStyled.div(templateObject_4$b || (templateObject_4$b = __makeTemplateObject(["\n position: fixed;\n top: ", "; \n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border-radius: 8px;\n background: #fff;\n box-shadow: 0 6px 24px -6px rgba(0, 0, 0, 0.2);\n width: 730px;\n animation: ", " 0.5s ease;\n\n @media (max-width: 768px) {\n width: calc(100vw - 32px);\n top: ", ";\n min-width: auto;\n animation: ", " 0.5s ease;\n }\n"], ["\n position: fixed;\n top: ", "; \n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border-radius: 8px;\n background: #fff;\n box-shadow: 0 6px 24px -6px rgba(0, 0, 0, 0.2);\n width: 730px;\n animation: ", " 0.5s ease;\n\n @media (max-width: 768px) {\n width: calc(100vw - 32px);\n top: ", ";\n min-width: auto;\n animation: ", " 0.5s ease;\n }\n"])), function (_a) {
|
|
20106
|
+
var distanceFromTop = _a.distanceFromTop;
|
|
20107
|
+
return distanceFromTop || '124px';
|
|
20108
|
+
}, function (_a) {
|
|
20109
|
+
var distanceFromTop = _a.distanceFromTop;
|
|
20110
|
+
return slideInAnimation(distanceFromTop);
|
|
20111
|
+
}, function (_a) {
|
|
20112
|
+
var distanceFromTop = _a.distanceFromTop;
|
|
20113
|
+
return distanceFromTop || '85px';
|
|
20114
|
+
}, function (_a) {
|
|
20115
|
+
var distanceFromTop = _a.distanceFromTop;
|
|
20116
|
+
return mobileSlideInAnimation(distanceFromTop);
|
|
20117
|
+
});
|
|
20118
|
+
var ToastText = newStyled.p(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n font-size: 14px;\n font-weight: 500;\n line-height: 24px;\n margin: 0;\n color: ", ";\n\n @media (max-width: 768px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n }\n"], ["\n font-size: 14px;\n font-weight: 500;\n line-height: 24px;\n margin: 0;\n color: ", ";\n\n @media (max-width: 768px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n }\n"])), function (_a) {
|
|
20119
|
+
var severity = _a.severity;
|
|
20120
|
+
return severity === 'error' ? '#C64844' : '#292929';
|
|
20121
|
+
});
|
|
20122
|
+
var CloseIcon = newStyled.div(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n margin-inline-start: auto;\n cursor: pointer;\n"], ["\n margin-inline-start: auto;\n cursor: pointer;\n"])));
|
|
20123
|
+
var templateObject_1$e, templateObject_2$c, templateObject_3$b, templateObject_4$b, templateObject_5$a, templateObject_6$9;
|
|
20124
|
+
|
|
20125
|
+
var Toast = React__default["default"].forwardRef(function (_a, ref) {
|
|
20126
|
+
var severity = _a.severity, summary = _a.summary, life = _a.life, _b = _a.withCloseIcon, withCloseIcon = _b === void 0 ? true : _b, distanceFromTop = _a.distanceFromTop;
|
|
20127
|
+
var _c = React$2.useState(false), isVisible = _c[0], setIsVisible = _c[1];
|
|
20128
|
+
React$2.useEffect(function () {
|
|
20129
|
+
if (isVisible) {
|
|
20130
|
+
var timeout_1 = setTimeout(function () {
|
|
20131
|
+
setIsVisible(false);
|
|
20132
|
+
}, life || 3000);
|
|
20133
|
+
return function () { return clearTimeout(timeout_1); };
|
|
20134
|
+
}
|
|
20135
|
+
}, [isVisible, life]);
|
|
20136
|
+
React$2.useImperativeHandle(ref, function () { return ({
|
|
20137
|
+
show: function () { return setIsVisible(true); },
|
|
20138
|
+
}); });
|
|
20139
|
+
return (jsxRuntime.jsx(ToastContainer, __assign$1({ "data-testid": "toast-container" }, { children: isVisible && (jsxRuntime.jsxs(ToastContent, __assign$1({ "data-testid": "toast-content", distanceFromTop: distanceFromTop }, { children: [severity === 'success' && (jsxRuntime.jsx(Icon.Actions.CircleSolidCheck, { height: "1.5rem", width: "1.5rem", fill: "#4CBEA4" }, void 0)), severity === 'error' && (jsxRuntime.jsx(Icon.Actions.CircleSolidWarning, { height: "1.5rem", width: "1.5rem", fill: "#C64844" }, void 0)), jsxRuntime.jsx(ToastText, __assign$1({ severity: severity }, { children: summary }), void 0), withCloseIcon && (jsxRuntime.jsx(CloseIcon, __assign$1({ role: "button", onClick: function () { return setIsVisible(false); }, "data-testid": "close-icon" }, { children: jsxRuntime.jsx(Icon.Actions.Close, { height: "1.1rem", width: "1.1rem", fill: "#5A5A5A" }, void 0) }), void 0))] }), void 0)) }), void 0));
|
|
20140
|
+
});
|
|
20141
|
+
Toast.displayName = 'Toast';
|
|
20142
|
+
|
|
20143
|
+
var Wrapper$1 = newStyled.div(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"])));
|
|
20144
|
+
var GrandTotal = newStyled.h1(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ", ";\n display: block;\n align-items: center;\n"], ["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ", ";\n display: block;\n align-items: center;\n"])), function (props) { return props.color; });
|
|
20145
|
+
var Currency = newStyled.span(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ", ";\n font-size: ", ";\n line-height: ", ";\n align-self: ", ";\n"], ["\n margin: 0;\n margin-right: 0.625rem;\n font-weight: 600;\n color: ", ";\n font-size: ", ";\n line-height: ", ";\n align-self: ", ";\n"])), function (_a) {
|
|
20099
20146
|
var theme = _a.theme;
|
|
20100
20147
|
return theme.component.total.basicTotal.currency.color;
|
|
20101
20148
|
}, function (_a) {
|
|
@@ -20108,21 +20155,21 @@ var Currency = newStyled.span(templateObject_3$b || (templateObject_3$b = __make
|
|
|
20108
20155
|
var theme = _a.theme;
|
|
20109
20156
|
return theme.component.total.basicTotal.currency.alignSelf;
|
|
20110
20157
|
});
|
|
20111
|
-
var Container$9 = newStyled.div(templateObject_4$
|
|
20158
|
+
var Container$9 = newStyled.div(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ", ";\n align-items: center;\n"], ["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ", ";\n align-items: center;\n"])), function (_a) {
|
|
20112
20159
|
var highlightColor = _a.highlightColor;
|
|
20113
20160
|
return highlightColor;
|
|
20114
20161
|
});
|
|
20115
|
-
var TotalContainer = newStyled(Container$9)(templateObject_5$
|
|
20162
|
+
var TotalContainer = newStyled(Container$9)(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n justify-content: ", ";\n margin-top: 0;\n"], ["\n justify-content: ", ";\n margin-top: 0;\n"])), function (_a) {
|
|
20116
20163
|
var showTotalLabel = _a.showTotalLabel;
|
|
20117
20164
|
return (showTotalLabel ? 'space-between' : 'flex-end');
|
|
20118
20165
|
});
|
|
20119
|
-
var DiscountText = newStyled.h3(templateObject_6$
|
|
20166
|
+
var DiscountText = newStyled.h3(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n"], ["\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n font-weight: 600;\n"])));
|
|
20120
20167
|
var DiscountAmount = newStyled.h3(templateObject_7$8 || (templateObject_7$8 = __makeTemplateObject(["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ", ";\n"], ["\n margin: 0;\n font-size: 18px;\n line-height: 28px;\n font-weight: ", ";\n"])), function (_a) {
|
|
20121
20168
|
var theme = _a.theme;
|
|
20122
20169
|
return theme.component.total.basicTotal.savings.amountFontWeight;
|
|
20123
20170
|
});
|
|
20124
20171
|
var TotalLabel = newStyled(Text$7)(templateObject_8$6 || (templateObject_8$6 = __makeTemplateObject(["\n font-size: 20px;\n"], ["\n font-size: 20px;\n"])));
|
|
20125
|
-
var templateObject_1$
|
|
20172
|
+
var templateObject_1$d, templateObject_2$b, templateObject_3$a, templateObject_4$a, templateObject_5$9, templateObject_6$8, templateObject_7$8, templateObject_8$6;
|
|
20126
20173
|
|
|
20127
20174
|
var Total = function (_a) {
|
|
20128
20175
|
var total = _a.total, currency = _a.currency, saving = _a.saving, _b = _a.highlightColor, highlightColor = _b === void 0 ? '#2f806a' : _b, _c = _a.showTotalLabel, showTotalLabel = _c === void 0 ? false : _c;
|
|
@@ -20130,19 +20177,19 @@ var Total = function (_a) {
|
|
|
20130
20177
|
return (jsxRuntime.jsxs(Wrapper$1, __assign$1({ "data-testid": "total-wrapper" }, { children: [jsxRuntime.jsxs(TotalContainer, __assign$1({ showTotalLabel: showTotalLabel }, { children: [showTotalLabel && (jsxRuntime.jsx(TotalLabel, __assign$1({ variant: "heading6", size: "regular", weight: "bold" }, { children: "Total" }), void 0)), jsxRuntime.jsxs(GrandTotal, __assign$1({ color: theme.component.total.basicTotal.amount.color, "data-testid": "total-price" }, { children: [jsxRuntime.jsx(Currency, { children: currency }, void 0), total] }), void 0)] }), void 0), saving && (jsxRuntime.jsxs(Container$9, __assign$1({ "data-testid": "subtotal-container", highlightColor: highlightColor }, { children: [jsxRuntime.jsx(DiscountText, __assign$1({ "data-testid": "saving-title" }, { children: saving.savingText }), void 0), jsxRuntime.jsx(DiscountAmount, __assign$1({ "data-testid": "saving-price" }, { children: saving.amount }), void 0)] }), void 0))] }), void 0));
|
|
20131
20178
|
};
|
|
20132
20179
|
|
|
20133
|
-
var Wrapper = newStyled.div(templateObject_1$
|
|
20180
|
+
var Wrapper = newStyled.div(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
20134
20181
|
var color = _a.color;
|
|
20135
20182
|
return color;
|
|
20136
20183
|
});
|
|
20137
|
-
var ItemContainer = newStyled.div(templateObject_2$
|
|
20138
|
-
var Item = newStyled.h4(templateObject_3$
|
|
20184
|
+
var ItemContainer = newStyled.div(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.625rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n"], ["\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.625rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n"])));
|
|
20185
|
+
var Item = newStyled.h4(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n margin: 0;\n font-size: 0.875rem;\n line-height: ", ";\n font-weight: ", ";\n"], ["\n margin: 0;\n font-size: 0.875rem;\n line-height: ", ";\n font-weight: ", ";\n"])), function (_a) {
|
|
20139
20186
|
var theme = _a.theme;
|
|
20140
20187
|
return theme.component.subTotal.basicSubTotal.lineHeight;
|
|
20141
20188
|
}, function (_a) {
|
|
20142
20189
|
var theme = _a.theme;
|
|
20143
20190
|
return theme.component.subTotal.basicSubTotal.weight;
|
|
20144
20191
|
});
|
|
20145
|
-
var CouponItem = newStyled(Item)(templateObject_4$
|
|
20192
|
+
var CouponItem = newStyled(Item)(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
20146
20193
|
var color = _a.color;
|
|
20147
20194
|
return color;
|
|
20148
20195
|
});
|
|
@@ -20155,60 +20202,13 @@ var Subtotal = function (_a) {
|
|
|
20155
20202
|
return (jsxRuntime.jsxs(ItemContainer, { children: [jsxRuntime.jsxs(CouponItem, __assign$1({ color: highlightColor, "data-testid": "discount-title" }, { children: [coupon.couponText, " ", code, " ", coupon.appliedText] }), void 0), jsxRuntime.jsx(CouponItem, __assign$1({ color: highlightColor, "data-testid": "discount-price" }, { children: amount }), void 0)] }, code));
|
|
20156
20203
|
})] }), void 0));
|
|
20157
20204
|
};
|
|
20158
|
-
var templateObject_1$
|
|
20205
|
+
var templateObject_1$c, templateObject_2$a, templateObject_3$9, templateObject_4$9;
|
|
20159
20206
|
|
|
20160
20207
|
var Totals = {
|
|
20161
20208
|
Total: Total,
|
|
20162
20209
|
Subtotal: Subtotal,
|
|
20163
20210
|
};
|
|
20164
20211
|
|
|
20165
|
-
var slideInAnimation = function (distanceFromTop) {
|
|
20166
|
-
if (distanceFromTop === void 0) { distanceFromTop = '124px'; }
|
|
20167
|
-
return keyframes(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n from {\n top: 0;\n }\n to {\n top: ", ";\n }\n"], ["\n from {\n top: 0;\n }\n to {\n top: ", ";\n }\n"])), distanceFromTop);
|
|
20168
|
-
};
|
|
20169
|
-
var mobileSlideInAnimation = function (distanceFromTop) {
|
|
20170
|
-
if (distanceFromTop === void 0) { distanceFromTop = '85px'; }
|
|
20171
|
-
return keyframes(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n from {\n top: 0;\n }\n to {\n top: ", ";\n }\n"], ["\n from {\n top: 0;\n }\n to {\n top: ", ";\n }\n"])), distanceFromTop);
|
|
20172
|
-
};
|
|
20173
|
-
var ToastContainer = newStyled.div(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n"], ["\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n"])));
|
|
20174
|
-
var ToastContent = newStyled.div(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n position: fixed;\n top: ", "; \n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border-radius: 8px;\n background: #fff;\n box-shadow: 0 6px 24px -6px rgba(0, 0, 0, 0.2);\n width: 730px;\n animation: ", " 0.5s ease;\n\n @media (max-width: 768px) {\n width: calc(100vw - 32px);\n top: ", ";\n min-width: auto;\n animation: ", " 0.5s ease;\n }\n"], ["\n position: fixed;\n top: ", "; \n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border-radius: 8px;\n background: #fff;\n box-shadow: 0 6px 24px -6px rgba(0, 0, 0, 0.2);\n width: 730px;\n animation: ", " 0.5s ease;\n\n @media (max-width: 768px) {\n width: calc(100vw - 32px);\n top: ", ";\n min-width: auto;\n animation: ", " 0.5s ease;\n }\n"])), function (_a) {
|
|
20175
|
-
var distanceFromTop = _a.distanceFromTop;
|
|
20176
|
-
return distanceFromTop || '124px';
|
|
20177
|
-
}, function (_a) {
|
|
20178
|
-
var distanceFromTop = _a.distanceFromTop;
|
|
20179
|
-
return slideInAnimation(distanceFromTop);
|
|
20180
|
-
}, function (_a) {
|
|
20181
|
-
var distanceFromTop = _a.distanceFromTop;
|
|
20182
|
-
return distanceFromTop || '85px';
|
|
20183
|
-
}, function (_a) {
|
|
20184
|
-
var distanceFromTop = _a.distanceFromTop;
|
|
20185
|
-
return mobileSlideInAnimation(distanceFromTop);
|
|
20186
|
-
});
|
|
20187
|
-
var ToastText = newStyled.p(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n font-size: 14px;\n font-weight: 500;\n line-height: 24px;\n margin: 0;\n color: ", ";\n\n @media (max-width: 768px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n }\n"], ["\n font-size: 14px;\n font-weight: 500;\n line-height: 24px;\n margin: 0;\n color: ", ";\n\n @media (max-width: 768px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n }\n"])), function (_a) {
|
|
20188
|
-
var severity = _a.severity;
|
|
20189
|
-
return severity === 'error' ? '#C64844' : '#292929';
|
|
20190
|
-
});
|
|
20191
|
-
var CloseIcon = newStyled.div(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n margin-inline-start: auto;\n cursor: pointer;\n"], ["\n margin-inline-start: auto;\n cursor: pointer;\n"])));
|
|
20192
|
-
var templateObject_1$c, templateObject_2$a, templateObject_3$9, templateObject_4$9, templateObject_5$9, templateObject_6$8;
|
|
20193
|
-
|
|
20194
|
-
var Toast = React__default["default"].forwardRef(function (_a, ref) {
|
|
20195
|
-
var severity = _a.severity, summary = _a.summary, life = _a.life, _b = _a.withCloseIcon, withCloseIcon = _b === void 0 ? true : _b, distanceFromTop = _a.distanceFromTop;
|
|
20196
|
-
var _c = React$2.useState(false), isVisible = _c[0], setIsVisible = _c[1];
|
|
20197
|
-
React$2.useEffect(function () {
|
|
20198
|
-
if (isVisible) {
|
|
20199
|
-
var timeout_1 = setTimeout(function () {
|
|
20200
|
-
setIsVisible(false);
|
|
20201
|
-
}, life || 3000);
|
|
20202
|
-
return function () { return clearTimeout(timeout_1); };
|
|
20203
|
-
}
|
|
20204
|
-
}, [isVisible, life]);
|
|
20205
|
-
React$2.useImperativeHandle(ref, function () { return ({
|
|
20206
|
-
show: function () { return setIsVisible(true); },
|
|
20207
|
-
}); });
|
|
20208
|
-
return (jsxRuntime.jsx(ToastContainer, __assign$1({ "data-testid": "toast-container" }, { children: isVisible && (jsxRuntime.jsxs(ToastContent, __assign$1({ "data-testid": "toast-content", distanceFromTop: distanceFromTop }, { children: [severity === 'success' && (jsxRuntime.jsx(Icon.Actions.CircleSolidCheck, { height: "1.5rem", width: "1.5rem", fill: "#4CBEA4" }, void 0)), severity === 'error' && (jsxRuntime.jsx(Icon.Actions.CircleSolidWarning, { height: "1.5rem", width: "1.5rem", fill: "#C64844" }, void 0)), jsxRuntime.jsx(ToastText, __assign$1({ severity: severity }, { children: summary }), void 0), withCloseIcon && (jsxRuntime.jsx(CloseIcon, __assign$1({ role: "button", onClick: function () { return setIsVisible(false); }, "data-testid": "close-icon" }, { children: jsxRuntime.jsx(Icon.Actions.Close, { height: "1.1rem", width: "1.1rem", fill: "#5A5A5A" }, void 0) }), void 0))] }), void 0)) }), void 0));
|
|
20209
|
-
});
|
|
20210
|
-
Toast.displayName = 'Toast';
|
|
20211
|
-
|
|
20212
20212
|
var Container$8 = newStyled.div(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
20213
20213
|
var CheckpointContainer$1 = newStyled.div(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
20214
20214
|
var CheckpointDate$1 = newStyled.div(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n padding-bottom: ", ";\n width: 60px;\n min-width: 60px;\n margin-right: 10px;\n"], ["\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n padding-bottom: ", ";\n width: 60px;\n min-width: 60px;\n margin-right: 10px;\n"])), function (props) { return props.currentSpace; });
|
|
@@ -20521,13 +20521,23 @@ newStyled.div(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject([
|
|
|
20521
20521
|
var DiscountLabel$2 = newStyled.div(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n background-color: #c64844;\n color: white;\n font-size: 10px;\n line-height: 14px;\n padding: 4px 6px 4px 6px;\n font-weight: bold;\n border-radius: 4px;\n margin-top: 2px;\n height: fit-content;\n &:empty {\n display: none;\n }\n"], ["\n background-color: #c64844;\n color: white;\n font-size: 10px;\n line-height: 14px;\n padding: 4px 6px 4px 6px;\n font-weight: bold;\n border-radius: 4px;\n margin-top: 2px;\n height: fit-content;\n &:empty {\n display: none;\n }\n"])));
|
|
20522
20522
|
var templateObject_1$5, templateObject_2$4, templateObject_3$4, templateObject_4$4, templateObject_5$4, templateObject_6$4, templateObject_7$4, templateObject_8$2;
|
|
20523
20523
|
|
|
20524
|
+
var PriceLabelDisplay = function (_a) {
|
|
20525
|
+
var price = _a.price, discountTag = _a.discountTag;
|
|
20526
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign$1({ style: { display: 'flex' } }, { children: [jsxRuntime.jsx(PriceLabel, { finalPrice: price.finalPrice, originalPrice: price.originalPrice, finalPriceStyled: false, color: price.color, size: exports.ComponentSize.Large, testId: "volume-discount" }, void 0), (discountTag === null || discountTag === void 0 ? void 0 : discountTag.pos) === 'next to price' && (jsxRuntime.jsx(DiscountLabel$2, __assign$1({ style: { marginLeft: '5px' } }, { children: discountTag === null || discountTag === void 0 ? void 0 : discountTag.value }), void 0))] }), void 0), jsxRuntime.jsx("div", __assign$1({ style: { display: 'flex' } }, { children: (discountTag === null || discountTag === void 0 ? void 0 : discountTag.pos) === 'below price' && (jsxRuntime.jsx(DiscountLabel$2, __assign$1({ style: { marginLeft: '5px' } }, { children: discountTag === null || discountTag === void 0 ? void 0 : discountTag.value }), void 0)) }), void 0)] }, void 0));
|
|
20527
|
+
};
|
|
20528
|
+
|
|
20529
|
+
var RatingDisplay = function (_a) {
|
|
20530
|
+
var rating = _a.rating, size = _a.size, isRatingLoading = _a.isRatingLoading;
|
|
20531
|
+
if (isRatingLoading) {
|
|
20532
|
+
return jsxRuntime.jsx(SkeletonBox, { "data-testid": "rating-skeleton", height: "20px", width: "80px" }, void 0);
|
|
20533
|
+
}
|
|
20534
|
+
if (!rating.reviews)
|
|
20535
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {}, void 0);
|
|
20536
|
+
return (jsxRuntime.jsx(Rating, { size: size === exports.ComponentSize.Large ? exports.ComponentSize.Small : exports.ComponentSize.XSmall, rating: rating.rating, reviews: rating.reviews, reviewsText: "", wrapWithParenthesis: true }, void 0));
|
|
20537
|
+
};
|
|
20538
|
+
|
|
20524
20539
|
var getStylesBySize$2 = function (size) {
|
|
20525
20540
|
switch (size) {
|
|
20526
|
-
case exports.ComponentSize.Medium:
|
|
20527
|
-
return {
|
|
20528
|
-
width: '205px',
|
|
20529
|
-
height: '274px',
|
|
20530
|
-
};
|
|
20531
20541
|
case exports.ComponentSize.Small:
|
|
20532
20542
|
return {
|
|
20533
20543
|
width: '167px',
|
|
@@ -20538,7 +20548,7 @@ var getStylesBySize$2 = function (size) {
|
|
|
20538
20548
|
width: '262px',
|
|
20539
20549
|
height: '350px',
|
|
20540
20550
|
};
|
|
20541
|
-
|
|
20551
|
+
case exports.ComponentSize.Medium:
|
|
20542
20552
|
default:
|
|
20543
20553
|
return {
|
|
20544
20554
|
width: '205px',
|
|
@@ -20551,7 +20561,7 @@ var TopTagContainer$2 = newStyled.div(templateObject_1$4 || (templateObject_1$4
|
|
|
20551
20561
|
return style.width;
|
|
20552
20562
|
});
|
|
20553
20563
|
var ProductCard = function (_a) {
|
|
20554
|
-
var title = _a.title, image = _a.image, imageHover = _a.imageHover, price = _a.price, rating = _a.rating, size = _a.size, _b = _a.alignName, alignName = _b === void 0 ? 'center' : _b, url = _a.url, className = _a.className, topTag = _a.topTag, bottomTag = _a.bottomTag, onClick = _a.onClick, priceLoading = _a.priceLoading, _c = _a.noFollow, noFollow = _c === void 0 ? false : _c, isRatingLoading = _a.isRatingLoading, discountTag = _a.discountTag;
|
|
20564
|
+
var title = _a.title, image = _a.image, imageHover = _a.imageHover, price = _a.price, rating = _a.rating, ratingPos = _a.ratingPos, size = _a.size, _b = _a.alignName, alignName = _b === void 0 ? 'center' : _b, url = _a.url, className = _a.className, topTag = _a.topTag, bottomTag = _a.bottomTag, onClick = _a.onClick, priceLoading = _a.priceLoading, _c = _a.noFollow, noFollow = _c === void 0 ? false : _c, isRatingLoading = _a.isRatingLoading, discountTag = _a.discountTag;
|
|
20555
20565
|
var theme = useTheme();
|
|
20556
20566
|
var styles = getStylesBySize$2(size);
|
|
20557
20567
|
var space = React$2.useMemo(function () {
|
|
@@ -20562,17 +20572,7 @@ var ProductCard = function (_a) {
|
|
|
20562
20572
|
_a[exports.ComponentSize.Small] = 2,
|
|
20563
20573
|
_a)[size];
|
|
20564
20574
|
}, [size]);
|
|
20565
|
-
|
|
20566
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign$1({ style: { display: 'flex' } }, { children: [jsxRuntime.jsx(PriceLabel, { finalPrice: price.finalPrice, originalPrice: price.originalPrice, finalPriceStyled: false, color: price.color, size: exports.ComponentSize.Large, testId: "volume-discount" }, void 0), (discountTag === null || discountTag === void 0 ? void 0 : discountTag.pos) === 'next to price' && (jsxRuntime.jsx(DiscountLabel$2, __assign$1({ style: { marginLeft: '5px' } }, { children: discountTag === null || discountTag === void 0 ? void 0 : discountTag.value }), void 0))] }), void 0), jsxRuntime.jsx("div", __assign$1({ style: { display: 'flex' } }, { children: (discountTag === null || discountTag === void 0 ? void 0 : discountTag.pos) === 'below price' && (jsxRuntime.jsx(DiscountLabel$2, __assign$1({ style: { marginLeft: '5px' } }, { children: discountTag === null || discountTag === void 0 ? void 0 : discountTag.value }), void 0)) }), void 0)] }, void 0));
|
|
20567
|
-
};
|
|
20568
|
-
var RatingDisplay = function () {
|
|
20569
|
-
if (isRatingLoading)
|
|
20570
|
-
return jsxRuntime.jsx(SkeletonBox, { "data-testid": "rating-skeleton", height: "20px", width: "80px" }, void 0);
|
|
20571
|
-
if (!rating.reviews)
|
|
20572
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, {}, void 0);
|
|
20573
|
-
return (jsxRuntime.jsx(Rating, { size: size === exports.ComponentSize.Large ? exports.ComponentSize.Small : exports.ComponentSize.XSmall, rating: rating.rating, reviews: rating.reviews, reviewsText: "", wrapWithParenthesis: true }, void 0));
|
|
20574
|
-
};
|
|
20575
|
-
return (jsxRuntime.jsxs(ProdCardContainer$2, __assign$1({ className: className, "data-testid": "product-card-container-div" }, { children: [jsxRuntime.jsxs(Container$4, __assign$1({ as: url ? 'a' : 'div', href: url, rel: noFollow ? 'nofollow' : '', className: "picContainer", onClick: onClick }, { children: [!!topTag || !!bottomTag ? (jsxRuntime.jsxs(ImageContainer$1, __assign$1({ width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height, "data-testid": "tags-image-container" }, { children: [jsxRuntime.jsx(Image$3, { src: image.src, srcSet: getSrcSet(image.src, 180, 360, 720, 960), alt: image.alt, width: "100%", height: "100%" }, void 0), jsxRuntime.jsx(TopTagContainer$2, __assign$1({ style: { width: 'inherit' } }, { children: topTag }), void 0), jsxRuntime.jsx(BottomTagContainer$2, __assign$1({ style: { width: 'inherit' } }, { children: bottomTag }), void 0)] }), void 0)) : (jsxRuntime.jsx(Image$3, { src: image.src, srcSet: getSrcSet(image.src, 180, 360, 720, 960), alt: image.alt, width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height }, void 0)), imageHover ? (jsxRuntime.jsx(ImageHoverContainer$1, { className: "hover__image", src: imageHover.src, srcSet: getSrcSet(imageHover.src, 180, 360, 720, 960), loading: "lazy", alt: imageHover.alt, width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height }, void 0)) : null] }), void 0), jsxRuntime.jsxs(Container$4, __assign$1({ as: url ? 'a' : 'div', href: url, rel: noFollow ? 'nofollow' : '', onClick: onClick, className: "textContainer", style: { alignItems: "".concat(size === exports.ComponentSize.Small ? 'start' : 'center') } }, { children: [jsxRuntime.jsx(Spacing, { size: space }, void 0), jsxRuntime.jsx(RatingDisplay, {}, void 0), jsxRuntime.jsx(Spacing, { size: space }, void 0), jsxRuntime.jsx(Title$2, __assign$1({ theme: theme, align: alignName }, { children: title }), void 0), jsxRuntime.jsx(Spacing, { size: space }, void 0), priceLoading ? jsxRuntime.jsx(SkeletonBox, { height: "20px", width: "140px" }, void 0) : PriceLabelDisplay(), jsxRuntime.jsx(Spacing, { size: space }, void 0)] }), void 0)] }), void 0));
|
|
20575
|
+
return (jsxRuntime.jsxs(ProdCardContainer$2, __assign$1({ className: className, "data-testid": "product-card-container-div" }, { children: [jsxRuntime.jsxs(Container$4, __assign$1({ as: url ? 'a' : 'div', href: url, rel: noFollow ? 'nofollow' : '', className: "picContainer", onClick: onClick }, { children: [!!topTag || !!bottomTag ? (jsxRuntime.jsxs(ImageContainer$1, __assign$1({ width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height, "data-testid": "tags-image-container" }, { children: [jsxRuntime.jsx(Image$3, { src: image.src, srcSet: getSrcSet(image.src, 180, 360, 720, 960), alt: image.alt, width: "100%", height: "100%" }, void 0), jsxRuntime.jsx(TopTagContainer$2, __assign$1({ style: { width: 'inherit' } }, { children: topTag }), void 0), jsxRuntime.jsx(BottomTagContainer$2, __assign$1({ style: { width: 'inherit' } }, { children: bottomTag }), void 0)] }), void 0)) : (jsxRuntime.jsx(Image$3, { src: image.src, srcSet: getSrcSet(image.src, 180, 360, 720, 960), alt: image.alt, width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height }, void 0)), imageHover ? (jsxRuntime.jsx(ImageHoverContainer$1, { className: "hover__image", src: imageHover.src, srcSet: getSrcSet(imageHover.src, 180, 360, 720, 960), loading: "lazy", alt: imageHover.alt, width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height }, void 0)) : null] }), void 0), jsxRuntime.jsxs(Container$4, __assign$1({ as: url ? 'a' : 'div', href: url, rel: noFollow ? 'nofollow' : '', onClick: onClick, className: "textContainer", style: { alignItems: "".concat(size === exports.ComponentSize.Small ? 'start' : 'center') } }, { children: [jsxRuntime.jsx(Spacing, { size: space }, void 0), ratingPos !== 'bottom' && (jsxRuntime.jsx(RatingDisplay, { rating: rating, size: size, isRatingLoading: isRatingLoading }, void 0)), jsxRuntime.jsx(Spacing, { size: space }, void 0), jsxRuntime.jsx(Title$2, __assign$1({ theme: theme, align: alignName }, { children: title }), void 0), jsxRuntime.jsx(Spacing, { size: space }, void 0), priceLoading ? (jsxRuntime.jsx(SkeletonBox, { height: "20px", width: "140px" }, void 0)) : (jsxRuntime.jsx(PriceLabelDisplay, { price: price, discountTag: discountTag }, void 0)), jsxRuntime.jsx(Spacing, { size: space }, void 0), ratingPos === 'bottom' && (jsxRuntime.jsx(RatingDisplay, { rating: rating, size: size, isRatingLoading: isRatingLoading }, void 0))] }), void 0)] }), void 0));
|
|
20576
20576
|
};
|
|
20577
20577
|
var templateObject_1$4;
|
|
20578
20578
|
|
|
@@ -20951,6 +20951,7 @@ exports.CategoryTag = CategoryTag;
|
|
|
20951
20951
|
exports.Checkbox = Checkbox;
|
|
20952
20952
|
exports.ClubOfferSelector = ClubOfferSelector;
|
|
20953
20953
|
exports.ClubOfferTag = ClubOfferTag;
|
|
20954
|
+
exports.ClubPriceMemberLabel = ClubPriceMemberLabel;
|
|
20954
20955
|
exports.ClubRadioGroupInput = ClubRadioGroupInput;
|
|
20955
20956
|
exports.Collection = Collection;
|
|
20956
20957
|
exports.CouponCard = CouponCard;
|