@apolitical/component-library 3.2.0-beta.1 → 3.3.0-beta.1

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.mjs CHANGED
@@ -965,6 +965,7 @@ const Ue = {
965
965
  card_bootcamp: "Email boot camp",
966
966
  card_ended: "Ended",
967
967
  card_registered: "Registered",
968
+ card_partner: "{partner} and {number} more",
968
969
  card_answers: "{number, plural, =0 {0 answers} one {# answer} other {# answers}}",
969
970
  card_time_ago: "{time} ago",
970
971
  card_time_read: "{time} min read",
@@ -1670,6 +1671,9 @@ class ns {
1670
1671
  constructor(e) {
1671
1672
  this.el = e, this.summary = e.querySelector("summary"), this.content = e.querySelector(".content"), this.animation = null, this.isClosing = !1, this.isExpanding = !1, this.summary.addEventListener("click", (n) => this.onClick(n));
1672
1673
  }
1674
+ cleanUp() {
1675
+ this.summary.removeEventListener("click", (e) => this.onClick(e));
1676
+ }
1673
1677
  onClick(e) {
1674
1678
  e.preventDefault(), e.stopPropagation(), this.el.style.overflow = "hidden", this.isClosing || !this.el.open ? this.open() : (this.isExpanding || this.el.open) && this.shrink();
1675
1679
  }
@@ -1714,7 +1718,10 @@ const Kn = ({
1714
1718
  }) => {
1715
1719
  const i = K(), s = pe(null);
1716
1720
  return ae(() => {
1717
- r && new ns(s.current);
1721
+ let o;
1722
+ return r && (o = new ns(s.current)), () => {
1723
+ r && o && o.cleanUp();
1724
+ };
1718
1725
  }, []), /* @__PURE__ */ a.jsxs(
1719
1726
  "details",
1720
1727
  {
@@ -6800,7 +6807,10 @@ const Qo = {
6800
6807
  "data-testid": "contributors"
6801
6808
  }
6802
6809
  ),
6803
- d.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: Je(d.partner.title, k.partner) }),
6810
+ d.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: d.partner.length > 1 ? o.formatMessage(
6811
+ { id: "card_partner" },
6812
+ { partner: d.partner[0], number: d.partner.length - 1 }
6813
+ ) : Je(d.partner[0], k.partner) }),
6804
6814
  /* Text */
6805
6815
  ["title", "text", "secondaryText"].map((D) => {
6806
6816
  const R = d[D];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "3.2.0-beta.1",
3
+ "version": "3.3.0-beta.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {