@lanaco/lnc-react-ui 4.0.202 → 4.0.204

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.
@@ -79,12 +79,12 @@
79
79
  }
80
80
 
81
81
  & .text__action {
82
- background: var(--white);
83
- color: var(--black);
82
+ background: var(--white, #fff);
83
+ color: var(--neutral-600, #0f2a46);
84
84
 
85
85
  &:hover {
86
86
  background: var(--primary-500, #f59e0b);
87
- color: var(--white);
87
+ color: var(--white, #fff);
88
88
  }
89
89
  }
90
90
 
@@ -114,7 +114,7 @@
114
114
  max-height: 14.5rem;
115
115
  }
116
116
  }
117
- `,k=p.forwardRef(({title:r,imageUrl:t,description:o,buttonText:a,onSelectCard:c=()=>{},className:m,position:g,tag:l,backgroundColor:h,buttonLink:x,LinkComponent:u},f)=>{const _=u||"a",w=b.useTheme();return e.jsx(e.Fragment,{children:e.jsxs(y,{ref:f,theme:w,className:m,position:g,backgroundColor:h,onClick:c,as:_,...u?{to:`/${x}`}:{href:`/${x}`},children:[e.jsx("img",{src:t,className:"wrapper__image"}),e.jsxs("div",{className:"wrapper__text",children:[l&&e.jsx("div",{className:"text__tag",children:l}),e.jsx("div",{className:"text__title",children:r}),i.isDefinedNotEmptyString(o)&&e.jsx("div",{className:"text__description",children:o}),i.isDefinedNotEmptyString(a)&&e.jsx(j,{text:a,className:"text__action"})]})]})})}),S=s.styled.div`
117
+ `,S=p.forwardRef(({title:r,imageUrl:t,description:a,buttonText:o,onSelectCard:c=()=>{},className:m,position:g,tag:l,backgroundColor:h,buttonLink:x,LinkComponent:u},f)=>{const _=u||"a",w=b.useTheme();return e.jsx(e.Fragment,{children:e.jsxs(y,{ref:f,theme:w,className:m,position:g,backgroundColor:h,onClick:c,as:_,...u?{to:`/${x}`}:{href:`/${x}`},children:[e.jsx("img",{src:t,className:"wrapper__image"}),e.jsxs("div",{className:"wrapper__text",children:[l&&e.jsx("div",{className:"text__tag",children:l}),e.jsx("div",{className:"text__title",children:r}),i.isDefinedNotEmptyString(a)&&e.jsx("div",{className:"text__description",children:a}),i.isDefinedNotEmptyString(o)&&e.jsx(j,{text:o,className:"text__action"})]})]})})}),k=s.styled.div`
118
118
  display: flex;
119
119
  flex-direction: column;
120
120
  gap: 1.5rem;
@@ -179,4 +179,4 @@
179
179
  flex-direction: column;
180
180
  }
181
181
  }
