@lanaco/lnc-react-ui 4.0.38 → 4.0.40

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.
Files changed (67) hide show
  1. package/dist/BannerSectionBasic.cjs +9 -9
  2. package/dist/BannerSectionBasic.js +20 -20
  3. package/dist/BannerSectionCarousel.cjs +13 -5
  4. package/dist/BannerSectionCarousel.js +29 -21
  5. package/dist/BannerSectionGrid.cjs +1 -1
  6. package/dist/BannerSectionGrid.js +6 -6
  7. package/dist/BannerSectionSimple.cjs +4 -4
  8. package/dist/BannerSectionSimple.js +41 -38
  9. package/dist/BannerSectionWithList.cjs +4 -4
  10. package/dist/BannerSectionWithList.js +17 -17
  11. package/dist/BannerSectionWithListImage.cjs +5 -5
  12. package/dist/BannerSectionWithListImage.js +41 -38
  13. package/dist/BlogsSectionDetailed.cjs +15 -15
  14. package/dist/BlogsSectionDetailed.js +128 -92
  15. package/dist/BlogsSectionLarge.cjs +10 -10
  16. package/dist/BlogsSectionLarge.js +87 -60
  17. package/dist/BlogsSectionSimple.cjs +8 -8
  18. package/dist/BlogsSectionSimple.js +98 -72
  19. package/dist/BlogsSectionSimpleCentered.cjs +10 -10
  20. package/dist/BlogsSectionSimpleCentered.js +76 -46
  21. package/dist/BlogsSectionWithFilters.cjs +11 -11
  22. package/dist/BlogsSectionWithFilters.js +102 -73
  23. package/dist/BrandHitsSection.cjs +12 -7
  24. package/dist/BrandHitsSection.js +10 -5
  25. package/dist/CalorieCalculatorSection.cjs +7 -8
  26. package/dist/CalorieCalculatorSection.js +31 -32
  27. package/dist/CustomLoanMapSection.cjs +2 -2
  28. package/dist/CustomLoanMapSection.js +13 -13
  29. package/dist/DetailedProductsSection.cjs +4 -4
  30. package/dist/DetailedProductsSection.js +66 -57
  31. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +8 -8
  32. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +9 -8
  33. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +14 -6
  34. package/dist/FieldOfInterestsWithTagsCardsSection.js +12 -4
  35. package/dist/GeneralWithTagsCardsSection.cjs +18 -6
  36. package/dist/GeneralWithTagsCardsSection.js +44 -31
  37. package/dist/GiftCardsSection.cjs +9 -5
  38. package/dist/GiftCardsSection.js +21 -17
  39. package/dist/LocationSearchSection.cjs +1 -1
  40. package/dist/LocationSearchSection.js +1 -1
  41. package/dist/MasonryGeneralCardsSection.cjs +21 -1
  42. package/dist/MasonryGeneralCardsSection.js +20 -0
  43. package/dist/OverlayGeneralCardsSection.cjs +60 -104
  44. package/dist/OverlayGeneralCardsSection.js +138 -147
  45. package/dist/ProductsWithBannerSection.cjs +10 -10
  46. package/dist/ProductsWithBannerSection.js +85 -54
  47. package/dist/SalesCampaignsSection.cjs +17 -17
  48. package/dist/SalesCampaignsSection.js +81 -81
  49. package/dist/ShopCardsSection.cjs +19 -9
  50. package/dist/ShopCardsSection.js +54 -40
  51. package/dist/SimpleCategoriesSection.cjs +9 -9
  52. package/dist/SimpleCategoriesSection.js +89 -58
  53. package/dist/SimpleProductsSection.cjs +3 -3
  54. package/dist/SimpleProductsSection.js +86 -55
  55. package/dist/UrgentSaleProductsSection.cjs +5 -5
  56. package/dist/UrgentSaleProductsSection.js +41 -30
  57. package/dist/{index-CT6_7UFb.js → index-5cttM4t7.js} +119 -124
  58. package/dist/{index-CHkb_Sj6.js → index-BT55M3t6.js} +16 -15
  59. package/dist/{index-Dj5wZCVs.cjs → index-DHJmdMN8.cjs} +6 -5
  60. package/dist/index-Dn5tPLgP.cjs +95 -0
  61. package/dist/{style-6tSw9aqK.js → style-CiePxaJ_.js} +6 -6
  62. package/dist/{style-BR3tIhP1.cjs → style-DN1qT8BE.cjs} +6 -6
  63. package/dist/suspense-product-card-detailed-BETmfKMT.js +189 -0
  64. package/dist/{index-vXmvgZ2Y.cjs → suspense-product-card-detailed-DtzOxHaH.cjs} +4 -4
  65. package/package.json +1 -1
  66. package/dist/index-D6g5ZqyJ.js +0 -159
  67. package/dist/index-Q_i-aqsF.cjs +0 -95
@@ -1,11 +1,11 @@
1
- import { jsxs as w, jsx as u } from "react/jsx-runtime";
2
- import { forwardRef as b } from "react";
3
- import { n as h } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
- import { M as y } from "./consts-C1uHV4xc.js";
5
- import { u as k } from "./useDetectMobile-BC6EGaBc.js";
6
- import { S as m } from "./index-CHkb_Sj6.js";
7
- import { T as S } from "./index-DxdBg_r_.js";
8
- const v = h.div`
1
+ import { jsx as r, Fragment as m, jsxs as b } from "react/jsx-runtime";
2
+ import { forwardRef as f, Suspense as y, memo as M, useMemo as v } from "react";
3
+ import { n as U } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
+ import { M as B } from "./consts-C1uHV4xc.js";
5
+ import { u as C } from "./useDetectMobile-BC6EGaBc.js";
6
+ import { S as T, a as _ } from "./index-BT55M3t6.js";
7
+ import { T as $ } from "./index-DxdBg_r_.js";
8
+ const j = U.div`
9
9
  display: grid;
10
10
  grid-template-columns: repeat(6, 1fr);
11
11
  gap: 1.25rem;
@@ -16,7 +16,7 @@ const v = h.div`
16
16
  margin: auto;
17
17
  }
18
18
 
19
- @media (max-width: ${y + "px"}) {
19
+ @media (max-width: ${B + "px"}) {
20
20
  grid-template-columns: repeat(2, 1fr);
21
21
 
22
22
  & .text-block-v1 {
@@ -35,60 +35,91 @@ const v = h.div`
35
35
 
36
36
  }
37
37
  }
38
- `, I = b((l, c) => {
39
- var o;
38
+ `, z = f((i, o) => /* @__PURE__ */ r(T, {})), A = ({ limit: i = 6, isLoading: o = !1, keyPrefix: u }) => /* @__PURE__ */ r(m, { children: Array.from({ length: i }, (l, d) => /* @__PURE__ */ r(
39
+ z,
40
+ {
41
+ isLoading: o
42
+ },
43
+ `${u}-skeleton-product-card-${d}`
44
+ )) }), E = ({
45
+ children: i,
46
+ fallbackComponent: o = /* @__PURE__ */ r(m, {}),
47
+ isLoading: u = !1,
48
+ limit: l,
49
+ keyPrefix: d
50
+ }) => /* @__PURE__ */ r(y, { fallbackComponent: o, children: u === !0 ? /* @__PURE__ */ r(
51
+ A,
52
+ {
53
+ isLoading: u,
54
+ limit: l,
55
+ keyPrefix: d
56
+ }
57
+ ) : i }), p = M(_), O = f((i, o) => {
40
58
  const {
41
- title: d,
42
- subtitle: a,
43
- description: n,
44
- buttonText: s,
45
- buttonLink: p,
46
- items: e,
47
- onButtonAction: g = () => {
59
+ title: u,
60
+ subtitle: l,
61
+ description: d,
62
+ buttonText: g,
63
+ buttonLink: h,
64
+ items: t,
65
+ onButtonAction: S = () => {
48
66
  },
49
- onSelectCard: i = () => {
50
- }
51
- } = l, f = k();
52
- return /* @__PURE__ */ w(v, { ref: c, limit: 6, children: [
53
- /* @__PURE__ */ u(
54
- S,
67
+ onSelectCard: n = () => {
68
+ },
69
+ isLoading: k = !1,
70
+ limit: s = 6
71
+ } = i, w = C(), P = v(() => {
72
+ var a;
73
+ return /* @__PURE__ */ r(m, { children: w === !0 ? (a = t == null ? void 0 : t.slice(0, 4)) == null ? void 0 : a.map((e, c) => /* @__PURE__ */ r(
74
+ p,
55
75
  {
56
- subtitle: a,
57
- title: d,
58
- description: n,
59
- buttonText: s,
60
- buttonLink: p,
61
- onButtonAction: g,
76
+ title: e == null ? void 0 : e.title,
77
+ price: e == null ? void 0 : e.price,
78
+ currency: e == null ? void 0 : e.currency,
79
+ image: e == null ? void 0 : e.image,
80
+ sellerUuid: e == null ? void 0 : e.sellerUuid,
81
+ uuid: e == null ? void 0 : e.uuid,
82
+ onSelectCard: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
83
+ },
84
+ c
85
+ )) : t == null ? void 0 : t.map((e, c) => /* @__PURE__ */ r(
86
+ p,
87
+ {
88
+ title: e == null ? void 0 : e.title,
89
+ price: e == null ? void 0 : e.price,
90
+ currency: e == null ? void 0 : e.currency,
91
+ image: e == null ? void 0 : e.image,
92
+ sellerUuid: e == null ? void 0 : e.sellerUuid,
93
+ uuid: e == null ? void 0 : e.uuid,
94
+ onSelectCard: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
95
+ },
96
+ c
97
+ )) });
98
+ }, [t]);
99
+ return /* @__PURE__ */ b(j, { ref: o, limit: s, children: [
100
+ /* @__PURE__ */ r(
101
+ $,
102
+ {
103
+ subtitle: l,
104
+ title: u,
105
+ description: d,
106
+ buttonText: g,
107
+ buttonLink: h,
108
+ onButtonAction: S,
62
109
  className: "text-block-v1"
63
110
  }
64
111
  ),
65
- f === !0 ? (o = e == null ? void 0 : e.slice(0, 4)) == null ? void 0 : o.map((t, r) => /* @__PURE__ */ u(
66
- m,
67
- {
68
- title: t == null ? void 0 : t.title,
69
- price: t == null ? void 0 : t.price,
70
- currency: t == null ? void 0 : t.currency,
71
- image: t == null ? void 0 : t.image,
72
- sellerUuid: t == null ? void 0 : t.sellerUuid,
73
- uuid: t == null ? void 0 : t.uuid,
74
- onSelectCard: () => i == null ? void 0 : i(t == null ? void 0 : t.uuid)
75
- },
76
- r
77
- )) : e == null ? void 0 : e.map((t, r) => /* @__PURE__ */ u(
78
- m,
112
+ /* @__PURE__ */ r(
113
+ E,
79
114
  {
80
- title: t == null ? void 0 : t.title,
81
- price: t == null ? void 0 : t.price,
82
- currency: t == null ? void 0 : t.currency,
83
- image: t == null ? void 0 : t.image,
84
- sellerUuid: t == null ? void 0 : t.sellerUuid,
85
- uuid: t == null ? void 0 : t.uuid,
86
- onSelectCard: () => i == null ? void 0 : i(t == null ? void 0 : t.uuid)
87
- },
88
- r
89
- ))
115
+ isLoading: k,
116
+ limit: s,
117
+ keyPrefix: "explore-landing",
118
+ children: P
119
+ }
120
+ )
90
121
  ] });
91
122
  });
92
123
  export {
93
- I as default
124
+ O as default
94
125
  };
@@ -1,7 +1,7 @@
1
- "use strict";const i=require("react/jsx-runtime"),m=require("react"),b=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),y=require("./consts-CtNoHdBj.cjs"),S=require("./useDetectMobile-D6d5LpdL.cjs"),k=require("./Button.cjs"),u=require("./index-vXmvgZ2Y.cjs"),j=b.newStyled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),s=require("react"),j=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),k=require("./consts-CtNoHdBj.cjs"),v=require("./useDetectMobile-D6d5LpdL.cjs"),M=require("./Button.cjs"),p=require("./suspense-product-card-detailed-DtzOxHaH.cjs"),P=j.newStyled.div`
2
2
  padding: 1.75rem 3rem;
3
3
  display: grid;
4
- grid-template-columns: ${t=>`repeat(${t.limit||5}, minmax(0, 1fr))`};
4
+ grid-template-columns: ${i=>`repeat(${i.limit||5}, minmax(0, 1fr))`};
5
5
 
6
6
  gap: 2.97rem;
7
7
 
@@ -34,7 +34,7 @@
34
34
  }
35
35
 
36
36
  & .product-card {
37
- max-width: ${t=>`calc(${100/t.desktopCols}% - ${(t.desktopCols-1)*t.columnGapRem/t.desktopCols}rem)`};
37
+ max-width: ${i=>`calc(${100/i.desktopCols}% - ${(i.desktopCols-1)*i.columnGapRem/i.desktopCols}rem)`};
38
38
 
39
39
  animation-duration: 0.2s;
40
40
  animation-name: animate-fade;
@@ -54,7 +54,7 @@
54
54
  }
55
55
  }
56
56
 
57
- @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
57
+ @media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
58
58
  grid-template-columns: repeat(2, 1fr);
59
59
  padding: 2rem 1.25rem;
60
60
  gap: 1.19rem;
@@ -65,4 +65,4 @@
65
65
  & .img-wrapper {
66
66
  }
67
67
  }
68
- `,v=m.forwardRef((t,p)=>{var c;const{items:r,limit:n=5,limitMobile:l=6,onSelectCard:o=()=>{},title:g="Urgent sale",showLessText:f="Show less",showMoreText:h="Show more"}=t,d=S.useDetectMobile(),[a,w]=m.useState(!1);return i.jsxs(j,{ref:p,limit:n,children:[i.jsxs("div",{className:"urgent-tag",children:[i.jsx("i",{className:"mng mng-lnc-bolt-filled"}),i.jsx("span",{children:g})]}),d===!0?(c=r==null?void 0:r.slice(0,a===!0?r==null?void 0:r.length:l))==null?void 0:c.map((e,s)=>i.jsx(u.DetailedProductCard,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,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,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},s)):r==null?void 0:r.slice(0,n).map((e,s)=>i.jsx(u.DetailedProductCard,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,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,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},s)),d===!0&&l<(r==null?void 0:r.length)&&i.jsx(k,{className:"show-more",btnType:"basic",type:"button",color:"gray",onClick:()=>w(!a),children:a===!0?f:h})]})});module.exports=v;
68
+ `,u=s.memo(p.DetailedProductCard),q=s.forwardRef((i,g)=>{const{items:r,limit:a=5,limitMobile:d=6,onSelectCard:o=()=>{},title:f="Urgent sale",showLessText:h="Show less",showMoreText:w="Show more",isLoading:b=!1}=i,c=v.useDetectMobile(),[n,y]=s.useState(!1),S=s.useMemo(()=>{var m;return t.jsx(t.Fragment,{children:c===!0?(m=r==null?void 0:r.slice(0,n===!0?r==null?void 0:r.length:d))==null?void 0:m.map((e,l)=>t.jsx(u,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,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,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},l)):r==null?void 0:r.slice(0,a).map((e,l)=>t.jsx(u,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,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,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},l))})},[r]);return t.jsxs(P,{ref:g,limit:a,children:[t.jsxs("div",{className:"urgent-tag",children:[t.jsx("i",{className:"mng mng-lnc-bolt-filled"}),t.jsx("span",{children:f})]}),t.jsx(p.SuspenseDetailedProductCard,{isLoading:b,limit:a,keyPrefix:"explore-landing",children:S}),c===!0&&d<(r==null?void 0:r.length)&&t.jsx(M,{className:"show-more",btnType:"basic",type:"button",color:"gray",onClick:()=>y(!n),children:n===!0?h:w})]})});module.exports=q;
@@ -1,11 +1,11 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as b, useState as y } from "react";
3
- import { n as S } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
- import { M as k } from "./consts-C1uHV4xc.js";
5
- import { u as v } from "./useDetectMobile-BC6EGaBc.js";
6
- import M from "./Button.js";
7
- import { D as u } from "./index-D6g5ZqyJ.js";
8
- const U = S.div`
1
+ import { jsx as o, Fragment as S, jsxs as c } from "react/jsx-runtime";
2
+ import { memo as k, forwardRef as v, useState as M, useMemo as P } from "react";
3
+ import { n as C } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
+ import { M as U } from "./consts-C1uHV4xc.js";
5
+ import { u as $ } from "./useDetectMobile-BC6EGaBc.js";
6
+ import D from "./Button.js";
7
+ import { D as j, S as z } from "./suspense-product-card-detailed-BETmfKMT.js";
8
+ const L = C.div`
9
9
  padding: 1.75rem 3rem;
10
10
  display: grid;
11
11
  grid-template-columns: ${(i) => `repeat(${i.limit || 5}, minmax(0, 1fr))`};
@@ -61,7 +61,7 @@ const U = S.div`
61
61
  }
