@trafilea/afrodita-components 6.5.3 → 6.5.5
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 +4 -3
- package/build/index.esm.js +28 -32
- package/build/index.esm.js.map +1 -1
- package/build/index.js +28 -32
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -2045,19 +2045,19 @@ interface PriceLabelProps {
|
|
|
2045
2045
|
testId?: string;
|
|
2046
2046
|
clubStyle?: boolean;
|
|
2047
2047
|
bordersRounded?: boolean;
|
|
2048
|
-
hasPricePerItem?: boolean;
|
|
2049
|
-
quantity?: number;
|
|
2050
2048
|
}
|
|
2051
2049
|
declare const PriceLabel: React__default.FC<PriceLabelProps>;
|
|
2052
2050
|
|
|
2053
2051
|
declare type Props$1 = PriceLabelProps & {
|
|
2054
2052
|
savingsDisplay?: boolean;
|
|
2053
|
+
pricePerItem?: string;
|
|
2055
2054
|
};
|
|
2056
2055
|
declare const PriceLabelV2: React__default.FC<Props$1>;
|
|
2057
2056
|
|
|
2058
2057
|
declare type Props = PriceLabelProps & {
|
|
2059
2058
|
savingsDisplay?: boolean;
|
|
2060
2059
|
itemsQuantity?: number;
|
|
2060
|
+
packUnitPrice?: string;
|
|
2061
2061
|
};
|
|
2062
2062
|
declare const PriceLabelV3: React__default.FC<Props>;
|
|
2063
2063
|
|
|
@@ -2295,8 +2295,9 @@ interface ColorPickerProps {
|
|
|
2295
2295
|
label: string;
|
|
2296
2296
|
onChange: (color: ColorPickerOption) => void;
|
|
2297
2297
|
inline?: boolean;
|
|
2298
|
+
showCross?: boolean;
|
|
2298
2299
|
}
|
|
2299
|
-
declare const SingleColorPicker: ({ options, selectedValue, label, onChange, inline, }: ColorPickerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2300
|
+
declare const SingleColorPicker: ({ options, selectedValue, label, onChange, inline, showCross, }: ColorPickerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2300
2301
|
|
|
2301
2302
|
interface CrossSellCheckboxProps extends rightToLeftProps {
|
|
2302
2303
|
imageURL: string;
|
package/build/index.esm.js
CHANGED
|
@@ -5454,31 +5454,26 @@ var templateObject_1$1A, templateObject_2$10, templateObject_3$Q;
|
|
|
5454
5454
|
var FinalPriceStyledContainer$1 = newStyled.div(templateObject_1$1z || (templateObject_1$1z = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
5455
5455
|
var PriceLabelV2 = function (_a) {
|
|
5456
5456
|
var _b;
|
|
5457
|
-
var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, clubOffer = _a.clubOffer, color = _a.color, testId = _a.testId, _c = _a.originalPriceStyled, originalPriceStyled = _c === void 0 ? false : _c, _d = _a.originalPriceUnderlined, originalPriceUnderlined = _d === void 0 ? true : _d, _e = _a.size, size = _e === void 0 ? ComponentSize.Small : _e, _f = _a.bordersRounded, bordersRounded = _f === void 0 ? false : _f, _g = _a.savingsDisplay, savingsDisplay = _g === void 0 ? true : _g,
|
|
5457
|
+
var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, clubOffer = _a.clubOffer, color = _a.color, testId = _a.testId, _c = _a.originalPriceStyled, originalPriceStyled = _c === void 0 ? false : _c, _d = _a.originalPriceUnderlined, originalPriceUnderlined = _d === void 0 ? true : _d, _e = _a.size, size = _e === void 0 ? ComponentSize.Small : _e, _f = _a.bordersRounded, bordersRounded = _f === void 0 ? false : _f, _g = _a.savingsDisplay, savingsDisplay = _g === void 0 ? true : _g, pricePerItem = _a.pricePerItem, rest = __rest(_a, ["finalPrice", "originalPrice", "discount", "clubOffer", "color", "testId", "originalPriceStyled", "originalPriceUnderlined", "size", "bordersRounded", "savingsDisplay", "pricePerItem"]);
|
|
5458
5458
|
var theme = useTheme();
|
|
5459
|
-
var
|
|
5459
|
+
var productFinalPrice = pricePerItem ? pricePerItem : finalPrice;
|
|
5460
|
+
var isDiffFinalAndOriginalPrice = originalPrice !== productFinalPrice;
|
|
5460
5461
|
var isOriginalPrice = originalPrice && isDiffFinalAndOriginalPrice;
|
|
5461
5462
|
var isDiscount = discount && isDiffFinalAndOriginalPrice;
|
|
5462
5463
|
var isClubOffer = clubOffer && isDiffFinalAndOriginalPrice;
|
|
5463
5464
|
var supportedCurrencies = ['A$', 'CA$', '£'];
|
|
5464
5465
|
var currencySymbol = '$';
|
|
5465
|
-
if (typeof
|
|
5466
|
+
if (typeof productFinalPrice === 'string') {
|
|
5466
5467
|
supportedCurrencies.forEach(function (availableCurrency) {
|
|
5467
|
-
if (
|
|
5468
|
+
if (productFinalPrice.includes(availableCurrency)) {
|
|
5468
5469
|
currencySymbol = availableCurrency;
|
|
5469
5470
|
}
|
|
5470
5471
|
});
|
|
5471
5472
|
}
|
|
5472
|
-
var
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
? "".concat(currencySymbol).concat((Number(priceSymbolRemoved) / quantity).toFixed(2))
|
|
5477
|
-
: finalPrice;
|
|
5478
|
-
var finalPriceArray = typeof finalPricePerQuantity === 'string' &&
|
|
5479
|
-
finalPricePerQuantity.includes('.') &&
|
|
5480
|
-
finalPricePerQuantity.includes(currencySymbol)
|
|
5481
|
-
? finalPricePerQuantity.split(currencySymbol)[1].split('.')
|
|
5473
|
+
var finalPriceArray = typeof productFinalPrice === 'string' &&
|
|
5474
|
+
productFinalPrice.includes('.') &&
|
|
5475
|
+
productFinalPrice.includes(currencySymbol)
|
|
5476
|
+
? productFinalPrice.split(currencySymbol)[1].split('.')
|
|
5482
5477
|
: ['', ''];
|
|
5483
5478
|
var priceCommonProps = {
|
|
5484
5479
|
size: ComponentSize.Small,
|
|
@@ -5488,13 +5483,13 @@ var PriceLabelV2 = function (_a) {
|
|
|
5488
5483
|
weight: 700,
|
|
5489
5484
|
};
|
|
5490
5485
|
var originalPriceNum, finalPriceNum;
|
|
5491
|
-
if (typeof originalPrice === 'string' && typeof
|
|
5486
|
+
if (typeof originalPrice === 'string' && typeof productFinalPrice === 'string') {
|
|
5492
5487
|
originalPriceNum = Number(originalPrice.replace(currencySymbol, ''));
|
|
5493
|
-
finalPriceNum = Number(
|
|
5488
|
+
finalPriceNum = Number(productFinalPrice.replace(currencySymbol, ''));
|
|
5494
5489
|
}
|
|
5495
5490
|
else {
|
|
5496
5491
|
originalPriceNum = typeof originalPrice === 'number' ? originalPrice : 0;
|
|
5497
|
-
finalPriceNum = typeof
|
|
5492
|
+
finalPriceNum = typeof productFinalPrice === 'number' ? productFinalPrice : 0;
|
|
5498
5493
|
}
|
|
5499
5494
|
var saveto = originalPriceNum - finalPriceNum;
|
|
5500
5495
|
var decimalPart = Number((saveto - Math.floor(saveto)).toFixed(2));
|
|
@@ -5509,9 +5504,11 @@ var PriceLabelV2 = function (_a) {
|
|
|
5509
5504
|
theme.colors.shades['300'].color, margin: true, underlined: originalPriceUnderlined, "data-testid": getTestId(testId, 'original-product-price') }, { children: originalPrice }), void 0)); };
|
|
5510
5505
|
return (jsxs$1(Container$Z, __assign$1({}, rest, { children: [isOriginalPrice && jsx$1(OriginalPrice, {}, void 0), jsxs$1(FinalPriceStyledContainer$1, __assign$1({ "data-testid": getTestId(testId, 'final-product-price') }, { children: [jsx$1(Price, __assign$1({ margin: true, finalPriceStyledSmall: true, style: {
|
|
5511
5506
|
marginTop: '-5px',
|
|
5512
|
-
} }, priceCommonProps, { size: size }, { children: currencySymbol }), void 0), jsx$1(Price, __assign$1({ finalPriceStyled: true }, priceCommonProps, { size: size }, { children: finalPriceArray[0]
|
|
5507
|
+
} }, priceCommonProps, { size: size }, { children: currencySymbol }), void 0), jsx$1(Price, __assign$1({ finalPriceStyled: true }, priceCommonProps, { size: size }, { children: finalPriceArray[0]
|
|
5508
|
+
? finalPriceArray[0]
|
|
5509
|
+
: (_b = "".concat(productFinalPrice)) === null || _b === void 0 ? void 0 : _b.split(currencySymbol)[1] }), void 0), jsx$1(Price, __assign$1({ finalPriceStyledSmall: true, style: {
|
|
5513
5510
|
marginTop: '-6px',
|
|
5514
|
-
} }, priceCommonProps, { size: size }, { children: finalPriceArray[1] ? finalPriceArray[1] : '00' }), void 0),
|
|
5511
|
+
} }, priceCommonProps, { size: size }, { children: finalPriceArray[1] ? finalPriceArray[1] : '00' }), void 0), pricePerItem && (jsx$1(Price, __assign$1({ size: ComponentSize.Small, color: theme.colors.pallete.secondary.color }, { children: "/each" }), void 0))] }), void 0), isDiscount && (jsx$1(TagContainer, __assign$1({ size: ComponentSize.Small }, { children: discount && (jsx$1(DiscountTag, __assign$1({}, discount, { size: ComponentSize.Medium, style: {
|
|
5515
5512
|
letterSpacing: '-0.05rem',
|
|
5516
5513
|
}, bordersRounded: bordersRounded, savings: savingsDisplay ? "Save ".concat(currencySymbol).concat(savetoString) : undefined }), void 0)) }), void 0)), isClubOffer && (jsx$1(TagContainer, __assign$1({ size: ComponentSize.Medium }, { children: clubOffer && (jsx$1(ClubOfferTag, __assign$1({}, clubOffer, { size: ComponentSize.Small, style: {
|
|
5517
5514
|
borderRadius: '8px',
|
|
@@ -5530,7 +5527,7 @@ var ContainerDirectionColumn = newStyled.div(templateObject_2$$ || (templateObje
|
|
|
5530
5527
|
var DiscountEachOneContainer = newStyled.div(templateObject_3$P || (templateObject_3$P = __makeTemplateObject(["\n display: flex;\n padding-left: 0.5rem;\n"], ["\n display: flex;\n padding-left: 0.5rem;\n"])));
|
|
5531
5528
|
var PriceLabelV3 = function (_a) {
|
|
5532
5529
|
var _b;
|
|
5533
|
-
var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, clubOffer = _a.clubOffer, color = _a.color, testId = _a.testId, _c = _a.originalPriceStyled, originalPriceStyled = _c === void 0 ? false : _c, _d = _a.originalPriceUnderlined, originalPriceUnderlined = _d === void 0 ? true : _d, _e = _a.size, size = _e === void 0 ? ComponentSize.Small : _e, _f = _a.bordersRounded, bordersRounded = _f === void 0 ? false : _f, _g = _a.savingsDisplay, savingsDisplay = _g === void 0 ? true : _g, itemsQuantity = _a.itemsQuantity, rest = __rest(_a, ["finalPrice", "originalPrice", "discount", "clubOffer", "color", "testId", "originalPriceStyled", "originalPriceUnderlined", "size", "bordersRounded", "savingsDisplay", "itemsQuantity"]);
|
|
5530
|
+
var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, clubOffer = _a.clubOffer, color = _a.color, testId = _a.testId, _c = _a.originalPriceStyled, originalPriceStyled = _c === void 0 ? false : _c, _d = _a.originalPriceUnderlined, originalPriceUnderlined = _d === void 0 ? true : _d, _e = _a.size, size = _e === void 0 ? ComponentSize.Small : _e, _f = _a.bordersRounded, bordersRounded = _f === void 0 ? false : _f, _g = _a.savingsDisplay, savingsDisplay = _g === void 0 ? true : _g, itemsQuantity = _a.itemsQuantity, packUnitPrice = _a.packUnitPrice, rest = __rest(_a, ["finalPrice", "originalPrice", "discount", "clubOffer", "color", "testId", "originalPriceStyled", "originalPriceUnderlined", "size", "bordersRounded", "savingsDisplay", "itemsQuantity", "packUnitPrice"]);
|
|
5534
5531
|
var theme = useTheme();
|
|
5535
5532
|
var isDiffFinalAndOriginalPrice = originalPrice !== finalPrice;
|
|
5536
5533
|
var isOriginalPrice = originalPrice && isDiffFinalAndOriginalPrice;
|
|
@@ -5578,17 +5575,15 @@ var PriceLabelV3 = function (_a) {
|
|
|
5578
5575
|
var OriginalPrice = function () { return (jsx$1(Price, __assign$1({ size: originalPriceStyled ? size : ComponentSize.Small, color: theme.component.pricing.priceLabel.price.originalPriceColor ||
|
|
5579
5576
|
theme.colors.shades['300'].color, margin: true, underlined: originalPriceUnderlined, "data-testid": getTestId(testId, 'original-product-price') }, { children: originalPrice }), void 0)); };
|
|
5580
5577
|
var DiscountedPriceOfEach = function () {
|
|
5581
|
-
var priceEachOne;
|
|
5582
5578
|
if (!itemsQuantity || itemsQuantity < 2)
|
|
5583
5579
|
return null;
|
|
5584
|
-
|
|
5585
|
-
return (jsxs$1(DiscountEachOneContainer, __assign$1({ "data-testid": getTestId(testId, 'each-one-price') }, { children: [jsxs$1(Price, __assign$1({}, priceCommonProps, { weight: 600 }, { children: ["(", currencySymbol, priceEachOne] }), void 0), jsx$1(Price, __assign$1({}, priceCommonProps, { weight: 400 }, { children: "/each" }), void 0), jsx$1(Price, __assign$1({}, priceCommonProps, { weight: 600 }, { children: ")" }), void 0)] }), void 0));
|
|
5580
|
+
return (jsxs$1(DiscountEachOneContainer, __assign$1({ "data-testid": getTestId(testId, 'each-one-price') }, { children: [jsxs$1(Price, __assign$1({}, priceCommonProps, { weight: 600 }, { children: ["(", packUnitPrice] }), void 0), jsx$1(Price, __assign$1({}, priceCommonProps, { weight: 400 }, { children: "/each" }), void 0), jsx$1(Price, __assign$1({}, priceCommonProps, { weight: 600 }, { children: ")" }), void 0)] }), void 0));
|
|
5586
5581
|
};
|
|
5587
5582
|
return (jsxs$1(ContainerDirectionColumn, __assign$1({}, rest, { children: [jsx$1(Container$Z, __assign$1({ style: { paddingBottom: '0.5rem' } }, { children: isOriginalPrice && jsx$1(OriginalPrice, {}, void 0) }), void 0), jsxs$1(Container$Z, { children: [jsxs$1(FinalPriceStyledContainer, __assign$1({ "data-testid": getTestId(testId, 'final-product-price') }, { children: [jsx$1(Price, __assign$1({ margin: true, finalPriceStyledSmall: true, style: {
|
|
5588
5583
|
marginTop: '-5px',
|
|
5589
5584
|
} }, priceCommonProps, { size: size }, { children: currencySymbol }), void 0), jsx$1(Price, __assign$1({ finalPriceStyled: true }, priceCommonProps, { size: size }, { children: finalPriceArray[0] ? finalPriceArray[0] : (_b = "".concat(finalPrice)) === null || _b === void 0 ? void 0 : _b.split(currencySymbol)[1] }), void 0), jsx$1(Price, __assign$1({ finalPriceStyledSmall: true, style: {
|
|
5590
5585
|
marginTop: '-6px',
|
|
5591
|
-
} }, priceCommonProps, { size: size }, { children: finalPriceArray[1] ? finalPriceArray[1] : '00' }), void 0)] }), void 0),
|
|
5586
|
+
} }, priceCommonProps, { size: size }, { children: finalPriceArray[1] ? finalPriceArray[1] : '00' }), void 0)] }), void 0), jsx$1(DiscountedPriceOfEach, {}, void 0), isDiscount && (jsx$1(TagContainer, __assign$1({ size: ComponentSize.Small }, { children: discount && (jsx$1(DiscountTag, __assign$1({}, discount, { size: ComponentSize.Medium, style: {
|
|
5592
5587
|
letterSpacing: '-0.05rem',
|
|
5593
5588
|
}, bordersRounded: bordersRounded, savings: savingsDisplay ? "SAVE ".concat(currencySymbol).concat(savetoString) : undefined, showSavings: true }), void 0)) }), void 0)), isClubOffer && (jsx$1(TagContainer, __assign$1({ size: ComponentSize.Medium }, { children: clubOffer && (jsx$1(ClubOfferTag, __assign$1({}, clubOffer, { size: ComponentSize.Small, style: {
|
|
5594
5589
|
borderRadius: '8px',
|
|
@@ -6340,10 +6335,10 @@ var Collection = {
|
|
|
6340
6335
|
};
|
|
6341
6336
|
|
|
6342
6337
|
var OneColorSelector = function (_a) {
|
|
6343
|
-
var color = _a.color, selected = _a.selected, testId = _a.testId, noStock = _a.noStock;
|
|
6338
|
+
var color = _a.color, selected = _a.selected, testId = _a.testId, noStock = _a.noStock, _b = _a.showCross, showCross = _b === void 0 ? false : _b;
|
|
6344
6339
|
var theme = useTheme();
|
|
6345
6340
|
var outerBorder = selected ? theme.colors.shades['550'].color : 'none';
|
|
6346
|
-
return (jsxs$1("svg", __assign$1({ width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": testId, style: { opacity: noStock ? 0.4 : 1 } }, { children: [jsx$1("circle", { cx: "16", cy: "16", r: "12", fill: color, stroke: "#9E9E9E", strokeWidth: "0.5" }, void 0), jsx$1("circle", { cx: "16", cy: "16", r: "15.5", stroke: outerBorder }, void 0)] }), void 0));
|
|
6341
|
+
return (jsxs$1("svg", __assign$1({ width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": testId, style: { opacity: noStock ? (showCross ? 1 : 0.4) : 1 } }, { children: [jsx$1("circle", { cx: "16", cy: "16", r: "12", fill: color, stroke: "#9E9E9E", strokeWidth: "0.5" }, void 0), jsx$1("circle", { cx: "16", cy: "16", r: "15.5", stroke: outerBorder }, void 0), showCross && noStock && (jsxs$1(Fragment$2, { children: [jsx$1("line", { x1: "12", y1: "12", x2: "20", y2: "20", stroke: "#9E9E9E", strokeWidth: "1" }, void 0), jsx$1("line", { x1: "12", y1: "20", x2: "20", y2: "12", stroke: "#9E9E9E", strokeWidth: "1" }, void 0)] }, void 0))] }), void 0));
|
|
6347
6342
|
};
|
|
6348
6343
|
|
|
6349
6344
|
var ThreeColorSelector = function (_a) {
|
|
@@ -6361,7 +6356,7 @@ var TwoColorSelector = function (_a) {
|
|
|
6361
6356
|
};
|
|
6362
6357
|
|
|
6363
6358
|
var ColorSelector = function (_a) {
|
|
6364
|
-
var color = _a.color, selected = _a.selected, testId = _a.testId, noStock = _a.noStock;
|
|
6359
|
+
var color = _a.color, selected = _a.selected, testId = _a.testId, noStock = _a.noStock, _b = _a.showCross, showCross = _b === void 0 ? false : _b;
|
|
6365
6360
|
var primaryColor = color[0], secondaryColor = color[1], tertiaryColor = color[2];
|
|
6366
6361
|
if (tertiaryColor) {
|
|
6367
6362
|
return (jsx$1(ThreeColorSelector, { primaryColor: primaryColor, secondaryColor: secondaryColor, tertiaryColor: tertiaryColor, selected: selected, testId: testId, noStock: noStock }, void 0));
|
|
@@ -6369,7 +6364,7 @@ var ColorSelector = function (_a) {
|
|
|
6369
6364
|
if (secondaryColor) {
|
|
6370
6365
|
return (jsx$1(TwoColorSelector, { secondaryColor: secondaryColor, primaryColor: primaryColor, selected: selected, testId: testId, noStock: noStock }, void 0));
|
|
6371
6366
|
}
|
|
6372
|
-
return (jsx$1(OneColorSelector, { color: primaryColor, selected: selected, testId: testId, noStock: noStock }, void 0));
|
|
6367
|
+
return (jsx$1(OneColorSelector, { color: primaryColor, selected: selected, testId: testId, noStock: noStock, showCross: showCross }, void 0));
|
|
6373
6368
|
};
|
|
6374
6369
|
|
|
6375
6370
|
var OutOfStock = function (_a) {
|
|
@@ -6454,14 +6449,15 @@ var MultiColorPicker = function (_a) {
|
|
|
6454
6449
|
return (jsxs$1(ColorRadioGroup$1, __assign$1({ value: selectedColor, onChange: onChangeHandler }, { children: [jsx$1(ColorRadioGroup$1.Label, { label: label, values: valueLabels }, void 0), jsx$1(ColorRadioGroup$1.OptionsContainer, { children: renderOptions$1(selectedColor, options) }, void 0)] }), void 0));
|
|
6455
6450
|
};
|
|
6456
6451
|
|
|
6457
|
-
var renderOptions = function (options) {
|
|
6452
|
+
var renderOptions = function (options, showCross) {
|
|
6453
|
+
if (showCross === void 0) { showCross = false; }
|
|
6458
6454
|
if (options.length === 0) {
|
|
6459
6455
|
return jsx(OutOfStock, { title: "out of stock color" }, void 0);
|
|
6460
6456
|
}
|
|
6461
6457
|
return options.map(function (option) { return (jsx(ColorRadioGroup$1.Option, __assign$1({ value: option }, { children: function (_a) {
|
|
6462
6458
|
var checked = _a.checked;
|
|
6463
6459
|
if (option.meta.color) {
|
|
6464
|
-
return (jsx(ColorSelector, { color: option.meta.color, selected: checked, testId: "".concat(option.label.split(' ').join('-').toLowerCase(), "-selector"), noStock: option.noStock }, void 0));
|
|
6460
|
+
return (jsx(ColorSelector, { color: option.meta.color, selected: checked, testId: "".concat(option.label.split(' ').join('-').toLowerCase(), "-selector"), noStock: option.noStock, showCross: showCross }, void 0));
|
|
6465
6461
|
}
|
|
6466
6462
|
if (option.meta.pattern) {
|
|
6467
6463
|
return (jsx(PatternSelector, { url: option.meta.pattern.url, selected: checked, noStock: option.noStock }, void 0));
|
|
@@ -6470,8 +6466,8 @@ var renderOptions = function (options) {
|
|
|
6470
6466
|
} }), option.label)); });
|
|
6471
6467
|
};
|
|
6472
6468
|
var SingleColorPicker = function (_a) {
|
|
6473
|
-
var options = _a.options, selectedValue = _a.selectedValue, label = _a.label, onChange = _a.onChange, _b = _a.inline, inline = _b === void 0 ? false : _b;
|
|
6474
|
-
return (jsxs(ColorRadioGroup$1, __assign$1({ value: selectedValue, onChange: onChange, css: { flexDirection: inline ? 'row' : 'column', alignItems: inline ? 'center' : 'start' } }, { children: [jsx(ColorRadioGroup$1.Label, { label: label, values: selectedValue && !inline ? selectedValue.label : undefined }, void 0), jsx(ColorRadioGroup$1.OptionsContainer, __assign$1({ css: { marginTop: inline ? '0' : '0.63rem', marginLeft: inline ? '1.5rem' : '0' }, "data-testid": "radio-group-options-container" }, { children: renderOptions(options) }), void 0)] }), void 0));
|
|
6469
|
+
var options = _a.options, selectedValue = _a.selectedValue, label = _a.label, onChange = _a.onChange, _b = _a.inline, inline = _b === void 0 ? false : _b, _c = _a.showCross, showCross = _c === void 0 ? false : _c;
|
|
6470
|
+
return (jsxs(ColorRadioGroup$1, __assign$1({ value: selectedValue, onChange: onChange, css: { flexDirection: inline ? 'row' : 'column', alignItems: inline ? 'center' : 'start' } }, { children: [jsx(ColorRadioGroup$1.Label, { label: label, values: selectedValue && !inline ? selectedValue.label : undefined }, void 0), jsx(ColorRadioGroup$1.OptionsContainer, __assign$1({ css: { marginTop: inline ? '0' : '0.63rem', marginLeft: inline ? '1.5rem' : '0' }, "data-testid": "radio-group-options-container" }, { children: renderOptions(options, showCross) }), void 0)] }), void 0));
|
|
6475
6471
|
};
|
|
6476
6472
|
|
|
6477
6473
|
var Wrapper$5 = newStyled.div(templateObject_1$17 || (templateObject_1$17 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0.625rem 1.25rem;\n background-color: ", ";\n width: 36.875rem;\n max-width: 100%;\n border-radius: 0.5rem;\n\n img {\n margin-right: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n padding: 0.625rem 1.25rem;\n background-color: ", ";\n width: 36.875rem;\n max-width: 100%;\n border-radius: 0.5rem;\n\n img {\n margin-right: ", ";\n }\n"])), function (props) { return props.backgroundColor; }, function (props) { return (props.rightToLeft ? '0' : '1.25rem'); });
|