182
- `,E=({keyPrefix:r})=>e.jsxs(v,{children:[e.jsx(n.SkeletonColumnWrapper,{children:e.jsx(n.SkeletonLinePlaceholder,{height:"31.25rem",className:"skeleton__big"},`${r}-1`)}),e.jsxs(n.SkeletonColumnWrapper,{children:[e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"15rem"},`${r}-2`),e.jsx(n.SkeletonLinePlaceholder,{height:"15rem"},`${r}-3`)]}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"15rem"},`${r}-4`),e.jsx(n.SkeletonLinePlaceholder,{height:"15rem"},`${r}-5`)]})]})]}),G=({keyPrefix:r,isLoading:t=!1,fallbackComponent:o=e.jsx(e.Fragment,{}),children:a})=>e.jsx(p.Suspense,{fallbackComponent:o,children:t===!0?e.jsx(E,{keyPrefix:r}):a}),N=p.forwardRef(({title:r,items:t,isLoading:o=!1,limit:a=3,onSelectCard:c=()=>{},LinkComponent:m},g)=>e.jsxs(S,{ref:g,children:[e.jsx("div",{className:"regular-title",children:e.jsx("div",{className:"regular-title-text",children:e.jsx("span",{children:r})})}),e.jsx(G,{isLoading:o,keyPrefix:"masonry-general-cards-skeleton",children:e.jsx($,{limit:a,children:t&&(t==null?void 0:t.map((l,h)=>e.jsx(k,{...l,onSelectCard:()=>c(l),LinkComponent:m},`landing-page-masonry-general-card__${h+1}`)))})})]}));module.exports=N;
182
+ `,E=({keyPrefix:r})=>e.jsxs(v,{children:[e.jsx(n.SkeletonColumnWrapper,{children:e.jsx(n.SkeletonLinePlaceholder,{height:"31.25rem",className:"skeleton__big"},`${r}-1`)}),e.jsxs(n.SkeletonColumnWrapper,{children:[e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"15rem"},`${r}-2`),e.jsx(n.SkeletonLinePlaceholder,{height:"15rem"},`${r}-3`)]}),e.jsxs(n.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"15rem"},`${r}-4`),e.jsx(n.SkeletonLinePlaceholder,{height:"15rem"},`${r}-5`)]})]})]}),G=({keyPrefix:r,isLoading:t=!1,fallbackComponent:a=e.jsx(e.Fragment,{}),children:o})=>e.jsx(p.Suspense,{fallbackComponent:a,children:t===!0?e.jsx(E,{keyPrefix:r}):o}),N=p.forwardRef(({title:r,items:t,isLoading:a=!1,limit:o=3,onSelectCard:c=()=>{},LinkComponent:m},g)=>e.jsxs(k,{ref:g,children:[e.jsx("div",{className:"regular-title",children:e.jsx("div",{className:"regular-title-text",children:e.jsx("span",{children:r})})}),e.jsx(G,{isLoading:a,keyPrefix:"masonry-general-cards-skeleton",children:e.jsx($,{limit:o,children:t&&(t==null?void 0:t.map((l,h)=>e.jsx(S,{...l,onSelectCard:()=>c(l),LinkComponent:m},`landing-page-masonry-general-card__${h+1}`)))})})]}));module.exports=N;
@@ -99,12 +99,12 @@ const z = s.a`
99
99
  }
100
100
 
101
101
  & .text__action {
102
- background: var(--white);
103
- color: var(--black);
102
+ background: var(--white, #fff);
103
+ color: var(--neutral-600, #0f2a46);
104
104
 
105
105
  &:hover {
106
106
  background: var(--primary-500, #f59e0b);
107
- color: var(--white);
107
+ color: var(--white, #fff);
108
108
  }
109
109
  }
110
110
 
@@ -139,12 +139,12 @@ const z = s.a`
139
139
  title: e,
140
140
  imageUrl: t,
141
141
  description: a,
142
- buttonText: o,
142
+ buttonText: n,
143
143
  onSelectCard: c = () => {
144
144
  },
145
145
  className: g,
146
146
  position: h,
147
- tag: n,
147
+ tag: o,
148
148
  backgroundColor: p,
149
149
  buttonLink: x,
150
150
  LinkComponent: u
@@ -168,13 +168,13 @@ const z = s.a`
168
168
  children: [
169
169
  /* @__PURE__ */ r("img", { src: t, className: "wrapper__image" }),
170
170
  /* @__PURE__ */ i("div", { className: "wrapper__text", children: [
171
- n && /* @__PURE__ */ r("div", { className: "text__tag", children: n }),
171
+ o && /* @__PURE__ */ r("div", { className: "text__tag", children: o }),
172
172
  /* @__PURE__ */ r("div", { className: "text__title", children: e }),
173
173
  w(a) && /* @__PURE__ */ r("div", { className: "text__description", children: a }),
174
- w(o) && /* @__PURE__ */ r(
174
+ w(n) && /* @__PURE__ */ r(
175
175
  C,
176
176
  {
177
- text: o,
177
+ text: n,
178
178
  className: "text__action"
179
179
  }
180
180
  )
@@ -271,13 +271,13 @@ const z = s.a`
271
271
  keyPrefix: e,
272
272
  isLoading: t = !1,
273
273
  fallbackComponent: a = /* @__PURE__ */ r($, {}),
274
- children: o
275
- }) => /* @__PURE__ */ r(N, { fallbackComponent: a, children: t === !0 ? /* @__PURE__ */ r(R, { keyPrefix: e }) : o }), Z = v(
274
+ children: n
275
+ }) => /* @__PURE__ */ r(N, { fallbackComponent: a, children: t === !0 ? /* @__PURE__ */ r(R, { keyPrefix: e }) : n }), Z = v(
276
276
  ({
277
277
  title: e,
278
278
  items: t,
279
279
  isLoading: a = !1,
280
- limit: o = 3,
280
+ limit: n = 3,
281
281
  onSelectCard: c = () => {
282
282
  },
283
283
  LinkComponent: g
@@ -288,11 +288,11 @@ const z = s.a`
288
288
  {
289
289
  isLoading: a,
290
290
  keyPrefix: "masonry-general-cards-skeleton",
291
- children: /* @__PURE__ */ r(E, { limit: o, children: t && (t == null ? void 0 : t.map((n, p) => /* @__PURE__ */ r(
291
+ children: /* @__PURE__ */ r(E, { limit: n, children: t && (t == null ? void 0 : t.map((o, p) => /* @__PURE__ */ r(
292
292
  M,
293
293
  {
294
- ...n,
295
- onSelectCard: () => c(n),
294
+ ...o,
295
+ onSelectCard: () => c(o),
296
296
  LinkComponent: g
297
297
  },
298
298
  `landing-page-masonry-general-card__${p + 1}`
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),c=require("react"),x=require("./Icon.cjs"),_=require("./Popover.cjs"),f=require("./PopoverTrigger.cjs"),u=require("./PopoverContent.cjs"),d=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),l=require("./utils-RnrgDDZP.cjs"),y=d.styled.div`
1
+ "use strict";const e=require("react/jsx-runtime"),c=require("react"),u=require("./Icon.cjs"),f=require("./Popover.cjs"),v=require("./PopoverTrigger.cjs"),y=require("./PopoverContent.cjs"),j=require("./useDetectMobile-zkbzoOGV.cjs"),d=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),l=require("./utils-RnrgDDZP.cjs"),b=d.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 3rem;
@@ -89,7 +89,7 @@
89
89
  }
90
90
  }
91
91
 
92
- @media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
92
+ @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
93
93
  padding: 1rem;
94
94
 
95
95
  & .section__text {
@@ -101,7 +101,7 @@
101
101
 
102
102
  & .section__items {
103
103
  display: grid;
104
- grid-template-columns: ${()=>"repeat(2, minmax(0, auto))"};
104
+ grid-template-columns: ${()=>"repeat(2, minmax(0, 1fr))"};
105
105
  justify-items: center;
106
106
  gap: 1rem;
107
107
 
@@ -115,7 +115,7 @@
115
115
  }
116
116
  }
117
117
  }
118
- `,w=d.styled.div`
118
+ `,q=d.styled.div`
119
119
  width: 100%;
120
120
  height: 100%;
121
121
  max-width: 16.25rem;
@@ -131,4 +131,4 @@
131
131
  line-height: 1rem;
132
132
  letter-spacing: 0.025rem;
133
133
  color: var(--gray-900, #0c1520);
134
- `,j=c.forwardRef(({icon:o,title:s,description:i,items:r,onSelectCard:g=()=>{}},b)=>{const[m,a]=c.useState(null),h=t=>{a(t)},p=()=>{a(null)};return e.jsxs(y,{children:[e.jsxs("div",{className:"section__text",children:[o&&e.jsx(x,{icon:o,sizeInUnits:"2.5rem",color:"warning",className:"section__icon"}),s&&e.jsx("div",{className:"section__title",children:e.jsx("span",{children:s})}),i&&e.jsx("div",{className:"section__description",children:i})]}),r&&(r==null?void 0:r.length)>0&&e.jsx("div",{className:"section__items",children:r==null?void 0:r.map((t,n)=>e.jsxs(_,{open:n===m,placement:"top-end",offsetValue:4,children:[e.jsx(f,{className:"section__trigger",children:e.jsx("div",{className:"section__item",onMouseEnter:()=>{h(n)},onMouseLeave:p,onClick:()=>{g(t)},children:e.jsx("img",{src:t==null?void 0:t.imageUrl,alt:`Partner card image ${n+1}`,loading:"lazy"})})}),e.jsx(u,{style:{padding:0,borderRadius:12},children:e.jsx(w,{children:i})})]},`partner-cards-section-item__${n+1}`))})]})});module.exports=j;
134
+ `,P=c.forwardRef(({icon:i,title:o,description:s,items:n,onSelectCard:g=()=>{},onTapCard:h=()=>{}})=>{const p=j.useDetectMobile(),[m,a]=c.useState(null),x=r=>{a(r)},_=()=>{a(null)};return e.jsxs(b,{children:[e.jsxs("div",{className:"section__text",children:[i&&e.jsx(u,{icon:i,sizeInUnits:"2.5rem",color:"warning",className:"section__icon"}),o&&e.jsx("div",{className:"section__title",children:e.jsx("span",{children:o})}),s&&e.jsx("div",{className:"section__description",children:s})]}),n&&(n==null?void 0:n.length)>0&&e.jsx("div",{className:"section__items",children:p?n==null?void 0:n.map((r,t)=>e.jsx("div",{className:"section__item",onClick:()=>h(r),children:e.jsx("img",{src:r==null?void 0:r.imageUrl,alt:`Partner card image ${t+1}`,loading:"lazy"})},`partner-cards-section-item__${t+1}`)):n==null?void 0:n.map((r,t)=>e.jsxs(f,{open:t===m,placement:"top-end",offsetValue:4,children:[e.jsx(v,{className:"section__trigger",children:e.jsx("div",{className:"section__item",onMouseEnter:()=>x(t),onMouseLeave:_,onClick:()=>g(r),children:e.jsx("img",{src:r==null?void 0:r.imageUrl,alt:`Partner card image ${t+1}`,loading:"lazy"})})}),e.jsx(y,{style:{padding:0,borderRadius:12},children:e.jsx(q,{children:r==null?void 0:r.description})})]},`partner-cards-section-item__${t+1}`))})]})});module.exports=P;
@@ -1,13 +1,14 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as h, useState as f } from "react";
3
- import _ from "./Icon.js";
4
- import x from "./Popover.js";
5
- import u from "./PopoverTrigger.js";
6
- import v from "./PopoverContent.js";
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as _, useState as x } from "react";
3
+ import u from "./Icon.js";
4
+ import v from "./Popover.js";
5
+ import y from "./PopoverTrigger.js";
6
+ import w from "./PopoverContent.js";
7
+ import { u as b } from "./useDetectMobile-Bkvj0VMa.js";
7
8
  import { s as l } from "./emotion-styled.browser.esm-BNN1dTl3.js";
8
- import { M as y } from "./consts-BuFChS64.js";
9
- import { t as w, m as b } from "./utils-DtEfC-TX.js";
10
- const P = l.div`
9
+ import { M as P } from "./consts-BuFChS64.js";
10
+ import { t as N, m as $ } from "./utils-DtEfC-TX.js";
11
+ const z = l.div`
11
12
  display: flex;
12
13
  flex-direction: column;
13
14
  gap: 3rem;
@@ -35,7 +36,7 @@ const P = l.div`
35
36
  letter-spacing: 0%;
36
37
  text-align: center;
37
38
  color: var(--gray-900, #0c1520);
38
- ${w()}
39
+ ${N()}
39
40
  }
40
41
 
41
42
  &::after {
@@ -61,7 +62,7 @@ const P = l.div`
61
62
  letter-spacing: 0.0156rem;
62
63
  text-align: center;
63
64
  color: var(--gray-700, #424b56);
64
- ${b(2)}
65
+ ${$(2)}
65
66
  }
66
67
  }
67
68
 
@@ -98,7 +99,7 @@ const P = l.div`
98
99
  }
99
100
  }
100
101
 
101
- @media (max-width: ${y + "px"}) {
102
+ @media (max-width: ${P + "px"}) {
102
103
  padding: 1rem;
103
104
 
104
105
  & .section__text {
@@ -110,7 +111,7 @@ const P = l.div`
110
111
 
111
112
  & .section__items {
112
113
  display: grid;
113
- grid-template-columns: ${() => "repeat(2, minmax(0, auto))"};
114
+ grid-template-columns: ${() => "repeat(2, minmax(0, 1fr))"};
114
115
  justify-items: center;
115
116
  gap: 1rem;
116
117
 
@@ -124,7 +125,7 @@ const P = l.div`
124
125
  }
125
126
  }
126
127
  }
127
- `, N = l.div`
128
+ `, C = l.div`
128
129
  width: 100%;
129
130
  height: 100%;
130
131
  max-width: 16.25rem;
@@ -140,64 +141,83 @@ const P = l.div`
140
141
  line-height: 1rem;
141
142
  letter-spacing: 0.025rem;
142
143
  color: var(--gray-900, #0c1520);
143
- `, S = h(
144
- ({ icon: a, title: c, description: n, items: r, onSelectCard: m = () => {
145
- } }, j) => {
146
- const [d, s] = f(null), g = (t) => {
147
- s(t);
148
- }, p = () => {
144
+ `, L = _(
145
+ ({
146
+ icon: i,
147
+ title: a,
148
+ description: c,
149
+ items: t,
150
+ onSelectCard: d = () => {
151
+ },
152
+ onTapCard: m = () => {
153
+ }
154
+ }) => {
155
+ const g = b(), [p, s] = x(null), h = (e) => {
156
+ s(e);
157
+ }, f = () => {
149
158
  s(null);
150
159
  };
151
- return /* @__PURE__ */ o(P, { children: [
160
+ return /* @__PURE__ */ o(z, { children: [
152
161
  /* @__PURE__ */ o("div", { className: "section__text", children: [
153
- a && /* @__PURE__ */ e(
154
- _,
162
+ i && /* @__PURE__ */ r(
163
+ u,
155
164
  {
156
- icon: a,
165
+ icon: i,
157
166
  sizeInUnits: "2.5rem",
158
167
  color: "warning",
159
168
  className: "section__icon"
160
169
  }
161
170
  ),
162
- c && /* @__PURE__ */ e("div", { className: "section__title", children: /* @__PURE__ */ e("span", { children: c }) }),
163
- n && /* @__PURE__ */ e("div", { className: "section__description", children: n })
171
+ a && /* @__PURE__ */ r("div", { className: "section__title", children: /* @__PURE__ */ r("span", { children: a }) }),
172
+ c && /* @__PURE__ */ r("div", { className: "section__description", children: c })
164
173
  ] }),
165
- r && (r == null ? void 0 : r.length) > 0 && /* @__PURE__ */ e("div", { className: "section__items", children: r == null ? void 0 : r.map((t, i) => /* @__PURE__ */ o(
166
- x,
174
+ t && (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ r("div", { className: "section__items", children: g ? t == null ? void 0 : t.map((e, n) => /* @__PURE__ */ r(
175
+ "div",
176
+ {
177
+ className: "section__item",
178
+ onClick: () => m(e),
179
+ children: /* @__PURE__ */ r(
180
+ "img",
181
+ {
182
+ src: e == null ? void 0 : e.imageUrl,
183
+ alt: `Partner card image ${n + 1}`,
184
+ loading: "lazy"
185
+ }
186
+ )
187
+ },
188
+ `partner-cards-section-item__${n + 1}`
189
+ )) : t == null ? void 0 : t.map((e, n) => /* @__PURE__ */ o(
190
+ v,
167
191
  {
168
- open: i === d,
192
+ open: n === p,
169
193
  placement: "top-end",
170
194
  offsetValue: 4,
171
195
  children: [
172
- /* @__PURE__ */ e(u, { className: "section__trigger", children: /* @__PURE__ */ e(
196
+ /* @__PURE__ */ r(y, { className: "section__trigger", children: /* @__PURE__ */ r(
173
197
  "div",
174
198
  {
175
199
  className: "section__item",
176
- onMouseEnter: () => {
177
- g(i);
178
- },
179
- onMouseLeave: p,
180
- onClick: () => {
181
- m(t);
182
- },
183
- children: /* @__PURE__ */ e(
200
+ onMouseEnter: () => h(n),
201
+ onMouseLeave: f,
202
+ onClick: () => d(e),
203
+ children: /* @__PURE__ */ r(
184
204
  "img",
185
205
  {
186
- src: t == null ? void 0 : t.imageUrl,
187
- alt: `Partner card image ${i + 1}`,
206
+ src: e == null ? void 0 : e.imageUrl,
207
+ alt: `Partner card image ${n + 1}`,
188
208
  loading: "lazy"
189
209
  }
190
210
  )
191
211
  }
192
212
  ) }),
193
- /* @__PURE__ */ e(v, { style: { padding: 0, borderRadius: 12 }, children: /* @__PURE__ */ e(N, { children: n }) })
213
+ /* @__PURE__ */ r(w, { style: { padding: 0, borderRadius: 12 }, children: /* @__PURE__ */ r(C, { children: e == null ? void 0 : e.description }) })
194
214
  ]
195
215
  },
196
- `partner-cards-section-item__${i + 1}`
216
+ `partner-cards-section-item__${n + 1}`
197
217
  )) })
198
218
  ] });
199
219
  }
200
220
  );
201
221
  export {
202
- S as default
222
+ L as default
203
223
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.202",
3
+ "version": "4.0.204",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [