@lanaco/lnc-react-ui 4.0.25 → 4.0.26

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/index8.cjs CHANGED
@@ -1,150 +1,82 @@
1
- "use strict";const r=require("react/jsx-runtime"),c=require("react"),x=require("./Button.cjs"),s=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),i=require("./utils-CE6bljYe.cjs"),h=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),m=require("./consts-dNz9tpt4.cjs"),f=s.newStyled.div`
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
2
  display: flex;
3
- flex-direction: column;
4
- align-items: flex-start;
5
3
  border-radius: 0.75rem;
6
- position: relative;
7
- box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
8
-
9
- grid-column: ${t=>{var e;return((e=t.position)==null?void 0:e.columnStart)||"1"}} /
10
- ${t=>{var e;return((e=t.position)==null?void 0:e.columnEnd)||"6"}};
11
- grid-row: ${t=>{var e;return((e=t.position)==null?void 0:e.rowStart)||"1"}} /
12
- ${t=>{var e;return((e=t.position)==null?void 0:e.rowEnd)||"1"}};
4
+ background-color: ${e=>e.bgcolor||"transparent"};
5
+ overflow: hidden;
13
6
 
14
- & .wrapper__image {
15
- height: 100%;
16
- width: 100%;
17
- object-fit: cover;
18
- border-radius: 0.75rem;
7
+ & button {
8
+ width: fit-content;
19
9
  }
20
10
 
21
- & .wrapper__image--skeleton {
22
- width: 24.5rem;
23
- height: 30rem;
24
- border-radius: 0.75rem;
25
- background-color: ${i.linearGradientAnimation("-90deg")};
11
+ & img {
12
+ object-fit: cover;
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"};
26
17
  }
27
18
 
28
- & .wrapper__text {
29
- display: flex;
30
- flex-direction: column;
31
- align-items: flex-start;
32
- padding: 1rem;
33
- position: absolute;
34
- bottom: 0;
35
- left: 0;
36
- gap: 0.75rem;
37
-
38
- & .text__title {
39
- color: var(--white, #ffffff);
40
- font-size: 1rem;
41
- font-style: normal;
42
- font-weight: 500;
43
- line-height: 1.5rem;
44
- ${i.truncateTextInRows(2)}
45
- }
46
-
47
- & .text__tag {
48
- background-color: var(--warning-600, #d97706);
49
- color: var(--white, #ffffff);
50
- font-size: 0.875rem;
51
- font-style: normal;
52
- font-weight: 500;
53
- line-height: 1.25rem;
54
- padding: 0.25rem 0.5rem;
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);
55
21
 
56
- border-radius: 0.375rem;
57
- background: var(--warning-600, #d97706);
58
- }
59
-
60
- & .text__description {
61
- color: var(--white);
62
- font-size: 0.875rem;
63
- font-style: normal;
64
- font-weight: 400;
65
- line-height: 1.25rem;
66
- ${i.truncateTextInRows(2)}
67
- }
22
+ `}
68
23
 
69
- & .text__action {
70
- background: var(--white);
71
- color: var(--black);
72
-
73
- &:hover {
74
- background: var(--primary-500, #f59e0b);
75
- color: var(--white);
76
- }
77
- }
78
-
79
- & .text__title--skeleton {
80
- background-color: ${i.linearGradientAnimation("-90deg")};
81
- height: 1rem;
82
- width: 9rem;
83
- }
84
-
85
- & .text__description--skeleton {
86
- background-color: ${i.linearGradientAnimation("-90deg")};
87
- height: 1rem;
88
- width: 12rem;
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"};
89
31
  }
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;
90
40
 
91
- & .text__action--skeleton {
92
- background-color: ${i.linearGradientAnimation("-90deg")};
93
- height: 2rem;
94
- width: 9rem;
95
- }
41
+ @media (max-width: ${r.MOBILE_SIZE_PX+"px"}) {
42
+ padding: 1.25rem;
96
43
  }
97
- `,u=c.forwardRef(({title:t,image:e,description:n,actionText:o,onSelectCard:a=()=>{},className:l,position:g,tag:d},y)=>{const p=h.useTheme();return r.jsx(r.Fragment,{children:r.jsxs(f,{theme:p,className:l,onClick:a,position:g,children:[r.jsx("img",{src:e,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__text",children:[d&&r.jsx("div",{className:"text__tag",children:d}),r.jsx("div",{className:"text__title",children:t}),i.isDefinedNotEmptyString(n)&&r.jsx("div",{className:"text__description",children:n}),i.isDefinedNotEmptyString(o)&&r.jsx(x,{text:o,onClick:a,className:"text__action"})]})]})})}),_=s.newStyled.div`
44
+ `,j=t.newStyled.div`
98
45
  display: flex;
99
46
  flex-direction: column;
100
- gap: 1.5rem;
47
+ gap: 0.25rem;
101
48
 
102
- & .regular-title {
103
- display: flex;
104
- gap: 0.5rem;
105
- align-items: center;
106
- justify-content: space-between;
49
+ & .header-title {
107
50
  font-size: 1.5rem;
108
51
  font-weight: 600;
109
- & .regular-title-text {
110
- display: flex;
111
- gap: 0.5rem;
112
- align-items: center;
113
- }
52
+ }
114
53
 
115
- & i {
116
- font-size: 1.5rem;
117
- color: var(--primary-500, #f59e0b);
118
- }
54
+ & .header-subtitle {
55
+ color: var(--gray-600, #676e79);
56
+ font-size: 1rem;
57
+ font-weight: 500;
119
58
  }
120
59
 
121
- @media (max-width: ${m.MOBILE_SIZE_PX+"px"}) {
122
- gap: 1.25rem;
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;
123
69
 
124
- & .regular-title {
125
- font-size: 1.375rem;
70
+ & .list-item {
71
+ display: flex;
72
+ align-items: center;
126
73
 
127
- &.center {
128
- justify-content: center;
129
- }
74
+ & .mng {
75
+ font-size: 1.25rem;
76
+ color: var(--info-600);
130
77
  }
131
78
  }
132
- `,w=s.newStyled.div`
133
- display: grid;
134
- grid-template-columns: repeat(12, 1fr);
135
- grid-template-rows: 15rem 15rem;
136
- grid-column-gap: 1.25rem;
137
- grid-row-gap: 1.25rem;
138
- height: 30rem;
139
- max-height: 30rem;
140
79
 
141
- @media (max-width: ${m.MOBILE_SIZE_PX+"px"}) {
142
- display: flex;
143
- flex-direction: column;
144
- gap: 1rem;
145
- width: 100%;
146
- height: 100%;
147
- max-height: 100%;
148
- padding: 0 1rem;
80
+ @media (max-width: ${r.MOBILE_SIZE_PX+"px"}) {
149
81
  }
150
- `,b=c.forwardRef(({title:t,items:e,limit:n=3},o)=>r.jsxs(_,{children:[r.jsx("div",{className:"regular-title",children:r.jsx("div",{className:"regular-title-text",children:r.jsx("span",{children:t})})}),r.jsx(w,{limit:n,children:e&&(e==null?void 0:e.map((a,l)=>r.jsx(u,{...a},`landing-page-masonry-general-card__${l+1}`)))})]}));module.exports=b;
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=$;
package/dist/index8.js CHANGED
@@ -1,222 +1,138 @@
1
- import { jsx as t, Fragment as u, jsxs as m } from "react/jsx-runtime";
2
- import { forwardRef as p } from "react";
3
- import _ from "./Button.js";
4
- import { n as d } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
- import { m as o, t as c, k as g } from "./utils-DtEdJZWa.js";
6
- import { u as w } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
7
- import { M as f } from "./consts-DNVz1x1I.js";
8
- const b = d.div`
1
+ import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as u, Fragment as w } from "react";
3
+ import { n as t } from "./emotion-styled.browser.esm-BiK8DcgW.js";
4
+ import { M as n } from "./consts-DNVz1x1I.js";
5
+ import v from "./Button.js";
6
+ const y = t.div`
9
7
  display: flex;
10
- flex-direction: column;
11
- align-items: flex-start;
12
8
  border-radius: 0.75rem;
13
- position: relative;
14
- box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
15
-
16
- grid-column: ${(r) => {
17
- var e;
18
- return ((e = r.position) == null ? void 0 : e.columnStart) || "1";
19
- }} /
20
- ${(r) => {
21
- var e;
22
- return ((e = r.position) == null ? void 0 : e.columnEnd) || "6";
23
- }};
24
- grid-row: ${(r) => {
25
- var e;
26
- return ((e = r.position) == null ? void 0 : e.rowStart) || "1";
27
- }} /
28
- ${(r) => {
29
- var e;
30
- return ((e = r.position) == null ? void 0 : e.rowEnd) || "1";
31
- }};
9
+ background-color: ${(e) => e.bgcolor || "transparent"};
10
+ overflow: hidden;
32
11
 
33
- & .wrapper__image {
34
- height: 100%;
35
- width: 100%;
36
- object-fit: cover;
37
- border-radius: 0.75rem;
12
+ & button {
13
+ width: fit-content;
38
14
  }
39
15
 
40
- & .wrapper__image--skeleton {
41
- width: 24.5rem;
42
- height: 30rem;
43
- border-radius: 0.75rem;
44
- background-color: ${o("-90deg")};
16
+ & img {
17
+ object-fit: cover;
18
+ max-width: ${(e) => e.imgW || "33.39346rem"};
19
+ min-width: ${(e) => e.imgW || "33.39346rem"};
20
+ max-height: ${(e) => e.imgH || "22.5rem"};
21
+ min-height: ${(e) => e.imgH || "22.5rem"};
45
22
  }
46
23
 
47
- & .wrapper__text {
48
- display: flex;
49
- flex-direction: column;
50
- align-items: flex-start;
51
- padding: 1rem;
52
- position: absolute;
53
- bottom: 0;
54
- left: 0;
55
- gap: 0.75rem;
56
-
57
- & .text__title {
58
- color: var(--white, #ffffff);
59
- font-size: 1rem;
60
- font-style: normal;
61
- font-weight: 500;
62
- line-height: 1.5rem;
63
- ${c(2)}
64
- }
24
+ ${(e) => e.hasBorder === !0 && `border: 1px solid var(--gray-95008, rgba(20, 22, 26, 0.08));
25
+ box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
65
26
 
66
- & .text__tag {
67
- background-color: var(--warning-600, #d97706);
68
- color: var(--white, #ffffff);
69
- font-size: 0.875rem;
70
- font-style: normal;
71
- font-weight: 500;
72
- line-height: 1.25rem;
73
- padding: 0.25rem 0.5rem;
74
-
75
- border-radius: 0.375rem;
76
- background: var(--warning-600, #d97706);
77
- }
78
-
79
- & .text__description {
80
- color: var(--white);
81
- font-size: 0.875rem;
82
- font-style: normal;
83
- font-weight: 400;
84
- line-height: 1.25rem;
85
- ${c(2)}
86
- }
87
-
88
- & .text__action {
89
- background: var(--white);
90
- color: var(--black);
91
-
92
- &:hover {
93
- background: var(--primary-500, #f59e0b);
94
- color: var(--white);
95
- }
96
- }
97
-
98
- & .text__title--skeleton {
99
- background-color: ${o("-90deg")};
100
- height: 1rem;
101
- width: 9rem;
102
- }
103
-
104
- & .text__description--skeleton {
105
- background-color: ${o("-90deg")};
106
- height: 1rem;
107
- width: 12rem;
108
- }
27
+ `}
109
28
 
110
- & .text__action--skeleton {
111
- background-color: ${o("-90deg")};
112
- height: 2rem;
113
- width: 9rem;
29
+ @media (max-width: ${n + "px"}) {
30
+ flex-direction: column;
31
+ & img {
32
+ max-width: 100%;
33
+ min-width: 100%;
34
+ max-height: ${(e) => e.imgHMob || "12.1rem"};
35
+ min-height: ${(e) => e.imgHMob || "12.1rem"};
114
36
  }
115
37
  }
116
- `, v = p(
117
- ({
118
- title: r,
119
- image: e,
120
- description: i,
121
- actionText: n,
122
- onSelectCard: a = () => {
123
- },
124
- className: l,
125
- position: h,
126
- tag: s
127
- }, $) => {
128
- const x = w();
129
- return /* @__PURE__ */ t(u, { children: /* @__PURE__ */ m(
130
- b,
131
- {
132
- theme: x,
133
- className: l,
134
- onClick: a,
135
- position: h,
136
- children: [
137
- /* @__PURE__ */ t("img", { src: e, className: "wrapper__image" }),
138
- /* @__PURE__ */ m("div", { className: "wrapper__text", children: [
139
- s && /* @__PURE__ */ t("div", { className: "text__tag", children: s }),
140
- /* @__PURE__ */ t("div", { className: "text__title", children: r }),
141
- g(i) && /* @__PURE__ */ t("div", { className: "text__description", children: i }),
142
- g(n) && /* @__PURE__ */ t(
143
- _,
144
- {
145
- text: n,
146
- onClick: a,
147
- className: "text__action"
148
- }
149
- )
150
- ] })
151
- ]
152
- }
153
- ) });
38
+ `, $ = t.div`
39
+ padding: 2rem;
40
+ display: flex;
41
+ gap: 1.25rem;
42
+ justify-content: space-between;
43
+ flex: 1;
44
+ flex-direction: column;
45
+
46
+ @media (max-width: ${n + "px"}) {
47
+ padding: 1.25rem;
154
48
  }
155
- ), y = d.div`
49
+ `, H = t.div`
156
50
  display: flex;
157
51
  flex-direction: column;
158
- gap: 1.5rem;
52
+ gap: 0.25rem;
159
53
 
160
- & .regular-title {
161
- display: flex;
162
- gap: 0.5rem;
163
- align-items: center;
164
- justify-content: space-between;
54
+ & .header-title {
165
55
  font-size: 1.5rem;
166
56
  font-weight: 600;
167
- & .regular-title-text {
168
- display: flex;
169
- gap: 0.5rem;
170
- align-items: center;
171
- }
57
+ }
172
58
 
173
- & i {
174
- font-size: 1.5rem;
175
- color: var(--primary-500, #f59e0b);
176
- }
59
+ & .header-subtitle {
60
+ color: var(--gray-600, #676e79);
61
+ font-size: 1rem;
62
+ font-weight: 500;
177
63
  }
178
64
 
179
- @media (max-width: ${f + "px"}) {
180
- gap: 1.25rem;
65
+ @media (max-width: ${n + "px"}) {
66
+ flex-direction: column;
67
+ }
68
+ `, W = t.div`
69
+ display: flex;
70
+ flex-direction: column;
71
+ gap: 0.75rem;
72
+ font-size: 0.875rem;
73
+ font-weight: 500;
181
74
 
182
- & .regular-title {
183
- font-size: 1.375rem;
75
+ & .list-item {
76
+ display: flex;
77
+ align-items: center;
184
78
 
185
- &.center {
186
- justify-content: center;
187
- }
79
+ & .mng {
80
+ font-size: 1.25rem;
81
+ color: var(--info-600);
188
82
  }
189
83
  }
190
- `, k = d.div`
191
- display: grid;
192
- grid-template-columns: repeat(12, 1fr);
193
- grid-template-rows: 15rem 15rem;
194
- grid-column-gap: 1.25rem;
195
- grid-row-gap: 1.25rem;
196
- height: 30rem;
197
- max-height: 30rem;
198
84
 
199
- @media (max-width: ${f + "px"}) {
200
- display: flex;
201
- flex-direction: column;
202
- gap: 1rem;
203
- width: 100%;
204
- height: 100%;
205
- max-height: 100%;
206
- padding: 0 1rem;
85
+ @media (max-width: ${n + "px"}) {
207
86
  }
208
- `, C = p(
209
- ({ title: r, items: e, limit: i = 3 }, n) => /* @__PURE__ */ m(y, { children: [
210
- /* @__PURE__ */ t("div", { className: "regular-title", children: /* @__PURE__ */ t("div", { className: "regular-title-text", children: /* @__PURE__ */ t("span", { children: r }) }) }),
211
- /* @__PURE__ */ t(k, { limit: i, children: e && (e == null ? void 0 : e.map((a, l) => /* @__PURE__ */ t(
212
- v,
213
- {
214
- ...a
215
- },
216
- `landing-page-masonry-general-card__${l + 1}`
217
- ))) })
218
- ] })
219
- );
87
+ `, N = u((e, k) => {
88
+ const {
89
+ title: o,
90
+ subtitle: a,
91
+ buttonText: d,
92
+ list: m,
93
+ image: l,
94
+ imageHeight: c,
95
+ imageWidth: s,
96
+ imageHeightMob: g,
97
+ hasBorder: h = !0,
98
+ backgroundColor: p = "transparent",
99
+ onBannerClick: x
100
+ } = e;
101
+ return /* @__PURE__ */ r(
102
+ y,
103
+ {
104
+ imgH: c,
105
+ imgW: s,
106
+ imgHMob: g,
107
+ hasBorder: h,
108
+ bgColor: p,
109
+ children: [
110
+ /* @__PURE__ */ r($, { children: [
111
+ /* @__PURE__ */ r(H, { children: [
112
+ /* @__PURE__ */ i("div", { className: "header-title", children: o }),
113
+ /* @__PURE__ */ i("div", { className: "header-subitle", children: a })
114
+ ] }),
115
+ /* @__PURE__ */ i(W, { children: m == null ? void 0 : m.map((f, b) => /* @__PURE__ */ i(w, { children: /* @__PURE__ */ r("div", { className: "list-item", children: [
116
+ /* @__PURE__ */ i("i", { className: "mng mng-lnc-checkmark--filled" }),
117
+ /* @__PURE__ */ i("span", { children: f })
118
+ ] }) }, b)) }),
119
+ /* @__PURE__ */ i(
120
+ v,
121
+ {
122
+ size: "medium",
123
+ color: "gray",
124
+ type: "button",
125
+ btnType: "outline",
126
+ onClick: x,
127
+ children: d
128
+ }
129
+ )
130
+ ] }),
131
+ /* @__PURE__ */ i("img", { src: l })
132
+ ]
133
+ }
134
+ );
135
+ });
220
136
  export {
221
- C as default
137
+ N as default
222
138
  };