@trafilea/afrodita-components 5.0.0-beta.55 → 5.0.0-beta.56

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.
@@ -4491,7 +4491,7 @@ var getStylesBySize$5 = function (size) {
4491
4491
  };
4492
4492
  case ComponentSize.Small:
4493
4493
  return {
4494
- fontSize: '1rem',
4494
+ fontSize: '18px',
4495
4495
  finalPricefontSize: '24px',
4496
4496
  finalPricefontSizeSmall: '12px',
4497
4497
  margin: '0 0 0 0.5rem',
@@ -4545,16 +4545,16 @@ function getTestId() {
4545
4545
  var PriceLabel = function (_a) {
4546
4546
  var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, color = _a.color, testId = _a.testId, _b = _a.finalPriceStyled, finalPriceStyled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? ComponentSize.Medium : _c;
4547
4547
  var theme = useTheme();
4548
- var finalPriceArray = ['', ''];
4549
- if (typeof finalPrice === 'string' && finalPrice.includes('.') && finalPrice.includes('$'))
4550
- finalPriceArray = finalPrice.split('$')[1].split('.');
4548
+ var finalPriceArray = typeof finalPrice === 'string' && finalPrice.includes('.') && finalPrice.includes('$')
4549
+ ? finalPrice.split('$')[1].split('.')
4550
+ : ['', ''];
4551
4551
  var availableFinalPriceStyled = finalPriceStyled && finalPriceArray[0];
4552
4552
  var priceCommonProps = {
4553
4553
  size: size,
4554
4554
  color: color || theme.colors.pallete.secondary.color,
4555
4555
  weight: 700,
4556
4556
  };
4557
- var OriginalPrice = function () { return (jsx$1(Price, __assign$1({ size: size, color: theme.colors.shades['300'].color, margin: true, underlined: true, "data-testid": getTestId(testId, 'discount') }, { children: originalPrice }), void 0)); };
4557
+ var OriginalPrice = function () { return (jsx$1(Price, __assign$1({ size: ComponentSize.Small, color: theme.colors.shades['300'].color, margin: true, underlined: true, "data-testid": getTestId(testId, 'discount') }, { children: originalPrice }), void 0)); };
4558
4558
  return (jsxs$1(Container$F, { children: [availableFinalPriceStyled && originalPrice && jsx$1(OriginalPrice, {}, void 0), availableFinalPriceStyled ? (jsxs$1(FinalPriceContainer, __assign$1({ "data-testid": getTestId(testId, 'price') }, { children: [jsx$1(Price, __assign$1({ margin: true, finalPriceStyledSmall: true }, priceCommonProps, { children: "$" }), void 0), jsx$1(Price, __assign$1({ finalPriceStyled: true }, priceCommonProps, { children: finalPriceArray[0] }), void 0), jsx$1(Price, __assign$1({ finalPriceStyledSmall: true }, priceCommonProps, { children: finalPriceArray[1] }), void 0)] }), void 0)) : (jsxs$1(FinalPriceContainer, { children: [jsx$1(Price, __assign$1({ margin: true, "data-testid": getTestId(testId, 'price') }, priceCommonProps, { children: finalPrice }), void 0), originalPrice && jsx$1(OriginalPrice, {}, void 0)] }, void 0)), discount && (jsx$1(TagContainer, __assign$1({ size: size }, { children: jsx$1(DiscountTag, __assign$1({}, discount, { size: size }), void 0) }), void 0))] }, void 0));
4559
4559
  };
4560
4560
  var templateObject_1$12, templateObject_2$F, templateObject_3$t, templateObject_4$m;
package/build/index.js CHANGED
@@ -4517,7 +4517,7 @@ var getStylesBySize$5 = function (size) {
4517
4517
  };
4518
4518
  case exports.ComponentSize.Small:
4519
4519
  return {
4520
- fontSize: '1rem',
4520
+ fontSize: '18px',
4521
4521
  finalPricefontSize: '24px',
4522
4522
  finalPricefontSizeSmall: '12px',
4523
4523
  margin: '0 0 0 0.5rem',
@@ -4571,16 +4571,16 @@ function getTestId() {
4571
4571
  var PriceLabel = function (_a) {
4572
4572
  var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, color = _a.color, testId = _a.testId, _b = _a.finalPriceStyled, finalPriceStyled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? exports.ComponentSize.Medium : _c;
4573
4573
  var theme = useTheme();
4574
- var finalPriceArray = ['', ''];
4575
- if (typeof finalPrice === 'string' && finalPrice.includes('.') && finalPrice.includes('$'))
4576
- finalPriceArray = finalPrice.split('$')[1].split('.');
4574
+ var finalPriceArray = typeof finalPrice === 'string' && finalPrice.includes('.') && finalPrice.includes('$')
4575
+ ? finalPrice.split('$')[1].split('.')
4576
+ : ['', ''];
4577
4577
  var availableFinalPriceStyled = finalPriceStyled && finalPriceArray[0];
4578
4578
  var priceCommonProps = {
4579
4579
  size: size,
4580
4580
  color: color || theme.colors.pallete.secondary.color,
4581
4581
  weight: 700,
4582
4582
  };
4583
- var OriginalPrice = function () { return (jsxRuntime.jsx(Price, __assign$1({ size: size, color: theme.colors.shades['300'].color, margin: true, underlined: true, "data-testid": getTestId(testId, 'discount') }, { children: originalPrice }), void 0)); };
4583
+ var OriginalPrice = function () { return (jsxRuntime.jsx(Price, __assign$1({ size: exports.ComponentSize.Small, color: theme.colors.shades['300'].color, margin: true, underlined: true, "data-testid": getTestId(testId, 'discount') }, { children: originalPrice }), void 0)); };
4584
4584
  return (jsxRuntime.jsxs(Container$F, { children: [availableFinalPriceStyled && originalPrice && jsxRuntime.jsx(OriginalPrice, {}, void 0), availableFinalPriceStyled ? (jsxRuntime.jsxs(FinalPriceContainer, __assign$1({ "data-testid": getTestId(testId, 'price') }, { children: [jsxRuntime.jsx(Price, __assign$1({ margin: true, finalPriceStyledSmall: true }, priceCommonProps, { children: "$" }), void 0), jsxRuntime.jsx(Price, __assign$1({ finalPriceStyled: true }, priceCommonProps, { children: finalPriceArray[0] }), void 0), jsxRuntime.jsx(Price, __assign$1({ finalPriceStyledSmall: true }, priceCommonProps, { children: finalPriceArray[1] }), void 0)] }), void 0)) : (jsxRuntime.jsxs(FinalPriceContainer, { children: [jsxRuntime.jsx(Price, __assign$1({ margin: true, "data-testid": getTestId(testId, 'price') }, priceCommonProps, { children: finalPrice }), void 0), originalPrice && jsxRuntime.jsx(OriginalPrice, {}, void 0)] }, void 0)), discount && (jsxRuntime.jsx(TagContainer, __assign$1({ size: size }, { children: jsxRuntime.jsx(DiscountTag, __assign$1({}, discount, { size: size }), void 0) }), void 0))] }, void 0));
4585
4585
  };
4586
4586
  var templateObject_1$12, templateObject_2$F, templateObject_3$t, templateObject_4$m;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Trafilea's Design System",
4
4
  "author": "Trafilea",
5
5
  "repository": "https://github.com/trafilea/afrodita-components",
6
- "version": "5.0.0-beta.55",
6
+ "version": "5.0.0-beta.56",
7
7
  "private": false,
8
8
  "main": "build/index.js",
9
9
  "style": "build/index.css",