@trafilea/afrodita-components 5.0.0-beta.52 → 5.0.0-beta.53

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 CHANGED
@@ -151,6 +151,8 @@ declare const Edit: ({ height, width, fill }: IconProps) => JSX.Element;
151
151
 
152
152
  declare const SignOut: ({ height, width, fill }: IconProps) => JSX.Element;
153
153
 
154
+ declare const Add: ({ height, width, fill }: IconProps) => JSX.Element;
155
+
154
156
  declare const Actions_Check: typeof Check;
155
157
  declare const Actions_ClearLight: typeof ClearLight;
156
158
  declare const Actions_LightExclamation: typeof LightExclamation;
@@ -162,6 +164,7 @@ declare const Actions_Trash: typeof Trash;
162
164
  declare const Actions_Warning: typeof Warning;
163
165
  declare const Actions_Edit: typeof Edit;
164
166
  declare const Actions_SignOut: typeof SignOut;
167
+ declare const Actions_Add: typeof Add;
165
168
  declare namespace Actions {
166
169
  export {
167
170
  Actions_Check as Check,
@@ -175,6 +178,7 @@ declare namespace Actions {
175
178
  Actions_Warning as Warning,
176
179
  Actions_Edit as Edit,
177
180
  Actions_SignOut as SignOut,
181
+ Actions_Add as Add,
178
182
  };
179
183
  }
180
184
 
@@ -642,9 +646,10 @@ interface PriceLabelProps {
642
646
  color?: string;
643
647
  size?: ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large;
644
648
  discount?: DiscountTagProps;
649
+ finalPriceStyled?: boolean;
645
650
  testId?: string;
646
651
  }
647
- declare const PriceLabel: ({ finalPrice, originalPrice, discount, color, testId, size, }: PriceLabelProps) => JSX.Element;
652
+ declare const PriceLabel: ({ finalPrice, originalPrice, discount, color, testId, finalPriceStyled, size, }: PriceLabelProps) => JSX.Element;
648
653
 
649
654
  interface ColorPickerProps {
650
655
  options: ColorPickerOption[];
@@ -127,6 +127,11 @@ var SignOut = function (_a) {
127
127
  return (jsx$1(IconWrapper, __assign$1({ width: width, height: height, viewBoxX: 21, viewBoxY: 16, title: "Sign out" }, { children: jsx$1("path", { d: "M16.5939 15.5L13.3949 15.5C13.1435 15.5 12.9379 15.2891 12.9379 15.0313L12.9379 14.0938C12.9379 13.8359 13.1435 13.625 13.3949 13.625L16.5939 13.625C17.6032 13.625 18.422 12.7852 18.422 11.75L18.422 4.25C18.422 3.21484 17.6032 2.375 16.5939 2.375L13.3949 2.375C13.1435 2.375 12.9379 2.16406 12.9379 1.90625L12.9379 0.96875C12.9379 0.710937 13.1435 0.499999 13.3949 0.499999L16.5939 0.499998C18.6124 0.499998 20.25 2.17969 20.25 4.25L20.25 11.75C20.25 13.8203 18.6124 15.5 16.5939 15.5ZM7.7927 14.7383L8.53915 13.9727C8.72195 13.7852 8.71814 13.4844 8.53153 13.3047L4.22422 9.01563L13.6995 9.01563C13.9509 9.01563 14.1565 8.80469 14.1565 8.54688L14.1565 7.45312C14.1565 7.19531 13.9509 6.98437 13.6995 6.98437L4.22422 6.98438L8.53153 2.69922C8.71433 2.51562 8.71814 2.21484 8.53915 2.03125L7.7927 1.26563C7.6137 1.08203 7.32427 1.08203 7.14527 1.26563L0.88425 7.67188C0.705255 7.85547 0.705255 8.15234 0.88425 8.33594L7.14527 14.7422C7.32427 14.9219 7.6137 14.9219 7.7927 14.7383Z", fill: fill }, void 0) }), void 0));
128
128
  };
129
129
 
130
+ var Add = function (_a) {
131
+ var height = _a.height, width = _a.width, fill = _a.fill;
132
+ return (jsx$1(IconWrapper, __assign$1({ width: width, height: height, viewBoxX: 20, viewBoxY: 20, title: "add" }, { children: jsx$1("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.75 0C9.05964 0 8.5 0.559644 8.5 1.25V8.5H1.25C0.559644 8.5 0 9.05964 0 9.75C0 10.4404 0.559644 11 1.25 11H8.5V18.75C8.5 19.4404 9.05964 20 9.75 20C10.4404 20 11 19.4404 11 18.75V11H18.75C19.4404 11 20 10.4404 20 9.75C20 9.05964 19.4404 8.5 18.75 8.5H11V1.25C11 0.559644 10.4404 0 9.75 0Z", fill: fill }, void 0) }), void 0));
133
+ };
134
+
130
135
  var Actions = /*#__PURE__*/Object.freeze({
131
136
  __proto__: null,
132
137
  Check: Check$1,
@@ -138,7 +143,8 @@ var Actions = /*#__PURE__*/Object.freeze({
138
143
  Trash: Trash,
139
144
  Warning: Warning,
140
145
  Edit: Edit,
141
- SignOut: SignOut
146
+ SignOut: SignOut,
147
+ Add: Add
142
148
  });
143
149
 
144
150
  var FitPredictor$1 = function (_a) {
@@ -4202,7 +4208,7 @@ var TAGS = {
4202
4208
  hero1: newStyled.h1(templateObject_1$16 || (templateObject_1$16 = __makeTemplateObject([""], [""]))),
4203
4209
  hero2: newStyled.h2(templateObject_2$I || (templateObject_2$I = __makeTemplateObject([""], [""]))),
4204
4210
  hero3: newStyled.h3(templateObject_3$v || (templateObject_3$v = __makeTemplateObject([""], [""]))),
4205
- display1: newStyled.h1(templateObject_4$m || (templateObject_4$m = __makeTemplateObject([""], [""]))),
4211
+ display1: newStyled.h1(templateObject_4$n || (templateObject_4$n = __makeTemplateObject([""], [""]))),
4206
4212
  display2: newStyled.h2(templateObject_5$d || (templateObject_5$d = __makeTemplateObject([""], [""]))),
4207
4213
  heading1: newStyled.h1(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject([""], [""]))),
4208
4214
  heading2: newStyled.h2(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject([""], [""]))),
@@ -4322,7 +4328,7 @@ var DEFAULTS = {
4322
4328
  size: 'regular',
4323
4329
  },
4324
4330
  };
4325
- var templateObject_1$16, templateObject_2$I, templateObject_3$v, templateObject_4$m, templateObject_5$d, templateObject_6$8, templateObject_7$5, templateObject_8$2, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17;
4331
+ var templateObject_1$16, templateObject_2$I, templateObject_3$v, templateObject_4$n, templateObject_5$d, templateObject_6$8, templateObject_7$5, templateObject_8$2, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17;
4326
4332
 
4327
4333
  var ButtonsContainer = newStyled.div(templateObject_1$15 || (templateObject_1$15 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n margin: ", ";\n"], ["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n margin: ", ";\n"])), function (_a) {
4328
4334
  var inline = _a.inline;
@@ -4470,31 +4476,41 @@ var getStylesBySize$5 = function (size) {
4470
4476
  case ComponentSize.Large:
4471
4477
  return {
4472
4478
  fontSize: '1.5rem',
4479
+ finalPricefontSize: '36px',
4480
+ finalPricefontSizeSmall: '18px',
4473
4481
  margin: '0 0 0 0.75rem',
4474
4482
  lineHeight: '2rem',
4475
4483
  };
4476
4484
  case ComponentSize.Medium:
4477
4485
  return {
4478
4486
  fontSize: '1.125rem',
4487
+ finalPricefontSize: '32px',
4488
+ finalPricefontSizeSmall: '16px',
4479
4489
  margin: '0 0 0 0.5rem',
4480
4490
  lineHeight: '1.25rem',
4481
4491
  };
4482
4492
  case ComponentSize.Small:
4483
4493
  return {
4484
4494
  fontSize: '1rem',
4495
+ finalPricefontSize: '24px',
4496
+ finalPricefontSizeSmall: '12px',
4485
4497
  margin: '0 0 0 0.5rem',
4486
4498
  lineHeight: '1.25rem',
4487
4499
  };
4488
4500
  }
4489
4501
  };
4490
4502
  var Container$E = newStyled.div(templateObject_1$11 || (templateObject_1$11 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
4491
- var Price = newStyled.h1(templateObject_2$F || (templateObject_2$F = __makeTemplateObject(["\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-decoration: ", ";\n margin: ", ";\n"], ["\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-decoration: ", ";\n margin: ", ";\n"])), function (_a) {
4503
+ var Price = newStyled.h1(templateObject_2$F || (templateObject_2$F = __makeTemplateObject(["\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-decoration: ", ";\n margin: ", ";\n margin-top: ", ";\n"], ["\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-decoration: ", ";\n margin: ", ";\n margin-top: ", ";\n"])), function (_a) {
4492
4504
  var weight = _a.weight;
4493
4505
  return (weight ? weight : '400');
4494
4506
  }, function (_a) {
4495
- var _b;
4496
- var size = _a.size;
4497
- return (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.fontSize;
4507
+ var _b, _c, _d;
4508
+ var size = _a.size, finalPriceStyled = _a.finalPriceStyled, finalPriceStyledSmall = _a.finalPriceStyledSmall;
4509
+ return finalPriceStyled || finalPriceStyledSmall
4510
+ ? finalPriceStyledSmall
4511
+ ? (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.finalPricefontSizeSmall
4512
+ : (_c = getStylesBySize$5(size)) === null || _c === void 0 ? void 0 : _c.finalPricefontSize
4513
+ : (_d = getStylesBySize$5(size)) === null || _d === void 0 ? void 0 : _d.fontSize;
4498
4514
  }, function (_a) {
4499
4515
  var _b;
4500
4516
  var size = _a.size;
@@ -4509,12 +4525,16 @@ var Price = newStyled.h1(templateObject_2$F || (templateObject_2$F = __makeTempl
4509
4525
  var _b;
4510
4526
  var margin = _a.margin, size = _a.size;
4511
4527
  return (margin ? (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.margin : '0');
4528
+ }, function (_a) {
4529
+ var finalPriceStyledSmall = _a.finalPriceStyledSmall, size = _a.size;
4530
+ return finalPriceStyledSmall ? (size === 'large' ? '-10px' : '-7px') : '0';
4512
4531
  });
4513
4532
  var TagContainer = newStyled.h1(templateObject_3$t || (templateObject_3$t = __makeTemplateObject(["\n margin: ", ";\n display: flex;\n align-items: center;\n"], ["\n margin: ", ";\n display: flex;\n align-items: center;\n"])), function (_a) {
4514
4533
  var _b;
4515
4534
  var size = _a.size;
4516
4535
  return (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.margin;
4517
4536
  });
4537
+ var FinalPriceContainer = newStyled.div(templateObject_4$m || (templateObject_4$m = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
4518
4538
  function getTestId() {
4519
4539
  var args = [];
4520
4540
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -4523,11 +4543,21 @@ function getTestId() {
4523
4543
  return args.filter(Boolean).join('-');
4524
4544
  }
4525
4545
  var PriceLabel = function (_a) {
4526
- var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, color = _a.color, testId = _a.testId, _b = _a.size, size = _b === void 0 ? ComponentSize.Medium : _b;
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;
4527
4547
  var theme = useTheme();
4528
- return (jsxs$1(Container$E, { children: [jsx$1(Price, __assign$1({ size: size, color: color || theme.colors.pallete.secondary.color, weight: 700, "data-testid": getTestId(testId, 'price') }, { children: finalPrice }), void 0), originalPrice && (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)), discount && (jsx$1(TagContainer, __assign$1({ size: size }, { children: jsx$1(DiscountTag, __assign$1({}, discount, { size: size }), void 0) }), void 0))] }, void 0));
4548
+ var finalPriceArray = ['', ''];
4549
+ if (typeof finalPrice === 'string' && finalPrice.includes('.') && finalPrice.includes('$'))
4550
+ finalPriceArray = finalPrice.split('$')[1].split('.');
4551
+ var availableFinalPriceStyled = finalPriceStyled && finalPriceArray[0];
4552
+ var priceCommonProps = {
4553
+ size: size,
4554
+ color: color || theme.colors.pallete.secondary.color,
4555
+ weight: 700,
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)); };
4558
+ return (jsxs$1(Container$E, { 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));
4529
4559
  };
4530
- var templateObject_1$11, templateObject_2$F, templateObject_3$t;
4560
+ var templateObject_1$11, templateObject_2$F, templateObject_3$t, templateObject_4$m;
4531
4561
 
4532
4562
  var OneColorSelector = function (_a) {
4533
4563
  var color = _a.color, selected = _a.selected, testId = _a.testId;