@lanaco/lnc-react-ui 4.0.79 → 4.0.80

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,12 +1,12 @@
1
- "use strict";const t=require("react/jsx-runtime"),d=require("react"),h=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-CtNoHdBj.cjs"),N=require("./useDetectMobile-D6d5LpdL.cjs"),a=require("./utils-BXPz9bck.cjs"),q=require("./style-C571ywKV.cjs"),$=require("./Button.cjs"),T=require("./Link.cjs"),B=require("./index-CAqPGuiA.cjs"),M=require("./index-ryadTWiS.cjs"),R=h.styled.div`
1
+ "use strict";const e=require("react/jsx-runtime"),c=require("react"),h=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-CtNoHdBj.cjs"),C=require("./useDetectMobile-D6d5LpdL.cjs"),a=require("./utils-BXPz9bck.cjs"),N=require("./style-C571ywKV.cjs"),q=require("./Button.cjs"),$=require("./Link.cjs"),T=require("./index-CAqPGuiA.cjs"),B=require("./index-ryadTWiS.cjs"),M=h.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
 
6
- @media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
6
+ @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
7
7
  grid-template-columns: repeat(1, 1fr);
8
8
  }
9
- `,y=h.styled.div`
9
+ `,w=h.styled.div`
10
10
  display: flex;
11
11
  width: 100%;
12
12
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
@@ -42,9 +42,9 @@
42
42
  margin-top: auto;
43
43
  }
44
44
 
45
- @media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
45
+ @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
46
46
  }
47
- `,S=h.styled.div`
47
+ `,k=h.styled.div`
48
48
  display: flex;
49
49
  flex-direction: column;
50
50
  gap: 0.5rem;
@@ -73,4 +73,4 @@
73
73
  color: var(--gray-700, #4e555f);
74
74
  ${a.truncateTextInRows(3)}
75
75
  }
