@plurix/ecom-components 1.4.0-commerce.0 → 1.4.0-commerce.SCS-CIT.0

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.
@@ -1,79 +1,77 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { useMemo as c } from "react";
3
- import { formatEspecifications as w, formatBrazilianPrice as u, formatedMultiply as z } from "../../../utils/changerOrderModal.js";
4
- import { Icons as S } from "../assets/icons.js";
5
- import { isMobile as U } from "../../../constants/index.js";
6
- const H = ({
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { useMemo as l } from "react";
3
+ import { formatEspecifications as z, formatBrazilianPrice as v, formatedMultiply as U } from "../../../utils/changerOrderModal.js";
4
+ import { Icons as A } from "../assets/icons.js";
5
+ import { isMobile as B } from "../../../constants/index.js";
6
+ const O = ({
7
7
  similarProduct: a,
8
- similarProductSelect: r,
9
- setSimilarProductSelect: f,
10
- isClubClient: v
8
+ similarProductSelect: s,
9
+ setSimilarProductSelect: N,
10
+ isClubClient: d
11
11
  }) => {
12
12
  const {
13
- images: N,
14
- name: d,
15
- productId: m,
13
+ images: b,
14
+ name: m,
15
+ productId: h,
16
16
  sellingPrice: n,
17
17
  measurementUnit: y,
18
- unitMultiplier: b,
19
- hasDiscount: C,
20
- listPrice: o,
21
- isClub: I,
22
- skuSpecifications: h
23
- } = a, [{ imageUrl: M }] = N, l = c(() => U ? 48 : 80, []), p = c(
24
- () => m === (r == null ? void 0 : r.productId),
25
- [r]
26
- ), i = c(() => w(h || []), [h]), {
27
- discountPorcent: k,
28
- frontLstPrice: L,
29
- frontSellingPrice: P,
18
+ unitMultiplier: C,
19
+ hasDiscount: I,
20
+ listPrice: r,
21
+ isClub: p,
22
+ skuSpecifications: g
23
+ } = a, [{ imageUrl: M }] = b, c = l(() => B ? 48 : 80, []), u = l(
24
+ () => h === (s == null ? void 0 : s.productId),
25
+ [s]
26
+ ), i = l(() => z(g || []), [g]), {
27
+ discountPorcent: P,
28
+ frontLstPrice: k,
29
+ frontSellingPrice: L,
30
30
  frontPriceMultiply: j
31
- } = c(() => !n || !o ? {} : {
32
- discountPorcent: Math.round(n / o * 100 * -1),
33
- frontLstPrice: u(
34
- (o || 0) - (n || 0)
35
- ),
36
- frontSellingPrice: u(n || 0),
37
- frontPriceMultiply: z(y, b)
38
- }, [n, o]), x = {
31
+ } = l(() => !n || !r ? {} : {
32
+ discountPorcent: Math.round((r - n) / r * 100) * -1,
33
+ frontLstPrice: v(r || 0),
34
+ frontSellingPrice: v(n || 0),
35
+ frontPriceMultiply: U(y, C)
36
+ }, [n, r]), x = {
39
37
  Vegano: "var(--color-seals-veg)",
40
38
  Orgânico: "var(--color-seals-org)",
41
39
  "Sem Glúten": "var(--color-seals-gluten-free)",
42
40
  "Sem Lactose": "var(--color-seals-lactose-free)",
43
41
  "Sem Açúcar": "var(--color-seals-sugar-free)"
44
- }, g = p ? "var(--color-main)" : "var(--color-grayScale-lightest)";
45
- return /* @__PURE__ */ s(
42
+ }, f = u ? "var(--color-main)" : "var(--color-grayScale-lightest)", w = () => {
43
+ h !== (s == null ? void 0 : s.productId) && N(a);
44
+ };
45
+ return console.log("sellingPrice", n), console.log("listPrice", r), console.log("isClub", p), console.log("isClubClient", d), /* @__PURE__ */ o(
46
46
  "div",
47
47
  {
48
48
  className: "similar-product-list-item",
49
- onClick: () => {
50
- m !== (r == null ? void 0 : r.productId) && f(a);
51
- },
49
+ onClick: w,
52
50
  style: {
53
- borderColor: g
51
+ borderColor: f
54
52
  },
55
53
  children: [
56
- /* @__PURE__ */ e("div", { style: { width: l }, children: /* @__PURE__ */ e(
54
+ /* @__PURE__ */ e("div", { style: { width: c }, children: /* @__PURE__ */ e(
57
55
  "img",
58
56
  {
59
- height: l,
60
- width: l,
57
+ height: c,
58
+ width: c,
61
59
  src: M,
62
- alt: d,
60
+ alt: m,
63
61
  style: { objectFit: "contain" }
64
62
  }
65
63
  ) }),
66
- /* @__PURE__ */ s("div", { className: "infos", children: [
67
- /* @__PURE__ */ s("div", { className: "description", children: [
68
- /* @__PURE__ */ e("h4", { className: "product-name", children: d }),
64
+ /* @__PURE__ */ o("div", { className: "infos", children: [
65
+ /* @__PURE__ */ o("div", { className: "description", children: [
66
+ /* @__PURE__ */ e("h4", { className: "product-name", children: m }),
69
67
  /* @__PURE__ */ e(
70
68
  "span",
71
69
  {
72
70
  className: "choose-icon",
73
71
  style: {
74
- backgroundColor: g
72
+ backgroundColor: f
75
73
  },
76
- children: p && /* @__PURE__ */ e(S, { iconId: "Check" })
74
+ children: u && /* @__PURE__ */ e(A, { iconId: "Check" })
77
75
  }
78
76
  )
79
77
  ] }),
@@ -85,18 +83,18 @@ const H = ({
85
83
  children: t
86
84
  }
87
85
  )) }),
88
- /* @__PURE__ */ s("div", { className: "prices", children: [
89
- C && /* @__PURE__ */ s("div", { className: "discount", children: [
90
- /* @__PURE__ */ e("p", { className: "list-price", children: L }),
91
- /* @__PURE__ */ s("span", { className: "badge", children: [
92
- k,
86
+ /* @__PURE__ */ o("div", { className: "prices", children: [
87
+ I && /* @__PURE__ */ o("div", { className: "discount", children: [
88
+ /* @__PURE__ */ e("p", { className: "list-price", children: k }),
89
+ /* @__PURE__ */ o("span", { className: "badge", children: [
90
+ P,
93
91
  "%"
94
92
  ] })
95
93
  ] }),
96
- /* @__PURE__ */ s("p", { className: "sellingPrice", children: [
97
- P,
94
+ /* @__PURE__ */ o("p", { className: "sellingPrice", children: [
95
+ L,
98
96
  /* @__PURE__ */ e("span", { className: "sellingPrice-multiply", children: j }),
99
- I && v && /* @__PURE__ */ e("span", { className: "badge", children: "Club" })
97
+ p && d && /* @__PURE__ */ e("span", { className: "badge", children: "Clube" })
100
98
  ] })
101
99
  ] })
102
100
  ] })
@@ -105,5 +103,5 @@ const H = ({
105
103
  );
106
104
  };
107
105
  export {
108
- H as SimilarProductItem
106
+ O as SimilarProductItem
109
107
  };
@@ -1 +1 @@
1
- .change-order-modal p{margin:0;padding:0}.change-order-modal #modal-content-container{width:100%}.change-order-modal #modal-content-container #modal-content{display:flex;flex-direction:column;background-color:var(--color-grayScale-white);border-radius:16px 16px 0 0}.change-order-modal #modal-content-container #modal-content #modal-scroll{flex:1}.change-order-modal #modal-content-container #modal-content .modal-footer{display:flex;position:relative;padding:0;border-radius:16px}.change-order-modal #modal-content-container #modal-pre-content{padding:16px}.change-order-modal #modal-content-container #modal-content header{width:100%;display:flex;justify-content:space-between;padding:16px;align-items:center}.change-order-modal #modal-content-container #modal-content header .modal-title{font-size:16px;font-weight:700;line-height:20px;color:var(--color-grayScale)}.change-order-modal .modal-close{background:none;border:none;cursor:pointer}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content{border-radius:16px}.change-order-modal header .modal-title{font-size:24px;line-height:28px}}.change-order-modal #modal-content-container #modal-content .change-order-pre-content{display:flex;margin:16px}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos{width:100%;margin-left:8px}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details{display:flex;justify-content:space-between;align-items:center}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details .quantity{color:var(--color-grayScale);font-size:14px;line-height:18px;font-weight:700}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details .sellingPrice-multiply{font-weight:400}.change-order-modal #modal-content-container{height:90%}@media (min-width: 768px){.change-order-modal #modal-content-container{max-height:90%}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details .quantity{font-size:16px;line-height:20px}}.change-order-modal #modal-content-container #modal-content .change-order-similar-products{overflow-y:auto;margin:0 8px;padding:8px}.change-order-modal #modal-content-container #modal-content .change-order-similar-products::-webkit-scrollbar{width:4px;background-color:var(--color-main-faded)}.change-order-modal #modal-content-container #modal-content .change-order-similar-products::-webkit-scrollbar-thumb{width:3px;padding-top:16px;background-color:var(--color-main);max-height:34px;border-radius:20px}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .remove-buttom{color:var(--color-negativeFeedback);background-color:transparent;border:none;font-weight:700;font-size:14px;line-height:18px;display:flex;align-items:center;justify-content:center;margin:22px 0;column-gap:4px;text-decoration:underline;cursor:pointer}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .title{font-size:14px;line-height:18px;font-weight:700;color:var(--color-grayScale);margin-bottom:16px}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content .change-order-similar-products .remove-buttom{margin:16px 0}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .title{font-size:20px;line-height:24px}}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list{display:flex;row-gap:16px;flex-direction:column}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item{display:flex;border-style:solid;border-width:1px;border-radius:8px;padding:8px;width:100%}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item{display:flex;cursor:pointer;background-color:var(--color-grayScale-white)}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos{width:100%}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .description{width:100%;display:flex;justify-content:space-between}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .seal-container{display:flex;gap:4px;flex-wrap:wrap;margin:4px 0}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .seal{color:var(--color-grayScale-white);font-size:9px;list-style:16px;text-align:center;padding:4px;border-radius:2px}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .description .choose-icon{width:16px;height:16px;border-radius:100%;display:flex;align-items:center;justify-content:center}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices .discount .list-price{font-size:12px;line-height:16px;font-weight:400;color:var(--color-grayScale-dark);text-decoration:line-through}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices .discount{display:flex;column-gap:4px;align-items:center}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices .discount .badge{padding:1px 4px;color:var(--color-main);border-radius:16px;font-size:12px;font-weight:700;background-color:var(--color-secondary)}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices{display:flex;flex-direction:column;row-gap:5px}.change-order-modal .change-order-moda-footer{height:68px;background-color:#fff;border-radius:0 0 16px 16px;z-index:999;position:relative;width:100%;display:flex;flex-direction:row;align-content:center;padding:16px;box-shadow:0 -4px 4px 0 var(--color-support-shadow)}.change-order-modal .change-order-moda-footer .change-order-save-buttom{width:100%;height:34px;background-color:var(--color-main);border-color:transparent;border-radius:2px;color:var(--color-assistant-main);font-size:14px;line-height:18px;font-weight:500;cursor:pointer}.change-order-modal #modal-content-container #modal-content .product-name{font-size:14px;line-height:16px;font-weight:400;color:var(--color-grayScale);margin-bottom:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-align:start}.change-order-modal #modal-content-container #modal-content .badge{padding:1px 4px;color:var(--color-main);border-radius:16px;font-size:12px;font-weight:700;background-color:var(--color-secondary)}.change-order-modal #modal-content-container #modal-content .sellingPrice{color:var(--color-main);font-size:16px;line-height:20px;font-weight:700;display:flex;align-items:center;column-gap:1px}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content .sellingPrice{font-size:20px;line-height:24px}}
1
+ .change-order-modal p{margin:0;padding:0}.change-order-modal #modal-content-container{width:100%}.change-order-modal #modal-content-container #modal-content{display:flex;flex-direction:column;background-color:var(--color-grayScale-white);border-radius:16px 16px 0 0}.change-order-modal #modal-content-container #modal-content #modal-scroll{flex:1}.change-order-modal #modal-content-container #modal-content .modal-footer{display:flex;position:relative;padding:0;border-radius:16px}.change-order-modal #modal-content-container #modal-pre-content{padding:16px}.change-order-modal #modal-content-container #modal-content header{width:100%;display:flex;justify-content:space-between;padding:16px;align-items:center}.change-order-modal #modal-content-container #modal-content header .modal-title{font-size:16px;font-weight:700;line-height:20px;color:var(--color-grayScale)}.change-order-modal .modal-close{background:none;border:none;cursor:pointer}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content{border-radius:16px}.change-order-modal header .modal-title{font-size:24px;line-height:28px}}.change-order-modal #modal-content-container #modal-content .change-order-pre-content{display:flex;margin:16px}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos{width:100%;margin-left:8px}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details{display:flex;justify-content:space-between;align-items:center}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details .quantity{color:var(--color-grayScale);font-size:14px;line-height:18px;font-weight:700}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details .sellingPrice-multiply{font-weight:400}.change-order-modal #modal-content-container{height:90%}@media (min-width: 768px){.change-order-modal #modal-content-container{max-height:90%}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details .quantity{font-size:16px;line-height:20px}}.change-order-modal #modal-content-container #modal-content .change-order-similar-products{overflow-y:auto;margin:0 8px;padding:8px}.change-order-modal #modal-content-container #modal-content .change-order-similar-products::-webkit-scrollbar{width:4px;background-color:var(--color-main-faded)}.change-order-modal #modal-content-container #modal-content .change-order-similar-products::-webkit-scrollbar-thumb{width:3px;padding-top:16px;background-color:var(--color-main);max-height:34px;border-radius:20px}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .remove-buttom{color:var(--color-negativeFeedback);background-color:transparent;border:none;font-weight:700;font-size:14px;line-height:18px;display:flex;align-items:center;justify-content:center;margin:22px 0;column-gap:4px;text-decoration:underline;cursor:pointer}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .title{font-size:14px;line-height:18px;font-weight:700;color:var(--color-grayScale);margin-bottom:16px}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content .change-order-similar-products .remove-buttom{margin:16px 0}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .title{font-size:20px;line-height:24px}}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list{display:flex;row-gap:16px;flex-direction:column}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item{display:flex;border-style:solid;border-width:1px;border-radius:8px;padding:8px;width:100%}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item{display:flex;cursor:pointer;background-color:var(--color-grayScale-white)}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos{width:100%}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .description{width:100%;display:flex;justify-content:space-between}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .seal-container{display:flex;gap:4px;flex-wrap:wrap;margin:4px 0}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .seal{color:var(--color-grayScale-white);font-size:9px;list-style:16px;text-align:center;padding:4px;border-radius:2px}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .description .choose-icon{width:16px;height:16px;border-radius:100%;display:flex;align-items:center;justify-content:center}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices .discount .list-price{font-size:12px;line-height:16px;font-weight:400;color:var(--color-grayScale-dark);text-decoration:line-through}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices .discount{display:flex;column-gap:4px;align-items:center}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices .discount .badge{width:46px;height:17px;justify-content:center;display:flex;align-items:center;padding:4px;color:var(--color-main);border-radius:16px;font-size:12px;font-weight:700;background-color:var(--color-secondary)}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices{display:flex;flex-direction:column;row-gap:5px}.change-order-modal .change-order-moda-footer{height:68px;background-color:#fff;border-radius:0 0 16px 16px;z-index:999;position:relative;width:100%;display:flex;flex-direction:row;align-content:center;padding:16px;box-shadow:0 -4px 4px 0 var(--color-support-shadow)}.change-order-modal .change-order-moda-footer .change-order-save-buttom{width:100%;height:34px;background-color:var(--color-main);border-color:transparent;border-radius:2px;color:var(--color-assistant-main);font-size:14px;line-height:18px;font-weight:500;cursor:pointer}.change-order-modal #modal-content-container #modal-content .product-name{font-size:14px;line-height:16px;font-weight:400;color:var(--color-grayScale);margin-bottom:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-align:start}.change-order-modal #modal-content-container #modal-content .badge{padding:1px 4px;color:var(--color-main);border-radius:16px;font-size:12px;font-weight:700;background-color:var(--color-secondary)}.change-order-modal #modal-content-container #modal-content .sellingPrice{color:var(--color-main);font-size:16px;line-height:20px;font-weight:700;display:flex;align-items:center;column-gap:1px}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content .sellingPrice{font-size:20px;line-height:24px}}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@plurix/ecom-components",
3
3
  "author": "Plurix",
4
4
  "private": false,
5
- "version": "1.4.0-commerce.0",
5
+ "version": "1.4.0-commerce.SCS-CIT.0",
6
6
  "type": "module",
7
7
  "main": "dist/main.js",
8
8
  "types": "dist/main.d.ts",