@lanaco/lnc-react-ui 4.0.130 → 4.0.132
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/dist/BannerSectionCarousel.cjs +12 -8
- package/dist/BannerSectionCarousel.js +14 -10
- package/dist/BlogCardsSponsoredSection.cjs +7 -20
- package/dist/BlogCardsSponsoredSection.js +70 -99
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +198 -192
- package/dist/BlogListSection.cjs +4 -18
- package/dist/BlogListSection.js +70 -93
- package/dist/BlogSingleSection.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +2 -5
- package/dist/BlogsSectionDetailed.js +22 -25
- package/dist/BlogsSectionLarge.js +1 -1
- package/dist/BlogsSectionSimple.cjs +14 -7
- package/dist/BlogsSectionSimple.js +83 -72
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{index-EE-IJbC3.js → index-DJ545v7b.js} +1 -7
- package/dist/{suspense-product-card-detailed-Crkoym56.js → suspense-product-card-detailed-BP1opdKD.js} +70 -57
- package/dist/suspense-product-card-detailed-D0jNIBlf.cjs +131 -0
- package/package.json +1 -1
- package/dist/suspense-product-card-detailed-ByW7-U8H.cjs +0 -118
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
1
|
+
import { jsxs as s, jsx as r, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h, Suspense as T, memo as $, useMemo as P } from "react";
|
|
3
|
+
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as k } from "./consts-BuFChS64.js";
|
|
5
|
-
import { u as
|
|
5
|
+
import { u as R } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
6
|
import { o as z, p as I, k as b } from "./utils-BPdU4_1q.js";
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { P as
|
|
11
|
-
const
|
|
7
|
+
import { B as U, R as W } from "./style-XXDQBreL.js";
|
|
8
|
+
import j from "./Button.js";
|
|
9
|
+
import A from "./Link.js";
|
|
10
|
+
import { P as E } from "./index-3TFXgZHA.js";
|
|
11
|
+
const L = f.div`
|
|
12
12
|
display: grid;
|
|
13
13
|
grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
|
|
14
14
|
gap: 1.25rem;
|
|
@@ -16,7 +16,7 @@ const E = h.div`
|
|
|
16
16
|
@media (max-width: ${k + "px"}) {
|
|
17
17
|
grid-template-columns: repeat(1, 1fr);
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`, y = f.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: column;
|
|
22
22
|
width: 100%;
|
|
@@ -26,7 +26,6 @@ const E = h.div`
|
|
|
26
26
|
border-radius: 0.75rem;
|
|
27
27
|
border: 1px solid var(--gray-95008);
|
|
28
28
|
overflow: hidden;
|
|
29
|
-
max-height: 21.5625rem;
|
|
30
29
|
min-height: 21.5625rem;
|
|
31
30
|
cursor: pointer;
|
|
32
31
|
|
|
@@ -62,9 +61,17 @@ const E = h.div`
|
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
|
|
64
|
+
& .tags-wr {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
|
|
68
|
+
gap: 0.5rem;
|
|
69
|
+
padding: 1rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
65
72
|
@media (max-width: ${k + "px"}) {
|
|
66
73
|
}
|
|
67
|
-
`,
|
|
74
|
+
`, C = f.div`
|
|
68
75
|
padding: 1rem 1rem 0 1rem;
|
|
69
76
|
display: flex;
|
|
70
77
|
flex-direction: column;
|
|
@@ -84,120 +91,124 @@ const E = h.div`
|
|
|
84
91
|
color: var(--gray-700, #4e555f);
|
|
85
92
|
${I(3)}
|
|
86
93
|
}
|
|
87
|
-
`,
|
|
94
|
+
`, _ = h((t, a) => {
|
|
88
95
|
const {
|
|
89
96
|
title: i,
|
|
90
|
-
imageUrl:
|
|
91
|
-
text:
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
imageUrl: d,
|
|
98
|
+
text: n,
|
|
99
|
+
options: m,
|
|
100
|
+
onCardClick: p,
|
|
101
|
+
readMoreText: o = "Read more"
|
|
94
102
|
} = t;
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */ r(
|
|
97
|
-
/* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ s(y, { ref: a, className: "blog-card", onClick: p, children: [
|
|
104
|
+
/* @__PURE__ */ r(E, { src: d }),
|
|
105
|
+
/* @__PURE__ */ s(C, { children: [
|
|
98
106
|
/* @__PURE__ */ r("div", { className: "text-wr-title", children: i }),
|
|
99
|
-
/* @__PURE__ */ r("div", { className: "text-wr", children:
|
|
107
|
+
/* @__PURE__ */ r("div", { className: "text-wr", children: n })
|
|
100
108
|
] }),
|
|
101
|
-
/* @__PURE__ */ r(
|
|
109
|
+
m && /* @__PURE__ */ r("div", { className: "tags-wr", children: m == null ? void 0 : m.map((l, g) => /* @__PURE__ */ r(U, { color: l == null ? void 0 : l.color, children: l == null ? void 0 : l.name }, g)) }),
|
|
110
|
+
/* @__PURE__ */ r(A, { className: "action", color: "gray", onClick: p, children: o })
|
|
102
111
|
] });
|
|
103
|
-
}),
|
|
112
|
+
}), D = h(({}, t) => (
|
|
104
113
|
// <LandingPageClearProductCardSkeleton />
|
|
105
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ s(y, { className: "product-card", children: [
|
|
106
115
|
/* @__PURE__ */ r("div", { className: "skeleton-img" }),
|
|
107
116
|
/* @__PURE__ */ r("div", { className: "card-title" }),
|
|
108
|
-
/* @__PURE__ */ r(
|
|
117
|
+
/* @__PURE__ */ r(C, {})
|
|
109
118
|
] })
|
|
110
|
-
)),
|
|
111
|
-
|
|
119
|
+
)), G = ({ limit: t = 3, isLoading: a = !1, keyPrefix: i }) => /* @__PURE__ */ r(u, { children: Array.from({ length: t }, (d, n) => /* @__PURE__ */ r(
|
|
120
|
+
D,
|
|
112
121
|
{
|
|
113
|
-
isLoading:
|
|
122
|
+
isLoading: a
|
|
114
123
|
},
|
|
115
|
-
`${i}-skeleton-product-card-${
|
|
116
|
-
)) }),
|
|
124
|
+
`${i}-skeleton-product-card-${n}`
|
|
125
|
+
)) }), F = ({
|
|
117
126
|
children: t,
|
|
118
|
-
fallbackComponent:
|
|
127
|
+
fallbackComponent: a = /* @__PURE__ */ r(u, {}),
|
|
119
128
|
isLoading: i = !1,
|
|
120
|
-
limit:
|
|
121
|
-
keyPrefix:
|
|
122
|
-
}) => /* @__PURE__ */ r(
|
|
123
|
-
|
|
129
|
+
limit: d,
|
|
130
|
+
keyPrefix: n
|
|
131
|
+
}) => /* @__PURE__ */ r(T, { fallbackComponent: a, children: i === !0 ? /* @__PURE__ */ r(
|
|
132
|
+
G,
|
|
124
133
|
{
|
|
125
134
|
isLoading: i,
|
|
126
|
-
limit:
|
|
127
|
-
keyPrefix:
|
|
135
|
+
limit: d,
|
|
136
|
+
keyPrefix: n
|
|
128
137
|
}
|
|
129
|
-
) : t }), S =
|
|
138
|
+
) : t }), S = $(_), x = h((t, a) => {
|
|
130
139
|
const {
|
|
131
140
|
icon: i,
|
|
132
|
-
title:
|
|
133
|
-
onButtonAction:
|
|
141
|
+
title: d,
|
|
142
|
+
onButtonAction: n = () => {
|
|
134
143
|
},
|
|
135
|
-
onSelectCard:
|
|
144
|
+
onSelectCard: m = () => {
|
|
136
145
|
},
|
|
137
|
-
buttonLink:
|
|
138
|
-
items:
|
|
139
|
-
buttonText:
|
|
140
|
-
limit:
|
|
146
|
+
buttonLink: p,
|
|
147
|
+
items: o,
|
|
148
|
+
buttonText: l,
|
|
149
|
+
limit: g = 3,
|
|
141
150
|
isLoading: N = !1,
|
|
142
|
-
getImage:
|
|
151
|
+
getImage: v = () => {
|
|
143
152
|
},
|
|
144
|
-
readMoreText:
|
|
145
|
-
} = t,
|
|
153
|
+
readMoreText: w = "Read more"
|
|
154
|
+
} = t, B = R(), M = P(() => /* @__PURE__ */ r(u, { children: B === !0 ? o == null ? void 0 : o.map((e, c) => /* @__PURE__ */ r(
|
|
146
155
|
S,
|
|
147
156
|
{
|
|
148
157
|
title: e == null ? void 0 : e.title,
|
|
149
|
-
imageUrl:
|
|
158
|
+
imageUrl: v(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
150
159
|
text: e == null ? void 0 : e.description,
|
|
151
160
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
152
|
-
readMoreText:
|
|
153
|
-
|
|
161
|
+
readMoreText: w,
|
|
162
|
+
options: e == null ? void 0 : e.options,
|
|
163
|
+
onCardClick: () => m(e == null ? void 0 : e.titleSlug)
|
|
154
164
|
},
|
|
155
|
-
|
|
156
|
-
)) :
|
|
165
|
+
c
|
|
166
|
+
)) : o == null ? void 0 : o.slice(0, g).map((e, c) => /* @__PURE__ */ r(
|
|
157
167
|
S,
|
|
158
168
|
{
|
|
159
169
|
title: e == null ? void 0 : e.title,
|
|
160
|
-
imageUrl:
|
|
170
|
+
imageUrl: v(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
161
171
|
text: e == null ? void 0 : e.description,
|
|
162
172
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
163
|
-
readMoreText:
|
|
164
|
-
|
|
173
|
+
readMoreText: w,
|
|
174
|
+
options: e == null ? void 0 : e.options,
|
|
175
|
+
onCardClick: () => m(e == null ? void 0 : e.titleSlug)
|
|
165
176
|
},
|
|
166
|
-
|
|
167
|
-
)) }), [
|
|
168
|
-
return /* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
177
|
+
c
|
|
178
|
+
)) }), [o]);
|
|
179
|
+
return /* @__PURE__ */ s(W, { ref: a, children: [
|
|
180
|
+
/* @__PURE__ */ s("div", { className: "regular-title", children: [
|
|
181
|
+
/* @__PURE__ */ s("div", { className: "regular-title-text", children: [
|
|
171
182
|
b(i) && /* @__PURE__ */ r("i", { className: i }),
|
|
172
|
-
/* @__PURE__ */ r("span", { children:
|
|
183
|
+
/* @__PURE__ */ r("span", { children: d })
|
|
173
184
|
] }),
|
|
174
|
-
b(
|
|
175
|
-
|
|
185
|
+
b(p) && /* @__PURE__ */ r(
|
|
186
|
+
j,
|
|
176
187
|
{
|
|
177
188
|
type: "button",
|
|
178
189
|
btnType: "tinted",
|
|
179
190
|
color: "neutral",
|
|
180
191
|
onClick: (e) => {
|
|
181
|
-
var
|
|
182
|
-
(
|
|
192
|
+
var c;
|
|
193
|
+
(c = e == null ? void 0 : e.target) == null || c.blur(), n(p);
|
|
183
194
|
},
|
|
184
195
|
borderRadius: "curved",
|
|
185
196
|
className: "button-link",
|
|
186
|
-
children:
|
|
197
|
+
children: l
|
|
187
198
|
}
|
|
188
199
|
)
|
|
189
200
|
] }),
|
|
190
|
-
/* @__PURE__ */ r(
|
|
191
|
-
|
|
201
|
+
/* @__PURE__ */ r(L, { limit: g, children: /* @__PURE__ */ r(
|
|
202
|
+
F,
|
|
192
203
|
{
|
|
193
204
|
isLoading: N,
|
|
194
|
-
limit:
|
|
205
|
+
limit: g,
|
|
195
206
|
keyPrefix: "explore-landing",
|
|
196
|
-
children:
|
|
207
|
+
children: M
|
|
197
208
|
}
|
|
198
209
|
) })
|
|
199
210
|
] });
|
|
200
211
|
});
|
|
201
212
|
export {
|
|
202
|
-
|
|
213
|
+
x as default
|
|
203
214
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),s=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./consts-goSZX3xP.cjs"),U=require("./Button.cjs"),y=require("./utils-DmMdPm9O.cjs"),M=require("./useDetectMobile-zkbzoOGV.cjs"),F=require("./style-C_BRvopE.cjs"),h=require("./suspense-product-card-detailed-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),s=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./consts-goSZX3xP.cjs"),U=require("./Button.cjs"),y=require("./utils-DmMdPm9O.cjs"),M=require("./useDetectMobile-zkbzoOGV.cjs"),F=require("./style-C_BRvopE.cjs"),h=require("./suspense-product-card-detailed-D0jNIBlf.cjs"),T=require("./index-D0xZLbyl.cjs"),E=v.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${r=>`repeat(${r.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: ${r=>(r==null?void 0:r.gap)||"1.25rem"};
|
|
@@ -6,7 +6,7 @@ import E from "./Button.js";
|
|
|
6
6
|
import { k as f } from "./utils-BPdU4_1q.js";
|
|
7
7
|
import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
8
|
import { T as $ } from "./style-XXDQBreL.js";
|
|
9
|
-
import { D as L, S as O } from "./suspense-product-card-detailed-
|
|
9
|
+
import { D as L, S as O } from "./suspense-product-card-detailed-BP1opdKD.js";
|
|
10
10
|
import { S as R } from "./index-BRciSeV3.js";
|
|
11
11
|
const W = F.div`
|
|
12
12
|
display: grid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),b=require("./suspense-product-card-detailed-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),b=require("./suspense-product-card-detailed-D0jNIBlf.cjs"),C=P.styled.div`
|
|
2
2
|
padding: 1.75rem 3rem;
|
|
3
3
|
display: grid;
|
|
4
4
|
grid-template-columns: ${t=>`repeat(${t.limit||5}, minmax(0, 1fr))`};
|
|
@@ -4,7 +4,7 @@ import { s as C } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
|
4
4
|
import { M as L, S as F } from "./consts-BuFChS64.js";
|
|
5
5
|
import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
6
|
import T from "./Button.js";
|
|
7
|
-
import { D as _, S as D } from "./suspense-product-card-detailed-
|
|
7
|
+
import { D as _, S as D } from "./suspense-product-card-detailed-BP1opdKD.js";
|
|
8
8
|
const E = C.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
@@ -5,13 +5,7 @@ import { u as b } from "./useDetectMobile-Bkvj0VMa.js";
|
|
|
5
5
|
import a from "./Button.js";
|
|
6
6
|
import { P as f } from "./index-3TFXgZHA.js";
|
|
7
7
|
const k = p((l, c) => {
|
|
8
|
-
const {
|
|
9
|
-
title: s,
|
|
10
|
-
imageUrl: n,
|
|
11
|
-
text: m,
|
|
12
|
-
onCardClick: e,
|
|
13
|
-
buttonText: t
|
|
14
|
-
} = l, o = b();
|
|
8
|
+
const { title: s, imageUrl: n, text: m, onCardClick: e, buttonText: t } = l, o = b();
|
|
15
9
|
return /* @__PURE__ */ i(d, { ref: c, className: "blog-card", onClick: e, children: [
|
|
16
10
|
/* @__PURE__ */ r(f, { src: n }),
|
|
17
11
|
/* @__PURE__ */ i(u, { children: [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as i, jsx as e, Fragment as
|
|
2
|
-
import { forwardRef as p, Suspense as
|
|
3
|
-
import { p as
|
|
4
|
-
import { s as
|
|
5
|
-
import { P as
|
|
6
|
-
import { M as
|
|
7
|
-
const
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p, Suspense as z } from "react";
|
|
3
|
+
import { p as C, t as f, o as s, l as D, q as u, G as w } from "./utils-BPdU4_1q.js";
|
|
4
|
+
import { s as g } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
|
+
import { P as I } from "./index-3TFXgZHA.js";
|
|
6
|
+
import { M as v } from "./consts-BuFChS64.js";
|
|
7
|
+
const k = g.div`
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
gap: 0.5rem;
|
|
@@ -22,23 +22,16 @@ const v = x.div`
|
|
|
22
22
|
gap: 0;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
& img {
|
|
26
|
-
width: 100%;
|
|
27
|
-
aspect-ratio: 1 / 1; /* defining the aspect ratio of the image */
|
|
28
|
-
object-fit: cover; /* making sure the image isn't distorted */
|
|
29
|
-
border-radius: 0.75rem;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
25
|
& .card-title {
|
|
33
26
|
font-size: 0.875rem;
|
|
34
27
|
font-weight: 600;
|
|
35
|
-
${
|
|
28
|
+
${C(2)}
|
|
36
29
|
}
|
|
37
30
|
|
|
38
31
|
& .price-text {
|
|
39
32
|
font-size: 1rem;
|
|
40
33
|
font-weight: 600;
|
|
41
|
-
${
|
|
34
|
+
${f()}
|
|
42
35
|
display: flex;
|
|
43
36
|
align-items: end;
|
|
44
37
|
gap: 0.5rem;
|
|
@@ -55,7 +48,7 @@ const v = x.div`
|
|
|
55
48
|
font-size: 0.75rem;
|
|
56
49
|
font-weight: 400;
|
|
57
50
|
color: var(--gray-600, #676e79);
|
|
58
|
-
${
|
|
51
|
+
${f()}
|
|
59
52
|
}
|
|
60
53
|
|
|
61
54
|
& .tags-wrapper {
|
|
@@ -93,23 +86,43 @@ const v = x.div`
|
|
|
93
86
|
height: 1rem;
|
|
94
87
|
}
|
|
95
88
|
|
|
96
|
-
@media (max-width: ${
|
|
89
|
+
@media (max-width: ${v + "px"}) {
|
|
90
|
+
& .price-text {
|
|
91
|
+
font-size: 0.875rem;
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:hover .product-image-wrapper img {
|
|
97
|
+
transform: scale(1.1);
|
|
98
|
+
}
|
|
99
|
+
`, j = g.div`
|
|
100
|
+
position: relative;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
border-radius: 0.75rem;
|
|
103
|
+
width: 100%;
|
|
104
|
+
aspect-ratio: 1 / 1;
|
|
105
|
+
border: 1px solid #0c15201f;
|
|
106
|
+
|
|
107
|
+
& img {
|
|
108
|
+
display: block;
|
|
109
|
+
width: 100%;
|
|
110
|
+
height: 100%;
|
|
111
|
+
object-fit: cover;
|
|
112
|
+
border-radius: 0.75rem;
|
|
113
|
+
transition: var(--transition, all 0.3s ease);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (max-width: ${v + "px"}) {
|
|
97
117
|
& img {
|
|
98
118
|
width: 8.875rem;
|
|
99
119
|
height: 8.875rem;
|
|
100
120
|
min-width: 8.875rem;
|
|
101
121
|
min-height: 8.875rem;
|
|
102
|
-
min-width: 8.875rem;
|
|
103
|
-
min-height: 8.875rem;
|
|
104
122
|
object-fit: cover;
|
|
105
123
|
}
|
|
106
|
-
|
|
107
|
-
& .price-text {
|
|
108
|
-
font-size: 0.875rem;
|
|
109
|
-
font-weight: 600;
|
|
110
|
-
}
|
|
111
124
|
}
|
|
112
|
-
`, F =
|
|
125
|
+
`, F = g.div`
|
|
113
126
|
display: flex;
|
|
114
127
|
align-items: center;
|
|
115
128
|
gap: 0.25rem;
|
|
@@ -121,46 +134,46 @@ const v = x.div`
|
|
|
121
134
|
font-size: 1rem;
|
|
122
135
|
color: var(--warning-500, #F59E0B);
|
|
123
136
|
}
|
|
124
|
-
`,
|
|
137
|
+
`, T = p(({ sponsoredText: r = "Sponsored" }, a) => /* @__PURE__ */ i(F, { ref: a, className: "sponsored-line", children: [
|
|
125
138
|
/* @__PURE__ */ e("i", { className: "mng-lnc-paw2" }),
|
|
126
139
|
/* @__PURE__ */ e("span", { children: r })
|
|
127
|
-
] })),
|
|
140
|
+
] })), q = p((r, a) => {
|
|
128
141
|
const {
|
|
129
142
|
uuid: o,
|
|
130
|
-
title:
|
|
143
|
+
title: l,
|
|
131
144
|
price: t = 0,
|
|
132
|
-
sellingPrice:
|
|
133
|
-
currency:
|
|
134
|
-
isNegotiable:
|
|
145
|
+
sellingPrice: d,
|
|
146
|
+
currency: n,
|
|
147
|
+
isNegotiable: c,
|
|
135
148
|
isFree: m,
|
|
136
|
-
imageUrl:
|
|
149
|
+
imageUrl: N,
|
|
137
150
|
sellerUuid: G,
|
|
138
|
-
location:
|
|
151
|
+
location: b,
|
|
139
152
|
isSponsored: $,
|
|
140
|
-
imageComponent:
|
|
141
|
-
onSelectCard:
|
|
153
|
+
imageComponent: h,
|
|
154
|
+
onSelectCard: y = () => {
|
|
142
155
|
},
|
|
143
|
-
freeText:
|
|
144
|
-
negotiableText:
|
|
156
|
+
freeText: S = "Free",
|
|
157
|
+
negotiableText: P = "Negotiable"
|
|
145
158
|
} = r;
|
|
146
159
|
return (
|
|
147
160
|
// <LandingPageProductCardSkeleton />
|
|
148
|
-
/* @__PURE__ */ i(
|
|
149
|
-
|
|
150
|
-
/* @__PURE__ */ e("div", { className: "wrapper-card-1", children: /* @__PURE__ */ e("div", { className: "card-title", children:
|
|
161
|
+
/* @__PURE__ */ i(k, { className: "product-card", onClick: y, children: [
|
|
162
|
+
/* @__PURE__ */ e(j, { className: "product-image-wrapper", children: D(h) ? h : /* @__PURE__ */ e(I, { src: N }) }),
|
|
163
|
+
/* @__PURE__ */ e("div", { className: "wrapper-card-1", children: /* @__PURE__ */ e("div", { className: "card-title", children: l }) }),
|
|
151
164
|
/* @__PURE__ */ i("div", { className: "wrapper-card-2", children: [
|
|
152
165
|
/* @__PURE__ */ i("div", { className: "price-text", children: [
|
|
153
|
-
|
|
154
|
-
t > 0 &&
|
|
155
|
-
|
|
156
|
-
m &&
|
|
166
|
+
d > 0 && n && c !== !0 && m !== !0 && /* @__PURE__ */ e("div", { children: `${u(d)} ${w(n)}` }),
|
|
167
|
+
t > 0 && n && c !== !0 && m !== !0 && t !== d && /* @__PURE__ */ e("div", { className: `${d > 0 ? "full-price" : ""}`, children: `${u(t)} ${w(n)}` }),
|
|
168
|
+
c && P,
|
|
169
|
+
m && S
|
|
157
170
|
] }),
|
|
158
|
-
/* @__PURE__ */ e("div", { className: "location-text", children:
|
|
171
|
+
/* @__PURE__ */ e("div", { className: "location-text", children: b })
|
|
159
172
|
] }),
|
|
160
|
-
$ === !0 && /* @__PURE__ */ e(
|
|
173
|
+
$ === !0 && /* @__PURE__ */ e(T, {})
|
|
161
174
|
] })
|
|
162
175
|
);
|
|
163
|
-
}),
|
|
176
|
+
}), W = p(({}, r) => /* @__PURE__ */ i(k, { className: "product-card", children: [
|
|
164
177
|
/* @__PURE__ */ e("img", { className: "skeleton-img" }),
|
|
165
178
|
/* @__PURE__ */ i("div", { className: "wrapper-card-1", children: [
|
|
166
179
|
/* @__PURE__ */ e("div", { className: "skeleton-title" }),
|
|
@@ -170,27 +183,27 @@ const v = x.div`
|
|
|
170
183
|
/* @__PURE__ */ e("div", { className: "skeleton-price" }),
|
|
171
184
|
/* @__PURE__ */ e("div", { className: "skeleton-sponsored" })
|
|
172
185
|
] })
|
|
173
|
-
] })), E = ({ limit: r = 5, isLoading: a = !1, keyPrefix: o }) => /* @__PURE__ */ e(
|
|
174
|
-
|
|
186
|
+
] })), E = ({ limit: r = 5, isLoading: a = !1, keyPrefix: o }) => /* @__PURE__ */ e(x, { children: Array.from({ length: r }, (l, t) => /* @__PURE__ */ e(
|
|
187
|
+
W,
|
|
175
188
|
{
|
|
176
189
|
isLoading: a
|
|
177
190
|
},
|
|
178
191
|
`${o}-skeleton-product-card-${t}`
|
|
179
|
-
)) }),
|
|
192
|
+
)) }), L = ({
|
|
180
193
|
children: r,
|
|
181
|
-
fallbackComponent: a = /* @__PURE__ */ e(
|
|
194
|
+
fallbackComponent: a = /* @__PURE__ */ e(x, {}),
|
|
182
195
|
isLoading: o = !1,
|
|
183
|
-
limit:
|
|
196
|
+
limit: l,
|
|
184
197
|
keyPrefix: t
|
|
185
|
-
}) => /* @__PURE__ */ e(
|
|
198
|
+
}) => /* @__PURE__ */ e(z, { fallbackComponent: a, children: o === !0 ? /* @__PURE__ */ e(
|
|
186
199
|
E,
|
|
187
200
|
{
|
|
188
201
|
isLoading: o,
|
|
189
|
-
limit:
|
|
202
|
+
limit: l,
|
|
190
203
|
keyPrefix: t
|
|
191
204
|
}
|
|
192
205
|
) : r });
|
|
193
206
|
export {
|
|
194
|
-
|
|
195
|
-
|
|
207
|
+
q as D,
|
|
208
|
+
L as S
|
|
196
209
|
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("react"),r=require("./utils-DmMdPm9O.cjs"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./index-DiIeF_76.cjs"),u=require("./consts-goSZX3xP.cjs"),x=p.styled.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.5rem;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
|
|
7
|
+
& .wrapper-card-1 {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 0.38rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
& .wrapper-card-2 {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
& .card-title {
|
|
20
|
+
font-size: 0.875rem;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
${r.truncateTextInRows(2)}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
& .price-text {
|
|
26
|
+
font-size: 1rem;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
${r.truncateText()}
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: end;
|
|
31
|
+
gap: 0.5rem;
|
|
32
|
+
& .full-price {
|
|
33
|
+
text-decoration: line-through;
|
|
34
|
+
font-size: 0.75rem;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
padding-bottom: 0.125rem;
|
|
37
|
+
color: var(--gray-600, #676e79);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& .location-text {
|
|
42
|
+
font-size: 0.75rem;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
color: var(--gray-600, #676e79);
|
|
45
|
+
${r.truncateText()}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& .tags-wrapper {
|
|
49
|
+
display: flex;
|
|
50
|
+
gap: 0.5rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& .skeleton-img {
|
|
54
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
55
|
+
border-radius: 0.75rem;
|
|
56
|
+
border: 1px solid white;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
& .skeleton-title {
|
|
60
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 2.5rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& .skeleton-tags {
|
|
66
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
67
|
+
width: 80%;
|
|
68
|
+
height: 1.5rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
& .skeleton-price {
|
|
72
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
73
|
+
width: 50%;
|
|
74
|
+
height: 2.5rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
& .skeleton-sponsored {
|
|
78
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
79
|
+
width: 50%;
|
|
80
|
+
height: 1rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@media (max-width: ${u.MOBILE_SIZE_PX+"px"}) {
|
|
84
|
+
& .price-text {
|
|
85
|
+
font-size: 0.875rem;
|
|
86
|
+
font-weight: 600;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:hover .product-image-wrapper img {
|
|
91
|
+
transform: scale(1.1);
|
|
92
|
+
}
|
|
93
|
+
`,y=p.styled.div`
|
|
94
|
+
position: relative;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
border-radius: 0.75rem;
|
|
97
|
+
width: 100%;
|
|
98
|
+
aspect-ratio: 1 / 1;
|
|
99
|
+
border: 1px solid #0c15201f;
|
|
100
|
+
|
|
101
|
+
& img {
|
|
102
|
+
display: block;
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 100%;
|
|
105
|
+
object-fit: cover;
|
|
106
|
+
border-radius: 0.75rem;
|
|
107
|
+
transition: var(--transition, all 0.3s ease);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media (max-width: ${u.MOBILE_SIZE_PX+"px"}) {
|
|
111
|
+
& img {
|
|
112
|
+
width: 8.875rem;
|
|
113
|
+
height: 8.875rem;
|
|
114
|
+
min-width: 8.875rem;
|
|
115
|
+
min-height: 8.875rem;
|
|
116
|
+
object-fit: cover;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
`,N=p.styled.div`
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: 0.25rem;
|
|
123
|
+
color: var(--gray-500);
|
|
124
|
+
font-size: 0.75rem;
|
|
125
|
+
font-weight: 500;
|
|
126
|
+
|
|
127
|
+
& i {
|
|
128
|
+
font-size: 1rem;
|
|
129
|
+
color: var(--warning-500, #F59E0B);
|
|
130
|
+
}
|
|
131
|
+
`,$=c.forwardRef(({sponsoredText:t="Sponsored"},s)=>e.jsxs(N,{ref:s,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),S=c.forwardRef((t,s)=>{const{uuid:a,title:o,price:i=0,sellingPrice:n,currency:d,isNegotiable:l,isFree:m,imageUrl:h,sellerUuid:G,location:f,isSponsored:w,imageComponent:g,onSelectCard:j=()=>{},freeText:v="Free",negotiableText:b="Negotiable"}=t;return e.jsxs(x,{className:"product-card",onClick:j,children:[e.jsx(y,{className:"product-image-wrapper",children:r.isDefined(g)?g:e.jsx(k.ProductImageWrapper,{src:h})}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:o})}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[n>0&&d&&l!==!0&&m!==!0&&e.jsx("div",{children:`${r.formatPrice(n)} ${r.GetCurrencySymbol(d)}`}),i>0&&d&&l!==!0&&m!==!0&&i!==n&&e.jsx("div",{className:`${n>0?"full-price":""}`,children:`${r.formatPrice(i)} ${r.GetCurrencySymbol(d)}`}),l&&b,m&&v]}),e.jsx("div",{className:"location-text",children:f})]}),w===!0&&e.jsx($,{})]})}),P=c.forwardRef(({},t)=>e.jsxs(x,{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"})]})]})),C=({limit:t=5,isLoading:s=!1,keyPrefix:a})=>e.jsx(e.Fragment,{children:Array.from({length:t},(o,i)=>e.jsx(P,{isLoading:s},`${a}-skeleton-product-card-${i}`))}),z=({children:t,fallbackComponent:s=e.jsx(e.Fragment,{}),isLoading:a=!1,limit:o,keyPrefix:i})=>e.jsx(c.Suspense,{fallbackComponent:s,children:a===!0?e.jsx(C,{isLoading:a,limit:o,keyPrefix:i}):t});exports.DetailedProductCard=S;exports.SuspenseDetailedProductCard=z;
|