@trafilea/afrodita-components 6.47.0 → 6.47.2

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
@@ -6643,13 +6643,13 @@ var Title$8 = function (_a) {
6643
6643
  };
6644
6644
  var templateObject_1$1O;
6645
6645
 
6646
- var Container$19 = newStyled.div(templateObject_1$1N || (templateObject_1$1N = __makeTemplateObject(["\n margin: 0;\n padding: 0.25rem;\n display: inline-flex;\n cursor: pointer;\n width: ", ";\n height: ", ";\n justify-content: center;\n align-items: center;\n"], ["\n margin: 0;\n padding: 0.25rem;\n display: inline-flex;\n cursor: pointer;\n width: ", ";\n height: ", ";\n justify-content: center;\n align-items: center;\n"])), function (props) { return "".concat(props.size, "em"); }, function (props) { return "".concat(props.size, "em"); });
6646
+ var Container$19 = newStyled.div(templateObject_1$1N || (templateObject_1$1N = __makeTemplateObject(["\n margin: 0;\n padding: 0 0.1rem;\n display: inline-flex;\n cursor: pointer;\n width: ", ";\n height: ", ";\n justify-content: flex-end;\n align-items: flex-start;\n"], ["\n margin: 0;\n padding: 0 0.1rem;\n display: inline-flex;\n cursor: pointer;\n width: ", ";\n height: ", ";\n justify-content: flex-end;\n align-items: flex-start;\n"])), function (props) { return "".concat(props.size, "em"); }, function (props) { return "".concat(props.size, "em"); });
6647
6647
  var templateObject_1$1N;
6648
6648
 
6649
6649
  var TrashButton = function (_a) {
6650
6650
  var onClick = _a.onClick, size = _a.size;
6651
6651
  useTheme();
6652
- return (jsxRuntime.jsx(Container$19, __assign$1({ onClick: onClick, "data-testid": "CartProductItemTrashBtn", size: size }, { children: jsxRuntime.jsx(Icon.Actions.Trash, { width: size - 1, height: size - 1, fill: "#292929" }, void 0) }), void 0));
6652
+ return (jsxRuntime.jsx(Container$19, __assign$1({ onClick: onClick, "data-testid": "CartProductItemTrashBtn", size: size }, { children: jsxRuntime.jsx(Icon.Actions.Trash, { width: size, height: size, fill: "#292929" }, void 0) }), void 0));
6653
6653
  };
6654
6654
 
6655
6655
  var CartProductItem = {
@@ -20325,11 +20325,18 @@ var Benefits$1 = newStyled.div(templateObject_8$7 || (templateObject_8$7 = __mak
20325
20325
  });
20326
20326
  var templateObject_1$q, templateObject_2$j, templateObject_3$i, templateObject_4$f, templateObject_5$e, templateObject_6$b, templateObject_7$a, templateObject_8$7;
20327
20327
 
20328
+ var renderCopy = function (copy) {
20329
+ if (typeof copy === 'string') {
20330
+ return jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: copy } }, void 0);
20331
+ }
20332
+ return copy;
20333
+ };
20328
20334
  var AutoshipPdpCard = function (_a) {
20335
+ var _b, _c;
20329
20336
  var handleWithoutSavings = _a.handleWithoutSavings, handleSavings = _a.handleSavings, title = _a.title, ctaText = _a.ctaText, ctaTextNoSavings = _a.ctaTextNoSavings, className = _a.className, benefits = _a.benefits, bottomCopy = _a.bottomCopy;
20330
- return (jsxRuntime.jsxs(Container$k, __assign$1({ className: className }, { children: [jsxRuntime.jsxs(SubscriptionContainer$2, __assign$1({ "data-testid": "subscription-container" }, { children: [jsxRuntime.jsxs(SubscriptionHeader$2, { children: [jsxRuntime.jsx(Text$7, { variant: "label", dangerouslySetInnerHTML: { __html: title !== null && title !== void 0 ? title : '' } }, void 0), jsxRuntime.jsx(ButtonPrimary, { wide: true, text: ctaText !== null && ctaText !== void 0 ? ctaText : 'Yes, I want this offer', size: exports.ComponentSize.Small, onClick: function () {
20337
+ return (jsxRuntime.jsxs(Container$k, __assign$1({ className: className }, { children: [jsxRuntime.jsxs(SubscriptionContainer$2, __assign$1({ "data-testid": "subscription-container" }, { children: [jsxRuntime.jsxs(SubscriptionHeader$2, { children: [jsxRuntime.jsx(Text$7, { variant: "label", dangerouslySetInnerHTML: { __html: title !== null && title !== void 0 ? title : '' } }, void 0), jsxRuntime.jsx(ButtonPrimary, { wide: true, text: (_b = renderCopy(ctaText)) !== null && _b !== void 0 ? _b : 'Yes, I want this offer', size: exports.ComponentSize.Small, onClick: function () {
20331
20338
  handleSavings();
20332
- } }, void 0)] }, void 0), jsxRuntime.jsxs(Benefits$1, __assign$1({ "data-testid": "benefits-component" }, { children: [jsxRuntime.jsx(OfferAtCartBenefits, { benefits: benefits }, void 0), bottomCopy && jsxRuntime.jsx(Text$7, { variant: "label", dangerouslySetInnerHTML: { __html: bottomCopy } }, void 0)] }), void 0)] }), void 0), jsxRuntime.jsx(ButtonSecondary, { wide: true, text: ctaTextNoSavings !== null && ctaTextNoSavings !== void 0 ? ctaTextNoSavings : 'Continue without more savings - ', size: exports.ComponentSize.Small, onClick: function () {
20339
+ } }, void 0)] }, void 0), jsxRuntime.jsxs(Benefits$1, __assign$1({ "data-testid": "benefits-component" }, { children: [jsxRuntime.jsx(OfferAtCartBenefits, { benefits: benefits }, void 0), bottomCopy && jsxRuntime.jsx(Text$7, { variant: "label", dangerouslySetInnerHTML: { __html: bottomCopy } }, void 0)] }), void 0)] }), void 0), jsxRuntime.jsx(ButtonSecondary, { wide: true, text: (_c = renderCopy(ctaTextNoSavings)) !== null && _c !== void 0 ? _c : 'Continue without more savings - ', size: exports.ComponentSize.Small, onClick: function () {
20333
20340
  handleWithoutSavings();
20334
20341
  } }, void 0)] }), void 0));
20335
20342
  };