@apolitical/component-library 3.5.20 → 3.5.21
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/index.js +1 -1
- package/index.mjs +27 -25
- package/package.json +1 -1
- package/sections/logo-section/logo-section.d.ts +3 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -6560,54 +6560,56 @@ const tc = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: s
|
|
|
6560
6560
|
};
|
|
6561
6561
|
const tu = ({
|
|
6562
6562
|
title: t = !1,
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6563
|
+
text: e,
|
|
6564
|
+
logos: n = [],
|
|
6565
|
+
styling: r = {},
|
|
6566
|
+
className: s = ""
|
|
6566
6567
|
}) => {
|
|
6567
|
-
const
|
|
6568
|
-
if (
|
|
6568
|
+
const i = n.length;
|
|
6569
|
+
if (i === 0)
|
|
6569
6570
|
return null;
|
|
6570
|
-
const
|
|
6571
|
+
const o = {
|
|
6571
6572
|
element: typeof t == "object" ? t.element : "h2",
|
|
6572
6573
|
text: typeof t == "string" ? t : typeof t == "object" ? t.text : "",
|
|
6573
6574
|
className: typeof t == "object" ? t.className : ""
|
|
6574
|
-
}, { wrapLogos:
|
|
6575
|
+
}, { wrapLogos: c = !1, align: d = "center", display: l = "block" } = r;
|
|
6575
6576
|
return /* @__PURE__ */ a.jsxs(
|
|
6576
6577
|
"div",
|
|
6577
6578
|
{
|
|
6578
|
-
className: E("logos",
|
|
6579
|
-
[
|
|
6580
|
-
"wrap-logos":
|
|
6579
|
+
className: E("logos", s, `align-${d}`, {
|
|
6580
|
+
[l]: l !== "block",
|
|
6581
|
+
"wrap-logos": c
|
|
6581
6582
|
}),
|
|
6582
6583
|
children: [
|
|
6583
6584
|
t && Y.createElement(
|
|
6584
|
-
|
|
6585
|
-
{ className: E("title",
|
|
6586
|
-
|
|
6585
|
+
o.element,
|
|
6586
|
+
{ className: E("title", o.className) },
|
|
6587
|
+
o.text
|
|
6587
6588
|
),
|
|
6589
|
+
e && /* @__PURE__ */ a.jsx("p", { children: e }),
|
|
6588
6590
|
/* @__PURE__ */ a.jsx(
|
|
6589
6591
|
"ul",
|
|
6590
6592
|
{
|
|
6591
6593
|
className: E({
|
|
6592
|
-
"two-col":
|
|
6593
|
-
"three-col":
|
|
6594
|
+
"two-col": i === 2 || i === 4,
|
|
6595
|
+
"three-col": i === 5 || i <= 10 && i % 3 === 0
|
|
6594
6596
|
}),
|
|
6595
|
-
children:
|
|
6596
|
-
if (!
|
|
6597
|
+
children: n.map(({ logo: u, nameOfBusiness: m, link: f = !1, description: p = !1 }, h) => {
|
|
6598
|
+
if (!u || !u.url)
|
|
6597
6599
|
return null;
|
|
6598
|
-
const
|
|
6600
|
+
const v = /* @__PURE__ */ a.jsx(
|
|
6599
6601
|
"img",
|
|
6600
6602
|
{
|
|
6601
|
-
src:
|
|
6602
|
-
width:
|
|
6603
|
-
height:
|
|
6604
|
-
alt:
|
|
6603
|
+
src: u.url,
|
|
6604
|
+
width: u.width || "auto",
|
|
6605
|
+
height: u.height || "auto",
|
|
6606
|
+
alt: m
|
|
6605
6607
|
}
|
|
6606
6608
|
);
|
|
6607
6609
|
return /* @__PURE__ */ a.jsxs("li", { children: [
|
|
6608
|
-
/* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children:
|
|
6609
|
-
|
|
6610
|
-
] }, window.btoa(`${
|
|
6610
|
+
/* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children: f ? /* @__PURE__ */ a.jsx("a", { href: f, target: "_blank", rel: "nofollow noreferrer noopener", children: v }) : v }),
|
|
6611
|
+
p && /* @__PURE__ */ a.jsx("small", { children: p })
|
|
6612
|
+
] }, window.btoa(`${u.url}_${h}`));
|
|
6611
6613
|
})
|
|
6612
6614
|
}
|
|
6613
6615
|
)
|
package/package.json
CHANGED
|
@@ -16,6 +16,8 @@ interface Props {
|
|
|
16
16
|
text: string;
|
|
17
17
|
className?: string;
|
|
18
18
|
};
|
|
19
|
+
/** Text to show above the logos */
|
|
20
|
+
text?: string;
|
|
19
21
|
/** The logos to show */
|
|
20
22
|
logos?: Array<LogosType>;
|
|
21
23
|
/** Optional styling */
|
|
@@ -30,5 +32,5 @@ interface Props {
|
|
|
30
32
|
/** Additional classes */
|
|
31
33
|
className?: string;
|
|
32
34
|
}
|
|
33
|
-
declare const LogoSection: ({ title: titleProps, logos, styling, className, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
35
|
+
declare const LogoSection: ({ title: titleProps, text, logos, styling, className, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
34
36
|
export default LogoSection;
|