76
- `,W=d.forwardRef((i,o)=>{const{title:n,imageUrl:s,text:r,buttonText:m,onCardClick:l}=i;return t.jsxs(y,{ref:o,className:"blog-card",onClick:l,children:[t.jsxs(S,{children:[t.jsx("div",{className:"text-wr-title",children:n}),t.jsx("div",{className:"text-wr",children:r}),t.jsx(T,{color:"gray",onClick:l,children:m})]}),t.jsx(B.ProductImageWrapper,{src:s})]})}),I=d.forwardRef(({},i)=>t.jsxs(y,{className:"blog-card",children:[t.jsxs(S,{children:[t.jsx("div",{className:"skeleton-title"}),t.jsx("div",{className:"text-wr"}),t.jsx("div",{className:"skeleton-action"})]}),t.jsx("div",{className:"skeleton-img"})]})),P=({limit:i=3,isLoading:o=!1,keyPrefix:n})=>t.jsx(t.Fragment,{children:Array.from({length:i},(s,r)=>t.jsx(I,{isLoading:o},`${n}-skeleton-product-card-${r}`))}),_=({children:i,fallbackComponent:o=t.jsx(t.Fragment,{}),isLoading:n=!1,limit:s,keyPrefix:r})=>t.jsx(d.Suspense,{fallbackComponent:o,children:n===!0?t.jsx(P,{isLoading:n,limit:s,keyPrefix:r}):i}),w=d.memo(W),z=d.forwardRef((i,o)=>{const{icon:n,title:s,items:r,buttonText:m,limit:l=3,options:c,onButtonAction:v=()=>{},buttonLink:p,onSelectOption:j=()=>{},isLoading:x=!1,onSelectCard:u=()=>{},getImage:b=()=>{}}=i,f=N.useDetectMobile(),C=d.useMemo(()=>t.jsx(t.Fragment,{children:f===!0?r==null?void 0:r.map((e,g)=>t.jsx(w,{title:e==null?void 0:e.title,imageUrl:b(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:()=>u(e)},g)):r==null?void 0:r.slice(0,l).map((e,g)=>t.jsx(w,{title:e==null?void 0:e.title,imageUrl:b(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:()=>u(e)},g))}),[r,f,l,u]);return t.jsxs(q.TitleWithOptionsSectionWrapper,{ref:o,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[a.isDefinedNotEmptyString(n)&&t.jsx("i",{className:n}),t.jsx("span",{children:s})]}),a.isDefinedNotEmptyString(p)&&t.jsx($,{type:"button",btnType:"tinted",color:"gray",onClick:()=>v(p),borderRadius:"curved",children:m})]}),(c==null?void 0:c.length)>0&&t.jsx(M.SelectBar,{items:c,onRemove:e=>{j(e)},onSelect:e=>{j(e)},labelKey:"name",valueKey:"code",noMargin:!0}),t.jsx(R,{limit:l,children:t.jsx(_,{isLoading:x,limit:l,keyPrefix:"explore-landing",children:C})})]})});module.exports=z;
76
+ `,R=c.forwardRef((i,o)=>{const{title:n,imageUrl:l,text:r,buttonText:m,onCardClick:s}=i;return e.jsxs(w,{ref:o,className:"blog-card",onClick:s,children:[e.jsxs(k,{children:[e.jsx("div",{className:"text-wr-title",children:n}),e.jsx("div",{className:"text-wr",children:r}),e.jsx($,{color:"gray",onClick:s,children:m})]}),e.jsx(T.ProductImageWrapper,{src:l})]})}),W=c.forwardRef(({},i)=>e.jsxs(w,{className:"blog-card",children:[e.jsxs(k,{children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"text-wr"}),e.jsx("div",{className:"skeleton-action"})]}),e.jsx("div",{className:"skeleton-img"})]})),P=({limit:i=3,isLoading:o=!1,keyPrefix:n})=>e.jsx(e.Fragment,{children:Array.from({length:i},(l,r)=>e.jsx(W,{isLoading:o},`${n}-skeleton-product-card-${r}`))}),_=({children:i,fallbackComponent:o=e.jsx(e.Fragment,{}),isLoading:n=!1,limit:l,keyPrefix:r})=>e.jsx(c.Suspense,{fallbackComponent:o,children:n===!0?e.jsx(P,{isLoading:n,limit:l,keyPrefix:r}):i}),b=c.memo(R),z=c.forwardRef((i,o)=>{const{icon:n,title:l,items:r,buttonText:m,limit:s=3,options:d,onButtonAction:y=()=>{},buttonLink:p,onSelectOption:x=()=>{},isLoading:v=!1,onSelectCard:u=()=>{}}=i,j=C.useDetectMobile(),S=c.useMemo(()=>e.jsx(e.Fragment,{children:j===!0?r==null?void 0:r.map((t,g)=>e.jsx(b,{title:t==null?void 0:t.title,imageUrl:(t==null?void 0:t.image)||null,text:t==null?void 0:t.text,buttonText:t==null?void 0:t.buttonText,onCardClick:()=>u(t)},g)):r==null?void 0:r.slice(0,s).map((t,g)=>e.jsx(b,{title:t==null?void 0:t.title,imageUrl:(t==null?void 0:t.image)||null,text:t==null?void 0:t.text,buttonText:t==null?void 0:t.buttonText,onCardClick:()=>u(t)},g))}),[r,j,s,u]);return e.jsxs(N.TitleWithOptionsSectionWrapper,{ref:o,children:[e.jsxs("div",{className:"regular-title",children:[e.jsxs("div",{className:"regular-title-text",children:[a.isDefinedNotEmptyString(n)&&e.jsx("i",{className:n}),e.jsx("span",{children:l})]}),a.isDefinedNotEmptyString(p)&&e.jsx(q,{type:"button",btnType:"tinted",color:"gray",onClick:()=>y(p),borderRadius:"curved",children:m})]}),(d==null?void 0:d.length)>0&&e.jsx(B.SelectBar,{items:d,onRemove:t=>{x(t)},onSelect:t=>{x(t)},labelKey:"name",valueKey:"code",noMargin:!0}),e.jsx(M,{limit:s,children:e.jsx(_,{isLoading:v,limit:s,keyPrefix:"explore-landing",children:S})})]})});module.exports=z;
@@ -1,23 +1,23 @@
1
- import { jsxs as n, jsx as t, Fragment as u } from "react/jsx-runtime";
2
- import { forwardRef as h, Suspense as M, memo as P, useMemo as z } from "react";
1
+ import { jsxs as l, jsx as t, Fragment as h } from "react/jsx-runtime";
2
+ import { forwardRef as u, Suspense as W, memo as x, useMemo as M } from "react";
3
3
  import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as C } from "./consts-C1uHV4xc.js";
5
- import { u as I } from "./useDetectMobile-BC6EGaBc.js";
6
- import { m as p, t as U, k as S } from "./utils-DCs-SbIv.js";
7
- import { T as R } from "./style-CsMpu4iC.js";
8
- import j from "./Button.js";
9
- import A from "./Link.js";
10
- import { P as E } from "./index-BLxkXrqU.js";
11
- import { S as F } from "./index-DXmajb7F.js";
12
- const L = f.div`
4
+ import { M as S } from "./consts-C1uHV4xc.js";
5
+ import { u as P } from "./useDetectMobile-BC6EGaBc.js";
6
+ import { m as g, t as z, k as v } from "./utils-DCs-SbIv.js";
7
+ import { T as I } from "./style-CsMpu4iC.js";
8
+ import R from "./Button.js";
9
+ import j from "./Link.js";
10
+ import { P as A } from "./index-BLxkXrqU.js";
11
+ import { S as E } from "./index-DXmajb7F.js";
12
+ const F = f.div`
13
13
  display: grid;
14
14
  grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
15
15
  gap: 1.25rem;
16
16
 
17
- @media (max-width: ${C + "px"}) {
17
+ @media (max-width: ${S + "px"}) {
18
18
  grid-template-columns: repeat(1, 1fr);
19
19
  }
20
- `, N = f.div`
20
+ `, C = f.div`
21
21
  display: flex;
22
22
  width: 100%;
23
23
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
@@ -46,16 +46,16 @@ const L = f.div`
46
46
  min-height: 3.3125rem;
47
47
  max-height: 3.3125rem;
48
48
  border-radius: 0.75rem;
49
- background-color: ${p("-90deg")};
49
+ background-color: ${g("-90deg")};
50
50
  }
51
51
 
52
52
  & a {
53
53
  margin-top: auto;
54
54
  }
55
55
 
56
- @media (max-width: ${C + "px"}) {
56
+ @media (max-width: ${S + "px"}) {
57
57
  }
58
- `, T = f.div`
58
+ `, N = f.div`
59
59
  display: flex;
60
60
  flex-direction: column;
61
61
  gap: 0.5rem;
@@ -69,118 +69,114 @@ const L = f.div`
69
69
  & .skeleton-title {
70
70
  height: 1.5rem;
71
71
  width: 80%;
72
- background-color: ${p("-90deg")};
72
+ background-color: ${g("-90deg")};
73
73
  }
74
74
 
75
75
  & .skeleton-action {
76
76
  height: 1.25rem;
77
77
  width: 20%;
78
- background-color: ${p("-90deg")};
78
+ background-color: ${g("-90deg")};
79
79
  }
80
80
 
81
81
  & .text-wr {
82
82
  font-weight: 400;
83
83
  font-size: 0.875rem;
84
84
  color: var(--gray-700, #4e555f);
85
- ${U(3)}
85
+ ${z(3)}
86
86
  }
87
- `, O = h((i, l) => {
88
- const { title: o, imageUrl: m, text: r, buttonText: c, onCardClick: a } = i;
89
- return /* @__PURE__ */ n(N, { ref: l, className: "blog-card", onClick: a, children: [
90
- /* @__PURE__ */ n(T, { children: [
87
+ `, L = u((i, a) => {
88
+ const { title: o, imageUrl: m, text: r, buttonText: c, onCardClick: n } = i;
89
+ return /* @__PURE__ */ l(C, { ref: a, className: "blog-card", onClick: n, children: [
90
+ /* @__PURE__ */ l(N, { children: [
91
91
  /* @__PURE__ */ t("div", { className: "text-wr-title", children: o }),
92
92
  /* @__PURE__ */ t("div", { className: "text-wr", children: r }),
93
- /* @__PURE__ */ t(A, { color: "gray", onClick: a, children: c })
93
+ /* @__PURE__ */ t(j, { color: "gray", onClick: n, children: c })
94
94
  ] }),
95
- /* @__PURE__ */ t(E, { src: m })
95
+ /* @__PURE__ */ t(A, { src: m })
96
96
  ] });
97
- }), _ = h(({}, i) => /* @__PURE__ */ n(N, { className: "blog-card", children: [
98
- /* @__PURE__ */ n(T, { children: [
97
+ }), O = u(({}, i) => /* @__PURE__ */ l(C, { className: "blog-card", children: [
98
+ /* @__PURE__ */ l(N, { children: [
99
99
  /* @__PURE__ */ t("div", { className: "skeleton-title" }),
100
100
  /* @__PURE__ */ t("div", { className: "text-wr" }),
101
101
  /* @__PURE__ */ t("div", { className: "skeleton-action" })
102
102
  ] }),
103
103
  /* @__PURE__ */ t("div", { className: "skeleton-img" })
104
- ] })), D = ({ limit: i = 3, isLoading: l = !1, keyPrefix: o }) => /* @__PURE__ */ t(u, { children: Array.from({ length: i }, (m, r) => /* @__PURE__ */ t(
105
- _,
104
+ ] })), U = ({ limit: i = 3, isLoading: a = !1, keyPrefix: o }) => /* @__PURE__ */ t(h, { children: Array.from({ length: i }, (m, r) => /* @__PURE__ */ t(
105
+ O,
106
106
  {
107
- isLoading: l
107
+ isLoading: a
108
108
  },
109
109
  `${o}-skeleton-product-card-${r}`
110
- )) }), G = ({
110
+ )) }), _ = ({
111
111
  children: i,
112
- fallbackComponent: l = /* @__PURE__ */ t(u, {}),
112
+ fallbackComponent: a = /* @__PURE__ */ t(h, {}),
113
113
  isLoading: o = !1,
114
114
  limit: m,
115
115
  keyPrefix: r
116
- }) => /* @__PURE__ */ t(M, { fallbackComponent: l, children: o === !0 ? /* @__PURE__ */ t(
117
- D,
116
+ }) => /* @__PURE__ */ t(W, { fallbackComponent: a, children: o === !0 ? /* @__PURE__ */ t(
117
+ U,
118
118
  {
119
119
  isLoading: o,
120
120
  limit: m,
121
121
  keyPrefix: r
122
122
  }
123
- ) : i }), y = P(O), te = h((i, l) => {
123
+ ) : i }), y = x(L), ee = u((i, a) => {
124
124
  const {
125
125
  icon: o,
126
126
  title: m,
127
127
  items: r,
128
128
  buttonText: c,
129
- limit: a = 3,
129
+ limit: n = 3,
130
130
  options: d,
131
- onButtonAction: $ = () => {
131
+ onButtonAction: T = () => {
132
132
  },
133
133
  buttonLink: b,
134
134
  onSelectOption: k = () => {
135
135
  },
136
- isLoading: B = !1,
136
+ isLoading: $ = !1,
137
137
  onSelectCard: s = () => {
138
- },
139
- getImage: w = () => {
140
138
  }
141
- } = i, v = I(), W = z(() => /* @__PURE__ */ t(u, { children: v === !0 ? r == null ? void 0 : r.map((e, g) => /* @__PURE__ */ t(
139
+ } = i, w = P(), B = M(() => /* @__PURE__ */ t(h, { children: w === !0 ? r == null ? void 0 : r.map((e, p) => /* @__PURE__ */ t(
142
140
  y,
143
141
  {
144
142
  title: e == null ? void 0 : e.title,
145
- imageUrl: w(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
146
- text: e == null ? void 0 : e.description,
147
- titleSlug: e == null ? void 0 : e.titleSlug,
143
+ imageUrl: (e == null ? void 0 : e.image) || null,
144
+ text: e == null ? void 0 : e.text,
148
145
  buttonText: e == null ? void 0 : e.buttonText,
149
146
  onCardClick: () => s(e)
150
147
  },
151
- g
152
- )) : r == null ? void 0 : r.slice(0, a).map((e, g) => /* @__PURE__ */ t(
148
+ p
149
+ )) : r == null ? void 0 : r.slice(0, n).map((e, p) => /* @__PURE__ */ t(
153
150
  y,
154
151
  {
155
152
  title: e == null ? void 0 : e.title,
156
- imageUrl: w(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
157
- text: e == null ? void 0 : e.description,
158
- titleSlug: e == null ? void 0 : e.titleSlug,
153
+ imageUrl: (e == null ? void 0 : e.image) || null,
154
+ text: e == null ? void 0 : e.text,
159
155
  buttonText: e == null ? void 0 : e.buttonText,
160
156
  onCardClick: () => s(e)
161
157
  },
162
- g
163
- )) }), [r, v, a, s]);
164
- return /* @__PURE__ */ n(R, { ref: l, children: [
165
- /* @__PURE__ */ n("div", { className: "regular-title", children: [
166
- /* @__PURE__ */ n("div", { className: "regular-title-text", children: [
167
- S(o) && /* @__PURE__ */ t("i", { className: o }),
158
+ p
159
+ )) }), [r, w, n, s]);
160
+ return /* @__PURE__ */ l(I, { ref: a, children: [
161
+ /* @__PURE__ */ l("div", { className: "regular-title", children: [
162
+ /* @__PURE__ */ l("div", { className: "regular-title-text", children: [
163
+ v(o) && /* @__PURE__ */ t("i", { className: o }),
168
164
  /* @__PURE__ */ t("span", { children: m })
169
165
  ] }),
170
- S(b) && /* @__PURE__ */ t(
171
- j,
166
+ v(b) && /* @__PURE__ */ t(
167
+ R,
172
168
  {
173
169
  type: "button",
174
170
  btnType: "tinted",
175
171
  color: "gray",
176
- onClick: () => $(b),
172
+ onClick: () => T(b),
177
173
  borderRadius: "curved",
178
174
  children: c
179
175
  }
180
176
  )
181
177
  ] }),
182
178
  (d == null ? void 0 : d.length) > 0 && /* @__PURE__ */ t(
183
- F,
179
+ E,
184
180
  {
185
181
  items: d,
186
182
  onRemove: (e) => {
@@ -194,17 +190,17 @@ const L = f.div`
194
190
  noMargin: !0
195
191
  }
196
192
  ),
197
- /* @__PURE__ */ t(L, { limit: a, children: /* @__PURE__ */ t(
198
- G,
193
+ /* @__PURE__ */ t(F, { limit: n, children: /* @__PURE__ */ t(
194
+ _,
199
195
  {
200
- isLoading: B,
201
- limit: a,
196
+ isLoading: $,
197
+ limit: n,
202
198
  keyPrefix: "explore-landing",
203
- children: W
199
+ children: B
204
200
  }
205
201
  ) })
206
202
  ] });
207
203
  });
208
204
  export {
209
- te as default
205
+ ee as default
210
206
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.79",
3
+ "version": "4.0.80",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [