@lanaco/lnc-react-ui 4.0.74 → 4.0.75
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/BannerSectionSimple.cjs +9 -9
- package/dist/BannerSectionSimple.js +14 -14
- package/dist/BrandHitsSection.cjs +3 -3
- package/dist/BrandHitsSection.js +18 -18
- package/dist/FieldOfInterestsMasonrySection.cjs +6 -6
- package/dist/FieldOfInterestsMasonrySection.js +21 -21
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +5 -5
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +41 -41
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +7 -7
- package/dist/FieldOfInterestsWithTagsCardsSection.js +45 -43
- package/dist/GeneralWithTagsCardsSection.cjs +14 -14
- package/dist/GeneralWithTagsCardsSection.js +37 -40
- package/dist/SalesCampaignsSection.cjs +4 -4
- package/dist/SalesCampaignsSection.js +110 -108
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),p=require("react"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),p=require("react"),m=require("./emotion-styled.browser.esm-BtEseadx.cjs"),l=require("./utils-BXPz9bck.cjs"),y=require("./Icon.cjs"),b=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),j=require("./consts-CtNoHdBj.cjs"),k=m.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: flex-start;
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
`,$=m.styled.div`
|
|
62
62
|
width: 100%;
|
|
63
63
|
height: 11.625rem;
|
|
64
64
|
border-radius: 0.75rem;
|
|
65
65
|
background: ${l.linearGradientAnimation("-90deg")};
|
|
66
|
-
|
|
66
|
+
`,N=m.styled.div`
|
|
67
67
|
display: flex;
|
|
68
68
|
padding: 0 0.5rem 0 0;
|
|
69
69
|
align-items: center;
|
|
@@ -107,12 +107,12 @@
|
|
|
107
107
|
color: var(--white, #fff);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
`,
|
|
110
|
+
`,I=m.styled.div`
|
|
111
111
|
width: 7rem;
|
|
112
112
|
height: 3rem;
|
|
113
113
|
border-radius: 999px;
|
|
114
114
|
background: ${l.linearGradientAnimation("-90deg")};
|
|
115
|
-
`,
|
|
115
|
+
`,C=p.forwardRef(({},t)=>r.jsx(I,{})),W=p.forwardRef(({name:t,isActive:n,icon:i,onSelectCard:o=()=>{}},d)=>r.jsxs(N,{className:n?"active":"",onClick:o,children:[r.jsx(y,{icon:i,className:"wrapper__icon"}),r.jsx("div",{className:"wrapper__text",children:t})]})),F=p.forwardRef(({image:t,imageComponent:n,name:i,description:o,onSelectCard:d=()=>{}},x)=>{const{theme:c}=b.useTheme();return r.jsxs(k,{theme:c,onClick:d,children:[l.isDefined(n)?n:r.jsx("img",{src:t,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__content",children:[i&&r.jsx("div",{className:"wrapper__title",children:i}),o&&r.jsx("div",{className:"wrapper__description",children:o})]})]})}),R=p.forwardRef(({},t)=>r.jsx($,{})),q=m.styled.div`
|
|
116
116
|
display: flex;
|
|
117
117
|
flex-direction: column;
|
|
118
118
|
align-items: center;
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
width: 100%;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
@media (max-width: ${
|
|
163
|
+
@media (max-width: ${j.MOBILE_SIZE_PX+"px"}) {
|
|
164
164
|
& .wrapper__tags {
|
|
165
165
|
overflow-x: scroll;
|
|
166
166
|
justify-content: flex-start;
|
|
@@ -186,4 +186,4 @@
|
|
|
186
186
|
gap: 1rem;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
`,
|
|
189
|
+
`,T=p.forwardRef(({title:t,subtitle:n,tags:i=[],limitTags:o=7,limitTagsForMobile:d=7,limit:x=3,limitForMobile:c=2,items:s=[],onSelectTag:f=()=>{},onSelectCard:_=()=>{},getImage:v=()=>{}},z)=>{var g,u;const h=e=>{f==null||f(e)},w=e=>{_==null||_(e)};return r.jsxs(q,{limitTags:o,limitTagsForMobile:d,limitCards:x,limitCardsForMobile:c,children:[r.jsxs("div",{className:"wrapper__heading",children:[t&&r.jsx("div",{className:"wrapper__title",children:t}),n&&r.jsx("div",{className:"wrapper__subtitle",children:n})]}),r.jsx("div",{className:"wrapper__tags",children:i&&(i==null?void 0:i.length)>0?i==null?void 0:i.map((e,a)=>r.jsx(W,{icon:e==null?void 0:e.icon,name:e==null?void 0:e.name,onSelectCard:()=>h==null?void 0:h(e)},`field-of-interests-with-tags-card-tag__${a+1}`)):(g=Array.from("123"))==null?void 0:g.map((e,a)=>r.jsx(C,{},`field-of-interests-with-tags-card-tag-skeleton__${a+1}`))}),r.jsx("div",{className:"wrapper__cards",children:s&&(s==null?void 0:s.length)>0?s==null?void 0:s.map((e,a)=>r.jsx(F,{image:()=>v(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid),imageComponent:e==null?void 0:e.imageComponent,name:e==null?void 0:e.name,description:(e==null?void 0:e.shortDescription)||(e==null?void 0:e.description),onSelectCard:()=>w==null?void 0:w(e)},`field-of-interests-with-tags-card__${a+1}`)):(u=Array.from("123"))==null?void 0:u.map((e,a)=>r.jsx(R,{},`field-of-interests-with-tags-card-skeleton__${a+1}`))})]})});module.exports=T;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
3
|
import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { t as v, m as y, l as
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
7
|
-
import { M as
|
|
8
|
-
const
|
|
4
|
+
import { t as v, m as y, l as k } from "./utils-DCs-SbIv.js";
|
|
5
|
+
import $ from "./Icon.js";
|
|
6
|
+
import { u as N } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
|
+
import { M as C } from "./consts-C1uHV4xc.js";
|
|
8
|
+
const I = m.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: flex-start;
|
|
@@ -65,12 +65,12 @@ const C = m.div`
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`, W = m.div`
|
|
69
69
|
width: 100%;
|
|
70
70
|
height: 11.625rem;
|
|
71
71
|
border-radius: 0.75rem;
|
|
72
72
|
background: ${y("-90deg")};
|
|
73
|
-
`,
|
|
73
|
+
`, F = m.div`
|
|
74
74
|
display: flex;
|
|
75
75
|
padding: 0 0.5rem 0 0;
|
|
76
76
|
align-items: center;
|
|
@@ -114,30 +114,30 @@ const C = m.div`
|
|
|
114
114
|
color: var(--white, #fff);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
`,
|
|
117
|
+
`, j = m.div`
|
|
118
118
|
width: 7rem;
|
|
119
119
|
height: 3rem;
|
|
120
120
|
border-radius: 999px;
|
|
121
121
|
background: ${y("-90deg")};
|
|
122
|
-
`,
|
|
123
|
-
({
|
|
124
|
-
} },
|
|
125
|
-
/* @__PURE__ */ i(
|
|
122
|
+
`, z = p(({}, r) => /* @__PURE__ */ i(j, {})), O = p(
|
|
123
|
+
({ name: r, isActive: n, icon: t, onSelectCard: s = () => {
|
|
124
|
+
} }, f) => /* @__PURE__ */ l(F, { className: n ? "active" : "", onClick: s, children: [
|
|
125
|
+
/* @__PURE__ */ i($, { icon: t, className: "wrapper__icon" }),
|
|
126
126
|
/* @__PURE__ */ i("div", { className: "wrapper__text", children: r })
|
|
127
127
|
] })
|
|
128
|
-
),
|
|
129
|
-
({ image: r, imageComponent:
|
|
128
|
+
), T = p(
|
|
129
|
+
({ image: r, imageComponent: n, name: t, description: s, onSelectCard: f = () => {
|
|
130
130
|
} }, g) => {
|
|
131
|
-
const { theme:
|
|
132
|
-
return /* @__PURE__ */ l(
|
|
133
|
-
|
|
131
|
+
const { theme: d } = N();
|
|
132
|
+
return /* @__PURE__ */ l(I, { theme: d, onClick: f, children: [
|
|
133
|
+
k(n) ? n : /* @__PURE__ */ i("img", { src: r, className: "wrapper__image" }),
|
|
134
134
|
/* @__PURE__ */ l("div", { className: "wrapper__content", children: [
|
|
135
135
|
t && /* @__PURE__ */ i("div", { className: "wrapper__title", children: t }),
|
|
136
136
|
s && /* @__PURE__ */ i("div", { className: "wrapper__description", children: s })
|
|
137
137
|
] })
|
|
138
138
|
] });
|
|
139
139
|
}
|
|
140
|
-
),
|
|
140
|
+
), M = p(({}, r) => /* @__PURE__ */ i(W, {})), A = m.div`
|
|
141
141
|
display: flex;
|
|
142
142
|
flex-direction: column;
|
|
143
143
|
align-items: center;
|
|
@@ -185,7 +185,7 @@ const C = m.div`
|
|
|
185
185
|
width: 100%;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
@media (max-width: ${
|
|
188
|
+
@media (max-width: ${C + "px"}) {
|
|
189
189
|
& .wrapper__tags {
|
|
190
190
|
overflow-x: scroll;
|
|
191
191
|
justify-content: flex-start;
|
|
@@ -214,61 +214,63 @@ const C = m.div`
|
|
|
214
214
|
`, X = p(
|
|
215
215
|
({
|
|
216
216
|
title: r,
|
|
217
|
-
subtitle:
|
|
217
|
+
subtitle: n,
|
|
218
218
|
tags: t = [],
|
|
219
219
|
limitTags: s = 7,
|
|
220
|
-
limitTagsForMobile:
|
|
220
|
+
limitTagsForMobile: f = 7,
|
|
221
221
|
limit: g = 3,
|
|
222
|
-
limitForMobile:
|
|
223
|
-
items:
|
|
222
|
+
limitForMobile: d = 2,
|
|
223
|
+
items: a = [],
|
|
224
224
|
onSelectTag: c = () => {
|
|
225
225
|
},
|
|
226
226
|
onSelectCard: h = () => {
|
|
227
|
+
},
|
|
228
|
+
getImage: b = () => {
|
|
227
229
|
}
|
|
228
|
-
},
|
|
229
|
-
var
|
|
230
|
+
}, E) => {
|
|
231
|
+
var x, u;
|
|
230
232
|
const _ = (e) => {
|
|
231
|
-
c == null || c(e
|
|
233
|
+
c == null || c(e);
|
|
232
234
|
}, w = (e) => {
|
|
233
|
-
h == null || h(e
|
|
235
|
+
h == null || h(e);
|
|
234
236
|
};
|
|
235
237
|
return /* @__PURE__ */ l(
|
|
236
|
-
|
|
238
|
+
A,
|
|
237
239
|
{
|
|
238
240
|
limitTags: s,
|
|
239
|
-
limitTagsForMobile:
|
|
241
|
+
limitTagsForMobile: f,
|
|
240
242
|
limitCards: g,
|
|
241
|
-
limitCardsForMobile:
|
|
243
|
+
limitCardsForMobile: d,
|
|
242
244
|
children: [
|
|
243
245
|
/* @__PURE__ */ l("div", { className: "wrapper__heading", children: [
|
|
244
246
|
r && /* @__PURE__ */ i("div", { className: "wrapper__title", children: r }),
|
|
245
|
-
|
|
247
|
+
n && /* @__PURE__ */ i("div", { className: "wrapper__subtitle", children: n })
|
|
246
248
|
] }),
|
|
247
249
|
/* @__PURE__ */ i("div", { className: "wrapper__tags", children: t && (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((e, o) => /* @__PURE__ */ i(
|
|
248
|
-
|
|
250
|
+
O,
|
|
249
251
|
{
|
|
250
252
|
icon: e == null ? void 0 : e.icon,
|
|
251
|
-
|
|
253
|
+
name: e == null ? void 0 : e.name,
|
|
252
254
|
onSelectCard: () => _ == null ? void 0 : _(e)
|
|
253
255
|
},
|
|
254
256
|
`field-of-interests-with-tags-card-tag__${o + 1}`
|
|
255
|
-
)) : (
|
|
256
|
-
|
|
257
|
+
)) : (x = Array.from("123")) == null ? void 0 : x.map((e, o) => /* @__PURE__ */ i(
|
|
258
|
+
z,
|
|
257
259
|
{},
|
|
258
260
|
`field-of-interests-with-tags-card-tag-skeleton__${o + 1}`
|
|
259
261
|
)) }),
|
|
260
|
-
/* @__PURE__ */ i("div", { className: "wrapper__cards", children:
|
|
261
|
-
|
|
262
|
+
/* @__PURE__ */ i("div", { className: "wrapper__cards", children: a && (a == null ? void 0 : a.length) > 0 ? a == null ? void 0 : a.map((e, o) => /* @__PURE__ */ i(
|
|
263
|
+
T,
|
|
262
264
|
{
|
|
263
|
-
image: e == null ? void 0 : e.image,
|
|
265
|
+
image: () => b(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid),
|
|
264
266
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
265
|
-
|
|
266
|
-
description: e == null ? void 0 : e.description,
|
|
267
|
-
onSelectCard: () => w == null ? void 0 : w(e
|
|
267
|
+
name: e == null ? void 0 : e.name,
|
|
268
|
+
description: (e == null ? void 0 : e.shortDescription) || (e == null ? void 0 : e.description),
|
|
269
|
+
onSelectCard: () => w == null ? void 0 : w(e)
|
|
268
270
|
},
|
|
269
271
|
`field-of-interests-with-tags-card__${o + 1}`
|
|
270
|
-
)) : (
|
|
271
|
-
|
|
272
|
+
)) : (u = Array.from("123")) == null ? void 0 : u.map((e, o) => /* @__PURE__ */ i(
|
|
273
|
+
M,
|
|
272
274
|
{},
|
|
273
275
|
`field-of-interests-with-tags-card-skeleton__${o + 1}`
|
|
274
276
|
)) })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),l=require("react"),o=require("./emotion-styled.browser.esm-BtEseadx.cjs"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),l=require("react"),o=require("./emotion-styled.browser.esm-BtEseadx.cjs"),p=require("./consts-CtNoHdBj.cjs"),c=require("./utils-BXPz9bck.cjs"),y=require("./Icon.cjs"),v=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),j=o.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: flex-start;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
font-style: normal;
|
|
38
38
|
font-weight: 500;
|
|
39
39
|
line-height: 1.5rem;
|
|
40
|
-
${
|
|
40
|
+
${c.truncateTextInRows(2)}
|
|
41
41
|
transition: var(--transition, all 0.2s ease);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
@media (max-width: ${
|
|
55
|
+
@media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
|
|
56
56
|
background: transparent;
|
|
57
57
|
border: none;
|
|
58
58
|
box-shadow: none;
|
|
@@ -74,18 +74,18 @@
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,k=o.styled.div`
|
|
78
78
|
width: 100%;
|
|
79
79
|
height: 11.625rem;
|
|
80
80
|
border-radius: 0.75rem;
|
|
81
|
-
background: ${
|
|
81
|
+
background: ${c.linearGradientAnimation("-90deg")};
|
|
82
82
|
|
|
83
|
-
@media (max-width: ${
|
|
83
|
+
@media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
|
|
84
84
|
width: 5rem;
|
|
85
85
|
height: 5rem;
|
|
86
86
|
border-radius: 999px;
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
`,$=o.styled.div`
|
|
89
89
|
display: flex;
|
|
90
90
|
padding: 0 0.5rem 0 0;
|
|
91
91
|
align-items: center;
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
letter-spacing: -0.09px;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
@media (max-width: ${
|
|
123
|
+
@media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
|
|
124
124
|
& .wrapper__text {
|
|
125
125
|
white-space: nowrap;
|
|
126
126
|
}
|
|
@@ -129,8 +129,8 @@
|
|
|
129
129
|
width: 7rem;
|
|
130
130
|
height: 3rem;
|
|
131
131
|
border-radius: 999px;
|
|
132
|
-
background: ${
|
|
133
|
-
`,
|
|
132
|
+
background: ${c.linearGradientAnimation("-90deg")};
|
|
133
|
+
`,I=l.forwardRef(({},a)=>r.jsx(C,{})),N=l.forwardRef(({title:a,icon:i,onSelectCard:t=()=>{}},d)=>r.jsxs($,{onClick:t,children:[r.jsx(y,{icon:` ${i}`,className:"wrapper__icon"}),r.jsx("div",{className:"wrapper__text",children:a})]})),E=l.forwardRef(({imageUrl:a,imageComponent:i,title:t,onSelectCard:d=()=>{}},m)=>{const{theme:h}=v.useTheme();return r.jsxs(j,{ref:m,theme:h,onClick:d,children:[c.isDefined(i)?i:r.jsx("img",{src:a,className:"wrapper__image"}),r.jsx("div",{className:"wrapper__content",children:r.jsx("div",{className:"wrapper__title",children:t})})]})}),W=l.forwardRef(({},a)=>r.jsx(k,{})),G=o.styled.div`
|
|
134
134
|
display: flex;
|
|
135
135
|
flex-direction: column;
|
|
136
136
|
align-items: center;
|
|
@@ -172,14 +172,14 @@
|
|
|
172
172
|
|
|
173
173
|
& .wrapper__cards {
|
|
174
174
|
display: grid;
|
|
175
|
-
grid-template-columns: ${
|
|
175
|
+
grid-template-columns: ${a=>`repeat(${a==null?void 0:a.limitCards}, minmax(0, 1fr))`};
|
|
176
176
|
justify-content: center;
|
|
177
177
|
align-items: center;
|
|
178
178
|
gap: 1.5rem;
|
|
179
179
|
width: 100%;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
@media (max-width: ${
|
|
182
|
+
@media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
|
|
183
183
|
& .wrapper__tags {
|
|
184
184
|
display: flex;
|
|
185
185
|
flex-wrap: nowrap;
|
|
@@ -203,8 +203,8 @@
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
& .wrapper__cards {
|
|
206
|
-
grid-template-columns: ${
|
|
206
|
+
grid-template-columns: ${a=>`repeat(${a==null?void 0:a.limitCardsForMobile}, minmax(0, 1fr))`};
|
|
207
207
|
gap: 1rem;
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
`,
|
|
210
|
+
`,R=l.forwardRef(({title:a,subtitle:i,options:t=[],limitTags:d=7,limitTagsForMobile:m=2,limit:h=3,limitForMobile:f=3,items:n=[],onSelectTag:g=()=>{},onSelectCard:_=()=>{},isLoading:u},b)=>{var w,x;return r.jsxs(G,{ref:b,limitTags:d,limitTagsForMobile:m,limitCards:h,limitCardsForMobile:f,children:[r.jsxs("div",{className:"wrapper__heading",children:[a&&r.jsx("div",{className:"wrapper__title",children:a}),i&&r.jsx("div",{className:"wrapper__subtitle",children:i})]}),r.jsx("div",{className:"wrapper__cards",children:n&&(n==null?void 0:n.length)>0?n==null?void 0:n.map((e,s)=>r.jsx(E,{imageUrl:e==null?void 0:e.imageUrl,imageComponent:e==null?void 0:e.imageComponent,title:e==null?void 0:e.title,onSelectCard:()=>{_==null||_(e)}},`general-with-tags-card__${s+1}`)):(w=Array.from("123"))==null?void 0:w.map((e,s)=>r.jsx(W,{},`general-with-tags-card-skeleton__${s+1}`))}),(t==null?void 0:t.length)>0&&r.jsx("div",{className:"wrapper__tags",children:t==null?void 0:t.map((e,s)=>r.jsx(N,{icon:e==null?void 0:e.icon,title:e==null?void 0:e.title,onSelectCard:()=>g==null?void 0:g(e)},`general-with-tags-card-tag__${s+1}`))}),u===!0&&!((t==null?void 0:t.length)>0)&&r.jsx("div",{className:"wrapper__tags",children:(x=Array.from("123"))==null?void 0:x.map((e,s)=>r.jsx(I,{},`general-with-tags-card-tag-skeleton__${s+1}`))})]})});module.exports=R;
|
|
@@ -2,10 +2,10 @@ import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as o } from "react";
|
|
3
3
|
import { s } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as d } from "./consts-C1uHV4xc.js";
|
|
5
|
-
import { t as
|
|
6
|
-
import
|
|
7
|
-
import { u as
|
|
8
|
-
const
|
|
5
|
+
import { t as y, m as x, l as k } from "./utils-DCs-SbIv.js";
|
|
6
|
+
import $ from "./Icon.js";
|
|
7
|
+
import { u as C } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
8
|
+
const N = s.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: flex-start;
|
|
@@ -44,7 +44,7 @@ const j = s.div`
|
|
|
44
44
|
font-style: normal;
|
|
45
45
|
font-weight: 500;
|
|
46
46
|
line-height: 1.5rem;
|
|
47
|
-
${
|
|
47
|
+
${y(2)}
|
|
48
48
|
transition: var(--transition, all 0.2s ease);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -81,18 +81,18 @@ const j = s.div`
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
`,
|
|
84
|
+
`, W = s.div`
|
|
85
85
|
width: 100%;
|
|
86
86
|
height: 11.625rem;
|
|
87
87
|
border-radius: 0.75rem;
|
|
88
|
-
background: ${
|
|
88
|
+
background: ${x("-90deg")};
|
|
89
89
|
|
|
90
90
|
@media (max-width: ${d + "px"}) {
|
|
91
91
|
width: 5rem;
|
|
92
92
|
height: 5rem;
|
|
93
93
|
border-radius: 999px;
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`, j = s.div`
|
|
96
96
|
display: flex;
|
|
97
97
|
padding: 0 0.5rem 0 0;
|
|
98
98
|
align-items: center;
|
|
@@ -132,28 +132,28 @@ const j = s.div`
|
|
|
132
132
|
white-space: nowrap;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
`,
|
|
135
|
+
`, G = s.div`
|
|
136
136
|
width: 7rem;
|
|
137
137
|
height: 3rem;
|
|
138
138
|
border-radius: 999px;
|
|
139
|
-
background: ${
|
|
140
|
-
`,
|
|
139
|
+
background: ${x("-90deg")};
|
|
140
|
+
`, T = o(({}, r) => /* @__PURE__ */ a(G, {})), z = o(
|
|
141
141
|
({ title: r, icon: i, onSelectCard: t = () => {
|
|
142
|
-
} }, p) => /* @__PURE__ */ m(
|
|
143
|
-
/* @__PURE__ */ a(
|
|
142
|
+
} }, p) => /* @__PURE__ */ m(j, { onClick: t, children: [
|
|
143
|
+
/* @__PURE__ */ a($, { icon: ` ${i}`, className: "wrapper__icon" }),
|
|
144
144
|
/* @__PURE__ */ a("div", { className: "wrapper__text", children: r })
|
|
145
145
|
] })
|
|
146
|
-
),
|
|
146
|
+
), I = o(
|
|
147
147
|
// eslint-disable-next-line react/prop-types
|
|
148
148
|
({ imageUrl: r, imageComponent: i, title: t, onSelectCard: p = () => {
|
|
149
149
|
} }, c) => {
|
|
150
|
-
const { theme: h } =
|
|
151
|
-
return /* @__PURE__ */ m(
|
|
152
|
-
|
|
150
|
+
const { theme: h } = C();
|
|
151
|
+
return /* @__PURE__ */ m(N, { ref: c, theme: h, onClick: p, children: [
|
|
152
|
+
k(i) ? i : /* @__PURE__ */ a("img", { src: r, className: "wrapper__image" }),
|
|
153
153
|
/* @__PURE__ */ a("div", { className: "wrapper__content", children: /* @__PURE__ */ a("div", { className: "wrapper__title", children: t }) })
|
|
154
154
|
] });
|
|
155
155
|
}
|
|
156
|
-
),
|
|
156
|
+
), M = o(({}, r) => /* @__PURE__ */ a(W, {})), A = s.div`
|
|
157
157
|
display: flex;
|
|
158
158
|
flex-direction: column;
|
|
159
159
|
align-items: center;
|
|
@@ -230,7 +230,7 @@ const j = s.div`
|
|
|
230
230
|
gap: 1rem;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
`,
|
|
233
|
+
`, O = o(
|
|
234
234
|
({
|
|
235
235
|
title: r,
|
|
236
236
|
subtitle: i,
|
|
@@ -238,58 +238,55 @@ const j = s.div`
|
|
|
238
238
|
limitTags: p = 7,
|
|
239
239
|
limitTagsForMobile: c = 2,
|
|
240
240
|
limit: h = 3,
|
|
241
|
-
limitForMobile:
|
|
241
|
+
limitForMobile: u = 3,
|
|
242
242
|
items: n = [],
|
|
243
243
|
onSelectTag: g = () => {
|
|
244
244
|
},
|
|
245
245
|
onSelectCard: w = () => {
|
|
246
246
|
},
|
|
247
|
-
isLoading:
|
|
248
|
-
},
|
|
249
|
-
var
|
|
250
|
-
const _ = (e) => {
|
|
251
|
-
g == null || g(e == null ? void 0 : e.uuid);
|
|
252
|
-
}, f = (e) => {
|
|
253
|
-
w == null || w(e == null ? void 0 : e.uuid);
|
|
254
|
-
};
|
|
247
|
+
isLoading: b
|
|
248
|
+
}, v) => {
|
|
249
|
+
var _, f;
|
|
255
250
|
return /* @__PURE__ */ m(
|
|
256
|
-
|
|
251
|
+
A,
|
|
257
252
|
{
|
|
258
|
-
ref:
|
|
253
|
+
ref: v,
|
|
259
254
|
limitTags: p,
|
|
260
255
|
limitTagsForMobile: c,
|
|
261
256
|
limitCards: h,
|
|
262
|
-
limitCardsForMobile:
|
|
257
|
+
limitCardsForMobile: u,
|
|
263
258
|
children: [
|
|
264
259
|
/* @__PURE__ */ m("div", { className: "wrapper__heading", children: [
|
|
265
260
|
r && /* @__PURE__ */ a("div", { className: "wrapper__title", children: r }),
|
|
266
261
|
i && /* @__PURE__ */ a("div", { className: "wrapper__subtitle", children: i })
|
|
267
262
|
] }),
|
|
268
263
|
/* @__PURE__ */ a("div", { className: "wrapper__cards", children: n && (n == null ? void 0 : n.length) > 0 ? n == null ? void 0 : n.map((e, l) => /* @__PURE__ */ a(
|
|
269
|
-
|
|
264
|
+
I,
|
|
270
265
|
{
|
|
271
266
|
imageUrl: e == null ? void 0 : e.imageUrl,
|
|
272
267
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
273
268
|
title: e == null ? void 0 : e.title,
|
|
274
|
-
onSelectCard: () =>
|
|
269
|
+
onSelectCard: () => {
|
|
270
|
+
w == null || w(e);
|
|
271
|
+
}
|
|
275
272
|
},
|
|
276
273
|
`general-with-tags-card__${l + 1}`
|
|
277
|
-
)) : (
|
|
278
|
-
|
|
274
|
+
)) : (_ = Array.from("123")) == null ? void 0 : _.map((e, l) => /* @__PURE__ */ a(
|
|
275
|
+
M,
|
|
279
276
|
{},
|
|
280
277
|
`general-with-tags-card-skeleton__${l + 1}`
|
|
281
278
|
)) }),
|
|
282
279
|
(t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ a("div", { className: "wrapper__tags", children: t == null ? void 0 : t.map((e, l) => /* @__PURE__ */ a(
|
|
283
|
-
|
|
280
|
+
z,
|
|
284
281
|
{
|
|
285
282
|
icon: e == null ? void 0 : e.icon,
|
|
286
283
|
title: e == null ? void 0 : e.title,
|
|
287
|
-
onSelectCard: () =>
|
|
284
|
+
onSelectCard: () => g == null ? void 0 : g(e)
|
|
288
285
|
},
|
|
289
286
|
`general-with-tags-card-tag__${l + 1}`
|
|
290
287
|
)) }),
|
|
291
|
-
|
|
292
|
-
|
|
288
|
+
b === !0 && !((t == null ? void 0 : t.length) > 0) && /* @__PURE__ */ a("div", { className: "wrapper__tags", children: (f = Array.from("123")) == null ? void 0 : f.map((e, l) => /* @__PURE__ */ a(
|
|
289
|
+
T,
|
|
293
290
|
{},
|
|
294
291
|
`general-with-tags-card-tag-skeleton__${l + 1}`
|
|
295
292
|
)) })
|
|
@@ -299,5 +296,5 @@ const j = s.div`
|
|
|
299
296
|
}
|
|
300
297
|
);
|
|
301
298
|
export {
|
|
302
|
-
|
|
299
|
+
O as default
|
|
303
300
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),n=require("react"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./utils-BXPz9bck.cjs"),I=require("./consts-CtNoHdBj.cjs"),K=require("./motion-B_VPZaJq.cjs"),i=require("./index-BPVoEhTF.cjs"),Q=require("./Icon.cjs"),ee=require("./Badge.cjs"),M=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),G=require("./useDetectMobile-D6d5LpdL.cjs"),re=require("./FlexBox.cjs"),q=require("./index-CHDRU86t.cjs"),z=require("./IconButton.cjs"),te=u.styled.div`
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 1rem;
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
& i {
|
|
208
208
|
font-size: 0.813rem;
|
|
209
209
|
}
|
|
210
|
-
`,X=e=>{const{uuid:o,hasPermission:c=!0,isUser:s,image:
|
|
210
|
+
`,X=e=>{const{uuid:o,hasPermission:c=!0,isUser:s,image:x,name:a,notifications:g=0,color:f="primary",size:w="large",style:$,disabled:l,onSelect:d=()=>{},isActive:y,className:b,themeData:m}=e,P={theme:M.useTheme(),color:f,size:w,style:$,disabled:l};return n.createElement(ne,{onClick:S=>{S.stopPropagation(),c===!0&&(d==null||d())},...P,key:a,animate:{y:0,opacity:1},className:`profile-item ${b}`,exit:{opacity:0},hasPermission:c,initial:{y:-10,opacity:0},isActive:y,themeColor:(m==null?void 0:m.code)||"transparent"},t.jsx("div",{className:"logo-wrapper",children:x}),t.jsx("div",{className:"name",children:a}),g>0&&t.jsx("div",{className:"notifications-number",children:t.jsx(ee,{className:"badge",color:"danger",size:"small",children:g>99?"99+":g})}))};X.propTypes={id:i.PropTypes.any,isUserProfile:i.PropTypes.bool,themeColor:i.PropTypes.string,image:i.PropTypes.any,name:i.PropTypes.string,notifications:i.PropTypes.number,style:i.PropTypes.object,className:i.PropTypes.string,color:i.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:i.PropTypes.oneOf(["large"]),onSelect:i.PropTypes.func,hasPermission:i.PropTypes.bool};const H=(e,o)=>{if(!e||!o)return null;let c=Math.floor((e==null?void 0:e.getTime())-(o==null?void 0:o.getTime())),s=1e3*60*60*24;return Math.ceil(c/s)},Y=e=>{const o=M.useTheme(),{uuid:c,shopUuid:s,title:x="",description:a,badges:g,coverPhoto:f,onSelect:w,status:$,startDate:l,endDate:d,salesPackages:y,shopName:b,shopImage:m,onSelectCard:h=()=>{},onSelectShop:P=()=>{},campaignSingleText:S,salesCampaignTypes:r=[],startsInPrefixTextPlural:j,startsinSuffixTextPlural:F,startsInPrefixTextSingular:k,startsinSuffixTextSingular:A,themeData:O,...R}=e,p=l?new Date(l)<=new Date:!1;H(d?new Date(d):null,l?new Date(l):null);const v=H(l?new Date(l):null,new Date);return t.jsxs(te,{theme:o,onClick:h,...R,children:[t.jsxs(oe,{theme:o,onClick:()=>w==null?void 0:w(),children:[t.jsx("img",{src:f}),t.jsx(ae,{children:y==null?void 0:y.map((C,E)=>{var N,W;return t.jsx(ce,{color:(N=r==null?void 0:r.find(B=>B.value===C))==null?void 0:N.color,theme:o,children:t.jsx(Q,{icon:(W=r==null?void 0:r.find(B=>B.value===C))==null?void 0:W.icon})},`package__${E}`)})})]}),t.jsxs(ie,{theme:o,children:[t.jsxs("div",{className:"text-block-wrapper",children:[t.jsxs("div",{className:"title-block-wrapper",children:[t.jsx("div",{className:"campaign-title",children:S}),t.jsx("div",{className:"campaign-title-text",children:x}),t.jsx("div",{className:"timestamp-text",children:p?"":v===1?`${k} ${v} ${A}`:`${j} ${v} ${F}`})]}),t.jsx("div",{children:a})]}),t.jsx(X,{hasPermission:!0,image:t.jsx("img",{src:m,className:`${m?"":"no-image"}`}),themeData:O,isActive:!0,isUser:!1,name:b,onClick:()=>P(s)})]})]})};Y.propTypes={title:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.element]),numberOfListings:i.PropTypes.number,dropdown:i.PropTypes.any,color:i.PropTypes.string};const de=u.styled.div`
|
|
211
211
|
display: flex;
|
|
212
212
|
flex-direction: column;
|
|
213
213
|
gap: 1.5rem;
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
right: 0;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
`,pe=(e,o)=>{const[c,s]=n.useState({trigger:null,direction:null}),
|
|
343
|
+
`,pe=(e,o)=>{const[c,s]=n.useState({trigger:null,direction:null}),x=a=>a.touches||a.originalEvent.touches;return n.useEffect(()=>{const a=typeof e=="string"||e instanceof String?document.getElementById(e):e.current;let g=null,f=null;if(a){const w=l=>{const d=x(l)[0];g=d.clientX,f=d.clientY},$=l=>{if(!g||!f)return;const d=l.touches[0].clientX,y=l.touches[0].clientY,b=g-d,m=f-y;Math.abs(b)>Math.abs(m)?b>0?s(h=>({trigger:!h.trigger,direction:_.LEFT})):s(h=>({trigger:!h.trigger,direction:_.RIGHT})):m>0?s(h=>({trigger:!h.trigger,direction:_.UP})):s(h=>({trigger:!h.trigger,direction:_.DOWN})),g=null,f=null};return a.addEventListener("touchstart",w),a.addEventListener("touchmove",$),()=>{a.removeEventListener("touchstart",w),a.addEventListener("touchmove",$)}}},[]),c},_={UP:"up",DOWN:"down",RIGHT:"right",LEFT:"left"},J=n.forwardRef(({title:e,columnGap:o="2rem",rowGap:c="1.25rem",scrollBySize:s=300,wrapForMobile:x=!1,wrap:a=!1,children:g,methodsRef:f,arrowsVisibleOnHover:w=!0,rightAlignArrows:$=!1,padding:l="0",showTimesBtn:d,noArrows:y,onShowEnd:b,arrowsZIndex:m,...h},P)=>{const S=G.useDetectMobile(),r=M.useTheme(),[j,F]=n.useState(!1),[k,A]=n.useState(!1),[O,R]=n.useState(!0),p=n.useRef(),v=pe(p);n.useEffect(()=>{(v==null?void 0:v.direction)===_.RIGHT&&k!==!0?E():(v==null?void 0:v.direction)===_.LEFT&&j!==!0&&C()},[v]);const C=()=>{var T;(T=p.current)==null||T.scrollBy(s,0)},E=()=>{var T;(T=p.current)==null||T.scrollBy(-s,0)},[N,W]=n.useState(!1);n.useEffect(()=>{var T,U;W(((T=p==null?void 0:p.current)==null?void 0:T.scrollWidth)>((U=p==null?void 0:p.current)==null?void 0:U.clientWidth))},[g]),n.useImperativeHandle(f,()=>({scrollToEnd(){B()},scrollLeft(){E()},scrollRight(){C()}}));const B=()=>{p.current.scrollLeft=p.current.scrollWidth};return t.jsxs(de,{arrowsZIndex:m,children:[t.jsxs(ge,{children:[t.jsx("div",{children:e}),t.jsxs("div",{className:"btns-group",children:[t.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-left",color:"neutral",disabled:k,icon:"angle-left",onClick:E}),t.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-right",color:"neutral",disabled:j,icon:"angle-right",onClick:C})]})]}),t.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"hover-left-arrow scroll-arrow-left",color:"neutral",disabled:k,icon:"angle-left",onClick:E}),t.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"hover-right-arrow scroll-arrow-right",color:"neutral",disabled:j,icon:"angle-right",onClick:C}),t.jsx(he,{ref:P,arrowsVisibleOnHover:w,hasOverflow:N,noArrows:y,padding:l,rightAlignArrows:$,showTimesBtn:d,theme:r,...h,children:t.jsxs(re,{ref:p,className:"scrollable-container",columnGap:o,rowGap:c,wrap:a||x&&S?"Wrap":"NoWrap",children:[t.jsx(q.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{k===!0&&A(!1)},onIsVisible:()=>{k===!1&&A(!0)}}),g,t.jsx(q.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{j===!0&&F(!1),R(!0)},onIsVisible:()=>{j===!1&&F(!0),R(!1),b==null||b()}}),O&&N&&t.jsx("div",{className:"gradient"})]})})]})});J.propTypes={title:i.PropTypes.string,rowGap:i.PropTypes.string,columnGap:i.PropTypes.string,scrollBySize:i.PropTypes.number,wrapForMobile:i.PropTypes.bool,wrap:i.PropTypes.bool,methodsRef:i.PropTypes.any,arrowsVisibleOnHover:i.PropTypes.bool,rightAlignArrows:i.PropTypes.bool,padding:i.PropTypes.string};const ue=u.styled.div`
|
|
344
344
|
display: flex;
|
|
345
345
|
flex-direction: column;
|
|
346
346
|
gap: 1.5rem;
|
|
@@ -420,4 +420,4 @@
|
|
|
420
420
|
align-items: center;
|
|
421
421
|
gap: 0.5rem;
|
|
422
422
|
}
|
|
423
|
-
`,xe=n.forwardRef(({},e)=>{const o=M.useTheme();return
|
|
423
|
+
`,xe=n.forwardRef(({},e)=>{const o=M.useTheme();return t.jsxs(me,{ref:e,theme:o,children:[t.jsx("div",{className:"campaign__left-section",children:t.jsx(Z,{theme:o,width:"15rem",height:"15rem",borderRadius:"edged"})}),t.jsxs("div",{className:"campaign__right-section",children:[t.jsxs(fe,{theme:o,children:[t.jsx(L,{heightCoeff:.75,theme:o,width:"35%"}),t.jsx(L,{heightCoeff:1.25,theme:o}),t.jsx(L,{heightCoeff:3,theme:o})]}),t.jsxs("div",{className:"campaign__user",children:[t.jsx(Z,{theme:o,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),t.jsx(L,{theme:o,width:"75%"})]})]})]})}),we=({itemsCount:e=5,keyPrefix:o})=>t.jsx(t.Fragment,{children:Array.from({length:e},(c,s)=>t.jsx(xe,{},`${o}-skeleton-campaign-card-${s}`))}),be=({children:e,fallbackComponent:o=t.jsx(t.Fragment,{}),isLoading:c=!1,itemsCount:s=5,keyPrefix:x})=>t.jsx(n.Suspense,{fallback:o,children:c===!0?t.jsx(we,{itemsCount:s,keyPrefix:x}):e}),ye=n.memo(Y),ve=n.forwardRef(({sellerType:e="Shop",items:o=[],title:c,isLoading:s,onSelectCard:x=()=>{},onSelectShop:a=()=>{},getImage:g=()=>{},customScrollSize:f,campaignSingleText:w,salesCampaignTypes:$=[],startsInPrefixTextPlural:l,startsinSuffixTextPlural:d,startsInPrefixTextSingular:y,startsinSuffixTextSingular:b},m)=>{const h=n.useRef(),P=G.useDetectMobile(),S=n.useMemo(()=>o==null?void 0:o.map((r,j)=>t.jsx(ye,{className:"campaign-item",coverPhoto:()=>g(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:()=>x(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid),onSelectShop:()=>a(r==null?void 0:r.shopUuid),campaignSingleText:w,salesCampaignTypes:$,startsInPrefixTextPlural:l,startsinSuffixTextPlural:d,startsInPrefixTextSingular:y,startsinSuffixTextSingular:b,themeData:r==null?void 0:r.themeData},`campaign__item__${j}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`)),[o]);return t.jsx(t.Fragment,{children:(o==null?void 0:o.length)>0&&t.jsx(ue,{ref:m,className:"row-section-scroll",children:t.jsx(J,{arrowsVisibleOnHover:!1,columnGap:"0",methodsRef:h,mobileHoverScrollButtons:!0,noArrows:!0,padding:"0.25rem 0",rightAlignArrows:!0,scrollBySize:P?window.innerWidth:f>0?f:window.innerWidth,showTimesBtn:!1,title:c,onShowEnd:()=>{},arrowsZIndex:11,children:t.jsx(be,{isLoading:s,itemsCount:2,keyPrefix:"sales-camp",children:S})})})})});module.exports=ve;
|