62
62
  }
63
63
 
64
- @media (max-width: ${k + "px"}) {
64
+ @media (max-width: ${U + "px"}) {
65
65
  grid-template-columns: repeat(2, 1fr);
66
66
  padding: 2rem 1.25rem;
67
67
  gap: 1.19rem;
@@ -72,24 +72,20 @@ const U = S.div`
72
72
  & .img-wrapper {
73
73
  }
74
74
  }
75
- `, A = b((i, p) => {
76
- var d;
75
+ `, u = k(j), R = v((i, p) => {
77
76
  const {
78
77
  items: r,
79
- limit: n = 5,
80
- limitMobile: s = 6,
78
+ limit: a = 5,
79
+ limitMobile: l = 6,
81
80
  onSelectCard: t = () => {
82
81
  },
83
82
  title: g = "Urgent sale",
84
83
  showLessText: f = "Show less",
85
- showMoreText: h = "Show more"
86
- } = i, m = v(), [a, w] = y(!1);
87
- return /* @__PURE__ */ c(U, { ref: p, limit: n, children: [
88
- /* @__PURE__ */ c("div", { className: "urgent-tag", children: [
89
- /* @__PURE__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
90
- /* @__PURE__ */ o("span", { children: g })
91
- ] }),
92
- m === !0 ? (d = r == null ? void 0 : r.slice(0, a === !0 ? r == null ? void 0 : r.length : s)) == null ? void 0 : d.map((e, l) => /* @__PURE__ */ o(
84
+ showMoreText: h = "Show more",
85
+ isLoading: w = !1
86
+ } = i, d = $(), [n, b] = M(!1), y = P(() => {
87
+ var m;
88
+ return /* @__PURE__ */ o(S, { children: d === !0 ? (m = r == null ? void 0 : r.slice(0, n === !0 ? r == null ? void 0 : r.length : l)) == null ? void 0 : m.map((e, s) => /* @__PURE__ */ o(
93
89
  u,
94
90
  {
95
91
  title: e == null ? void 0 : e.title,
@@ -101,8 +97,8 @@ const U = S.div`
101
97
  isSponsored: e == null ? void 0 : e.isSponsored,
102
98
  onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
103
99
  },
104
- l
105
- )) : r == null ? void 0 : r.slice(0, n).map((e, l) => /* @__PURE__ */ o(
100
+ s
101
+ )) : r == null ? void 0 : r.slice(0, a).map((e, s) => /* @__PURE__ */ o(
106
102
  u,
107
103
  {
108
104
  title: e == null ? void 0 : e.title,
@@ -115,21 +111,36 @@ const U = S.div`
115
111
  isSponsored: e == null ? void 0 : e.isSponsored,
116
112
  onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
117
113
  },
118
- l
119
- )),
120
- m === !0 && s < (r == null ? void 0 : r.length) && /* @__PURE__ */ o(
121
- M,
114
+ s
115
+ )) });
116
+ }, [r]);
117
+ return /* @__PURE__ */ c(L, { ref: p, limit: a, children: [
118
+ /* @__PURE__ */ c("div", { className: "urgent-tag", children: [
119
+ /* @__PURE__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
120
+ /* @__PURE__ */ o("span", { children: g })
121
+ ] }),
122
+ /* @__PURE__ */ o(
123
+ z,
124
+ {
125
+ isLoading: w,
126
+ limit: a,
127
+ keyPrefix: "explore-landing",
128
+ children: y
129
+ }
130
+ ),
131
+ d === !0 && l < (r == null ? void 0 : r.length) && /* @__PURE__ */ o(
132
+ D,
122
133
  {
123
134
  className: "show-more",
124
135
  btnType: "basic",
125
136
  type: "button",
126
137
  color: "gray",
127
- onClick: () => w(!a),
128
- children: a === !0 ? f : h
138
+ onClick: () => b(!n),
139
+ children: n === !0 ? f : h
129
140
  }
130
141
  )
131
142
  ] });
132
143
  });
133
144
  export {
134
- A as default
145
+ R as default
135
146
  };