@lanaco/lnc-react-ui
Version:
React component library
160 lines (147 loc) • 4.18 kB
JavaScript
import { jsxs as n, jsx as i } from "react/jsx-runtime";
import { forwardRef as y, Fragment as v } from "react";
import { s as a } from "./emotion-styled.browser.esm-DfbrHHed.js";
import { d as m } from "./breakpoints-BubDitvo.js";
import $ from "./Button.js";
const H = a.div`
display: flex;
border-radius: 0.75rem;
background-color: ${(e) => (e == null ? void 0 : e.bgColor) || "transparent"};
overflow: hidden;
& button {
width: fit-content;
}
& img {
object-fit: cover;
max-width: ${(e) => e.imgW || "33.39346rem"};
min-width: ${(e) => e.imgW || "33.39346rem"};
max-height: ${(e) => e.imgH || "22.5rem"};
min-height: ${(e) => e.imgH || "22.5rem"};
}
${(e) => e.hasBorder === !0 && `border: 1px solid var(--gray-95008, rgba(20, 22, 26, 0.08));
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
`}
@media ${m("S")} {
/* Keep the card (border / radius / shadow) on mobile so the text and
image read as one unified visual, with the image flush at the bottom
of the card (see design). */
flex-direction: column;
& img {
max-width: 100%;
min-width: 100%;
max-height: ${(e) => e.imgHMob || "12.1rem"};
min-height: ${(e) => e.imgHMob || "12.1rem"};
}
}
`, N = a.div`
padding: 2rem;
display: flex;
gap: 1.25rem;
justify-content: space-between;
flex: 1;
flex-direction: column;
@media ${m("S")} {
padding: 1rem 1rem 1.25rem 1rem;
}
`, W = a.div`
display: flex;
flex-direction: column;
gap: 0.25rem;
& .header-title {
color: var(--gray-950, #14161a);
font-size: 1.75rem;
font-style: normal;
font-weight: 600;
line-height: 2.25rem;
letter-spacing: -0.5904px;
}
& .header-subtitle {
color: var(--gray-950, #14161a);
font-size: 1rem;
font-style: normal;
font-weight: 500;
line-height: 1.5rem;
letter-spacing: -0.0112rem;
}
@media ${m("S")} {
flex-direction: column;
}
`, k = a.div`
display: flex;
flex-direction: column;
gap: 0.75rem;
font-size: 0.875rem;
font-weight: 500;
& .list-item {
color: var(--gray-950, #14161a);
display: flex;
align-items: center;
font-size: 0.875rem;
font-style: normal;
font-weight: 500;
line-height: 1.25rem;
letter-spacing: -0.0056rem;
& .mng {
font-size: 1.25rem;
color: var(--info-600, #6d28d9);
}
}
`, S = y((e, l) => {
const {
title: s,
subtitle: d,
buttonText: c,
list: o,
imageUrl: g,
imageHeight: h,
imageWidth: p,
imageHeightMobile: f,
hasBorder: b = !0,
backgroundColor: x = "transparent",
onButtonAction: u = () => {
},
buttonLink: w
} = e;
return /* @__PURE__ */ n(
H,
{
ref: l,
imgH: h,
imgW: p,
imgHMob: f,
hasBorder: b,
bgColor: x,
className: "lp-section lp-bnr-section lp-banner-section-with-list-image banner-sec-listimg",
children: [
/* @__PURE__ */ n(N, { className: "banner-sec-listimg-wrapper", children: [
/* @__PURE__ */ n(W, { children: [
/* @__PURE__ */ i("div", { className: "header-title", children: s }),
/* @__PURE__ */ i("div", { className: "header-subitle", children: d })
] }),
/* @__PURE__ */ i(k, { lassName: "banner-sec-listimg-list", children: o == null ? void 0 : o.map((t, r) => /* @__PURE__ */ i(v, { children: /* @__PURE__ */ n("div", { className: "list-item", children: [
/* @__PURE__ */ i("i", { className: "mng mng-lnc-checkmark--filled" }),
/* @__PURE__ */ i("span", { children: t })
] }) }, r)) }),
/* @__PURE__ */ i(
$,
{
size: "medium",
color: "neutral",
type: "button",
btnType: "outline",
onClick: (t) => {
var r;
(r = t == null ? void 0 : t.target) == null || r.blur(), u(w);
},
children: c
}
)
] }),
/* @__PURE__ */ i("img", { src: g })
]
}
);
});
export {
S as default
};