@trafilea/afrodita-components 6.38.1 → 6.38.4

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.js CHANGED
@@ -5405,6 +5405,12 @@ var sizeOptions = [
5405
5405
  value: '4XL',
5406
5406
  disabled: false,
5407
5407
  },
5408
+ {
5409
+ key: '4XL / 10XXL',
5410
+ label: '4XL / 10XXL',
5411
+ value: '4XL / 10XXL',
5412
+ disabled: false,
5413
+ },
5408
5414
  ];
5409
5415
 
5410
5416
  var ErrorText = newStyled.h3(templateObject_1$20 || (templateObject_1$20 = __makeTemplateObject(["\n color: ", " !important;\n font-size: 0.75rem;\n font-weight: 600;\n margin: 0;\n font-height: 1rem;\n margin-left: 0.313rem;\n"], ["\n color: ", " !important;\n font-size: 0.75rem;\n font-weight: 600;\n margin: 0;\n font-height: 1rem;\n margin-left: 0.313rem;\n"])), function (props) { return props.color; });
@@ -21862,7 +21868,7 @@ var SubscriptionPlanSelector = function (_a) {
21862
21868
  }, useV2Style: true, checked: !radiosStatuses.oneTime.disabled && radiosStatuses.oneTime.checked, disabled: radiosStatuses.oneTime.disabled }, void 0), jsxRuntime.jsx(StyledPrice, { testId: "single-purchase", finalPrice: "$".concat(decimalFormat(Number(discountedPrice))), disabled: radiosStatuses.oneTime.disabled, highlighted: !radiosStatuses.oneTime.disabled && radiosStatuses.oneTime.highlighted, size: exports.ComponentSize.Large, originalPrice: "$".concat(decimalFormat(Number(listPrice))) }, void 0)] }), void 0)] }), void 0));
21863
21869
  };
21864
21870
 
21865
- var Container = newStyled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n margin-bottom: 20px;\n border: 1px;\n padding: 12px;\n border-radius: 8px;\n gap: 14px;\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n margin-bottom: 20px;\n border: 1px;\n padding: 12px;\n border-radius: 8px;\n gap: 14px;\n"])));
21871
+ var Container = newStyled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 12px;\n border: 1px solid #e5e5e5;\n border-radius: 8px;\n gap: 14px;\n margin: auto;\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 12px;\n border: 1px solid #e5e5e5;\n border-radius: 8px;\n gap: 14px;\n margin: auto;\n"])));
21866
21872
  var Body = newStyled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n gap: 8px;\n width: 100%;\n height: ", ";\n"], ["\n display: flex;\n gap: 8px;\n width: 100%;\n height: ", ";\n"])), function (_a) {
21867
21873
  var height = _a.height;
21868
21874
  return height;
@@ -21900,28 +21906,33 @@ var Title = function (_a) {
21900
21906
  };
21901
21907
 
21902
21908
  var OfferAtCart = function (_a) {
21903
- var className = _a.className, title = _a.title, _b = _a.image, src = _b.src, alt = _b.alt, benefits = _a.benefits, _c = _a.ctaText, ctaText = _c === void 0 ? 'Yes, I want this offer' : _c, sizeOptions = _a.sizeOptions, rating = _a.rating, onAddToCart = _a.onAddToCart;
21909
+ var className = _a.className, _b = _a.title, titleContent = _b.content, bold = _b.bold, _c = _a.image, src = _c.src, alt = _c.alt, benefits = _a.benefits, _d = _a.ctaText, ctaText = _d === void 0 ? 'Yes, I want this offer' : _d, sizeOptions = _a.sizeOptions, rating = _a.rating, onAddToCart = _a.onAddToCart;
21904
21910
  var theme = useTheme();
21905
21911
  var isMobile = useDeviceType() === 'mobile';
21906
- var _d = React$2.useState(), selectedSize = _d[0], setSelectedSize = _d[1];
21907
- var _e = React$2.useState(false), showErrorMessage = _e[0], setShowErrorMessage = _e[1];
21912
+ var _e = React$2.useState(), selectedSize = _e[0], setSelectedSize = _e[1];
21913
+ var _f = React$2.useState(false), showErrorMessage = _f[0], setShowErrorMessage = _f[1];
21908
21914
  var rawBenefitStyles = {
21909
21915
  fontSize: isMobile ? '12px' : '14px',
21910
21916
  lineHeight: isMobile ? '16px' : '22px',
21911
21917
  display: 'inline-block',
21912
21918
  margin: 0,
21913
21919
  };
21914
- var TitleSection = isDangerouslySetInnerHTML(title) ? (jsxRuntime.jsx(Title, { dangerouslySetInnerHTML: title }, void 0)) : (jsxRuntime.jsx(Title, { content: title }, void 0));
21915
- var renderBenefit = function (text) {
21916
- if (React$2.isValidElement(text)) {
21917
- return text;
21920
+ var getTitleProps = function () {
21921
+ if (typeof titleContent === 'string') {
21922
+ return { content: titleContent, bold: bold };
21918
21923
  }
21919
- else if (typeof text === 'string') {
21920
- return jsxRuntime.jsx("span", { style: rawBenefitStyles, dangerouslySetInnerHTML: { __html: text } }, void 0);
21924
+ else if (isDangerouslySetInnerHTML(titleContent)) {
21925
+ return { dangerouslySetInnerHTML: titleContent };
21921
21926
  }
21922
21927
  else {
21923
- return null;
21928
+ return { content: titleContent };
21929
+ }
21930
+ };
21931
+ var renderBenefit = function (text) {
21932
+ if (typeof text === 'string') {
21933
+ return jsxRuntime.jsx("span", { style: rawBenefitStyles, dangerouslySetInnerHTML: { __html: text } }, void 0);
21924
21934
  }
21935
+ return text;
21925
21936
  };
21926
21937
  var BenefitsSection = (jsxRuntime.jsx(Benefits, __assign$1({ height: isMobile ? '100%' : '65%' }, { children: benefits.map(function (_a) {
21927
21938
  var icon = _a.icon, text = _a.text;
@@ -21939,7 +21950,7 @@ var OfferAtCart = function (_a) {
21939
21950
  setShowErrorMessage(true);
21940
21951
  }
21941
21952
  } }, void 0)] }, void 0));
21942
- return (jsxRuntime.jsxs(Container, __assign$1({ className: className }, { children: [TitleSection, jsxRuntime.jsxs(Body, __assign$1({ height: isMobile ? '120px' : '162px' }, { children: [jsxRuntime.jsxs(ImageWrapper, __assign$1({ width: isMobile ? '130px' : '122px' }, { children: [rating && (jsxRuntime.jsxs(RatingWrapper, { children: [jsxRuntime.jsx(Rating, { rating: rating, size: isMobile ? exports.ComponentSize.XXSmall : exports.ComponentSize.XSmall }, void 0), jsxRuntime.jsxs(RatingText, __assign$1({ fontSize: isMobile ? '9px' : '13px' }, { children: [rating, "/5"] }), void 0)] }, void 0)), jsxRuntime.jsx(Image$3, { src: src, alt: alt, width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }, void 0)] }), void 0), jsxRuntime.jsxs(RightContent, { children: [BenefitsSection, !isMobile && ActionsSection, showErrorMessage && (jsxRuntime.jsx(Text$7, __assign$1({ variant: "body", weight: "demi", size: "small", color: theme.colors.semantic.urgent.color }, { children: "Please select a size First" }), void 0))] }, void 0)] }), void 0), isMobile && ActionsSection] }), void 0));
21953
+ return (jsxRuntime.jsxs(Container, __assign$1({ className: className }, { children: [jsxRuntime.jsx(Title, __assign$1({}, getTitleProps()), void 0), jsxRuntime.jsxs(Body, __assign$1({ height: isMobile ? '120px' : '162px' }, { children: [jsxRuntime.jsxs(ImageWrapper, __assign$1({ width: isMobile ? '130px' : '122px' }, { children: [rating && (jsxRuntime.jsxs(RatingWrapper, { children: [jsxRuntime.jsx(Rating, { rating: rating, size: isMobile ? exports.ComponentSize.XXSmall : exports.ComponentSize.XSmall }, void 0), jsxRuntime.jsxs(RatingText, __assign$1({ fontSize: isMobile ? '9px' : '13px' }, { children: [rating, "/5"] }), void 0)] }, void 0)), jsxRuntime.jsx(Image$3, { src: src, alt: alt, width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }, void 0)] }), void 0), jsxRuntime.jsxs(RightContent, { children: [BenefitsSection, !isMobile && ActionsSection, showErrorMessage && (jsxRuntime.jsx(Text$7, __assign$1({ variant: "body", weight: "demi", size: "small", color: theme.colors.semantic.urgent.color }, { children: "Please select a size First" }), void 0))] }, void 0)] }), void 0), isMobile && ActionsSection] }), void 0));
21943
21954
  };
21944
21955
 
21945
21956
  exports.AbsorbencyLevel = AbsorbencyLevel;