@lanaco/lnc-react-ui 4.0.26 → 4.0.28

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.
package/dist/index4.cjs CHANGED
@@ -1,68 +1,65 @@
1
- "use strict";const i=require("react/jsx-runtime"),m=require("react"),b=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),y=require("./consts-dNz9tpt4.cjs"),S=require("./useDetectMobile-rBe0FiP2.cjs"),k=require("./Button.cjs"),u=require("./index-LdP7U1Yl.cjs"),j=b.newStyled.div`
2
- padding: 1.75rem 3rem;
3
- display: grid;
4
- grid-template-columns: ${t=>`repeat(${t.limit||5}, minmax(0, 1fr))`};
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("react"),s=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),c=require("./consts-dNz9tpt4.cjs"),u=require("./Button.cjs"),t=require("./utils-CE6bljYe.cjs"),h=s.newStyled.div`
2
+ padding-bottom: 1.38rem;
3
+ text-align: center;
4
+ display: flex;
5
+ justify-content: center;
6
+ flex-direction: column;
7
+ gap: 2rem;
8
+ align-items: center;
5
9
 
6
- gap: 2.97rem;
7
-
8
- border: 1.5px solid var(--danger-600, #e11d48);
9
- background-color: var(--danger-50, #fff1f2);
10
- position: relative;
11
- border-radius: 0.75rem;
12
- position: relative;
13
-
14
- & .urgent-tag {
15
- position: absolute;
16
- left: 1rem;
17
- top: -0.75rem;
18
- min-height: 1.5rem;
19
- max-height: 1.5rem;
20
- border-radius: 0.375rem;
21
- display: flex;
22
- align-items: center;
23
- justify-content: center;
24
- padding: 0 0.25rem;
25
- gap: 0.12rem;
26
- font-weight: 500;
27
- font-size: 0.875rem;
28
- color: var(--white, #fff);
29
- background-color: var(--danger-600, #e11d48);
10
+ & button {
11
+ width: fit-content;
30
12
  }
31
13
 
32
- & .show-more {
33
- grid-column: 1 / 3;
14
+ @media (max-width: ${c.MOBILE_SIZE_PX+"px"}) {
15
+ padding-bottom: 0;
34
16
  }
17
+ `,g=s.newStyled.div`
18
+ text-align: center;
19
+ display: flex;
20
+ justify-content: center;
21
+ flex-direction: column;
22
+ gap: 0.25rem;
35
23
 
36
- & .product-card {
37
- max-width: ${t=>`calc(${100/t.desktopCols}% - ${(t.desktopCols-1)*t.columnGapRem/t.desktopCols}rem)`};
24
+ & .header-title {
25
+ font-size: 1.5rem;
26
+ font-weight: 600;
27
+ }
38
28
 
39
- animation-duration: 0.2s;
40
- animation-name: animate-fade;
41
- animation-delay: 0.2s;
42
- animation-fill-mode: backwards;
43
- transition: all 0.25s ease;
29
+ & .header-subtitle {
30
+ color: var(--gray-600, #676e79);
31
+ font-size: 1rem;
32
+ font-weight: 500;
33
+ }
44
34
 
45
- @keyframes animate-fade {
46
- 0% {
47
- transform: scale(0.9);
48
- -webkit-transform: scale(0.9);
49
- }
50
- 100% {
51
- transform: scale(1);
52
- -webkit-transform: scale(1);
53
- }
54
- }
35
+ @media (max-width: ${c.MOBILE_SIZE_PX+"px"}) {
55
36
  }
37
+ `,p=s.newStyled.div`
38
+ text-align: center;
39
+ display: flex;
40
+ flex-direction: column;
41
+ justify-content: center;
42
+ gap: 0.75rem;
43
+ font-size: 0.875rem;
44
+ font-weight: 500;
45
+ align-items: center;
56
46
 
57
- @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
58
- grid-template-columns: repeat(2, 1fr);
59
- padding: 2rem 1.25rem;
60
- gap: 1.19rem;
47
+ & .list-item {
48
+ display: flex;
49
+ align-items: center;
61
50
 
62
- & .urgent-tag {
51
+ & .mng {
52
+ font-size: 1.25rem;
53
+ color: var(--success-600);
63
54
  }
55
+ }
64
56
 
65
- & .img-wrapper {
57
+ @media (max-width: ${c.MOBILE_SIZE_PX+"px"}) {
58
+ & .list-item {
59
+ flex-direction: column;
60
+ text-align: center;
61
+ justify-content: center;
62
+ gap: 0;
66
63
  }
67
64
  }
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;
65
+ `,j=o.forwardRef((a,y)=>{const{title:i,subtitle:n,buttonText:d,list:r,fallback:m=()=>{},onBannerClick:l}=a;return e.jsxs(h,{children:[(t.isDefined(i)||t.isDefined(n))&&e.jsxs(g,{children:[t.isDefined(i)&&e.jsx("div",{className:"header-title",children:i}),t.isDefined(n)&&e.jsx("div",{className:"header-subitle",children:n})]}),e.jsx(p,{children:r==null?void 0:r.map((x,f)=>e.jsx(o.Fragment,{children:e.jsxs("div",{className:"list-item",children:[e.jsx("i",{className:"mng mng-lnc-checkmark--filled"}),e.jsx("span",{children:x})]})},f))}),e.jsx(u,{size:"medium",color:"neutral",type:"button",onClick:()=>t.isDefined(l)?l():m(),children:d})]})});module.exports=j;
package/dist/index4.js CHANGED
@@ -1,135 +1,104 @@
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-BiK8DcgW.js";
4
- import { M as k } from "./consts-DNVz1x1I.js";
5
- import { u as v } from "./useDetectMobile-BookNOsk.js";
6
- import M from "./Button.js";
7
- import { D as u } from "./index-jVpIwR2G.js";
8
- const U = S.div`
9
- padding: 1.75rem 3rem;
10
- display: grid;
11
- grid-template-columns: ${(i) => `repeat(${i.limit || 5}, minmax(0, 1fr))`};
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as h, Fragment as x } from "react";
3
+ import { n as o } from "./emotion-styled.browser.esm-BiK8DcgW.js";
4
+ import { M as a } from "./consts-DNVz1x1I.js";
5
+ import g from "./Button.js";
6
+ import { l as t } from "./utils-DtEdJZWa.js";
7
+ const u = o.div`
8
+ padding-bottom: 1.38rem;
9
+ text-align: center;
10
+ display: flex;
11
+ justify-content: center;
12
+ flex-direction: column;
13
+ gap: 2rem;
14
+ align-items: center;
12
15
 
13
- gap: 2.97rem;
14
-
15
- border: 1.5px solid var(--danger-600, #e11d48);
16
- background-color: var(--danger-50, #fff1f2);
17
- position: relative;
18
- border-radius: 0.75rem;
19
- position: relative;
20
-
21
- & .urgent-tag {
22
- position: absolute;
23
- left: 1rem;
24
- top: -0.75rem;
25
- min-height: 1.5rem;
26
- max-height: 1.5rem;
27
- border-radius: 0.375rem;
28
- display: flex;
29
- align-items: center;
30
- justify-content: center;
31
- padding: 0 0.25rem;
32
- gap: 0.12rem;
33
- font-weight: 500;
34
- font-size: 0.875rem;
35
- color: var(--white, #fff);
36
- background-color: var(--danger-600, #e11d48);
16
+ & button {
17
+ width: fit-content;
37
18
  }
38
19
 
39
- & .show-more {
40
- grid-column: 1 / 3;
20
+ @media (max-width: ${a + "px"}) {
21
+ padding-bottom: 0;
41
22
  }
23
+ `, y = o.div`
24
+ text-align: center;
25
+ display: flex;
26
+ justify-content: center;
27
+ flex-direction: column;
28
+ gap: 0.25rem;
42
29
 
43
- & .product-card {
44
- max-width: ${(i) => `calc(${100 / i.desktopCols}% - ${(i.desktopCols - 1) * i.columnGapRem / i.desktopCols}rem)`};
30
+ & .header-title {
31
+ font-size: 1.5rem;
32
+ font-weight: 600;
33
+ }
45
34
 
46
- animation-duration: 0.2s;
47
- animation-name: animate-fade;
48
- animation-delay: 0.2s;
49
- animation-fill-mode: backwards;
50
- transition: all 0.25s ease;
35
+ & .header-subtitle {
36
+ color: var(--gray-600, #676e79);
37
+ font-size: 1rem;
38
+ font-weight: 500;
39
+ }
51
40
 
52
- @keyframes animate-fade {
53
- 0% {
54
- transform: scale(0.9);
55
- -webkit-transform: scale(0.9);
56
- }
57
- 100% {
58
- transform: scale(1);
59
- -webkit-transform: scale(1);
60
- }
61
- }
41
+ @media (max-width: ${a + "px"}) {
62
42
  }
43
+ `, b = o.div`
44
+ text-align: center;
45
+ display: flex;
46
+ flex-direction: column;
47
+ justify-content: center;
48
+ gap: 0.75rem;
49
+ font-size: 0.875rem;
50
+ font-weight: 500;
51
+ align-items: center;
63
52
 
64
- @media (max-width: ${k + "px"}) {
65
- grid-template-columns: repeat(2, 1fr);
66
- padding: 2rem 1.25rem;
67
- gap: 1.19rem;
53
+ & .list-item {
54
+ display: flex;
55
+ align-items: center;
68
56
 
69
- & .urgent-tag {
57
+ & .mng {
58
+ font-size: 1.25rem;
59
+ color: var(--success-600);
70
60
  }
61
+ }
71
62
 
72
- & .img-wrapper {
63
+ @media (max-width: ${a + "px"}) {
64
+ & .list-item {
65
+ flex-direction: column;
66
+ text-align: center;
67
+ justify-content: center;
68
+ gap: 0;
73
69
  }
74
70
  }
75
- `, A = b((i, p) => {
76
- var d;
71
+ `, N = h((m, w) => {
77
72
  const {
78
- items: r,
79
- limit: n = 5,
80
- limitMobile: s = 6,
81
- onSelectCard: t = () => {
73
+ title: i,
74
+ subtitle: n,
75
+ buttonText: s,
76
+ list: r,
77
+ fallback: d = () => {
82
78
  },
83
- title: g = "Urgent sale",
84
- 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 })
79
+ onBannerClick: c
80
+ } = m;
81
+ return /* @__PURE__ */ l(u, { children: [
82
+ (t(i) || t(n)) && /* @__PURE__ */ l(y, { children: [
83
+ t(i) && /* @__PURE__ */ e("div", { className: "header-title", children: i }),
84
+ t(n) && /* @__PURE__ */ e("div", { className: "header-subitle", children: n })
91
85
  ] }),
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(
93
- u,
94
- {
95
- title: e == null ? void 0 : e.title,
96
- price: e == null ? void 0 : e.price,
97
- currency: e == null ? void 0 : e.currency,
98
- image: e == null ? void 0 : e.image,
99
- sellerUuid: e == null ? void 0 : e.sellerUuid,
100
- uuid: e == null ? void 0 : e.uuid,
101
- isSponsored: e == null ? void 0 : e.isSponsored,
102
- onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
103
- },
104
- l
105
- )) : r == null ? void 0 : r.slice(0, n).map((e, l) => /* @__PURE__ */ o(
106
- u,
107
- {
108
- title: e == null ? void 0 : e.title,
109
- price: e == null ? void 0 : e.price,
110
- currency: e == null ? void 0 : e.currency,
111
- image: e == null ? void 0 : e.image,
112
- sellerUuid: e == null ? void 0 : e.sellerUuid,
113
- uuid: e == null ? void 0 : e.uuid,
114
- location: e == null ? void 0 : e.location,
115
- isSponsored: e == null ? void 0 : e.isSponsored,
116
- onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
117
- },
118
- l
119
- )),
120
- m === !0 && s < (r == null ? void 0 : r.length) && /* @__PURE__ */ o(
121
- M,
86
+ /* @__PURE__ */ e(b, { children: r == null ? void 0 : r.map((f, p) => /* @__PURE__ */ e(x, { children: /* @__PURE__ */ l("div", { className: "list-item", children: [
87
+ /* @__PURE__ */ e("i", { className: "mng mng-lnc-checkmark--filled" }),
88
+ /* @__PURE__ */ e("span", { children: f })
89
+ ] }) }, p)) }),
90
+ /* @__PURE__ */ e(
91
+ g,
122
92
  {
123
- className: "show-more",
124
- btnType: "basic",
93
+ size: "medium",
94
+ color: "neutral",
125
95
  type: "button",
126
- color: "gray",
127
- onClick: () => w(!a),
128
- children: a === !0 ? f : h
96
+ onClick: () => t(c) ? c() : d(),
97
+ children: s
129
98
  }
130
99
  )
131
100
  ] });
132
101
  });
133
102
  export {
134
- A as default
103
+ N as default
135
104
  };
package/dist/index5.cjs CHANGED
@@ -1,48 +1,82 @@
1
- "use strict";const t=require("react/jsx-runtime"),p=require("react"),j=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),w=require("./consts-dNz9tpt4.cjs"),f=require("./useDetectMobile-rBe0FiP2.cjs"),m=require("./index-C2M7QHPq.cjs"),k=j.newStyled.div`
2
- display: grid;
3
- grid-template-columns: repeat(2, 1fr);
4
- gap: 0;
1
+ "use strict";const i=require("react/jsx-runtime"),o=require("react"),t=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),r=require("./consts-dNz9tpt4.cjs"),b=require("./Button.cjs"),w=t.newStyled.div`
2
+ display: flex;
3
+ border-radius: 0.75rem;
4
+ background-color: ${e=>e.bgcolor||"transparent"};
5
+ overflow: hidden;
5
6
 
6
- & .text-item {
7
- max-height: ${e=>e.height};
8
- min-height: ${e=>e.height};
9
- max-width: 27rem;
10
- margin: auto;
7
+ & button {
8
+ width: fit-content;
11
9
  }
12
10
 
13
11
  & img {
14
12
  object-fit: cover;
15
- width: 100%;
16
- max-height: ${e=>e.height};
17
- min-height: ${e=>e.height};
13
+ max-width: ${e=>e.imgW||"33.39346rem"};
14
+ min-width: ${e=>e.imgW||"33.39346rem"};
15
+ max-height: ${e=>e.imgH||"22.5rem"};
16
+ min-height: ${e=>e.imgH||"22.5rem"};
18
17
  }
19
18
 
20
- & .img-1 {
21
- border-radius: 0.75rem 0.75rem 0.75rem 0;
19
+ ${e=>e.hasBorder===!0&&`border: 1px solid var(--gray-95008, rgba(20, 22, 26, 0.08));
20
+ box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
21
+
22
+ `}
23
+
24
+ @media (max-width: ${r.MOBILE_SIZE_PX+"px"}) {
25
+ flex-direction: column;
26
+ & img {
27
+ max-width: 100%;
28
+ min-width: 100%;
29
+ max-height: ${e=>e.imgHMob||"12.1rem"};
30
+ min-height: ${e=>e.imgHMob||"12.1rem"};
31
+ }
22
32
  }
33
+ `,y=t.newStyled.div`
34
+ padding: 2rem;
35
+ display: flex;
36
+ gap: 1.25rem;
37
+ justify-content: space-between;
38
+ flex: 1;
39
+ flex-direction: column;
23
40
 
24
- & .img-2 {
25
- border-radius: 0.75rem 0rem 0.75rem 0.75rem;
41
+ @media (max-width: ${r.MOBILE_SIZE_PX+"px"}) {
42
+ padding: 1.25rem;
26
43
  }
44
+ `,j=t.newStyled.div`
45
+ display: flex;
46
+ flex-direction: column;
47
+ gap: 0.25rem;
27
48
 
28
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
29
- grid-template-columns: repeat(1, 1fr);
30
- gap: 1.5rem;
49
+ & .header-title {
50
+ font-size: 1.5rem;
51
+ font-weight: 600;
52
+ }
31
53
 
32
- & .img-item {
33
- width: 100%;
34
- min-height: 11.25rem;
35
- max-height: 11.25rem;
36
- }
54
+ & .header-subtitle {
55
+ color: var(--gray-600, #676e79);
56
+ font-size: 1rem;
57
+ font-weight: 500;
58
+ }
37
59
 
38
- & .img1,
39
- .img2 {
40
- border-radius: 0.75rem;
41
- }
60
+ @media (max-width: ${r.MOBILE_SIZE_PX+"px"}) {
61
+ flex-direction: column;
62
+ }
63
+ `,v=t.newStyled.div`
64
+ display: flex;
65
+ flex-direction: column;
66
+ gap: 0.75rem;
67
+ font-size: 0.875rem;
68
+ font-weight: 500;
69
+
70
+ & .list-item {
71
+ display: flex;
72
+ align-items: center;
42
73
 
43
- & .text-item {
44
- min-height: unset;
45
- max-height: unset;
74
+ & .mng {
75
+ font-size: 1.25rem;
76
+ color: var(--info-600);
46
77
  }
47
78
  }
48
- `,q=p.forwardRef((e,T)=>{const{image1:s,image2:i,title1:n,title2:o,text1:g,text2:a,subtitle1:c,subtitle2:u,buttonText1:h,buttonText2:x,buttonLink1:l,buttonLink2:d,rowHeight:b="12.65625rem"}=e,r=f.useDetectMobile();return t.jsxs(k,{height:b,children:[t.jsx(m.TextBlockV1,{className:"text-item",title:n,subtitle:c,description:g,buttonText:h,buttonLink:l}),t.jsx("img",{className:"img-item img-1",src:s}),r!==!0&&t.jsx("img",{className:"img-item img-2",src:i}),t.jsx(m.TextBlockV1,{className:"text-item",title:o,subtitle:u,description:a,buttonText:x,buttonLink:d}),r===!0&&t.jsx("img",{className:"img-item img-2",src:i})]})});module.exports=q;
79
+
80
+ @media (max-width: ${r.MOBILE_SIZE_PX+"px"}) {
81
+ }
82
+ `,$=o.forwardRef((e,S)=>{const{title:a,subtitle:m,buttonText:s,list:n,image:d,imageHeight:l,imageWidth:c,imageHeightMob:x,hasBorder:g=!0,backgroundColor:h="transparent",onBannerClick:p}=e;return i.jsxs(w,{imgH:l,imgW:c,imgHMob:x,hasBorder:g,bgColor:h,children:[i.jsxs(y,{children:[i.jsxs(j,{children:[i.jsx("div",{className:"header-title",children:a}),i.jsx("div",{className:"header-subitle",children:m})]}),i.jsx(v,{children:n==null?void 0:n.map((u,f)=>i.jsx(o.Fragment,{children:i.jsxs("div",{className:"list-item",children:[i.jsx("i",{className:"mng mng-lnc-checkmark--filled"}),i.jsx("span",{children:u})]})},f))}),i.jsx(b,{size:"medium",color:"gray",type:"button",btnType:"outline",onClick:p,children:s})]}),i.jsx("img",{src:d})]})});module.exports=$;