@lanaco/lnc-react-ui 4.0.70 → 4.0.71

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,13 +1,13 @@
1
- "use strict";const t=require("react/jsx-runtime"),s=require("react"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),h=require("./consts-CtNoHdBj.cjs"),j=require("./useDetectMobile-D6d5LpdL.cjs"),m=require("./utils-BXPz9bck.cjs"),C=require("./Button.cjs"),k=require("./index-CAqPGuiA.cjs"),S=u.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),p=require("./consts-CtNoHdBj.cjs"),b=require("./useDetectMobile-D6d5LpdL.cjs"),m=require("./utils-BXPz9bck.cjs"),j=require("./Button.cjs"),k=require("./index-CAqPGuiA.cjs"),C=u.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${i=>`repeat(${i.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
5
5
  margin: auto;
6
6
  width: fit-content;
7
- @media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
7
+ @media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
8
8
  grid-template-columns: repeat(1, 1fr);
9
9
  }
10
- `,f=u.styled.div`
10
+ `,h=u.styled.div`
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  width: 100%;
@@ -21,7 +21,6 @@
21
21
  gap: 1.5rem;
22
22
  padding: 2rem 1.25rem;
23
23
  min-height: 22.5rem;
24
- max-height: 22.5rem;
25
24
  align-items: center;
26
25
 
27
26
  & button {
@@ -47,10 +46,10 @@
47
46
  background-color: ${m.linearGradientAnimation("-90deg")};
48
47
  }
49
48
 
50
- @media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
49
+ @media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
51
50
  max-width: unset;
52
51
  }
53
- `,w=u.styled.div`
52
+ `,f=u.styled.div`
54
53
  text-align: center;
55
54
  display: flex;
56
55
  flex-direction: column;
@@ -75,4 +74,4 @@
75
74
  color: var(--gray-700, #4e555f);
76
75
  ${m.truncateTextInRows(3)}
77
76
  }
78
- `,y=s.forwardRef((i,l)=>{const{title:r,imageUrl:n,text:o,buttonText:a,onCardClick:d}=i;return t.jsxs(f,{ref:l,className:"blog-card",onClick:d,children:[t.jsx(k.ProductImageWrapper,{src:n}),t.jsxs(w,{children:[t.jsx("div",{className:"text-wr-title",children:r}),t.jsx("div",{className:"text-wr",children:o})]}),t.jsx(C,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:d,size:"medium",children:a})]})}),v=s.forwardRef((i,l)=>{const{onCardClick:r}=i;return t.jsxs(f,{className:"product-card",onClick:r,children:[t.jsx("div",{className:"skeleton-img"}),t.jsx(w,{children:t.jsx("div",{className:"skeleton-title"})})]})}),$=({limit:i=3,isLoading:l=!1,keyPrefix:r})=>t.jsx(t.Fragment,{children:Array.from({length:i},(n,o)=>t.jsx(v,{isLoading:l},`${r}-skeleton-product-card-${o}`))}),q=({children:i,fallbackComponent:l=t.jsx(t.Fragment,{}),isLoading:r=!1,limit:n,keyPrefix:o})=>t.jsx(s.Suspense,{fallbackComponent:l,children:r===!0?t.jsx($,{isLoading:r,limit:n,keyPrefix:o}):i}),p=s.memo(y),T=s.forwardRef((i,l)=>{const{items:r,limit:n=3,onSelectCard:o=()=>{},isLoading:a=!1,getImage:d=()=>{}}=i,g=j.useDetectMobile(),b=s.useMemo(()=>t.jsx(t.Fragment,{children:g===!0?r==null?void 0:r.map((e,c)=>t.jsx(p,{title:e==null?void 0:e.title,imageUrl:d(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>o(e==null?void 0:e.uuid)},c)):r==null?void 0:r.slice(0,n).map((e,c)=>t.jsx(p,{title:e==null?void 0:e.title,imageUrl:d(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>o(e==null?void 0:e.uuid)},c))}),[r,g,n,o]);return t.jsx(S,{ref:l,limit:n,children:t.jsx(q,{isLoading:a,limit:n,keyPrefix:"explore-landing",children:b})})});module.exports=T;
77
+ `,g=a.forwardRef((i,n)=>{const{title:r,imageUrl:o,text:l,buttonText:d,onCardClick:s}=i;return t.jsxs(h,{ref:n,className:"blog-card",onClick:s,children:[t.jsx(k.ProductImageWrapper,{src:o}),t.jsxs(f,{children:[t.jsx("div",{className:"text-wr-title",children:r}),t.jsx("div",{className:"text-wr",children:l})]}),t.jsx(j,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:s,size:"medium",children:d})]})}),S=a.forwardRef((i,n)=>{const{onCardClick:r}=i;return t.jsxs(h,{className:"product-card",onClick:r,children:[t.jsx("div",{className:"skeleton-img"}),t.jsx(f,{children:t.jsx("div",{className:"skeleton-title"})})]})}),y=({limit:i=3,isLoading:n=!1,keyPrefix:r})=>t.jsx(t.Fragment,{children:Array.from({length:i},(o,l)=>t.jsx(S,{isLoading:n},`${r}-skeleton-product-card-${l}`))}),v=({children:i,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:r=!1,limit:o,keyPrefix:l})=>t.jsx(a.Suspense,{fallbackComponent:n,children:r===!0?t.jsx(y,{isLoading:r,limit:o,keyPrefix:l}):i}),$=a.forwardRef((i,n)=>{const{items:r,limit:o=3,onSelectCard:l=()=>{},isLoading:d=!1,getImage:s=()=>{}}=i,w=b.useDetectMobile();return t.jsx(C,{ref:n,limit:o,children:t.jsx(v,{isLoading:d,limit:o,keyPrefix:"explore-landing",children:t.jsx(t.Fragment,{children:w===!0?r==null?void 0:r.map((e,c)=>t.jsx(g,{title:e==null?void 0:e.title,imageUrl:s(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>l(e==null?void 0:e.uuid)},c)):r==null?void 0:r.slice(0,o).map((e,c)=>t.jsx(g,{title:e==null?void 0:e.title,imageUrl:s(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>l(e==null?void 0:e.uuid)},c))})})})});module.exports=$;
@@ -1,21 +1,21 @@
1
1
  import { jsxs as c, jsx as t, Fragment as s } from "react/jsx-runtime";
2
- import { forwardRef as u, Suspense as S, memo as v, useMemo as y } from "react";
2
+ import { forwardRef as u, Suspense as C } from "react";
3
3
  import { s as p } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as f } from "./consts-C1uHV4xc.js";
5
- import { u as $ } from "./useDetectMobile-BC6EGaBc.js";
6
- import { m as b, t as T } from "./utils-DCs-SbIv.js";
7
- import P from "./Button.js";
8
- import { P as B } from "./index-BLxkXrqU.js";
9
- const M = p.div`
4
+ import { M as h } from "./consts-C1uHV4xc.js";
5
+ import { u as S } from "./useDetectMobile-BC6EGaBc.js";
6
+ import { m as f, t as v } from "./utils-DCs-SbIv.js";
7
+ import y from "./Button.js";
8
+ import { P as $ } from "./index-BLxkXrqU.js";
9
+ const T = p.div`
10
10
  display: grid;
11
11
  grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
12
12
  gap: 1.25rem;
13
13
  margin: auto;
14
14
  width: fit-content;
15
- @media (max-width: ${f + "px"}) {
15
+ @media (max-width: ${h + "px"}) {
16
16
  grid-template-columns: repeat(1, 1fr);
17
17
  }
18
- `, w = p.div`
18
+ `, b = p.div`
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  width: 100%;
@@ -29,7 +29,6 @@ const M = p.div`
29
29
  gap: 1.5rem;
30
30
  padding: 2rem 1.25rem;
31
31
  min-height: 22.5rem;
32
- max-height: 22.5rem;
33
32
  align-items: center;
34
33
 
35
34
  & button {
@@ -52,13 +51,13 @@ const M = p.div`
52
51
  min-height: 6rem;
53
52
  max-height: 6rem;
54
53
  border-radius: 0.75rem;
55
- background-color: ${b("-90deg")};
54
+ background-color: ${f("-90deg")};
56
55
  }
57
56
 
58
- @media (max-width: ${f + "px"}) {
57
+ @media (max-width: ${h + "px"}) {
59
58
  max-width: unset;
60
59
  }
61
- `, C = p.div`
60
+ `, w = p.div`
62
61
  text-align: center;
63
62
  display: flex;
64
63
  flex-direction: column;
@@ -73,7 +72,7 @@ const M = p.div`
73
72
  & .skeleton-title {
74
73
  height: 1.75rem;
75
74
  width: 80%;
76
- background-color: ${b("-90deg")};
75
+ background-color: ${f("-90deg")};
77
76
  }
78
77
 
79
78
  & .text-wr {
@@ -81,18 +80,18 @@ const M = p.div`
81
80
  font-size: 0.875rem;
82
81
  flex: 1;
83
82
  color: var(--gray-700, #4e555f);
84
- ${T(3)}
83
+ ${v(3)}
85
84
  }
86
- `, N = u((i, l) => {
87
- const { title: r, imageUrl: o, text: n, buttonText: d, onCardClick: a } = i;
88
- return /* @__PURE__ */ c(w, { ref: l, className: "blog-card", onClick: a, children: [
89
- /* @__PURE__ */ t(B, { src: o }),
90
- /* @__PURE__ */ c(C, { children: [
85
+ `, g = u((i, o) => {
86
+ const { title: r, imageUrl: l, text: n, buttonText: d, onCardClick: a } = i;
87
+ return /* @__PURE__ */ c(b, { ref: o, className: "blog-card", onClick: a, children: [
88
+ /* @__PURE__ */ t($, { src: l }),
89
+ /* @__PURE__ */ c(w, { children: [
91
90
  /* @__PURE__ */ t("div", { className: "text-wr-title", children: r }),
92
91
  /* @__PURE__ */ t("div", { className: "text-wr", children: n })
93
92
  ] }),
94
93
  /* @__PURE__ */ t(
95
- P,
94
+ y,
96
95
  {
97
96
  borderRadius: "curved",
98
97
  color: "gray",
@@ -104,76 +103,76 @@ const M = p.div`
104
103
  }
105
104
  )
106
105
  ] });
107
- }), z = u((i, l) => {
106
+ }), B = u((i, o) => {
108
107
  const { onCardClick: r } = i;
109
108
  return (
110
109
  // <SimpleBlogCardSkeleton />
111
- /* @__PURE__ */ c(w, { className: "product-card", onClick: r, children: [
110
+ /* @__PURE__ */ c(b, { className: "product-card", onClick: r, children: [
112
111
  /* @__PURE__ */ t("div", { className: "skeleton-img" }),
113
- /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t("div", { className: "skeleton-title" }) })
112
+ /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t("div", { className: "skeleton-title" }) })
114
113
  ] })
115
114
  );
116
- }), I = ({ limit: i = 3, isLoading: l = !1, keyPrefix: r }) => /* @__PURE__ */ t(s, { children: Array.from({ length: i }, (o, n) => /* @__PURE__ */ t(
117
- z,
115
+ }), N = ({ limit: i = 3, isLoading: o = !1, keyPrefix: r }) => /* @__PURE__ */ t(s, { children: Array.from({ length: i }, (l, n) => /* @__PURE__ */ t(
116
+ B,
118
117
  {
119
- isLoading: l
118
+ isLoading: o
120
119
  },
121
120
  `${r}-skeleton-product-card-${n}`
122
- )) }), U = ({
121
+ )) }), I = ({
123
122
  children: i,
124
- fallbackComponent: l = /* @__PURE__ */ t(s, {}),
123
+ fallbackComponent: o = /* @__PURE__ */ t(s, {}),
125
124
  isLoading: r = !1,
126
- limit: o,
125
+ limit: l,
127
126
  keyPrefix: n
128
- }) => /* @__PURE__ */ t(S, { fallbackComponent: l, children: r === !0 ? /* @__PURE__ */ t(
129
- I,
127
+ }) => /* @__PURE__ */ t(C, { fallbackComponent: o, children: r === !0 ? /* @__PURE__ */ t(
128
+ N,
130
129
  {
131
130
  isLoading: r,
132
- limit: o,
131
+ limit: l,
133
132
  keyPrefix: n
134
133
  }
135
- ) : i }), h = v(N), F = u((i, l) => {
134
+ ) : i }), A = u((i, o) => {
136
135
  const {
137
136
  items: r,
138
- limit: o = 3,
137
+ limit: l = 3,
139
138
  onSelectCard: n = () => {
140
139
  },
141
140
  isLoading: d = !1,
142
141
  getImage: a = () => {
143
142
  }
144
- } = i, g = $(), k = y(() => /* @__PURE__ */ t(s, { children: g === !0 ? r == null ? void 0 : r.map((e, m) => /* @__PURE__ */ t(
145
- h,
146
- {
147
- title: e == null ? void 0 : e.title,
148
- imageUrl: a(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
149
- text: e == null ? void 0 : e.description,
150
- titleSlug: e == null ? void 0 : e.titleSlug,
151
- buttonText: e == null ? void 0 : e.buttonText,
152
- onCardClick: () => n(e == null ? void 0 : e.uuid)
153
- },
154
- m
155
- )) : r == null ? void 0 : r.slice(0, o).map((e, m) => /* @__PURE__ */ t(
156
- h,
157
- {
158
- title: e == null ? void 0 : e.title,
159
- imageUrl: a(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
160
- text: e == null ? void 0 : e.description,
161
- titleSlug: e == null ? void 0 : e.titleSlug,
162
- buttonText: e == null ? void 0 : e.buttonText,
163
- onCardClick: () => n(e == null ? void 0 : e.uuid)
164
- },
165
- m
166
- )) }), [r, g, o, n]);
167
- return /* @__PURE__ */ t(M, { ref: l, limit: o, children: /* @__PURE__ */ t(
168
- U,
143
+ } = i, k = S();
144
+ return /* @__PURE__ */ t(T, { ref: o, limit: l, children: /* @__PURE__ */ t(
145
+ I,
169
146
  {
170
147
  isLoading: d,
171
- limit: o,
148
+ limit: l,
172
149
  keyPrefix: "explore-landing",
173
- children: k
150
+ children: /* @__PURE__ */ t(s, { children: k === !0 ? r == null ? void 0 : r.map((e, m) => /* @__PURE__ */ t(
151
+ g,
152
+ {
153
+ title: e == null ? void 0 : e.title,
154
+ imageUrl: a(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
155
+ text: e == null ? void 0 : e.description,
156
+ titleSlug: e == null ? void 0 : e.titleSlug,
157
+ buttonText: e == null ? void 0 : e.buttonText,
158
+ onCardClick: () => n(e == null ? void 0 : e.uuid)
159
+ },
160
+ m
161
+ )) : r == null ? void 0 : r.slice(0, l).map((e, m) => /* @__PURE__ */ t(
162
+ g,
163
+ {
164
+ title: e == null ? void 0 : e.title,
165
+ imageUrl: a(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
166
+ text: e == null ? void 0 : e.description,
167
+ titleSlug: e == null ? void 0 : e.titleSlug,
168
+ buttonText: e == null ? void 0 : e.buttonText,
169
+ onCardClick: () => n(e == null ? void 0 : e.uuid)
170
+ },
171
+ m
172
+ )) })
174
173
  }
175
174
  ) });
176
175
  });
177
176
  export {
178
- F as default
177
+ A as default
179
178
  };
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),g=require("react"),f=require("./Button.cjs"),c=require("./emotion-styled.browser.esm-BtEseadx.cjs"),i=require("./utils-BXPz9bck.cjs"),u=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),p=require("./consts-CtNoHdBj.cjs"),_=c.styled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),g=require("react"),u=require("./Button.cjs"),c=require("./emotion-styled.browser.esm-BtEseadx.cjs"),i=require("./utils-BXPz9bck.cjs"),_=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),p=require("./consts-CtNoHdBj.cjs"),w=c.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: flex-start;
@@ -12,12 +12,12 @@
12
12
  grid-row: ${t=>{var e;return((e=t.position)==null?void 0:e.rowStart)||"1"}} /
13
13
  ${t=>{var e;return((e=t.position)==null?void 0:e.rowEnd)||"1"}};
14
14
 
15
- background: linear-gradient(
15
+ background: ${t=>t.backgroundColor||`linear-gradient(
16
16
  178deg,
17
17
  rgba(0, 0, 0, 0) 1.5%,
18
18
  rgba(0, 0, 0, 0.16) 8.95%,
19
19
  #000 98.39%
20
- );
20
+ )`};
21
21
 
22
22
  & .wrapper__image {
23
23
  height: 100%;
@@ -114,7 +114,7 @@
114
114
  }
115
115
  }
116
116
  }
117
- `,w=g.forwardRef(({title:t,imageUrl:e,description:n,buttonText:a,onSelectCard:l=()=>{},className:o,position:s,selectAction:d,tag:m},x)=>{const h=u.useTheme();return r.jsx(r.Fragment,{children:r.jsxs(_,{ref:x,theme:h,className:o,onClick:l,position:s,children:[r.jsx("img",{src:e,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__text",children:[m&&r.jsx("div",{className:"text__tag",children:m}),r.jsx("div",{className:"text__title",children:t}),i.isDefinedNotEmptyString(n)&&r.jsx("div",{className:"text__description",children:n}),i.isDefinedNotEmptyString(a)&&r.jsx(f,{text:a,onClick:()=>l(d),className:"text__action"})]})]})})}),b=c.styled.div`
117
+ `,b=g.forwardRef(({title:t,imageUrl:e,description:n,buttonText:a,onSelectCard:o=()=>{},className:l,position:s,selectAction:d,tag:m,backgroundColor:x},h)=>{const f=_.useTheme();return r.jsx(r.Fragment,{children:r.jsxs(w,{ref:h,theme:f,className:l,onClick:o,position:s,backgroundColor:x,children:[r.jsx("img",{src:e,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__text",children:[m&&r.jsx("div",{className:"text__tag",children:m}),r.jsx("div",{className:"text__title",children:t}),i.isDefinedNotEmptyString(n)&&r.jsx("div",{className:"text__description",children:n}),i.isDefinedNotEmptyString(a)&&r.jsx(u,{text:a,onClick:()=>o(d),className:"text__action"})]})]})})}),v=c.styled.div`
118
118
  display: flex;
119
119
  flex-direction: column;
120
120
  gap: 1.5rem;
@@ -149,7 +149,7 @@
149
149
  }
150
150
  }
151
151
  }
152
- `,v=c.styled.div`
152
+ `,y=c.styled.div`
153
153
  display: grid;
154
154
  grid-template-columns: ${t=>"repeat(12, minmax(0, 1fr))"};
155
155
 
@@ -168,4 +168,4 @@
168
168
  max-height: 100%;
169
169
  padding: 0 1rem;
170
170
  }
171
- `,y=g.forwardRef(({title:t,items:e,limit:n=3,onSelectCard:a=()=>{}},l)=>r.jsxs(b,{children:[r.jsx("div",{className:"regular-title",children:r.jsx("div",{className:"regular-title-text",children:r.jsx("span",{children:t})})}),r.jsx(v,{limit:n,children:e&&(e==null?void 0:e.map((o,s)=>r.jsx(w,{...o,onSelectCard:d=>a(d,o)},`landing-page-masonry-general-card__${s+1}`)))})]}));module.exports=y;
171
+ `,j=g.forwardRef(({title:t,items:e,limit:n=3,onSelectCard:a=()=>{}},o)=>r.jsxs(v,{ref:o,children:[r.jsx("div",{className:"regular-title",children:r.jsx("div",{className:"regular-title-text",children:r.jsx("span",{children:t})})}),r.jsx(y,{limit:n,children:e&&(e==null?void 0:e.map((l,s)=>r.jsx(b,{...l,onSelectCard:d=>a(d,l)},`landing-page-masonry-general-card__${s+1}`)))})]}));module.exports=j;
@@ -1,11 +1,11 @@
1
- import { jsx as t, Fragment as w, jsxs as s } from "react/jsx-runtime";
1
+ import { jsx as t, Fragment as b, jsxs as s } from "react/jsx-runtime";
2
2
  import { forwardRef as f } from "react";
3
- import b from "./Button.js";
3
+ import v from "./Button.js";
4
4
  import { s as c } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { m as n, t as p, k as h } from "./utils-DCs-SbIv.js";
6
- import { u as v } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
5
+ import { m as l, t as p, k as h } from "./utils-DCs-SbIv.js";
6
+ import { u as y } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
7
7
  import { M as x } from "./consts-C1uHV4xc.js";
8
- const y = c.div`
8
+ const k = c.div`
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  align-items: flex-start;
@@ -31,12 +31,12 @@ const y = c.div`
31
31
  return ((e = r.position) == null ? void 0 : e.rowEnd) || "1";
32
32
  }};
33
33
 
34
- background: linear-gradient(
34
+ background: ${(r) => r.backgroundColor || `linear-gradient(
35
35
  178deg,
36
36
  rgba(0, 0, 0, 0) 1.5%,
37
37
  rgba(0, 0, 0, 0.16) 8.95%,
38
38
  #000 98.39%
39
- );
39
+ )`};
40
40
 
41
41
  & .wrapper__image {
42
42
  height: 100%;
@@ -50,7 +50,7 @@ const y = c.div`
50
50
  width: 24.5rem;
