@trafilea/afrodita-components 6.17.2 → 6.17.3
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 +7 -0
- package/build/index.esm.js +113 -103
- package/build/index.esm.js.map +1 -1
- package/build/index.js +113 -103
- package/build/index.js.map +1 -1
- package/build/theme/revel.theme.d.ts +7 -0
- package/build/theme/revel.theme.js +7 -0
- package/build/theme/shapermint.theme.d.ts +7 -0
- package/build/theme/shapermint.theme.js +7 -0
- package/build/theme/thebodcon.theme.d.ts +7 -0
- package/build/theme/thebodcon.theme.js +7 -0
- package/build/theme/thespadr.theme.d.ts +7 -0
- package/build/theme/thespadr.theme.js +7 -0
- package/build/theme/truekind.theme.d.ts +7 -0
- package/build/theme/truekind.theme.js +7 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -4211,7 +4211,7 @@ var TAGS = {
|
|
|
4211
4211
|
heading4: newStyled.h4(templateObject_10$8 || (templateObject_10$8 = __makeTemplateObject([""], [""]))),
|
|
4212
4212
|
heading5: newStyled.h5(templateObject_11$5 || (templateObject_11$5 = __makeTemplateObject([""], [""]))),
|
|
4213
4213
|
heading6: newStyled.h6(templateObject_12$4 || (templateObject_12$4 = __makeTemplateObject([""], [""]))),
|
|
4214
|
-
heading7: newStyled.h1(templateObject_13$
|
|
4214
|
+
heading7: newStyled.h1(templateObject_13$4 || (templateObject_13$4 = __makeTemplateObject([""], [""]))),
|
|
4215
4215
|
heading8: newStyled.h1(templateObject_14$2 || (templateObject_14$2 = __makeTemplateObject([""], [""]))),
|
|
4216
4216
|
body: newStyled.p(templateObject_15$2 || (templateObject_15$2 = __makeTemplateObject([""], [""]))),
|
|
4217
4217
|
link: newStyled.a(templateObject_16$2 || (templateObject_16$2 = __makeTemplateObject(["\n cursor: pointer;\n color: inherit;\n text-decoration: ", ";\n "], ["\n cursor: pointer;\n color: inherit;\n text-decoration: ", ";\n "])), function (props) { return (props.underline ? 'underline' : 'none'); }),
|
|
@@ -4335,7 +4335,7 @@ var DEFAULTS = {
|
|
|
4335
4335
|
size: 'regular',
|
|
4336
4336
|
},
|
|
4337
4337
|
};
|
|
4338
|
-
var templateObject_1$1Y, templateObject_2$1k, templateObject_3$10, templateObject_4$M, templateObject_5$y, templateObject_6$s, templateObject_7$j, templateObject_8$h, templateObject_9$9, templateObject_10$8, templateObject_11$5, templateObject_12$4, templateObject_13$
|
|
4338
|
+
var templateObject_1$1Y, templateObject_2$1k, templateObject_3$10, templateObject_4$M, templateObject_5$y, templateObject_6$s, templateObject_7$j, templateObject_8$h, templateObject_9$9, templateObject_10$8, templateObject_11$5, templateObject_12$4, templateObject_13$4, templateObject_14$2, templateObject_15$2, templateObject_16$2, templateObject_17$2, templateObject_18$2, templateObject_19$2, templateObject_20$1;
|
|
4339
4339
|
|
|
4340
4340
|
var Container$1d = newStyled.div(templateObject_1$1X || (templateObject_1$1X = __makeTemplateObject(["\n position: relative;\n display: flex;\n border-radius: 6px;\n gap: 6px;\n"], ["\n position: relative;\n display: flex;\n border-radius: 6px;\n gap: 6px;\n"])));
|
|
4341
4341
|
var Card$3 = newStyled.div(templateObject_2$1j || (templateObject_2$1j = __makeTemplateObject(["\n --background: var(--colors-background-color);\n\n flex: 1;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n border: 2px solid var(--component-packSelector-borderColor);\n padding: 16px 7px 7px;\n text-align: center;\n background-color: var(--background);\n border-radius: var(--component-packSelector-borderRadius);\n\n &[aria-checked='true'] {\n --color: var(--component-packSelector-selectedColor);\n\n border-color: var(--color);\n\n & * {\n p {\n color: var(--color);\n }\n }\n }\n"], ["\n --background: var(--colors-background-color);\n\n flex: 1;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n border: 2px solid var(--component-packSelector-borderColor);\n padding: 16px 7px 7px;\n text-align: center;\n background-color: var(--background);\n border-radius: var(--component-packSelector-borderRadius);\n\n &[aria-checked='true'] {\n --color: var(--component-packSelector-selectedColor);\n\n border-color: var(--color);\n\n & * {\n p {\n color: var(--color);\n }\n }\n }\n"])));
|
|
@@ -5218,6 +5218,101 @@ var RadioInput = function (_a) {
|
|
|
5218
5218
|
};
|
|
5219
5219
|
var templateObject_1$1L, templateObject_2$1b, templateObject_3$X, templateObject_4$J;
|
|
5220
5220
|
|
|
5221
|
+
var useOnClickOutside = function (ref, handler) {
|
|
5222
|
+
React$2.useEffect(function () {
|
|
5223
|
+
var listener = function (event) {
|
|
5224
|
+
// Do nothing if clicking ref's element or descendent elements
|
|
5225
|
+
var el = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
5226
|
+
if (!el || el.contains((event === null || event === void 0 ? void 0 : event.target) || null)) {
|
|
5227
|
+
return;
|
|
5228
|
+
}
|
|
5229
|
+
handler(event);
|
|
5230
|
+
};
|
|
5231
|
+
document.addEventListener('mousedown', listener);
|
|
5232
|
+
document.addEventListener('touchstart', listener);
|
|
5233
|
+
return function () {
|
|
5234
|
+
document.removeEventListener('mousedown', listener);
|
|
5235
|
+
document.removeEventListener('touchstart', listener);
|
|
5236
|
+
};
|
|
5237
|
+
}, [ref, handler]);
|
|
5238
|
+
};
|
|
5239
|
+
|
|
5240
|
+
function getWindowDimensions() {
|
|
5241
|
+
if (typeof window === 'undefined')
|
|
5242
|
+
return { width: 0, height: 0 };
|
|
5243
|
+
var width = window.innerWidth, height = window.innerHeight;
|
|
5244
|
+
return {
|
|
5245
|
+
width: width,
|
|
5246
|
+
height: height,
|
|
5247
|
+
};
|
|
5248
|
+
}
|
|
5249
|
+
var getViewport = function (breakpoints, width) {
|
|
5250
|
+
if (width <= breakpoints.mobile)
|
|
5251
|
+
return Viewports.mobile;
|
|
5252
|
+
if (width <= breakpoints.tablet)
|
|
5253
|
+
return Viewports.tablet;
|
|
5254
|
+
if (width <= breakpoints.desktop)
|
|
5255
|
+
return Viewports.desktop;
|
|
5256
|
+
return Viewports.desktopLarge;
|
|
5257
|
+
};
|
|
5258
|
+
var useWindowDimensions = function (breakpoints, _a) {
|
|
5259
|
+
if (breakpoints === void 0) { breakpoints = DEFAULT_BREAKPOINTS; }
|
|
5260
|
+
var _b = _a === void 0 ? {} : _a, shouldListenChanges = _b.shouldListenChanges;
|
|
5261
|
+
var _c = React$2.useState(function () {
|
|
5262
|
+
var dimension = getWindowDimensions();
|
|
5263
|
+
return {
|
|
5264
|
+
windowDimensions: dimension,
|
|
5265
|
+
viewport: getViewport(breakpoints, dimension.width),
|
|
5266
|
+
};
|
|
5267
|
+
}), state = _c[0], setState = _c[1];
|
|
5268
|
+
React$2.useEffect(function () {
|
|
5269
|
+
function handleResize() {
|
|
5270
|
+
var newDimension = getWindowDimensions();
|
|
5271
|
+
var newViewport = getViewport(breakpoints, newDimension.width);
|
|
5272
|
+
setState(function (oldState) {
|
|
5273
|
+
if (shouldListenChanges || oldState.viewport !== newViewport) {
|
|
5274
|
+
return {
|
|
5275
|
+
windowDimensions: newDimension,
|
|
5276
|
+
viewport: newViewport,
|
|
5277
|
+
};
|
|
5278
|
+
}
|
|
5279
|
+
return oldState;
|
|
5280
|
+
});
|
|
5281
|
+
}
|
|
5282
|
+
handleResize();
|
|
5283
|
+
window.addEventListener('resize', handleResize);
|
|
5284
|
+
return function () { return window.removeEventListener('resize', handleResize); };
|
|
5285
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5286
|
+
}, [shouldListenChanges]);
|
|
5287
|
+
var isMobile = state.viewport === Viewports.mobile;
|
|
5288
|
+
var isTablet = state.viewport === Viewports.tablet;
|
|
5289
|
+
var isDesktop = state.viewport === Viewports.desktop || state.viewport === Viewports.desktopLarge;
|
|
5290
|
+
return __assign$1(__assign$1({}, state), { isMobile: isMobile, isTablet: isTablet, isDesktop: isDesktop });
|
|
5291
|
+
};
|
|
5292
|
+
|
|
5293
|
+
var useDeviceType = function () {
|
|
5294
|
+
var mobileBreakpoint = 768;
|
|
5295
|
+
var tabletBreakpoint = 1024;
|
|
5296
|
+
var _a = React$2.useState('desktop'), deviceType = _a[0], setDeviceType = _a[1];
|
|
5297
|
+
var handleResize = function () {
|
|
5298
|
+
if (window.innerWidth < mobileBreakpoint) {
|
|
5299
|
+
setDeviceType('mobile');
|
|
5300
|
+
}
|
|
5301
|
+
else if (window.innerWidth < tabletBreakpoint) {
|
|
5302
|
+
setDeviceType('tablet');
|
|
5303
|
+
}
|
|
5304
|
+
else {
|
|
5305
|
+
setDeviceType('desktop');
|
|
5306
|
+
}
|
|
5307
|
+
};
|
|
5308
|
+
React$2.useLayoutEffect(function () {
|
|
5309
|
+
window.addEventListener('resize', handleResize);
|
|
5310
|
+
handleResize();
|
|
5311
|
+
return function () { return window.removeEventListener('resize', handleResize); };
|
|
5312
|
+
}, []);
|
|
5313
|
+
return deviceType;
|
|
5314
|
+
};
|
|
5315
|
+
|
|
5221
5316
|
var getWrapperFlexDirection = function (position) {
|
|
5222
5317
|
switch (position) {
|
|
5223
5318
|
case exports.ComponentPosition.Top:
|
|
@@ -5312,7 +5407,13 @@ var ContentWrapper = newStyled.div(templateObject_3$W || (templateObject_3$W = _
|
|
|
5312
5407
|
var backgroundColor = _a.backgroundColor;
|
|
5313
5408
|
return backgroundColor;
|
|
5314
5409
|
});
|
|
5315
|
-
var TooltipText = newStyled.div(templateObject_4$I || (templateObject_4$I = __makeTemplateObject(["\n font-style: normal;\n font-weight: normal;\n font-size: 0.875rem;\n line-height: 1.125rem;\n margin: 0;\n text-align:
|
|
5410
|
+
var TooltipText = newStyled.div(templateObject_4$I || (templateObject_4$I = __makeTemplateObject(["\n font-style: normal;\n font-weight: normal;\n font-size: 0.875rem;\n line-height: 1.125rem;\n margin: 0;\n text-align: ", ";\n max-width: ", ";\n color: ", ";\n"], ["\n font-style: normal;\n font-weight: normal;\n font-size: 0.875rem;\n line-height: 1.125rem;\n margin: 0;\n text-align: ", ";\n max-width: ", ";\n color: ", ";\n"])), function (_a) {
|
|
5411
|
+
var theme = _a.theme;
|
|
5412
|
+
return theme.component.autoship.tooltip.text.alignment;
|
|
5413
|
+
}, function (_a) {
|
|
5414
|
+
var theme = _a.theme;
|
|
5415
|
+
return theme.component.autoship.tooltip.text.maxWidth;
|
|
5416
|
+
}, function (_a) {
|
|
5316
5417
|
var color = _a.color;
|
|
5317
5418
|
return color;
|
|
5318
5419
|
});
|
|
@@ -5328,101 +5429,6 @@ var CloseToolTip = newStyled.button(templateObject_8$g || (templateObject_8$g =
|
|
|
5328
5429
|
});
|
|
5329
5430
|
var templateObject_1$1K, templateObject_2$1a, templateObject_3$W, templateObject_4$I, templateObject_5$v, templateObject_6$q, templateObject_7$i, templateObject_8$g;
|
|
5330
5431
|
|
|
5331
|
-
var useOnClickOutside = function (ref, handler) {
|
|
5332
|
-
React$2.useEffect(function () {
|
|
5333
|
-
var listener = function (event) {
|
|
5334
|
-
// Do nothing if clicking ref's element or descendent elements
|
|
5335
|
-
var el = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
5336
|
-
if (!el || el.contains((event === null || event === void 0 ? void 0 : event.target) || null)) {
|
|
5337
|
-
return;
|
|
5338
|
-
}
|
|
5339
|
-
handler(event);
|
|
5340
|
-
};
|
|
5341
|
-
document.addEventListener('mousedown', listener);
|
|
5342
|
-
document.addEventListener('touchstart', listener);
|
|
5343
|
-
return function () {
|
|
5344
|
-
document.removeEventListener('mousedown', listener);
|
|
5345
|
-
document.removeEventListener('touchstart', listener);
|
|
5346
|
-
};
|
|
5347
|
-
}, [ref, handler]);
|
|
5348
|
-
};
|
|
5349
|
-
|
|
5350
|
-
function getWindowDimensions() {
|
|
5351
|
-
if (typeof window === 'undefined')
|
|
5352
|
-
return { width: 0, height: 0 };
|
|
5353
|
-
var width = window.innerWidth, height = window.innerHeight;
|
|
5354
|
-
return {
|
|
5355
|
-
width: width,
|
|
5356
|
-
height: height,
|
|
5357
|
-
};
|
|
5358
|
-
}
|
|
5359
|
-
var getViewport = function (breakpoints, width) {
|
|
5360
|
-
if (width <= breakpoints.mobile)
|
|
5361
|
-
return Viewports.mobile;
|
|
5362
|
-
if (width <= breakpoints.tablet)
|
|
5363
|
-
return Viewports.tablet;
|
|
5364
|
-
if (width <= breakpoints.desktop)
|
|
5365
|
-
return Viewports.desktop;
|
|
5366
|
-
return Viewports.desktopLarge;
|
|
5367
|
-
};
|
|
5368
|
-
var useWindowDimensions = function (breakpoints, _a) {
|
|
5369
|
-
if (breakpoints === void 0) { breakpoints = DEFAULT_BREAKPOINTS; }
|
|
5370
|
-
var _b = _a === void 0 ? {} : _a, shouldListenChanges = _b.shouldListenChanges;
|
|
5371
|
-
var _c = React$2.useState(function () {
|
|
5372
|
-
var dimension = getWindowDimensions();
|
|
5373
|
-
return {
|
|
5374
|
-
windowDimensions: dimension,
|
|
5375
|
-
viewport: getViewport(breakpoints, dimension.width),
|
|
5376
|
-
};
|
|
5377
|
-
}), state = _c[0], setState = _c[1];
|
|
5378
|
-
React$2.useEffect(function () {
|
|
5379
|
-
function handleResize() {
|
|
5380
|
-
var newDimension = getWindowDimensions();
|
|
5381
|
-
var newViewport = getViewport(breakpoints, newDimension.width);
|
|
5382
|
-
setState(function (oldState) {
|
|
5383
|
-
if (shouldListenChanges || oldState.viewport !== newViewport) {
|
|
5384
|
-
return {
|
|
5385
|
-
windowDimensions: newDimension,
|
|
5386
|
-
viewport: newViewport,
|
|
5387
|
-
};
|
|
5388
|
-
}
|
|
5389
|
-
return oldState;
|
|
5390
|
-
});
|
|
5391
|
-
}
|
|
5392
|
-
handleResize();
|
|
5393
|
-
window.addEventListener('resize', handleResize);
|
|
5394
|
-
return function () { return window.removeEventListener('resize', handleResize); };
|
|
5395
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5396
|
-
}, [shouldListenChanges]);
|
|
5397
|
-
var isMobile = state.viewport === Viewports.mobile;
|
|
5398
|
-
var isTablet = state.viewport === Viewports.tablet;
|
|
5399
|
-
var isDesktop = state.viewport === Viewports.desktop || state.viewport === Viewports.desktopLarge;
|
|
5400
|
-
return __assign$1(__assign$1({}, state), { isMobile: isMobile, isTablet: isTablet, isDesktop: isDesktop });
|
|
5401
|
-
};
|
|
5402
|
-
|
|
5403
|
-
var useDeviceType = function () {
|
|
5404
|
-
var mobileBreakpoint = 768;
|
|
5405
|
-
var tabletBreakpoint = 1024;
|
|
5406
|
-
var _a = React$2.useState('desktop'), deviceType = _a[0], setDeviceType = _a[1];
|
|
5407
|
-
var handleResize = function () {
|
|
5408
|
-
if (window.innerWidth < mobileBreakpoint) {
|
|
5409
|
-
setDeviceType('mobile');
|
|
5410
|
-
}
|
|
5411
|
-
else if (window.innerWidth < tabletBreakpoint) {
|
|
5412
|
-
setDeviceType('tablet');
|
|
5413
|
-
}
|
|
5414
|
-
else {
|
|
5415
|
-
setDeviceType('desktop');
|
|
5416
|
-
}
|
|
5417
|
-
};
|
|
5418
|
-
React$2.useLayoutEffect(function () {
|
|
5419
|
-
window.addEventListener('resize', handleResize);
|
|
5420
|
-
handleResize();
|
|
5421
|
-
return function () { return window.removeEventListener('resize', handleResize); };
|
|
5422
|
-
}, []);
|
|
5423
|
-
return deviceType;
|
|
5424
|
-
};
|
|
5425
|
-
|
|
5426
5432
|
var Tooltip = function (_a) {
|
|
5427
5433
|
var _b;
|
|
5428
5434
|
var children = _a.children, position = _a.position, content = _a.content, backgroundColor = _a.backgroundColor, showCloseIcon = _a.showCloseIcon, _c = _a.align, align = _c === void 0 ? 'center' : _c, maxWidth = _a.maxWidth, onClick = _a.onClick, header = _a.header, _d = _a.withArrow, withArrow = _d === void 0 ? false : _d, _e = _a.closeBtnSize, closeBtnSize = _e === void 0 ? 0.5 : _e;
|
|
@@ -5446,7 +5452,7 @@ var Tooltip = function (_a) {
|
|
|
5446
5452
|
fill: (header === null || header === void 0 ? void 0 : header.iconFill)
|
|
5447
5453
|
? header === null || header === void 0 ? void 0 : header.iconFill
|
|
5448
5454
|
: theme.colors.pallete.secondary.color,
|
|
5449
|
-
}) }, void 0)), jsxRuntime.jsx(Title$7, __assign$1({ color: (header === null || header === void 0 ? void 0 : header.titleColor) ? header === null || header === void 0 ? void 0 : header.titleColor : theme.colors.pallete.secondary.color }, { children: header.title }), void 0)] }), void 0)), content && (content === null || content === void 0 ? void 0 : content.text) && (jsxRuntime.jsx(TooltipText, { color: (content === null || content === void 0 ? void 0 : content.color) ? content === null || content === void 0 ? void 0 : content.color : theme.colors.pallete.secondary.color,
|
|
5455
|
+
}) }, void 0)), jsxRuntime.jsx(Title$7, __assign$1({ color: (header === null || header === void 0 ? void 0 : header.titleColor) ? header === null || header === void 0 ? void 0 : header.titleColor : theme.colors.pallete.secondary.color }, { children: header.title }), void 0)] }), void 0)), content && (content === null || content === void 0 ? void 0 : content.text) && (jsxRuntime.jsx(TooltipText, { color: (content === null || content === void 0 ? void 0 : content.color) ? content === null || content === void 0 ? void 0 : content.color : theme.colors.pallete.secondary.color, "data-testid": "TooltipText", dangerouslySetInnerHTML: { __html: content.text } }, void 0))] }), void 0)] }), void 0)] }), void 0));
|
|
5450
5456
|
};
|
|
5451
5457
|
|
|
5452
5458
|
var colorsMapper = function (colors) { return ({
|
|
@@ -5888,8 +5894,8 @@ var StyledPrice$1 = newStyled(PriceLabelV2)(templateObject_12$3 || (templateObje
|
|
|
5888
5894
|
var selected = _a.selected, theme = _a.theme;
|
|
5889
5895
|
return selected ? theme.colors.shades[700].color : theme.colors.shades[200].color;
|
|
5890
5896
|
});
|
|
5891
|
-
var Container$12 = newStyled.div(templateObject_13$
|
|
5892
|
-
var templateObject_1$1E, templateObject_2$15, templateObject_3$T, templateObject_4$H, templateObject_5$u, templateObject_6$p, templateObject_7$h, templateObject_8$f, templateObject_9$8, templateObject_10$7, templateObject_11$4, templateObject_12$3, templateObject_13$
|
|
5897
|
+
var Container$12 = newStyled.div(templateObject_13$3 || (templateObject_13$3 = __makeTemplateObject([""], [""])));
|
|
5898
|
+
var templateObject_1$1E, templateObject_2$15, templateObject_3$T, templateObject_4$H, templateObject_5$u, templateObject_6$p, templateObject_7$h, templateObject_8$f, templateObject_9$8, templateObject_10$7, templateObject_11$4, templateObject_12$3, templateObject_13$3;
|
|
5893
5899
|
|
|
5894
5900
|
var radioIds$1 = {
|
|
5895
5901
|
oneTime: {
|
|
@@ -5998,7 +6004,11 @@ var StyledPrice = newStyled(PriceLabelV2)(templateObject_11$3 || (templateObject
|
|
|
5998
6004
|
return selected ? theme.colors.shades[700].color : theme.colors.shades[200].color;
|
|
5999
6005
|
});
|
|
6000
6006
|
var Container$11 = newStyled.div(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n margin-top: 20px;\n"], ["\n margin-top: 20px;\n"])));
|
|
6001
|
-
var
|
|
6007
|
+
var TooltipWrapper = newStyled.div(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n margin: ", ";\n"], ["\n margin: ", ";\n"])), function (_a) {
|
|
6008
|
+
var theme = _a.theme;
|
|
6009
|
+
return theme.component.autoship.tooltip.margin;
|
|
6010
|
+
});
|
|
6011
|
+
var templateObject_1$1D, templateObject_2$14, templateObject_3$S, templateObject_4$G, templateObject_5$t, templateObject_6$o, templateObject_7$g, templateObject_8$e, templateObject_9$7, templateObject_10$6, templateObject_11$3, templateObject_12$2, templateObject_13$2;
|
|
6002
6012
|
|
|
6003
6013
|
var radioIds = {
|
|
6004
6014
|
oneTime: {
|
|
@@ -6058,7 +6068,7 @@ var AutoshipV2 = function (_a) {
|
|
|
6058
6068
|
onChange(__assign$1(__assign$1({}, dataObj), { subscriptionPeriod: value }));
|
|
6059
6069
|
};
|
|
6060
6070
|
var benefitsColor = benefitsColorMapper(theme);
|
|
6061
|
-
return (jsxRuntime.jsxs(Container$11, __assign$1({ className: className }, { children: [jsxRuntime.jsxs(SubscriptionContainer, __assign$1({ onClick: function () { return handleChange(radioIds.autoship, 'radio'); }, "data-testid": "subscription-purchase-block", selected: radioIds.autoship.id === radioCheck.id }, { children: [jsxRuntime.jsx(DiscountTag, __assign$1({ isSelected: radioIds.autoship.id === radioCheck.id }, { children: discountLabel !== null && discountLabel !== void 0 ? discountLabel : "".concat(autoShipPctOverListPriceRounded, "% OFF - SAVE ").concat(currencySymbol).concat(autoShipSaving.toFixed(2)) }), void 0), jsxRuntime.jsxs(SubscriptionHeader, { children: [jsxRuntime.jsxs(FlexContainer, { children: [jsxRuntime.jsx(RadioInput, { label: subscriptionLabel, name: radioIds.autoship.id, id: radioIds.autoship.id, value: radioIds.autoship.id, checked: radioIds.autoship.id === radioCheck.id, size: exports.ComponentSize.Medium, style: { marginRight: '10px' }, useV2Style: true, onChange: function () { }, disabled: disabledInputs && disabledInputs.includes(radioIds.autoship.id) }, void 0), jsxRuntime.jsx(
|
|
6071
|
+
return (jsxRuntime.jsxs(Container$11, __assign$1({ className: className }, { children: [jsxRuntime.jsxs(SubscriptionContainer, __assign$1({ onClick: function () { return handleChange(radioIds.autoship, 'radio'); }, "data-testid": "subscription-purchase-block", selected: radioIds.autoship.id === radioCheck.id }, { children: [jsxRuntime.jsx(DiscountTag, __assign$1({ isSelected: radioIds.autoship.id === radioCheck.id }, { children: discountLabel !== null && discountLabel !== void 0 ? discountLabel : "".concat(autoShipPctOverListPriceRounded, "% OFF - SAVE ").concat(currencySymbol).concat(autoShipSaving.toFixed(2)) }), void 0), jsxRuntime.jsxs(SubscriptionHeader, { children: [jsxRuntime.jsxs(FlexContainer, { children: [jsxRuntime.jsx(RadioInput, { label: subscriptionLabel, name: radioIds.autoship.id, id: radioIds.autoship.id, value: radioIds.autoship.id, checked: radioIds.autoship.id === radioCheck.id, size: exports.ComponentSize.Medium, style: { marginRight: '10px' }, useV2Style: true, onChange: function () { }, disabled: disabledInputs && disabledInputs.includes(radioIds.autoship.id) }, void 0), jsxRuntime.jsx(TooltipWrapper, { children: jsxRuntime.jsx(Tooltip, __assign$1({ position: 0, content: tooltipContent, header: tooltipHeader, maxWidth: "248px", showCloseIcon: closeIcon, closeBtnSize: 0.7 }, { children: jsxRuntime.jsx(Icon.Actions.CircleQuestion, { width: 1 }, void 0) }), void 0) }, void 0)] }, void 0), jsxRuntime.jsx(StyledPrice, { testId: "subscription", finalPrice: "$".concat(decimalFormat(Number(autoshipFinalPrice))), selected: radioIds.autoship.id === radioCheck.id, size: exports.ComponentSize.Large, originalPrice: "$".concat(decimalFormat(Number(listPrice))) }, void 0)] }, void 0), jsxRuntime.jsx(BenefitsContainer, { children: updatedAutoshipBenefits.map(function (benefit) { return (jsxRuntime.jsxs(Benefit, { children: [jsxRuntime.jsx(Icon.Actions.Check, { width: 1.2, height: 1.2, fill: radioIds.autoship.id === radioCheck.id
|
|
6062
6072
|
? benefitsColor.selected
|
|
6063
6073
|
: benefitsColor.base }, void 0), jsxRuntime.jsx(BenefitText, { variant: "body", dangerouslySetInnerHTML: { __html: benefit } }, void 0)] }, benefit)); }) }, void 0), jsxRuntime.jsx(jsxRuntime.Fragment, { children: dropdownOptions.length > 1 ? (jsxRuntime.jsxs(FlexContainer, __assign$1({ onClick: function (e) { return e.stopPropagation(); } }, { children: [jsxRuntime.jsx(DeliveryFrequencyLabel, __assign$1({ variant: "body" }, { children: "Deliver every:" }), void 0), jsxRuntime.jsx(SimpleDropdown, { testId: "subscription-frequency", initialValue: dropdownOptions[0], options: dropdownOptions, onChange: function (value) { return handleChange(value.value, 'dropdown'); }, placeHolder: "" }, void 0)] }), void 0)) : (jsxRuntime.jsxs(DeliveryFrequencyLabel, __assign$1({ variant: "body" }, { children: ["Deliver every ", dropdownOptions[0].label.toLowerCase()] }), void 0)) }, void 0)] }), void 0), jsxRuntime.jsxs(SinglePurchaseContainer, __assign$1({ "data-testid": "single-purchase-block", selected: radioIds.oneTime.id === radioCheck.id, onClick: function () { return handleChange(radioIds.oneTime, 'radio'); } }, { children: [jsxRuntime.jsx(RadioInput, { label: singlePurchaseLabel, name: radioIds.oneTime.id, id: radioIds.oneTime.id, value: radioIds.oneTime.id, checked: radioIds.oneTime.id === radioCheck.id, size: exports.ComponentSize.Medium, onChange: function () { }, useV2Style: true, disabled: disabledInputs && disabledInputs.includes(radioIds.oneTime.id) }, void 0), jsxRuntime.jsx(StyledPrice, { testId: "single-purchase", finalPrice: "$".concat(decimalFormat(Number(discountedPrice))), selected: radioIds.oneTime.id === radioCheck.id, size: exports.ComponentSize.Large, originalPrice: "$".concat(decimalFormat(Number(listPrice))) }, void 0)] }), void 0)] }), void 0));
|
|
6064
6074
|
};
|