@lanaco/lnc-react-ui 4.0.38 → 4.0.40

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.
Files changed (67) hide show
  1. package/dist/BannerSectionBasic.cjs +9 -9
  2. package/dist/BannerSectionBasic.js +20 -20
  3. package/dist/BannerSectionCarousel.cjs +13 -5
  4. package/dist/BannerSectionCarousel.js +29 -21
  5. package/dist/BannerSectionGrid.cjs +1 -1
  6. package/dist/BannerSectionGrid.js +6 -6
  7. package/dist/BannerSectionSimple.cjs +4 -4
  8. package/dist/BannerSectionSimple.js +41 -38
  9. package/dist/BannerSectionWithList.cjs +4 -4
  10. package/dist/BannerSectionWithList.js +17 -17
  11. package/dist/BannerSectionWithListImage.cjs +5 -5
  12. package/dist/BannerSectionWithListImage.js +41 -38
  13. package/dist/BlogsSectionDetailed.cjs +15 -15
  14. package/dist/BlogsSectionDetailed.js +128 -92
  15. package/dist/BlogsSectionLarge.cjs +10 -10
  16. package/dist/BlogsSectionLarge.js +87 -60
  17. package/dist/BlogsSectionSimple.cjs +8 -8
  18. package/dist/BlogsSectionSimple.js +98 -72
  19. package/dist/BlogsSectionSimpleCentered.cjs +10 -10
  20. package/dist/BlogsSectionSimpleCentered.js +76 -46
  21. package/dist/BlogsSectionWithFilters.cjs +11 -11
  22. package/dist/BlogsSectionWithFilters.js +102 -73
  23. package/dist/BrandHitsSection.cjs +12 -7
  24. package/dist/BrandHitsSection.js +10 -5
  25. package/dist/CalorieCalculatorSection.cjs +7 -8
  26. package/dist/CalorieCalculatorSection.js +31 -32
  27. package/dist/CustomLoanMapSection.cjs +2 -2
  28. package/dist/CustomLoanMapSection.js +13 -13
  29. package/dist/DetailedProductsSection.cjs +4 -4
  30. package/dist/DetailedProductsSection.js +66 -57
  31. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +8 -8
  32. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +9 -8
  33. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +14 -6
  34. package/dist/FieldOfInterestsWithTagsCardsSection.js +12 -4
  35. package/dist/GeneralWithTagsCardsSection.cjs +18 -6
  36. package/dist/GeneralWithTagsCardsSection.js +44 -31
  37. package/dist/GiftCardsSection.cjs +9 -5
  38. package/dist/GiftCardsSection.js +21 -17
  39. package/dist/LocationSearchSection.cjs +1 -1
  40. package/dist/LocationSearchSection.js +1 -1
  41. package/dist/MasonryGeneralCardsSection.cjs +21 -1
  42. package/dist/MasonryGeneralCardsSection.js +20 -0
  43. package/dist/OverlayGeneralCardsSection.cjs +60 -104
  44. package/dist/OverlayGeneralCardsSection.js +138 -147
  45. package/dist/ProductsWithBannerSection.cjs +10 -10
  46. package/dist/ProductsWithBannerSection.js +85 -54
  47. package/dist/SalesCampaignsSection.cjs +17 -17
  48. package/dist/SalesCampaignsSection.js +81 -81
  49. package/dist/ShopCardsSection.cjs +19 -9
  50. package/dist/ShopCardsSection.js +54 -40
  51. package/dist/SimpleCategoriesSection.cjs +9 -9
  52. package/dist/SimpleCategoriesSection.js +89 -58
  53. package/dist/SimpleProductsSection.cjs +3 -3
  54. package/dist/SimpleProductsSection.js +86 -55
  55. package/dist/UrgentSaleProductsSection.cjs +5 -5
  56. package/dist/UrgentSaleProductsSection.js +41 -30
  57. package/dist/{index-CT6_7UFb.js → index-5cttM4t7.js} +119 -124
  58. package/dist/{index-CHkb_Sj6.js → index-BT55M3t6.js} +16 -15
  59. package/dist/{index-Dj5wZCVs.cjs → index-DHJmdMN8.cjs} +6 -5
  60. package/dist/index-Dn5tPLgP.cjs +95 -0
  61. package/dist/{style-6tSw9aqK.js → style-CiePxaJ_.js} +6 -6
  62. package/dist/{style-BR3tIhP1.cjs → style-DN1qT8BE.cjs} +6 -6
  63. package/dist/suspense-product-card-detailed-BETmfKMT.js +189 -0
  64. package/dist/{index-vXmvgZ2Y.cjs → suspense-product-card-detailed-DtzOxHaH.cjs} +4 -4
  65. package/package.json +1 -1
  66. package/dist/index-D6g5ZqyJ.js +0 -159
  67. package/dist/index-Q_i-aqsF.cjs +0 -95
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),t=require("./consts-CtNoHdBj.cjs"),i=r.newStyled.div`
1
+ "use strict";const r=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),t=require("./consts-CtNoHdBj.cjs"),a=r.newStyled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.5rem;
@@ -18,7 +18,7 @@
18
18
 
19
19
  & i {
20
20
  font-size: 1.5rem;
21
- color: var(--primary-500, #F59E0B);
21
+ color: var(--primary-500, #f59e0b);
22
22
  }
23
23
  }
24
24
 
@@ -33,7 +33,7 @@
33
33
  }
34
34
  }
35
35
  }
36
- `,a=r.newStyled.div`
36
+ `,i=r.newStyled.div`
37
37
  display: flex;
38
38
  flex-direction: column;
39
39
  gap: 0.75rem;
@@ -54,7 +54,7 @@
54
54
 
55
55
  & i {
56
56
  font-size: 1.5rem;
57
- color: var(--primary-500, #F59E0B);
57
+ color: var(--primary-500, #f59e0b);
58
58
  }
59
59
  }
60
60
 
@@ -63,7 +63,7 @@
63
63
  font-size: 1.375rem;
64
64
  }
65
65
  }
66
- `,n=e=>(e==null?void 0:e.toLowerCase())=="success"?"color: var(--success-700); border: 1px solid var(--success-600); background-color: var(--sucess-60008);":(e==null?void 0:e.toLowerCase())=="warning"?"color: var(--warning-600); border: 1px solid var(--warning-500); background-color: var(--warning-50012);":(e==null?void 0:e.toLowerCase())=="info"?"color: var(--info-700); border: 1px solid var(--info-600); background-color: var(--sucess-60012);":(e==null?void 0:e.toLowerCase())=="danger"?"color: var(--danger-600); border: 1px solid var(--danger-500); background-color: var(--danger-5008);":(e==null?void 0:e.toLowerCase())=="gray"?"color: var(--info-700); border: 1px solid var(--info-600); background-color: var(--sucess-60012);":"color: var(--gray-950, #14161A); border: 1px solid var(--gray-200); background-color: var(--white);",s=r.newStyled.div`
66
+ `,n=e=>(e==null?void 0:e.toLowerCase())=="success"?"color: var(--success-700, #047857); border: 1px solid var(--success-600, #059669); background-color: var(--sucess-60008, #05966914);":(e==null?void 0:e.toLowerCase())=="warning"?"color: var(--warning-600, #d97706); border: 1px solid var(--warning-500, #f59e0b); background-color: var(--warning-50012, #f59e0b1f);":(e==null?void 0:e.toLowerCase())=="info"?"color: var(--info-700, #6d28d9); border: 1px solid var(--info-600, #7c3aed); background-color: var(--info-60012, #7c3aed1f);":(e==null?void 0:e.toLowerCase())=="danger"?"color: var(--danger-600, #e11d48); border: 1px solid var(--danger-500, #f43f5e); background-color: var(--danger-5008, #f43f5e14);":(e==null?void 0:e.toLowerCase())=="secondary"?"color: var(--secondary-700, #2667a0); border: 1px solid var(--secondary-600, #3284cb); background-color: var(--secondary-60012, #3284cb1f);":"color: var(--gray-950, #14161A); border: 1px solid var(--gray-200, #dddfe4); background-color: var(--white, #fff);",s=r.newStyled.div`
67
67
  font-size: 0.75rem;
68
68
  font-weight: 500;
69
69
  padding: 0 0.5rem;
@@ -73,4 +73,4 @@
73
73
  border-radius: 0.25rem;
74
74
  display: flex;
75
75
  ${e=>n(e.color)}
76
- `;exports.BlogTag=s;exports.RegulatTitleSectionWrapper=i;exports.TitleWithOptionsSectionWrapper=a;
76
+ `;exports.BlogTag=s;exports.RegulatTitleSectionWrapper=a;exports.TitleWithOptionsSectionWrapper=i;
@@ -0,0 +1,189 @@
1
+ import { jsxs as t, jsx as e, Fragment as p } from "react/jsx-runtime";
2
+ import { forwardRef as c, Suspense as $ } from "react";
3
+ import { t as y, o as m, m as s, l as S, n as C, G as z } from "./utils-DtRLzzTZ.js";
4
+ import { n as g } from "./emotion-styled.browser.esm-CjCaF13H.js";
5
+ import { M as P } from "./consts-C1uHV4xc.js";
6
+ const h = g.div`
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: 0.5rem;
10
+ cursor: pointer;
11
+
12
+ & .wrapper-card-1 {
13
+ display: flex;
14
+ flex-direction: column;
15
+ gap: 0.38rem;
16
+ }
17
+
18
+ & .wrapper-card-2 {
19
+ display: flex;
20
+ flex-direction: column;
21
+ gap: 0;
22
+ }
23
+
24
+ & img {
25
+ width: 100%;
26
+ aspect-ratio: 1 / 1; /* defining the aspect ratio of the image */
27
+ object-fit: cover; /* making sure the image isn't distorted */
28
+ border-radius: 0.75rem;
29
+ }
30
+
31
+ & .card-title {
32
+ font-size: 0.875rem;
33
+ font-weight: 600;
34
+ ${y(2)}
35
+ }
36
+
37
+ & .price-text {
38
+ font-size: 1rem;
39
+ font-weight: 600;
40
+ ${m()}
41
+ }
42
+
43
+ & .location-text {
44
+ font-size: 0.75rem;
45
+ font-weight: 400;
46
+ color: var(--gray-600, #676e79);
47
+ ${m()}
48
+ }
49
+
50
+ & .tags-wrapper {
51
+ display: flex;
52
+ gap: 0.5rem;
53
+ }
54
+
55
+ &:hover {
56
+ & .card-title {
57
+ color: var(--primary-500, #f59e0b);
58
+ }
59
+ }
60
+
61
+ & .skeleton-img {
62
+ background-color: ${s("-90deg")};
63
+ border-radius: 0.75rem;
64
+ border: 1px solid white;
65
+ }
66
+
67
+ & .skeleton-title {
68
+ background-color: ${s("-90deg")};
69
+ width: 100%;
70
+ height: 2.5rem;
71
+ }
72
+
73
+ & .skeleton-tags {
74
+ background-color: ${s("-90deg")};
75
+ width: 80%;
76
+ height: 1.5rem;
77
+ }
78
+
79
+ & .skeleton-price {
80
+ background-color: ${s("-90deg")};
81
+ width: 50%;
82
+ height: 2.5rem;
83
+ }
84
+
85
+ & .skeleton-sponsored {
86
+ background-color: ${s("-90deg")};
87
+ width: 50%;
88
+ height: 1rem;
89
+ }
90
+
91
+ @media (max-width: ${P + "px"}) {
92
+ & img {
93
+ width: 8.875rem;
94
+ height: 8.875rem;
95
+ min-width: 8.875rem;
96
+ min-height: 8.875rem;
97
+ min-width: 8.875rem;
98
+ min-height: 8.875rem;
99
+ object-fit: cover;
100
+ }
101
+
102
+ & .price-text {
103
+ font-size: 0.875rem;
104
+ font-weight: 600;
105
+ }
106
+ }
107
+ `, D = g.div`
108
+ display: flex;
109
+ align-items: center;
110
+ gap: 0.25rem;
111
+ color: var(--gray-500);
112
+ font-size: 0.75rem;
113
+ font-weight: 500;
114
+
115
+ & i {
116
+ font-size: 1rem;
117
+ color: var(--warning-500, #F59E0B);
118
+ }
119
+ `, j = c(({ sponsoredText: r = "Sponsored" }, i) => /* @__PURE__ */ t(D, { ref: i, className: "sponsored-line", children: [
120
+ /* @__PURE__ */ e("i", { className: "mng-lnc-paw2" }),
121
+ /* @__PURE__ */ e("span", { children: r })
122
+ ] })), M = c((r, i) => {
123
+ const {
124
+ uuid: o,
125
+ title: n,
126
+ price: a,
127
+ currency: d,
128
+ isNegotiable: f,
129
+ isFree: u,
130
+ image: w,
131
+ sellerUuid: E,
132
+ location: x,
133
+ isSponsored: k,
134
+ imageComponent: l,
135
+ onSelectCard: v = () => {
136
+ },
137
+ freeText: N = "Free",
138
+ negotiableText: b = "Negotiable"
139
+ } = r;
140
+ return (
141
+ // <LandingPageProductCardSkeleton />
142
+ /* @__PURE__ */ t(h, { className: "product-card", onClick: v, children: [
143
+ S(l) ? l : /* @__PURE__ */ e("img", { src: w }),
144
+ /* @__PURE__ */ e("div", { className: "wrapper-card-1", children: /* @__PURE__ */ e("div", { className: "card-title", children: n }) }),
145
+ /* @__PURE__ */ t("div", { className: "wrapper-card-2", children: [
146
+ /* @__PURE__ */ t("div", { className: "price-text", children: [
147
+ a && d && `${C(a)} ${z(d)}`,
148
+ f && { negotiableText: b },
149
+ u && { freeText: N }
150
+ ] }),
151
+ /* @__PURE__ */ e("div", { className: "location-text", children: x })
152
+ ] }),
153
+ k === !0 && /* @__PURE__ */ e(j, {})
154
+ ] })
155
+ );
156
+ }), F = c(({}, r) => /* @__PURE__ */ t(h, { className: "product-card", children: [
157
+ /* @__PURE__ */ e("img", { className: "skeleton-img" }),
158
+ /* @__PURE__ */ t("div", { className: "wrapper-card-1", children: [
159
+ /* @__PURE__ */ e("div", { className: "skeleton-title" }),
160
+ /* @__PURE__ */ e("div", { className: "skeleton-tags" })
161
+ ] }),
162
+ /* @__PURE__ */ t("div", { className: "wrapper-card-1", children: [
163
+ /* @__PURE__ */ e("div", { className: "skeleton-price" }),
164
+ /* @__PURE__ */ e("div", { className: "skeleton-sponsored" })
165
+ ] })
166
+ ] })), T = ({ limit: r = 5, isLoading: i = !1, keyPrefix: o }) => /* @__PURE__ */ e(p, { children: Array.from({ length: r }, (n, a) => /* @__PURE__ */ e(
167
+ F,
168
+ {
169
+ isLoading: i
170
+ },
171
+ `${o}-skeleton-product-card-${a}`
172
+ )) }), R = ({
173
+ children: r,
174
+ fallbackComponent: i = /* @__PURE__ */ e(p, {}),
175
+ isLoading: o = !1,
176
+ limit: n,
177
+ keyPrefix: a
178
+ }) => /* @__PURE__ */ e($, { fallbackComponent: i, children: o === !0 ? /* @__PURE__ */ e(
179
+ T,
180
+ {
181
+ isLoading: o,
182
+ limit: n,
183
+ keyPrefix: a
184
+ }
185
+ ) : r });
186
+ export {
187
+ M as D,
188
+ R as S
189
+ };
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),s=require("react"),c=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),w=require("./consts-CtNoHdBj.cjs"),r=require("./utils-NZLCh-J5.cjs"),b=c.newStyled.div`
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("react"),r=require("./utils-NZLCh-J5.cjs"),l=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),k=require("./consts-CtNoHdBj.cjs"),m=l.newStyled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 0.5rem;
@@ -83,7 +83,7 @@
83
83
  height: 1rem;
84
84
  }
85
85
 
86
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
86
+ @media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
87
87
  & img {
88
88
  width: 8.875rem;
89
89
  height: 8.875rem;
@@ -99,7 +99,7 @@
99
99
  font-weight: 600;
100
100
  }
101
101
  }
102
- `,j=c.newStyled.div`
102
+ `,v=l.newStyled.div`
103
103
  display: flex;
104
104
  align-items: center;
105
105
  gap: 0.25rem;
@@ -111,4 +111,4 @@
111
111
  font-size: 1rem;
112
112
  color: var(--warning-500, #F59E0B);
113
113
  }
114
- `,v=s.forwardRef(({sponsoredText:i="Sponsored"},t)=>e.jsxs(j,{ref:t,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),y=s.forwardRef((i,t)=>{const{uuid:k,title:d,price:n,currency:o,isNegotiable:l,isFree:m,image:g,sellerUuid:$,location:p,isSponsored:h,imageComponent:a,onSelectCard:u=()=>{},freeText:x="Free",negotiableText:f="Negotiable"}=i;return e.jsxs(b,{className:"product-card",onClick:u,children:[r.isDefined(a)?a:e.jsx("img",{src:g}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:d})}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[n&&o&&`${r.formatPrice(n)} ${r.GetCurrencySymbol(o)}`,l&&{negotiableText:f},m&&{freeText:x}]}),e.jsx("div",{className:"location-text",children:p})]}),h===!0&&e.jsx(v,{})]})});exports.DetailedProductCard=y;
114
+ `,N=o.forwardRef(({sponsoredText:t="Sponsored"},i)=>e.jsxs(v,{ref:i,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),b=o.forwardRef((t,i)=>{const{uuid:a,title:n,price:s,currency:c,isNegotiable:p,isFree:g,image:h,sellerUuid:C,location:u,isSponsored:x,imageComponent:d,onSelectCard:f=()=>{},freeText:w="Free",negotiableText:j="Negotiable"}=t;return e.jsxs(m,{className:"product-card",onClick:f,children:[r.isDefined(d)?d:e.jsx("img",{src:h}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:n})}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[s&&c&&`${r.formatPrice(s)} ${r.GetCurrencySymbol(c)}`,p&&{negotiableText:j},g&&{freeText:w}]}),e.jsx("div",{className:"location-text",children:u})]}),x===!0&&e.jsx(N,{})]})}),y=o.forwardRef(({},t)=>e.jsxs(m,{className:"product-card",children:[e.jsx("img",{className:"skeleton-img"}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"skeleton-tags"})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-price"}),e.jsx("div",{className:"skeleton-sponsored"})]})]})),S=({limit:t=5,isLoading:i=!1,keyPrefix:a})=>e.jsx(e.Fragment,{children:Array.from({length:t},(n,s)=>e.jsx(y,{isLoading:i},`${a}-skeleton-product-card-${s}`))}),$=({children:t,fallbackComponent:i=e.jsx(e.Fragment,{}),isLoading:a=!1,limit:n,keyPrefix:s})=>e.jsx(o.Suspense,{fallbackComponent:i,children:a===!0?e.jsx(S,{isLoading:a,limit:n,keyPrefix:s}):t});exports.DetailedProductCard=b;exports.SuspenseDetailedProductCard=$;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.38",
3
+ "version": "4.0.40",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -1,159 +0,0 @@
1
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as s } from "react";
3
- import { n as l } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
- import { M as v } from "./consts-C1uHV4xc.js";
5
- import { t as k, o as d, m as r, l as y, n as $, G as N } from "./utils-DtRLzzTZ.js";
6
- const S = l.div`
7
- display: flex;
8
- flex-direction: column;
9
- gap: 0.5rem;
10
- cursor: pointer;
11
-
12
- & .wrapper-card-1 {
13
- display: flex;
14
- flex-direction: column;
15
- gap: 0.38rem;
16
- }
17
-
18
- & .wrapper-card-2 {
19
- display: flex;
20
- flex-direction: column;
21
- gap: 0;
22
- }
23
-
24
- & img {
25
- width: 100%;
26
- aspect-ratio: 1 / 1; /* defining the aspect ratio of the image */
27
- object-fit: cover; /* making sure the image isn't distorted */
28
- border-radius: 0.75rem;
29
- }
30
-
31
- & .card-title {
32
- font-size: 0.875rem;
33
- font-weight: 600;
34
- ${k(2)}
35
- }
36
-
37
- & .price-text {
38
- font-size: 1rem;
39
- font-weight: 600;
40
- ${d()}
41
- }
42
-
43
- & .location-text {
44
- font-size: 0.75rem;
45
- font-weight: 400;
46
- color: var(--gray-600, #676e79);
47
- ${d()}
48
- }
49
-
50
- & .tags-wrapper {
51
- display: flex;
52
- gap: 0.5rem;
53
- }
54
-
55
- &:hover {
56
- & .card-title {
57
- color: var(--primary-500, #f59e0b);
58
- }
59
- }
60
-
61
- & .skeleton-img {
62
- background-color: ${r("-90deg")};
63
- border-radius: 0.75rem;
64
- border: 1px solid white;
65
- }
66
-
67
- & .skeleton-title {
68
- background-color: ${r("-90deg")};
69
- width: 100%;
70
- height: 2.5rem;
71
- }
72
-
73
- & .skeleton-tags {
74
- background-color: ${r("-90deg")};
75
- width: 80%;
76
- height: 1.5rem;
77
- }
78
-
79
- & .skeleton-price {
80
- background-color: ${r("-90deg")};
81
- width: 50%;
82
- height: 2.5rem;
83
- }
84
-
85
- & .skeleton-sponsored {
86
- background-color: ${r("-90deg")};
87
- width: 50%;
88
- height: 1rem;
89
- }
90
-
91
- @media (max-width: ${v + "px"}) {
92
- & img {
93
- width: 8.875rem;
94
- height: 8.875rem;
95
- min-width: 8.875rem;
96
- min-height: 8.875rem;
97
- min-width: 8.875rem;
98
- min-height: 8.875rem;
99
- object-fit: cover;
100
- }
101
-
102
- & .price-text {
103
- font-size: 0.875rem;
104
- font-weight: 600;
105
- }
106
- }
107
- `, z = l.div`
108
- display: flex;
109
- align-items: center;
110
- gap: 0.25rem;
111
- color: var(--gray-500);
112
- font-size: 0.75rem;
113
- font-weight: 500;
114
-
115
- & i {
116
- font-size: 1rem;
117
- color: var(--warning-500, #F59E0B);
118
- }
119
- `, C = s(({ sponsoredText: t = "Sponsored" }, o) => /* @__PURE__ */ i(z, { ref: o, className: "sponsored-line", children: [
120
- /* @__PURE__ */ e("i", { className: "mng-lnc-paw2" }),
121
- /* @__PURE__ */ e("span", { children: t })
122
- ] })), P = s((t, o) => {
123
- const {
124
- uuid: j,
125
- title: m,
126
- price: a,
127
- currency: n,
128
- isNegotiable: p,
129
- isFree: g,
130
- image: h,
131
- sellerUuid: T,
132
- location: f,
133
- isSponsored: w,
134
- imageComponent: c,
135
- onSelectCard: u = () => {
136
- },
137
- freeText: x = "Free",
138
- negotiableText: b = "Negotiable"
139
- } = t;
140
- return (
141
- // <LandingPageProductCardSkeleton />
142
- /* @__PURE__ */ i(S, { className: "product-card", onClick: u, children: [
143
- y(c) ? c : /* @__PURE__ */ e("img", { src: h }),
144
- /* @__PURE__ */ e("div", { className: "wrapper-card-1", children: /* @__PURE__ */ e("div", { className: "card-title", children: m }) }),
145
- /* @__PURE__ */ i("div", { className: "wrapper-card-2", children: [
146
- /* @__PURE__ */ i("div", { className: "price-text", children: [
147
- a && n && `${$(a)} ${N(n)}`,
148
- p && { negotiableText: b },
149
- g && { freeText: x }
150
- ] }),
151
- /* @__PURE__ */ e("div", { className: "location-text", children: f })
152
- ] }),
153
- w === !0 && /* @__PURE__ */ e(C, {})
154
- ] })
155
- );
156
- });
157
- export {
158
- P as D
159
- };
@@ -1,95 +0,0 @@
1
- "use strict";const o=require("react/jsx-runtime"),n=require("react"),l=require("./index-BPVoEhTF.cjs"),V=require("./FlexBox.cjs"),R=require("./IconButton.cjs"),_=require("./ThemeProvider.cjs"),z=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),E=require("./consts-CtNoHdBj.cjs"),D=require("./useDetectMobile-D6d5LpdL.cjs"),K=require("./index-Cb_AeN9A.cjs"),O=require("./Button.cjs"),F=require("./Icon.cjs"),G=require("./utils-NZLCh-J5.cjs"),X=z.newStyled.div`
2
- position: relative;
3
- padding: ${r=>r.padding};
4
-
5
- & button {
6
- white-space: nowrap;
7
- }
8
-
9
- & .badge-button {
10
- ${r=>r.showTimesBtn===!0&&"padding-left: 0.5rem; padding-right: 0.5rem;"}
11
- }
12
-
13
- & .gradient {
14
- position: absolute;
15
- top: 50%;
16
- transform: translate(0, -50%);
17
- z-index: 4;
18
- transition: ${"0.3s"};
19
- right: ${r=>r.noArrows!==!0?"6rem":"0"};
20
- width: 2rem;
21
- background: #fff;
22
- height: 100%;
23
- -webkit-mask-image: linear-gradient(to left, black 10%, transparent 50%);
24
- mask-image: linear-gradient(to left, black 10%, transparent 50%);
25
- }
26
-
27
- & .scrollable-container {
28
- max-width: -webkit-fill-available;
29
- max-width: -moz-available; /* WebKit-based browsers will ignore this. */
30
- max-width: fill-available;
31
-
32
- ${r=>r.rightAlignArrows===!0&&r.noArrows!==!0&&"margin-right: 6rem"};
33
- scroll-behavior: smooth;
34
- overflow: hidden;
35
- -webkit-overflow-scrolling: touch;
36
- ::-webkit-scrollbar {
37
- -webkit-appearance: none;
38
- }
39
- -ms-overflow-style: none;
40
- /* Internet Explorer 10+ */
41
- scrollbar-width: none;
42
- /* Firefox */
43
-
44
- &::-webkit-scrollbar {
45
- display: none;
46
- /* Safari and Chrome */
47
- }
48
-
49
- @media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
50
- margin-right: 0;
51
- }
52
- }
53
- & .scroll-arrow-right,
54
- & .scroll-arrow-left {
55
- position: absolute;
56
- top: 50%;
57
- transform: translate(0, -50%);
58
- display: flex;
59
- justify-content: center;
60
- align-items: center;
61
- cursor: pointer;
62
-
63
- visibility: ${r=>r.arrowsVisibleOnHover===!1&&r.hasOverflow?"visible":"hidden"};
64
- z-index: 4;
65
- transition: ${"0.3s"};
66
- }
67
- & .scroll-arrow-right {
68
- ${r=>r.rightAlignArrows===!0?"right: 0":"right: 0.7rem"};
69
- }
70
- & .scroll-arrow-left {
71
- ${r=>r.rightAlignArrows===!0?"right: 2.625rem":"left: 0.7rem"};
72
- }
73
- & .scrollable-container:hover > .scroll-arrow-left,
74
- & .scrollable-container:hover > .scroll-arrow-right {
75
- visibility: ${r=>r.hasOverflow?"visible":"hidden"};
76
- }
77
-
78
- @media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
79
- & .scrollable-container {
80
- overflow: auto;
81
- }
82
- & .scroll-arrow-left,
83
- & .scroll-arrow-right {
84
- display: none;
85
- }
86
-
87
- & .gradient {
88
- right: 0;
89
- }
90
-
91
- & .scrollable-container button:nth-of-type(3) {
92
- ${r=>r.noMargin!==!0&&"margin-left: 1rem"};
93
- }
94
- }
95
- `,W=n.forwardRef(({columnGap:r="2rem",rowGap:N="1.25rem",scrollBySize:g=300,wrapForMobile:v=!1,wrap:a=!1,children:w,methodsRef:m,arrowsVisibleOnHover:x=!0,rightAlignArrows:P=!1,padding:y="0",showTimesBtn:p,noArrows:b,noGradient:T=!1,hideDisabledArrows:c=!1,noMargin:u=!1,...S},k)=>{const j=D.useDetectMobile(),{theme:e}=_.useTheme(),[t,f]=n.useState(!1),[d,h]=n.useState(!1),[H,I]=n.useState(!0),s=n.useRef(),B=()=>{var i;(i=s.current)==null||i.scrollBy(g,0)},$=()=>{var i;(i=s.current)==null||i.scrollBy(-g,0)},[q,L]=n.useState(!1);n.useEffect(()=>{var i,A;L(((i=s==null?void 0:s.current)==null?void 0:i.scrollWidth)>((A=s==null?void 0:s.current)==null?void 0:A.clientWidth))},[w]),n.useImperativeHandle(m,()=>({scrollToEnd(){M()},scrollLeft(){$()},scrollRight(){B()}}));const M=()=>{s.current.scrollLeft=s.current.scrollWidth};return o.jsx(X,{ref:k,arrowsVisibleOnHover:x,hasOverflow:q,noArrows:b,padding:y,rightAlignArrows:P,showTimesBtn:p,theme:e,noMargin:u,...S,children:o.jsxs(V,{ref:s,className:"scrollable-container",columnGap:r,rowGap:N,wrap:a||v&&j?"Wrap":"NoWrap",children:[b!==!0&&o.jsxs(o.Fragment,{children:[!(c===!0&&d===!0)&&o.jsx(R,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-left",color:"neutral",disabled:d,icon:"angle-left",onClick:$}),!(c===!0&&t===!0)&&o.jsx(R,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-right",color:"neutral",disabled:t,icon:"angle-right",onClick:B})]}),o.jsx(K.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{d===!0&&h(!1)},onIsVisible:()=>{d===!1&&h(!0)}}),w,o.jsx(K.InfiniteScrollEndElement,{className:"right-scroller",isHorizontal:!0,onIsNotVisible:()=>{t===!0&&f(!1),I(!0)},onIsVisible:()=>{t===!1&&f(!0),I(!1)}}),H&&q&&T!==!0&&o.jsx("div",{className:"gradient"})]})})});W.propTypes={title:l.PropTypes.string,rowGap:l.PropTypes.string,columnGap:l.PropTypes.string,scrollBySize:l.PropTypes.number,wrapForMobile:l.PropTypes.bool,wrap:l.PropTypes.bool,methodsRef:l.PropTypes.any,arrowsVisibleOnHover:l.PropTypes.bool,rightAlignArrows:l.PropTypes.bool,padding:l.PropTypes.string};const C=n.forwardRef((r,N)=>{const{allButton:g=!0,items:v=[],selectedIds:a=[],onSelect:w=()=>{},onRemove:m=()=>{},onSelectAll:x=()=>{},className:P,showTimesBtn:y=!1,labelKey:p="label",valueKey:b="value",codeKey:T="code",uniqueKey:c,typeKey:u,productsToolbarName:S="All",...k}=r,j=(e,t,f,d,h)=>{a!=null&&a.includes(e)?m(e,t,f,d,h):w(e,t,f,d,h)};return o.jsxs(W,{arrowsVisibleOnHover:!1,className:P,columnGap:"0.75rem",padding:"0.25rem 0",rightAlignArrows:!0,showTimesBtn:y,...k,children:[g&&o.jsx(O,{borderRadius:"curved",btnType:a.length===0?"filled":"tinted",className:"badge-button",color:"neutral",onClick:x,children:S}),v.map((e,t)=>o.jsxs(O,{borderRadius:"curved",btnType:a.includes(e.uuid)?"filled":"tinted",className:"badge-button",color:"neutral",onClick:()=>j(e[b],e[p],e[T],c?e[c]:null,u?e[u]:null),children:[G.isDefined(e==null?void 0:e.icon)&&o.jsxs(o.Fragment,{children:[o.jsx("i",{className:e==null?void 0:e.icon})," "]}),e[p],y===!0&&o.jsx(F,{className:"times-btn",icon:"times",sizeInUnits:"0.75rem",onClick:()=>m(e[b],e[p],e[T],c?e[c]:null,u?e[u]:null)})]},t))]})});C.propTypes={allButton:l.PropTypes.bool,items:l.PropTypes.array,selectedIds:l.PropTypes.array,onSelect:l.PropTypes.func,onRemove:l.PropTypes.func,onSelectAll:l.PropTypes.func,className:l.PropTypes.string,showTimesBtn:l.PropTypes.bool,valuKey:l.PropTypes.string,labelKey:l.PropTypes.string,codeKey:l.PropTypes.string};exports.SelectBar=C;