51
51
  height: 30rem;
52
52
  border-radius: 0.75rem;
53
- background-color: ${n("-90deg")};
53
+ background-color: ${l("-90deg")};
54
54
  }
55
55
 
56
56
  & .wrapper__text {
@@ -106,19 +106,19 @@ const y = c.div`
106
106
  }
107
107
 
108
108
  & .text__title--skeleton {
109
- background-color: ${n("-90deg")};
109
+ background-color: ${l("-90deg")};
110
110
  height: 1rem;
111
111
  width: 9rem;
112
112
  }
113
113
 
114
114
  & .text__description--skeleton {
115
- background-color: ${n("-90deg")};
115
+ background-color: ${l("-90deg")};
116
116
  height: 1rem;
117
117
  width: 12rem;
118
118
  }
119
119
 
120
120
  & .text__action--skeleton {
121
- background-color: ${n("-90deg")};
121
+ background-color: ${l("-90deg")};
122
122
  height: 2rem;
123
123
  width: 9rem;
124
124
  }
@@ -133,28 +133,30 @@ const y = c.div`
133
133
  }
134
134
  }
135
135
  }
136
- `, k = f(
136
+ `, $ = f(
137
137
  ({
138
138
  title: r,
139
139
  imageUrl: e,
140
140
  description: i,
141
141
  buttonText: a,
142
- onSelectCard: l = () => {
142
+ onSelectCard: o = () => {
143
143
  },
144
- className: o,
145
- position: m,
146
- selectAction: d,
147
- tag: g
148
- }, u) => {
149
- const _ = v();
150
- return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ s(
151
- y,
144
+ className: n,
145
+ position: d,
146
+ selectAction: m,
147
+ tag: g,
148
+ backgroundColor: u
149
+ }, _) => {
150
+ const w = y();
151
+ return /* @__PURE__ */ t(b, { children: /* @__PURE__ */ s(
152
+ k,
152
153
  {
153
- ref: u,
154
- theme: _,
155
- className: o,
156
- onClick: l,
157
- position: m,
154
+ ref: _,
155
+ theme: w,
156
+ className: n,
157
+ onClick: o,
158
+ position: d,
159
+ backgroundColor: u,
158
160
  children: [
159
161
  /* @__PURE__ */ t("img", { src: e, className: "wrapper__image" }),
160
162
  /* @__PURE__ */ s("div", { className: "wrapper__text", children: [
@@ -162,10 +164,10 @@ const y = c.div`
162
164
  /* @__PURE__ */ t("div", { className: "text__title", children: r }),
163
165
  h(i) && /* @__PURE__ */ t("div", { className: "text__description", children: i }),
164
166
  h(a) && /* @__PURE__ */ t(
165
- b,
167
+ v,
166
168
  {
167
169
  text: a,
168
- onClick: () => l(d),
170
+ onClick: () => o(m),
169
171
  className: "text__action"
170
172
  }
171
173
  )
@@ -174,7 +176,7 @@ const y = c.div`
174
176
  }
175
177
  ) });
176
178
  }
177
- ), $ = c.div`
179
+ ), N = c.div`
178
180
  display: flex;
179
181
  flex-direction: column;
180
182
  gap: 1.5rem;
@@ -209,7 +211,7 @@ const y = c.div`
209
211
  }
210
212
  }
211
213
  }
212
- `, N = c.div`
214
+ `, z = c.div`
213
215
  display: grid;
214
216
  grid-template-columns: ${(r) => "repeat(12, minmax(0, 1fr))"};
215
217
 
@@ -228,20 +230,20 @@ const y = c.div`
228
230
  max-height: 100%;
229
231
  padding: 0 1rem;
230
232
  }
231
- `, I = f(
233
+ `, R = f(
232
234
  ({ title: r, items: e, limit: i = 3, onSelectCard: a = () => {
233
- } }, l) => /* @__PURE__ */ s($, { children: [
235
+ } }, o) => /* @__PURE__ */ s(N, { ref: o, children: [
234
236
  /* @__PURE__ */ t("div", { className: "regular-title", children: /* @__PURE__ */ t("div", { className: "regular-title-text", children: /* @__PURE__ */ t("span", { children: r }) }) }),
235
- /* @__PURE__ */ t(N, { limit: i, children: e && (e == null ? void 0 : e.map((o, m) => /* @__PURE__ */ t(
236
- k,
237
+ /* @__PURE__ */ t(z, { limit: i, children: e && (e == null ? void 0 : e.map((n, d) => /* @__PURE__ */ t(
238
+ $,
237
239
  {
238
- ...o,
239
- onSelectCard: (d) => a(d, o)
240
+ ...n,
241
+ onSelectCard: (m) => a(m, n)
240
242
  },
241
- `landing-page-masonry-general-card__${m + 1}`
243
+ `landing-page-masonry-general-card__${d + 1}`
242
244
  ))) })
243
245
  ] })
244
246
  );
245
247
  export {
246
- I as default
248
+ R as default
247
249
  };
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),l=require("react"),x=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-CtNoHdBj.cjs"),f=require("./style-C571ywKV.cjs"),u=require("./utils-BXPz9bck.cjs"),j=require("./Button.cjs"),v=require("./ThemeProvider.cjs"),y=x.styled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),l=require("react"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-CtNoHdBj.cjs"),p=require("./style-C571ywKV.cjs"),x=require("./utils-BXPz9bck.cjs"),f=require("./Button.cjs"),j=require("./ThemeProvider.cjs"),v=u.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${n=>`repeat(${n.limit}, 1fr)`};
4
4
  gap: 1.25rem;
@@ -9,7 +9,7 @@
9
9
  flex-direction: column;
10
10
  gap: 1rem;
11
11
  }
12
- `,h=x.styled.div`
12
+ `,h=u.styled.div`
13
13
  width: 100%;
14
14
  overflow: hidden;
15
15
  position: relative;
@@ -50,7 +50,7 @@
50
50
 
51
51
  & .content-text-title {
52
52
  font-weight: 600;
53
- ${u.truncateTextInRows(2)}
53
+ ${x.truncateTextInRows(2)}
54
54
  }
55
55
  }
56
56
 
@@ -62,7 +62,7 @@
62
62
  }
63
63
 
64
64
  & .img-skeleton {
65
- background-color: ${u.linearGradientAnimation("-90deg")};
65
+ background-color: ${x.linearGradientAnimation("-90deg")};
66
66
  min-height: 28.75rem;
67
67
  }
68
68
 
@@ -80,4 +80,4 @@
80
80
  max-height: 28.75rem;
81
81
  }
82
82
  }
83
- `,m=l.forwardRef(({},n)=>e.jsx(h,{ref:n,children:e.jsx("div",{className:"img-skeleton"})})),w=({limit:n=2,isLoading:t=!1,keyPrefix:o})=>e.jsx(e.Fragment,{children:Array.from({length:n},(a,s)=>e.jsx(m,{isLoading:t},`${o}-skeleton-product-card-${s}`))}),k=({children:n,fallbackComponent:t=e.jsx(e.Fragment,{}),isLoading:o=!1,limit:a,keyPrefix:s})=>e.jsx(l.Suspense,{fallbackComponent:t,children:o===!0?e.jsx(w,{isLoading:o,limit:a,keyPrefix:s}):n}),b=l.forwardRef(({title:n,image:t,backgroundColor:o,description:a,buttonText:s,handleClick:c=()=>{},onButtonAction:i=()=>{}},d)=>{const{theme:r}=v.useTheme();return e.jsx(e.Fragment,{children:e.jsxs(h,{ref:d,theme:r,overlay:o,onClick:c,children:[e.jsx("img",{src:t}),e.jsxs("div",{className:"content-wrapper",children:[e.jsxs("div",{className:"content-text",children:[e.jsx("div",{children:n}),e.jsx("div",{className:"content-text-title",children:a})]}),u.isDefinedNotEmptyString(s)&&e.jsx(j,{text:s,onClick:i,className:"text__action",size:"medium",color:"gray"})]})]})})}),_=l.memo(b),$=l.forwardRef(({title:n,items:t,limit:o=2,onSelectCard:a=()=>{},isLoading:s=!1,onButtonAction:c=()=>{}},i)=>{const d=l.useMemo(()=>e.jsx(e.Fragment,{children:t&&(t==null?void 0:t.map((r,p)=>e.jsx(_,{title:r==null?void 0:r.title,image:r==null?void 0:r.imageUrl,description:r==null?void 0:r.description,buttonText:r==null?void 0:r.buttonText,backgroundColor:r==null?void 0:r.backgroundColor,handleClick:()=>a(r==null?void 0:r.selectAction,r),onButtonAction:()=>c(r==null?void 0:r.buttonLink,r)},`landing-page-overlay-general-card__${p+1}`)))}),[t,a]);return e.jsxs(f.RegulatTitleSectionWrapper,{ref:i,children:[e.jsx("div",{className:"regular-title center",children:e.jsx("div",{className:"regular-title-text",children:e.jsx("span",{children:n})})}),e.jsx(y,{limit:o,children:e.jsx(k,{isLoading:s,limit:o,keyPrefix:"explore-landing",children:d})})]})});module.exports=$;
83
+ `,y=l.forwardRef(({},n)=>r.jsx(h,{ref:n,children:r.jsx("div",{className:"img-skeleton"})})),w=({limit:n=2,isLoading:t=!1,keyPrefix:o})=>r.jsx(r.Fragment,{children:Array.from({length:n},(s,a)=>r.jsx(y,{isLoading:t},`${o}-skeleton-product-card-${a}`))}),m=({children:n,fallbackComponent:t=r.jsx(r.Fragment,{}),isLoading:o=!1,limit:s,keyPrefix:a})=>r.jsx(l.Suspense,{fallbackComponent:t,children:o===!0?r.jsx(w,{isLoading:o,limit:s,keyPrefix:a}):n}),k=l.forwardRef(({title:n,image:t,backgroundColor:o,description:s,buttonText:a,handleClick:c=()=>{},onButtonAction:i=()=>{}},e)=>{const{theme:d}=j.useTheme();return r.jsx(r.Fragment,{children:r.jsxs(h,{ref:e,theme:d,overlay:o,onClick:c,children:[r.jsx("img",{src:t}),r.jsxs("div",{className:"content-wrapper",children:[r.jsxs("div",{className:"content-text",children:[r.jsx("div",{children:n}),r.jsx("div",{className:"content-text-title",children:s})]}),x.isDefinedNotEmptyString(a)&&r.jsx(f,{text:a,onClick:i,className:"text__action",size:"medium",color:"gray"})]})]})})}),b=l.forwardRef(({title:n,items:t,limit:o=2,onSelectCard:s=()=>{},isLoading:a=!1,onButtonAction:c=()=>{}},i)=>r.jsxs(p.RegulatTitleSectionWrapper,{ref:i,children:[r.jsx("div",{className:"regular-title center",children:r.jsx("div",{className:"regular-title-text",children:r.jsx("span",{children:n})})}),r.jsx(v,{limit:o,children:r.jsx(m,{isLoading:a,limit:o,keyPrefix:"explore-landing",children:t==null?void 0:t.map((e,d)=>r.jsx(k,{title:e==null?void 0:e.title,image:e==null?void 0:e.imageUrl,description:e==null?void 0:e.description,buttonText:e==null?void 0:e.buttonText,backgroundColor:e==null?void 0:e.backgroundColor,handleClick:()=>s(e==null?void 0:e.selectAction,e),onButtonAction:()=>c(e==null?void 0:e.buttonLink,e)},`landing-page-overlay-general-card__${d+1}`))})})]}));module.exports=b;
@@ -1,23 +1,23 @@
1
- import { jsx as r, Fragment as i, jsxs as c } from "react/jsx-runtime";
2
- import { forwardRef as g, Suspense as x, memo as v, useMemo as y } from "react";
1
+ import { jsx as r, Fragment as p, jsxs as i } from "react/jsx-runtime";
2
+ import { forwardRef as g, Suspense as m } from "react";
3
3
  import { s as h } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as u } from "./consts-C1uHV4xc.js";
5
- import { R as k } from "./style-CsMpu4iC.js";
6
- import { t as w, m as b, k as $ } from "./utils-DCs-SbIv.js";
7
- import C from "./Button.js";
8
- import { useTheme as N } from "./ThemeProvider.js";
9
- const P = h.div`
4
+ import { M as f } from "./consts-C1uHV4xc.js";
5
+ import { R as x } from "./style-CsMpu4iC.js";
6
+ import { t as v, m as y, k } from "./utils-DCs-SbIv.js";
7
+ import w from "./Button.js";
8
+ import { useTheme as b } from "./ThemeProvider.js";
9
+ const $ = h.div`
10
10
  display: grid;
11
11
  grid-template-columns: ${(n) => `repeat(${n.limit}, 1fr)`};
12
12
  gap: 1.25rem;
13
13
  justify-items: center;
14
14
 
15
- @media (max-width: ${u + "px"}) {
15
+ @media (max-width: ${f + "px"}) {
16
16
  display: flex;
17
17
  flex-direction: column;
18
18
  gap: 1rem;
19
19
  }
20
- `, f = h.div`
20
+ `, u = h.div`
21
21
  width: 100%;
22
22
  overflow: hidden;
23
23
  position: relative;
@@ -58,7 +58,7 @@ const P = h.div`
58
58
 
59
59
  & .content-text-title {
60
60
  font-weight: 600;
61
- ${w(2)}
61
+ ${v(2)}
62
62
  }
63
63
  }
64
64
 
@@ -70,7 +70,7 @@ const P = h.div`
70
70
  }
71
71
 
72
72
  & .img-skeleton {
73
- background-color: ${b("-90deg")};
73
+ background-color: ${y("-90deg")};
74
74
  min-height: 28.75rem;
75
75
  }
76
76
 
@@ -80,7 +80,7 @@ const P = h.div`
80
80
  }
81
81
  }
82
82
 
83
- @media (max-width: ${u + "px"}) {
83
+ @media (max-width: ${f + "px"}) {
84
84
  & img,
85
85
  .img.skeleton {
86
86
  aspect-ratio: unset;
@@ -88,57 +88,57 @@ const P = h.div`
88
88
  max-height: 28.75rem;
89
89
  }
90
90
  }
91
- `, S = g(({}, n) => /* @__PURE__ */ r(f, { ref: n, children: /* @__PURE__ */ r("div", { className: "img-skeleton" }) })), _ = ({ limit: n = 2, isLoading: o = !1, keyPrefix: t }) => /* @__PURE__ */ r(i, { children: Array.from({ length: n }, (l, a) => /* @__PURE__ */ r(
92
- S,
91
+ `, C = g(({}, n) => /* @__PURE__ */ r(u, { ref: n, children: /* @__PURE__ */ r("div", { className: "img-skeleton" }) })), N = ({ limit: n = 2, isLoading: t = !1, keyPrefix: o }) => /* @__PURE__ */ r(p, { children: Array.from({ length: n }, (l, a) => /* @__PURE__ */ r(
92
+ C,
93
93
  {
94
- isLoading: o
94
+ isLoading: t
95
95
  },
96
- `${t}-skeleton-product-card-${a}`
97
- )) }), j = ({
96
+ `${o}-skeleton-product-card-${a}`
97
+ )) }), S = ({
98
98
  children: n,
99
- fallbackComponent: o = /* @__PURE__ */ r(i, {}),
100
- isLoading: t = !1,
99
+ fallbackComponent: t = /* @__PURE__ */ r(p, {}),
100
+ isLoading: o = !1,
101
101
  limit: l,
102
102
  keyPrefix: a
103
- }) => /* @__PURE__ */ r(x, { fallbackComponent: o, children: t === !0 ? /* @__PURE__ */ r(
104
- _,
103
+ }) => /* @__PURE__ */ r(m, { fallbackComponent: t, children: o === !0 ? /* @__PURE__ */ r(
104
+ N,
105
105
  {
106
- isLoading: t,
106
+ isLoading: o,
107
107
  limit: l,
108
108
  keyPrefix: a
109
109
  }
110
- ) : n }), G = g(
110
+ ) : n }), _ = g(
111
111
  ({
112
112
  title: n,
113
- image: o,
114
- backgroundColor: t,
113
+ image: t,
114
+ backgroundColor: o,
115
115
  description: l,
116
116
  buttonText: a,
117
- handleClick: d = () => {
117
+ handleClick: c = () => {
118
118
  },
119
- onButtonAction: s = () => {
119
+ onButtonAction: d = () => {
120
120
  }
121
- }, p) => {
122
- const { theme: e } = N();
123
- return /* @__PURE__ */ r(i, { children: /* @__PURE__ */ c(
124
- f,
121
+ }, e) => {
122
+ const { theme: s } = b();
123
+ return /* @__PURE__ */ r(p, { children: /* @__PURE__ */ i(
124
+ u,
125
125
  {
126
- ref: p,
127
- theme: e,
128
- overlay: t,
129
- onClick: d,
126
+ ref: e,
127
+ theme: s,
128
+ overlay: o,
129
+ onClick: c,
130
130
  children: [
131
- /* @__PURE__ */ r("img", { src: o }),
132
- /* @__PURE__ */ c("div", { className: "content-wrapper", children: [
133
- /* @__PURE__ */ c("div", { className: "content-text", children: [
131
+ /* @__PURE__ */ r("img", { src: t }),
132
+ /* @__PURE__ */ i("div", { className: "content-wrapper", children: [
133
+ /* @__PURE__ */ i("div", { className: "content-text", children: [
134
134
  /* @__PURE__ */ r("div", { children: n }),
135
135
  /* @__PURE__ */ r("div", { className: "content-text-title", children: l })
136
136
  ] }),
137
- $(a) && /* @__PURE__ */ r(
138
- C,
137
+ k(a) && /* @__PURE__ */ r(
138
+ w,
139
139
  {
140
140
  text: a,
141
- onClick: s,
141
+ onClick: d,
142
142
  className: "text__action",
143
143
  size: "medium",
144
144
  color: "gray"
@@ -149,37 +149,41 @@ const P = h.div`
149
149
  }
150
150
  ) });
151
151
  }
152
- ), O = v(G), L = g(
153
- ({ title: n, items: o, limit: t = 2, onSelectCard: l = () => {
154
- }, isLoading: a = !1, onButtonAction: d = () => {
155
- } }, s) => {
156
- const p = y(() => /* @__PURE__ */ r(i, { children: o && (o == null ? void 0 : o.map((e, m) => /* @__PURE__ */ r(
157
- O,
152
+ ), E = g(
153
+ ({
154
+ title: n,
155
+ items: t,
156
+ limit: o = 2,
157
+ onSelectCard: l = () => {
158
+ },
159
+ isLoading: a = !1,
160
+ onButtonAction: c = () => {
161
+ }
162
+ }, d) => /* @__PURE__ */ i(x, { ref: d, children: [
163
+ /* @__PURE__ */ r("div", { className: "regular-title center", children: /* @__PURE__ */ r("div", { className: "regular-title-text", children: /* @__PURE__ */ r("span", { children: n }) }) }),
164
+ /* @__PURE__ */ r($, { limit: o, children: /* @__PURE__ */ r(
165
+ S,
158
166
  {
159
- title: e == null ? void 0 : e.title,
160
- image: e == null ? void 0 : e.imageUrl,
161
- description: e == null ? void 0 : e.description,
162
- buttonText: e == null ? void 0 : e.buttonText,
163
- backgroundColor: e == null ? void 0 : e.backgroundColor,
164
- handleClick: () => l(e == null ? void 0 : e.selectAction, e),
165
- onButtonAction: () => d(e == null ? void 0 : e.buttonLink, e)
166
- },
167
- `landing-page-overlay-general-card__${m + 1}`
168
- ))) }), [o, l]);
169
- return /* @__PURE__ */ c(k, { ref: s, children: [
170
- /* @__PURE__ */ r("div", { className: "regular-title center", children: /* @__PURE__ */ r("div", { className: "regular-title-text", children: /* @__PURE__ */ r("span", { children: n }) }) }),
171
- /* @__PURE__ */ r(P, { limit: t, children: /* @__PURE__ */ r(
172
- j,
173
- {
174
- isLoading: a,
175
- limit: t,
176
- keyPrefix: "explore-landing",
177
- children: p
178
- }
179
- ) })
180
- ] });
181
- }
167
+ isLoading: a,
168
+ limit: o,
169
+ keyPrefix: "explore-landing",
170
+ children: t == null ? void 0 : t.map((e, s) => /* @__PURE__ */ r(
171
+ _,
172
+ {
173
+ title: e == null ? void 0 : e.title,
174
+ image: e == null ? void 0 : e.imageUrl,
175
+ description: e == null ? void 0 : e.description,
176
+ buttonText: e == null ? void 0 : e.buttonText,
177
+ backgroundColor: e == null ? void 0 : e.backgroundColor,
178
+ handleClick: () => l(e == null ? void 0 : e.selectAction, e),
179
+ onButtonAction: () => c(e == null ? void 0 : e.buttonLink, e)
180
+ },
181
+ `landing-page-overlay-general-card__${s + 1}`
182
+ ))
183
+ }
184
+ ) })
185
+ ] })
182
186
  );
183
187
  export {
184
- L as default
188
+ E as default
185
189
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.70",
3
+ "version": "4.0.71",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [