@apolitical/component-library 4.8.7-jc.4 → 4.8.7-jc.6
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 +21 -18
- package/package.json +1 -1
- package/styles/variables/colors/_colors.scss +2 -0
package/index.mjs
CHANGED
|
@@ -1645,7 +1645,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1645
1645
|
const Ae = ({
|
|
1646
1646
|
variant: e = "primary",
|
|
1647
1647
|
size: t = "medium",
|
|
1648
|
-
styling: n = { muted: !1, fullWidth: !1 },
|
|
1648
|
+
styling: n = { muted: !1, fullWidth: !1, new: !1 },
|
|
1649
1649
|
icon: r = !1,
|
|
1650
1650
|
href: i = !1,
|
|
1651
1651
|
element: a = "button",
|
|
@@ -1664,13 +1664,16 @@ const Ae = ({
|
|
|
1664
1664
|
}
|
|
1665
1665
|
!l && u && (u = "");
|
|
1666
1666
|
const v = [];
|
|
1667
|
-
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")))
|
|
1667
|
+
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")));
|
|
1668
1668
|
const C = {
|
|
1669
1669
|
...p,
|
|
1670
1670
|
className: Z(e, o, v, {
|
|
1671
1671
|
"no-text": !h,
|
|
1672
1672
|
disabled: l,
|
|
1673
|
-
button: i
|
|
1673
|
+
button: i,
|
|
1674
|
+
new: n.new,
|
|
1675
|
+
muted: n.muted,
|
|
1676
|
+
"full-width": n.fullWidth
|
|
1674
1677
|
}),
|
|
1675
1678
|
onClick: (E) => {
|
|
1676
1679
|
(!i || i[0] === "#") && s && (E.preventDefault(), E.stopPropagation()), s && s(E);
|
|
@@ -6365,23 +6368,23 @@ const Dn = ({
|
|
|
6365
6368
|
}
|
|
6366
6369
|
});
|
|
6367
6370
|
}
|
|
6368
|
-
}, G = (k) => {
|
|
6369
|
-
var q;
|
|
6370
|
-
if (k.preventDefault(), k.stopPropagation(), $)
|
|
6371
|
-
return;
|
|
6372
|
-
let R = 0;
|
|
6373
|
-
if ((q = re == null ? void 0 : re.current) != null && q.id) {
|
|
6374
|
-
const ne = document.getElementById(re.current.id);
|
|
6375
|
-
ne && (R = ne.getBoundingClientRect().top + window.scrollY);
|
|
6376
|
-
}
|
|
6377
|
-
const M = document.getElementById("header");
|
|
6378
|
-
M && (R = R - M.offsetHeight - b), R < 0 && (R = 0), window.scrollTo({ top: R, behavior: "smooth" }), L();
|
|
6379
6371
|
}, _ = [
|
|
6380
6372
|
{
|
|
6381
6373
|
...f,
|
|
6382
6374
|
icon: W ? { icon: "tick", position: "left" } : !1,
|
|
6383
|
-
className:
|
|
6384
|
-
onClick:
|
|
6375
|
+
className: "gtm-trackable",
|
|
6376
|
+
onClick: (k) => {
|
|
6377
|
+
var q;
|
|
6378
|
+
if (k.preventDefault(), k.stopPropagation(), $)
|
|
6379
|
+
return;
|
|
6380
|
+
let R = 0;
|
|
6381
|
+
if ((q = re == null ? void 0 : re.current) != null && q.id) {
|
|
6382
|
+
const ne = document.getElementById(re.current.id);
|
|
6383
|
+
ne && (R = ne.getBoundingClientRect().top + window.scrollY);
|
|
6384
|
+
}
|
|
6385
|
+
const M = document.getElementById("header");
|
|
6386
|
+
M && (R = R - M.offsetHeight - b), R < 0 && (R = 0), window.scrollTo({ top: R, behavior: "smooth" }), L();
|
|
6387
|
+
},
|
|
6385
6388
|
disabled: $ || W || s.disabled,
|
|
6386
6389
|
"data-gtm-event-context": d.context,
|
|
6387
6390
|
"data-gtm-event-type": d.event,
|
|
@@ -6390,7 +6393,7 @@ const Dn = ({
|
|
|
6390
6393
|
];
|
|
6391
6394
|
return v && _.unshift({
|
|
6392
6395
|
...o,
|
|
6393
|
-
className:
|
|
6396
|
+
className: "gtm-trackable",
|
|
6394
6397
|
"data-gtm-event-context": d.context,
|
|
6395
6398
|
"data-gtm-event-type": d.event,
|
|
6396
6399
|
disabled: $ || W,
|
|
@@ -20737,7 +20740,7 @@ const _C = ({
|
|
|
20737
20740
|
intlPath: "contactForm",
|
|
20738
20741
|
gtm: { context: r, event: i },
|
|
20739
20742
|
functions: { onSuccess: t, onFailure: n },
|
|
20740
|
-
button: {
|
|
20743
|
+
button: { styling: { new: !0 } }
|
|
20741
20744
|
}
|
|
20742
20745
|
);
|
|
20743
20746
|
};
|
package/package.json
CHANGED
|
@@ -38,8 +38,10 @@ $default-colors: (
|
|
|
38
38
|
'p50': rgb(255 242 255 / 100%),
|
|
39
39
|
'p75': rgb(250 225 245 / 100%),
|
|
40
40
|
'p100': rgb(238 200 237 / 100%),
|
|
41
|
+
'p150': rgb(206 197 250 / 100%),
|
|
41
42
|
'p300': rgb(203 130 197 / 100%),
|
|
42
43
|
'p500': rgb(166 55 152 / 100%),
|
|
44
|
+
'p550': rgb(119 107 224 / 100%),
|
|
43
45
|
'p600': rgb(136 90 189 / 100%),
|
|
44
46
|
'p900': rgb(66 1 55 / 100%),
|
|
45
47
|
'y50': rgb(255 248 232 / 100%),
|