@apolitical/component-library 5.0.3 → 5.0.4-jc.0
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/general/buttons/button/button.d.ts +1 -0
- package/index.js +3 -3
- package/index.mjs +12 -7
- package/package.json +1 -1
- package/sections/full-width-section/full-width-section.d.ts +2 -0
- package/style.css +1 -1
- package/styles/variables/colors/_colors.scss +2 -0
- package/styles/variables/colors/theme/_base.scss +1 -1
- package/styles/variables/colors/theme/_layout.scss +1 -1
package/index.mjs
CHANGED
|
@@ -1662,7 +1662,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1662
1662
|
const Ae = ({
|
|
1663
1663
|
variant: e = "primary",
|
|
1664
1664
|
size: t = "medium",
|
|
1665
|
-
styling: n = { muted: !1, fullWidth: !1 },
|
|
1665
|
+
styling: n = { muted: !1, fullWidth: !1, new: !1 },
|
|
1666
1666
|
icon: r = !1,
|
|
1667
1667
|
href: i = !1,
|
|
1668
1668
|
element: a = "button",
|
|
@@ -1681,13 +1681,16 @@ const Ae = ({
|
|
|
1681
1681
|
}
|
|
1682
1682
|
!l && u && (u = "");
|
|
1683
1683
|
const v = [];
|
|
1684
|
-
typeof t == "string" && v.push(t), r && (v.push("icon"), typeof r == "object" ? (v.push(r.icon), r.position ? v.push(r.position) : v.push("left"), r.hover && v.push(`hover_${r.hover}`), r.animate && (v.push("animate"), typeof r.animate == "string" && v.push(r.animate))) : (v.push(r), !r.includes("right") && !r.includes("left") && v.push("left")))
|
|
1684
|
+
typeof t == "string" && v.push(t), r && (v.push("icon"), typeof r == "object" ? (v.push(r.icon), r.position ? v.push(r.position) : v.push("left"), r.hover && v.push(`hover_${r.hover}`), r.animate && (v.push("animate"), typeof r.animate == "string" && v.push(r.animate))) : (v.push(r), !r.includes("right") && !r.includes("left") && v.push("left")));
|
|
1685
1685
|
const w = {
|
|
1686
1686
|
...p,
|
|
1687
1687
|
className: Z(e, o, v, {
|
|
1688
1688
|
"no-text": !h,
|
|
1689
1689
|
disabled: l,
|
|
1690
|
-
button: i
|
|
1690
|
+
button: i,
|
|
1691
|
+
new: n.new,
|
|
1692
|
+
muted: n.muted,
|
|
1693
|
+
"full-width": n.fullWidth
|
|
1691
1694
|
}),
|
|
1692
1695
|
onClick: (E) => {
|
|
1693
1696
|
(!i || i[0] === "#") && s && (E.preventDefault(), E.stopPropagation()), s && s(E);
|
|
@@ -2811,7 +2814,7 @@ const no = (e) => e === "apolitical" ? {
|
|
|
2811
2814
|
name: e.name,
|
|
2812
2815
|
role: e.jobTitle || "",
|
|
2813
2816
|
organisation: e.organization || "",
|
|
2814
|
-
country: e.location && e.location.
|
|
2817
|
+
country: e.location && e.location.country || "",
|
|
2815
2818
|
url: `/profiles/${e.id}`,
|
|
2816
2819
|
image: e.image && e.image.thumbnail,
|
|
2817
2820
|
badges: e.badges
|
|
@@ -20791,7 +20794,8 @@ const kC = ({
|
|
|
20791
20794
|
],
|
|
20792
20795
|
intlPath: "contactForm",
|
|
20793
20796
|
gtm: { context: r, event: i },
|
|
20794
|
-
functions: { onSuccess: t, onFailure: n }
|
|
20797
|
+
functions: { onSuccess: t, onFailure: n },
|
|
20798
|
+
button: { styling: { new: !0 } }
|
|
20795
20799
|
}
|
|
20796
20800
|
);
|
|
20797
20801
|
};
|
|
@@ -21564,12 +21568,13 @@ const qn = ({
|
|
|
21564
21568
|
styling: n = {},
|
|
21565
21569
|
...r
|
|
21566
21570
|
}) => {
|
|
21567
|
-
const { background: i = "default" } = n;
|
|
21571
|
+
const { background: i = "default", padding: a = "none" } = n;
|
|
21568
21572
|
return /* @__PURE__ */ c.jsx(
|
|
21569
21573
|
"section",
|
|
21570
21574
|
{
|
|
21571
21575
|
className: Z("full-width-section", t, {
|
|
21572
|
-
[i]: i !== "default"
|
|
21576
|
+
[i]: i !== "default",
|
|
21577
|
+
[a]: a !== "none"
|
|
21573
21578
|
}),
|
|
21574
21579
|
...r,
|
|
21575
21580
|
children: e
|
package/package.json
CHANGED
|
@@ -4,6 +4,8 @@ interface Props {
|
|
|
4
4
|
styling?: {
|
|
5
5
|
/** The background of the section. Defaults to `default` */
|
|
6
6
|
background?: 'default' | 'light' | 'dark';
|
|
7
|
+
/** The size of the padding. Defaults to `none` */
|
|
8
|
+
padding?: 'none' | 'medium' | 'large';
|
|
7
9
|
};
|
|
8
10
|
/** Additional classes */
|
|
9
11
|
className?: string;
|