@lanaco/lnc-react-ui 4.0.208 → 4.0.209

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,11 @@
1
- "use strict";const r=require("react/jsx-runtime"),d=require("react"),x=require("./index-DeS-oqJB.cjs"),v=require("./Button.cjs"),w=require("./useDetectMobile-DYV6V1yw.cjs"),t=require("./breakpoints-CcVm-gVm.cjs"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),m=require("./style-BAcV7F53.cjs"),y=u.styled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),d=require("react"),x=require("./index-DeS-oqJB.cjs"),u=require("./style-BAcV7F53.cjs"),h=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./breakpoints-CcVm-gVm.cjs"),v=require("./Button.cjs"),y=require("./useDetectMobile-DYV6V1yw.cjs"),w=require("./utils-CITgSxXe.cjs"),j=h.styled(u.SkeletonColumnWrapper)`
2
+ @media ${t.down("S")} {
3
+ & > div {
4
+ height: 100%;
5
+ aspect-ratio: 1 / 1;
6
+ }
7
+ }
8
+ `,k=({keyPrefix:i})=>r.jsx(j,{noGradient:!0,children:r.jsx(u.SkeletonLinePlaceholder,{keyPrefix:`${i}-1`,height:"22.5rem"})}),S=({keyPrefix:i,isLoading:o=!1,fallbackComponent:n=r.jsx(r.Fragment,{}),children:a})=>r.jsx(d.Suspense,{fallbackComponent:n,children:o===!0?r.jsx(k,{keyPrefix:i}):a}),C=h.styled.div`
2
9
  &:hover {
3
10
  cursor: pointer;
4
11
 
@@ -189,11 +196,4 @@
189
196
  }
190
197
  }
191
198
  }
192
- `,j=u.styled(m.SkeletonColumnWrapper)`
193
- @media ${t.down("S")} {
194
- & > div {
195
- height: 100%;
196
- aspect-ratio: 1 / 1;
197
- }
198
- }
199
- `,k=({keyPrefix:i})=>r.jsx(j,{noGradient:!0,children:r.jsx(m.SkeletonLinePlaceholder,{keyPrefix:`${i}-1`,height:"22.5rem"})}),S=({keyPrefix:i,isLoading:o=!1,fallbackComponent:a=r.jsx(r.Fragment,{}),children:n})=>r.jsx(d.Suspense,{fallbackComponent:a,children:o===!0?r.jsx(k,{keyPrefix:i}):n}),C=d.forwardRef(({items:i=[],isLoading:o=!1,deviceType:a,partialVisible:n=!0,fallbackComponent:h=r.jsx(r.Fragment,{}),onSelectItem:_=()=>{},onButtonAction:p=()=>{},carouselProps:g},f)=>{const b={desktop:{breakpoint:{max:3e3,min:t.screenSizes.M.max},items:1,partialVisibilityGutter:0},tablet:{breakpoint:{max:t.screenSizes.M.max,min:t.screenSizes.S.min},items:1,partialVisibilityGutter:0},mobile:{breakpoint:{max:t.screenSizes.XS.max,min:0},items:1,partialVisibilityGutter:64}},c=w.useDetectMobile();return r.jsx(y,{ref:f,children:r.jsx(S,{fallbackComponent:h,keyPrefix:"banner-carousel-skeleton",isLoading:o,children:r.jsx(x.Carousel,{responsive:b,deviceType:a,removeArrowOnDeviceType:["tablet","mobile"],infinite:!c,keyBoardControl:!0,autoPlay:!0,partialVisible:n,customTransition:"transform 500ms ease-in-out",sliderClass:"carousel-slider",itemClass:"carousel-item",containerClass:"carousel-container",rewind:!0,rewindWithAnimation:!0,...g,children:i==null?void 0:i.map((e,l)=>r.jsxs("div",{className:"section__card",onClick:()=>_(e),children:[r.jsx("img",{src:e==null?void 0:e.imageUrl,alt:`Slide ${l+1}`,className:"section__image"}),r.jsxs("div",{className:"card__content",children:[r.jsxs("div",{className:"card__text",children:[(e==null?void 0:e.title)&&r.jsx("div",{className:"card__title",children:e==null?void 0:e.title}),(e==null?void 0:e.title)&&r.jsx("div",{className:"card__description",children:e==null?void 0:e.description})]}),(e==null?void 0:e.buttonText)&&r.jsx(v,{text:e==null?void 0:e.buttonText,className:"card__action",size:"medium",onClick:s=>{s==null||s.stopPropagation(),p(e)}})]})]},`banner-section-carousel-item__${l+1}`))})})},`banner-section-carousel__${c}`)});module.exports=C;
199
+ `,q=d.forwardRef(({items:i=[],isLoading:o=!1,deviceType:n,partialVisible:a=!0,fallbackComponent:m=r.jsx(r.Fragment,{}),onSelectItem:_=()=>{},onButtonAction:g=()=>{},carouselProps:p},f)=>{const b={desktop:{breakpoint:{max:3e3,min:t.screenSizes.M.max},items:1,partialVisibilityGutter:0},tablet:{breakpoint:{max:t.screenSizes.M.max,min:t.screenSizes.S.min},items:1,partialVisibilityGutter:0},mobile:{breakpoint:{max:t.screenSizes.XS.max,min:0},items:1,partialVisibilityGutter:64}},c=y.useDetectMobile();return r.jsx(C,{ref:f,children:r.jsx(S,{fallbackComponent:m,keyPrefix:"banner-carousel-skeleton",isLoading:o,children:r.jsx(x.Carousel,{responsive:b,deviceType:n,removeArrowOnDeviceType:["tablet","mobile"],infinite:!c,keyBoardControl:!0,autoPlay:!0,partialVisible:a,customTransition:"transform 500ms ease-in-out",sliderClass:"carousel-slider",itemClass:"carousel-item",containerClass:"carousel-container",rewind:!0,rewindWithAnimation:!0,...p,children:i==null?void 0:i.map((e,l)=>r.jsxs("div",{className:"section__card",onClick:()=>_(e),children:[w.isDefined(e==null?void 0:e.imageComponent)?e==null?void 0:e.imageComponent:r.jsx("img",{src:e==null?void 0:e.imageUrl,alt:`Slide ${l+1}`,loading:"lazy",className:"section__image"}),r.jsxs("div",{className:"card__content",children:[r.jsxs("div",{className:"card__text",children:[(e==null?void 0:e.title)&&r.jsx("div",{className:"card__title",children:e==null?void 0:e.title}),(e==null?void 0:e.title)&&r.jsx("div",{className:"card__description",children:e==null?void 0:e.description})]}),(e==null?void 0:e.buttonText)&&r.jsx(v,{text:e==null?void 0:e.buttonText,className:"card__action",size:"medium",onClick:s=>{s==null||s.stopPropagation(),g(e)}})]})]},`banner-section-carousel-item__${l+1}`))})})},`banner-section-carousel__${c}`)});module.exports=q;
@@ -1,12 +1,25 @@
1
1
  import { jsx as r, Fragment as u, jsxs as l } from "react/jsx-runtime";
2
2
  import { Suspense as v, forwardRef as y } from "react";
3
3
  import { C as w } from "./index-BppfjY8h.js";
4
- import k from "./Button.js";
5
- import { u as C } from "./useDetectMobile-CcVo3PNi.js";
6
- import { d as a, s as i } from "./breakpoints-ff0SIcV3.js";
4
+ import { b as k, a as C } from "./style-BwQ4djFC.js";
7
5
  import { s as h } from "./emotion-styled.browser.esm-BNN1dTl3.js";
8
- import { b as S, a as j } from "./style-BwQ4djFC.js";
9
- const $ = h.div`
6
+ import { d as o, s as i } from "./breakpoints-ff0SIcV3.js";
7
+ import S from "./Button.js";
8
+ import { u as j } from "./useDetectMobile-CcVo3PNi.js";
9
+ import { m as $ } from "./utils-B2fsQ6PS.js";
10
+ const N = h(k)`
11
+ @media ${o("S")} {
12
+ & > div {
13
+ height: 100%;
14
+ aspect-ratio: 1 / 1;
15
+ }
16
+ }
17
+ `, z = ({ keyPrefix: t }) => /* @__PURE__ */ r(N, { noGradient: !0, children: /* @__PURE__ */ r(C, { keyPrefix: `${t}-1`, height: "22.5rem" }) }), B = ({
18
+ keyPrefix: t,
19
+ isLoading: a = !1,
20
+ fallbackComponent: n = /* @__PURE__ */ r(u, {}),
21
+ children: s
22
+ }) => /* @__PURE__ */ r(v, { fallbackComponent: n, children: a === !0 ? /* @__PURE__ */ r(z, { keyPrefix: t }) : s }), M = h.div`
10
23
  &:hover {
11
24
  cursor: pointer;
12
25
 
@@ -124,7 +137,7 @@ const $ = h.div`
124
137
  right: 1rem;
125
138
  }
126
139
 
127
- @media ${a("M")} {
140
+ @media ${o("M")} {
128
141
  & .carousel-item .section__card,
129
142
  & .carousel-item:not(.react-multi-carousel-item--active) .section__card {
130
143
  height: 100%;
@@ -136,14 +149,14 @@ const $ = h.div`
136
149
  }
137
150
  }
138
151
 
139
- @media ${a("S")} {
152
+ @media ${o("S")} {
140
153
  & .carousel-item .section__card .section__image {
141
154
  object-fit: cover;
142
155
  object-position: center;
143
156
  }
144
157
  }
145
158
 
146
- @media ${a("XS")} {
159
+ @media ${o("XS")} {
147
160
  & .carousel-container {
148
161
  min-height: 23.4375rem;
149
162
  }
@@ -197,28 +210,16 @@ const $ = h.div`
197
210
  }
198
211
  }
199
212
  }
200
- `, N = h(S)`
201
- @media ${a("S")} {
202
- & > div {
203
- height: 100%;
204
- aspect-ratio: 1 / 1;
205
- }
206
- }
207
- `, z = ({ keyPrefix: t }) => /* @__PURE__ */ r(N, { noGradient: !0, children: /* @__PURE__ */ r(j, { keyPrefix: `${t}-1`, height: "22.5rem" }) }), B = ({
208
- keyPrefix: t,
209
- isLoading: o = !1,
210
- fallbackComponent: n = /* @__PURE__ */ r(u, {}),
211
- children: c
212
- }) => /* @__PURE__ */ r(v, { fallbackComponent: n, children: o === !0 ? /* @__PURE__ */ r(z, { keyPrefix: t }) : c }), W = y(
213
+ `, F = y(
213
214
  ({
214
215
  items: t = [],
215
- isLoading: o = !1,
216
+ isLoading: a = !1,
216
217
  deviceType: n,
217
- partialVisible: c = !0,
218
+ partialVisible: s = !0,
218
219
  fallbackComponent: p = /* @__PURE__ */ r(u, {}),
219
- onSelectItem: _ = () => {
220
+ onSelectItem: f = () => {
220
221
  },
221
- onButtonAction: f = () => {
222
+ onButtonAction: _ = () => {
222
223
  },
223
224
  carouselProps: g
224
225
  }, b) => {
@@ -238,13 +239,13 @@ const $ = h.div`
238
239
  items: 1,
239
240
  partialVisibilityGutter: 64
240
241
  }
241
- }, d = C();
242
- return /* @__PURE__ */ r($, { ref: b, children: /* @__PURE__ */ r(
242
+ }, d = j();
243
+ return /* @__PURE__ */ r(M, { ref: b, children: /* @__PURE__ */ r(
243
244
  B,
244
245
  {
245
246
  fallbackComponent: p,
246
247
  keyPrefix: "banner-carousel-skeleton",
247
- isLoading: o,
248
+ isLoading: a,
248
249
  children: /* @__PURE__ */ r(
249
250
  w,
250
251
  {
@@ -254,7 +255,7 @@ const $ = h.div`
254
255
  infinite: !d,
255
256
  keyBoardControl: !0,
256
257
  autoPlay: !0,
257
- partialVisible: c,
258
+ partialVisible: s,
258
259
  customTransition: "transform 500ms ease-in-out",
259
260
  sliderClass: "carousel-slider",
260
261
  itemClass: "carousel-item",
@@ -266,13 +267,14 @@ const $ = h.div`
266
267
  "div",
267
268
  {
268
269
  className: "section__card",
269
- onClick: () => _(e),
270
+ onClick: () => f(e),
270
271
  children: [
271
- /* @__PURE__ */ r(
272
+ $(e == null ? void 0 : e.imageComponent) ? e == null ? void 0 : e.imageComponent : /* @__PURE__ */ r(
272
273
  "img",
273
274
  {
274
275
  src: e == null ? void 0 : e.imageUrl,
275
276
  alt: `Slide ${m + 1}`,
277
+ loading: "lazy",
276
278
  className: "section__image"
277
279
  }
278
280
  ),
@@ -282,13 +284,13 @@ const $ = h.div`
282
284
  (e == null ? void 0 : e.title) && /* @__PURE__ */ r("div", { className: "card__description", children: e == null ? void 0 : e.description })
283
285
  ] }),
284
286
  (e == null ? void 0 : e.buttonText) && /* @__PURE__ */ r(
285
- k,
287
+ S,
286
288
  {
287
289
  text: e == null ? void 0 : e.buttonText,
288
290
  className: "card__action",
289
291
  size: "medium",
290
- onClick: (s) => {
291
- s == null || s.stopPropagation(), f(e);
292
+ onClick: (c) => {
293
+ c == null || c.stopPropagation(), _(e);
292
294
  }
293
295
  }
294
296
  )
@@ -304,5 +306,5 @@ const $ = h.div`
304
306
  }
305
307
  );
306
308
  export {
307
- W as default
309
+ F as default
308
310
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.208",
3
+ "version": "4.0.209",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [