@trafilea/afrodita-components 6.5.0 → 6.5.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.d.ts +2 -0
- package/build/index.esm.js +12 -6
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12 -6
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -5480,7 +5480,7 @@ var templateObject_1$1A, templateObject_2$10, templateObject_3$Q;
|
|
|
5480
5480
|
var FinalPriceStyledContainer$1 = newStyled.div(templateObject_1$1z || (templateObject_1$1z = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
5481
5481
|
var PriceLabelV2 = function (_a) {
|
|
5482
5482
|
var _b;
|
|
5483
|
-
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 ? exports.ComponentSize.Small : _e, _f = _a.bordersRounded, bordersRounded = _f === void 0 ? false : _f, _g = _a.savingsDisplay, savingsDisplay = _g === void 0 ? true : _g, rest = __rest(_a, ["finalPrice", "originalPrice", "discount", "clubOffer", "color", "testId", "originalPriceStyled", "originalPriceUnderlined", "size", "bordersRounded", "savingsDisplay"]);
|
|
5483
|
+
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 ? exports.ComponentSize.Small : _e, _f = _a.bordersRounded, bordersRounded = _f === void 0 ? false : _f, _g = _a.savingsDisplay, savingsDisplay = _g === void 0 ? true : _g, hasPricePerItem = _a.hasPricePerItem, _h = _a.quantity, quantity = _h === void 0 ? 0 : _h, rest = __rest(_a, ["finalPrice", "originalPrice", "discount", "clubOffer", "color", "testId", "originalPriceStyled", "originalPriceUnderlined", "size", "bordersRounded", "savingsDisplay", "hasPricePerItem", "quantity"]);
|
|
5484
5484
|
var theme = useTheme();
|
|
5485
5485
|
var isDiffFinalAndOriginalPrice = originalPrice !== finalPrice;
|
|
5486
5486
|
var isOriginalPrice = originalPrice && isDiffFinalAndOriginalPrice;
|
|
@@ -5495,10 +5495,16 @@ var PriceLabelV2 = function (_a) {
|
|
|
5495
5495
|
}
|
|
5496
5496
|
});
|
|
5497
5497
|
}
|
|
5498
|
-
var
|
|
5499
|
-
finalPrice.
|
|
5500
|
-
finalPrice
|
|
5501
|
-
|
|
5498
|
+
var priceSymbolRemoved = typeof finalPrice === 'string' && finalPrice.includes(currencySymbol)
|
|
5499
|
+
? finalPrice.split(currencySymbol)[1]
|
|
5500
|
+
: finalPrice;
|
|
5501
|
+
var finalPricePerQuantity = hasPricePerItem
|
|
5502
|
+
? "".concat(currencySymbol).concat((Number(priceSymbolRemoved) / quantity).toFixed(2))
|
|
5503
|
+
: finalPrice;
|
|
5504
|
+
var finalPriceArray = typeof finalPricePerQuantity === 'string' &&
|
|
5505
|
+
finalPricePerQuantity.includes('.') &&
|
|
5506
|
+
finalPricePerQuantity.includes(currencySymbol)
|
|
5507
|
+
? finalPricePerQuantity.split(currencySymbol)[1].split('.')
|
|
5502
5508
|
: ['', ''];
|
|
5503
5509
|
var priceCommonProps = {
|
|
5504
5510
|
size: exports.ComponentSize.Small,
|
|
@@ -5531,7 +5537,7 @@ var PriceLabelV2 = function (_a) {
|
|
|
5531
5537
|
marginTop: '-5px',
|
|
5532
5538
|
} }, priceCommonProps, { size: size }, { children: currencySymbol }), void 0), jsxRuntime.jsx(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), jsxRuntime.jsx(Price, __assign$1({ finalPriceStyledSmall: true, style: {
|
|
5533
5539
|
marginTop: '-6px',
|
|
5534
|
-
} }, priceCommonProps, { size: size }, { children: finalPriceArray[1] ? finalPriceArray[1] : '00' }), void 0)] }), void 0), isDiscount && (jsxRuntime.jsx(TagContainer, __assign$1({ size: exports.ComponentSize.Small }, { children: discount && (jsxRuntime.jsx(DiscountTag, __assign$1({}, discount, { size: exports.ComponentSize.Medium, style: {
|
|
5540
|
+
} }, priceCommonProps, { size: size }, { children: finalPriceArray[1] ? finalPriceArray[1] : '00' }), void 0), hasPricePerItem && (jsxRuntime.jsx(Price, __assign$1({ size: exports.ComponentSize.Small, color: theme.colors.pallete.secondary.color }, { children: "/each" }), void 0))] }), void 0), isDiscount && (jsxRuntime.jsx(TagContainer, __assign$1({ size: exports.ComponentSize.Small }, { children: discount && (jsxRuntime.jsx(DiscountTag, __assign$1({}, discount, { size: exports.ComponentSize.Medium, style: {
|
|
5535
5541
|
letterSpacing: '-0.05rem',
|
|
5536
5542
|
}, bordersRounded: bordersRounded, savings: savingsDisplay ? "Save ".concat(currencySymbol).concat(savetoString) : undefined }), void 0)) }), void 0)), isClubOffer && (jsxRuntime.jsx(TagContainer, __assign$1({ size: exports.ComponentSize.Medium }, { children: clubOffer && (jsxRuntime.jsx(ClubOfferTag, __assign$1({}, clubOffer, { size: exports.ComponentSize.Small, style: {
|
|
5537
5543
|
borderRadius: '8px',
|