@lanaco/lnc-react-ui 4.0.189 → 4.0.191

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"),c=require("react"),E=require("./emotion-styled.browser.esm-BtEseadx.cjs"),F=require("./consts-goSZX3xP.cjs"),B=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),R=require("./useDetectMobile-zkbzoOGV.cjs"),I=require("./style-CkcozOY6.cjs"),P=require("./index-Coo0aVuh.cjs"),Q=require("./index-CSNxZFTX.cjs"),_=E.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),F=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./consts-goSZX3xP.cjs"),R=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),I=require("./useDetectMobile-zkbzoOGV.cjs"),Q=require("./style-CkcozOY6.cjs"),w=require("./index-Coo0aVuh.cjs"),_=require("./index-CSNxZFTX.cjs"),$=F.styled.div`
2
2
  display: grid;
3
- grid-template-columns: ${a=>`repeat(${a.limit}, minmax(0, 1fr))`};
3
+ grid-template-columns: ${o=>`repeat(${o.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
5
5
 
6
6
  & .button-link {
7
7
  white-space: nowrap;
8
8
  }
9
9
 
10
- @media (max-width: ${F.MOBILE_SIZE_PX+"px"}) {
10
+ @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
11
11
  display: flex;
12
12
  gap: 1rem;
13
13
  overflow-x: auto;
@@ -26,4 +26,4 @@
26
26
  /* Safari and Chrome */
27
27
  }
28
28
  }
29
- `,w=c.memo(P.DetailedProductCard),$=c.forwardRef((a,v)=>{const{icon:u,title:D,buttonLink:d,items:i,buttonText:m,limit:n=4,onSelectCard:g=()=>{},onButtonAction:L=()=>{},isLoading:p=!1,getImage:b=()=>{},negotiableText:k,freeText:y,options:o,onSelectOption:S=()=>{},productsToolbarName:U="All",sponsoredText:C,onBookmark:f=()=>{},actionComponent:h,componentName:N,LinkComponent:q}=a,j=R.useDetectMobile(),M=c.useMemo(()=>t.jsx(t.Fragment,{children:j===!0?i==null?void 0:i.map((e,r)=>t.jsx(w,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,nameSlug:e==null?void 0:e.nameSlug,onSelectCard:(T,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),sellerName:e==null?void 0:e.sellerName,imageUrl:b(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:k,freeText:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C,onBookmark:f,actionComponent:h,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N},LinkComponent:q},r)):i==null?void 0:i.slice(0,n).map((e,r)=>t.jsx(w,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(T,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:b(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:k,freeText:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C,onBookmark:f,actionComponent:h,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N},sellerName:e==null?void 0:e.sellerName,LinkComponent:q},r))}),[i,j,n]);return t.jsxs(I.TitleWithOptionsSectionWrapper,{ref:v,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(u)&&t.jsx("i",{className:u}),t.jsx("span",{children:D})]}),l.isDefinedNotEmptyString(d)&&l.isDefinedNotEmptyString(m)&&!p&&t.jsx(B,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),L(d)},borderRadius:"curved",className:"button-link",children:m})]}),(o==null?void 0:o.length)>0&&t.jsx(Q.SelectBar,{items:o,onRemove:e=>{S(e)},onSelect:e=>{S(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:U}),t.jsx(P.SuspenseDetailedProductCard,{isLoading:p,keyPrefix:"detailed-products-skeleton",children:t.jsx(_,{limit:n,children:M})})]})});module.exports=$;
29
+ `,v=c.memo(w.DetailedProductCard),O=c.forwardRef((o,D)=>{const{icon:u,title:L,buttonLink:d,items:i,buttonText:m,limit:n=4,onSelectCard:g=()=>{},onButtonAction:T=()=>{},isLoading:p=!1,getImage:b=()=>{},negotiableText:k,freeText:y,options:r,onSelectOption:S=()=>{},productsToolbarName:U="All",sponsoredText:C,onBookmark:f=()=>{},actionComponent:h,componentName:N,LinkComponent:P,urgentText:q}=o,j=I.useDetectMobile(),M=c.useMemo(()=>t.jsx(t.Fragment,{children:j===!0?i==null?void 0:i.map((e,a)=>t.jsx(v,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,nameSlug:e==null?void 0:e.nameSlug,onSelectCard:(E,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),sellerName:e==null?void 0:e.sellerName,imageUrl:b(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:k,freeText:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C,onBookmark:f,actionComponent:h,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N},LinkComponent:P,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:q},a)):i==null?void 0:i.slice(0,n).map((e,a)=>t.jsx(v,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(E,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:b(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:k,freeText:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C,onBookmark:f,actionComponent:h,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N},sellerName:e==null?void 0:e.sellerName,LinkComponent:P,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:q},a))}),[i,j,n]);return t.jsxs(Q.TitleWithOptionsSectionWrapper,{ref:D,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(u)&&t.jsx("i",{className:u}),t.jsx("span",{children:L})]}),l.isDefinedNotEmptyString(d)&&l.isDefinedNotEmptyString(m)&&!p&&t.jsx(R,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var a;(a=e==null?void 0:e.target)==null||a.blur(),T(d)},borderRadius:"curved",className:"button-link",children:m})]}),(r==null?void 0:r.length)>0&&t.jsx(_.SelectBar,{items:r,onRemove:e=>{S(e)},onSelect:e=>{S(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:U}),t.jsx(w.SuspenseDetailedProductCard,{isLoading:p,keyPrefix:"detailed-products-skeleton",children:t.jsx($,{limit:n,children:M})})]})});module.exports=O;
@@ -1,14 +1,14 @@
1
- import { jsx as t, Fragment as B, jsxs as l } from "react/jsx-runtime";
2
- import { memo as q, forwardRef as E, useMemo as I } from "react";
3
- import { s as Q } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as O } from "./consts-BuFChS64.js";
5
- import R from "./Button.js";
1
+ import { jsx as a, Fragment as q, jsxs as l } from "react/jsx-runtime";
2
+ import { memo as E, forwardRef as I, useMemo as Q } from "react";
3
+ import { s as O } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as R } from "./consts-BuFChS64.js";
5
+ import W from "./Button.js";
6
6
  import { k as m } from "./utils-Dc5zIpaz.js";
7
- import { u as W } from "./useDetectMobile-Bkvj0VMa.js";
8
- import { T as $ } from "./style-C7FUSHmS.js";
9
- import { D as j, S as z } from "./index-PhMLWAC1.js";
10
- import { S as A } from "./index-BGiZlEQt.js";
11
- const K = Q.div`
7
+ import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
8
+ import { T as j } from "./style-C7FUSHmS.js";
9
+ import { D as z, S as A } from "./index-PhMLWAC1.js";
10
+ import { S as K } from "./index-BGiZlEQt.js";
11
+ const _ = O.div`
12
12
  display: grid;
13
13
  grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
14
14
  gap: 1.25rem;
@@ -17,7 +17,7 @@ const K = Q.div`
17
17
  white-space: nowrap;
18
18
  }
19
19
 
20
- @media (max-width: ${O + "px"}) {
20
+ @media (max-width: ${R + "px"}) {
21
21
  display: flex;
22
22
  gap: 1rem;
23
23
  overflow-x: auto;
@@ -36,35 +36,36 @@ const K = Q.div`
36
36
  /* Safari and Chrome */
37
37
  }
38
38
  }
39
- `, v = q(j), te = E((i, L) => {
39
+ `, T = E(z), te = I((i, L) => {
40
40
  const {
41
- icon: d,
42
- title: T,
43
- buttonLink: c,
44
- items: o,
41
+ icon: c,
42
+ title: U,
43
+ buttonLink: d,
44
+ items: t,
45
45
  buttonText: u,
46
46
  limit: n = 4,
47
- onSelectCard: p = () => {
47
+ onSelectCard: g = () => {
48
48
  },
49
- onButtonAction: U = () => {
49
+ onButtonAction: M = () => {
50
50
  },
51
- isLoading: g = !1,
52
- getImage: b = () => {
51
+ isLoading: p = !1,
52
+ getImage: k = () => {
53
53
  },
54
- negotiableText: k,
54
+ negotiableText: b,
55
55
  freeText: f,
56
- options: a,
57
- onSelectOption: y = () => {
56
+ options: r,
57
+ onSelectOption: S = () => {
58
58
  },
59
- productsToolbarName: M = "All",
60
- sponsoredText: C,
61
- onBookmark: S = () => {
59
+ productsToolbarName: D = "All",
60
+ sponsoredText: y,
61
+ onBookmark: C = () => {
62
62
  },
63
63
  actionComponent: h,
64
64
  componentName: N,
65
- LinkComponent: w
66
- } = i, P = W(), D = I(() => /* @__PURE__ */ t(B, { children: P === !0 ? o == null ? void 0 : o.map((e, r) => /* @__PURE__ */ t(
67
- v,
65
+ LinkComponent: P,
66
+ urgentText: v
67
+ } = i, w = $(), F = Q(() => /* @__PURE__ */ a(q, { children: w === !0 ? t == null ? void 0 : t.map((e, o) => /* @__PURE__ */ a(
68
+ T,
68
69
  {
69
70
  name: e == null ? void 0 : e.name,
70
71
  price: e == null ? void 0 : e.price,
@@ -76,16 +77,16 @@ const K = Q.div`
76
77
  sponsored: e == null ? void 0 : e.sponsored,
77
78
  imageComponent: e == null ? void 0 : e.imageComponent,
78
79
  nameSlug: e == null ? void 0 : e.nameSlug,
79
- onSelectCard: (F, s) => p({
80
+ onSelectCard: (B, s) => g({
80
81
  uuid: e == null ? void 0 : e.uuid,
81
82
  nameSlug: e == null ? void 0 : e.nameSlug,
82
83
  cardRef: s
83
84
  }),
84
85
  sellerName: e == null ? void 0 : e.sellerName,
85
- imageUrl: b(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
86
+ imageUrl: k(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
86
87
  isFree: e == null ? void 0 : e.isFree,
87
88
  isNegotiable: e == null ? void 0 : e.isNegotiable,
88
- negotiableText: k,
89
+ negotiableText: b,
89
90
  freeText: f,
90
91
  tags: e == null ? void 0 : e.tags,
91
92
  categoryCode: e == null ? void 0 : e.categoryCode,
@@ -95,17 +96,19 @@ const K = Q.div`
95
96
  status: e == null ? void 0 : e.status,
96
97
  trade: e == null ? void 0 : e.trade,
97
98
  forCart: e == null ? void 0 : e.forCart,
98
- sponsoredText: C,
99
- onBookmark: S,
99
+ sponsoredText: y,
100
+ onBookmark: C,
100
101
  actionComponent: h,
101
102
  bookmarked: e == null ? void 0 : e.bookmarked,
102
103
  bookmarkLists: e == null ? void 0 : e.bookmarkLists,
103
104
  metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
104
- LinkComponent: w
105
+ LinkComponent: P,
106
+ activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
107
+ urgentText: v
105
108
  },
106
- r
107
- )) : o == null ? void 0 : o.slice(0, n).map((e, r) => /* @__PURE__ */ t(
108
- v,
109
+ o
110
+ )) : t == null ? void 0 : t.slice(0, n).map((e, o) => /* @__PURE__ */ a(
111
+ T,
109
112
  {
110
113
  name: e == null ? void 0 : e.name,
111
114
  price: e == null ? void 0 : e.price,
@@ -117,16 +120,16 @@ const K = Q.div`
117
120
  location: e == null ? void 0 : e.location,
118
121
  sponsored: e == null ? void 0 : e.sponsored,
119
122
  imageComponent: e == null ? void 0 : e.imageComponent,
120
- onSelectCard: (F, s) => p({
123
+ onSelectCard: (B, s) => g({
121
124
  uuid: e == null ? void 0 : e.uuid,
122
125
  nameSlug: e == null ? void 0 : e.nameSlug,
123
126
  cardRef: s
124
127
  }),
125
128
  nameSlug: e == null ? void 0 : e.nameSlug,
126
- imageUrl: b(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
129
+ imageUrl: k(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
127
130
  isFree: e == null ? void 0 : e.isFree,
128
131
  isNegotiable: e == null ? void 0 : e.isNegotiable,
129
- negotiableText: k,
132
+ negotiableText: b,
130
133
  freeText: f,
131
134
  tags: e == null ? void 0 : e.tags,
132
135
  categoryCode: e == null ? void 0 : e.categoryCode,
@@ -136,32 +139,34 @@ const K = Q.div`
136
139
  status: e == null ? void 0 : e.status,
137
140
  trade: e == null ? void 0 : e.trade,
138
141
  forCart: e == null ? void 0 : e.forCart,
139
- sponsoredText: C,
140
- onBookmark: S,
142
+ sponsoredText: y,
143
+ onBookmark: C,
141
144
  actionComponent: h,
142
145
  bookmarked: e == null ? void 0 : e.bookmarked,
143
146
  bookmarkLists: e == null ? void 0 : e.bookmarkLists,
144
147
  metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
145
148
  sellerName: e == null ? void 0 : e.sellerName,
146
- LinkComponent: w
149
+ LinkComponent: P,
150
+ activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
151
+ urgentText: v
147
152
  },
148
- r
149
- )) }), [o, P, n]);
150
- return /* @__PURE__ */ l($, { ref: L, children: [
153
+ o
154
+ )) }), [t, w, n]);
155
+ return /* @__PURE__ */ l(j, { ref: L, children: [
151
156
  /* @__PURE__ */ l("div", { className: "regular-title", children: [
152
157
  /* @__PURE__ */ l("div", { className: "regular-title-text", children: [
153
- m(d) && /* @__PURE__ */ t("i", { className: d }),
154
- /* @__PURE__ */ t("span", { children: T })
158
+ m(c) && /* @__PURE__ */ a("i", { className: c }),
159
+ /* @__PURE__ */ a("span", { children: U })
155
160
  ] }),
156
- m(c) && m(u) && !g && /* @__PURE__ */ t(
157
- R,
161
+ m(d) && m(u) && !p && /* @__PURE__ */ a(
162
+ W,
158
163
  {
159
164
  type: "button",
160
165
  btnType: "tinted",
161
166
  color: "neutral",
162
167
  onClick: (e) => {
163
- var r;
164
- (r = e == null ? void 0 : e.target) == null || r.blur(), U(c);
168
+ var o;
169
+ (o = e == null ? void 0 : e.target) == null || o.blur(), M(d);
165
170
  },
166
171
  borderRadius: "curved",
167
172
  className: "button-link",
@@ -169,28 +174,28 @@ const K = Q.div`
169
174
  }
170
175
  )
171
176
  ] }),
172
- (a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ t(
173
- A,
177
+ (r == null ? void 0 : r.length) > 0 && /* @__PURE__ */ a(
178
+ K,
174
179
  {
175
- items: a,
180
+ items: r,
176
181
  onRemove: (e) => {
177
- y(e);
182
+ S(e);
178
183
  },
179
184
  onSelect: (e) => {
180
- y(e);
185
+ S(e);
181
186
  },
182
187
  labelKey: "name",
183
188
  valueKey: "code",
184
189
  noMargin: !0,
185
- productsToolbarName: M
190
+ productsToolbarName: D
186
191
  }
187
192
  ),
188
- /* @__PURE__ */ t(
189
- z,
193
+ /* @__PURE__ */ a(
194
+ A,
190
195
  {
191
- isLoading: g,
196
+ isLoading: p,
192
197
  keyPrefix: "detailed-products-skeleton",
193
- children: /* @__PURE__ */ t(K, { limit: n, children: D })
198
+ children: /* @__PURE__ */ a(_, { limit: n, children: F })
194
199
  }
195
200
  )
196
201
  ] });
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),d=require("react"),t=require("./index-BpbMKBf_.cjs"),T=require("./Chip.cjs"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),m=require("./consts-goSZX3xP.cjs"),b=require("./useDetectMobile-zkbzoOGV.cjs"),_=require("./Button.cjs"),j=g.styled.div`
1
+ "use strict";const e=require("react/jsx-runtime"),g=require("react"),p=require("./index-BpbMKBf_.cjs"),w=require("./Chip.cjs"),m=require("./emotion-styled.browser.esm-BtEseadx.cjs"),h=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),u=require("./Button.cjs"),b=m.styled.div`
2
2
  display: flex;
3
3
 
4
4
  border: 1px solid var(--gray-200, #e4e9f0);
@@ -58,14 +58,14 @@
58
58
  }
59
59
  }
60
60
 
61
- @media (max-width: ${m.MOBILE_SIZE_PX+"px"}) {
61
+ @media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
62
62
  width: 100%;
63
63
 
64
64
  & .options__item {
65
65
  width: 100%;
66
66
  }
67
67
  }
68
- `,P=g.styled.div`
68
+ `,j=m.styled.div`
69
69
  display: flex;
70
70
  gap: 1.25rem;
71
71
  flex-wrap: wrap;
@@ -86,14 +86,16 @@
86
86
  }
87
87
  }
88
88
 
89
- @media (max-width: ${m.MOBILE_SIZE_PX+"px"}) {
89
+ @media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
90
90
  flex-direction: column;
91
91
 
92
92
  & .learn-more {
93
93
  display: none;
94
94
  }
95
95
  }
96
- `,S=g.styled.div`
96
+ `,S=m.styled.a`
97
+ text-decoration: none;
98
+ color: var(--gray-950);
97
99
  display: flex;
98
100
  padding: 2rem 1.25rem 1.25rem 1.25rem;
99
101
  flex-direction: column;
@@ -158,7 +160,7 @@
158
160
  }
159
161
  }
160
162
 
161
- @media (max-width: ${m.MOBILE_SIZE_PX+"px"}) {
163
+ @media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
162
164
  max-width: 100%;
163
165
  flex-direction: row;
164
166
  padding: 1rem;
@@ -191,7 +193,7 @@
191
193
  }
192
194
  }
193
195
  }
194
- `,y=d.forwardRef(({options:r=[],selectedOptionCode:a=null,onSelectOption:s=()=>{}},l)=>e.jsx(j,{ref:l,children:r==null?void 0:r.map((c,o)=>e.jsx(T,{label:c,borderRadius:"curved",color:"neutral",className:`options__item ${a===o?"active":""}`,onClick:()=>{s(o)}},`toggle-section-tag__${o+1}`))}));y.propTypes={options:t.PropTypes.array,selectedOptionCode:t.PropTypes.any,onSelectOption:t.PropTypes.func};const u=({title:r,description:a,image:s,learnMoreText:l,onSelectItem:c=()=>{}})=>e.jsxs(S,{onClick:c,children:[e.jsxs("div",{className:"card__content",children:[e.jsx("img",{src:s,alt:`Card ${r}`,className:"card__image"}),e.jsxs("div",{className:"card__text",children:[e.jsx("div",{className:"card__title",children:r}),e.jsx("div",{className:"card__divider"}),e.jsx("div",{className:"card__description",children:a})]})]}),e.jsx(_,{text:l,btnType:"basic",color:"neutral",className:"section__show-more learn-more"})]}),w=d.forwardRef(({items:r=[],showMoreText:a,learnMoreText:s,onSelectItem:l=()=>{}},c)=>{const o=b.useDetectMobile(),[f,h]=d.useState(!1),p=()=>{h(n=>!n)},i=d.useMemo(()=>r==null?void 0:r.map((n,x)=>e.jsx(u,{title:n==null?void 0:n.title,description:n==null?void 0:n.description,image:n==null?void 0:n.image,learnMoreText:s,onSelectItem:()=>l(n)},`toggle-section-item__${x+1}`)),[r]);return e.jsx(P,{ref:c,children:o?f?i:e.jsxs(e.Fragment,{children:[i==null?void 0:i.slice(0,4),(i==null?void 0:i.length)>4&&e.jsx(_,{text:a,btnType:"basic",color:"neutral",className:"section__show-more",onClick:p})]}):i})});u.propTypes={title:t.PropTypes.string,description:t.PropTypes.string,image:t.PropTypes.string,learnMoreText:t.PropTypes.string,onSelectItem:t.PropTypes.func};w.propTypes={items:t.PropTypes.array,showMoreText:t.PropTypes.string,learnMoreText:t.PropTypes.string,onSelectItem:t.PropTypes.func};const M=g.styled.div`
196
+ `,y=g.forwardRef(({options:r=[],selectedOptionCode:o=null,onSelectOption:a=()=>{}},s)=>e.jsx(b,{ref:s,children:r==null?void 0:r.map((l,n)=>e.jsx(w,{label:l,borderRadius:"curved",color:"neutral",className:`options__item ${o===n?"active":""}`,onClick:()=>{a(n)}},`toggle-section-tag__${n+1}`))}));y.propTypes={options:p.PropTypes.array,selectedOptionCode:p.PropTypes.any,onSelectOption:p.PropTypes.func};const N=({title:r,description:o,image:a,learnMoreText:s,onSelectItem:l=()=>{},LinkComponent:n,link:c})=>{const d=n||"a";return e.jsxs(S,{onClick:l,as:d,...n?{to:`/${c}`}:{href:`/${c}`},children:[e.jsxs("div",{className:"card__content",children:[e.jsx("img",{src:a,alt:`Card ${r}`,className:"card__image"}),e.jsxs("div",{className:"card__text",children:[e.jsx("div",{className:"card__title",children:r}),e.jsx("div",{className:"card__divider"}),e.jsx("div",{className:"card__description",children:o})]})]}),e.jsx(u,{text:s,btnType:"basic",color:"neutral",className:"section__show-more learn-more"})]})},O=g.forwardRef(({items:r=[],showMoreText:o,learnMoreText:a,onSelectItem:s=()=>{},LinkComponent:l},n)=>{const c=v.useDetectMobile(),[d,_]=g.useState(!1),f=()=>{_(t=>!t)},i=g.useMemo(()=>r==null?void 0:r.map((t,x)=>e.jsx(N,{title:t==null?void 0:t.title,description:t==null?void 0:t.description,image:t==null?void 0:t.image,learnMoreText:a,onSelectItem:()=>s(t),LinkComponent:l,link:t==null?void 0:t.link},`toggle-section-item__${x+1}`)),[r]);return e.jsx(j,{ref:n,children:c?d?i:e.jsxs(e.Fragment,{children:[i==null?void 0:i.slice(0,4),(i==null?void 0:i.length)>4&&e.jsx(u,{text:o,btnType:"basic",color:"neutral",className:"section__show-more",onClick:f})]}):i})}),C=m.styled.div`
195
197
  display: flex;
196
198
  flex-direction: column;
197
199
  align-items: center;
@@ -223,7 +225,7 @@
223
225
  line-height: 1.5rem;
224
226
  }
225
227
 
226
- @media (max-width: ${m.MOBILE_SIZE_PX+"px"}) {
228
+ @media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
227
229
  gap: 1.5rem;
228
230
 
229
231
  & .section__heading {
@@ -245,4 +247,4 @@
245
247
  text-align: left;
246
248
  }
247
249
  }
248
- `,v=d.forwardRef(({title:r,description:a,showMoreText:s="Show more",learnMoreText:l="Learn more",options:c=[],items:o=[],onSelectItem:f=()=>{}},h)=>{const[p,i]=d.useState(0),n=x=>{i(x)};return e.jsxs(M,{ref:h,children:[e.jsxs("div",{className:"section__heading",children:[r&&e.jsx("div",{className:"section__title",children:r}),a&&e.jsx("div",{className:"section__description",children:a})]}),e.jsx(y,{options:c,selectedOptionCode:p,onSelectOption:n}),e.jsx(w,{items:o==null?void 0:o[p],showMoreText:s,learnMoreText:l,onSelectItem:f},`toggle-section-items__${p}`)]})});v.propTypes={title:t.PropTypes.string,description:t.PropTypes.string,options:t.PropTypes.array,items:t.PropTypes.array,showMoreText:t.PropTypes.string,learnMoreText:t.PropTypes.string,onSelectItem:t.PropTypes.func};module.exports=v;
250
+ `,M=g.forwardRef(({title:r,description:o,showMoreText:a="Show more",learnMoreText:s="Learn more",options:l=[],items:n=[],onSelectItem:c=()=>{},LinkComponent:d},_)=>{const[f,i]=g.useState(0),t=x=>{i(x)};return e.jsxs(C,{ref:_,children:[e.jsxs("div",{className:"section__heading",children:[r&&e.jsx("div",{className:"section__title",children:r}),o&&e.jsx("div",{className:"section__description",children:o})]}),e.jsx(y,{options:l,selectedOptionCode:f,onSelectOption:t,LinkComponent:d}),e.jsx(O,{items:n==null?void 0:n[f],showMoreText:a,learnMoreText:s,onSelectItem:c,LinkComponent:d},`toggle-section-items__${f}`)]})});module.exports=M;
@@ -1,12 +1,12 @@
1
- import { jsx as r, jsxs as d, Fragment as S } from "react/jsx-runtime";
2
- import { forwardRef as x, useState as u, useMemo as T } from "react";
3
- import { P as e } from "./index-CblbdqjE.js";
4
- import M from "./Chip.js";
5
- import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
6
- import { M as p } from "./consts-BuFChS64.js";
7
- import { u as C } from "./useDetectMobile-Bkvj0VMa.js";
8
- import y from "./Button.js";
9
- const N = m.div`
1
+ import { jsx as r, jsxs as d, Fragment as b } from "react/jsx-runtime";
2
+ import { forwardRef as u, useState as v, useMemo as S } from "react";
3
+ import { P as x } from "./index-CblbdqjE.js";
4
+ import C from "./Chip.js";
5
+ import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
6
+ import { M as h } from "./consts-BuFChS64.js";
7
+ import { u as N } from "./useDetectMobile-Bkvj0VMa.js";
8
+ import w from "./Button.js";
9
+ const $ = f.div`
10
10
  display: flex;
11
11
 
12
12
  border: 1px solid var(--gray-200, #e4e9f0);
@@ -66,14 +66,14 @@ const N = m.div`
66
66
  }
67
67
  }
68
68
 
69
- @media (max-width: ${p + "px"}) {
69
+ @media (max-width: ${h + "px"}) {
70
70
  width: 100%;
71
71
 
72
72
  & .options__item {
73
73
  width: 100%;
74
74
  }
75
75
  }
76
- `, O = m.div`
76
+ `, O = f.div`
77
77
  display: flex;
78
78
  gap: 1.25rem;
79
79
  flex-wrap: wrap;
@@ -94,14 +94,16 @@ const N = m.div`
94
94
  }
95
95
  }
96
96
 
97
- @media (max-width: ${p + "px"}) {
97
+ @media (max-width: ${h + "px"}) {
98
98
  flex-direction: column;
99
99
 
100
100
  & .learn-more {
101
101
  display: none;
102
102
  }
103
103
  }
104
- `, k = m.div`
104
+ `, k = f.a`
105
+ text-decoration: none;
106
+ color: var(--gray-950);
105
107
  display: flex;
106
108
  padding: 2rem 1.25rem 1.25rem 1.25rem;
107
109
  flex-direction: column;
@@ -166,7 +168,7 @@ const N = m.div`
166
168
  }
167
169
  }
168
170
 
169
- @media (max-width: ${p + "px"}) {
171
+ @media (max-width: ${h + "px"}) {
170
172
  max-width: 100%;
171
173
  flex-direction: row;
172
174
  padding: 1rem;
@@ -199,97 +201,101 @@ const N = m.div`
199
201
  }
200
202
  }
201
203
  }
202
- `, w = x(
203
- ({ options: t = [], selectedOptionCode: a = null, onSelectOption: l = () => {
204
- } }, c) => /* @__PURE__ */ r(N, { ref: c, children: t == null ? void 0 : t.map((s, o) => /* @__PURE__ */ r(
205
- M,
204
+ `, y = u(
205
+ ({ options: t = [], selectedOptionCode: o = null, onSelectOption: a = () => {
206
+ } }, l) => /* @__PURE__ */ r($, { ref: l, children: t == null ? void 0 : t.map((c, n) => /* @__PURE__ */ r(
207
+ C,
206
208
  {
207
- label: s,
209
+ label: c,
208
210
  borderRadius: "curved",
209
211
  color: "neutral",
210
- className: `options__item ${a === o ? "active" : ""}`,
212
+ className: `options__item ${o === n ? "active" : ""}`,
211
213
  onClick: () => {
212
- l(o);
214
+ a(n);
213
215
  }
214
216
  },
215
- `toggle-section-tag__${o + 1}`
217
+ `toggle-section-tag__${n + 1}`
216
218
  )) })
217
219
  );
218
- w.propTypes = {
219
- options: e.array,
220
- selectedOptionCode: e.any,
221
- onSelectOption: e.func
220
+ y.propTypes = {
221
+ options: x.array,
222
+ selectedOptionCode: x.any,
223
+ onSelectOption: x.func
222
224
  };
223
- const v = ({
225
+ const z = ({
224
226
  title: t,
225
- description: a,
226
- image: l,
227
- learnMoreText: c,
228
- onSelectItem: s = () => {
227
+ description: o,
228
+ image: a,
229
+ learnMoreText: l,
230
+ onSelectItem: c = () => {
231
+ },
232
+ LinkComponent: n,
233
+ link: s
234
+ }) => /* @__PURE__ */ d(
235
+ k,
236
+ {
237
+ onClick: c,
238
+ as: n || "a",
239
+ ...n ? { to: `/${s}` } : { href: `/${s}` },
240
+ children: [
241
+ /* @__PURE__ */ d("div", { className: "card__content", children: [
242
+ /* @__PURE__ */ r("img", { src: a, alt: `Card ${t}`, className: "card__image" }),
243
+ /* @__PURE__ */ d("div", { className: "card__text", children: [
244
+ /* @__PURE__ */ r("div", { className: "card__title", children: t }),
245
+ /* @__PURE__ */ r("div", { className: "card__divider" }),
246
+ /* @__PURE__ */ r("div", { className: "card__description", children: o })
247
+ ] })
248
+ ] }),
249
+ /* @__PURE__ */ r(
250
+ w,
251
+ {
252
+ text: l,
253
+ btnType: "basic",
254
+ color: "neutral",
255
+ className: "section__show-more learn-more"
256
+ }
257
+ )
258
+ ]
229
259
  }
230
- }) => /* @__PURE__ */ d(k, { onClick: s, children: [
231
- /* @__PURE__ */ d("div", { className: "card__content", children: [
232
- /* @__PURE__ */ r("img", { src: l, alt: `Card ${t}`, className: "card__image" }),
233
- /* @__PURE__ */ d("div", { className: "card__text", children: [
234
- /* @__PURE__ */ r("div", { className: "card__title", children: t }),
235
- /* @__PURE__ */ r("div", { className: "card__divider" }),
236
- /* @__PURE__ */ r("div", { className: "card__description", children: a })
237
- ] })
238
- ] }),
239
- /* @__PURE__ */ r(
240
- y,
241
- {
242
- text: c,
243
- btnType: "basic",
244
- color: "neutral",
245
- className: "section__show-more learn-more"
246
- }
247
- )
248
- ] }), b = x(
249
- ({ items: t = [], showMoreText: a, learnMoreText: l, onSelectItem: c = () => {
250
- } }, s) => {
251
- const o = C(), [f, h] = u(!1), g = () => {
252
- h((n) => !n);
253
- }, i = T(() => t == null ? void 0 : t.map((n, _) => /* @__PURE__ */ r(
254
- v,
260
+ ), M = u(
261
+ ({
262
+ items: t = [],
263
+ showMoreText: o,
264
+ learnMoreText: a,
265
+ onSelectItem: l = () => {
266
+ },
267
+ LinkComponent: c
268
+ }, n) => {
269
+ const s = N(), [g, p] = v(!1), m = () => {
270
+ p((e) => !e);
271
+ }, i = S(() => t == null ? void 0 : t.map((e, _) => /* @__PURE__ */ r(
272
+ z,
255
273
  {
256
- title: n == null ? void 0 : n.title,
257
- description: n == null ? void 0 : n.description,
258
- image: n == null ? void 0 : n.image,
259
- learnMoreText: l,
260
- onSelectItem: () => c(n)
274
+ title: e == null ? void 0 : e.title,
275
+ description: e == null ? void 0 : e.description,
276
+ image: e == null ? void 0 : e.image,
277
+ learnMoreText: a,
278
+ onSelectItem: () => l(e),
279
+ LinkComponent: c,
280
+ link: e == null ? void 0 : e.link
261
281
  },
262
282
  `toggle-section-item__${_ + 1}`
263
283
  )), [t]);
264
- return /* @__PURE__ */ r(O, { ref: s, children: o ? f ? i : /* @__PURE__ */ d(S, { children: [
284
+ return /* @__PURE__ */ r(O, { ref: n, children: s ? g ? i : /* @__PURE__ */ d(b, { children: [
265
285
  i == null ? void 0 : i.slice(0, 4),
266
286
  (i == null ? void 0 : i.length) > 4 && /* @__PURE__ */ r(
267
- y,
287
+ w,
268
288
  {
269
- text: a,
289
+ text: o,
270
290
  btnType: "basic",
271
291
  color: "neutral",
272
292
  className: "section__show-more",
273
- onClick: g
293
+ onClick: m
274
294
  }
275
295
  )
276
296
  ] }) : i });
277
297
  }
278
- );
279
- v.propTypes = {
280
- title: e.string,
281
- description: e.string,
282
- image: e.string,
283
- learnMoreText: e.string,
284
- onSelectItem: e.func
285
- };
286
- b.propTypes = {
287
- items: e.array,
288
- showMoreText: e.string,
289
- learnMoreText: e.string,
290
- onSelectItem: e.func
291
- };
292
- const $ = m.div`
298
+ ), T = f.div`
293
299
  display: flex;
294
300
  flex-direction: column;
295
301
  align-items: center;
@@ -321,7 +327,7 @@ const $ = m.div`
321
327
  line-height: 1.5rem;
322
328
  }
323
329
 
324
- @media (max-width: ${p + "px"}) {
330
+ @media (max-width: ${h + "px"}) {
325
331
  gap: 1.5rem;
326
332
 
327
333
  & .section__heading {
@@ -343,55 +349,49 @@ const $ = m.div`
343
349
  text-align: left;
344
350
  }
345
351
  }
346
- `, z = x(
352
+ `, X = u(
347
353
  ({
348
354
  title: t,
349
- description: a,
350
- showMoreText: l = "Show more",
351
- learnMoreText: c = "Learn more",
352
- options: s = [],
353
- items: o = [],
354
- onSelectItem: f = () => {
355
- }
356
- }, h) => {
357
- const [g, i] = u(0);
358
- return /* @__PURE__ */ d($, { ref: h, children: [
355
+ description: o,
356
+ showMoreText: a = "Show more",
357
+ learnMoreText: l = "Learn more",
358
+ options: c = [],
359
+ items: n = [],
360
+ onSelectItem: s = () => {
361
+ },
362
+ LinkComponent: g
363
+ }, p) => {
364
+ const [m, i] = v(0);
365
+ return /* @__PURE__ */ d(T, { ref: p, children: [
359
366
  /* @__PURE__ */ d("div", { className: "section__heading", children: [
360
367
  t && /* @__PURE__ */ r("div", { className: "section__title", children: t }),
361
- a && /* @__PURE__ */ r("div", { className: "section__description", children: a })
368
+ o && /* @__PURE__ */ r("div", { className: "section__description", children: o })
362
369
  ] }),
363
370
  /* @__PURE__ */ r(
364
- w,
371
+ y,
365
372
  {
366
- options: s,
367
- selectedOptionCode: g,
373
+ options: c,
374
+ selectedOptionCode: m,
368
375
  onSelectOption: (_) => {
369
376
  i(_);
370
- }
377
+ },
378
+ LinkComponent: g
371
379
  }
372
380
  ),
373
381
  /* @__PURE__ */ r(
374
- b,
382
+ M,
375
383
  {
376
- items: o == null ? void 0 : o[g],
377
- showMoreText: l,
378
- learnMoreText: c,
379
- onSelectItem: f
384
+ items: n == null ? void 0 : n[m],
385
+ showMoreText: a,
386
+ learnMoreText: l,
387
+ onSelectItem: s,
388
+ LinkComponent: g
380
389
  },
381
- `toggle-section-items__${g}`
390
+ `toggle-section-items__${m}`
382
391
  )
383
392
  ] });
384
393
  }
385
394
  );
386
- z.propTypes = {
387
- title: e.string,
388
- description: e.string,
389
- options: e.array,
390
- items: e.array,
391
- showMoreText: e.string,
392
- learnMoreText: e.string,
393
- onSelectItem: e.func
394
- };
395
395
  export {
396
- z as default
396
+ X as default
397
397
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.189",
3
+ "version": "4.0.191",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [