@lanaco/lnc-react-ui 4.0.203 → 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.
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),a=require("react"),b=require("./Icon.cjs"),j=require("./Button.cjs"),q=require("./Popover.cjs"),N=require("./PopoverTrigger.cjs"),z=require("./PopoverContent.cjs"),P=require("./Drawer.cjs"),C=require("./useDetectMobile-zkbzoOGV.cjs"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),p=require("./utils-RnrgDDZP.cjs"),$=_.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;
@@ -6,46 +6,6 @@
6
6
  padding: 2rem;
7
7
  background: #f4f6fb;
8
8
 
9
- & .section__drawer {
10
- background: white !important;
11
- opacity: 1;
12
- padding-top: 0.5rem;
13
- padding-bottom: 2.125rem;
14
- border-top-left-radius: 1rem;
15
- border-top-right-radius: 1rem;
16
- display: flex;
17
- flex-direction: column;
18
-
19
- & .drawer__image {
20
- max-height: 4rem;
21
- }
22
-
23
- & .drawer__content {
24
- display: flex;
25
- flex-direction: column;
26
- gap: 1.25rem;
27
- }
28
-
29
- & .drawer__description {
30
- color: var(--gray-900, #0c1520);
31
- font-weight: 400;
32
- font-size: 0.875rem;
33
- leading-trim: none;
34
- line-height: 1.25rem;
35
- letter-spacing: 0.0156rem;
36
- text-align: center;
37
- }
38
-
39
- & .drawer__action {
40
- font-weight: 500;
41
- font-style: medium;
42
- font-size: 0.875rem;
43
- leading-trim: none;
44
- line-height: 1.25rem;
45
- letter-spacing: -0.0056rem;
46
- }
47
- }
48
-
49
9
  & .section__text {
50
10
  display: flex;
51
11
  flex-direction: column;
@@ -66,7 +26,7 @@
66
26
  letter-spacing: 0%;
67
27
  text-align: center;
68
28
  color: var(--gray-900, #0c1520);
69
- ${p.truncateText()}
29
+ ${l.truncateText()}
70
30
  }
71
31
 
72
32
  &::after {
@@ -92,7 +52,7 @@
92
52
  letter-spacing: 0.0156rem;
93
53
  text-align: center;
94
54
  color: var(--gray-700, #424b56);
95
- ${p.truncateTextInRows(2)}
55
+ ${l.truncateTextInRows(2)}
96
56
  }
97
57
  }
98
58
 
@@ -129,7 +89,7 @@
129
89
  }
130
90
  }
131
91
 
132
- @media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
92
+ @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
133
93
  padding: 1rem;
134
94
 
135
95
  & .section__text {
@@ -141,7 +101,7 @@
141
101
 
142
102
  & .section__items {
143
103
  display: grid;
144
- grid-template-columns: ${()=>"repeat(2, minmax(0, auto))"};
104
+ grid-template-columns: ${()=>"repeat(2, minmax(0, 1fr))"};
145
105
  justify-items: center;
146
106
  gap: 1rem;
147
107
 
@@ -155,7 +115,7 @@
155
115
  }
156
116
  }
157
117
  }
158
- `,I=_.styled.div`
118
+ `,q=d.styled.div`
159
119
  width: 100%;
160
120
  height: 100%;
161
121
  max-width: 16.25rem;
@@ -171,4 +131,4 @@
171
131
  line-height: 1rem;
172
132
  letter-spacing: 0.025rem;
173
133
  color: var(--gray-900, #0c1520);
174
- `,D=a.forwardRef(({icon:s,title:c,description:l,items:t,learnMoreText:u="Learn more",onSelectCard:d=()=>{}},M)=>{const g=C.useDetectMobile(),o=a.useRef(null),[x,m]=a.useState(null),[i,h]=a.useState(null),f=r=>{m(r)},w=()=>{m(null)},v=r=>{var n;h(r),(n=o==null?void 0:o.current)==null||n.open()},y=()=>{h(null)};return e.jsxs($,{children:[e.jsxs("div",{className:"section__text",children:[s&&e.jsx(b,{icon:s,sizeInUnits:"2.5rem",color:"warning",className:"section__icon"}),c&&e.jsx("div",{className:"section__title",children:e.jsx("span",{children:c})}),l&&e.jsx("div",{className:"section__description",children:l})]}),t&&(t==null?void 0:t.length)>0&&e.jsx("div",{className:"section__items",children:g?t==null?void 0:t.map((r,n)=>e.jsx("div",{className:"section__item",onClick:()=>v(r),children:e.jsx("img",{src:r==null?void 0:r.imageUrl,alt:`Partner card image ${n+1}`,loading:"lazy"})},`partner-cards-section-item__${n+1}`)):t==null?void 0:t.map((r,n)=>e.jsxs(q,{open:n===x,placement:"top-end",offsetValue:4,children:[e.jsx(N,{className:"section__trigger",children:e.jsx("div",{className:"section__item",onMouseEnter:()=>f(n),onMouseLeave:w,onClick:()=>d(r),children:e.jsx("img",{src:r==null?void 0:r.imageUrl,alt:`Partner card image ${n+1}`,loading:"lazy"})})}),e.jsx(z,{style:{padding:0,borderRadius:12},children:e.jsx(I,{children:r==null?void 0:r.description})})]},`partner-cards-section-item__${n+1}`))}),g&&e.jsxs(P,{ref:o,direction:"bottom",className:"section__drawer",onClose:y,children:[e.jsx("img",{src:i==null?void 0:i.imageUrl,alt:"Drawer image",className:"drawer__image",loading:"lazy"}),e.jsxs("div",{className:"drawer__content",children:[e.jsx("div",{className:"drawer__description",children:i==null?void 0:i.description}),e.jsx(j,{text:u,btnType:"outline",borderRadius:"curved",trailingIcon:"fa-light fa-up-right-from-square fa-xs",color:"neutral",className:"drawer__action",onClick:()=>d(i)})]})]})]})});module.exports=D;
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,16 +1,14 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as b, useRef as N, useState as h } from "react";
3
- import z from "./Icon.js";
4
- import P from "./Button.js";
5
- import C from "./Popover.js";
6
- import k from "./PopoverTrigger.js";
7
- import $ from "./PopoverContent.js";
8
- import I from "./Drawer.js";
9
- import { u as j } from "./useDetectMobile-Bkvj0VMa.js";
10
- import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
11
- import { M } from "./consts-BuFChS64.js";
12
- import { t as D, m as O } from "./utils-DtEfC-TX.js";
13
- const R = f.div`
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";
8
+ import { s as l } from "./emotion-styled.browser.esm-BNN1dTl3.js";
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`
14
12
  display: flex;
15
13
  flex-direction: column;
16
14
  gap: 3rem;
@@ -18,46 +16,6 @@ const R = f.div`
18
16
  padding: 2rem;
19
17
  background: #f4f6fb;
20
18
 
21
- & .section__drawer {
22
- background: white !important;
23
- opacity: 1;
24
- padding-top: 0.5rem;
25
- padding-bottom: 2.125rem;
26
- border-top-left-radius: 1rem;
27
- border-top-right-radius: 1rem;
28
- display: flex;
29
- flex-direction: column;
30
-
31
- & .drawer__image {
32
- max-height: 4rem;
33
- }
34
-
35
- & .drawer__content {
36
- display: flex;
37
- flex-direction: column;
38
- gap: 1.25rem;
39
- }
40
-
41
- & .drawer__description {
42
- color: var(--gray-900, #0c1520);
43
- font-weight: 400;
44
- font-size: 0.875rem;
45
- leading-trim: none;
46
- line-height: 1.25rem;
47
- letter-spacing: 0.0156rem;
48
- text-align: center;
49
- }
50
-
51
- & .drawer__action {
52
- font-weight: 500;
53
- font-style: medium;
54
- font-size: 0.875rem;
55
- leading-trim: none;
56
- line-height: 1.25rem;
57
- letter-spacing: -0.0056rem;
58
- }
59
- }
60
-
61
19
  & .section__text {
62
20
  display: flex;
63
21
  flex-direction: column;
@@ -78,7 +36,7 @@ const R = f.div`
78
36
  letter-spacing: 0%;
79
37
  text-align: center;
80
38
  color: var(--gray-900, #0c1520);
81
- ${D()}
39
+ ${N()}
82
40
  }
83
41
 
84
42
  &::after {
@@ -104,7 +62,7 @@ const R = f.div`
104
62
  letter-spacing: 0.0156rem;
105
63
  text-align: center;
106
64
  color: var(--gray-700, #424b56);
107
- ${O(2)}
65
+ ${$(2)}
108
66
  }
109
67
  }
110
68
 
@@ -141,7 +99,7 @@ const R = f.div`
141
99
  }
142
100
  }
143
101
 
144
- @media (max-width: ${M + "px"}) {
102
+ @media (max-width: ${P + "px"}) {
145
103
  padding: 1rem;
146
104
 
147
105
  & .section__text {
@@ -153,7 +111,7 @@ const R = f.div`
153
111
 
154
112
  & .section__items {
155
113
  display: grid;
156
- grid-template-columns: ${() => "repeat(2, minmax(0, auto))"};
114
+ grid-template-columns: ${() => "repeat(2, minmax(0, 1fr))"};
157
115
  justify-items: center;
158
116
  gap: 1rem;
159
117
 
@@ -167,7 +125,7 @@ const R = f.div`
167
125
  }
168
126
  }
169
127
  }
170
- `, T = f.div`
128
+ `, C = l.div`
171
129
  width: 100%;
172
130
  height: 100%;
173
131
  max-width: 16.25rem;
@@ -183,45 +141,41 @@ const R = f.div`
183
141
  line-height: 1rem;
184
142
  letter-spacing: 0.025rem;
185
143
  color: var(--gray-900, #0c1520);
186
- `, J = b(
144
+ `, L = _(
187
145
  ({
188
- icon: c,
189
- title: l,
190
- description: s,
146
+ icon: i,
147
+ title: a,
148
+ description: c,
191
149
  items: t,
192
- learnMoreText: _ = "Learn more",
193
150
  onSelectCard: d = () => {
151
+ },
152
+ onTapCard: m = () => {
194
153
  }
195
- }, U) => {
196
- const m = j(), a = N(null), [u, g] = h(null), [o, p] = h(null), x = (e) => {
197
- g(e);
198
- }, w = () => {
199
- g(null);
200
- }, v = (e) => {
201
- var n;
202
- p(e), (n = a == null ? void 0 : a.current) == null || n.open();
203
- }, y = () => {
204
- p(null);
154
+ }) => {
155
+ const g = b(), [p, s] = x(null), h = (e) => {
156
+ s(e);
157
+ }, f = () => {
158
+ s(null);
205
159
  };
206
- return /* @__PURE__ */ i(R, { children: [
207
- /* @__PURE__ */ i("div", { className: "section__text", children: [
208
- c && /* @__PURE__ */ r(
209
- z,
160
+ return /* @__PURE__ */ o(z, { children: [
161
+ /* @__PURE__ */ o("div", { className: "section__text", children: [
162
+ i && /* @__PURE__ */ r(
163
+ u,
210
164
  {
211
- icon: c,
165
+ icon: i,
212
166
  sizeInUnits: "2.5rem",
213
167
  color: "warning",
214
168
  className: "section__icon"
215
169
  }
216
170
  ),
217
- l && /* @__PURE__ */ r("div", { className: "section__title", children: /* @__PURE__ */ r("span", { children: l }) }),
218
- s && /* @__PURE__ */ r("div", { className: "section__description", children: s })
171
+ a && /* @__PURE__ */ r("div", { className: "section__title", children: /* @__PURE__ */ r("span", { children: a }) }),
172
+ c && /* @__PURE__ */ r("div", { className: "section__description", children: c })
219
173
  ] }),
220
- t && (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ r("div", { className: "section__items", children: m ? t == null ? void 0 : t.map((e, n) => /* @__PURE__ */ r(
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(
221
175
  "div",
222
176
  {
223
177
  className: "section__item",
224
- onClick: () => v(e),
178
+ onClick: () => m(e),
225
179
  children: /* @__PURE__ */ r(
226
180
  "img",
227
181
  {
@@ -232,19 +186,19 @@ const R = f.div`
232
186
  )
233
187
  },
234
188
  `partner-cards-section-item__${n + 1}`
235
- )) : t == null ? void 0 : t.map((e, n) => /* @__PURE__ */ i(
236
- C,
189
+ )) : t == null ? void 0 : t.map((e, n) => /* @__PURE__ */ o(
190
+ v,
237
191
  {
238
- open: n === u,
192
+ open: n === p,
239
193
  placement: "top-end",
240
194
  offsetValue: 4,
241
195
  children: [
242
- /* @__PURE__ */ r(k, { className: "section__trigger", children: /* @__PURE__ */ r(
196
+ /* @__PURE__ */ r(y, { className: "section__trigger", children: /* @__PURE__ */ r(
243
197
  "div",
244
198
  {
245
199
  className: "section__item",
246
- onMouseEnter: () => x(n),
247
- onMouseLeave: w,
200
+ onMouseEnter: () => h(n),
201
+ onMouseLeave: f,
248
202
  onClick: () => d(e),
249
203
  children: /* @__PURE__ */ r(
250
204
  "img",
@@ -256,49 +210,14 @@ const R = f.div`
256
210
  )
257
211
  }
258
212
  ) }),
259
- /* @__PURE__ */ r($, { style: { padding: 0, borderRadius: 12 }, children: /* @__PURE__ */ r(T, { children: e == null ? void 0 : e.description }) })
213
+ /* @__PURE__ */ r(w, { style: { padding: 0, borderRadius: 12 }, children: /* @__PURE__ */ r(C, { children: e == null ? void 0 : e.description }) })
260
214
  ]
261
215
  },
262
216
  `partner-cards-section-item__${n + 1}`
263
- )) }),
264
- m && /* @__PURE__ */ i(
265
- I,
266
- {
267
- ref: a,
268
- direction: "bottom",
269
- className: "section__drawer",
270
- onClose: y,
271
- children: [
272
- /* @__PURE__ */ r(
273
- "img",
274
- {
275
- src: o == null ? void 0 : o.imageUrl,
276
- alt: "Drawer image",
277
- className: "drawer__image",
278
- loading: "lazy"
279
- }
280
- ),
281
- /* @__PURE__ */ i("div", { className: "drawer__content", children: [
282
- /* @__PURE__ */ r("div", { className: "drawer__description", children: o == null ? void 0 : o.description }),
283
- /* @__PURE__ */ r(
284
- P,
285
- {
286
- text: _,
287
- btnType: "outline",
288
- borderRadius: "curved",
289
- trailingIcon: "fa-light fa-up-right-from-square fa-xs",
290
- color: "neutral",
291
- className: "drawer__action",
292
- onClick: () => d(o)
293
- }
294
- )
295
- ] })
296
- ]
297
- }
298
- )
217
+ )) })
299
218
  ] });
300
219
  }
301
220
  );
302
221
  export {
303
- J as default
222
+ L as default
304
223
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.203",
3
+ "version": "4.0.204",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [